summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-10 19:50:02 +1000
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-10 19:50:02 +1000
commit41e14a4175d56675127a2d29f6a67de18f7c6b90 (patch)
treef676c0f82f7ebe8f9d4eacfd2fbb170e931a5d40 /tests
parente14d3aa5c46f4c3ccbbe3af97b365440aa5afbe8 (diff)
parenta35b2d58d921ee944d48dadbebe871df0c5c6986 (diff)
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging: Add internal documentation for QUnifiedToolbarSurface. Fix the autotest condition. Change the repaint() call to an update(). Fix the update() autotest for raster. Change the repaint() to an update(). Set the default graphics system to raster. Revert "Switch the default graphics system to raster on Mac." Fix an race condition in the auto test. Fix an race condition in the auto test. Fix a race condition when the main window is being destructed. Switch the default graphics system to raster on Mac.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp45
-rw-r--r--tests/auto/qwizard/tst_qwizard.cpp13
2 files changed, 38 insertions, 20 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 35014c975a..e266efb794 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -4738,7 +4738,8 @@ void tst_QWidget::update()
QCOMPARE(w.visibleRegion(), expectedVisible);
QCOMPARE(w.paintedRegion, expectedVisible);
#ifdef QT_MAC_USE_COCOA
- QEXPECT_FAIL(0, "Cocoa compositor says to paint this.", Continue);
+ if (QApplicationPrivate::graphics_system_name != QLatin1String("raster"))
+ QEXPECT_FAIL(0, "Cocoa compositor says to paint this.", Continue);
#endif
QCOMPARE(child.numPaintEvents, 0);
@@ -6336,11 +6337,15 @@ void tst_QWidget::compatibilityChildInsertedEvents()
expected =
EventRecorder::EventList()
<< qMakePair(&widget, QEvent::PolishRequest)
- << qMakePair(&widget, QEvent::Type(QEvent::User + 1))
-#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_S60) || defined(Q_WS_QPA)
- << qMakePair(&widget, QEvent::UpdateRequest)
-#endif
- ;
+ << qMakePair(&widget, QEvent::Type(QEvent::User + 1));
+
+#ifndef QT_MAC_USE_CARBON
+#ifdef QT_MAC_USE_COCOA
+ if (QApplicationPrivate::graphics_system_name == QLatin1String("raster"))
+#endif // QT_MAC_USE_COCOA
+ expected << qMakePair(&widget, QEvent::UpdateRequest);
+#endif // !QT_MAC_USE_CARBON
+
QCOMPARE(spy.eventList(), expected);
}
@@ -6432,11 +6437,15 @@ void tst_QWidget::compatibilityChildInsertedEvents()
#endif
<< qMakePair(&widget, QEvent::PolishRequest)
<< qMakePair(&widget, QEvent::Type(QEvent::User + 1))
- << qMakePair(&widget, QEvent::Type(QEvent::User + 2))
-#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_S60) || defined(Q_WS_QPA)
- << qMakePair(&widget, QEvent::UpdateRequest)
-#endif
- ;
+ << qMakePair(&widget, QEvent::Type(QEvent::User + 2));
+
+#ifndef QT_MAC_USE_CARBON
+#ifdef QT_MAC_USE_COCOA
+ if (QApplicationPrivate::graphics_system_name == QLatin1String("raster"))
+#endif // QT_MAC_USE_COCOA
+ expected << qMakePair(&widget, QEvent::UpdateRequest);
+#endif // !QT_MAC_USE_CARBON
+
QCOMPARE(spy.eventList(), expected);
}
@@ -6528,11 +6537,15 @@ void tst_QWidget::compatibilityChildInsertedEvents()
#endif
<< qMakePair(&widget, QEvent::PolishRequest)
<< qMakePair(&widget, QEvent::Type(QEvent::User + 1))
- << qMakePair(&widget, QEvent::Type(QEvent::User + 2))
-#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_S60) || defined(Q_WS_QPA)
- << qMakePair(&widget, QEvent::UpdateRequest)
-#endif
- ;
+ << qMakePair(&widget, QEvent::Type(QEvent::User + 2));
+
+#ifndef QT_MAC_USE_CARBON
+#ifdef QT_MAC_USE_COCOA
+ if (QApplicationPrivate::graphics_system_name == QLatin1String("raster"))
+#endif // QT_MAC_USE_COCOA
+ expected << qMakePair(&widget, QEvent::UpdateRequest);
+#endif // !QT_MAC_USE_CARBON
+
QCOMPARE(spy.eventList(), expected);
}
}
diff --git a/tests/auto/qwizard/tst_qwizard.cpp b/tests/auto/qwizard/tst_qwizard.cpp
index a8137273ce..5667d4047a 100644
--- a/tests/auto/qwizard/tst_qwizard.cpp
+++ b/tests/auto/qwizard/tst_qwizard.cpp
@@ -1770,8 +1770,11 @@ public:
~TestWizard()
{
- foreach (int id, pageIds)
- delete page(id);
+ foreach (int id, pageIds) {
+ QWizardPage *page_to_delete = page(id);
+ removePage(id);
+ delete page_to_delete;
+ }
}
void applyOperations(const QList<Operation *> &operations)
@@ -2548,8 +2551,8 @@ void tst_QWizard::task177022_setFixedSize()
QWizard wiz;
QWizardPage page1;
QWizardPage page2;
- wiz.addPage(&page1);
- wiz.addPage(&page2);
+ int page1_id = wiz.addPage(&page1);
+ int page2_id = wiz.addPage(&page2);
wiz.setFixedSize(width, height);
if (wiz.wizardStyle() == QWizard::AeroStyle)
QEXPECT_FAIL("", "this probably relates to non-client area hack for AeroStyle titlebar "
@@ -2576,6 +2579,8 @@ void tst_QWizard::task177022_setFixedSize()
QCOMPARE(wiz.maximumWidth(), width);
QCOMPARE(wiz.maximumHeight(), height);
+ wiz.removePage(page1_id);
+ wiz.removePage(page2_id);
}
void tst_QWizard::task248107_backButton()