diff options
Diffstat (limited to 'src-qt5/src-cpp/framework-OSInterface_private.cpp')
-rw-r--r-- | src-qt5/src-cpp/framework-OSInterface_private.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src-qt5/src-cpp/framework-OSInterface_private.cpp b/src-qt5/src-cpp/framework-OSInterface_private.cpp index 3e623de5..27bf910a 100644 --- a/src-qt5/src-cpp/framework-OSInterface_private.cpp +++ b/src-qt5/src-cpp/framework-OSInterface_private.cpp @@ -195,18 +195,24 @@ QString OSInterface::networkHostname(){ return QHostInfo::localHostName(); } -QHostAddress OSInterface::networkAddress(){ +QStringList OSInterface::networkAddress(){ QString addr; if(INFO.contains("netaccess/address")){ addr = INFO.value("netaccess/address").toString(); } - return QHostAddress(addr); + return addr.split(", "); } bool OSInterface::hasNetworkManager(){ return verifyAppOrBin(networkManagerUtility()); } +QString OSInterface::networkStatus(){ + QString stat = "<b>%1</b><br>%2<br>%3"; + return stat.arg(networkHostname(), networkType(), networkAddress().join("<br>")); +} + //NetworkAccessManager slots void OSInterface::netAccessChanged(QNetworkAccessManager::NetworkAccessibility stat){ + qDebug() << "[DEBUG] Got Net Access Changed"; INFO.insert("netaccess/available", stat== QNetworkAccessManager::Accessible); //Update all the other network status info at the same time QNetworkConfiguration active = netman->activeConfiguration(); @@ -265,6 +271,7 @@ void OSInterface::netAccessChanged(QNetworkAccessManager::NetworkAccessibility s icon = "network-workgroup"; //failover to a generic "network" icon } INFO.insert("netaccess/icon",icon); + qDebug() << "[DEBUG] Emit NetworkStatusChanged"; emit networkStatusChanged(); } |