From 7cfe7c198224babeb06eac583e419bbd82c7217e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 6 Dec 2013 10:17:05 +0200 Subject: Windows command line parsing: Do escape backslash. This will break network paths passed as command line arguments. Introduced by 4ff6951550cb6e39c3b31895c3af57037e90c9ac . Task-number: QTBUG-35432 Task-number: QTBUG-30628 Change-Id: Ice9ce15275ef69e9e9e82daf5a303e7c56294368 Reviewed-by: Lars Knoll --- src/corelib/kernel/qcorecmdlineargs_p.h | 4 ++-- .../auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 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 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/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp index d8965dee5d..06234ad22d 100644 --- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp +++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp @@ -550,15 +550,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)); } -- cgit v1.2.3 From 7972553aca51587eb1dda80509ec66766e0743c2 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 26 Nov 2013 10:24:17 +0100 Subject: Update ChangeLog with new QImage formats Change-Id: I4023edc29e81a8c29c3259c6024a5a20eda1aeec Reviewed-by: Jani Heikkinen Reviewed-by: Thiago Macieira --- dist/changes-5.2.0 | 4 ++++ 1 file changed, 4 insertions(+) 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) -- cgit v1.2.3 From 313a74cc4a9a5d200b2059d3d8767fe1a274c50d Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 6 Dec 2013 16:19:08 +0100 Subject: Fix QtDeclarative and QtQml co-existence part three ;( Unfortunately the QObject destroyed callbacks for QtQml and QtDeclarative can't be called in sequence, because if the QQmlData has the ownsMemory bit set, then the destroyed callback will delete the QQmlData, and the sub-sequent call to the destroyed callback of qml1 will try to dereference the QQmlData's first bit (ownedByQml1), which is already destroyed. This patch fixes that by simply sharing the assumption of the first bit indicating module ownership (QtQml vs. QtDeclarative) also to qtbase and using it to distinguish between which destroyed callback function to call. Task-number: QTCREATORBUG-10273 Change-Id: I2773a31a3e9b3a1c22d1c1f33b2f29f3296cb3cf Reviewed-by: Olivier Goffart Reviewed-by: Lars Knoll --- src/corelib/kernel/qobject.cpp | 11 +++++++---- src/corelib/kernel/qobject_p.h | 8 ++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 3fbeaa8712..7e06e2c261 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -808,10 +808,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(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) -- cgit v1.2.3