summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-12-12 18:01:28 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-12-12 18:01:28 +0100
commit63611cff8719255261127a408cdd2f6b009221d0 (patch)
treee111d3fc9614458e1161728857a49dcf30fe8bc1 /src/corelib
parent70c70aef7ee35009bb00614fdd6d4d282f9c4e57 (diff)
parent313a74cc4a9a5d200b2059d3d8767fe1a274c50d (diff)
Merge remote-tracking branch 'origin/release' into stable
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qcorecmdlineargs_p.h4
-rw-r--r--src/corelib/kernel/qobject.cpp11
-rw-r--r--src/corelib/kernel/qobject_p.h8
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)