Index: sources/view/settings/VNetworkModel.cpp =================================================================== diff -u -r87ca1f6fca153e2ac05425d2dc5937d5a46ba206 -rbba484de53409dec9c7d3cf331621d9733154872 --- sources/view/settings/VNetworkModel.cpp (.../VNetworkModel.cpp) (revision 87ca1f6fca153e2ac05425d2dc5937d5a46ba206) +++ sources/view/settings/VNetworkModel.cpp (.../VNetworkModel.cpp) (revision bba484de53409dec9c7d3cf331621d9733154872) @@ -26,8 +26,8 @@ connect(&_WifiInterface, SIGNAL(didScanStatusChanged(bool)), this, SLOT( onScanStatusChanged(bool))); - connect(&_WifiInterface, SIGNAL( didConnectToNetwork(const WifiNetworkData &)), - this, SLOT( onConnectToNetwork(const WifiNetworkData &))); + connect(&_WifiInterface, SIGNAL( didSetupNetworkConnection(const WifiNetworkData &)), + this, SLOT( onSetupNetworkConnection(const WifiNetworkData &))); connect(&_WifiInterface, SIGNAL(didDisconnectNetwork(const WifiNetworkData &)), this, SLOT( onDisconnectNetwork(const WifiNetworkData &))); @@ -41,6 +41,9 @@ connect(&_WifiInterface, SIGNAL(didInternetConnectionChange (const bool &)), this, SLOT( onInternetConnectionChanged(const bool &))); + connect(&_WifiInterface, SIGNAL(didLocalNetworkConnectionChange (const bool &)), + this, SLOT( onLocalNetworkConnectionChanged(const bool &))); + // incoming - static IP address assignment connect(&_WifiInterface, SIGNAL(didSetStaticIPAddress (const QString &)), this, SLOT( onSetStaticIPAddressSuccess(const QString &))); @@ -269,20 +272,20 @@ } /*! - * \brief VNetworkModel::onConnectedToNetwork - * Called when we have connected to a network. - * \param vNetwork - (Network) the network we have connected to + * \brief VNetworkModel::onSetupNetworkConnection + * Called when we have finished setting up the connection to a network + * \param vNetwork - (Network) the network we have finished setting up */ -void VNetworkModel::onConnectToNetwork(const WifiNetworkData &vNetwork) +void VNetworkModel::onSetupNetworkConnection(const WifiNetworkData &vNetwork) { - LOG_DEBUG(QString("Connected to %1.").arg(vNetwork.ssid())); + LOG_DEBUG(QString("Setup connection to %1.").arg(vNetwork.ssid())); ipAddress(vNetwork.mIPSettings.mIPAddress.trimmed()); gateway(vNetwork.mIPSettings.mGateway.trimmed()); subnetMask(vNetwork.mIPSettings.mSubnetMask.trimmed()); dns(vNetwork.mIPSettings.mDNS.trimmed()); ssid(vNetwork.ssid().trimmed()); macAddress(vNetwork.macAddress().trimmed()); - status(tr("Connected to %1.").arg(vNetwork.ssid()).trimmed()); + status(tr("Setup connection to %1.").arg(vNetwork.ssid()).trimmed()); } /*! @@ -407,6 +410,16 @@ } /*! + * \brief VNetworkModel::onLocalNetworkConnectionChanged + * Called when the internet connection changes + * \param vConnected - if true, we're connected to the internet, false otherwise + */ +void VNetworkModel::onLocalNetworkConnectionChanged(const bool &vConnected) +{ + connectedToNetwork(vConnected); +} + +/*! * \brief VNetworkModel::onInternetConnectionChanged * Called when the internet connection changes * \param vConnected - if true, we're connected to the internet, false otherwise