From 9acb4b4f787882e989e4e0c751fb9c1657fe2106 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Mon, 4 Jul 2011 12:32:16 +0200 Subject: [PATCH] Remove references to demos. Change-Id: I21f935b6de8bdf6a5205f6048cdabf97e16b613a Reviewed-on: http://codereview.qt.nokia.com/1060 Reviewed-by: Qt Sanity Bot Reviewed-by: Casper van Donderen --- doc/src/declarative/advtutorial.qdoc | 4 +- doc/src/declarative/examples.qdoc | 48 ++++++++++---------- doc/src/declarative/network.qdoc | 2 +- doc/src/declarative/qdeclarativemodels.qdoc | 2 +- examples/declarative/README | 34 +------------- examples/declarative/minehunt/minehunt.pro | 6 +- .../declarative/modelviews/parallax/parallax.qml | 2 +- .../declarative/particles/exampleslauncher.qml | 12 ++--- examples/declarative/samegame/samegame.qml | 2 +- examples/embedded/qmlcalculator/qmlcalculator.pro | 2 +- examples/embedded/qmlclocks/qmlclocks.pro | 2 +- .../embedded/qmldialcontrol/qmldialcontrol.pro | 2 +- examples/embedded/qmleasing/qmleasing.pro | 2 +- examples/embedded/qmlflickr/qmlflickr.pro | 2 +- .../embedded/qmlphotoviewer/qmlphotoviewer.pro | 2 +- examples/embedded/qmltwitter/qmltwitter.pro | 2 +- src/declarative/util/qdeclarativepackage.cpp | 2 +- tests/auto/declarative/examples/tst_examples.cpp | 16 +++---- 18 files changed, 55 insertions(+), 89 deletions(-) diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc index 970e96c..b2f9dec 100644 --- a/doc/src/declarative/advtutorial.qdoc +++ b/doc/src/declarative/advtutorial.qdoc @@ -36,7 +36,7 @@ It assumes that you already know the basics of QML (for example, from reading th \l{QML Tutorial}{simple tutorial}). In this tutorial we write a game, \e {Same Game}, based on the Same Game application -included in the declarative \c demos directory, which looks like this: +included in the declarative \c examples directory, which looks like this: \image declarative-samegame.png @@ -461,5 +461,5 @@ By following this tutorial you've seen how you can write a fully functional appl \endlist There is so much more to learn about QML that we haven't been able to cover in this tutorial. Check out all the -demos and examples and the \l {Qt Quick}{documentation} to see all the things you can do with QML! +examples and the \l {Qt Quick}{documentation} to see all the things you can do with QML! */ diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc index c3a6c31..a322491 100644 --- a/doc/src/declarative/examples.qdoc +++ b/doc/src/declarative/examples.qdoc @@ -27,33 +27,37 @@ /*! \page qdeclarativeexamples.html - \title QML Examples and Demos + \title QML Examples \brief Building UIs with QML \ingroup all-examples -Qt includes a set of examples and demos that show how to use various aspects -of QML. The examples are small demonstrations of particular QML components, -while the demos contain more complete and functional applications. +Qt includes a set of examples that show how to use various aspects +of QML. The examples are demonstrations of particular QML components, +some are small code snippets, while others contain more complete and +functional applications. -To run the examples and demos, open them in Qt Creator or use the included +To run the examples, open them in Qt Creator or use the included \l {QML Viewer} tool. The \l {QML Viewer} can be run from the command line: \code - qmlviewer $QTDIR/demos/declarative/samegame/samegame.qml + qmlviewer $QTDIR/examples/declarative/samegame/samegame.qml \endcode On Mac OS X, you can run the included "QMLViewer" application from the Finder, or use the command line: \code - QMLViewer.app/Contents/MacOS/QMLViewer $QTDIR/demos/declarative/samegame/samegame.qml + QMLViewer.app/Contents/MacOS/QMLViewer $QTDIR/examples/declarative/samegame/samegame.qml \endcode -\section1 Demos +The examples can be found in Qt's \c examples/declarative directory. + + +\section1 Functional Applications -The QML demos integrate a variety of features to demonstrate how QML +These QML examples integrate a variety of features to demonstrate how QML can be used to produce sophisticated interfaces and applications: @@ -61,59 +65,55 @@ can be used to produce sophisticated interfaces and applications: \row \o -\l{demos/declarative/calculator}{Calculator} +\l{declarative/calculator}{Calculator} \image qml-calculator-example-small.png \o -\l{demos/declarative/flickr}{Flickr Mobile} +\l{declarative/flickr}{Flickr Mobile} \image qml-flickr-demo-small.png \o -\l{demos/declarative/minehunt}{Minehunt} +\l{declarative/minehunt}{Minehunt} \image qml-minehunt-demo-small.png \row \o -\l{demos/declarative/photoviewer}{Photo Viewer} +\l{declarative/photoviewer}{Photo Viewer} \image qml-photoviewer-demo-small.png \o -\l{demos/declarative/rssnews}{RSS News Reader} +\l{declarative/rssnews}{RSS News Reader} \image qml-rssnews-demo-small.png \o -\l{demos/declarative/samegame}{Same Game} +\l{declarative/samegame}{Same Game} \image qml-samegame-demo-small.png \row \o -\l{demos/declarative/snake}{Snake} +\l{declarative/snake}{Snake} \image qml-snake-demo-small.png \o -\l{demos/declarative/twitter}{Twitter} +\l{declarative/twitter}{Twitter} \image qml-twitter-demo-small.png \o -\l{demos/declarative/webbrowser}{Web Browser} +\l{declarative/webbrowser}{Web Browser} \image qml-webbrowser-demo-small.png \endtable -The demos can be found in Qt's \c demos/declarative directory. +\section1 Code Snippets -\section1 Examples - -The QML examples are small, simple applications that show how to use a particular +These QML examples are small, simple applications that show how to use a particular QML component or feature. If you are new to QML, you may also find the \l{QML Tutorial}{Hello World} and \l {QML Advanced Tutorial}{Same Game} tutorials useful. -The examples can be found in Qt's \c examples/declarative directory. - \section2 Animation \list \o \l{declarative/animation/basics}{Basics} diff --git a/doc/src/declarative/network.qdoc b/doc/src/declarative/network.qdoc index cb83542..f04d198 100644 --- a/doc/src/declarative/network.qdoc +++ b/doc/src/declarative/network.qdoc @@ -114,7 +114,7 @@ content by URLs that can then be used directly in QML. For example, using these to access an on-line photography service would provide the QML application with URLs to photographs, which can be directly set on an \l Image \c source property. -See the \tt demos/declarative/flickr for a real demonstration of this. +See the \tt examples/declarative/flickr for a real demonstration of this. \section1 Configuring the Network Access Manager diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index 36db628..2399a6e 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -125,7 +125,7 @@ XmlListModel { } \endqml -The \l{demos/declarative/rssnews}{RSS News demo} shows how XmlListModel can +The \l{declarative/rssnews}{RSS News demo} shows how XmlListModel can be used to display an RSS feed. diff --git a/examples/declarative/README b/examples/declarative/README index 578c245..56c48d7 100644 --- a/examples/declarative/README +++ b/examples/declarative/README @@ -5,37 +5,9 @@ designers to actually implement their UI vision. QML UIs can integrate with C++ code in many ways, including being loaded as a part of a C++ UI and loading data models from C++ and interacting with them. -The example launcher provided with Qt can be used to explore each of the -examples in this directory. But most can also be viewed directly with the +Mostof these examples can be viewed directly with the QML viewer utility, without requiring compilation. -Documentation for these examples can be found via the Tutorials and Examples -link in the main Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. +Documentation for these examples can be found via the Examples +link in the main Qt documentation. diff --git a/examples/declarative/minehunt/minehunt.pro b/examples/declarative/minehunt/minehunt.pro index a0220f2..67e25dc 100644 --- a/examples/declarative/minehunt/minehunt.pro +++ b/examples/declarative/minehunt/minehunt.pro @@ -8,15 +8,15 @@ SOURCES += main.cpp minehunt.cpp RESOURCES = minehunt.qrc sources.files = minehunt.qml minehunt.pro MinehuntCore -sources.path = $$[QT_INSTALL_DEMOS]/qtdeclarative/declarative/minehunt -target.path = $$[QT_INSTALL_DEMOS]/qtdeclarative/declarative/minehunt +sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/minehunt +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/minehunt INSTALLS = sources target symbian:{ TARGET.EPOCALLOWDLLDATA = 1 TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - CONFIG += qt_demo + CONFIG += qt_example qmlminehuntfiles.files = MinehuntCore minehunt.qml DEPLOYMENT += qmlminehuntfiles } diff --git a/examples/declarative/modelviews/parallax/parallax.qml b/examples/declarative/modelviews/parallax/parallax.qml index 5fa24ad..0fdc5e3 100644 --- a/examples/declarative/modelviews/parallax/parallax.qml +++ b/examples/declarative/modelviews/parallax/parallax.qml @@ -70,7 +70,7 @@ Rectangle { anchors { top: parent.top; topMargin: 10; horizontalCenter: parent.horizontalCenter } width: 300; height: 400 clip: true; - source: "../../../../demos/declarative/samegame/samegame.qml" + source: "../../samegame/samegame.qml" Component.onCompleted: item.inAnotherDemo = true; } } diff --git a/examples/declarative/particles/exampleslauncher.qml b/examples/declarative/particles/exampleslauncher.qml index 54f5765..5d2f49e 100644 --- a/examples/declarative/particles/exampleslauncher.qml +++ b/examples/declarative/particles/exampleslauncher.qml @@ -52,7 +52,7 @@ Rectangle{ id: shell anchors.fill: parent } - VisualDataModel{//TODO: Transitions + VisualDataModel{//TODO: Transitions between modes id: vdm model: [ "../spaceexplorer/spaceexplorer.qml", @@ -60,8 +60,6 @@ Rectangle{ "../asteroid/asteroid.qml", "../asteroid/blackhole.qml", "../custom/blurparticles.qml", - "../custom/shader.qml", - "../custom/delegates.qml", "../modelparticles/bubbles.qml", "../modelparticles/gridsplosion.qml", "../modelparticles/package.qml", @@ -83,11 +81,9 @@ Rectangle{ "../trails/layered.qml", "../trails/shimmer.qml", "../trails/turbulence.qml", - "../trails/combustion.qml", - "../trails/fireworks.qml", - "../../../../demos/declarative/samegame/samegame.qml", - "../../../../demos/declarative/plasmapatrol/plasmapatrol.qml", - "../../../../demos/declarative/flickr/flickr.qml" + "../../samegame/samegame.qml", + "../../plasmapatrol/plasmapatrol.qml", + "../../flickr/flickr.qml" ] delegate: Rectangle{ color: "white" diff --git a/examples/declarative/samegame/samegame.qml b/examples/declarative/samegame/samegame.qml index 0daf72d..887cfe1 100644 --- a/examples/declarative/samegame/samegame.qml +++ b/examples/declarative/samegame/samegame.qml @@ -47,7 +47,7 @@ import "SamegameCore/samegame.js" as Logic Rectangle { id: screen width: 360; height: 640 - property bool inAnotherDemo: false //Samegame often is just plonked straight into other demos + property bool inAnotherDemo: false //Samegame often is just plonked straight into other examples SystemPalette { id: activePalette } diff --git a/examples/embedded/qmlcalculator/qmlcalculator.pro b/examples/embedded/qmlcalculator/qmlcalculator.pro index 4a82d32..72f45f5 100644 --- a/examples/embedded/qmlcalculator/qmlcalculator.pro +++ b/examples/embedded/qmlcalculator/qmlcalculator.pro @@ -6,7 +6,7 @@ include($$PWD/deployment.pri) symbian { TARGET.UID3 = 0x$$qmlcalculator_uid3 # defined in deployment.pri - CONFIG += qt_demo + CONFIG += qt_example TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 LIBS += -lcone -leikcore -lavkon # Screen orientation } diff --git a/examples/embedded/qmlclocks/qmlclocks.pro b/examples/embedded/qmlclocks/qmlclocks.pro index cc97a73..1b6cdad 100644 --- a/examples/embedded/qmlclocks/qmlclocks.pro +++ b/examples/embedded/qmlclocks/qmlclocks.pro @@ -6,7 +6,7 @@ include($$PWD/deployment.pri) symbian { TARGET.UID3 = 0x$$qmlclocks_uid3 # defined in deployment.pri - CONFIG += qt_demo + CONFIG += qt_example TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 LIBS += -lcone -leikcore -lavkon # Screen orientation } diff --git a/examples/embedded/qmldialcontrol/qmldialcontrol.pro b/examples/embedded/qmldialcontrol/qmldialcontrol.pro index 348c41a..3b2e886 100644 --- a/examples/embedded/qmldialcontrol/qmldialcontrol.pro +++ b/examples/embedded/qmldialcontrol/qmldialcontrol.pro @@ -6,6 +6,6 @@ include($$PWD/deployment.pri) symbian { TARGET.UID3 = 0x$$qmldialcontrol_uid3 # defined in deployment.pri - CONFIG += qt_demo + CONFIG += qt_example TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } diff --git a/examples/embedded/qmleasing/qmleasing.pro b/examples/embedded/qmleasing/qmleasing.pro index 9d7c8d7..bf332aa 100644 --- a/examples/embedded/qmleasing/qmleasing.pro +++ b/examples/embedded/qmleasing/qmleasing.pro @@ -6,6 +6,6 @@ include($$PWD/deployment.pri) symbian { TARGET.UID3 = 0x$$qmleasing_uid3 # defined in deployment.pri - CONFIG += qt_demo + CONFIG += qt_example TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } diff --git a/examples/embedded/qmlflickr/qmlflickr.pro b/examples/embedded/qmlflickr/qmlflickr.pro index a70a6df..60abe31 100644 --- a/examples/embedded/qmlflickr/qmlflickr.pro +++ b/examples/embedded/qmlflickr/qmlflickr.pro @@ -6,7 +6,7 @@ include($$PWD/deployment.pri) symbian { TARGET.UID3 = 0x$$qmlflickr_uid3 # defined in deployment.pri - CONFIG += qt_demo + CONFIG += qt_example TARGET.CAPABILITY = NetworkServices # Maximum heap size set to 128 MB in order to allow loading large images. TARGET.EPOCHEAPSIZE = 0x20000 0x8000000 diff --git a/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro b/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro index ce6ff55..b97bf26 100644 --- a/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro +++ b/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro @@ -6,7 +6,7 @@ include($$PWD/deployment.pri) symbian { TARGET.UID3 = 0x$$qmlphotoviewer_uid3 # defined in deployment.pri - CONFIG += qt_demo + CONFIG += qt_example TARGET.CAPABILITY = NetworkServices TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } diff --git a/examples/embedded/qmltwitter/qmltwitter.pro b/examples/embedded/qmltwitter/qmltwitter.pro index 197afd3..79e25de 100644 --- a/examples/embedded/qmltwitter/qmltwitter.pro +++ b/examples/embedded/qmltwitter/qmltwitter.pro @@ -6,7 +6,7 @@ include($$PWD/deployment.pri) symbian { TARGET.UID3 = 0x$$qmltwitter_uid3 # defined in deployment.pri - CONFIG += qt_demo + CONFIG += qt_example TARGET.CAPABILITY = NetworkServices TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } diff --git a/src/declarative/util/qdeclarativepackage.cpp b/src/declarative/util/qdeclarativepackage.cpp index 951db5b..2f96b3c 100644 --- a/src/declarative/util/qdeclarativepackage.cpp +++ b/src/declarative/util/qdeclarativepackage.cpp @@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE \snippet examples/declarative/modelviews/package/view.qml 0 - \sa {declarative/modelviews/package}{Package example}, {demos/declarative/photoviewer}{Photo Viewer demo}, QtDeclarative + \sa {declarative/modelviews/package}{Package example}, {declarative/photoviewer}{Photo Viewer example}, QtDeclarative */ /*! diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp index 1a07f6b..022b987 100644 --- a/tests/auto/declarative/examples/tst_examples.cpp +++ b/tests/auto/declarative/examples/tst_examples.cpp @@ -82,20 +82,20 @@ tst_examples::tst_examples() #ifdef QT_NO_WEBKIT excludedDirs << "examples/declarative/modelviews/webview"; - excludedDirs << "demos/declarative/webbrowser"; + excludedDirs << "examples/declarative/webbrowser"; excludedDirs << "doc/src/snippets/declarative/webview"; #endif #ifdef QT_NO_XMLPATTERNS excludedDirs << "examples/declarative/xml/xmldata"; - excludedDirs << "demos/declarative/twitter"; - excludedDirs << "demos/declarative/flickr"; - excludedDirs << "demos/declarative/photoviewer"; + excludedDirs << "examples/declarative/twitter"; + excludedDirs << "examples/declarative/flickr"; + excludedDirs << "examples/declarative/photoviewer"; #endif } /* -This tests that the demos and examples follow the naming convention required +This tests that the examples follow the naming convention required to have them tested by the examples() test. */ void tst_examples::namingConvention(const QDir &d) @@ -176,20 +176,18 @@ QStringList tst_examples::findQmlFiles(const QDir &d) This test runs all the examples in the declarative UI source tree and ensures that they start and exit cleanly. -Examples are any .qml files under the examples/ or demos/ directory that start +Examples are any .qml files under the examples/ directory that start with a lower case letter. */ void tst_examples::examples_data() { QTest::addColumn("file"); - QString examples = QLatin1String(SRCDIR) + "/../../../../demos/declarative/"; - QString demos = QLatin1String(SRCDIR) + "/../../../../examples/declarative/"; + QString examples = QLatin1String(SRCDIR) + "/../../../../examples/declarative/"; QString snippets = QLatin1String(SRCDIR) + "/../../../../doc/src/snippets/"; QStringList files; files << findQmlFiles(QDir(examples)); - files << findQmlFiles(QDir(demos)); files << findQmlFiles(QDir(snippets)); foreach (const QString &file, files) -- 1.7.2.5