Link against widgets only when available
authorGunnar Sletta <gunnar.sletta@nokia.com>
Mon, 12 Dec 2011 06:18:03 +0000 (07:18 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 12 Dec 2011 10:39:15 +0000 (11:39 +0100)
Change-Id: Id7c474fe48bfa99d765267c0e3be1cbf80597548
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>

tools/qmlscene/main.cpp
tools/qmlscene/qmlscene.pro

index a9a03aa..41113f1 100644 (file)
 #include <QtQuick/qquickitem.h>
 #include <QtQuick/qquickview.h>
 
+#ifdef QT_WIDGETS_LIB
+#include <QtWidgets/QFileDialog>
+#endif
+
 
 #ifdef QML_RUNTIME_TESTING
 class RenderStatistics
index 6ba9c1d..dfc91ce 100644 (file)
@@ -3,7 +3,7 @@ TARGET = qmlscene
 DESTDIR= $$QT.declarative.bins
 
 QT += declarative quick
-contains(QT_CONFIG, widgets): QT += widgets
+!isEmpty(QT.widgets.name): QT += widgets
 
 target.path = $$[QT_INSTALL_BINS]
 INSTALLS += target