diff options
Diffstat (limited to 'tests/auto/qwidget/tst_qwidget.cpp')
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 5550fe8..ee06b53 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -71,6 +71,7 @@ #include <QtGui/qpaintengine.h> #include <private/qbackingstore_p.h> #include <qmenubar.h> +#include <qtableview.h> #include <QtGui/QGraphicsView> #include <QtGui/QGraphicsProxyWidget> @@ -406,6 +407,7 @@ private slots: void childAt(); #ifdef Q_WS_MAC void childAt_unifiedToolBar(); + void taskQTBUG_17333_ResizeInfiniteRecursion(); #ifdef QT_MAC_USE_COCOA void taskQTBUG_11373(); #endif // QT_MAC_USE_COCOA @@ -4052,6 +4054,11 @@ public: */ void tst_QWidget::optimizedResizeMove() { +#if defined(QT_MAC_USE_COCOA) + if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) + QSKIP("WA_StaticContents in Cocoa/Native paint engine lacks support", SkipAll); +#endif + QWidget parent; parent.resize(400, 400); @@ -8258,6 +8265,10 @@ void tst_QWidget::doubleRepaint() QCOMPARE(widget.numPaintEvents, 0); widget.numPaintEvents = 0; +#if defined(QT_MAC_USE_COCOA) + if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) + QEXPECT_FAIL(0, "Cocoa will send us an update when showing the window", Continue); +#endif // Restore: Should not trigger a repaint. widget.showNormal(); QTest::qWaitForWindowShown(&widget); @@ -8367,6 +8378,11 @@ public slots: void tst_QWidget::setMaskInResizeEvent() { +#if defined(QT_MAC_USE_COCOA) + if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) + QSKIP("Updates on masked widgets are not optimized for Cocoa/native paint engine", SkipAll); +#endif + UpdateWidget w; w.reset(); w.resize(200, 200); @@ -9041,6 +9057,11 @@ void tst_QWidget::setClearAndResizeMask() void tst_QWidget::maskedUpdate() { +#if defined(QT_MAC_USE_COCOA) + if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) + QSKIP("Updates on masked widgets are not optimized for Cocoa/native paint engine", SkipAll); +#endif + UpdateWidget topLevel; topLevel.resize(200, 200); const QRegion topLevelMask(50, 50, 70, 70); @@ -10572,6 +10593,18 @@ void tst_QWidget::childAt_unifiedToolBar() QCOMPARE(mainWindow.childAt(labelTopLeft), static_cast<QWidget *>(label)); } +void tst_QWidget::taskQTBUG_17333_ResizeInfiniteRecursion() +{ + QTableView tb; + const char *s = "border: 1px solid;"; + tb.setStyleSheet(s); + tb.show(); + + QTest::qWaitForWindowShown(&tb); + tb.setGeometry(QRect(100, 100, 0, 100)); + // No crash, it works. +} + #ifdef QT_MAC_USE_COCOA void tst_QWidget::taskQTBUG_11373() { |