diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2018-03-08 18:35:03 +0100 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2018-03-08 18:35:03 +0100 |
commit | d9ea4917ca97aeee050a86151fbfa069771b498d (patch) | |
tree | 21fd6960d8a866bf6f5a5a8f9db9be801f8065c1 /src/qml/qml/qqmlglobal_p.h | |
parent | f9beafddd256cd0b79bf2478a812053ef61241fc (diff) | |
parent | c6a26c248e8abc421b87c3dd6b2466d490ea902e (diff) |
Merge remote-tracking branch 'gerrit/5.11' into wip/webassembly
Change-Id: I729af792166fd2f6c5843ba564e63adf8ae09a97
Diffstat (limited to 'src/qml/qml/qqmlglobal_p.h')
-rw-r--r-- | src/qml/qml/qqmlglobal_p.h | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h index a6c113f5a7..302fdd56c4 100644 --- a/src/qml/qml/qqmlglobal_p.h +++ b/src/qml/qml/qqmlglobal_p.h @@ -193,16 +193,6 @@ do { \ return QObjectPrivate::get(sender)->isSignalConnected(signalIdx); \ } while (0) -struct QQmlGraphics_DerivedObject : public QObject -{ - void setParent_noEvent(QObject *parent) { - bool sce = d_ptr->sendChildEvents; - d_ptr->sendChildEvents = false; - setParent(parent); - d_ptr->sendChildEvents = sce; - } -}; - /*! Returns true if the case of \a fileName is equivalent to the file case of \a fileName on disk, and false otherwise. @@ -230,7 +220,11 @@ bool QQml_isFileCaseCorrect(const QString &fileName, int length = -1); */ inline void QQml_setParent_noEvent(QObject *object, QObject *parent) { - static_cast<QQmlGraphics_DerivedObject *>(object)->setParent_noEvent(parent); + QObjectPrivate *d_ptr = QObjectPrivate::get(object); + bool sce = d_ptr->sendChildEvents; + d_ptr->sendChildEvents = false; + object->setParent(parent); + d_ptr->sendChildEvents = sce; } class Q_QML_PRIVATE_EXPORT QQmlValueTypeProvider @@ -329,7 +323,7 @@ class Q_QML_PRIVATE_EXPORT QQmlApplication : public QObject Q_PROPERTY(QString organization READ organization WRITE setOrganization NOTIFY organizationChanged) Q_PROPERTY(QString domain READ domain WRITE setDomain NOTIFY domainChanged) public: - QQmlApplication(QObject* parent=0); + QQmlApplication(QObject* parent=nullptr); QStringList args(); @@ -353,7 +347,7 @@ Q_SIGNALS: void domainChanged(); protected: - QQmlApplication(QQmlApplicationPrivate &dd, QObject* parent=0); + QQmlApplication(QQmlApplicationPrivate &dd, QObject* parent=nullptr); private: Q_DISABLE_COPY(QQmlApplication) @@ -374,12 +368,12 @@ public: struct QQmlSourceLocation { - QQmlSourceLocation() : line(0), column(0) {} + QQmlSourceLocation() {} QQmlSourceLocation(const QString &sourceFile, quint16 line, quint16 column) : sourceFile(sourceFile), line(line), column(column) {} QString sourceFile; - quint16 line; - quint16 column; + quint16 line = 0; + quint16 column = 0; }; QT_END_NAMESPACE |