diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-16 15:20:20 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-16 15:35:30 +0100 |
commit | f28ef6a308c9046763e251390984b80c0201b390 (patch) | |
tree | affbb831e3358c26a811612cdbbdbfd0ece5cba6 /src | |
parent | 75defbf241df78c8ffc18681c3ddbbfc92134226 (diff) | |
parent | 63611cff8719255261127a408cdd2f6b009221d0 (diff) |
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qcorecmdlineargs_p.h | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 11 | ||||
-rw-r--r-- | src/corelib/kernel/qobject_p.h | 8 |
3 files changed, 17 insertions, 6 deletions
diff --git a/src/corelib/kernel/qcorecmdlineargs_p.h b/src/corelib/kernel/qcorecmdlineargs_p.h index d1cfa2dfa9..bbbee7df25 100644 --- a/src/corelib/kernel/qcorecmdlineargs_p.h +++ b/src/corelib/kernel/qcorecmdlineargs_p.h @@ -101,8 +101,8 @@ static QVector<Char*> qWinCmdLine(Char *cmdParam, int length, int &argc) } } if (*p == '\\') { // escape char? - // testing by looking at argc, argv shows that it only escapes quotes and backslashes - if (p < p_end && (*(p+1) == Char('\"') || *(p+1) == Char('\\'))) + // testing by looking at argc, argv shows that it only escapes quotes + if (p < p_end && (*(p+1) == Char('\"'))) p++; } else { if (!quote && (*p == Char('\"'))) { diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 50fb1e5970..f1351f5a07 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -814,10 +814,13 @@ QObject::~QObject() } if (d->declarativeData) { - if (QAbstractDeclarativeData::destroyed) - QAbstractDeclarativeData::destroyed(d->declarativeData, this); - if (QAbstractDeclarativeData::destroyed_qml1) - QAbstractDeclarativeData::destroyed_qml1(d->declarativeData, this); + if (static_cast<QAbstractDeclarativeDataImpl*>(d->declarativeData)->ownedByQml1) { + if (QAbstractDeclarativeData::destroyed_qml1) + QAbstractDeclarativeData::destroyed_qml1(d->declarativeData, this); + } else { + if (QAbstractDeclarativeData::destroyed) + QAbstractDeclarativeData::destroyed(d->declarativeData, this); + } } // set ref to zero to indicate that this object has been deleted diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index cd2d592cec..011e140e3b 100644 --- a/src/corelib/kernel/qobject_p.h +++ b/src/corelib/kernel/qobject_p.h @@ -97,6 +97,14 @@ public: static bool (*isSignalConnected)(QAbstractDeclarativeData *, const QObject *, int); }; +// This is an implementation of QAbstractDeclarativeData that is identical with +// the implementation in QtDeclarative and QtQml for the first bit +struct QAbstractDeclarativeDataImpl : public QAbstractDeclarativeData +{ + quint32 ownedByQml1:1; + quint32 unused: 31; +}; + class Q_CORE_EXPORT QObjectPrivate : public QObjectData { Q_DECLARE_PUBLIC(QObject) |