forked from qt-creator/qt-creator
Remove DirectoryFontLoader.qml from the project templates
Fixes: QDS-13018 Change-Id: I0aba89b91166de9f149792549dd5ae293b495ddb Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -343,10 +343,6 @@
|
|||||||
"source": "../shared-plugin/name/Constants.qml.tpl",
|
"source": "../shared-plugin/name/Constants.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl",
|
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
||||||
|
@@ -319,10 +319,6 @@
|
|||||||
"source": "../shared-plugin/name/Constants.qml.tpl",
|
"source": "../shared-plugin/name/Constants.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl",
|
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
||||||
|
@@ -341,10 +341,6 @@
|
|||||||
"source": "../shared-plugin/name/Constants.qml.tpl",
|
"source": "../shared-plugin/name/Constants.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl",
|
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
||||||
|
@@ -340,10 +340,6 @@
|
|||||||
"source": "../shared-plugin/name/Constants.qml.tpl",
|
"source": "../shared-plugin/name/Constants.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl",
|
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
||||||
|
@@ -299,10 +299,6 @@
|
|||||||
"source": "../shared-plugin/name/Constants.qml.tpl",
|
"source": "../shared-plugin/name/Constants.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl",
|
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
||||||
|
@@ -301,10 +301,6 @@
|
|||||||
"source": "../shared-plugin/name/Constants.qml.tpl",
|
"source": "../shared-plugin/name/Constants.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl",
|
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
||||||
|
@@ -301,10 +301,6 @@
|
|||||||
"source": "../shared-plugin/name/Constants.qml.tpl",
|
"source": "../shared-plugin/name/Constants.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl",
|
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/DirectoryFontLoader.qml"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
"source": "../shared-plugin/name/EventListModel.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
"target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
|
||||||
|
@@ -13,7 +13,6 @@ qt6_add_qml_module(%{ImportModuleName}
|
|||||||
RESOURCE_PREFIX "/qt/qml"
|
RESOURCE_PREFIX "/qt/qml"
|
||||||
QML_FILES
|
QML_FILES
|
||||||
Constants.qml
|
Constants.qml
|
||||||
DirectoryFontLoader.qml
|
|
||||||
EventListModel.qml
|
EventListModel.qml
|
||||||
EventListSimulator.qml
|
EventListSimulator.qml
|
||||||
)
|
)
|
||||||
|
@@ -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"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -2,4 +2,3 @@ module %{ImportModuleName}
|
|||||||
singleton Constants 1.0 Constants.qml
|
singleton Constants 1.0 Constants.qml
|
||||||
EventListSimulator 1.0 EventListSimulator.qml
|
EventListSimulator 1.0 EventListSimulator.qml
|
||||||
EventListModel 1.0 EventListModel.qml
|
EventListModel 1.0 EventListModel.qml
|
||||||
DirectoryFontLoader 1.0 DirectoryFontLoader.qml
|
|
||||||
|
@@ -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
|
|
@@ -242,11 +242,6 @@
|
|||||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml",
|
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml",
|
||||||
"condition": "%{QdsProjectStyle}"
|
"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",
|
"source": "%{QdsWizardPath}/shared-plugin/name/EventListModel.qml.tpl",
|
||||||
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListModel.qml",
|
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListModel.qml",
|
||||||
|
Reference in New Issue
Block a user