diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-24 00:56:59 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-24 00:56:59 +0100 |
commit | f0fbff4c905fd3e21d7aefedd45d98cc9dd54018 (patch) | |
tree | c61f47f858a9ac6183676bd7aee378a6a2b84a19 /src/corelib/kernel | |
parent | d776937df91e46536f404c6868d64016b6038d7b (diff) | |
parent | 0e1ce36ae67de940b2d499ec7f23e520dce0f112 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I2defae1904154283446b069d151c3ef57302ec7b
Diffstat (limited to 'src/corelib/kernel')
-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 8e0dc4dede..a027f82f82 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -908,10 +908,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) |