diff options
author | ZackaryWelch <welch.zackary@gmail.com> | 2018-01-30 13:25:00 -0500 |
---|---|---|
committer | ZackaryWelch <welch.zackary@gmail.com> | 2018-01-30 13:25:00 -0500 |
commit | 79cc1484c38e0dbd27aa03a97eaab2bb6b6d5c78 (patch) | |
tree | a3df677962ce5eeeef5ac3b9056119987b701c8b /src-qt5/src-cpp/framework-OSInterface_private.cpp | |
parent | Fixed the find/bookmark widgets and rotation for lumina-pdf (diff) | |
parent | Merge branch 'master' of github.com:trueos/lumina (diff) | |
download | lumina-79cc1484c38e0dbd27aa03a97eaab2bb6b6d5c78.tar.gz lumina-79cc1484c38e0dbd27aa03a97eaab2bb6b6d5c78.tar.bz2 lumina-79cc1484c38e0dbd27aa03a97eaab2bb6b6d5c78.zip |
Merge branch 'master' of https://github.com/trueos/lumina
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(); } |