diff options
-rw-r--r-- | dist/changes-5.2.0 | 4 | ||||
-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 | ||||
-rw-r--r-- | tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp | 5 |
5 files changed, 24 insertions, 8 deletions
diff --git a/dist/changes-5.2.0 b/dist/changes-5.2.0 index 4dd1604fcc..0e3f18929a 100644 --- a/dist/changes-5.2.0 +++ b/dist/changes-5.2.0 @@ -314,6 +314,10 @@ QtGui * When a QVariant holds a QPolygonF() then it will be correctly seen as a null QVariant. + - QImage: + * Added three byte-ordered RGBA8888 format that simplifies interaction + with OpenGL and other technologies that internally using RGBA formats. + - [QTBUG-27349] Reintroduced command line argument for positioning windows (-geometry on X11, -qwindowgeometry on other platforms) 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) diff --git a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp index d111c53551..7d65309cb7 100644 --- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp +++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp @@ -569,15 +569,16 @@ void tst_QCommandLineParser::testQuoteEscaping() QProcess process; process.start("testhelper/qcommandlineparser_test_helper", QStringList() << QString::number(QCommandLineParser::ParseAsCompactedShortOptions) << - "-DKEY1=\"VALUE1\"" << "-DKEY2=\\\"VALUE2\\\"" << + "\\\\server\\path" << + "-DKEY1=\"VALUE1\"" "-DQTBUG-15379=C:\\path\\'file.ext" << "-DQTBUG-30628=C:\\temp\\'file'.ext"); QVERIFY(process.waitForFinished(5000)); QCOMPARE(process.exitStatus(), QProcess::NormalExit); QString output = process.readAll(); QVERIFY2(!output.contains("ERROR"), qPrintable(output)); + QVERIFY2(output.contains("\\\\server\\path"), qPrintable(output)); QVERIFY2(output.contains("KEY1=\"VALUE1\""), qPrintable(output)); - QVERIFY2(output.contains("KEY2=\\\"VALUE2\\\""), qPrintable(output)); QVERIFY2(output.contains("QTBUG-15379=C:\\path\\'file.ext"), qPrintable(output)); QVERIFY2(output.contains("QTBUG-30628=C:\\temp\\'file'.ext"), qPrintable(output)); } |