diff options
author | Martin Jones <martin.jones@nokia.com> | 2012-06-01 14:53:26 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-05 04:35:50 +0200 |
commit | 805c30e809a86cc1feabeb3bdbee943a7bbf8796 (patch) | |
tree | 102ce2b32ceacb9b6522d579d8250892e1fdf276 /tests/auto/quick/qquickpathview | |
parent | c734706c69ed5b38cc97aea5be3f0553c194aa0a (diff) |
Allow qtdeclarative to compile with -no-widgets
We have no hard requirement for QtWidgets library, so we should
build without it.
Change-Id: I85c85cc1a52bf9daa7ab7916f19bf7cc3ad5845f
Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickpathview')
-rw-r--r-- | tests/auto/quick/qquickpathview/qquickpathview.pro | 3 | ||||
-rw-r--r-- | tests/auto/quick/qquickpathview/tst_qquickpathview.cpp | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/tests/auto/quick/qquickpathview/qquickpathview.pro b/tests/auto/quick/qquickpathview/qquickpathview.pro index 02ce905494..4326ef5288 100644 --- a/tests/auto/quick/qquickpathview/qquickpathview.pro +++ b/tests/auto/quick/qquickpathview/qquickpathview.pro @@ -9,4 +9,5 @@ include (../shared/util.pri) TESTDATA = data/* -QT += core-private gui-private v8-private qml-private quick-private widgets testlib +QT += core-private gui-private v8-private qml-private quick-private testlib +!contains(QT_CONFIG, no-widgets): QT += widgets diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp index ef9a404e6c..5c0df1612f 100644 --- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp +++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp @@ -53,7 +53,6 @@ #include <QtQml/private/qquicklistmodel_p.h> #include <QtQml/private/qqmlvaluetype_p.h> #include <QStringListModel> -#include <QStandardItemModel> #include <QFile> #include "../../shared/util.h" @@ -65,6 +64,8 @@ using namespace QQuickVisualTestUtil; Q_DECLARE_METATYPE(QQuickPathView::HighlightRangeMode) +#ifndef QT_NO_WIDGETS +#include <QStandardItemModel> static void initStandardTreeModel(QStandardItemModel *model) { QStandardItem *item; @@ -82,6 +83,7 @@ static void initStandardTreeModel(QStandardItemModel *model) item->setIcon(QIcon()); model->insertRow(2, item); } +#endif class tst_QQuickPathView : public QQmlDataTest @@ -120,7 +122,9 @@ private slots: void visualDataModel(); void undefinedPath(); void mouseDrag(); +#ifndef QT_NO_WIDGETS void treeModel(); +#endif void changePreferredHighlight(); void missingPercent(); void creationContext(); @@ -1415,6 +1419,7 @@ void tst_QQuickPathView::mouseDrag() delete canvas; } +#ifndef QT_NO_WIDGETS void tst_QQuickPathView::treeModel() { QQuickView *canvas = createView(); @@ -1442,6 +1447,7 @@ void tst_QQuickPathView::treeModel() delete canvas; } +#endif void tst_QQuickPathView::changePreferredHighlight() { |