diff options
Diffstat (limited to 'src/qml/qml/qqmlguard_p.h')
-rw-r--r-- | src/qml/qml/qqmlguard_p.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlguard_p.h b/src/qml/qml/qqmlguard_p.h index 87c3677d29..808bf4c709 100644 --- a/src/qml/qml/qqmlguard_p.h +++ b/src/qml/qml/qqmlguard_p.h @@ -65,9 +65,9 @@ public: inline QQmlGuardImpl(const QQmlGuardImpl &); inline ~QQmlGuardImpl(); - QObject *o; - QQmlGuardImpl *next; - QQmlGuardImpl **prev; + QObject *o = nullptr; + QQmlGuardImpl *next = nullptr; + QQmlGuardImpl **prev = nullptr; inline void addGuard(); inline void remGuard(); @@ -113,18 +113,17 @@ Q_DECLARE_METATYPE(QQmlGuard<QObject>) QT_BEGIN_NAMESPACE QQmlGuardImpl::QQmlGuardImpl() -: o(nullptr), next(nullptr), prev(nullptr) { } QQmlGuardImpl::QQmlGuardImpl(QObject *g) -: o(g), next(nullptr), prev(nullptr) +: o(g) { if (o) addGuard(); } QQmlGuardImpl::QQmlGuardImpl(const QQmlGuardImpl &g) -: o(g.o), next(nullptr), prev(nullptr) +: o(g.o) { if (o) addGuard(); } |