diff options
author | Bartlomiej Moskal <bartlomiej.moskal@qt.io> | 2022-08-11 15:27:12 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-09-16 09:54:26 +0000 |
commit | 47c5b2f32de382b153bf1c47604981b8fd8eb8a7 (patch) | |
tree | 6af50d71c960f98d8fb5bee6740a3fc513147329 | |
parent | 96ebb96891c3925ce5d873f4471a63db59693825 (diff) |
Examples: Fix .pro files for chattutorial
Chat Tutorial application was not able to find main.qml file when using
qmake. It was caused by cmake adaptation for using qt_add_qml_module.
The main.qml file is currently searched in the chapter directory.
To these changes also qmake configuration must be adapted.
Fixes: QTCREATORBUG-27655
Change-Id: I1e92d806dbfeb17e613596f96fd24f53fb6eba1d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit a9841877f38223ce81692b437d58a0cf07541da1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
6 files changed, 20 insertions, 11 deletions
diff --git a/examples/quickcontrols2/chattutorial/chapter1/chapter1.pro b/examples/quickcontrols2/chattutorial/chapter1/chapter1.pro index 221bb855f5..6b50809f20 100644 --- a/examples/quickcontrols2/chattutorial/chapter1/chapter1.pro +++ b/examples/quickcontrols2/chattutorial/chapter1/chapter1.pro @@ -5,8 +5,9 @@ CONFIG += c++11 SOURCES += main.cpp -RESOURCES += \ - main.qml \ +resources.files = main.qml +resources.prefix = chapter1/ +RESOURCES += resources \ qtquickcontrols2.conf target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/chattutorial/chapter1 diff --git a/examples/quickcontrols2/chattutorial/chapter2/chapter2.pro b/examples/quickcontrols2/chattutorial/chapter2/chapter2.pro index e217934b7e..15429b7c89 100644 --- a/examples/quickcontrols2/chattutorial/chapter2/chapter2.pro +++ b/examples/quickcontrols2/chattutorial/chapter2/chapter2.pro @@ -5,7 +5,7 @@ CONFIG += c++11 SOURCES += main.cpp -RESOURCES += \ +resources.files = \ images/Albert_Einstein.png \ images/Albert_Einstein@2x.png \ images/Albert_Einstein@3x.png \ @@ -18,7 +18,9 @@ RESOURCES += \ images/Hans_Gude@2x.png \ images/Hans_Gude@3x.png \ images/Hans_Gude@4x.png \ - main.qml \ + main.qml +resources.prefix = chapter2/ +RESOURCES += resources \ qtquickcontrols2.conf target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/chattutorial/chapter2 diff --git a/examples/quickcontrols2/chattutorial/chapter3/chapter3.pro b/examples/quickcontrols2/chattutorial/chapter3/chapter3.pro index a5e500d9db..42adc69fe9 100644 --- a/examples/quickcontrols2/chattutorial/chapter3/chapter3.pro +++ b/examples/quickcontrols2/chattutorial/chapter3/chapter3.pro @@ -5,7 +5,7 @@ CONFIG += c++11 SOURCES += main.cpp -RESOURCES += \ +resources.files = \ ContactPage.qml \ ConversationPage.qml \ images/Albert_Einstein.png \ @@ -20,7 +20,9 @@ RESOURCES += \ images/Hans_Gude@2x.png \ images/Hans_Gude@3x.png \ images/Hans_Gude@4x.png \ - main.qml \ + main.qml +resources.prefix = chapter3/ +RESOURCES += resources \ qtquickcontrols2.conf target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/chattutorial/chapter3 diff --git a/examples/quickcontrols2/chattutorial/chapter4/chapter4.pro b/examples/quickcontrols2/chattutorial/chapter4/chapter4.pro index dd2241355b..ae8141f7f1 100644 --- a/examples/quickcontrols2/chattutorial/chapter4/chapter4.pro +++ b/examples/quickcontrols2/chattutorial/chapter4/chapter4.pro @@ -10,7 +10,7 @@ SOURCES += main.cpp \ sqlcontactmodel.cpp \ sqlconversationmodel.cpp -RESOURCES += \ +resources.files = \ ContactPage.qml \ ConversationPage.qml \ images/Albert_Einstein.png \ @@ -25,7 +25,9 @@ RESOURCES += \ images/Hans_Gude@2x.png \ images/Hans_Gude@3x.png \ images/Hans_Gude@4x.png \ - main.qml \ + main.qml +resources.prefix = chapter4/ +RESOURCES += resources \ qtquickcontrols2.conf target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/chattutorial/chapter4 diff --git a/examples/quickcontrols2/chattutorial/chapter5/chapter5.pro b/examples/quickcontrols2/chattutorial/chapter5/chapter5.pro index 1ca8998427..625642d7b5 100644 --- a/examples/quickcontrols2/chattutorial/chapter5/chapter5.pro +++ b/examples/quickcontrols2/chattutorial/chapter5/chapter5.pro @@ -10,7 +10,7 @@ SOURCES += main.cpp \ sqlcontactmodel.cpp \ sqlconversationmodel.cpp -RESOURCES += \ +resources.files = \ +Material/ChatToolBar.qml \ ChatToolBar.qml \ ContactPage.qml \ @@ -27,7 +27,9 @@ RESOURCES += \ images/Hans_Gude@2x.png \ images/Hans_Gude@3x.png \ images/Hans_Gude@4x.png \ - main.qml \ + main.qml +resources.prefix = chapter5/ +RESOURCES += resources \ qtquickcontrols2.conf target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/chattutorial/chapter5 diff --git a/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc b/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc index 990b56715a..f4480873d3 100644 --- a/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc +++ b/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc @@ -203,7 +203,7 @@ project. The \c SOURCES variable lists all of the source files that should be compiled. A similar variable, \c HEADERS, is available for header files. -\printline RESOURCES +\printuntil qtquickcontrols2 The next line tells \c qmake that we have a collection of \l {The Qt Resource System}{resources} that should be built into the |