diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-02-15 01:00:50 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-02-15 01:00:51 +0100 |
commit | ef2ddcf551dec13215cb45cb000731f94b2f8e34 (patch) | |
tree | c8810f6ee77a81c3003ccc8783c9d3b17f0b8a5e /tests/auto | |
parent | e2cf6ade3535467bc2f21b54b82ed007d5ce279b (diff) | |
parent | 501cca2c4b0851cea7133ba56c3a05d71c25ce6d (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I8cad26f17834dbc9f7151edc0f17786f9e32025d
Diffstat (limited to 'tests/auto')
4 files changed, 34 insertions, 3 deletions
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index f1360b9efe..ede1e58a53 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -642,6 +642,8 @@ static bool supportsInternalFboFormat(QOpenGLContext *ctx, int glFormat) return false; } } +#else + Q_UNUSED(glFormat); #endif return true; } diff --git a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp index 08f7cf4fb2..fe0b6dae49 100644 --- a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp +++ b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp @@ -196,6 +196,8 @@ private slots: void css_linkPseudo(); void css_pageBreaks(); void css_cellPaddings(); + void css_whiteSpace_data(); + void css_whiteSpace(); void universalSelectors_data(); void universalSelectors(); void screenMedia(); @@ -1771,6 +1773,26 @@ void tst_QTextDocumentFragment::css_cellPaddings() QCOMPARE(cell.format().toTableCellFormat().bottomPadding(), qreal(15)); } +void tst_QTextDocumentFragment::css_whiteSpace_data() +{ + QTest::addColumn<QString>("htmlText"); + QTest::addColumn<bool>("nowrap"); + + QTest::newRow("default") << QString("<p>Normal Text</p>") << false; + QTest::newRow("white-space:nowrap") << QString("<p style=white-space:nowrap>Normal Text</p>") << true; + QTest::newRow("white-space:pre") << QString("<p style=white-space:pre>Normal Text</p>") << true; +} + +void tst_QTextDocumentFragment::css_whiteSpace() +{ + QFETCH(QString, htmlText); + QFETCH(bool, nowrap); + + doc->setHtml(htmlText); + QCOMPARE(doc->blockCount(), 1); + QCOMPARE(doc->begin().blockFormat().nonBreakableLines(), nowrap); +} + void tst_QTextDocumentFragment::html_blockLevelDiv() { const char html[] = "<div align=right><b>Hello World"; diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/BLACKLIST b/tests/auto/widgets/graphicsview/qgraphicsitem/BLACKLIST deleted file mode 100644 index 071ccaaff4..0000000000 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/BLACKLIST +++ /dev/null @@ -1,3 +0,0 @@ -[cursor] -# QTBUG-73545 -winrt diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp index 37bb28dec9..1d106f94f3 100644 --- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp +++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp @@ -53,6 +53,8 @@ #include <QStyleOptionSpinBox> #include <QStyle> #include <QProxyStyle> +#include <QScreen> + class SpinBox : public QSpinBox { @@ -343,6 +345,14 @@ tst_QSpinBox::tst_QSpinBox() void tst_QSpinBox::init() { QLocale::setDefault(QLocale(QLocale::C)); + +#if QT_CONFIG(cursor) + // Ensure mouse cursor was not left by previous tests where widgets + // will appear, as it could cause events and interfere with the tests. + const QScreen *screen = QGuiApplication::primaryScreen(); + const QRect availableGeometry = screen->availableGeometry(); + QCursor::setPos(availableGeometry.topLeft()); +#endif } void tst_QSpinBox::setValue_data() |