diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2012-01-13 11:11:57 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-17 10:29:56 +0100 |
commit | 147bbda0675b7cc7afaea6bc617d6a0f249978f0 (patch) | |
tree | c8487bb0b9386c34f72d8501f4750d69ba6704c2 | |
parent | 42744812dcea181b479ceaca4dcb883e1fc4a381 (diff) |
Make tst_QGraphicsAnchorLayout1 pass on Mac OS X
On Mac OS X, tests are build with QT_DEBUG defined, but run against
libraries built with QT_NO_DEBUG, so the expected warning output is not
seen. Use a run-time check instead to know whether or not to expect the
warning output.
Change-Id: Ifb772b764d4135cc8f896827727939fd8cff5388
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
-rw-r--r-- | tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp index 0fd19c417f..57be32dfc8 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp @@ -559,10 +559,9 @@ void tst_QGraphicsAnchorLayout1::testSpecialCases() { // One widget, setLayout before defining layouts { -#ifdef QT_DEBUG - QTest::ignoreMessage(QtWarningMsg, "QGraphicsLayout::addChildLayoutItem: QGraphicsWidget \"\"" - " in wrong parent; moved to correct parent"); -#endif + if (QLibraryInfo::isDebugBuild()) + QTest::ignoreMessage(QtWarningMsg, "QGraphicsLayout::addChildLayoutItem: QGraphicsWidget \"\"" + " in wrong parent; moved to correct parent"); QGraphicsWidget *widget = new QGraphicsWidget; TheAnchorLayout *layout = new TheAnchorLayout(); widget->setLayout(layout); @@ -581,10 +580,9 @@ void tst_QGraphicsAnchorLayout1::testSpecialCases() // One widget, layout inside layout, layout inside layout inside layout { -#ifdef QT_DEBUG - QTest::ignoreMessage(QtWarningMsg, "QGraphicsLayout::addChildLayoutItem: QGraphicsWidget \"\"" - " in wrong parent; moved to correct parent"); -#endif + if (QLibraryInfo::isDebugBuild()) + QTest::ignoreMessage(QtWarningMsg, "QGraphicsLayout::addChildLayoutItem: QGraphicsWidget \"\"" + " in wrong parent; moved to correct parent"); QGraphicsWidget *widget = new QGraphicsWidget; TheAnchorLayout *layout = new TheAnchorLayout(); widget->setLayout(layout); |