From ebfec6cb6e5821ee8d6bf3def47b46eba508324c Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 23 Feb 2012 09:38:21 +0100 Subject: connected interfaces saved in networkdiscovery class and now accessed by getter & minor --- src/fbgui/ndgui.cpp | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'src/fbgui/ndgui.cpp') diff --git a/src/fbgui/ndgui.cpp b/src/fbgui/ndgui.cpp index 447b396..ad7ff5f 100644 --- a/src/fbgui/ndgui.cpp +++ b/src/fbgui/ndgui.cpp @@ -62,8 +62,6 @@ void ndgui::init() { connect(_networkDiscovery, SIGNAL(changeProgressBarValue(const QString & , const int& )), _jsi, SLOT(updateIfProgressBar(const QString & , const int&))); - connect(_networkDiscovery, SIGNAL(connectionEstablished(QString)), this, - SLOT(handleConnectionEstablished(QString))); connect(_networkDiscovery, SIGNAL(allProcessesFinished()), this, SLOT(handleAllProcessesFinished())); connect(_jsi, SIGNAL(startFbgui(const QString&)), this, @@ -127,18 +125,6 @@ void ndgui::startNetworkDiscovery() { } } -/** - * @brief handle if a interface is able to connect - * - * if we have a user choice (_userChoice = true) than networkDiscovery will - * emit connectionEstablished signals. - * Add the interface name to a _ifNameList. This list holds all interfaces - * the user can choose out of. - */ -void ndgui::handleConnectionEstablished(QString ifName) { - _ifNameList.append(ifName); -} - /** * @brief determines if we continue the boot sequence or if we show the chooseInterface or abortBoot dialog * @@ -152,11 +138,12 @@ void ndgui::handleConnectionEstablished(QString ifName) { void ndgui::handleAllProcessesFinished() { LOG4CXX_DEBUG(ndLogger, "all Processes finished"); _allowUserChoice->setEnabled(false); - if (_ifNameList.size() > 0) { + QList ifConnectedList = _networkDiscovery->getIfConnectedList(); + if (ifConnectedList.size() > 0) { if (_userChoice) { - _jsi->chooseInterfaceDialog(_ifNameList); + _jsi->chooseInterfaceDialog(ifConnectedList); } else { - foreach(QString i, _ifNameList) + foreach(QString i, ifConnectedList) { if (_networkDiscovery->checkConnectivity(i)) { continueBootWithoutCheck(i); @@ -165,10 +152,10 @@ void ndgui::handleAllProcessesFinished() { } } } else { - LOG4CXX_DEBUG(ndLogger, " No usable interfaces found!: " << _networkDiscovery->GetErrorStr()); + LOG4CXX_DEBUG(ndLogger, " No usable interfaces found!: " << _networkDiscovery->getErrorStr()); LOG4CXX_DEBUG(ndLogger, " list is empty"); _jsi->abortBoot("No usable interfaces found!" - + _networkDiscovery->GetErrorStr()); + + _networkDiscovery->getErrorStr()); } } -- cgit v1.2.3-55-g7522