summaryrefslogtreecommitdiffstats
path: root/src/networksettings/qnetworksettingsservice.cpp
diff options
context:
space:
mode:
authorKari Hormi <kari.hormi@qt.io>2019-06-20 12:47:35 +0300
committerKari Hormi <kari.hormi@qt.io>2019-06-20 13:48:00 +0300
commit5afba8ed9e97a613b170aee9cd8e6499282b8d4a (patch)
treec4d0903083db633bfaedffa25fb241291fd414a4 /src/networksettings/qnetworksettingsservice.cpp
parentde5d369c83df0f1de551d7766164c4c81e4b2a70 (diff)
Implement network auto connection property
Task-number: QTBUG-76537 Change-Id: I9388854a65706c643de2f184e6e680458af7bc1e Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Diffstat (limited to 'src/networksettings/qnetworksettingsservice.cpp')
-rw-r--r--src/networksettings/qnetworksettingsservice.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/networksettings/qnetworksettingsservice.cpp b/src/networksettings/qnetworksettingsservice.cpp
index 3bd1c26..fd21140 100644
--- a/src/networksettings/qnetworksettingsservice.cpp
+++ b/src/networksettings/qnetworksettingsservice.cpp
@@ -113,6 +113,15 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \property QNetworkSettingsService::autoConnect
+ \readwrite
+ \brief Holds autoconnect property for this service.
+
+ Autoconnect property determines whether the service connects automatically
+ when it is available.
+*/
+
+/*!
\fn QNetworkSettingsService::connectionStateCleared()
This signal is emitted when the connection state is cleared.
@@ -187,12 +196,7 @@ QString QNetworkSettingsService::name() const
}
/*!
- \qmlmethod void NetworkService::setAutoConnect(bool auto)
-*/
-
-/*!
- Sets automatic connections to the network service to
- \a autoconnect.
+ Sets automatic connections to the network service to \a autoconnect.
*/
void QNetworkSettingsService::setAutoConnect(const bool autoconnect)
{
@@ -201,6 +205,15 @@ void QNetworkSettingsService::setAutoConnect(const bool autoconnect)
}
/*!
+ Return automatic connection status of the network service.
+*/
+bool QNetworkSettingsService::autoConnect() const
+{
+ Q_D(const QNetworkSettingsService);
+ return d->autoConnect();
+}
+
+/*!
\qmlproperty enumeration NetworkService::state
\readonly
\brief Holds the state of this service.