diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2021-06-03 13:27:56 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2021-06-08 14:54:16 +0200 |
commit | 14b74af0608dc833f836acac4ee93f905b449806 (patch) | |
tree | 84db5450f302d0de9ba140c8a9d223324e4fe988 /tests/manual | |
parent | c34b596119b1fd05082b69b77eb86a99f658a22b (diff) |
QNetworkInformation: Adjustments to captive portal API
Make it return bool since the TriState was really only used signify that
the property was unsupported but there is already a separate way to
check if it's supported. More importantly there is no different set of
actions available to a user if they're in the Unknown or False state.
Because of the change to bool, we also rename the property to have an
'is'-prefix.
Change-Id: Iaaaad5ac31e663c36e00223bf5b0e719f412fc69
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/qnetworkinformation/tst_qnetworkinformation.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/manual/qnetworkinformation/tst_qnetworkinformation.cpp b/tests/manual/qnetworkinformation/tst_qnetworkinformation.cpp index 79ca27a4d1..953ae132bf 100644 --- a/tests/manual/qnetworkinformation/tst_qnetworkinformation.cpp +++ b/tests/manual/qnetworkinformation/tst_qnetworkinformation.cpp @@ -48,13 +48,13 @@ int main(int argc, char **argv) qDebug() << "Updated:" << newStatus; }); - QObject::connect(info, &QNetworkInformation::behindCaptivePortalChanged, - [](QNetworkInformation::TriState status) { + QObject::connect(info, &QNetworkInformation::isBehindCaptivePortalChanged, + [](bool status) { qDebug() << "Updated, behind captive portal:" << status; }); qDebug() << "Initial reachability:" << info->reachability(); - qDebug() << "Behind captive portal:" << info->behindCaptivePortal(); + qDebug() << "Behind captive portal:" << info->isBehindCaptivePortal(); return app.exec(); } |