diff options
| author | Leander Beernaert <leander.beernaert@qt.io> | 2020-01-22 13:47:08 +0100 |
|---|---|---|
| committer | Leander Beernaert <leander.beernaert@qt.io> | 2020-01-24 13:17:33 +0100 |
| commit | 502d3d6744913899da87acfda5ebdab42c40329e (patch) | |
| tree | 16658a328503bfd5a62b4fd5d69ffb66e9854b18 /examples/network/bearermonitor/sessionwidget.cpp | |
| parent | d1be8b9ceb2c7b20bbe53a07154c79699540ea3d (diff) | |
| parent | 06bb315beb6c2c398223cfe52cbc7f66e14a8557 (diff) | |
Merge remote-tracking branch 'origin/dev' into merge-dev
Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
Diffstat (limited to 'examples/network/bearermonitor/sessionwidget.cpp')
| -rw-r--r-- | examples/network/bearermonitor/sessionwidget.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/examples/network/bearermonitor/sessionwidget.cpp b/examples/network/bearermonitor/sessionwidget.cpp index 237ceee2bdf..0fd5d4f67f9 100644 --- a/examples/network/bearermonitor/sessionwidget.cpp +++ b/examples/network/bearermonitor/sessionwidget.cpp @@ -49,10 +49,10 @@ ****************************************************************************/ #include "sessionwidget.h" -#include "qnetworkconfigmanager.h" +#include <QNetworkConfigurationManager> SessionWidget::SessionWidget(const QNetworkConfiguration &config, QWidget *parent) -: QWidget(parent), statsTimer(-1) +: QWidget(parent) { setupUi(this); @@ -65,10 +65,10 @@ SessionWidget::SessionWidget(const QNetworkConfiguration &config, QWidget *paren session = new QNetworkSession(config, this); - connect(session, SIGNAL(stateChanged(QNetworkSession::State)), - this, SLOT(updateSession())); - connect(session, SIGNAL(error(QNetworkSession::SessionError)), - this, SLOT(updateSessionError(QNetworkSession::SessionError))); + connect(session, &QNetworkSession::stateChanged, + this, &SessionWidget::updateSession); + connect(session, QOverload<QNetworkSession::SessionError>::of(&QNetworkSession::error), + this, &SessionWidget::updateSessionError); updateSession(); @@ -76,14 +76,14 @@ SessionWidget::SessionWidget(const QNetworkConfiguration &config, QWidget *paren configuration->setText(session->configuration().name()); - connect(openSessionButton, SIGNAL(clicked()), - this, SLOT(openSession())); - connect(openSyncSessionButton, SIGNAL(clicked()), - this, SLOT(openSyncSession())); - connect(closeSessionButton, SIGNAL(clicked()), - this, SLOT(closeSession())); - connect(stopSessionButton, SIGNAL(clicked()), - this, SLOT(stopSession())); + connect(openSessionButton, &QPushButton::clicked, + this, &SessionWidget::openSession); + connect(openSyncSessionButton, &QPushButton::clicked, + this, &SessionWidget::openSyncSession); + connect(closeSessionButton, &QPushButton::clicked, + this, &SessionWidget::closeSession); + connect(stopSessionButton, &QPushButton::clicked, + this, &SessionWidget::stopSession); } SessionWidget::~SessionWidget() |
