From eb3d8f544426fa407dccb52b992f0249e2eca2b1 Mon Sep 17 00:00:00 2001 From: Knud Dollereder Date: Thu, 12 Sep 2024 14:51:58 +0200 Subject: [PATCH] Remove DirectoryFontLoader.qml from the project templates Fixes: QDS-13018 Change-Id: I0aba89b91166de9f149792549dd5ae293b495ddb Reviewed-by: Alessandro Portale Reviewed-by: Thomas Hartmann --- .../projects/application-3d/wizard.json | 4 --- .../application-extended-3d/wizard.json | 4 --- .../projects/application/wizard.json | 4 --- .../projects/desktop-launcher/wizard.json | 4 --- .../projects/mobile-scroll/wizard.json | 4 --- .../projects/mobile-stack/wizard.json | 4 --- .../projects/mobile-swipe/wizard.json | 4 --- .../name/CMakeLists.importmodule.txt.tpl | 1 - .../name/DirectoryFontLoader.qml.tpl | 34 ------------------- .../name/importmodule.qmldir.tpl | 1 - .../projects/shared-plugin/name/qmldir | 4 --- .../projects/qtquickapplication/wizard.json | 5 --- 12 files changed, 73 deletions(-) delete mode 100644 share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/DirectoryFontLoader.qml.tpl delete mode 100644 share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/qmldir 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 81c0baae42d..afb00fa253c 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json @@ -343,10 +343,6 @@ "source": "../shared-plugin/name/Constants.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, - { - "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" - }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-extended-3d/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application-extended-3d/wizard.json index fa7677fa5ea..ccfcd01a983 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-extended-3d/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-extended-3d/wizard.json @@ -319,10 +319,6 @@ "source": "../shared-plugin/name/Constants.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, - { - "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" - }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json index 5c2ee9ab3bd..0aab9b601f3 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json @@ -341,10 +341,6 @@ "source": "../shared-plugin/name/Constants.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, - { - "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" - }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" 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 82bafe5b56b..2fc56890b39 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json @@ -340,10 +340,6 @@ "source": "../shared-plugin/name/Constants.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, - { - "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" - }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" 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 4206c05b5b7..96a35076775 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json @@ -299,10 +299,6 @@ "source": "../shared-plugin/name/Constants.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, - { - "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" - }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" 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 322a83cc8bf..6a0d9455aa1 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json @@ -301,10 +301,6 @@ "source": "../shared-plugin/name/Constants.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, - { - "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" - }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" 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 9eb1b367c0b..f7be95e0e37 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json @@ -301,10 +301,6 @@ "source": "../shared-plugin/name/Constants.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml" }, - { - "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml" - }, { "source": "../shared-plugin/name/EventListModel.qml.tpl", "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml" diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/CMakeLists.importmodule.txt.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/CMakeLists.importmodule.txt.tpl index e3cc78f3421..c978c969699 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/CMakeLists.importmodule.txt.tpl +++ b/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/CMakeLists.importmodule.txt.tpl @@ -13,7 +13,6 @@ qt6_add_qml_module(%{ImportModuleName} RESOURCE_PREFIX "/qt/qml" QML_FILES Constants.qml - DirectoryFontLoader.qml EventListModel.qml EventListSimulator.qml ) diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/DirectoryFontLoader.qml.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/DirectoryFontLoader.qml.tpl deleted file mode 100644 index 756b8f9d06d..00000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/DirectoryFontLoader.qml.tpl +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2019 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only - -import QtQuick -import Qt.labs.folderlistmodel - -QtObject { - id: loader - - property url fontDirectory: Qt.resolvedUrl("../../%{ContentDir}/" + relativeFontDirectory) - property string relativeFontDirectory: "fonts" - - function loadFont(url) { - var fontLoader = Qt.createQmlObject('import QtQuick 2.15; FontLoader { source: "' + url + '"; }', - loader, - "dynamicFontLoader"); - } - - property FolderListModel folderModel: FolderListModel { - id: folderModel - folder: loader.fontDirectory - nameFilters: [ "*.ttf", "*.otf" ] - showDirs: false - - onStatusChanged: { - if (folderModel.status == FolderListModel.Ready) { - var i - for (i = 0; i < count; i++) { - loadFont(folderModel.get(i, "fileURL")) - } - } - } - } -} diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/importmodule.qmldir.tpl b/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/importmodule.qmldir.tpl index be4e251f8c2..74a0005e5ef 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/importmodule.qmldir.tpl +++ b/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/importmodule.qmldir.tpl @@ -2,4 +2,3 @@ module %{ImportModuleName} singleton Constants 1.0 Constants.qml EventListSimulator 1.0 EventListSimulator.qml EventListModel 1.0 EventListModel.qml -DirectoryFontLoader 1.0 DirectoryFontLoader.qml diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/qmldir b/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/qmldir deleted file mode 100644 index 3ba5adcc643..00000000000 --- a/share/qtcreator/qmldesigner/studio_templates/projects/shared-plugin/name/qmldir +++ /dev/null @@ -1,4 +0,0 @@ -singleton Constants 1.0 Constants.qml -EventListModel 1.0 EventListModel.qml -EventListSimulator 1.0 EventListSimulator.qml -DirectoryFontLoader 1.0 DirectoryFontLoader.qml diff --git a/share/qtcreator/templates/wizards/projects/qtquickapplication/wizard.json b/share/qtcreator/templates/wizards/projects/qtquickapplication/wizard.json index a41ee12e516..14e1c60b8fc 100644 --- a/share/qtcreator/templates/wizards/projects/qtquickapplication/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtquickapplication/wizard.json @@ -242,11 +242,6 @@ "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml", "condition": "%{QdsProjectStyle}" }, - { - "source": "%{QdsWizardPath}/shared-plugin/name/DirectoryFontLoader.qml.tpl", - "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml", - "condition": "%{QdsProjectStyle}" - }, { "source": "%{QdsWizardPath}/shared-plugin/name/EventListModel.qml.tpl", "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListModel.qml",