Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable

This commit is contained in:
Frederik Gladhorn 2013-12-16 15:20:20 +01:00 committed by The Qt Project
commit f28ef6a308
5 changed files with 24 additions and 8 deletions

4
dist/changes-5.2.0 vendored
View File

@ -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)

View File

@ -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('\"'))) {

View File

@ -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

View File

@ -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)

View File

@ -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));
}