summaryrefslogtreecommitdiffstats
path: root/src/fbgui/ndgui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fbgui/ndgui.cpp')
-rw-r--r--src/fbgui/ndgui.cpp25
1 files changed, 6 insertions, 19 deletions
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,
@@ -128,18 +126,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
*
* if we have a user choice (_userChoice = true) than networkDiscovery will
@@ -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<QString> 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());
}
}