From 0d812cd59b0c26f92f062920650ad59756c0f600 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 3 Feb 2022 12:29:52 +0100 Subject: [PATCH] QmlDesigner: Update wizard templates These are the latest changes from qtquickdesigner/6.0 branch. Since 7.0 these templates are now part of qt-creator. Change-Id: I533c005734518eaf7dcd94f3f94167d973af68a5 Reviewed-by: Thomas Hartmann --- .../projects/application-3d/wizard.json | 6 ++-- .../projects/application-mcu/wizard.json | 4 +-- .../projects/application/wizard.json | 6 ++-- .../projects/common/app.qmlproject.tpl | 35 ++++++++++++++++--- .../projects/desktop-launcher/wizard.json | 6 ++-- .../projects/mobile-scroll/wizard.json | 4 +-- .../projects/mobile-stack/wizard.json | 4 +-- .../projects/mobile-swipe/wizard.json | 4 +-- 8 files changed, 48 insertions(+), 21 deletions(-) diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json index cc5d8246293..dbbf7331195 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json @@ -65,7 +65,7 @@ })" }, { - "trKey": "2560 x 1440 (QHD)", + "trKey": "2560 x 1440", "value": "({ 'ScreenWidth': '2560', @@ -73,7 +73,7 @@ })" }, { - "trKey": "1920 x 1080 (FullHD)", + "trKey": "1920 x 1080", "value": "({ 'ScreenWidth': '1920', @@ -97,7 +97,7 @@ })" }, { - "trKey": "1280 x 720 (HD)", + "trKey": "1280 x 720", "value": "({ 'ScreenWidth': '1280', diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/wizard.json index 1ba63959053..a6288939eac 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/wizard.json @@ -70,7 +70,7 @@ })" }, { - "trKey": "720 x 1280 (HD)", + "trKey": "720 x 1280", "value": "({ 'ScreenWidth': '720', @@ -78,7 +78,7 @@ })" }, { - "trKey": "1280 x 720 (HD)", + "trKey": "1280 x 720", "value": "({ 'ScreenWidth': '1280', diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json index 54d495f9fbc..db5c4128bed 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json @@ -67,7 +67,7 @@ })" }, { - "trKey": "2560 x 1440 (QHD)", + "trKey": "2560 x 1440", "value": "({ 'ScreenWidth': '2560', @@ -75,7 +75,7 @@ })" }, { - "trKey": "1920 x 1080 (FullHD)", + "trKey": "1920 x 1080", "value": "({ 'ScreenWidth': '1920', @@ -99,7 +99,7 @@ })" }, { - "trKey": "1280 x 720 (HD)", + "trKey": "1280 x 720", "value": "({ 'ScreenWidth': '1280', diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/common/app.qmlproject.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/common/app.qmlproject.tpl index fcea02a93b5..f24482bcac8 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/common/app.qmlproject.tpl +++ b/share/qtcreator/qmldesigner/studio_templates/projects/common/app.qmlproject.tpl @@ -9,15 +9,23 @@ Project { /* Include .qml, .js, and image files from current directory and subdirectories */ QmlFiles { - directory: "." + directory: "content" + } + + QmlFiles { + directory: "imports" } JavaScriptFiles { - directory: "." + directory: "content" + } + + JavaScriptFiles { + directory: "imports" } ImageFiles { - directory: "." + directory: "content" } Files { @@ -34,6 +42,18 @@ Project { filter: "*.ttf;*.otf" } + Files { + filter: "*.wav;*.mp3" + } + + Files { + filter: "*.mp4" + } + + Files { + filter: "*.glsl;*.glslv;*.glslf;*.vsh;*.fsh;*.vert;*.frag" + } + Files { filter: "*.mesh" directory: "asset_imports" @@ -61,13 +81,20 @@ Project { @endif /* List of plugin directories passed to QML runtime */ - importPaths: [ ".", "imports", "asset_imports" ] + importPaths: [ "imports", "asset_imports" ] /* Required for deployment */ targetDirectory: "/opt/%{ProjectName}" + qdsVersion: "3.0" + @if %{IsQt6Project} /* If any modules the project imports require widgets (e.g. QtCharts), widgetApp must be true */ widgetApp: true @endif + + multilanguageSupport: true + supportedLanguages: ["en"] + primaryLanguage: "en" + } diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json index bd055220e13..5b157ec2c57 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json @@ -55,7 +55,7 @@ "items": [ { - "trKey": "2960 x 1440 (QHD)", + "trKey": "2960 x 1440", "value": "({ 'ScreenWidth': '2960', @@ -71,7 +71,7 @@ })" }, { - "trKey": "1920 x 1080 (FullHD)", + "trKey": "1920 x 1080", "value": "({ 'ScreenWidth': '1920', @@ -95,7 +95,7 @@ })" }, { - "trKey": "1280 x 720 (HD)", + "trKey": "1280 x 720", "value": "({ 'ScreenWidth': '1280', diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json index 1673f857ad6..318dbdac5e1 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json @@ -55,7 +55,7 @@ "items": [ { - "trKey": "1080 x 1920 (FullHD)", + "trKey": "1080 x 1920", "value": "({ 'ScreenWidth': '1080', @@ -79,7 +79,7 @@ })" }, { - "trKey": "720 x 1280 (HD)", + "trKey": "720 x 1280", "value": "({ 'ScreenWidth': '720', diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json index 8bba34e22d9..986c8cbdb8c 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json @@ -53,7 +53,7 @@ "items": [ { - "trKey": "1080 x 1920 (FullHD)", + "trKey": "1080 x 1920", "value": "({ 'ScreenWidth': '1080', @@ -77,7 +77,7 @@ })" }, { - "trKey": "720 x 1280 (HD)", + "trKey": "720 x 1280", "value": "({ 'ScreenWidth': '720', diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json index 5a7faa7364d..3773a615f50 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json @@ -53,7 +53,7 @@ "items": [ { - "trKey": "1080 x 1920 (FullHD)", + "trKey": "1080 x 1920", "value": "({ 'ScreenWidth': '1080', @@ -77,7 +77,7 @@ })" }, { - "trKey": "720 x 1280 (HD)", + "trKey": "720 x 1280", "value": "({ 'ScreenWidth': '720',