Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/libs/handler.cpp b/libs/handler.cpp
- index 99e501d4..b0a0da7e 100644
- --- a/libs/handler.cpp
- +++ b/libs/handler.cpp
- @@ -90,17 +90,13 @@ Handler::Handler(QObject *parent)
- NetworkManager::ActiveConnection::Ptr hotspot = NetworkManager::findActiveConnection(Configuration::hotspotConnectionPath());
- if (!hotspot) {
- Configuration::setHotspotConnectionPath(QString());
- - Q_EMIT hotspotDisabled();
- }
- }
- m_hotspotSupported = checkHotspotSupported();
- if (NetworkManager::checkVersion(1, 16, 0)) {
- - connect(NetworkManager::notifier(), &NetworkManager::Notifier::primaryConnectionTypeChanged, [this] () {
- - m_hotspotSupported = checkHotspotSupported();
- - Q_EMIT hotspotSupportedChanged(m_hotspotSupported);
- - });
- + connect(NetworkManager::notifier(), &NetworkManager::Notifier::primaryConnectionTypeChanged, this, &Handler::primaryConnectionTypeChanged);
- }
- }
- @@ -870,6 +866,13 @@ void Handler::hotspotCreated(QDBusPendingCallWatcher *watcher)
- }
- }
- +void Handler::primaryConnectionTypeChanged(NetworkManager::ConnectionSettings::ConnectionType type)
- +{
- + Q_UNUSED(type)
- + m_hotspotSupported = checkHotspotSupported();
- + Q_EMIT hotspotSupportedChanged(m_hotspotSupported);
- +}
- +
- #if WITH_MODEMMANAGER_SUPPORT
- void Handler::unlockRequiredChanged(MMModemLock modemLock)
- {
- diff --git a/libs/handler.h b/libs/handler.h
- index 60bb1f5e..b1e7bf66 100644
- --- a/libs/handler.h
- +++ b/libs/handler.h
- @@ -129,6 +129,7 @@ private Q_SLOTS:
- void secretAgentError(const QString &connectionPath, const QString &message);
- void replyFinished(QDBusPendingCallWatcher *watcher);
- void hotspotCreated(QDBusPendingCallWatcher *watcher);
- + void primaryConnectionTypeChanged(NetworkManager::ConnectionSettings::ConnectionType type);
- #if WITH_MODEMMANAGER_SUPPORT
- void unlockRequiredChanged(MMModemLock modemLock);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement