diff options
Diffstat (limited to 'tests')
17 files changed, 103 insertions, 33 deletions
diff --git a/tests/auto/corelib/io/qstandardpaths/BLACKLIST b/tests/auto/corelib/io/qstandardpaths/BLACKLIST new file mode 100644 index 0000000000..8496a620b3 --- /dev/null +++ b/tests/auto/corelib/io/qstandardpaths/BLACKLIST @@ -0,0 +1,2 @@ +[testRuntimeDirectory] +rhel-7.1 diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 5f046575c4..dc5140a010 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -212,6 +212,7 @@ tst_QLocale::tst_QLocale() void tst_QLocale::initTestCase() { +#ifndef QT_NO_PROCESS const QString syslocaleapp_dir = QFINDTESTDATA("syslocaleapp"); QVERIFY2(!syslocaleapp_dir.isEmpty(), qPrintable(QStringLiteral("Cannot find 'syslocaleapp' starting from ") @@ -224,6 +225,7 @@ void tst_QLocale::initTestCase() QVERIFY2(fi.exists() && fi.isExecutable(), qPrintable(QDir::toNativeSeparators(m_sysapp) + QStringLiteral(" does not exist or is not executable."))); +#endif // QT_NO_PROCESS #ifdef Q_OS_BLACKBERRY if ((m_languageFd = open(ppsLanguageLocalePath, O_RDONLY)) == -1) diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST index ee9709e68b..26cace1403 100644 --- a/tests/auto/gui/kernel/qwindow/BLACKLIST +++ b/tests/auto/gui/kernel/qwindow/BLACKLIST @@ -1,3 +1,5 @@ +[testInputEvents] +rhel-7.1 [positioning:default] ubuntu-14.04 [modalWindowPosition] diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index 1ed78fa0ef..8c72532122 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -305,6 +305,8 @@ private slots: void drawPolyline_data(); void drawPolyline(); + void QTBUG50153_drawImage_assert(); + private: void fillData(); void setPenColor(QPainter& p); @@ -5052,6 +5054,30 @@ void tst_QPainter::drawPolyline() QCOMPARE(images[0], images[1]); } +void tst_QPainter::QTBUG50153_drawImage_assert() +{ + QImage::Format formats[] = { + QImage::Format_RGB32, // fetchTransformedBilinearARGB32PM + QImage::Format_ARGB32 // fetchTransformedBilinear + }; + + for (unsigned i = 0; i < sizeof(formats) / sizeof(formats[0]); i++) { + QImage image(3027, 2999, formats[i]); + + QImage backingStore(image.size(), QImage::Format_ARGB32); + QPainter backingStorePainter(&backingStore); + + QTransform transform; + transform.scale( 0.999987, 0.999987 ); + + backingStorePainter.setTransform(transform); + backingStorePainter.setRenderHint(QPainter::SmoothPixmapTransform, true); + backingStorePainter.drawImage(0, 0, image); + + // No crash, all fine + } +} + QTEST_MAIN(tst_QPainter) #include "tst_qpainter.moc" diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp index 7378ca85ee..02e2bf27e2 100644 --- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp @@ -95,6 +95,8 @@ private slots: void task240325(); + void preFont(); + void stylesheetFont_data(); void stylesheetFont(); @@ -675,6 +677,30 @@ void tst_QTextDocument::stylesheetFont() QCOMPARE(actualFont.pixelSize(), font.pixelSize()); } +void tst_QTextDocument::preFont() +{ + const QFont font = QFontDatabase::systemFont(QFontDatabase::FixedFont); + const QString html = QString::fromLatin1( "<html>" + "<body>" + "<pre>" + "Foobar" + "</pre>" + "</body>" + "</html>"); + + doc->setHtml(html); + QCOMPARE(doc->blockCount(), 1); + + // First and only block + QTextBlock block = doc->firstBlock(); + + QString text = block.text(); + QCOMPARE(text, QString::fromLatin1("Foobar")); + + QFont actualFont = block.charFormat().font(); + QCOMPARE(actualFont.family(), font.family()); +} + void tst_QTextDocument::noundo_moreIsModified() { doc->setUndoRedoEnabled(false); diff --git a/tests/auto/opengl/qgl/BLACKLIST b/tests/auto/opengl/qgl/BLACKLIST index fa7c829b30..547a9a2a73 100644 --- a/tests/auto/opengl/qgl/BLACKLIST +++ b/tests/auto/opengl/qgl/BLACKLIST @@ -1,3 +1,5 @@ +[] +rhel-7.1 [glWidgetRendering] windows [glFBORendering] diff --git a/tests/auto/other/gestures/BLACKLIST b/tests/auto/other/gestures/BLACKLIST index 4e8745ca78..28e4856056 100644 --- a/tests/auto/other/gestures/BLACKLIST +++ b/tests/auto/other/gestures/BLACKLIST @@ -1,2 +1,4 @@ +[] +rhel-7.1 [customGesture] opensuse-13.1 diff --git a/tests/auto/widgets/dialogs/qfontdialog/BLACKLIST b/tests/auto/widgets/dialogs/qfontdialog/BLACKLIST index 6d3c17f35f..ae0f7bb868 100644 --- a/tests/auto/widgets/dialogs/qfontdialog/BLACKLIST +++ b/tests/auto/widgets/dialogs/qfontdialog/BLACKLIST @@ -1,5 +1,6 @@ [task256466_wrongStyle] opensuse-13.1 +rhel-7.1 [setFont] ubuntu-14.04 redhatenterpriselinuxworkstation-6.6 diff --git a/tests/auto/widgets/gestures/qgesturerecognizer/BLACKLIST b/tests/auto/widgets/gestures/qgesturerecognizer/BLACKLIST index 7f55c2dae0..14c41711ac 100644 --- a/tests/auto/widgets/gestures/qgesturerecognizer/BLACKLIST +++ b/tests/auto/widgets/gestures/qgesturerecognizer/BLACKLIST @@ -1,2 +1,8 @@ [panGesture:Two finger] xcb +[swipeGesture:SmallDirectionChange] +rhel-7.1 +[swipeGesture:Line] +rhel-7.1 +[pinchGesture:Standard] +rhel-7.1 diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/BLACKLIST b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/BLACKLIST index 717c791280..373343fa22 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/BLACKLIST +++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/BLACKLIST @@ -1,2 +1,5 @@ [hoverEnterLeaveEvent] ubuntu-14.04 +rhel-7.1 +[QTBUG_6986_sendMouseEventToAlienWidget] +rhel-7.1 diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/BLACKLIST b/tests/auto/widgets/graphicsview/qgraphicswidget/BLACKLIST index 5db5c97917..c8d93585b2 100644 --- a/tests/auto/widgets/graphicsview/qgraphicswidget/BLACKLIST +++ b/tests/auto/widgets/graphicsview/qgraphicswidget/BLACKLIST @@ -1,2 +1,3 @@ [initialShow2] ubuntu-14.04 +rhel-7.1 diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST index 78ccbe302a..8d18d40e05 100644 --- a/tests/auto/widgets/kernel/qwidget/BLACKLIST +++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST @@ -10,6 +10,7 @@ ubuntu-14.04 osx [updateWhileMinimized] ubuntu-14.04 +rhel-7.1 osx [focusProxyAndInputMethods] linux @@ -31,6 +32,7 @@ osx osx [widgetAt] osx +rhel-7.1 [sheetOpacity] osx [resizeEvent] @@ -63,8 +65,10 @@ osx osx [taskQTBUG_4055_sendSyntheticEnterLeave] osx +rhel-7.1 [syntheticEnterLeave] osx +rhel-7.1 [maskedUpdate] osx [hideWhenFocusWidgetIsChild] diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp index 5188dfbcfa..58e85d6b58 100644 --- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp +++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp @@ -206,32 +206,20 @@ void tst_QWidget_window::tst_show_resize_hide_show() // QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); } -class TestWidget : public QWidget +class PaintTestWidget : public QWidget { public: - int m_first, m_next; - bool paintEventReceived; + int paintEventCount; - void reset(){ m_first = m_next = 0; paintEventReceived = false; } - bool event(QEvent *event) + explicit PaintTestWidget(QWidget *parent = Q_NULLPTR) + : QWidget(parent) + , paintEventCount(0) + {} + + void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE { - switch (event->type()) { - case QEvent::WindowActivate: - case QEvent::WindowDeactivate: - case QEvent::Hide: - case QEvent::Show: - if (m_first) - m_next = event->type(); - else - m_first = event->type(); - break; - case QEvent::Paint: - paintEventReceived = true; - break; - default: - break; - } - return QWidget::event(event); + ++paintEventCount; + QWidget::paintEvent(event); } }; @@ -366,15 +354,15 @@ void tst_QWidget_window::tst_showWithoutActivating() void tst_QWidget_window::tst_paintEventOnSecondShow() { - TestWidget w; + PaintTestWidget w; w.show(); w.hide(); - w.reset(); + w.paintEventCount = 0; w.show(); QVERIFY(QTest::qWaitForWindowExposed(&w)); QApplication::processEvents(); - QTRY_VERIFY(w.paintEventReceived); + QTRY_VERIFY(w.paintEventCount > 0); } #ifndef QT_NO_DRAGANDDROP diff --git a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp index 9f03e9b3a0..464a42b4e8 100644 --- a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp +++ b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp @@ -624,13 +624,13 @@ void tst_QUndoGroup::commandTextFormat() const QString tsFile = QFINDTESTDATA("testdata/qundogroup.ts"); QVERIFY(!tsFile.isEmpty()); - QVERIFY(!QProcess::execute(binDir + "/lrelease " + tsFile)); + QFile::remove("qundogroup.qm"); // Avoid confusion by strays. + QVERIFY(!QProcess::execute(binDir + "/lrelease -silent " + tsFile + " -qm qundogroup.qm")); QTranslator translator; - const QString qmFile = QFINDTESTDATA("testdata/qundogroup.qm"); - QVERIFY(!qmFile.isEmpty()); - QVERIFY(translator.load(qmFile)); + QVERIFY(translator.load("qundogroup.qm")); + QFile::remove("qundogroup.qm"); qApp->installTranslator(&translator); QUndoGroup group; diff --git a/tests/auto/widgets/util/qundostack/tst_qundostack.cpp b/tests/auto/widgets/util/qundostack/tst_qundostack.cpp index 2c8a9a3ee5..07c5be417a 100644 --- a/tests/auto/widgets/util/qundostack/tst_qundostack.cpp +++ b/tests/auto/widgets/util/qundostack/tst_qundostack.cpp @@ -2968,12 +2968,12 @@ void tst_QUndoStack::commandTextFormat() const QString tsFile = QFINDTESTDATA("testdata/qundostack.ts"); QVERIFY(!tsFile.isEmpty()); - QVERIFY(!QProcess::execute(binDir + "/lrelease " + tsFile)); + QFile::remove("qundostack.qm"); // Avoid confusion by strays. + QVERIFY(!QProcess::execute(binDir + "/lrelease -silent " + tsFile + " -qm qundostack.qm")); QTranslator translator; - const QString qmFile = QFINDTESTDATA("testdata/qundostack.qm"); - QVERIFY(!qmFile.isEmpty()); - QVERIFY(translator.load(qmFile)); + QVERIFY(translator.load("qundostack.qm")); + QFile::remove("qundostack.qm"); qApp->installTranslator(&translator); QUndoStack stack; diff --git a/tests/auto/widgets/widgets/qmdisubwindow/BLACKLIST b/tests/auto/widgets/widgets/qmdisubwindow/BLACKLIST new file mode 100644 index 0000000000..a10cf663d0 --- /dev/null +++ b/tests/auto/widgets/widgets/qmdisubwindow/BLACKLIST @@ -0,0 +1,2 @@ +[setSystemMenu] +rhel-7.1 diff --git a/tests/auto/widgets/widgets/qmenu/BLACKLIST b/tests/auto/widgets/widgets/qmenu/BLACKLIST index de49d5ff45..dbc3e26837 100644 --- a/tests/auto/widgets/widgets/qmenu/BLACKLIST +++ b/tests/auto/widgets/widgets/qmenu/BLACKLIST @@ -1,2 +1,5 @@ [task258920_mouseBorder] osx +rhel-7.1 +[pushButtonPopulateOnAboutToShow] +rhel-7.1 |