summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsanchorlayout1')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp14
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);