From 25a62d7d6bf5f0b9eabab0f3ea8b4719cc27756c Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 12 Oct 2011 12:36:25 +1000 Subject: [PATCH] Don't build empty tests. The qgraphicswidget and qgraphicsproxywidget tests are empty if Qt is built without the cleanlooks style, so don't build the tests in that case. Change-Id: I2308e723a9b0abcc3e95b32a562fcb02afe0444d Reviewed-by: Rohan McGovern --- tests/auto/gui.pro | 5 +++++ .../auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | 6 ------ tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 6 ------ 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/tests/auto/gui.pro b/tests/auto/gui.pro index 65595405a5..7e07df24d8 100644 --- a/tests/auto/gui.pro +++ b/tests/auto/gui.pro @@ -153,6 +153,11 @@ irix-*:SUBDIRS -= qitemview qwsinputmethod \ qwswindowsystem \ +# These tests require the cleanlooks style +!contains(styles, cleanlooks):SUBDIRS -= \ + qgraphicswidget \ + qgraphicsproxywidget \ + win32:SUBDIRS -= qtextpiecetable !contains(QT_CONFIG, private_tests): SUBDIRS -= \ diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index c223ca503a..8dcb4ebf68 100644 --- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -59,8 +59,6 @@ static void sendMouseMove(QWidget *widget, const QPoint &point, Qt::MouseButton QApplication::sendEvent(widget, &event); } - -#ifndef QT_NO_STYLE_CLEANLOOKS /* Notes: @@ -3650,7 +3648,3 @@ void tst_QGraphicsProxyWidget::QTBUG_6986_sendMouseEventToAlienWidget() QTEST_MAIN(tst_QGraphicsProxyWidget) #include "tst_qgraphicsproxywidget.moc" - -#else // QT_NO_STYLE_CLEANLOOKS -QTEST_NOOP_MAIN -#endif diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index ce65f4ef70..feae6f7372 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -81,7 +81,6 @@ protected: QEvent::Type spied; }; -#ifndef QT_NO_STYLE_CLEANLOOKS class tst_QGraphicsWidget : public QObject { Q_OBJECT @@ -3361,8 +3360,3 @@ void tst_QGraphicsWidget::QT_BUG_12056_tabFocusFirstUnsetWhenRemovingItems() QTEST_MAIN(tst_QGraphicsWidget) #include "tst_qgraphicswidget.moc" - -#else // QT_NO_STYLE_CLEANLOOKS -QTEST_NOOP_MAIN -#endif -