move quick dialogs example into an artificial subdirectory again
authorShawn Rutledge <shawn.rutledge@digia.com>
Tue, 11 Jun 2013 12:44:10 +0000 (14:44 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 12 Jun 2013 14:33:37 +0000 (16:33 +0200)
The trouble with Id28d5718b4b7b475dcd7d62e31c4634219dc3ddc is that
the build assumes that all example directories are subdirectories, so
the examples-manifest.xml will point to the wrong place and creator
ends up not having the example on the welcome page.  That's more rigid
than it should be, but we might as well use the opportunity to
distinguish system dialogs from any QML-only dialogs that might be
added to this module later on.

Change-Id: I6e7261e096d75df560c6ce608af4c54b82e52d13
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
examples/quick/dialogs/dialogs.pro
examples/quick/dialogs/systemdialogs/ColorDialogs.qml [moved from examples/quick/dialogs/ColorDialogs.qml with 100% similarity]
examples/quick/dialogs/systemdialogs/FileDialogs.qml [moved from examples/quick/dialogs/FileDialogs.qml with 100% similarity]
examples/quick/dialogs/systemdialogs/doc/images/systemdialogs-example.jpg [moved from examples/quick/dialogs/doc/images/dialogs-example.jpg with 100% similarity]
examples/quick/dialogs/systemdialogs/doc/src/systemdialogs.qdoc [moved from examples/quick/dialogs/doc/src/dialogs.qdoc with 78% similarity]
examples/quick/dialogs/systemdialogs/main.cpp [moved from examples/quick/dialogs/main.cpp with 96% similarity]
examples/quick/dialogs/systemdialogs/systemdialogs.pro [new file with mode: 0644]
examples/quick/dialogs/systemdialogs/systemdialogs.qml [moved from examples/quick/dialogs/dialogs.qml with 100% similarity]
examples/quick/dialogs/systemdialogs/systemdialogs.qrc [moved from examples/quick/dialogs/dialogs.qrc with 78% similarity]

index b76f396..538e756 100644 (file)
@@ -1,17 +1,4 @@
-TEMPLATE = app
+TEMPLATE = subdirs
 
-QT += quick qml
-SOURCES += main.cpp
-RESOURCES += dialogs.qrc ../shared/shared.qrc
-
-OTHER_FILES += \
-    dialogs.qml \
-    FileDialogs.qml \
-    ColorDialogs.qml
-
-EXAMPLE_FILES = \
-    FileDialogs.qml \
-    ColorDialogs.qml
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/dialogs
-INSTALLS += target
+SUBDIRS = \
+    systemdialogs
 **
 ****************************************************************************/
 /*!
-    \title Qt Quick Dialog Examples
-    \example dialogs
-    \brief This example demonstrates the dialog types in QML
-    \image dialogs-example.jpg
+    \title Qt Quick System Dialog Examples
+    \example systemdialogs
+    \brief This example demonstrates the system dialog types in QML
+    \image systemdialogs-example.jpg
     \ingroup qtquickdialog_examples
 
     This example demonstrates the system dialogs in the \l{Qt Quick Dialogs}
 
     A \l FileDialog is used to choose a single file, multiple files or a
     single directory, depending on how it is configured.
-    \snippet dialogs/FileDialogs.qml filedialog
+    \snippet systemdialogs/FileDialogs.qml filedialog
 
     A \l ColorDialog is used to choose a color, with or without alpha (transparency)
     depending on how it is configured.
-    \snippet dialogs/ColorDialogs.qml colordialog
+    \snippet systemdialogs/ColorDialogs.qml colordialog
+
+    The example can be built as a standalone executable, but each
+    type of dialog is demonstrated in a separate QML file which can
+    also be run separately with qmlscene.
 */
similarity index 96%
rename from examples/quick/dialogs/main.cpp
rename to examples/quick/dialogs/systemdialogs/main.cpp
index bbf0c48..2119227 100644 (file)
@@ -37,5 +37,5 @@
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
-#include "../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(dialogs/dialogs)
+#include "../../shared/shared.h"
+DECLARATIVE_EXAMPLE_MAIN(dialogs/systemdialogs)
diff --git a/examples/quick/dialogs/systemdialogs/systemdialogs.pro b/examples/quick/dialogs/systemdialogs/systemdialogs.pro
new file mode 100644 (file)
index 0000000..e8c3e98
--- /dev/null
@@ -0,0 +1,17 @@
+TEMPLATE = app
+
+QT += quick qml
+SOURCES += main.cpp
+RESOURCES += systemdialogs.qrc ../../shared/shared.qrc
+
+OTHER_FILES += \
+    systemdialogs.qml \
+    FileDialogs.qml \
+    ColorDialogs.qml
+
+EXAMPLE_FILES = \
+    FileDialogs.qml \
+    ColorDialogs.qml
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/dialogs
+INSTALLS += target
similarity index 78%
rename from examples/quick/dialogs/dialogs.qrc
rename to examples/quick/dialogs/systemdialogs/systemdialogs.qrc
index efebfe4..b90b99f 100644 (file)
@@ -1,6 +1,6 @@
 <RCC>
     <qresource prefix="/dialogs">
-        <file>dialogs.qml</file>
+        <file>systemdialogs.qml</file>
         <file>FileDialogs.qml</file>
         <file>ColorDialogs.qml</file>
     </qresource>