From: Rohan McGovern Date: Wed, 21 Sep 2011 00:18:15 +0000 (+1000) Subject: Fixed compile of examples and tests. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=4114b9dcff68cdebc36e3b4818d4463d62421ecf;p=konrad%2Fqtdeclarative.git Fixed compile of examples and tests. 6aad4122332c0291e2e3249b508c7583428177b9 in qtbase removed implicit linking to libQtWidgets. Projects which implicitly used that module were broken. Either remove the dependency where it is not required, or explicitly opt-in to libQtWidgets where it is required. Change-Id: I6f4fb1d98bdf5bb65b4f02a1d245d334314b163d Reviewed-on: http://codereview.qt-project.org/5268 Reviewed-by: Qt Sanity Bot Reviewed-by: Toby Tomkins Reviewed-by: Alan Alpert --- diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp index 2da6e3c..7caeaf9 100644 --- a/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ -#include +#include #include #include @@ -80,7 +80,7 @@ int main(int argc, char ** argv) { QUrl source("qrc:view.qml"); - QApplication app(argc, argv); + QGuiApplication app(argc, argv); for (int i = 1; i < argc; ++i) { QString arg(argv[i]); diff --git a/examples/declarative/cppextensions/plugins/plugin.cpp b/examples/declarative/cppextensions/plugins/plugin.cpp index 056e093..299b0ff 100644 --- a/examples/declarative/cppextensions/plugins/plugin.cpp +++ b/examples/declarative/cppextensions/plugins/plugin.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include // Implements a "TimeModel" class with hour and minute properties // that change on-the-minute yet efficiently sleep the rest @@ -109,7 +109,7 @@ public: { if (++instances == 1) { if (!timer) - timer = new MinuteTimer(qApp); + timer = new MinuteTimer(QCoreApplication::instance()); connect(timer, SIGNAL(timeChanged()), this, SIGNAL(timeChanged())); timer->start(); } diff --git a/examples/declarative/cppextensions/referenceexamples/extended/extended.pro b/examples/declarative/cppextensions/referenceexamples/extended/extended.pro index d4c9dc9..78585f6 100644 --- a/examples/declarative/cppextensions/referenceexamples/extended/extended.pro +++ b/examples/declarative/cppextensions/referenceexamples/extended/extended.pro @@ -2,7 +2,7 @@ TEMPLATE = app TARGET = extended DEPENDPATH += . INCLUDEPATH += . -QT += declarative +QT += declarative widgets # Input SOURCES += main.cpp \ diff --git a/examples/declarative/modelviews/objectlistmodel/main.cpp b/examples/declarative/modelviews/objectlistmodel/main.cpp index 345b5ee..ba37e17 100644 --- a/examples/declarative/modelviews/objectlistmodel/main.cpp +++ b/examples/declarative/modelviews/objectlistmodel/main.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ -#include +#include #include #include @@ -56,7 +56,7 @@ //![0] int main(int argc, char ** argv) { - QApplication app(argc, argv); + QGuiApplication app(argc, argv); QList dataList; dataList.append(new DataObject("Item 1", "red")); diff --git a/examples/declarative/modelviews/stringlistmodel/main.cpp b/examples/declarative/modelviews/stringlistmodel/main.cpp index 1f474c4..5d01c6f 100644 --- a/examples/declarative/modelviews/stringlistmodel/main.cpp +++ b/examples/declarative/modelviews/stringlistmodel/main.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ -#include +#include #include #include @@ -55,7 +55,7 @@ int main(int argc, char ** argv) { - QApplication app(argc, argv); + QGuiApplication app(argc, argv); //![0] QStringList dataList; diff --git a/examples/declarative/painteditem/smile/main.cpp b/examples/declarative/painteditem/smile/main.cpp index bc3a9d6..423ff29 100644 --- a/examples/declarative/painteditem/smile/main.cpp +++ b/examples/declarative/painteditem/smile/main.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ -#include +#include #include #include #include @@ -68,7 +68,7 @@ public: int main(int argc, char ** argv) { - QApplication app(argc, argv); + QGuiApplication app(argc, argv); qmlRegisterType("MyModule", 1, 0, "MyPaintItem"); diff --git a/examples/declarative/tutorials/extending/chapter1-basics/main.cpp b/examples/declarative/tutorials/extending/chapter1-basics/main.cpp index 4c11768..ca6a97e 100644 --- a/examples/declarative/tutorials/extending/chapter1-basics/main.cpp +++ b/examples/declarative/tutorials/extending/chapter1-basics/main.cpp @@ -40,11 +40,11 @@ //![0] #include "piechart.h" #include -#include +#include int main(int argc, char *argv[]) { - QApplication app(argc, argv); + QGuiApplication app(argc, argv); qmlRegisterType("Charts", 1, 0, "PieChart"); diff --git a/examples/declarative/tutorials/extending/chapter2-methods/main.cpp b/examples/declarative/tutorials/extending/chapter2-methods/main.cpp index 4c11768..ca6a97e 100644 --- a/examples/declarative/tutorials/extending/chapter2-methods/main.cpp +++ b/examples/declarative/tutorials/extending/chapter2-methods/main.cpp @@ -40,11 +40,11 @@ //![0] #include "piechart.h" #include -#include +#include int main(int argc, char *argv[]) { - QApplication app(argc, argv); + QGuiApplication app(argc, argv); qmlRegisterType("Charts", 1, 0, "PieChart"); diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp b/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp index 4c11768..ca6a97e 100644 --- a/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp +++ b/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp @@ -40,11 +40,11 @@ //![0] #include "piechart.h" #include -#include +#include int main(int argc, char *argv[]) { - QApplication app(argc, argv); + QGuiApplication app(argc, argv); qmlRegisterType("Charts", 1, 0, "PieChart"); diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp index 1113cc5..d281276 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp @@ -41,13 +41,13 @@ #include "pieslice.h" #include -#include +#include //![0] int main(int argc, char *argv[]) { //![0] - QApplication app(argc, argv); + QGuiApplication app(argc, argv); qmlRegisterType("Charts", 1, 0, "PieChart"); diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp b/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp index 1c43a09..64c18f7 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp @@ -41,11 +41,11 @@ #include "pieslice.h" #include -#include +#include int main(int argc, char *argv[]) { - QApplication app(argc, argv); + QGuiApplication app(argc, argv); qmlRegisterType("Charts", 1, 0, "PieChart"); qmlRegisterType("Charts", 1, 0, "PieSlice"); diff --git a/tests/auto/declarative/qsgborderimage/qsgborderimage.pro b/tests/auto/declarative/qsgborderimage/qsgborderimage.pro index 7b0c1d5..5a68e67 100644 --- a/tests/auto/declarative/qsgborderimage/qsgborderimage.pro +++ b/tests/auto/declarative/qsgborderimage/qsgborderimage.pro @@ -1,5 +1,4 @@ load(qttest_p4) -contains(QT_CONFIG,declarative): QT += declarative gui network macx:CONFIG -= app_bundle HEADERS += ../shared/testhttpserver.h @@ -15,6 +14,6 @@ symbian: { CONFIG += parallel_test -QT += core-private gui-private declarative-private +QT += core-private gui-private declarative-private network widgets qpa:CONFIG+=insignificant_test # QTBUG-21004 fails, unstably diff --git a/tests/auto/declarative/qsgpathview/qsgpathview.pro b/tests/auto/declarative/qsgpathview/qsgpathview.pro index 312443f..a9b3838 100644 --- a/tests/auto/declarative/qsgpathview/qsgpathview.pro +++ b/tests/auto/declarative/qsgpathview/qsgpathview.pro @@ -1,5 +1,4 @@ load(qttest_p4) -contains(QT_CONFIG,declarative): QT += declarative macx:CONFIG -= app_bundle SOURCES += tst_qsgpathview.cpp @@ -15,4 +14,4 @@ symbian: { CONFIG += parallel_test #temporary CONFIG += insignificant_test -QT += core-private gui-private v8-private declarative-private +QT += core-private gui-private v8-private declarative-private widgets diff --git a/tests/auto/declarative/qsgvisualdatamodel/qsgvisualdatamodel.pro b/tests/auto/declarative/qsgvisualdatamodel/qsgvisualdatamodel.pro index 7770f8f..3104706 100644 --- a/tests/auto/declarative/qsgvisualdatamodel/qsgvisualdatamodel.pro +++ b/tests/auto/declarative/qsgvisualdatamodel/qsgvisualdatamodel.pro @@ -1,5 +1,4 @@ load(qttest_p4) -contains(QT_CONFIG,declarative): QT += declarative gui macx:CONFIG -= app_bundle SOURCES += tst_qsgvisualdatamodel.cpp @@ -14,4 +13,4 @@ symbian: { CONFIG += parallel_test -QT += core-private gui-private v8-private declarative-private +QT += core-private gui-private v8-private declarative-private widgets