diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-11-01 13:21:32 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-11-06 10:57:23 +0100 |
commit | e85de7d787498624020884ef2e269c15faf76b50 (patch) | |
tree | 30044fb755fdf0c3015b21a14a1fa871526632a9 /examples/network/bearermonitor/sessionwidget.h | |
parent | 66b6e28c0158b8c4e96ddf08908a538d865ce63a (diff) |
Cleanup network examples
Cleanup network examples:
- use nullptr
- use member-init
- adjust includes
- use new-style connects
Change-Id: I80aa230168e5aec88a1bc93bbf49a471bfc30e7b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'examples/network/bearermonitor/sessionwidget.h')
-rw-r--r-- | examples/network/bearermonitor/sessionwidget.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/network/bearermonitor/sessionwidget.h b/examples/network/bearermonitor/sessionwidget.h index ba352eefee..6b2da2c1c1 100644 --- a/examples/network/bearermonitor/sessionwidget.h +++ b/examples/network/bearermonitor/sessionwidget.h @@ -51,7 +51,7 @@ #ifndef SESSIONWIDGET_H #define SESSIONWIDGET_H -#include <qnetworksession.h> +#include <QNetworkSession> #include "ui_sessionwidget.h" @@ -62,10 +62,10 @@ class SessionWidget : public QWidget, public Ui_SessionWidget Q_OBJECT public: - explicit SessionWidget(const QNetworkConfiguration &config, QWidget *parent = 0); + explicit SessionWidget(const QNetworkConfiguration &config, QWidget *parent = nullptr); ~SessionWidget(); - void timerEvent(QTimerEvent *) override; + void timerEvent(QTimerEvent *e) override; private: void updateSessionState(QNetworkSession::State state); @@ -80,8 +80,8 @@ private Q_SLOTS: void updateSessionError(QNetworkSession::SessionError error); private: - QNetworkSession *session; - int statsTimer; + QNetworkSession *session = nullptr; + int statsTimer = -1; }; #endif |