diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-11-26 22:30:27 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-11-26 22:35:48 +0100 |
commit | 4a8273a6fc2e741e811cf5dabc9a3c240306cf7f (patch) | |
tree | 2148abc88f8543eecdc0b97b2dd92594836af9b2 /tests/auto/gui | |
parent | 036c5db468164297d213764c59a4b59daa76d90a (diff) | |
parent | 1c2be58fecaff1de5f2849192eb712984ebd59bd (diff) |
Merge remote-tracking branch 'origin/stable' into dev
For the conflicts in msvc_nmake.cpp the ifdefs are extended since we
need to support windows phone in the target branch while it is not there
in the current stable branch (as of Qt 5.2).
Conflicts:
configure
qmake/generators/win32/msvc_nmake.cpp
src/3rdparty/angle/src/libEGL/Surface.cpp
src/angle/src/common/common.pri
src/corelib/global/qglobal.h
src/corelib/io/qstandardpaths.cpp
src/plugins/platforms/qnx/qqnxintegration.cpp
src/plugins/platforms/qnx/qqnxscreeneventhandler.h
src/plugins/platforms/xcb/qglxintegration.h
src/widgets/kernel/win.pri
tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
tools/configure/configureapp.cpp
Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp | 16 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 7 | ||||
-rw-r--r-- | tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp | 31 |
3 files changed, 21 insertions, 33 deletions
diff --git a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp index 1220ce3b23..efc688f0b1 100644 --- a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp +++ b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp @@ -118,6 +118,7 @@ private slots: void colorInteger(); void invalidQColor(); + void validQColor(); void debugStream_data(); void debugStream(); @@ -542,6 +543,21 @@ void tst_QGuiVariant::invalidQColor() QVERIFY(!qvariant_cast<QColor>(va).isValid()); } +void tst_QGuiVariant::validQColor() +{ + QColor col(Qt::red); + QVariant va(col.name()); + QVERIFY(va.canConvert(QVariant::Color)); + + QVERIFY(va.convert(QVariant::Color)); + + QVERIFY(col.isValid()); + + QVERIFY(va.convert(QVariant::String)); + + QCOMPARE(qvariant_cast<QString>(va), col.name()); +} + void tst_QGuiVariant::colorInteger() { QVariant v = QColor(Qt::red); diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index c4983f4462..259c840ae7 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -177,7 +177,7 @@ void tst_QWindow::resizeEventAfterResize() Window window; window.setGeometry(geometry); - window.show(); + window.showNormal(); QTRY_COMPARE(window.received(QEvent::Resize), 1); @@ -843,7 +843,10 @@ void tst_QWindow::activateAndClose() { for (int i = 0; i < 10; ++i) { QWindow window; - window.show(); + // qWaitForWindowActive will block for the duration of + // of the timeout if the window is at 0,0 + window.setGeometry(QGuiApplication::primaryScreen()->availableGeometry().adjusted(1, 1, -1, -1)); + window.showNormal(); window.requestActivate(); QVERIFY(QTest::qWaitForWindowActive(&window)); QCOMPARE(qGuiApp->focusWindow(), &window); diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp index 1abac3a28a..53aef40df0 100644 --- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp @@ -187,8 +187,6 @@ private slots: void htmlExportImportBlockCount(); void QTBUG27354_spaceAndSoftSpace(); - void cssInheritance(); - void baseUrl_data(); void baseUrl(); @@ -2952,35 +2950,6 @@ void tst_QTextDocument::QTBUG27354_spaceAndSoftSpace() } } -void tst_QTextDocument::cssInheritance() -{ - { - QTextDocument td; - td.setHtml("<html><head><style type=\"text/css\">body { line-height: 200% }</style></head><body>" - "<p>Foo</p><p>Bar</p><p>Baz</p></body></html>"); - QTextBlock block = td.begin(); - while (block.isValid()) { - QTextBlockFormat fmt = block.blockFormat(); - QVERIFY(fmt.lineHeightType() == QTextBlockFormat::ProportionalHeight); - QVERIFY(fmt.lineHeight() == 200); - block = block.next(); - } - } - { - QTextDocument td; - td.setHtml("<html><head><style type=\"text/css\">body { line-height: 200% } p { line-height: 300% }</style></head><body>" - "<p style=\"line-height: 40px\">Foo</p><p>Bar</p><p>Baz</p></body></html>"); - QTextBlock block = td.begin(); - QTextBlockFormat fmt = block.blockFormat(); - QVERIFY(fmt.lineHeightType() == QTextBlockFormat::FixedHeight); - QVERIFY(fmt.lineHeight() == 40); - block = block.next(); - fmt = block.blockFormat(); - QVERIFY(fmt.lineHeightType() == QTextBlockFormat::ProportionalHeight); - QVERIFY(fmt.lineHeight() == 300); - } -} - class BaseDocument : public QTextDocument { public: |