diff options
23 files changed, 125 insertions, 96 deletions
diff --git a/demos/declarative/calculator/calculator.pro b/demos/declarative/calculator/calculator.pro deleted file mode 100644 index efe6413..0000000 --- a/demos/declarative/calculator/calculator.pro +++ /dev/null @@ -1,13 +0,0 @@ -TEMPLATE=app -CONFIG -= qt separate_debug_info -LIBS = -QT = -QMAKE_LINK = @: dummy - -sources.files = \ - CalcButton.qml \ - calculator.js \ - calculator.qml -sources.path = $$[QT_INSTALL_DEMOS]/declarative/calculator -INSTALLS = sources - diff --git a/demos/declarative/declarative.pro b/demos/declarative/declarative.pro index 037ad85..4d169e3 100644 --- a/demos/declarative/declarative.pro +++ b/demos/declarative/declarative.pro @@ -1,9 +1,17 @@ TEMPLATE = subdirs -SUBDIRS = calculator \ - flickr \ - minehunt \ - samegame \ - snake \ - twitter \ - webbrowser + +# These demos contain C++ and need to be compiled +SUBDIRS = \ + minehunt + +# These examples contain no C++ and can simply be copied +sources.files = \ + calculator \ + flickr \ + samegame \ + snake \ + twitter \ + webbrowser +sources.path = $$[QT_INSTALL_DEMOS]/declarative +INSTALLS += sources diff --git a/demos/declarative/flickr/flickr.pro b/demos/declarative/flickr/flickr.pro deleted file mode 100644 index c4c1d44..0000000 --- a/demos/declarative/flickr/flickr.pro +++ /dev/null @@ -1,16 +0,0 @@ -TEMPLATE=app -CONFIG -= qt separate_debug_info -LIBS = -QT = -QMAKE_LINK = @: dummy - -sources.files = \ - flickr-desktop.qml \ - flickr-mobile-90.qml \ - flickr-mobile.qml \ - common \ - mobile - -sources.path = $$[QT_INSTALL_DEMOS]/declarative/flickr -INSTALLS = sources - diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro index 2f9a8ad..2df33e6 100644 --- a/demos/declarative/minehunt/minehunt.pro +++ b/demos/declarative/minehunt/minehunt.pro @@ -10,7 +10,7 @@ DESTDIR = MinehuntCore SOURCES += minehunt.cpp -sources.files = minehunt.qml +sources.files = minehunt.qml minehunt.pro sources.path = $$[QT_INSTALL_DEMOS]/declarative/minehunt target.path = $$[QT_INSTALL_DEMOS]/declarative/minehunt/MinehuntCore diff --git a/demos/declarative/snake/snake.pro b/demos/declarative/snake/snake.pro deleted file mode 100644 index a206fd4..0000000 --- a/demos/declarative/snake/snake.pro +++ /dev/null @@ -1,13 +0,0 @@ -TEMPLATE=app -CONFIG -= qt separate_debug_info -LIBS = -QT = -QMAKE_LINK = @: dummy - -sources.files = \ - content \ - snake.qml - -sources.path = $$[QT_INSTALL_DEMOS]/declarative/snake -INSTALLS = sources - diff --git a/demos/declarative/twitter/twitter.pro b/demos/declarative/twitter/twitter.pro deleted file mode 100644 index e1dd821..0000000 --- a/demos/declarative/twitter/twitter.pro +++ /dev/null @@ -1,13 +0,0 @@ -TEMPLATE=app -CONFIG -= qt separate_debug_info -LIBS = -QT = -QMAKE_LINK = @: dummy - -sources.files = \ - TwitterCore \ - twitter.qml - -sources.path = $$[QT_INSTALL_DEMOS]/declarative/twitter -INSTALLS = sources - diff --git a/demos/declarative/webbrowser/webbrowser.pro b/demos/declarative/webbrowser/webbrowser.pro deleted file mode 100644 index c033ef9..0000000 --- a/demos/declarative/webbrowser/webbrowser.pro +++ /dev/null @@ -1,13 +0,0 @@ -TEMPLATE=app -CONFIG -= qt separate_debug_info -LIBS = -QT = -QMAKE_LINK = @: dummy - -sources.files = \ - content \ - webbrowser.qml - -sources.path = $$[QT_INSTALL_DEMOS]/declarative/webbrowser -INSTALLS = sources - diff --git a/examples/declarative/declarative.pro b/examples/declarative/declarative.pro new file mode 100644 index 0000000..b8c0200 --- /dev/null +++ b/examples/declarative/declarative.pro @@ -0,0 +1,48 @@ +TEMPLATE = subdirs + +# These examples contain some C++ and need to be built +SUBDIRS = \ + extending \ + imageprovider \ + objectlistmodel \ + plugins + +# These examples contain no C++ and can simply be copied +sources.files = \ + animations \ + aspectratio \ + behaviours \ + border-image \ + clocks \ + colorbrowser \ + connections \ + dial \ + dynamic \ + effects \ + fillmode \ + focusscope \ + fonts \ + gridview \ + layouts \ + listview \ + mousearea \ + package \ + parallax \ + progressbar \ + scrollbar \ + searchbox \ + slideswitch \ + sql \ + states \ + tabwidget \ + tic-tac-toe \ + tutorials \ + tvtennis \ + velocity \ + webview \ + workerlistmodel \ + workerscript \ + xmldata \ + xmlhttprequest +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative +INSTALLS += sources diff --git a/examples/declarative/extending/adding/adding.pro b/examples/declarative/extending/adding/adding.pro index c02a35f..6072de4 100644 --- a/examples/declarative/extending/adding/adding.pro +++ b/examples/declarative/extending/adding/adding.pro @@ -9,3 +9,7 @@ SOURCES += main.cpp \ person.cpp HEADERS += person.h RESOURCES += adding.qrc +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/adding +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS adding.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/adding +INSTALLS += target sources diff --git a/examples/declarative/extending/attached/attached.pro b/examples/declarative/extending/attached/attached.pro index b0f3fea..f6d76ed 100644 --- a/examples/declarative/extending/attached/attached.pro +++ b/examples/declarative/extending/attached/attached.pro @@ -11,3 +11,7 @@ SOURCES += main.cpp \ HEADERS += person.h \ birthdayparty.h RESOURCES += attached.qrc +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/attached +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS attached.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/attached +INSTALLS += target sources diff --git a/examples/declarative/extending/binding/binding.pro b/examples/declarative/extending/binding/binding.pro index 8298565..903712e 100644 --- a/examples/declarative/extending/binding/binding.pro +++ b/examples/declarative/extending/binding/binding.pro @@ -13,3 +13,7 @@ HEADERS += person.h \ birthdayparty.h \ happybirthday.h RESOURCES += binding.qrc +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/binding +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS binding.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/binding +INSTALLS += target sources diff --git a/examples/declarative/extending/coercion/coercion.pro b/examples/declarative/extending/coercion/coercion.pro index 136b210..c8daed8 100644 --- a/examples/declarative/extending/coercion/coercion.pro +++ b/examples/declarative/extending/coercion/coercion.pro @@ -11,3 +11,7 @@ SOURCES += main.cpp \ HEADERS += person.h \ birthdayparty.h RESOURCES += coercion.qrc +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/coercion +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS coercion.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/coercion +INSTALLS += target sources diff --git a/examples/declarative/extending/default/default.pro b/examples/declarative/extending/default/default.pro index 0d5d45c..32aff0b 100644 --- a/examples/declarative/extending/default/default.pro +++ b/examples/declarative/extending/default/default.pro @@ -11,3 +11,7 @@ SOURCES += main.cpp \ HEADERS += person.h \ birthdayparty.h RESOURCES += default.qrc +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/default +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS default.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/default +INSTALLS += target sources diff --git a/examples/declarative/extending/extended/extended.pro b/examples/declarative/extending/extended/extended.pro index 1182226..97af286 100644 --- a/examples/declarative/extending/extended/extended.pro +++ b/examples/declarative/extending/extended/extended.pro @@ -9,3 +9,7 @@ SOURCES += main.cpp \ lineedit.cpp HEADERS += lineedit.h RESOURCES += extended.qrc +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/extended +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS extended.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/extended +INSTALLS += target sources diff --git a/examples/declarative/extending/grouped/grouped.pro b/examples/declarative/extending/grouped/grouped.pro index 8fde8e8..576e1d2 100644 --- a/examples/declarative/extending/grouped/grouped.pro +++ b/examples/declarative/extending/grouped/grouped.pro @@ -11,3 +11,7 @@ SOURCES += main.cpp \ HEADERS += person.h \ birthdayparty.h RESOURCES += grouped.qrc +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/grouped +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS grouped.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/grouped +INSTALLS += target sources diff --git a/examples/declarative/extending/properties/properties.pro b/examples/declarative/extending/properties/properties.pro index 6355644..a8f4301 100644 --- a/examples/declarative/extending/properties/properties.pro +++ b/examples/declarative/extending/properties/properties.pro @@ -11,3 +11,8 @@ SOURCES += main.cpp \ HEADERS += person.h \ birthdayparty.h RESOURCES += properties.qrc + +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/properties +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS properties.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/properties +INSTALLS += target sources diff --git a/examples/declarative/extending/signal/signal.pro b/examples/declarative/extending/signal/signal.pro index 30e413f..6367a38 100644 --- a/examples/declarative/extending/signal/signal.pro +++ b/examples/declarative/extending/signal/signal.pro @@ -11,3 +11,7 @@ SOURCES += main.cpp \ HEADERS += person.h \ birthdayparty.h RESOURCES += signal.qrc +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/signal +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS signal.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/signal +INSTALLS += target sources diff --git a/examples/declarative/extending/valuesource/valuesource.pro b/examples/declarative/extending/valuesource/valuesource.pro index 9e54448..d3409b6 100644 --- a/examples/declarative/extending/valuesource/valuesource.pro +++ b/examples/declarative/extending/valuesource/valuesource.pro @@ -13,3 +13,7 @@ HEADERS += person.h \ birthdayparty.h \ happybirthday.h RESOURCES += valuesource.qrc +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/valuesource +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS valuesource.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/valuesource +INSTALLS += target sources diff --git a/examples/declarative/imageprovider/imageprovider.pro b/examples/declarative/imageprovider/imageprovider.pro index e403bf8..86dbcca 100644 --- a/examples/declarative/imageprovider/imageprovider.pro +++ b/examples/declarative/imageprovider/imageprovider.pro @@ -9,3 +9,13 @@ DESTDIR = ImageProviderCore # Input SOURCES += imageprovider.cpp +sources.files = $$SOURCES imageprovider.qml imageprovider.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/imageprovider + +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/imageprovider/ImageProviderCore + +ImageProviderCore_sources.files = \ + ImageProviderCore/qmldir +ImageProviderCore_sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/imageprovider/ImageProviderCore + +INSTALLS = sources ImageProviderCore_sources target diff --git a/examples/declarative/objectlistmodel/objectlistmodel.pro b/examples/declarative/objectlistmodel/objectlistmodel.pro index ca61e4c..869cde3 100644 --- a/examples/declarative/objectlistmodel/objectlistmodel.pro +++ b/examples/declarative/objectlistmodel/objectlistmodel.pro @@ -9,3 +9,10 @@ SOURCES += main.cpp \ dataobject.cpp HEADERS += dataobject.h RESOURCES += objectlistmodel.qrc + +sources.files = $$SOURCES $$HEADERS $$RESOURCES objectlistmodel.pro view.qml +sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/objectlistmodel +target.path = $$[QT_INSTALL_EXAMPLES]/declarative/objectlistmodel + +INSTALLS += sources target + diff --git a/examples/declarative/plugins/plugins.pro b/examples/declarative/plugins/plugins.pro index c925cea..877a5ce 100644 --- a/examples/declarative/plugins/plugins.pro +++ b/examples/declarative/plugins/plugins.pro @@ -17,7 +17,7 @@ qdeclarativesources.files += \ qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins/com/nokia/TimeExample -sources.files += plugins.pro plugin.cpp plugins.qml +sources.files += plugins.pro plugin.cpp plugins.qml README sources.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins target.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins/com/nokia/TimeExample diff --git a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro index 0543ff6..e2b31c7 100644 --- a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro +++ b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro @@ -1,6 +1,5 @@ load(qttest_p4) -contains(QT_CONFIG,declarative): QT += declarative -QT += script +contains(QT_CONFIG,declarative): QT += declarative script macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativeworkerscript.cpp diff --git a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp index 9adbc28..fe2dac2 100644 --- a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp +++ b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp @@ -60,7 +60,6 @@ public: tst_QDeclarativeWorkerScript() {} private slots: void source(); - void source_data(); void messaging(); void messaging_data(); void messaging_sendQObjectList(); @@ -83,13 +82,7 @@ private: void tst_QDeclarativeWorkerScript::source() { - QFETCH(QUrl, source); - QFETCH(bool, valid); - - if (!valid) { - QByteArray w = "WorkerScript: Cannot find source file \"" + source.toString().toUtf8() + "\""; - QTest::ignoreMessage(QtWarningMsg, w.constData()); - } + QUrl source = QUrl::fromLocalFile(SRCDIR "/data/worker.qml"); QDeclarativeComponent component(&m_engine); component.setData("import Qt 4.6\nWorkerScript { source: '" + source.toString().toUtf8() + "'; }", QUrl()); @@ -103,15 +96,6 @@ void tst_QDeclarativeWorkerScript::source() delete item; } -void tst_QDeclarativeWorkerScript::source_data() -{ - QTest::addColumn<QUrl>("source"); - QTest::addColumn<bool>("valid"); - - QTest::newRow("valid") << QUrl::fromLocalFile(SRCDIR "/data/worker.qml") << true; - QTest::newRow("invalid") << QUrl::fromLocalFile("asdjfk.js") << false; -} - void tst_QDeclarativeWorkerScript::messaging() { QFETCH(QVariant, value); |