aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlglobal_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlglobal_p.h')
-rw-r--r--src/qml/qml/qqmlglobal_p.h26
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