From 278139c5d7bfa338ff75c5225077976ece7490e0 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 11 Jun 2013 14:44:10 +0200 Subject: [PATCH] move quick dialogs example into an artificial subdirectory again MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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ö Reviewed-by: Caroline Chao --- examples/quick/dialogs/dialogs.pro | 19 +++---------------- .../dialogs/{ => systemdialogs}/ColorDialogs.qml | 0 .../dialogs/{ => systemdialogs}/FileDialogs.qml | 0 .../doc/images/systemdialogs-example.jpg} | Bin .../doc/src/systemdialogs.qdoc} | 16 ++++++++++------ examples/quick/dialogs/{ => systemdialogs}/main.cpp | 4 ++-- .../quick/dialogs/systemdialogs/systemdialogs.pro | 17 +++++++++++++++++ .../{dialogs.qml => systemdialogs/systemdialogs.qml} | 0 .../{dialogs.qrc => systemdialogs/systemdialogs.qrc} | 2 +- 9 files changed, 33 insertions(+), 25 deletions(-) rename examples/quick/dialogs/{ => systemdialogs}/ColorDialogs.qml (100%) rename examples/quick/dialogs/{ => systemdialogs}/FileDialogs.qml (100%) rename examples/quick/dialogs/{doc/images/dialogs-example.jpg => systemdialogs/doc/images/systemdialogs-example.jpg} (100%) rename examples/quick/dialogs/{doc/src/dialogs.qdoc => systemdialogs/doc/src/systemdialogs.qdoc} (78%) rename examples/quick/dialogs/{ => systemdialogs}/main.cpp (96%) create mode 100644 examples/quick/dialogs/systemdialogs/systemdialogs.pro rename examples/quick/dialogs/{dialogs.qml => systemdialogs/systemdialogs.qml} (100%) rename examples/quick/dialogs/{dialogs.qrc => systemdialogs/systemdialogs.qrc} (78%) diff --git a/examples/quick/dialogs/dialogs.pro b/examples/quick/dialogs/dialogs.pro index b76f396..538e756 100644 --- a/examples/quick/dialogs/dialogs.pro +++ b/examples/quick/dialogs/dialogs.pro @@ -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 diff --git a/examples/quick/dialogs/ColorDialogs.qml b/examples/quick/dialogs/systemdialogs/ColorDialogs.qml similarity index 100% rename from examples/quick/dialogs/ColorDialogs.qml rename to examples/quick/dialogs/systemdialogs/ColorDialogs.qml diff --git a/examples/quick/dialogs/FileDialogs.qml b/examples/quick/dialogs/systemdialogs/FileDialogs.qml similarity index 100% rename from examples/quick/dialogs/FileDialogs.qml rename to examples/quick/dialogs/systemdialogs/FileDialogs.qml diff --git a/examples/quick/dialogs/doc/images/dialogs-example.jpg b/examples/quick/dialogs/systemdialogs/doc/images/systemdialogs-example.jpg similarity index 100% rename from examples/quick/dialogs/doc/images/dialogs-example.jpg rename to examples/quick/dialogs/systemdialogs/doc/images/systemdialogs-example.jpg diff --git a/examples/quick/dialogs/doc/src/dialogs.qdoc b/examples/quick/dialogs/systemdialogs/doc/src/systemdialogs.qdoc similarity index 78% rename from examples/quick/dialogs/doc/src/dialogs.qdoc rename to examples/quick/dialogs/systemdialogs/doc/src/systemdialogs.qdoc index daac914..9788be7 100644 --- a/examples/quick/dialogs/doc/src/dialogs.qdoc +++ b/examples/quick/dialogs/systemdialogs/doc/src/systemdialogs.qdoc @@ -25,10 +25,10 @@ ** ****************************************************************************/ /*! - \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} @@ -36,9 +36,13 @@ 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. */ diff --git a/examples/quick/dialogs/main.cpp b/examples/quick/dialogs/systemdialogs/main.cpp similarity index 96% rename from examples/quick/dialogs/main.cpp rename to examples/quick/dialogs/systemdialogs/main.cpp index bbf0c48..2119227 100644 --- a/examples/quick/dialogs/main.cpp +++ b/examples/quick/dialogs/systemdialogs/main.cpp @@ -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 index 0000000..e8c3e98 --- /dev/null +++ b/examples/quick/dialogs/systemdialogs/systemdialogs.pro @@ -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 diff --git a/examples/quick/dialogs/dialogs.qml b/examples/quick/dialogs/systemdialogs/systemdialogs.qml similarity index 100% rename from examples/quick/dialogs/dialogs.qml rename to examples/quick/dialogs/systemdialogs/systemdialogs.qml diff --git a/examples/quick/dialogs/dialogs.qrc b/examples/quick/dialogs/systemdialogs/systemdialogs.qrc similarity index 78% rename from examples/quick/dialogs/dialogs.qrc rename to examples/quick/dialogs/systemdialogs/systemdialogs.qrc index efebfe4..b90b99f 100644 --- a/examples/quick/dialogs/dialogs.qrc +++ b/examples/quick/dialogs/systemdialogs/systemdialogs.qrc @@ -1,6 +1,6 @@ - dialogs.qml + systemdialogs.qml FileDialogs.qml ColorDialogs.qml -- 2.7.4