From a9841877f38223ce81692b437d58a0cf07541da1 Mon Sep 17 00:00:00 2001 From: Bartlomiej Moskal Date: Thu, 11 Aug 2022 15:27:12 +0200 Subject: 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. Pick-to: 6.4 6.3 6.2 Fixes: QTCREATORBUG-27655 Change-Id: I1e92d806dbfeb17e613596f96fd24f53fb6eba1d Reviewed-by: Qt CI Bot Reviewed-by: Nicholas Bennett Reviewed-by: Ulf Hermann --- examples/quickcontrols2/chattutorial/chapter1/chapter1.pro | 5 +++-- examples/quickcontrols2/chattutorial/chapter2/chapter2.pro | 6 ++++-- examples/quickcontrols2/chattutorial/chapter3/chapter3.pro | 6 ++++-- examples/quickcontrols2/chattutorial/chapter4/chapter4.pro | 6 ++++-- examples/quickcontrols2/chattutorial/chapter5/chapter5.pro | 6 ++++-- .../chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc | 2 +- 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 31c25bfe1a..52228b900d 100644 --- a/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc +++ b/examples/quickcontrols2/chattutorial/doc/src/qtquickcontrols2-chattutorial.qdoc @@ -179,7 +179,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 -- cgit v1.2.3