From cf3e435299ef2705fb217279bb5e93847cfc7d8c Mon Sep 17 00:00:00 2001 From: Nils Jeisecke Date: Fri, 26 Jul 2013 17:51:42 +0200 Subject: Cocoa: Make sure that resizeEvent is invoked after calling resize The QWindow::resizeEvent documentation states that resizeEvent is invoked after the windowing system has acknowledged a setGeometry() or resize() request. The Cocoa plugin however did set the platform window geometry immediately so that the qnsview's updateGeometry returned too early. Task-number: QTBUG-32706 Change-Id: I1f359ab368833d174ab6740f4467b0848c290f13 Reviewed-by: Friedemann Kleint Reviewed-by: Gunnar Sletta --- tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests/auto/gui') diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index b4208949b0..7ad7880330 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -59,6 +59,7 @@ class tst_QWindow: public QObject private slots: void eventOrderOnShow(); + void resizeEventAfterResize(); void mapGlobal(); void positioning(); void isExposed(); @@ -168,6 +169,25 @@ void tst_QWindow::eventOrderOnShow() QVERIFY(window.eventIndex(QEvent::Resize) < window.eventIndex(QEvent::Expose)); } +void tst_QWindow::resizeEventAfterResize() +{ + // Some platforms enforce minimum widths for windows, which can cause extra resize + // events, so set the width to suitably large value to avoid those. + QRect geometry(QGuiApplication::primaryScreen()->availableGeometry().topLeft() + QPoint(20, 20), QSize(300, 40)); + + Window window; + window.setGeometry(geometry); + window.show(); + + QTRY_COMPARE(window.received(QEvent::Resize), 1); + + // QTBUG-32706 + // Make sure we get a resizeEvent after calling resize + window.resize(400, 100); + + QTRY_COMPARE(window.received(QEvent::Resize), 2); +} + void tst_QWindow::positioning() { if (!QGuiApplicationPrivate::platformIntegration()->hasCapability( -- cgit v1.2.3 From 08d3b0165ae49a9ca019b7074423606492856b70 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Tue, 6 Aug 2013 10:49:23 +0200 Subject: test: Mark tst_QRawFont::fromFont() as XFAIL Mark some tests as expected failures on OS X 10.8 - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=0, writingSystem=0) - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=0, writingSystem=5) - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=0, writingSystem=1) - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=1, writingSystem=0) - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=1, writingSystem=5) - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=1, writingSystem=1) - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=2, writingSystem=0) - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=2, writingSystem=5) - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=2, writingSystem=1) - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=3, writingSystem=0) - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=3, writingSystem=5) - tst_QRawFont::fromFont(testfont.ttf, hintingPreference=3, writingSystem=1) Task-number: QTBUG-32654 Change-Id: I46d64852ccb751824a2eff68513389baa52c1baf Reviewed-by: Frederik Gladhorn --- tests/auto/gui/text/qrawfont/tst_qrawfont.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto/gui') diff --git a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp index ae6e450301..19f60baa29 100644 --- a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp +++ b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp @@ -675,6 +675,10 @@ void tst_QRawFont::fromFont() QFontDatabase fontDatabase; int id = fontDatabase.addApplicationFont(fileName); +#ifdef Q_OS_MACX + if (QSysInfo::MacintoshVersion == QSysInfo::MV_10_8) + QEXPECT_FAIL("", "See QTBUG-32654", Abort); +#endif QVERIFY(id >= 0); QFont font(familyName); -- cgit v1.2.3 From 4ca4fb93f666820ab10fc0e17f54b2b777540779 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Tue, 6 Aug 2013 11:56:03 +0200 Subject: Expect fail broken font family from QFontDatabase on OS X 10.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I682d58350427975a692b523095c1c38e1891663f Reviewed-by: Tor Arne Vestbø --- tests/auto/gui/text/qfont/tst_qfont.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/auto/gui') diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp index b8cce2671f..082bb94b60 100644 --- a/tests/auto/gui/text/qfont/tst_qfont.cpp +++ b/tests/auto/gui/text/qfont/tst_qfont.cpp @@ -667,6 +667,15 @@ void tst_QFont::defaultFamily_data() void tst_QFont::defaultFamily() { +#if defined(Q_OS_MAC) + if (QSysInfo::MacintoshVersion == QSysInfo::MV_10_8) { + QEXPECT_FAIL("serif", "See QTBUG-32834", Continue); + QEXPECT_FAIL("monospace", "See QTBUG-32834", Continue); + QEXPECT_FAIL("cursive", "See QTBUG-32834", Continue); + QEXPECT_FAIL("fantasy", "See QTBUG-32834", Continue); + } +#endif + QFETCH(QFont::StyleHint, styleHint); QFETCH(QStringList, acceptableFamilies); -- cgit v1.2.3 From c98943b4cd1c2c2007a9be19a0cfbe8739ab8ccb Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 7 Aug 2013 13:14:32 +0200 Subject: Expect fail font family mismatch in the right place MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes 4ca4fb93f666820ab10fc0e17f54b2b777540779 where the fix was right, just in the wrong place. Change-Id: I3cde24624e3789870f1c16ccb92f78f7fc567fd5 Reviewed-by: Tor Arne Vestbø --- tests/auto/gui/text/qfont/tst_qfont.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'tests/auto/gui') diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp index 082bb94b60..acb55c2d86 100644 --- a/tests/auto/gui/text/qfont/tst_qfont.cpp +++ b/tests/auto/gui/text/qfont/tst_qfont.cpp @@ -667,15 +667,6 @@ void tst_QFont::defaultFamily_data() void tst_QFont::defaultFamily() { -#if defined(Q_OS_MAC) - if (QSysInfo::MacintoshVersion == QSysInfo::MV_10_8) { - QEXPECT_FAIL("serif", "See QTBUG-32834", Continue); - QEXPECT_FAIL("monospace", "See QTBUG-32834", Continue); - QEXPECT_FAIL("cursive", "See QTBUG-32834", Continue); - QEXPECT_FAIL("fantasy", "See QTBUG-32834", Continue); - } -#endif - QFETCH(QFont::StyleHint, styleHint); QFETCH(QStringList, acceptableFamilies); @@ -694,6 +685,15 @@ void tst_QFont::defaultFamily() break; } } + +#if defined(Q_OS_MAC) + if (QSysInfo::MacintoshVersion == QSysInfo::MV_10_8) { + QEXPECT_FAIL("serif", "See QTBUG-32834", Continue); + QEXPECT_FAIL("monospace", "See QTBUG-32834", Continue); + QEXPECT_FAIL("cursive", "See QTBUG-32834", Continue); + QEXPECT_FAIL("fantasy", "See QTBUG-32834", Continue); + } +#endif QVERIFY2(isAcceptable, msgNotAcceptableFont(familyForHint, acceptableFamilies)); } -- cgit v1.2.3 From 0352c74755a0e593b8fe32fd4bedf8f73e2cc155 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Fri, 9 Aug 2013 12:18:26 +0200 Subject: test: Mark tst_QGlyphRun::drawMultiScriptText2() as XFAIL This is a flaky test on OS X 10.8, so marking it as XFAIL if it is expected to fail. Task-number: QTBUG-32690 Change-Id: I0665c7474bb62c4c0a70e4b93cc977e3dbf1e150 Reviewed-by: Frederik Gladhorn --- tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto/gui') diff --git a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp index 6b06424ad7..3f6eaae89b 100644 --- a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp +++ b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp @@ -502,6 +502,10 @@ void tst_QGlyphRun::drawMultiScriptText2() drawGlyphs.save("drawMultiScriptText2_drawGlyphIndexes.png"); #endif +#ifdef Q_OS_MACX + if (drawGlyphs.toImage() != textLayoutDraw.toImage()) + QEXPECT_FAIL("", "See QTBUG-32690", Continue); +#endif // Q_OS_MACX QCOMPARE(drawGlyphs, textLayoutDraw); } -- cgit v1.2.3 From 3ca9c396105212af5b84b5740fd9c09b92ab8d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 17 Jul 2013 21:50:56 +0200 Subject: Add auto-test for running the QEventLoop test with the GUI dispatcher Follows a similar include-pattern as the qguieventdispatcher test. Change-Id: Ie8669a5bc155abd6687e81526f2b95d0d19b009e Reviewed-by: Gabriel de Dietrich --- tests/auto/gui/kernel/kernel.pro | 1 + tests/auto/gui/kernel/qguieventloop/qguieventloop.pro | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 tests/auto/gui/kernel/qguieventloop/qguieventloop.pro (limited to 'tests/auto/gui') diff --git a/tests/auto/gui/kernel/kernel.pro b/tests/auto/gui/kernel/kernel.pro index 85a81de632..0d0a300eac 100644 --- a/tests/auto/gui/kernel/kernel.pro +++ b/tests/auto/gui/kernel/kernel.pro @@ -6,6 +6,7 @@ SUBDIRS=\ qevent \ qfileopenevent \ qguieventdispatcher \ + qguieventloop \ qguimetatype \ qguitimer \ qguivariant \ diff --git a/tests/auto/gui/kernel/qguieventloop/qguieventloop.pro b/tests/auto/gui/kernel/qguieventloop/qguieventloop.pro new file mode 100644 index 0000000000..633386fa75 --- /dev/null +++ b/tests/auto/gui/kernel/qguieventloop/qguieventloop.pro @@ -0,0 +1,3 @@ +include(../../../corelib/kernel/qeventloop/qeventloop.pro) +TARGET = tst_qguieventloop +QT += gui -- cgit v1.2.3