summaryrefslogtreecommitdiffstats
path: root/src/networksettings/connman
diff options
context:
space:
mode:
Diffstat (limited to 'src/networksettings/connman')
-rw-r--r--src/networksettings/connman/qnetworksettingsmanager_p.cpp7
-rw-r--r--src/networksettings/connman/qnetworksettingsservice_p.cpp10
-rw-r--r--src/networksettings/connman/qnetworksettingsservice_p.h3
3 files changed, 20 insertions, 0 deletions
diff --git a/src/networksettings/connman/qnetworksettingsmanager_p.cpp b/src/networksettings/connman/qnetworksettingsmanager_p.cpp
index 22e8005..e3f6d0b 100644
--- a/src/networksettings/connman/qnetworksettingsmanager_p.cpp
+++ b/src/networksettings/connman/qnetworksettingsmanager_p.cpp
@@ -114,6 +114,7 @@ void QNetworkSettingsManagerPrivate::getTechnologiesFinished(QDBusPendingCallWat
foreach (const ConnmanMapStruct &object, reply.value()) {
ConnmanSettingsInterface *item = new ConnmanSettingsInterface(object.objectPath.path(), object.propertyMap, this);
+ item->scanServices();
if (item->type() == QNetworkSettingsType::Wired) {
m_interfaceModel.insert(0, item);
@@ -158,6 +159,9 @@ void QNetworkSettingsManagerPrivate::handleNewService(const QString &servicePath
if (service->name().length() > 0 && service->type() != QNetworkSettingsType::Unknown) {
m_serviceModel->append(service);
emit q->servicesChanged();
+ if (service->type() == QNetworkSettingsType::Wired) {
+ m_serviceFilter->setWiredNetworksAvailable(true);
+ }
}
else {
//Service name or type not set, wait for update
@@ -180,6 +184,9 @@ void QNetworkSettingsManagerPrivate::serviceReady()
service->disconnect(this);
m_serviceModel->append(service);
emit q->servicesChanged();
+ if (service->type() == QNetworkSettingsType::Wired) {
+ m_serviceFilter->setWiredNetworksAvailable(true);
+ }
//Update the interface state accordingly
foreach (QNetworkSettingsInterface* item, m_interfaceModel.getModel()) {
diff --git a/src/networksettings/connman/qnetworksettingsservice_p.cpp b/src/networksettings/connman/qnetworksettingsservice_p.cpp
index 49213c4..f5876e7 100644
--- a/src/networksettings/connman/qnetworksettingsservice_p.cpp
+++ b/src/networksettings/connman/qnetworksettingsservice_p.cpp
@@ -324,6 +324,16 @@ void QNetworkSettingsServicePrivate::disconnectService()
}
+void QNetworkSettingsServicePrivate::setPlaceholderState(bool placeholderState)
+{
+ m_placeholderState = placeholderState;
+}
+
+bool QNetworkSettingsServicePrivate::placeholderState() const
+{
+ return m_placeholderState;
+}
+
void QNetworkSettingsServicePrivate::propertiesUpdated(QDBusPendingCallWatcher *call)
{
QDBusPendingReply<QVariantMap> reply = *call;
diff --git a/src/networksettings/connman/qnetworksettingsservice_p.h b/src/networksettings/connman/qnetworksettingsservice_p.h
index 7f3930d..76b5182 100644
--- a/src/networksettings/connman/qnetworksettingsservice_p.h
+++ b/src/networksettings/connman/qnetworksettingsservice_p.h
@@ -72,6 +72,8 @@ protected:
void setupQNetworkSettingsProxy();
void connectService();
void disconnectService();
+ void setPlaceholderState(bool placeholderState);
+ bool placeholderState() const;
QString m_id;
QString m_name;
@@ -84,6 +86,7 @@ protected:
QNetworkSettingsWireless m_wifiConfig;
QNetworkSettingsType m_type;
NetConnmanServiceInterface *m_service;
+ bool m_placeholderState;
};
#endif // QNETWORKSETTINGSSERVICEPRIVATE_H