diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-13 11:16:14 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-07-11 14:40:29 +0200 |
commit | 2d8d738657b64c853316b605176e002b9e616fcf (patch) | |
tree | f0df837fa75899201edfd7c0f78c6407539a7c95 /src/testlib/qtesteventloop.h | |
parent | fc15cdb4d0a50f8bf021a93d97435bddee351d0f (diff) |
QTestLib: Use member initialization
Apply Fixits by Qt Creator with some amendments.
Task-number: QTBUG-69413
Change-Id: Iba0834dc89cbfc215acc5873f31fa6eeed74177d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/testlib/qtesteventloop.h')
-rw-r--r-- | src/testlib/qtesteventloop.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/testlib/qtesteventloop.h b/src/testlib/qtesteventloop.h index a77b47cd7f..b194e24c3a 100644 --- a/src/testlib/qtesteventloop.h +++ b/src/testlib/qtesteventloop.h @@ -56,8 +56,7 @@ class Q_TESTLIB_EXPORT QTestEventLoop : public QObject Q_OBJECT public: - inline QTestEventLoop(QObject *aParent = nullptr) - : QObject(aParent), inLoop(false), _timeout(false), timerId(-1), loop(nullptr) {} + using QObject::QObject; inline void enterLoopMSecs(int ms); inline void enterLoop(int secs) { enterLoopMSecs(secs * 1000); } @@ -84,10 +83,10 @@ protected: private: Q_DECL_UNUSED_MEMBER bool inLoop; // ### Qt 6: remove - bool _timeout; - int timerId; + bool _timeout = false; + int timerId = -1; - QEventLoop *loop; + QEventLoop *loop = nullptr; }; inline void QTestEventLoop::enterLoopMSecs(int ms) |