From 00f3299e8b499e323c3e3d9552d518a872a0695a Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Fri, 30 Mar 2012 14:16:55 +0200 Subject: Blackberry OS implementation of QStandardPaths Change-Id: I31427b896ca691de7071da17af4863d16348df7b Reviewed-by: David Faure Reviewed-by: Robin Burchell --- tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index e9af29494b..b15d5fca2c 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -49,7 +49,7 @@ #include #endif -#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_BLACKBERRY) #define Q_XDG_PLATFORM #endif @@ -186,12 +186,16 @@ void tst_qstandardpaths::testDataLocation() { // On all platforms, DataLocation should be GenericDataLocation / organization name / app name // This allows one app to access the data of another app. + // Blackberry OS is an exception to this case, owing to the fact that + // applications are sandboxed. +#ifndef Q_OS_BLACKBERRY const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), base + "/tst_qstandardpaths"); QCoreApplication::instance()->setOrganizationName("Qt"); QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), base + "/Qt/tst_qstandardpaths"); QCoreApplication::instance()->setApplicationName("QtTest"); QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), base + "/Qt/QtTest"); +#endif #ifdef Q_XDG_PLATFORM setDefaultLocations(); -- cgit v1.2.3 From a159ca80d73f07d617d6edd9b3e59bda25449a1c Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Thu, 22 Mar 2012 17:12:32 +0100 Subject: Don't hardcode the default families in qfont_qpa.cpp Since different platforms come with different fonts, we should probably leave it up to the platform to decide which family to use. Change-Id: I18bb81c0ce87cc7e9ac7f3abaeae1b41c0ce8410 Reviewed-by: Friedemann Kleint Reviewed-by: Jiang Jiang --- tests/auto/gui/text/qfont/tst_qfont.cpp | 60 +++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 18 deletions(-) (limited to 'tests') diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp index 1cedfa5c01..ea26b9262b 100644 --- a/tests/auto/gui/text/qfont/tst_qfont.cpp +++ b/tests/auto/gui/text/qfont/tst_qfont.cpp @@ -75,10 +75,8 @@ private slots: void serializeSpacing(); void lastResortFont(); void styleName(); -#ifdef QT_BUILD_INTERNAL void defaultFamily_data(); void defaultFamily(); -#endif }; // Testing get/set functions @@ -623,36 +621,62 @@ void tst_QFont::styleName() #endif } -#ifdef QT_BUILD_INTERNAL +QString getPlatformGenericFont(const char* genericName) +{ +#if defined(Q_OS_UNIX) && !defined(QT_NO_FONTCONFIG) + QProcess p; + p.start(QLatin1String("fc-match"), (QStringList() << "-f%{family}" << genericName)); + if (!p.waitForStarted()) + qWarning("fc-match cannot be started: %s", qPrintable(p.errorString())); + if (p.waitForFinished()) + return QString::fromLatin1(p.readAllStandardOutput()); +#endif + return QLatin1String(genericName); +} + +static inline QByteArray msgNotAcceptableFont(const QString &defaultFamily, const QStringList &acceptableFamilies) +{ + QString res = QString::fromLatin1("Font family '%1' is not one of the following accaptable results: ").arg(defaultFamily); + Q_FOREACH (const QString &family, acceptableFamilies) + res += QString::fromLatin1("\n %1").arg(family); + return res.toLocal8Bit(); +} + Q_DECLARE_METATYPE(QFont::StyleHint) void tst_QFont::defaultFamily_data() { QTest::addColumn("styleHint"); - QTest::addColumn("defaultFamily"); - - QTest::newRow("serif") << QFont::Times << "serif"; - QTest::newRow("monospace") << QFont::Monospace << "monospace"; - QTest::newRow("sans-serif") << QFont::SansSerif << "sans-serif"; - QTest::newRow("cursive") << QFont::Cursive << "cursive"; - QTest::newRow("fantasy") << QFont::Fantasy << "fantasy"; - QTest::newRow("old english") << QFont::OldEnglish << "Old English"; + QTest::addColumn("acceptableFamilies"); + + QTest::newRow("serif") << QFont::Serif << (QStringList() << "Times New Roman" << "Times" << getPlatformGenericFont("serif")); + QTest::newRow("monospace") << QFont::Monospace << (QStringList() << "Courier New" << "Monaco" << getPlatformGenericFont("monospace")); + QTest::newRow("cursive") << QFont::Cursive << (QStringList() << "Comic Sans MS" << "Apple Chancery" << getPlatformGenericFont("cursive")); + QTest::newRow("fantasy") << QFont::Fantasy << (QStringList() << "Impact" << "Zapfino" << getPlatformGenericFont("fantasy")); + QTest::newRow("sans-serif") << QFont::SansSerif << (QStringList() << "Arial" << "Lucida Grande" << getPlatformGenericFont("sans-serif")); } void tst_QFont::defaultFamily() { QFETCH(QFont::StyleHint, styleHint); - QFETCH(QString, defaultFamily); - - QFontDatabase db; - if (!db.hasFamily(defaultFamily)) - QSKIP("Font family is not available on the system"); + QFETCH(QStringList, acceptableFamilies); QFont f; + QFontDatabase db; f.setStyleHint(styleHint); - QCOMPARE(QFontDatabase::resolveFontFamilyAlias(f.defaultFamily()), QFontDatabase::resolveFontFamilyAlias(defaultFamily)); + const QString familyForHint(f.defaultFamily()); + // it should at least return a family that is available. + QVERIFY(db.hasFamily(familyForHint)); + + bool isAcceptable = false; + Q_FOREACH (const QString& family, acceptableFamilies) { + if (!familyForHint.compare(family, Qt::CaseInsensitive)) { + isAcceptable = true; + break; + } + } + QVERIFY2(isAcceptable, msgNotAcceptableFont(familyForHint, acceptableFamilies)); } -#endif // QT_BUILD_INTERNAL QTEST_MAIN(tst_QFont) #include "tst_qfont.moc" -- cgit v1.2.3 From 880cbf602701b0116ca1143d6d07ee8e7eb3f03f Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 2 Apr 2012 22:17:36 +1000 Subject: Bump some Qt 5 to-do's to Qt 6. Source-incompatible changes are no longer desirable for Qt 5, so these items must wait until at least Qt 6. Task-number: QTBUG-23524 Change-Id: I0b9ae5f6f3a792e0169a4b0d3aefbdcb744acd2f Reviewed-by: Thiago Macieira Reviewed-by: Lars Knoll --- tests/auto/xml/dom/qdom/tst_qdom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/xml/dom/qdom/tst_qdom.cpp b/tests/auto/xml/dom/qdom/tst_qdom.cpp index 1533e6a139..3633975896 100644 --- a/tests/auto/xml/dom/qdom/tst_qdom.cpp +++ b/tests/auto/xml/dom/qdom/tst_qdom.cpp @@ -1405,7 +1405,7 @@ void tst_QDom::normalizeEndOfLine() const const QString expected(QLatin1String("\nc\nc\na\na")); - // ### Qt 5: fix this, if we keep QDom at all + // ### Qt 6: fix this, if we keep QDom at all QEXPECT_FAIL("", "The parser doesn't perform newline normalization. Fixing that would change behavior.", Continue); QCOMPARE(doc.documentElement().text(), expected); } -- cgit v1.2.3 From 8e74b5cfe43893522c0f06d0b0d0dd5b7393aa6f Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Tue, 10 Apr 2012 14:53:42 +0300 Subject: fix digitValue() returned 0 instead of -1 for invalid ucs4 characters Task-number: QTBUG-20318 Change-Id: I96c4c2b042bad478b7c704669e7ea0d574d3b22f Reviewed-by: Robin Burchell Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll --- tests/auto/corelib/tools/qchar/tst_qchar.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/auto/corelib/tools/qchar/tst_qchar.cpp b/tests/auto/corelib/tools/qchar/tst_qchar.cpp index e72af11fbb..215f4c18f2 100644 --- a/tests/auto/corelib/tools/qchar/tst_qchar.cpp +++ b/tests/auto/corelib/tools/qchar/tst_qchar.cpp @@ -523,6 +523,9 @@ void tst_QChar::digitValue() QVERIFY(QChar::digitValue((ushort)0x1040) == 0); QVERIFY(QChar::digitValue((uint)0x1049) == 9); QVERIFY(QChar::digitValue((uint)0x1040) == 0); + + QVERIFY(QChar::digitValue((ushort)0xd800) == -1); + QVERIFY(QChar::digitValue((uint)UNICODE_LAST_CODEPOINT + 1) == -1); } void tst_QChar::decomposition() -- cgit v1.2.3 From 50fefebc8403c0f293210c6dc5a98adb19776b76 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Sun, 8 Apr 2012 10:18:45 +0300 Subject: replace hardcoded values with a surrogate handling methods Change-Id: Iba079953c46a29404232d2dacbe0c90170097d51 Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll --- tests/auto/corelib/tools/qchar/tst_qchar.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/auto/corelib/tools/qchar/tst_qchar.cpp b/tests/auto/corelib/tools/qchar/tst_qchar.cpp index 215f4c18f2..6632776a86 100644 --- a/tests/auto/corelib/tools/qchar/tst_qchar.cpp +++ b/tests/auto/corelib/tools/qchar/tst_qchar.cpp @@ -543,10 +543,10 @@ void tst_QChar::decomposition() { QString str; - str += QChar( (0x1D157 - 0x10000) / 0x400 + 0xd800 ); - str += QChar( ((0x1D157 - 0x10000) % 0x400) + 0xdc00 ); - str += QChar( (0x1D165 - 0x10000) / 0x400 + 0xd800 ); - str += QChar( ((0x1D165 - 0x10000) % 0x400) + 0xdc00 ); + str += QChar(QChar::highSurrogate(0x1D157)); + str += QChar(QChar::lowSurrogate(0x1D157)); + str += QChar(QChar::highSurrogate(0x1D165)); + str += QChar(QChar::lowSurrogate(0x1D165)); QVERIFY(QChar::decomposition(0x1D15e) == str); } @@ -629,14 +629,12 @@ void tst_QChar::normalization_data() for (int j = 0; j < c.size(); ++j) { bool ok; uint uc = c.at(j).toInt(&ok, 16); - if (uc < 0x10000) + if (!QChar::requiresSurrogates(uc)) { columns[i].append(QChar(uc)); - else { + } else { // convert to utf16 - ushort high = QChar::highSurrogate(uc); - ushort low = QChar::lowSurrogate(uc); - columns[i].append(QChar(high)); - columns[i].append(QChar(low)); + columns[i].append(QChar(QChar::highSurrogate(uc))); + columns[i].append(QChar(QChar::lowSurrogate(uc))); } } } -- cgit v1.2.3 From 699f2424eba929d04b081af2a0cad74e2e58e235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lund=20Martsum?= Date: Tue, 3 Apr 2012 06:38:48 +0200 Subject: QHeaderView - rename many spans classes and variables In (SHA) b800d8b94a7861ecf8853621f6556fca186fb5b7 the span model was replaced with a plain section model. The code however still has variables and classes called someting with spans which would be confusing for possible new readers of the code. This patch cleans up most of it. It only renames classes,functions and variables (and not any semantics or the public API). Change-Id: I6ceb068c7317223f0d8e37f8032197f518d0174c Reviewed-by: Stephen Kelly --- tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp index 1158a9f06b..1518403a64 100644 --- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp +++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp @@ -1947,8 +1947,8 @@ void tst_QHeaderView::noSectionsWithNegativeSize() void tst_QHeaderView::emptySectionSpan() { - QHeaderViewPrivate::SectionSpan span; - QCOMPARE(span.sectionSize(), 0); + QHeaderViewPrivate::SectionItem section; + QCOMPARE(section.sectionSize(), 0); } void tst_QHeaderView::task236450_hidden_data() -- cgit v1.2.3 From eff344ab8a509996cab491347aed4a4d8ea5b2ab Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 5 Apr 2012 11:35:09 +0200 Subject: Don't crash when comparing values containing empty arrays/objects Task-number: QTBUG-25164 Change-Id: I1fa00e359ef3583b9a7136bb888cdf5e1c3e75ac Reviewed-by: Jamey Hicks --- tests/auto/corelib/json/tst_qtjson.cpp | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'tests') diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp index 4ab4b78da1..bf6a58a24b 100644 --- a/tests/auto/corelib/json/tst_qtjson.cpp +++ b/tests/auto/corelib/json/tst_qtjson.cpp @@ -123,6 +123,8 @@ private Q_SLOTS: void testTrailingComma(); void testDetachBug(); + + void valueEquals(); private: QString testDataDir; }; @@ -1845,5 +1847,51 @@ void TestQtJson::testDetachBug() QCOMPARE(local.keys().size(), 1); } +void TestQtJson::valueEquals() +{ + QVERIFY(QJsonValue() == QJsonValue()); + QVERIFY(QJsonValue() != QJsonValue(QJsonValue::Undefined)); + QVERIFY(QJsonValue() != QJsonValue(true)); + QVERIFY(QJsonValue() != QJsonValue(1.)); + QVERIFY(QJsonValue() != QJsonValue(QJsonArray())); + QVERIFY(QJsonValue() != QJsonValue(QJsonObject())); + + QVERIFY(QJsonValue(true) == QJsonValue(true)); + QVERIFY(QJsonValue(true) != QJsonValue(false)); + QVERIFY(QJsonValue(true) != QJsonValue(QJsonValue::Undefined)); + QVERIFY(QJsonValue(true) != QJsonValue()); + QVERIFY(QJsonValue(true) != QJsonValue(1.)); + QVERIFY(QJsonValue(true) != QJsonValue(QJsonArray())); + QVERIFY(QJsonValue(true) != QJsonValue(QJsonObject())); + + QVERIFY(QJsonValue(1.) == QJsonValue(1.)); + QVERIFY(QJsonValue(1.) != QJsonValue(2.)); + QVERIFY(QJsonValue(1.) != QJsonValue(QJsonValue::Undefined)); + QVERIFY(QJsonValue(1.) != QJsonValue()); + QVERIFY(QJsonValue(1.) != QJsonValue(true)); + QVERIFY(QJsonValue(1.) != QJsonValue(QJsonArray())); + QVERIFY(QJsonValue(1.) != QJsonValue(QJsonObject())); + + QVERIFY(QJsonValue(QJsonArray()) == QJsonValue(QJsonArray())); + QJsonArray nonEmptyArray; + nonEmptyArray.append(true); + QVERIFY(QJsonValue(QJsonArray()) != nonEmptyArray); + QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(QJsonValue::Undefined)); + QVERIFY(QJsonValue(QJsonArray()) != QJsonValue()); + QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(true)); + QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(1.)); + QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(QJsonObject())); + + QVERIFY(QJsonValue(QJsonObject()) == QJsonValue(QJsonObject())); + QJsonObject nonEmptyObject; + nonEmptyObject.insert("Key", true); + QVERIFY(QJsonValue(QJsonObject()) != nonEmptyObject); + QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(QJsonValue::Undefined)); + QVERIFY(QJsonValue(QJsonObject()) != QJsonValue()); + QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(true)); + QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(1.)); + QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(QJsonArray())); +} + QTEST_MAIN(TestQtJson) #include "tst_qtjson.moc" -- cgit v1.2.3 From a266c22bb834695c4d2d6b5a491ca6786d2b2438 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Wed, 4 Apr 2012 20:41:50 +0200 Subject: Add tst_QGuiApplication::modalWindow() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This tests that modalWindow() returns the expected value and that QEvent::WindowBlocked and QEvent::WindowUnblocked are sent correctly when modal windows are hidden and shown. Change-Id: I872f35e0240c928566ab35fa5764fad6cfda6db6 Reviewed-by: Friedemann Kleint Reviewed-by: Samuel Rødal --- .../kernel/qguiapplication/tst_qguiapplication.cpp | 179 +++++++++++++++++++++ 1 file changed, 179 insertions(+) (limited to 'tests') diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp index 1dc2e551b4..c0242d95c5 100644 --- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp +++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp @@ -56,6 +56,7 @@ private slots: void abortQuitOnShow(); void changeFocusWindow(); void keyboardModifiers(); + void modalWindow(); }; class DummyWindow : public QWindow @@ -315,5 +316,183 @@ void tst_QGuiApplication::keyboardModifiers() delete window; } +class BlockableWindow : public QWindow +{ + Q_OBJECT +public: + int blocked; + + inline BlockableWindow() + : QWindow() + { + blocked = false; + } + + bool event(QEvent *e) + { + switch (e->type()) { + case QEvent::WindowBlocked: + ++blocked; + break; + case QEvent::WindowUnblocked: + --blocked; + break; + default: + break; + } + return QWindow::event(e); + } +}; + +void tst_QGuiApplication::modalWindow() +{ + int argc = 0; + QGuiApplication app(argc, 0); + + BlockableWindow *window1 = new BlockableWindow; + + BlockableWindow *window2 = new BlockableWindow; + + BlockableWindow *windowModalWindow1 = new BlockableWindow; + windowModalWindow1->setTransientParent(window1); + windowModalWindow1->setWindowModality(Qt::WindowModal); + + BlockableWindow *windowModalWindow2 = new BlockableWindow; + windowModalWindow2->setTransientParent(windowModalWindow1); + windowModalWindow2->setWindowModality(Qt::WindowModal); + + BlockableWindow *applicationModalWindow1 = new BlockableWindow; + applicationModalWindow1->setWindowModality(Qt::ApplicationModal); + + // show the 2 windows, nothing is blocked + window1->show(); + window2->show(); + QTest::qWaitForWindowShown(window1); + QTest::qWaitForWindowShown(window2); + QCOMPARE(app.modalWindow(), static_cast(0)); + QCOMPARE(window1->blocked, 0); + QCOMPARE(window2->blocked, 0); + QCOMPARE(windowModalWindow1->blocked, 0); + QCOMPARE(windowModalWindow2->blocked, 0); + QCOMPARE(applicationModalWindow1->blocked, 0); + + // show applicationModalWindow1, everything is blocked + applicationModalWindow1->show(); + QCOMPARE(app.modalWindow(), applicationModalWindow1); + QCOMPARE(window1->blocked, 1); + QCOMPARE(window2->blocked, 1); + QCOMPARE(windowModalWindow1->blocked, 1); + QCOMPARE(windowModalWindow2->blocked, 1); + QCOMPARE(applicationModalWindow1->blocked, 0); + + // everything is unblocked when applicationModalWindow1 is hidden + applicationModalWindow1->hide(); + QCOMPARE(app.modalWindow(), static_cast(0)); + QCOMPARE(window1->blocked, 0); + QCOMPARE(window2->blocked, 0); + QCOMPARE(windowModalWindow1->blocked, 0); + QCOMPARE(windowModalWindow2->blocked, 0); + QCOMPARE(applicationModalWindow1->blocked, 0); + + // show the windowModalWindow1, only window1 is blocked + windowModalWindow1->show(); + QCOMPARE(app.modalWindow(), windowModalWindow1); + QCOMPARE(window1->blocked, 1); + QCOMPARE(window2->blocked, 0); + QCOMPARE(windowModalWindow1->blocked, 0); + QCOMPARE(windowModalWindow2->blocked, 0); + QCOMPARE(applicationModalWindow1->blocked, 0); + + // show the windowModalWindow2, windowModalWindow1 is blocked as well + windowModalWindow2->show(); + QCOMPARE(app.modalWindow(), windowModalWindow2); + QCOMPARE(window1->blocked, 1); + QCOMPARE(window2->blocked, 0); + QCOMPARE(windowModalWindow1->blocked, 1); + QCOMPARE(windowModalWindow2->blocked, 0); + QCOMPARE(applicationModalWindow1->blocked, 0); + + // hide windowModalWindow1, nothing is unblocked + windowModalWindow1->hide(); + QCOMPARE(app.modalWindow(), windowModalWindow2); + QCOMPARE(window1->blocked, 1); + QCOMPARE(window2->blocked, 0); + QCOMPARE(windowModalWindow1->blocked, 1); + QCOMPARE(windowModalWindow2->blocked, 0); + QCOMPARE(applicationModalWindow1->blocked, 0); + + // hide windowModalWindow2, windowModalWindow1 and window1 are unblocked + windowModalWindow2->hide(); + QCOMPARE(app.modalWindow(), static_cast(0)); + QCOMPARE(window1->blocked, 0); + QCOMPARE(window2->blocked, 0); + QCOMPARE(windowModalWindow1->blocked, 0); + QCOMPARE(windowModalWindow2->blocked, 0); + QCOMPARE(applicationModalWindow1->blocked, 0); + + // show windowModalWindow1 again, window1 is blocked + windowModalWindow1->show(); + QCOMPARE(app.modalWindow(), windowModalWindow1); + QCOMPARE(window1->blocked, 1); + QCOMPARE(window2->blocked, 0); + QCOMPARE(windowModalWindow1->blocked, 0); + QCOMPARE(windowModalWindow2->blocked, 0); + QCOMPARE(applicationModalWindow1->blocked, 0); + + // show windowModalWindow2 again, windowModalWindow1 is also blocked + windowModalWindow2->show(); + QCOMPARE(app.modalWindow(), windowModalWindow2); + QCOMPARE(window1->blocked, 1); + QCOMPARE(window2->blocked, 0); + QCOMPARE(windowModalWindow1->blocked, 1); + QCOMPARE(windowModalWindow2->blocked, 0); + QCOMPARE(applicationModalWindow1->blocked, 0); + + // show applicationModalWindow1, everything is blocked + applicationModalWindow1->show(); + QCOMPARE(app.modalWindow(), applicationModalWindow1); + QCOMPARE(window1->blocked, 1); + QCOMPARE(window2->blocked, 1); + QCOMPARE(windowModalWindow1->blocked, 1); + QCOMPARE(windowModalWindow2->blocked, 1); + QCOMPARE(applicationModalWindow1->blocked, 0); + + // hide applicationModalWindow1, windowModalWindow1 and window1 are blocked + applicationModalWindow1->hide(); + QCOMPARE(app.modalWindow(), windowModalWindow2); + QCOMPARE(window1->blocked, 1); + QCOMPARE(window2->blocked, 0); + QCOMPARE(windowModalWindow1->blocked, 1); + QCOMPARE(windowModalWindow2->blocked, 0); + QCOMPARE(applicationModalWindow1->blocked, 0); + + // hide windowModalWindow2, window1 is blocked + windowModalWindow2->hide(); + QCOMPARE(app.modalWindow(), windowModalWindow1); + QCOMPARE(window1->blocked, 1); + QCOMPARE(window2->blocked, 0); + QCOMPARE(windowModalWindow1->blocked, 0); + QCOMPARE(windowModalWindow2->blocked, 0); + QCOMPARE(applicationModalWindow1->blocked, 0); + + // hide windowModalWindow1, everything is unblocked + windowModalWindow1->hide(); + QCOMPARE(app.modalWindow(), static_cast(0)); + QCOMPARE(window1->blocked, 0); + QCOMPARE(window2->blocked, 0); + QCOMPARE(windowModalWindow1->blocked, 0); + QCOMPARE(windowModalWindow2->blocked, 0); + QCOMPARE(applicationModalWindow1->blocked, 0); + + window2->hide(); + window1->hide(); + + delete applicationModalWindow1; + delete windowModalWindow2; + delete windowModalWindow1; + delete window2; + delete window1; +} + QTEST_APPLESS_MAIN(tst_QGuiApplication) #include "tst_qguiapplication.moc" -- cgit v1.2.3 From e2f2bfb8ccf6e415320cb1c6f465b3feaafa053d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 11 Apr 2012 16:53:49 +0200 Subject: Remove insignification from tst_qgraphicsgridlayout. Crash on XCB can no longer be reproduced. Task-number: QTBUG-20756 Change-Id: I057231a397573f2a28a1325c6d6f728735ebbee6 Reviewed-by: Jason McDonald --- .../widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro index b32c638948..5796cbfd73 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro @@ -4,5 +4,3 @@ TARGET = tst_qgraphicsgridlayout QT += widgets testlib SOURCES += tst_qgraphicsgridlayout.cpp CONFIG += parallel_test -# ### fixme: QTBUG-20756 crashes on xcb -contains(QT_CONFIG,xcb):CONFIG+=insignificant_test -- cgit v1.2.3 From 9327bc87c3abf58bb471693b5448cd78e3db1b46 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Wed, 11 Apr 2012 17:33:22 +0300 Subject: fix QUtf8 codec to disallow codes in range [U+fdd0..U+fdef] 0xfdef-0xfdd0 is definitely 31 and not 15 :) also fix all copy-pastes of this code (greping for '0xfdd0' helps ;) Change-Id: I8f3bd4fd9d85f9de066f0f5df378b9188c12bd48 Reviewed-by: Thiago Macieira Reviewed-by: Denis Dzyubenko --- tests/auto/corelib/codecs/utf8/tst_utf8.cpp | 2 +- tests/benchmarks/corelib/tools/qstring/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp index b80ba8e665..c0ed152c32 100644 --- a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp +++ b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp @@ -321,7 +321,7 @@ void tst_Utf8::nonCharacters_data() // U+FDEF (inclusive) // U+FDD0 through U+FDEF - for (int i = 0; i < 16; ++i) { + for (int i = 0; i < 32; ++i) { char utf8[] = { char(0357), char(0267), char(0220 + i), 0 }; QString utf16 = QChar(0xfdd0 + i); QTest::newRow(qPrintable(QString::number(0xfdd0 + i, 16))) << QByteArray(utf8) << utf16; diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp index 9b10e97f2b..40300af947 100644 --- a/tests/benchmarks/corelib/tools/qstring/main.cpp +++ b/tests/benchmarks/corelib/tools/qstring/main.cpp @@ -1944,7 +1944,7 @@ static inline bool isUnicodeNonCharacter(uint ucs4) // U+FDEF (inclusive) return (ucs4 & 0xfffe) == 0xfffe - || (ucs4 - 0xfdd0U) < 16; + || (ucs4 - 0xfdd0U) < 32; } int fromUtf8_qt47(ushort *dst, const char *chars, int len) -- cgit v1.2.3 From 638fc652f587b47e9fd99ab5c0e886baf8cc35a9 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 11 Apr 2012 16:36:11 +0200 Subject: Fix tst_qtextedit and remove insignification. - The crash on XCB can no longer be reproduced. - Use QFINDTESTDATA instead of SRCDIR defines. - Remove Windows CE specific profile section. Task-number: QTBUG-20756 Change-Id: I6077b3a0daacb15ab440a90c7bda247aa3756fa5 Reviewed-by: Jason McDonald --- tests/auto/widgets/widgets/qtextedit/qtextedit.pro | 15 +--------- .../widgets/widgets/qtextedit/tst_qtextedit.cpp | 35 +++++++++++++++------- 2 files changed, 25 insertions(+), 25 deletions(-) (limited to 'tests') diff --git a/tests/auto/widgets/widgets/qtextedit/qtextedit.pro b/tests/auto/widgets/widgets/qtextedit/qtextedit.pro index 1c2821b289..6e0fff17d5 100644 --- a/tests/auto/widgets/widgets/qtextedit/qtextedit.pro +++ b/tests/auto/widgets/widgets/qtextedit/qtextedit.pro @@ -2,18 +2,5 @@ CONFIG += testcase TARGET = tst_qtextedit QT += widgets widgets-private gui-private core-private testlib -INCLUDEPATH += ../ -HEADERS += -SOURCES += tst_qtextedit.cpp - -wince* { - addImages.files = fullWidthSelection/* - addImages.path = fullWidthSelection - DEPLOYMENT += addImages - DEFINES += SRCDIR=\\\"./\\\" -} else { - DEFINES += SRCDIR=\\\"$$PWD/\\\" -} - -contains(QT_CONFIG,xcb):CONFIG+=insignificant_test # QTBUG-20756 crashes on xcb +SOURCES += tst_qtextedit.cpp diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp index 9c5a3dbed7..a3f58c4c0d 100644 --- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp @@ -58,6 +58,7 @@ #include #include #include +#include #include #include @@ -218,6 +219,7 @@ private: QTextEdit *ed; qreal rootFrameMargin; PlatformInputContext m_platformInputContext; + const QString m_fullWidthSelectionImagesFolder; }; bool tst_QTextEdit::nativeClipboardWorking() @@ -376,13 +378,17 @@ public: int &iterationCounter; }; -tst_QTextEdit::tst_QTextEdit() -{} +tst_QTextEdit::tst_QTextEdit() : + m_fullWidthSelectionImagesFolder(QFINDTESTDATA("fullWidthSelection")) +{ + +} void tst_QTextEdit::initTestCase() { QInputMethodPrivate *inputMethodPrivate = QInputMethodPrivate::get(qApp->inputMethod()); inputMethodPrivate->testContext = &m_platformInputContext; + QVERIFY2(!m_fullWidthSelectionImagesFolder.isEmpty(), qPrintable(QString::fromLatin1("Cannot locate 'fullWidthSelection' starting from %1").arg(QDir::currentPath()))); } void tst_QTextEdit::cleanupTestCase() @@ -1934,12 +1940,18 @@ void tst_QTextEdit::fullWidthSelection_data() QTest::addColumn("cursorTo"); QTest::addColumn("imageFileName"); - QTest::newRow("centered fully selected") << 0 << 15 << QString("fullWidthSelection/centered-fully-selected.png"); - QTest::newRow("centered partly selected") << 2 << 15 << QString("fullWidthSelection/centered-partly-selected.png"); - QTest::newRow("last char on line") << 42 << 44 << QString("fullWidthSelection/last-char-on-line.png"); - QTest::newRow("last char on parag") << 545 << 548 << QString("fullWidthSelection/last-char-on-parag.png"); - QTest::newRow("multiple full width lines") << 20 << 60 << QString("fullWidthSelection/multiple-full-width-lines.png"); - QTest::newRow("single full width line") << 20 << 30 << QString("fullWidthSelection/single-full-width-line.png"); + QTest::newRow("centered fully selected") + << 0 << 15 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/centered-fully-selected.png")); + QTest::newRow("centered partly selected") + << 2 << 15 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/centered-partly-selected.png")); + QTest::newRow("last char on line") + << 42 << 44 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/last-char-on-line.png")); + QTest::newRow("last char on parag") + << 545 << 548 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/last-char-on-parag.png")); + QTest::newRow("multiple full width lines") + << 20 << 60 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/multiple-full-width-lines.png")); + QTest::newRow("single full width line") + << 20 << 30 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/single-full-width-line.png")); } void tst_QTextEdit::fullWidthSelection() @@ -2053,11 +2065,12 @@ void tst_QTextEdit::compareWidgetAndImage(QTextEdit &widget, const QString &imag QPainter painter(&image); widget.viewport()->render(&painter); painter.end(); - // qDebug() << "file: " << QString(SRCDIR) + imageFileName; - QImageReader reader(QString(SRCDIR) + imageFileName, "PNG"); + QImageReader reader(imageFileName, "PNG"); + QImage original = reader.read(); - QCOMPARE(original.isNull(), false); + QVERIFY2(!original.isNull(), + qPrintable(QString::fromLatin1("Unable to read image %1: %2").arg(imageFileName, reader.errorString()))); QCOMPARE(original.size(), image.size()); QCOMPARE(image.depth(), 32); QCOMPARE(original.depth(), image.depth()); -- cgit v1.2.3 From a9cda515177db1615f8d47becf2aa781f26955ae Mon Sep 17 00:00:00 2001 From: Andreas Aardal Hanssen Date: Sun, 8 Apr 2012 11:58:30 +0200 Subject: Fixes a regression; missing cursor blink when input mask is set. I can't say for sure why q*linecontrol passes an empty rect to the updateNeeded() signal when an input mask is set; presumably the empty rect at some point has meant "full update", but there are a few problems with this. Surely a full update is wrong, even if the semantics have been lost in translation somewhere (likely the qlinecontrol refactoring). This fix ensures that empty rects from updateNeeded() are interpreted as a request to update the whole widget. A further improvement would be to ensure the line control doesn't request a full update when an input mask is set. The cursor is usually wider when a mask is set but because of QLineEdit::paintEvent()'s implementation, there is currently a mismatch between the cursor width as seen by q*linecontrol and what is actually drawn, which causes rendering artifacts if updateNeeded() sends the cursorRect(). Since QLineEdit and Q*LineControl aren't actively developed, it's best to keep this fix minimal, although the performance cost of updating the whole line edit when an input mask is set is unfortunate. Task-number: QTBUG-7174 Change-Id: Ie51e015d760915e07b0220b770f04fc958d93a12 Reviewed-by: Andy Shaw Reviewed-by: Girish Ramakrishnan --- .../widgets/widgets/qlineedit/tst_qlineedit.cpp | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'tests') diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp index 06bf929e4b..22e05a8871 100644 --- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp @@ -271,6 +271,7 @@ private slots: void taskQTBUG_7395_readOnlyShortcut(); void QTBUG697_paletteCurrentColorGroup(); void QTBUG13520_textNotVisible(); + void QTBUG7174_inputMaskCursorBlink(); void bidiVisualMovement_data(); void bidiVisualMovement(); @@ -3693,6 +3694,30 @@ void tst_QLineEdit::QTBUG13520_textNotVisible() } +class UpdateRegionLineEdit : public QLineEdit +{ +public: + QRegion updateRegion; +protected: + void paintEvent(QPaintEvent *event) + { + updateRegion = event->region(); + } +}; + +void tst_QLineEdit::QTBUG7174_inputMaskCursorBlink() +{ + UpdateRegionLineEdit edit; + edit.setInputMask(QLatin1String("AAAA")); + edit.setFocus(); + edit.setText(QLatin1String("AAAA")); + edit.show(); + QRect cursorRect = edit.inputMethodQuery(Qt::ImMicroFocus).toRect(); + QTest::qWaitForWindowShown(&edit); + edit.updateRegion = QRegion(); + QTest::qWait(QApplication::cursorFlashTime()); + QVERIFY(edit.updateRegion.contains(cursorRect)); +} void tst_QLineEdit::bidiVisualMovement_data() { -- cgit v1.2.3 From 28675642f3445e41434b004c2a1a1d96ec0145a2 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 12 Apr 2012 12:56:20 +0200 Subject: Build manual tests. Add a toplevel manual.pro and other .pro-files to build them and fix the build. Change-Id: Ibc98a27b39dd1304edfa8a6894d62e77ce7ef387 Reviewed-by: Shane Kearns --- tests/manual/bearerex/bearerex.cpp | 9 +++-- tests/manual/bearerex/bearerex.h | 2 +- tests/manual/bearerex/bearerex.pro | 1 + tests/manual/bearerex/datatransferer.cpp | 41 ---------------------- tests/manual/bearerex/datatransferer.h | 17 --------- tests/manual/cocoa/qt_on_cocoa/window.cpp | 2 +- tests/manual/cocoa/wheelevent/main.cpp | 2 +- tests/manual/cocoa/wheelevent/window.cpp | 2 +- tests/manual/gestures/gestures.pro | 4 +++ .../manual/gestures/graphicsview/graphicsview.pro | 2 ++ tests/manual/gestures/graphicsview/main.cpp | 2 +- tests/manual/gestures/scrollarea/main.cpp | 2 +- tests/manual/gestures/scrollarea/scrollarea.pro | 2 ++ tests/manual/inputmethodhints/inputmethodhints.h | 4 +-- tests/manual/inputmethodhints/inputmethodhints.pro | 3 +- tests/manual/inputmethodhints/main.cpp | 2 +- tests/manual/keypadnavigation/keypadnavigation.pro | 1 + tests/manual/keypadnavigation/main.cpp | 2 +- tests/manual/lance/interactivewidget.cpp | 2 +- tests/manual/lance/interactivewidget.h | 2 +- tests/manual/lance/lance.pro | 4 +-- tests/manual/lance/main.cpp | 12 +++---- tests/manual/lance/widgets.h | 10 +----- tests/manual/manual.pro | 32 +++++++++++++++++ .../network_remote_stresstest.pro | 3 +- .../tst_network_remote_stresstest.cpp | 38 +++++++++++++++----- .../network_stresstest/network_stresstest.pro | 3 +- .../network_stresstest/tst_network_stresstest.cpp | 4 +-- tests/manual/qdesktopwidget/main.cpp | 2 +- tests/manual/qdesktopwidget/qdesktopwidget.pro | 1 + tests/manual/qgraphicsitemgroup/main.cpp | 2 +- .../qgraphicsitemgroup/qgraphicsitemgroup.pro | 1 + tests/manual/qgraphicslayout/flicker/flicker.pro | 1 + tests/manual/qgraphicslayout/flicker/main.cpp | 3 +- tests/manual/qgraphicslayout/flicker/window.h | 2 +- .../qhttpnetworkconnection.pro | 2 -- tests/manual/qimagereader/main.cpp | 2 +- tests/manual/qimagereader/qimagereader.pro | 1 + tests/manual/qlocale/calendar.cpp | 2 +- tests/manual/qlocale/calendar.h | 2 +- tests/manual/qlocale/currency.h | 2 +- tests/manual/qlocale/dateformats.h | 2 +- tests/manual/qlocale/info.h | 2 +- tests/manual/qlocale/languages.h | 2 +- tests/manual/qlocale/main.cpp | 2 +- tests/manual/qlocale/miscellaneous.h | 2 +- tests/manual/qlocale/numberformats.h | 2 +- tests/manual/qlocale/qlocale.pro | 1 + tests/manual/qlocale/window.h | 2 +- tests/manual/qnetworkaccessmanager/qget/qget.h | 2 ++ .../qnetworkconfigurationmanager.pro | 2 -- tests/manual/qnetworkreply/qnetworkreply.pro | 2 -- .../device_information/device_information.pro | 6 ++++ .../qtabletevent/device_information/main.cpp | 2 +- .../device_information/qtabletevent.pro | 5 --- .../event_compression/event_compression.pro | 2 +- tests/manual/qtabletevent/qtabletevent.pro | 5 +++ .../regular_widgets/regular_widgets.pro | 1 + tests/manual/qtbug-8933/main.cpp | 2 +- tests/manual/qtbug-8933/qtbug-8933.pro | 2 +- tests/manual/qtouchevent/main.cpp | 2 +- tests/manual/qtouchevent/qtouchevent.pro | 2 +- tests/manual/qwidget_zorder/main.cpp | 2 +- tests/manual/qwidget_zorder/qwidget_zorder.pro | 1 + tests/manual/repaint/mainwindow/main.cpp | 2 +- tests/manual/repaint/mainwindow/mainwindow.pro | 1 + tests/manual/repaint/repaint.pro | 9 +++++ tests/manual/repaint/scrollarea/main.cpp | 2 +- tests/manual/repaint/scrollarea/scrollarea.pro | 1 + tests/manual/repaint/shared/shared.h | 2 +- tests/manual/repaint/splitter/main.cpp | 2 +- tests/manual/repaint/splitter/splitter.pro | 1 + tests/manual/repaint/tableview/main.cpp | 2 +- tests/manual/repaint/tableview/tableview.pro | 1 + tests/manual/repaint/task141091/main.cpp | 2 +- tests/manual/repaint/task141091/task141091.pro | 2 +- tests/manual/repaint/toplevel/main.cpp | 2 +- tests/manual/repaint/toplevel/toplevel.pro | 1 + tests/manual/repaint/widget/main.cpp | 2 +- tests/manual/repaint/widget/widget.pro | 1 + tests/manual/socketengine/main.cpp | 3 +- tests/manual/socketengine/socketengine.pro | 4 +-- .../textrendering/glyphshaping/glyphshaping.pro | 1 + tests/manual/textrendering/glyphshaping/main.cpp | 2 +- .../manual/textrendering/textperformance/main.cpp | 2 +- .../textperformance/textperformance.pro | 1 + tests/manual/textrendering/textrendering.pro | 4 +++ .../manual/widgets/itemviews/delegate/delegate.pro | 3 ++ .../manual/widgets/itemviews/delegate/example.pro | 2 -- tests/manual/windowflags/controllerwindow.cpp | 12 +++++-- tests/manual/windowflags/previewwindow.cpp | 4 ++- tests/manual/windowflags/windowflags.pro | 2 ++ tests/manual/windowmodality/modality.pro | 3 -- tests/manual/windowmodality/windowmodality.pro | 3 ++ 94 files changed, 200 insertions(+), 165 deletions(-) create mode 100644 tests/manual/gestures/gestures.pro create mode 100644 tests/manual/manual.pro create mode 100644 tests/manual/qtabletevent/device_information/device_information.pro delete mode 100644 tests/manual/qtabletevent/device_information/qtabletevent.pro create mode 100644 tests/manual/qtabletevent/qtabletevent.pro create mode 100644 tests/manual/repaint/repaint.pro create mode 100644 tests/manual/textrendering/textrendering.pro create mode 100644 tests/manual/widgets/itemviews/delegate/delegate.pro delete mode 100644 tests/manual/widgets/itemviews/delegate/example.pro delete mode 100644 tests/manual/windowmodality/modality.pro create mode 100644 tests/manual/windowmodality/windowmodality.pro (limited to 'tests') diff --git a/tests/manual/bearerex/bearerex.cpp b/tests/manual/bearerex/bearerex.cpp index 190be6f6b4..6826312880 100644 --- a/tests/manual/bearerex/bearerex.cpp +++ b/tests/manual/bearerex/bearerex.cpp @@ -43,6 +43,7 @@ #include "datatransferer.h" #include +#include Q_DECLARE_METATYPE(QNetworkConfiguration) @@ -284,7 +285,7 @@ SessionTab::SessionTab(QNetworkConfiguration* apNetworkConfiguration, } else if (apNetworkConfiguration->type() == QNetworkConfiguration::ServiceNetwork) { snapLineEdit->setText(apNetworkConfiguration->name()+" ("+apNetworkConfiguration->identifier()+")"); } - bearerLineEdit->setText(apNetworkConfiguration->bearerName()); + bearerLineEdit->setText(apNetworkConfiguration->bearerTypeName()); sentRecDataLineEdit->setText(QString::number(m_NetworkSession->bytesWritten())+ QString(" / ")+ QString::number(m_NetworkSession->bytesReceived())); @@ -314,8 +315,6 @@ void SessionTab::on_createQNetworkAccessManagerButton_clicked() m_dataTransferer = new DataTransfererQNam(this); } else if (type == "QTcpSocket") { m_dataTransferer = new DataTransfererQTcp(this); - } else if (type == "QHttp") { - m_dataTransferer = new DataTransfererQHttp(this); } else { qDebug("BearerEx Warning, unknown data transfer object requested, not creating anything."); return; @@ -512,10 +511,10 @@ void SessionTab::newState(QNetworkSession::State state) QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId); if (config.isValid()) { iapLineEdit->setText(config.name()+" ("+config.identifier()+")"); - bearerLineEdit->setText(config.bearerName()); + bearerLineEdit->setText(config.bearerTypeName()); } } else { - bearerLineEdit->setText(m_NetworkSession->configuration().bearerName()); + bearerLineEdit->setText(m_NetworkSession->configuration().bearerTypeName()); } QString active; diff --git a/tests/manual/bearerex/bearerex.h b/tests/manual/bearerex/bearerex.h index 7ab0177128..60963e8fd2 100644 --- a/tests/manual/bearerex/bearerex.h +++ b/tests/manual/bearerex/bearerex.h @@ -42,7 +42,7 @@ #ifndef ACCESSPOINTMANAGEREX_H #define ACCESSPOINTMANAGEREX_H -#include +#include #include "ui_detailedinfodialog.h" diff --git a/tests/manual/bearerex/bearerex.pro b/tests/manual/bearerex/bearerex.pro index 123038dba4..a49c644e2e 100644 --- a/tests/manual/bearerex/bearerex.pro +++ b/tests/manual/bearerex/bearerex.pro @@ -3,6 +3,7 @@ TARGET = BearerEx QT += core \ gui \ + widgets \ network FORMS += detailedinfodialog.ui diff --git a/tests/manual/bearerex/datatransferer.cpp b/tests/manual/bearerex/datatransferer.cpp index 1380607632..648a466a30 100644 --- a/tests/manual/bearerex/datatransferer.cpp +++ b/tests/manual/bearerex/datatransferer.cpp @@ -134,47 +134,6 @@ void DataTransfererQTcp::error(QAbstractSocket::SocketError socketError) emit finished(socketError, 0, "QAbstractSocket::SocketError"); } -// -------- Based on QHttp - -DataTransfererQHttp::DataTransfererQHttp(QObject* parent) -: DataTransferer(parent) -{ - connect(&m_qhttp, SIGNAL(done(bool)), this, SLOT(done(bool))); - qDebug("BearerEx DataTransferer QHttp created."); -} - -DataTransfererQHttp::~DataTransfererQHttp() -{ - qDebug("BearerEx DataTransferer QHttp destroyed."); -} - -bool DataTransfererQHttp::transferData() -{ - qDebug("BearerEx datatransfer for QHttp requested."); - if (m_dataTransferOngoing) { - return false; - } - QString urlstring("http://www.google.com"); - QUrl url(urlstring); - m_qhttp.setHost(url.host(), QHttp::ConnectionModeHttp, url.port() == -1 ? 0 : url.port()); - m_qhttp.get(urlstring); - m_dataTransferOngoing = true; - return true; -} - -void DataTransfererQHttp::done(bool /*error*/ ) -{ - qDebug("BearerEx DatatransfererQHttp reply was finished (error code is type QHttp::Error)."); - qint64 dataReceived = 0; - quint32 errorCode = m_qhttp.error(); - if (m_qhttp.error() == QHttp::NoError) { - QString result(m_qhttp.readAll()); - dataReceived = result.length(); - } - m_dataTransferOngoing = false; - emit finished(errorCode, dataReceived, "QHttp::Error"); -} - // -------- Based on QNetworkAccessManager DataTransfererQNam::DataTransfererQNam(QObject* parent) diff --git a/tests/manual/bearerex/datatransferer.h b/tests/manual/bearerex/datatransferer.h index e657b20b38..4be8572a7c 100644 --- a/tests/manual/bearerex/datatransferer.h +++ b/tests/manual/bearerex/datatransferer.h @@ -47,7 +47,6 @@ #include #include #include -#include #include // Interface-class for data transferring object @@ -111,20 +110,4 @@ private: QNetworkAccessManager m_qnam; }; -class DataTransfererQHttp : public DataTransferer -{ - Q_OBJECT -public: - DataTransfererQHttp(QObject* parent = 0); - ~DataTransfererQHttp(); - - virtual bool transferData(); - -public slots: - void done(bool error); - -private: - QHttp m_qhttp; -}; - #endif // DATATRANSFERER_H diff --git a/tests/manual/cocoa/qt_on_cocoa/window.cpp b/tests/manual/cocoa/qt_on_cocoa/window.cpp index d68e08a9f8..c1d4401eae 100644 --- a/tests/manual/cocoa/qt_on_cocoa/window.cpp +++ b/tests/manual/cocoa/qt_on_cocoa/window.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include static int colorIndexId = 0; diff --git a/tests/manual/cocoa/wheelevent/main.cpp b/tests/manual/cocoa/wheelevent/main.cpp index 979498991d..69c0960419 100644 --- a/tests/manual/cocoa/wheelevent/main.cpp +++ b/tests/manual/cocoa/wheelevent/main.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include -#include +#include #include "window.h" diff --git a/tests/manual/cocoa/wheelevent/window.cpp b/tests/manual/cocoa/wheelevent/window.cpp index b305b057bf..66c8af0ad1 100644 --- a/tests/manual/cocoa/wheelevent/window.cpp +++ b/tests/manual/cocoa/wheelevent/window.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include static int colorIndexId = 0; diff --git a/tests/manual/gestures/gestures.pro b/tests/manual/gestures/gestures.pro new file mode 100644 index 0000000000..6ff914f542 --- /dev/null +++ b/tests/manual/gestures/gestures.pro @@ -0,0 +1,4 @@ +TEMPLATE=subdirs + +SUBDIRS = graphicsview \ + scrollarea diff --git a/tests/manual/gestures/graphicsview/graphicsview.pro b/tests/manual/gestures/graphicsview/graphicsview.pro index c5f6fe0764..9ecd0b372f 100644 --- a/tests/manual/gestures/graphicsview/graphicsview.pro +++ b/tests/manual/gestures/graphicsview/graphicsview.pro @@ -1,3 +1,5 @@ +QT += widgets + SOURCES += main.cpp \ imageitem.cpp \ gestures.cpp \ diff --git a/tests/manual/gestures/graphicsview/main.cpp b/tests/manual/gestures/graphicsview/main.cpp index ddda06ea22..465c3a2d65 100644 --- a/tests/manual/gestures/graphicsview/main.cpp +++ b/tests/manual/gestures/graphicsview/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include "imageitem.h" #include "gestures.h" diff --git a/tests/manual/gestures/scrollarea/main.cpp b/tests/manual/gestures/scrollarea/main.cpp index d77ce8e373..190441989e 100644 --- a/tests/manual/gestures/scrollarea/main.cpp +++ b/tests/manual/gestures/scrollarea/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include "mousepangesturerecognizer.h" diff --git a/tests/manual/gestures/scrollarea/scrollarea.pro b/tests/manual/gestures/scrollarea/scrollarea.pro index 554810e0c3..84e2af3f49 100644 --- a/tests/manual/gestures/scrollarea/scrollarea.pro +++ b/tests/manual/gestures/scrollarea/scrollarea.pro @@ -1,3 +1,5 @@ +QT += widgets + SOURCES = main.cpp \ mousepangesturerecognizer.cpp HEADERS += mousepangesturerecognizer.h diff --git a/tests/manual/inputmethodhints/inputmethodhints.h b/tests/manual/inputmethodhints/inputmethodhints.h index 4746c9a11a..82d3e7290e 100644 --- a/tests/manual/inputmethodhints/inputmethodhints.h +++ b/tests/manual/inputmethodhints/inputmethodhints.h @@ -42,8 +42,8 @@ #ifndef INPUTMETHODHINTS_H #define INPUTMETHODHINTS_H -#include -#include "ui_tst_inputmethodhints.h" +#include +#include "ui_inputmethodhints.h" class inputmethodhints : public QMainWindow { diff --git a/tests/manual/inputmethodhints/inputmethodhints.pro b/tests/manual/inputmethodhints/inputmethodhints.pro index 171c5f1772..f253f72332 100644 --- a/tests/manual/inputmethodhints/inputmethodhints.pro +++ b/tests/manual/inputmethodhints/inputmethodhints.pro @@ -1,8 +1,7 @@ TEMPLATE = app TARGET = tst_inputmethodhints -QT += core \ - gui +QT += widgets HEADERS += inputmethodhints.h SOURCES += main.cpp \ diff --git a/tests/manual/inputmethodhints/main.cpp b/tests/manual/inputmethodhints/main.cpp index af3286df73..fcd6d16892 100644 --- a/tests/manual/inputmethodhints/main.cpp +++ b/tests/manual/inputmethodhints/main.cpp @@ -41,7 +41,7 @@ #include "inputmethodhints.h" -#include +#include #include int main(int argc, char *argv[]) diff --git a/tests/manual/keypadnavigation/keypadnavigation.pro b/tests/manual/keypadnavigation/keypadnavigation.pro index 6d12606c78..a45d38af21 100644 --- a/tests/manual/keypadnavigation/keypadnavigation.pro +++ b/tests/manual/keypadnavigation/keypadnavigation.pro @@ -1,2 +1,3 @@ +QT += widgets SOURCES += main.cpp FORMS += keypadnavigation.ui diff --git a/tests/manual/keypadnavigation/main.cpp b/tests/manual/keypadnavigation/main.cpp index 4f7224d135..964d46faf6 100644 --- a/tests/manual/keypadnavigation/main.cpp +++ b/tests/manual/keypadnavigation/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include "ui_keypadnavigation.h" class KeypadNavigation : public QMainWindow diff --git a/tests/manual/lance/interactivewidget.cpp b/tests/manual/lance/interactivewidget.cpp index 55e60a8946..0b9d8ee0a4 100644 --- a/tests/manual/lance/interactivewidget.cpp +++ b/tests/manual/lance/interactivewidget.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ #include "interactivewidget.h" -#include +#include InteractiveWidget::InteractiveWidget() { diff --git a/tests/manual/lance/interactivewidget.h b/tests/manual/lance/interactivewidget.h index e9e584512e..879facac42 100644 --- a/tests/manual/lance/interactivewidget.h +++ b/tests/manual/lance/interactivewidget.h @@ -44,7 +44,7 @@ #include "widgets.h" #include "paintcommands.h" -#include +#include #include diff --git a/tests/manual/lance/lance.pro b/tests/manual/lance/lance.pro index e24d3f2fa3..4b319369e6 100644 --- a/tests/manual/lance/lance.pro +++ b/tests/manual/lance/lance.pro @@ -1,8 +1,8 @@ -LANCELOT_DIR = $$PWD/../../auto/lancelot +LANCELOT_DIR = $$PWD/../../auto/other/lancelot CONFIG+=console moc TEMPLATE = app INCLUDEPATH += . $$LANCELOT_DIR -QT += core-private gui-private +QT += core-private gui-private widgets printsupport HEADERS += widgets.h \ interactivewidget.h \ diff --git a/tests/manual/lance/main.cpp b/tests/manual/lance/main.cpp index c33cb49be9..e8bb44a221 100644 --- a/tests/manual/lance/main.cpp +++ b/tests/manual/lance/main.cpp @@ -43,7 +43,8 @@ #include "paintcommands.h" #include -#include +#include +#include #include #include @@ -612,14 +613,11 @@ int main(int argc, char **argv) pcmd.setType(type); pcmd.setCheckersBackground(checkers_background); pcmd.setContents(content); - bool ps = type == PsType; QPrinter p(highres ? QPrinter::HighResolution : QPrinter::ScreenResolution); QFileInfo input(files.at(j)); - QString file = QString("%1_%2.%3") - .arg(input.baseName()) - .arg(input.suffix()) - .arg(ps ? "ps" : "pdf"); - p.setOutputFormat(ps ? QPrinter::PdfFormat : QPrinter::PostScriptFormat); + const QString file = input.baseName() + QLatin1Char('_') + + input.suffix() + QStringLiteral(".pdf"); + p.setOutputFormat(QPrinter::PdfFormat); p.setOutputFileName(file); p.setPageSize(QPrinter::A4); QPainter pt(&p); diff --git a/tests/manual/lance/widgets.h b/tests/manual/lance/widgets.h index d8a67a7554..33115ad7b3 100644 --- a/tests/manual/lance/widgets.h +++ b/tests/manual/lance/widgets.h @@ -59,9 +59,6 @@ #include #include - -#include - #include const int CP_RADIUS = 10; @@ -236,12 +233,7 @@ public: } if (m_render_view.isNull()) { - - if (T::window()->windowSurface()) - m_render_view = T::window()->windowSurface()->grabWidget(this); - else - m_render_view = QPixmap::grabWidget(this); - + m_render_view = QPixmap::grabWidget(this); m_render_view.save("renderView.png"); } } diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro new file mode 100644 index 0000000000..9df151eee1 --- /dev/null +++ b/tests/manual/manual.pro @@ -0,0 +1,32 @@ +TEMPLATE=subdirs + +SUBDIRS = bearerex \ +gestures \ +inputmethodhints \ +keypadnavigation \ +lance \ +network_remote_stresstest \ +network_stresstest \ +qcursor \ +qdesktopwidget \ +qgraphicsitemgroup \ +qgraphicslayout/flicker \ +qhttpnetworkconnection \ +qimagereader \ +qlocale \ +qnetworkaccessmanager/qget \ +qnetworkconfigurationmanager \ +qnetworkreply \ +qssloptions \ +qtabletevent \ +qtbug-8933 \ +qtouchevent \ +qwidget_zorder \ +repaint \ +socketengine \ +textrendering \ +widgets/itemviews/delegate \ +windowflags \ +windowmodality + +!contains(QT_CONFIG, openssl):!contains(QT_CONFIG, openssl-linked):SUBDIRS -= qssloptions diff --git a/tests/manual/network_remote_stresstest/network_remote_stresstest.pro b/tests/manual/network_remote_stresstest/network_remote_stresstest.pro index 3a581e12ad..8b52240509 100644 --- a/tests/manual/network_remote_stresstest/network_remote_stresstest.pro +++ b/tests/manual/network_remote_stresstest/network_remote_stresstest.pro @@ -1,9 +1,10 @@ CONFIG += testcase TARGET = tst_network_remote_stresstest -QT = core network testlib +QT = core core-private network network-private testlib SOURCES += tst_network_remote_stresstest.cpp RESOURCES += url-list.qrc +LIBS += $$QMAKE_LIBS_NETWORK diff --git a/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp b/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp index c2981c6df8..109ecbe2aa 100644 --- a/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp +++ b/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp @@ -235,6 +235,10 @@ void tst_NetworkRemoteStressTest::blockingSequentialRemoteHosts() QElapsedTimer outerTimer; outerTimer.start(); +#ifdef QT_NO_SSL + QVERIFY(!useSslSocket); +#endif // QT_NO_SSL + for (int i = 0; i < urlList.size(); ++i) { const QUrl &url = urlList.at(i); bool isHttps = url.scheme() == "https"; @@ -243,21 +247,24 @@ void tst_NetworkRemoteStressTest::blockingSequentialRemoteHosts() timeout.start(); QSharedPointer socket; - if (useSslSocket || isHttps) { +#ifndef QT_NO_SSL + if (useSslSocket || isHttps) socket = QSharedPointer(new QSslSocket); - } else { +#endif // QT_NO_SSL + if (socket.isNull()) socket = QSharedPointer(new QTcpSocket); - } socket->connectToHost(url.host(), url.port(isHttps ? 443 : 80)); QVERIFY2(socket->waitForConnected(10000), "Timeout connecting to " + url.encodedHost()); +#ifndef QT_NO_SSL if (isHttps) { static_cast(socket.data())->setProtocol(QSsl::TlsV1_0); static_cast(socket.data())->startClientEncryption(); static_cast(socket.data())->ignoreSslErrors(); QVERIFY2(static_cast(socket.data())->waitForEncrypted(10000), "Timeout starting TLS with " + url.encodedHost()); } +#endif // QT_NO_SSL socket->write("GET " + url.toEncoded(QUrl::RemoveScheme | QUrl::RemoveAuthority | QUrl::RemoveFragment) + " HTTP/1.0\r\n" "Connection: close\r\n" @@ -288,6 +295,10 @@ void tst_NetworkRemoteStressTest::sequentialRemoteHosts() QFETCH_GLOBAL(QVector, urlList); QFETCH_GLOBAL(bool, useSslSocket); +#ifdef QT_NO_SSL + QVERIFY(!useSslSocket); +#endif // QT_NO_SSL + qint64 totalBytes = 0; QElapsedTimer outerTimer; outerTimer.start(); @@ -300,15 +311,18 @@ void tst_NetworkRemoteStressTest::sequentialRemoteHosts() timeout.start(); QSharedPointer socket; - if (useSslSocket || isHttps) { +#ifndef QT_NO_SSL + if (useSslSocket || isHttps) socket = QSharedPointer(new QSslSocket); - } else { +#endif // QT_NO_SSL + if (socket.isNull()) socket = QSharedPointer(new QTcpSocket); - } if (isHttps) { +#ifndef QT_NO_SSL static_cast(socket.data())->setProtocol(QSsl::TlsV1_0); static_cast(socket.data())->connectToHostEncrypted(url.host(), url.port(443)); static_cast(socket.data())->ignoreSslErrors(); +#endif // QT_NO_SSL } else { socket->connectToHost(url.host(), url.port(80)); } @@ -356,6 +370,10 @@ void tst_NetworkRemoteStressTest::parallelRemoteHosts() QFETCH(int, parallelAttempts); +#ifdef QT_NO_SSL + QVERIFY(!useSslSocket); +#endif // QT_NO_SSL + qint64 totalBytes = 0; QElapsedTimer outerTimer; outerTimer.start(); @@ -371,15 +389,19 @@ void tst_NetworkRemoteStressTest::parallelRemoteHosts() for (int j = 0; j < parallelAttempts && it != urlList.constEnd(); ++j, ++it) { const QUrl &url = *it; bool isHttps = url.scheme() == "https"; - QTcpSocket *socket; + QTcpSocket *socket = 0; +#ifndef QT_NO_SSL if (useSslSocket || isHttps) socket = new QSslSocket; - else +#endif // QT_NO_SSL + if (!socket) socket = new QTcpSocket; if (isHttps) { +#ifndef QT_NO_SSL static_cast(socket)->setProtocol(QSsl::TlsV1_0); static_cast(socket)->connectToHostEncrypted(url.host(), url.port(443)); static_cast(socket)->ignoreSslErrors(); +#endif // QT_NO_SSL } else { socket->connectToHost(url.host(), url.port(isHttps ? 443 : 80)); } diff --git a/tests/manual/network_stresstest/network_stresstest.pro b/tests/manual/network_stresstest/network_stresstest.pro index caa8436cef..ebddf12961 100644 --- a/tests/manual/network_stresstest/network_stresstest.pro +++ b/tests/manual/network_stresstest/network_stresstest.pro @@ -1,7 +1,7 @@ CONFIG += testcase TARGET = tst_network_stresstest -QT = core network testlib +QT = core-private network-private testlib SOURCES += tst_network_stresstest.cpp \ minihttpserver.cpp @@ -11,3 +11,4 @@ HEADERS += \ RESOURCES += wwwfiles.qrc QMAKE_RESOURCE_FLAGS += -no-compress +LIBS += $$QMAKE_LIBS_NETWORK diff --git a/tests/manual/network_stresstest/tst_network_stresstest.cpp b/tests/manual/network_stresstest/tst_network_stresstest.cpp index 0f2673e23c..38a516af82 100644 --- a/tests/manual/network_stresstest/tst_network_stresstest.cpp +++ b/tests/manual/network_stresstest/tst_network_stresstest.cpp @@ -338,13 +338,13 @@ void tst_NetworkStressTest::nativeNonBlockingConnectDisconnect() QVERIFY(fd != INVALID_SOCKET); // set the socket to non-blocking and start connecting - unsigned long buf = v; + unsigned long buf = 0; unsigned long outBuf; DWORD sizeWritten = 0; QVERIFY(::WSAIoctl(fd, FIONBIO, &buf, sizeof(unsigned long), &outBuf, sizeof(unsigned long), &sizeWritten, 0,0) != SOCKET_ERROR); while (true) { - int connectResult = ::WSAConnect(fd, sockAddrPtr, sockAddrSize, 0,0,0,0); + int connectResult = ::WSAConnect(fd, (sockaddr *)addr.data(), addr.size(), 0,0,0,0); if (connectResult == 0 || WSAGetLastError() == WSAEISCONN) { break; // connected } else { diff --git a/tests/manual/qdesktopwidget/main.cpp b/tests/manual/qdesktopwidget/main.cpp index d693d6b67d..32137d78e3 100644 --- a/tests/manual/qdesktopwidget/main.cpp +++ b/tests/manual/qdesktopwidget/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include class DesktopView : public QGraphicsView { diff --git a/tests/manual/qdesktopwidget/qdesktopwidget.pro b/tests/manual/qdesktopwidget/qdesktopwidget.pro index 93d56eb137..8979e7ef35 100644 --- a/tests/manual/qdesktopwidget/qdesktopwidget.pro +++ b/tests/manual/qdesktopwidget/qdesktopwidget.pro @@ -1,2 +1,3 @@ TEMPLATE = app +QT += widgets SOURCES += main.cpp diff --git a/tests/manual/qgraphicsitemgroup/main.cpp b/tests/manual/qgraphicsitemgroup/main.cpp index d60941da3a..d76a3a6334 100644 --- a/tests/manual/qgraphicsitemgroup/main.cpp +++ b/tests/manual/qgraphicsitemgroup/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include "widget.h" int main(int argc, char *argv[]) diff --git a/tests/manual/qgraphicsitemgroup/qgraphicsitemgroup.pro b/tests/manual/qgraphicsitemgroup/qgraphicsitemgroup.pro index 6676a2e7c1..6135f74b8b 100644 --- a/tests/manual/qgraphicsitemgroup/qgraphicsitemgroup.pro +++ b/tests/manual/qgraphicsitemgroup/qgraphicsitemgroup.pro @@ -1,4 +1,5 @@ TARGET = qgraphicsitemgroup +QT += widgets TEMPLATE = app SOURCES += main.cpp \ widget.cpp \ diff --git a/tests/manual/qgraphicslayout/flicker/flicker.pro b/tests/manual/qgraphicslayout/flicker/flicker.pro index 2e09826022..d800418f85 100644 --- a/tests/manual/qgraphicslayout/flicker/flicker.pro +++ b/tests/manual/qgraphicslayout/flicker/flicker.pro @@ -1,2 +1,3 @@ +QT += widgets HEADERS += window.h SOURCES += main.cpp window.cpp diff --git a/tests/manual/qgraphicslayout/flicker/main.cpp b/tests/manual/qgraphicslayout/flicker/main.cpp index e71915c22f..2947930895 100644 --- a/tests/manual/qgraphicslayout/flicker/main.cpp +++ b/tests/manual/qgraphicslayout/flicker/main.cpp @@ -39,8 +39,7 @@ ** ****************************************************************************/ -#include -#include +#include #include "window.h" int main(int argc, char **argv) diff --git a/tests/manual/qgraphicslayout/flicker/window.h b/tests/manual/qgraphicslayout/flicker/window.h index 4930381641..3b032c3b45 100644 --- a/tests/manual/qgraphicslayout/flicker/window.h +++ b/tests/manual/qgraphicslayout/flicker/window.h @@ -43,7 +43,7 @@ #define WINDOW_H -#include +#include struct Statistics { Statistics() : output(0), diff --git a/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro b/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro index fd21007793..8e73add252 100644 --- a/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro +++ b/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro @@ -5,6 +5,4 @@ TARGET = tst_qhttpnetworkconnection QT -= gui QT += network testlib -CONFIG += release - SOURCES += main.cpp diff --git a/tests/manual/qimagereader/main.cpp b/tests/manual/qimagereader/main.cpp index 44cdc6ad36..e225c1bc0b 100644 --- a/tests/manual/qimagereader/main.cpp +++ b/tests/manual/qimagereader/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include class MyWidget : public QWidget { diff --git a/tests/manual/qimagereader/qimagereader.pro b/tests/manual/qimagereader/qimagereader.pro index 28dcadcbfa..3523257f3e 100644 --- a/tests/manual/qimagereader/qimagereader.pro +++ b/tests/manual/qimagereader/qimagereader.pro @@ -1 +1,2 @@ +QT += widgets SOURCES += main.cpp diff --git a/tests/manual/qlocale/calendar.cpp b/tests/manual/qlocale/calendar.cpp index e23af4fa49..122f57fa64 100644 --- a/tests/manual/qlocale/calendar.cpp +++ b/tests/manual/qlocale/calendar.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ -#include +#include #include "calendar.h" diff --git a/tests/manual/qlocale/calendar.h b/tests/manual/qlocale/calendar.h index bf0d5efac3..7780e82bbf 100644 --- a/tests/manual/qlocale/calendar.h +++ b/tests/manual/qlocale/calendar.h @@ -41,7 +41,7 @@ #ifndef CALENDAR_H #define CALENDAR_H -#include +#include class CalendarWidget : public QWidget { diff --git a/tests/manual/qlocale/currency.h b/tests/manual/qlocale/currency.h index 1d3d536578..f722889600 100644 --- a/tests/manual/qlocale/currency.h +++ b/tests/manual/qlocale/currency.h @@ -41,7 +41,7 @@ #ifndef CURRENCY_H #define CURRENCY_H -#include +#include class CurrencyWidget : public QWidget { diff --git a/tests/manual/qlocale/dateformats.h b/tests/manual/qlocale/dateformats.h index 78ef62343a..9355475820 100644 --- a/tests/manual/qlocale/dateformats.h +++ b/tests/manual/qlocale/dateformats.h @@ -41,7 +41,7 @@ #ifndef DATEFORMATS_H #define DATEFORMATS_H -#include +#include class DateFormatsWidget : public QWidget { diff --git a/tests/manual/qlocale/info.h b/tests/manual/qlocale/info.h index 6cd7818feb..0c74dfb8ca 100644 --- a/tests/manual/qlocale/info.h +++ b/tests/manual/qlocale/info.h @@ -41,7 +41,7 @@ #ifndef INFO_H #define INFO_H -#include +#include class InfoWidget : public QWidget { diff --git a/tests/manual/qlocale/languages.h b/tests/manual/qlocale/languages.h index 6723e0ffa7..07a86f6898 100644 --- a/tests/manual/qlocale/languages.h +++ b/tests/manual/qlocale/languages.h @@ -41,7 +41,7 @@ #ifndef LANGUAGES_H #define LANGUAGES_H -#include +#include class LanguagesWidget : public QWidget { diff --git a/tests/manual/qlocale/main.cpp b/tests/manual/qlocale/main.cpp index 337dbb6ad3..8c4e2573d5 100644 --- a/tests/manual/qlocale/main.cpp +++ b/tests/manual/qlocale/main.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ -#include +#include #include "window.h" diff --git a/tests/manual/qlocale/miscellaneous.h b/tests/manual/qlocale/miscellaneous.h index 2548f0d8f4..61ada8a00f 100644 --- a/tests/manual/qlocale/miscellaneous.h +++ b/tests/manual/qlocale/miscellaneous.h @@ -41,7 +41,7 @@ #ifndef MISCELLANEOUS_H #define MISCELLANEOUS_H -#include +#include class MiscWidget : public QWidget { diff --git a/tests/manual/qlocale/numberformats.h b/tests/manual/qlocale/numberformats.h index 8243d1177c..bcc352a818 100644 --- a/tests/manual/qlocale/numberformats.h +++ b/tests/manual/qlocale/numberformats.h @@ -41,7 +41,7 @@ #ifndef NUMBERFORMATS_H #define NUMBERFORMATS_H -#include +#include class NumberFormatsWidget : public QWidget { diff --git a/tests/manual/qlocale/qlocale.pro b/tests/manual/qlocale/qlocale.pro index 4eaddedcf0..a5a2766e65 100644 --- a/tests/manual/qlocale/qlocale.pro +++ b/tests/manual/qlocale/qlocale.pro @@ -1,2 +1,3 @@ +QT += widgets HEADERS += currency.h calendar.h dateformats.h numberformats.h languages.h window.h miscellaneous.h info.h SOURCES += currency.cpp main.cpp calendar.cpp dateformats.cpp numberformats.cpp languages.cpp window.cpp miscellaneous.cpp info.cpp diff --git a/tests/manual/qlocale/window.h b/tests/manual/qlocale/window.h index 1b2825aa5c..524ed97845 100644 --- a/tests/manual/qlocale/window.h +++ b/tests/manual/qlocale/window.h @@ -41,7 +41,7 @@ #ifndef WINDOW_H #define WINDOW_H -#include +#include #include "calendar.h" #include "currency.h" diff --git a/tests/manual/qnetworkaccessmanager/qget/qget.h b/tests/manual/qnetworkaccessmanager/qget/qget.h index bad4f5e4d2..978212dfa8 100644 --- a/tests/manual/qnetworkaccessmanager/qget/qget.h +++ b/tests/manual/qnetworkaccessmanager/qget/qget.h @@ -113,7 +113,9 @@ private slots: void finished(QNetworkReply *reply); void authenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator); void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *authenticator); +#ifndef QT_NO_SSL void sslErrors(QNetworkReply *reply, const QList &errors); +#endif void downloadFinished(TransferItem *item); private: TransferItem *findTransfer(QNetworkReply *reply); diff --git a/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro b/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro index 7ad271ce46..9e78f91621 100644 --- a/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro +++ b/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro @@ -5,6 +5,4 @@ TARGET = tst_qnetworkconfigurationmanager QT -= gui QT += network testlib -CONFIG += release - SOURCES += main.cpp diff --git a/tests/manual/qnetworkreply/qnetworkreply.pro b/tests/manual/qnetworkreply/qnetworkreply.pro index 17f48c6544..e29ea7856c 100644 --- a/tests/manual/qnetworkreply/qnetworkreply.pro +++ b/tests/manual/qnetworkreply/qnetworkreply.pro @@ -5,6 +5,4 @@ TARGET = tst_qnetworkreply QT -= gui QT += network testlib -CONFIG += release - SOURCES += main.cpp diff --git a/tests/manual/qtabletevent/device_information/device_information.pro b/tests/manual/qtabletevent/device_information/device_information.pro new file mode 100644 index 0000000000..727ad34bc1 --- /dev/null +++ b/tests/manual/qtabletevent/device_information/device_information.pro @@ -0,0 +1,6 @@ +QT += widgets +SOURCES += \ + main.cpp \ + tabletwidget.cpp +HEADERS += \ + tabletwidget.h diff --git a/tests/manual/qtabletevent/device_information/main.cpp b/tests/manual/qtabletevent/device_information/main.cpp index b4eea7875b..e551ae7d8a 100644 --- a/tests/manual/qtabletevent/device_information/main.cpp +++ b/tests/manual/qtabletevent/device_information/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include "tabletwidget.h" int main(int argc, char **argv) { diff --git a/tests/manual/qtabletevent/device_information/qtabletevent.pro b/tests/manual/qtabletevent/device_information/qtabletevent.pro deleted file mode 100644 index 8251d73094..0000000000 --- a/tests/manual/qtabletevent/device_information/qtabletevent.pro +++ /dev/null @@ -1,5 +0,0 @@ -SOURCES += \ - main.cpp \ - tabletwidget.cpp -HEADERS += \ - tabletwidget.h diff --git a/tests/manual/qtabletevent/event_compression/event_compression.pro b/tests/manual/qtabletevent/event_compression/event_compression.pro index fd2521e44f..15650d6190 100644 --- a/tests/manual/qtabletevent/event_compression/event_compression.pro +++ b/tests/manual/qtabletevent/event_compression/event_compression.pro @@ -1,4 +1,4 @@ -QT += testlib +QT += widgets testlib SOURCES += main.cpp \ mousestatwidget.cpp diff --git a/tests/manual/qtabletevent/qtabletevent.pro b/tests/manual/qtabletevent/qtabletevent.pro new file mode 100644 index 0000000000..9e9fc39654 --- /dev/null +++ b/tests/manual/qtabletevent/qtabletevent.pro @@ -0,0 +1,5 @@ +TEMPLATE=subdirs + +SUBDIRS = device_information \ + event_compression \ + regular_widgets diff --git a/tests/manual/qtabletevent/regular_widgets/regular_widgets.pro b/tests/manual/qtabletevent/regular_widgets/regular_widgets.pro index 9f0da76c11..8f1f4342ee 100644 --- a/tests/manual/qtabletevent/regular_widgets/regular_widgets.pro +++ b/tests/manual/qtabletevent/regular_widgets/regular_widgets.pro @@ -1,3 +1,4 @@ TEMPLATE = app +QT += widgets SOURCES += main.cpp diff --git a/tests/manual/qtbug-8933/main.cpp b/tests/manual/qtbug-8933/main.cpp index d60941da3a..d76a3a6334 100644 --- a/tests/manual/qtbug-8933/main.cpp +++ b/tests/manual/qtbug-8933/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include "widget.h" int main(int argc, char *argv[]) diff --git a/tests/manual/qtbug-8933/qtbug-8933.pro b/tests/manual/qtbug-8933/qtbug-8933.pro index 8b87c8346d..4600d47cac 100644 --- a/tests/manual/qtbug-8933/qtbug-8933.pro +++ b/tests/manual/qtbug-8933/qtbug-8933.pro @@ -6,7 +6,7 @@ TARGET = qtbug-8933 TEMPLATE = app - +QT += widgets SOURCES += main.cpp\ widget.cpp diff --git a/tests/manual/qtouchevent/main.cpp b/tests/manual/qtouchevent/main.cpp index 206413bfa2..80598e477b 100644 --- a/tests/manual/qtouchevent/main.cpp +++ b/tests/manual/qtouchevent/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include #include "ui_form.h" diff --git a/tests/manual/qtouchevent/qtouchevent.pro b/tests/manual/qtouchevent/qtouchevent.pro index de1ee06f9e..6339bceb42 100644 --- a/tests/manual/qtouchevent/qtouchevent.pro +++ b/tests/manual/qtouchevent/qtouchevent.pro @@ -1,4 +1,4 @@ -QT += testlib +QT += widgets testlib SOURCES = main.cpp \ touchwidget.cpp FORMS += form.ui diff --git a/tests/manual/qwidget_zorder/main.cpp b/tests/manual/qwidget_zorder/main.cpp index dadc089ce4..8c92ac86d7 100644 --- a/tests/manual/qwidget_zorder/main.cpp +++ b/tests/manual/qwidget_zorder/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include class Widget : public QWidget { diff --git a/tests/manual/qwidget_zorder/qwidget_zorder.pro b/tests/manual/qwidget_zorder/qwidget_zorder.pro index 28dcadcbfa..3523257f3e 100644 --- a/tests/manual/qwidget_zorder/qwidget_zorder.pro +++ b/tests/manual/qwidget_zorder/qwidget_zorder.pro @@ -1 +1,2 @@ +QT += widgets SOURCES += main.cpp diff --git a/tests/manual/repaint/mainwindow/main.cpp b/tests/manual/repaint/mainwindow/main.cpp index c6f0ac646f..08b600280a 100644 --- a/tests/manual/repaint/mainwindow/main.cpp +++ b/tests/manual/repaint/mainwindow/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include "../shared/shared.h" int main(int argc, char **argv) diff --git a/tests/manual/repaint/mainwindow/mainwindow.pro b/tests/manual/repaint/mainwindow/mainwindow.pro index db6b2d280c..f20e5fe402 100644 --- a/tests/manual/repaint/mainwindow/mainwindow.pro +++ b/tests/manual/repaint/mainwindow/mainwindow.pro @@ -1,2 +1,3 @@ +QT += widgets HEADERS += ../shared/shared.h SOURCES += main.cpp diff --git a/tests/manual/repaint/repaint.pro b/tests/manual/repaint/repaint.pro new file mode 100644 index 0000000000..7ad9d68260 --- /dev/null +++ b/tests/manual/repaint/repaint.pro @@ -0,0 +1,9 @@ +TEMPLATE=subdirs + +SUBDIRS = mainwindow \ + scrollarea \ + splitter \ + tableview \ + task141091 \ + toplevel \ + widget diff --git a/tests/manual/repaint/scrollarea/main.cpp b/tests/manual/repaint/scrollarea/main.cpp index 63fb755510..06d598d46b 100644 --- a/tests/manual/repaint/scrollarea/main.cpp +++ b/tests/manual/repaint/scrollarea/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include "../shared/shared.h" diff --git a/tests/manual/repaint/scrollarea/scrollarea.pro b/tests/manual/repaint/scrollarea/scrollarea.pro index db6b2d280c..f20e5fe402 100644 --- a/tests/manual/repaint/scrollarea/scrollarea.pro +++ b/tests/manual/repaint/scrollarea/scrollarea.pro @@ -1,2 +1,3 @@ +QT += widgets HEADERS += ../shared/shared.h SOURCES += main.cpp diff --git a/tests/manual/repaint/shared/shared.h b/tests/manual/repaint/shared/shared.h index 861d4178aa..3489c30cd8 100644 --- a/tests/manual/repaint/shared/shared.h +++ b/tests/manual/repaint/shared/shared.h @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include class StaticWidget : public QWidget { Q_OBJECT diff --git a/tests/manual/repaint/splitter/main.cpp b/tests/manual/repaint/splitter/main.cpp index 2c4ca1d4f3..d260f00bf1 100644 --- a/tests/manual/repaint/splitter/main.cpp +++ b/tests/manual/repaint/splitter/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include "../shared/shared.h" int main(int argc, char **argv) diff --git a/tests/manual/repaint/splitter/splitter.pro b/tests/manual/repaint/splitter/splitter.pro index db6b2d280c..f20e5fe402 100644 --- a/tests/manual/repaint/splitter/splitter.pro +++ b/tests/manual/repaint/splitter/splitter.pro @@ -1,2 +1,3 @@ +QT += widgets HEADERS += ../shared/shared.h SOURCES += main.cpp diff --git a/tests/manual/repaint/tableview/main.cpp b/tests/manual/repaint/tableview/main.cpp index dc25858681..227237a5e7 100644 --- a/tests/manual/repaint/tableview/main.cpp +++ b/tests/manual/repaint/tableview/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include "../shared/shared.h" class CellWidget : public QWidget diff --git a/tests/manual/repaint/tableview/tableview.pro b/tests/manual/repaint/tableview/tableview.pro index 4097c95739..6a5aaad251 100644 --- a/tests/manual/repaint/tableview/tableview.pro +++ b/tests/manual/repaint/tableview/tableview.pro @@ -1,2 +1,3 @@ +QT += widgets HEADERS +=../shared/shared.h SOURCES += main.cpp diff --git a/tests/manual/repaint/task141091/main.cpp b/tests/manual/repaint/task141091/main.cpp index b2f639d411..9090a2a29d 100644 --- a/tests/manual/repaint/task141091/main.cpp +++ b/tests/manual/repaint/task141091/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include class MyWidget : public QWidget diff --git a/tests/manual/repaint/task141091/task141091.pro b/tests/manual/repaint/task141091/task141091.pro index 82ead4b6c2..b54299e540 100644 --- a/tests/manual/repaint/task141091/task141091.pro +++ b/tests/manual/repaint/task141091/task141091.pro @@ -1,3 +1,3 @@ CONFIG += console - +QT += widgets SOURCES += main.cpp diff --git a/tests/manual/repaint/toplevel/main.cpp b/tests/manual/repaint/toplevel/main.cpp index cd43fa699c..6466fe80b2 100644 --- a/tests/manual/repaint/toplevel/main.cpp +++ b/tests/manual/repaint/toplevel/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include "../shared/shared.h" int main(int argc, char **argv) diff --git a/tests/manual/repaint/toplevel/toplevel.pro b/tests/manual/repaint/toplevel/toplevel.pro index c2cc19f67d..a881c24f56 100644 --- a/tests/manual/repaint/toplevel/toplevel.pro +++ b/tests/manual/repaint/toplevel/toplevel.pro @@ -1,4 +1,5 @@ CONFIG += console +QT += widgets HEADERS += ../shared/shared.h SOURCES += main.cpp diff --git a/tests/manual/repaint/widget/main.cpp b/tests/manual/repaint/widget/main.cpp index 64b9cc8a18..3ea557a642 100644 --- a/tests/manual/repaint/widget/main.cpp +++ b/tests/manual/repaint/widget/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include "../shared/shared.h" class Child : public StaticWidget diff --git a/tests/manual/repaint/widget/widget.pro b/tests/manual/repaint/widget/widget.pro index db6b2d280c..f20e5fe402 100644 --- a/tests/manual/repaint/widget/widget.pro +++ b/tests/manual/repaint/widget/widget.pro @@ -1,2 +1,3 @@ +QT += widgets HEADERS += ../shared/shared.h SOURCES += main.cpp diff --git a/tests/manual/socketengine/main.cpp b/tests/manual/socketengine/main.cpp index 48893f062d..349004a7d0 100644 --- a/tests/manual/socketengine/main.cpp +++ b/tests/manual/socketengine/main.cpp @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include @@ -97,7 +96,7 @@ int main(int argc, char**argv) // disconnected exit(0); } - bzero(buf, bufsize); + qFill(buf, buf + bufsize, 0); ret = socketEngine->read(buf, available); if (ret > 0) { printf("%s", buf); diff --git a/tests/manual/socketengine/socketengine.pro b/tests/manual/socketengine/socketengine.pro index 808502c22a..96831383ec 100644 --- a/tests/manual/socketengine/socketengine.pro +++ b/tests/manual/socketengine/socketengine.pro @@ -3,8 +3,6 @@ TEMPLATE = app TARGET = tst_socketengine QT -= gui -QT += network testlib - -CONFIG += release +QT += network-private core-private testlib SOURCES += main.cpp diff --git a/tests/manual/textrendering/glyphshaping/glyphshaping.pro b/tests/manual/textrendering/glyphshaping/glyphshaping.pro index 1d78aa3351..6500814423 100644 --- a/tests/manual/textrendering/glyphshaping/glyphshaping.pro +++ b/tests/manual/textrendering/glyphshaping/glyphshaping.pro @@ -1,3 +1,4 @@ +QT += widgets SOURCES = main.cpp OTHER_FILES = glyphshaping_data.xml glyphshaping_data.path = . diff --git a/tests/manual/textrendering/glyphshaping/main.cpp b/tests/manual/textrendering/glyphshaping/main.cpp index c41301f3fc..5a8cc4f12b 100644 --- a/tests/manual/textrendering/glyphshaping/main.cpp +++ b/tests/manual/textrendering/glyphshaping/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include static const int fontPixelSize = 25; static const QLatin1String fontFamily("Series 60 Sans"); diff --git a/tests/manual/textrendering/textperformance/main.cpp b/tests/manual/textrendering/textperformance/main.cpp index c6a0c73849..cff0c1afad 100644 --- a/tests/manual/textrendering/textperformance/main.cpp +++ b/tests/manual/textrendering/textperformance/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include static const int lastMeasurementsCount = 50; diff --git a/tests/manual/textrendering/textperformance/textperformance.pro b/tests/manual/textrendering/textperformance/textperformance.pro index bba41b9c12..f07a4f0294 100644 --- a/tests/manual/textrendering/textperformance/textperformance.pro +++ b/tests/manual/textrendering/textperformance/textperformance.pro @@ -1 +1,2 @@ +QT += widgets SOURCES = main.cpp diff --git a/tests/manual/textrendering/textrendering.pro b/tests/manual/textrendering/textrendering.pro new file mode 100644 index 0000000000..92f0741bf3 --- /dev/null +++ b/tests/manual/textrendering/textrendering.pro @@ -0,0 +1,4 @@ +TEMPLATE=subdirs + +SUBDIRS = glyphshaping \ + textperformance diff --git a/tests/manual/widgets/itemviews/delegate/delegate.pro b/tests/manual/widgets/itemviews/delegate/delegate.pro new file mode 100644 index 0000000000..e5c90f18ec --- /dev/null +++ b/tests/manual/widgets/itemviews/delegate/delegate.pro @@ -0,0 +1,3 @@ +TEMPLATE = app +QT += widgets +SOURCES=example.cpp diff --git a/tests/manual/widgets/itemviews/delegate/example.pro b/tests/manual/widgets/itemviews/delegate/example.pro deleted file mode 100644 index e9f2189272..0000000000 --- a/tests/manual/widgets/itemviews/delegate/example.pro +++ /dev/null @@ -1,2 +0,0 @@ -TEMPLATE = app -SOURCES=example.cpp diff --git a/tests/manual/windowflags/controllerwindow.cpp b/tests/manual/windowflags/controllerwindow.cpp index 69535b2856..586691a37d 100644 --- a/tests/manual/windowflags/controllerwindow.cpp +++ b/tests/manual/windowflags/controllerwindow.cpp @@ -39,7 +39,14 @@ ** ****************************************************************************/ -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "controllerwindow.h" @@ -72,7 +79,8 @@ ControllerWindow::ControllerWindow() mainLayout->addLayout(bottomLayout); setLayout(mainLayout); - setWindowTitle(tr("Window Flags")); + setWindowTitle(tr("Window Flags (Qt version %1, %2)") + .arg(QLatin1String(qVersion()), qApp->platformName())); updatePreview(); } diff --git a/tests/manual/windowflags/previewwindow.cpp b/tests/manual/windowflags/previewwindow.cpp index 601cc50efa..684d1ee1fe 100644 --- a/tests/manual/windowflags/previewwindow.cpp +++ b/tests/manual/windowflags/previewwindow.cpp @@ -39,7 +39,9 @@ ** ****************************************************************************/ -#include +#include +#include +#include #include "previewwindow.h" diff --git a/tests/manual/windowflags/windowflags.pro b/tests/manual/windowflags/windowflags.pro index 1b45d0d867..06def212b3 100644 --- a/tests/manual/windowflags/windowflags.pro +++ b/tests/manual/windowflags/windowflags.pro @@ -1,3 +1,5 @@ +QT += widgets + HEADERS = controllerwindow.h \ previewwindow.h SOURCES = controllerwindow.cpp \ diff --git a/tests/manual/windowmodality/modality.pro b/tests/manual/windowmodality/modality.pro deleted file mode 100644 index 973579c508..0000000000 --- a/tests/manual/windowmodality/modality.pro +++ /dev/null @@ -1,3 +0,0 @@ -SOURCES = main.cpp -FORMS = widget.ui dialog.ui -QT += widgets printsupport diff --git a/tests/manual/windowmodality/windowmodality.pro b/tests/manual/windowmodality/windowmodality.pro new file mode 100644 index 0000000000..973579c508 --- /dev/null +++ b/tests/manual/windowmodality/windowmodality.pro @@ -0,0 +1,3 @@ +SOURCES = main.cpp +FORMS = widget.ui dialog.ui +QT += widgets printsupport -- cgit v1.2.3 From 4b668da75025cfe00dd7a307c19f05dabc2efb7c Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 12 Apr 2012 15:34:24 +0200 Subject: Do not ignore tests/auto/corelib/io/qfile on Mac OS X This does not fail anymore, remove CONFIG+=insignificant_test Change-Id: I4f98cfad563adfa460910976317c91e852db6872 Reviewed-by: Jason McDonald --- tests/auto/corelib/io/qfile/test/test.pro | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/corelib/io/qfile/test/test.pro b/tests/auto/corelib/io/qfile/test/test.pro index dab5e4a3a5..676762da81 100644 --- a/tests/auto/corelib/io/qfile/test/test.pro +++ b/tests/auto/corelib/io/qfile/test/test.pro @@ -10,5 +10,3 @@ TESTDATA += ../dosfile.txt ../noendofline.txt ../testfile.txt \ ../resources/file1.ext1 win32: LIBS+=-lole32 -luuid - -mac*:CONFIG+=insignificant_test -- cgit v1.2.3 From 20a36364eb8949f009644bf537e7f6b8cbe81467 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 12 Apr 2012 15:50:26 +0200 Subject: Do not ignore tests/auto/corelib/io/qiodevice on Mac OS X This test no longer fails, so we can remove CONFIG+=insignificant_test Task-number: QTBUG-22766 Change-Id: I379873d5c483157e414201e5f8a13c3f4407f9fd Reviewed-by: Jason McDonald --- tests/auto/corelib/io/qiodevice/qiodevice.pro | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/corelib/io/qiodevice/qiodevice.pro b/tests/auto/corelib/io/qiodevice/qiodevice.pro index a8295ec79b..c98e3fb8c3 100644 --- a/tests/auto/corelib/io/qiodevice/qiodevice.pro +++ b/tests/auto/corelib/io/qiodevice/qiodevice.pro @@ -5,5 +5,3 @@ SOURCES = tst_qiodevice.cpp TESTDATA += tst_qiodevice.cpp MOC_DIR=tmp - -mac: CONFIG += insignificant_test # QTBUG-22766 -- cgit v1.2.3 From a387fd8ee35d6789eb718ee28bcb373891ccff61 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 12 Apr 2012 15:55:20 +0200 Subject: Do not ignore tests/auto/corelib/io/qtextstream on Mac OS X This test no longer fails, so we can remove CONFIG+=insignificant_test Task-number: QTBUG-22767 Change-Id: If3ca194fc982ad8fdc3e9a7f62fc346190ff01ea Reviewed-by: Jason McDonald --- tests/auto/corelib/io/qtextstream/test/test.pro | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/corelib/io/qtextstream/test/test.pro b/tests/auto/corelib/io/qtextstream/test/test.pro index 577f52972d..93fb6d232f 100644 --- a/tests/auto/corelib/io/qtextstream/test/test.pro +++ b/tests/auto/corelib/io/qtextstream/test/test.pro @@ -19,5 +19,3 @@ TESTDATA += \ ../qtextstream.qrc \ ../tst_qtextstream.cpp \ ../resources - -mac: CONFIG += insignificant_test # QTBUG-22767 -- cgit v1.2.3 From b7486591cd114351c755b9e8b2bfe5d175461ec9 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Fri, 13 Apr 2012 15:14:35 +1000 Subject: test: marked tst_qlocale as insignificant on Windows This test hangs 2-3% of the time. Task-number: QTBUG-25284 Change-Id: I32e01696262be2de7e015b8f811d1666551426cc Reviewed-by: Toby Tomkins --- tests/auto/corelib/tools/qlocale/test/test.pro | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/auto/corelib/tools/qlocale/test/test.pro b/tests/auto/corelib/tools/qlocale/test/test.pro index 24dcc0638a..28e127e307 100644 --- a/tests/auto/corelib/tools/qlocale/test/test.pro +++ b/tests/auto/corelib/tools/qlocale/test/test.pro @@ -17,3 +17,4 @@ load(testcase) # for target.path and installTestHelperApp() installTestHelperApp("../syslocaleapp/syslocaleapp",syslocaleapp,syslocaleapp) mac: CONFIG += insignificant_test # QTBUG-22769 +win32:CONFIG+= insignificant_test # QTBUG-25284 -- cgit v1.2.3 From d1329e43cbb243f3b28d172569befc0c28f49b8b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 11 Apr 2012 14:10:12 +0200 Subject: moc: fix compilation of signals returning pointers. That was a regression introduced in 1c5db1aff Example: signals: int *someSignal(); would produce this code: int* _t0 = int*(); which does not compile So have special handling for pointer to change it to '= 0' Change-Id: Ie695e15e309d15c3cfd5c5a69ac8bf6d61ae9915 Reviewed-by: Stephen Kelly --- tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index a6ad1d53bc..f7f13e65ea 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -4904,6 +4904,8 @@ signals: int returnInt(int); void returnVoid(int); CustomType returnCustomType(int); + + QObject *returnPointer(); public slots: QVariant returnVariantSlot(int i) { return i; } QString returnStringSlot(int i) { return QString::number(i); } @@ -4912,6 +4914,8 @@ public slots: void returnVoidSlot() {} int return23() { return 23; } QString returnHello() { return QStringLiteral("hello"); } + QObject *returnThisSlot1() { return this; } + ReturnValue *returnThisSlot2() { return this; } public: struct VariantFunctor { QVariant operator()(int i) { return i; } @@ -4964,6 +4968,7 @@ void tst_QObject::returnValue() QCOMPARE(emit r.returnInt(45), int()); emit r.returnVoid(45); QCOMPARE((emit r.returnCustomType(45)).value(), CustomType().value()); + QCOMPARE((emit r.returnPointer()), static_cast(0)); } { // connected to a slot returning the same type CheckInstanceCount checker; @@ -4976,6 +4981,8 @@ void tst_QObject::returnValue() QCOMPARE(emit r.returnInt(45), int(45)); QVERIFY(connect(&r, &ReturnValue::returnCustomType, &receiver, &ReturnValue::returnCustomTypeSlot, type)); QCOMPARE((emit r.returnCustomType(45)).value(), CustomType(45).value()); + QVERIFY(connect(&r, &ReturnValue::returnPointer, &receiver, &ReturnValue::returnThisSlot1, type)); + QCOMPARE((emit r.returnPointer()), static_cast(&receiver)); } if (!isBlockingQueued) { // connected to simple functions or functor CheckInstanceCount checker; @@ -5004,6 +5011,8 @@ void tst_QObject::returnValue() QCOMPARE((emit r.returnCustomType(48)).value(), CustomType(48).value()); QVERIFY(connect(&r, &ReturnValue::returnVoid, &receiver, &ReturnValue::returnCustomTypeSlot, type)); emit r.returnVoid(48); + QVERIFY(connect(&r, &ReturnValue::returnPointer, &receiver, &ReturnValue::returnThisSlot2, type)); + QCOMPARE((emit r.returnPointer()), static_cast(&receiver)); } if (!isBlockingQueued) { // connected to functor with different type CheckInstanceCount checker; @@ -5028,6 +5037,8 @@ void tst_QObject::returnValue() QCOMPARE(emit r.returnInt(45), int()); QVERIFY(connect(&r, &ReturnValue::returnCustomType, &receiver, &ReturnValue::returnVoidSlot, type)); QCOMPARE((emit r.returnCustomType(45)).value(), CustomType().value()); + QVERIFY(connect(&r, &ReturnValue::returnPointer, &receiver, &ReturnValue::returnVoidSlot, type)); + QCOMPARE((emit r.returnPointer()), static_cast(0)); } if (!isBlockingQueued) { // queued connection should not forward the return value @@ -5041,6 +5052,9 @@ void tst_QObject::returnValue() QCOMPARE(emit r.returnInt(45), int()); QVERIFY(connect(&r, &ReturnValue::returnCustomType, &receiver, &ReturnValue::returnCustomTypeSlot, Qt::QueuedConnection)); QCOMPARE((emit r.returnCustomType(45)).value(), CustomType().value()); + QVERIFY(connect(&r, &ReturnValue::returnPointer, &receiver, &ReturnValue::returnThisSlot1, Qt::QueuedConnection)); + QCOMPARE((emit r.returnPointer()), static_cast(0)); + QCoreApplication::processEvents(); QVERIFY(connect(&r, &ReturnValue::returnVariant, &receiver, &ReturnValue::returnStringSlot, Qt::QueuedConnection)); -- cgit v1.2.3 From 58ac4658c17ae120856235bd23727564cd4f67e2 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Wed, 11 Apr 2012 20:08:29 +0200 Subject: test: Re-enabling tst_QScrollBar::task_209492() on Mac MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This test has been XPASS'ing since a long time now. Change-Id: Ibfcd1b5078e0b8efed9ed0740a4238d24ef8ca33 Reviewed-by: Rohan McGovern Reviewed-by: Morten Johan Sørvig Reviewed-by: Bradley T. Hughes --- tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'tests') diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp index 688daf1f8a..ec48c2b680 100644 --- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp +++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp @@ -136,9 +136,6 @@ void tst_QScrollBar::task_209492() QApplication::sendEvent(verticalScrollBar, &mouseReleaseEvent); // Check that the action was triggered once. -#ifdef Q_OS_MAC - QEXPECT_FAIL("", "Fix does does not work on Mac due to paint architechure differences.", Abort); -#endif QCOMPARE(scrollArea.scrollCount, 1); QCOMPARE(spy.count(), 1); } -- cgit v1.2.3 From 9fd2edb6da5f1f6d644cd7c3f35aebe3e88beee2 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Thu, 12 Apr 2012 18:21:39 +0300 Subject: replace hardcoded values with a surrogate handling methods Change-Id: Ib41e08d835f2e8ca2e32b4025c6f5a99840f2e27 Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll --- tests/benchmarks/corelib/tools/qstring/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp index 40300af947..9f9e7e41d5 100644 --- a/tests/benchmarks/corelib/tools/qstring/main.cpp +++ b/tests/benchmarks/corelib/tools/qstring/main.cpp @@ -1996,7 +1996,7 @@ int fromUtf8_qt47(ushort *dst, const char *chars, int len) bool nonCharacter; if (!headerdone && uc == 0xfeff) { // don't do anything, just skip the BOM - } else if (!(nonCharacter = isUnicodeNonCharacter(uc)) && uc > 0xffff && uc < 0x110000) { + } else if (!(nonCharacter = isUnicodeNonCharacter(uc)) && QChar::requiresSurrogates(uc) && uc < 0x110000) { // surrogate pair //Q_ASSERT((qch - (ushort*)result.unicode()) + 2 < result.length()); *qch++ = QChar::highSurrogate(uc); @@ -2102,7 +2102,7 @@ int fromUtf8_qt47_stateless(ushort *dst, const char *chars, int len) bool nonCharacter; if (!headerdone && uc == 0xfeff) { // don't do anything, just skip the BOM - } else if (!(nonCharacter = isUnicodeNonCharacter(uc)) && uc > 0xffff && uc < 0x110000) { + } else if (!(nonCharacter = isUnicodeNonCharacter(uc)) && QChar::requiresSurrogates(uc) && uc < 0x110000) { // surrogate pair //Q_ASSERT((qch - (ushort*)result.unicode()) + 2 < result.length()); *qch++ = QChar::highSurrogate(uc); @@ -2258,7 +2258,7 @@ static inline void extract_utf8_multibyte(ushort *&dst, const char *&chars, qptr // dst[counter] will correspond to chars[counter..counter+2], so adjust chars += 3; len -= 3; - if (trusted || (ucs >= 0x10000 && ucs < 0x110000 && !isUnicodeNonCharacter(ucs))) { + if (trusted || (QChar::requiresSurrogates(ucs) && ucs < 0x110000 && !isUnicodeNonCharacter(ucs))) { dst[counter + 0] = QChar::highSurrogate(ucs); dst[counter + 1] = QChar::lowSurrogate(ucs); counter += 2; -- cgit v1.2.3 From 87548de2ef2313f628d1ddf10ae0cebea74838b2 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Thu, 12 Apr 2012 12:23:46 +0200 Subject: test: Don't mark tst_qscrollbar as insignificant on Mac OS X Just XFAIL the failing test instead of ignoring the whole test. Task-number: QTBUG-25272 Change-Id: Iedca9913032f13c6610b049a0313c9e4336216e0 Reviewed-by: Bradley T. Hughes --- tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro | 2 -- tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro b/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro index e9436eccdc..2863dd2034 100644 --- a/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro +++ b/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro @@ -2,5 +2,3 @@ CONFIG += testcase TARGET = tst_qscrollbar QT += widgets testlib SOURCES += tst_qscrollbar.cpp - -mac*:CONFIG+=insignificant_test diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp index ec48c2b680..f568322ab7 100644 --- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp +++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp @@ -99,6 +99,9 @@ void tst_QScrollBar::scrollSingleStep() QTest::mouseClick(testWidget, Qt::LeftButton, Qt::NoModifier, QPoint(sr.x(), sr.y())); QTest::qWait(510); // initial delay is 500 for setRepeatAction disconnect(testWidget, SIGNAL(actionTriggered(int)), 0, 0); +#ifdef Q_OS_MAC + QEXPECT_FAIL("", "This test fails on Mac OS X, see QTBUG-25272", Abort); +#endif QCOMPARE(testWidget->value(), testWidget->singleStep()); } -- cgit v1.2.3 From 80c28fe3bd1ac62d1c29ce7e567145aea57ae8ff Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 9 Apr 2012 01:38:43 +0100 Subject: QRegularExpression: add more test data Change-Id: I44d19f976ced7b073f66d0ea943fafea37940c48 Reviewed-by: Jason McDonald Reviewed-by: Rohan McGovern --- .../qregularexpression/tst_qregularexpression.cpp | 111 +++++++++++++++++++++ 1 file changed, 111 insertions(+) (limited to 'tests') diff --git a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp index a4c04d6207..f1de1722e2 100644 --- a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp +++ b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp @@ -637,6 +637,52 @@ void tst_QRegularExpression::normalMatch_data() << 0 << QRegularExpression::MatchOptions(QRegularExpression::AnchoredMatchOption) << m; + + // *** + + m.clear(); + m.isValid = true; m.hasMatch = true; + m.captured << "678"; + QTest::newRow("negativeoffset01") << QRegularExpression("\\d+") + << "abc123def678ghi" + << -6 + << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) + << m; + + m.clear(); + m.isValid = true; m.hasMatch = true; + m.captured << "678"; + QTest::newRow("negativeoffset02") << QRegularExpression("\\d+") + << "abc123def678ghi" + << -8 + << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) + << m; + + m.clear(); + m.isValid = true; m.hasMatch = true; + m.captured << "678ghi" << "678" << "ghi"; + QTest::newRow("negativeoffset03") << QRegularExpression("(\\d+)(\\w+)") + << "abc123def678ghi" + << -8 + << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) + << m; + + m.clear(); + m.isValid = true; + QTest::newRow("negativeoffset04") << QRegularExpression("\\d+") + << "abc123def678ghi" + << -3 + << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) + << m; + + m.clear(); + m.isValid = true; m.hasMatch = true; + m.captured << "678"; + QTest::newRow("negativeoffset05") << QRegularExpression("^\\d+", QRegularExpression::MultilineOption) + << "a\nbc123\ndef\n678gh\ni" + << -10 + << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) + << m; } @@ -956,6 +1002,31 @@ void tst_QRegularExpression::globalMatch_data() << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << matchList; + matchList.clear(); + m.clear(); + m.isValid = true; m.hasMatch = true; + m.captured = QStringList() << "ACA""GTG""CGA""AAA"; + matchList << m; + m.captured = QStringList() << "AAA"; + matchList << m; + m.captured = QStringList() << "AAG""GAA""AAG""AAA"; + matchList << m; + m.captured = QStringList() << "AAA"; + matchList << m; + QTest::newRow("globalmatch03") << QRegularExpression("\\G(?:\\w\\w\\w)*?AAA") + << "ACA""GTG""CGA""AAA""AAA""AAG""GAA""AAG""AAA""AAA" + << 0 + << QRegularExpression::NormalMatch + << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) + << matchList; + + QTest::newRow("globalmatch04") << QRegularExpression("(?:\\w\\w\\w)*?AAA") + << "ACA""GTG""CGA""AAA""AAA""AAG""GAA""AAG""AAA""AAA" + << 0 + << QRegularExpression::NormalMatch + << QRegularExpression::MatchOptions(QRegularExpression::AnchoredMatchOption) + << matchList; + matchList.clear(); m.clear(); m.isValid = true; m.hasMatch = true; @@ -1103,6 +1174,46 @@ void tst_QRegularExpression::globalMatch_data() << QRegularExpression::NormalMatch << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) << matchList; + + matchList.clear(); + m.clear(); + m.isValid = true; m.hasMatch = true; + m.captured = QStringList() << "ABC"; + matchList << m; + m.captured = QStringList() << ""; + matchList << m; + m.captured = QStringList() << "DEF"; + matchList << m; + m.captured = QStringList() << ""; + matchList << m; + m.captured = QStringList() << "GHI"; + matchList << m; + m.captured = QStringList() << ""; + matchList << m; + QTest::newRow("globalmatch_emptycaptures07") << QRegularExpression("[\\x{0000}-\\x{FFFF}]*") + << QString::fromUtf8("ABC""\xf0\x9d\x85\x9d""DEF""\xf0\x9d\x85\x9e""GHI") + << 0 + << QRegularExpression::NormalMatch + << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) + << matchList; + + matchList.clear(); + m.clear(); + m.isValid = true; m.hasMatch = true; + m.captured = QStringList() << QString::fromUtf8("ABC""\xc3\x80"); + matchList << m; + m.captured = QStringList() << ""; + matchList << m; + m.captured = QStringList() << QString::fromUtf8("\xc3\x80""DEF""\xc3\x80"); + matchList << m; + m.captured = QStringList() << ""; + matchList << m; + QTest::newRow("globalmatch_emptycaptures08") << QRegularExpression("[\\x{0000}-\\x{FFFF}]*") + << QString::fromUtf8("ABC""\xc3\x80""\xf0\x9d\x85\x9d""\xc3\x80""DEF""\xc3\x80") + << 0 + << QRegularExpression::NormalMatch + << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption) + << matchList; } void tst_QRegularExpression::globalMatch() -- cgit v1.2.3 From bfcfbc592c47a855c05929cfd6649003c16698c3 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 12 Apr 2012 18:42:51 +0100 Subject: re-enable qabstractnetworkcache autotest I have run the test 250 times in each of these configs with no crashes observed, so assuming the instability has been fixed by another change. ubuntu 11.10 64 bit ubuntu 10.04 32 bit windows 7 msvc2010 64 bit (debug) windows 7 msvc2010 32 bit (release) Task-number: QTBUG-20686 Change-Id: I02bab165c263cf79684c7723eae1e278839b1e37 Reviewed-by: Jason McDonald --- .../auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro | 1 - 1 file changed, 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro b/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro index ef47a4b458..69062bc0c9 100644 --- a/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro +++ b/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro @@ -6,4 +6,3 @@ SOURCES += tst_qabstractnetworkcache.cpp TESTDATA += tests/* -CONFIG += insignificant_test # QTBUG-20686; note, assumed unstable on all platforms -- cgit v1.2.3 From cdc221ae00260c1bea196e2728eb20b83db19bbe Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 12 Apr 2012 13:59:03 +0200 Subject: Fix warnings in manual tests. - Constructor order. - Unused variables. - size_t -> int conversions. Change-Id: Ic5b016f41d01a4d8153ae0900b607bf946523c1d Reviewed-by: Jason McDonald --- tests/manual/network_stresstest/minihttpserver.cpp | 2 +- tests/manual/network_stresstest/tst_network_stresstest.cpp | 2 +- tests/manual/qgraphicsitemgroup/customitem.cpp | 2 +- tests/manual/qgraphicslayout/flicker/window.h | 4 ++-- tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp | 6 +++--- tests/manual/qtabletevent/device_information/tabletwidget.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/manual/network_stresstest/minihttpserver.cpp b/tests/manual/network_stresstest/minihttpserver.cpp index e3473a3141..1bafe9363d 100644 --- a/tests/manual/network_stresstest/minihttpserver.cpp +++ b/tests/manual/network_stresstest/minihttpserver.cpp @@ -148,7 +148,7 @@ void MiniHttpServerConnection::handlePendingRequest() return; } - QUrl uri = QUrl::fromEncoded(request.mid(4, eol - strlen(http11) - 4)); + QUrl uri = QUrl::fromEncoded(request.mid(4, eol - int(strlen(http11)) - 4)); source.setFileName(":" + uri.path()); // connection-close? diff --git a/tests/manual/network_stresstest/tst_network_stresstest.cpp b/tests/manual/network_stresstest/tst_network_stresstest.cpp index 38a516af82..74237ea9cc 100644 --- a/tests/manual/network_stresstest/tst_network_stresstest.cpp +++ b/tests/manual/network_stresstest/tst_network_stresstest.cpp @@ -537,7 +537,7 @@ void tst_NetworkStressTest::blockingMultipleRequests() qWarning() << "no content-length:" << QString(buffer); break; } - pos += strlen("\r\ncontent-length: "); + pos += int(strlen("\r\ncontent-length: ")); int eol = buffer.indexOf("\r\n", pos + 2); if (eol == -1) { diff --git a/tests/manual/qgraphicsitemgroup/customitem.cpp b/tests/manual/qgraphicsitemgroup/customitem.cpp index 6f3f1e0522..eab218e9a0 100644 --- a/tests/manual/qgraphicsitemgroup/customitem.cpp +++ b/tests/manual/qgraphicsitemgroup/customitem.cpp @@ -80,7 +80,7 @@ CustomGroup::CustomGroup() : setFlag(QGraphicsItem::ItemIsSelectable); } -void CustomGroup::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +void CustomGroup::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *) { if (option->state & QStyle::State_Selected) painter->setOpacity(1.); diff --git a/tests/manual/qgraphicslayout/flicker/window.h b/tests/manual/qgraphicslayout/flicker/window.h index 3b032c3b45..51bf0e0733 100644 --- a/tests/manual/qgraphicslayout/flicker/window.h +++ b/tests/manual/qgraphicslayout/flicker/window.h @@ -46,8 +46,8 @@ #include struct Statistics { - Statistics() : output(0), - setGeometryCount(0), currentBenchmarkIteration(0), relayoutClicked(false), sleepMsecs(0) + Statistics() : setGeometryCount(0), sleepMsecs(0), output(0), + currentBenchmarkIteration(0), relayoutClicked(false) { } QMap setGeometryTracker; diff --git a/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp b/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp index e3ba3ca88f..5eab6d43bd 100644 --- a/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp +++ b/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp @@ -83,7 +83,7 @@ void DownloadManager::upload(const QUrl &url, const QString &user, const QString connect(ul, SIGNAL(downloadFinished(TransferItem*)), SLOT(downloadFinished(TransferItem*))); } -void DownloadManager::finished(QNetworkReply *reply) +void DownloadManager::finished(QNetworkReply *) { } @@ -121,7 +121,7 @@ void DownloadManager::authenticationRequired(QNetworkReply *reply, QAuthenticato qDebug() << "authenticationRequired" << reply; TransferItem *transfer = findTransfer(reply); //provide the credentials exactly once, so that it fails if credentials are incorrect. - if (transfer && !transfer->user.isEmpty() || !transfer->password.isEmpty()) { + if ((transfer && !transfer->user.isEmpty()) || !transfer->password.isEmpty()) { auth->setUser(transfer->user); auth->setPassword(transfer->password); transfer->user.clear(); @@ -129,7 +129,7 @@ void DownloadManager::authenticationRequired(QNetworkReply *reply, QAuthenticato } } -void DownloadManager::proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth) +void DownloadManager::proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth) { //provide the credentials exactly once, so that it fails if credentials are incorrect. if (!proxyUser.isEmpty() || !proxyPassword.isEmpty()) { diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.cpp b/tests/manual/qtabletevent/device_information/tabletwidget.cpp index d12da6c886..bc0c63bbb1 100644 --- a/tests/manual/qtabletevent/device_information/tabletwidget.cpp +++ b/tests/manual/qtabletevent/device_information/tabletwidget.cpp @@ -94,7 +94,7 @@ bool TabletWidget::eventFilter(QObject *, QEvent *ev) return false; } -void TabletWidget::paintEvent(QPaintEvent *event) +void TabletWidget::paintEvent(QPaintEvent *) { QPainter painter(this); -- cgit v1.2.3 From cf52540dfbf320e3d5cb9f7546542233c170af80 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Thu, 12 Apr 2012 12:49:03 +0200 Subject: QTBUG-1363: fix QSqlField.length() for ODBC Applied Bill King's suggestion in QTBUG-1363. Columns of hStmt must be accessed in order. Verified using ODBC driver on SQL Server 2005 on Windows 7. Added test for length of text field for MS SQL Server over ODBC. Task-Id: QTBUG-1363 Change-Id: I6673dafe75e3ef394d41e439adb45096c1421068 Reviewed-by: Bill King Reviewed-by: Mark Brand --- tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp index 68a347ebdb..7d34981a73 100644 --- a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp +++ b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp @@ -129,6 +129,10 @@ void tst_QSqlDriver::record() QSqlRecord rec = db.driver()->record(tablename); QCOMPARE(rec.count(), 4); + // QTBUG-1363: QSqlField::length() always return -1 when using QODBC3 driver and QSqlDatabase::record() + if (db.driverName().startsWith("QODBC") && tst_Databases::isSqlServer(db)) + QCOMPARE(rec.field(1).length(), 20); + if (db.driverName().startsWith("QIBASE")|| db.driverName().startsWith("QOCI") || db.driverName().startsWith("QDB2")) for(int i = 0; i < fields.count(); ++i) fields[i] = fields[i].toUpper(); -- cgit v1.2.3 From eb52d31ddf59d43c2f8cd1e85613b60213fd6696 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 20 Jan 2012 19:07:54 +0100 Subject: Update accessibility selections in QTextControl. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Forwardport from Qt 4. Change-Id: Iae0c2792b64b8ec2736a9ff621cf7c313a394093 Reviewed-by: Jan-Arve Sæther (cherry picked from commit d5649547d641b9c5af3c3f814caf8e1ab5bf9f47) --- tests/auto/other/qaccessibility/tst_qaccessibility.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index fa8d45c203..8384c9a295 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -1590,6 +1590,22 @@ void tst_QAccessibility::textEditTest() iface->editableTextInterface()->cutText(12, 16); QCOMPARE(QApplication::clipboard()->text(), QLatin1String("how ")); QCOMPARE(iface->textInterface()->text(12, 15), QLatin1String("are")); + + QTestAccessibility::clearEvents(); + + // select text + QTextCursor c = edit.textCursor(); + c.setPosition(2); + c.setPosition(4, QTextCursor::KeepAnchor); + edit.setTextCursor(c); + QAccessibleTextSelectionEvent sel(&edit, 2, 4); + QVERIFY_EVENT(&sel); + + edit.selectAll(); + int end = edit.textCursor().position(); + sel.setCursorPosition(end); + sel.setSelection(0, end); + QVERIFY_EVENT(&sel); } QTestAccessibility::clearEvents(); } @@ -1923,7 +1939,6 @@ void tst_QAccessibility::lineEditTest() QVERIFY_EVENT(&cursor); lineEdit->setText("foo"); - qDebug() << QTestAccessibility::events(); cursorEvent.setCursorPosition(3); QVERIFY_EVENT(&cursorEvent); -- cgit v1.2.3 From 70cb9598af116360702eb71868957400f67d8003 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Sat, 14 Apr 2012 14:19:45 -0700 Subject: Fix tst_QMdiSubWindow::emittingOfSignals CI failures The test fails consistently on the CI (but never fails on any of the developer machines). This is possibly a timing issue. Change-Id: Ie40d9c38c3128a93898b0e50bfde5a754bd2b7fb Reviewed-by: Giuseppe D'Angelo Reviewed-by: Robin Burchell --- tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp index 53e0a5494a..eb433786f2 100644 --- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp +++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp @@ -98,10 +98,9 @@ static inline void triggerSignal(QMdiSubWindow *window, QMdiArea *workspace, window->showMaximized(); qApp->processEvents(); window->showNormal(); - qApp->processEvents(); - QVERIFY(!window->isMinimized()); - QVERIFY(!window->isMaximized()); - QVERIFY(!window->isShaded()); + QTRY_VERIFY(!window->isMinimized()); + QTRY_VERIFY(!window->isMaximized()); + QTRY_VERIFY(!window->isShaded()); } else if (signal == SIGNAL(aboutToActivate())) { if (window->parent()) { workspace->setActiveSubWindow(window); -- cgit v1.2.3 From 73b24486edd6b64165821bfb587cec9c9b078796 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Tue, 10 Apr 2012 23:39:40 +0300 Subject: UCD-5.0: apply Corrigendum #6 http://unicode.org/versions/corrigendum6.html: > in Unicode 5.0, the list of characters with the Bidi_Mirrored property > was made consistent for brackets and quotation marks, in preparation for > new constraints on bidi mirroring. However, after publication of > Unicode 5.0.0 it was discovered that this change adversely affected > several quotation mark characters in deployed data. Task-number: QTBUG-25169 Change-Id: Id49caf401af2d5a1e6dbcc32b2f350aa20b7f901 Reviewed-by: Lars Knoll --- tests/auto/corelib/tools/qchar/tst_qchar.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tests') diff --git a/tests/auto/corelib/tools/qchar/tst_qchar.cpp b/tests/auto/corelib/tools/qchar/tst_qchar.cpp index 6632776a86..14c43d0088 100644 --- a/tests/auto/corelib/tools/qchar/tst_qchar.cpp +++ b/tests/auto/corelib/tools/qchar/tst_qchar.cpp @@ -77,6 +77,7 @@ private slots: void joining(); void combiningClass(); void digitValue(); + void mirroredChar(); void decomposition(); void lineBreakClass(); void normalization_data(); @@ -528,6 +529,26 @@ void tst_QChar::digitValue() QVERIFY(QChar::digitValue((uint)UNICODE_LAST_CODEPOINT + 1) == -1); } +void tst_QChar::mirroredChar() +{ + QVERIFY(QChar(0x169B).hasMirrored()); + QVERIFY(QChar(0x169B).mirroredChar() == QChar(0x169C)); + QVERIFY(QChar(0x169C).hasMirrored()); + QVERIFY(QChar(0x169C).mirroredChar() == QChar(0x169B)); + + QVERIFY(QChar(0x301A).hasMirrored()); + QVERIFY(QChar(0x301A).mirroredChar() == QChar(0x301B)); + QVERIFY(QChar(0x301B).hasMirrored()); + QVERIFY(QChar(0x301B).mirroredChar() == QChar(0x301A)); + + if (QChar::currentUnicodeVersion() <= QChar::Unicode_5_0) { + QVERIFY(!QChar(0x201C).hasMirrored()); + QVERIFY(QChar(0x201C).mirroredChar() != QChar(0x201D)); + QVERIFY(!QChar(0x201D).hasMirrored()); + QVERIFY(QChar(0x201D).mirroredChar() != QChar(0x201C)); + } +} + void tst_QChar::decomposition() { QVERIFY(QChar((ushort)0xa0).decompositionTag() == QChar::NoBreak); -- cgit v1.2.3 From d2090e19a93fca9b5015d3a6978d7079e1414e13 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 10 Apr 2012 13:38:41 +0200 Subject: moc: Fix parsing of the empty preprocessor command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When encountering a null preprocessing directive (which is supposed to be ignored), the moc preprocessor will leave a PP_NEWLINE token in the token stream. That will confuse the parser. The PP_NEWLINE token need to be ignored in the preprocessing phase. Task-number: QTBUG-22717 Change-Id: I1e502a7e5bc6fa8ce2f82109ba7199b95747ff0a Reviewed-by: João Abecasis Reviewed-by: Bradley T. Hughes --- tests/auto/tools/moc/tst_moc.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 49095048bf..ecd9dc599e 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -368,6 +368,13 @@ signals: void signalInIf3(); #endif +# //QTBUG-22717 + # /* */ +# + + # \ + +// public slots: void const slotWithSillyConst() {} -- cgit v1.2.3 From 73db181e83c305b34c34d0aba914a1faffd8942e Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 13 Apr 2012 17:59:37 +1000 Subject: Put bug numbers on same line as insignificant_test markers. This makes it easier to find insignificant tests that have no associated bug report. Change-Id: Ia71d59da062818d3860b0365d063e044705267fd Reviewed-by: Rohan McGovern --- tests/auto/network/access/qftp/qftp.pro | 2 +- tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro | 3 +-- tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro | 2 +- tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro | 3 +-- tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro | 3 +-- tests/auto/widgets/itemviews/qtreeview/qtreeview.pro | 3 +-- tests/auto/widgets/widgets/qcombobox/qcombobox.pro | 3 +-- tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro | 3 +-- tests/auto/widgets/widgets/qmenubar/qmenubar.pro | 3 +-- 9 files changed, 9 insertions(+), 16 deletions(-) (limited to 'tests') diff --git a/tests/auto/network/access/qftp/qftp.pro b/tests/auto/network/access/qftp/qftp.pro index 0f5bd5fe17..7fdf3a46f0 100644 --- a/tests/auto/network/access/qftp/qftp.pro +++ b/tests/auto/network/access/qftp/qftp.pro @@ -14,4 +14,4 @@ wince*: { DEFINES += SRCDIR=\\\"$$PWD/\\\" } -CONFIG+=insignificant_test # uses live qt-test-server, inherently unstable +CONFIG+=insignificant_test # QTBUG-15111: uses live qt-test-server, inherently unstable diff --git a/tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro b/tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro index 389c8ca4dc..9e37aec5ce 100644 --- a/tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro +++ b/tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro @@ -10,7 +10,6 @@ MOC_DIR=tmp QT = core-private network-private testlib -# QTBUG-23380 - udpTest failing on Ubuntu 11.10 x64 -linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test +linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test # QTBUG-23380 requires(contains(QT_CONFIG,private_tests)) diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro index 2f479151dc..59ad89ed1f 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro @@ -7,6 +7,6 @@ QT += core-private gui-private SOURCES += tst_qgraphicsview.cpp tst_qgraphicsview_2.cpp DEFINES += QT_NO_CAST_TO_ASCII -linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test +linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test # QTBUG-16063 win32|mac:CONFIG += insignificant_test # QTBUG-24296 diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro b/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro index ca796647c1..2fc45b48de 100644 --- a/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro +++ b/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro @@ -6,5 +6,4 @@ QT += core-private gui-private SOURCES += tst_qgraphicswidget.cpp -# QTBUG-23616 - unstable test -linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test +linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test # QTBUG-23616 diff --git a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro index d47b3bfa31..d1a7686637 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro +++ b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro @@ -5,5 +5,4 @@ SOURCES += tst_qitemdelegate.cpp win32:!wince*: LIBS += -lUser32 -# QTBUG-23637 -linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test +linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test # QTBUG-23637 diff --git a/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro b/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro index 95d1ba1c2f..8102b6b95d 100644 --- a/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro +++ b/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro @@ -4,5 +4,4 @@ QT += widgets testlib QT += widgets-private gui-private core-private SOURCES += tst_qtreeview.cpp -# QTBUG-23638 -linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test +linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test # QTBUG-23638 diff --git a/tests/auto/widgets/widgets/qcombobox/qcombobox.pro b/tests/auto/widgets/widgets/qcombobox/qcombobox.pro index 03bb91f4c0..e0545630c5 100644 --- a/tests/auto/widgets/widgets/qcombobox/qcombobox.pro +++ b/tests/auto/widgets/widgets/qcombobox/qcombobox.pro @@ -3,5 +3,4 @@ TARGET = tst_qcombobox QT += widgets widgets-private gui-private core-private testlib SOURCES += tst_qcombobox.cpp -# QTBUG-23639 - unstable test (related QTBUG-1071) -linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test +linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test # QTBUG-23639, (related QTBUG-1071) diff --git a/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro b/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro index 4dd0890fc0..183210b597 100644 --- a/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro +++ b/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro @@ -3,5 +3,4 @@ TARGET = tst_qdoublespinbox QT += widgets testlib SOURCES += tst_qdoublespinbox.cpp -# QTBUG-23641 - unstable test -linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test +linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test # QTBUG-23641 diff --git a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro index 6bacaa0d37..c74c9e84c1 100644 --- a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro +++ b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro @@ -3,5 +3,4 @@ TARGET = tst_qmenubar QT += widgets testlib SOURCES += tst_qmenubar.cpp -# QTBUG-4965, QTBUG-11823 - unstable tests -linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test +linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test # QTBUG-4965, QTBUG-11823 -- cgit v1.2.3