aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2023-11-21 10:47:15 +0100
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2023-12-11 12:28:32 +0100
commit57508641add4dd6af099b11112ff08370aca3fde (patch)
tree020c45ac1ca684633a5fe3e4679f3c65c1cfff45
parentda3b869f6c93af813bc0e55280fbabae05afe283 (diff)
StyleGenerator: remove unused QML API from the bridgewip/figmastyle
The 'overwriteQml' and 'verbose' options are no longer used from QML. So remove the API from the bridge to clean up a bit. In case of overwriteQml, there is no need to offer this, since the QML files will not (from StyleGenerator's POW) change. The developer should instead remove the QML files manually from the style folder (or remove the whole folder) in order to regenerate them. Change-Id: I6dea2e84db4e962e462636b398bcf4cb35e9cf82 Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
-rw-r--r--tools/qqcstylegenerator/src/bridge.cpp2
-rw-r--r--tools/qqcstylegenerator/src/bridge.h4
-rw-r--r--tools/qqcstylegenerator/src/stylegenerator.h2
3 files changed, 1 insertions, 7 deletions
diff --git a/tools/qqcstylegenerator/src/bridge.cpp b/tools/qqcstylegenerator/src/bridge.cpp
index fcf2da5310..02d436a2ae 100644
--- a/tools/qqcstylegenerator/src/bridge.cpp
+++ b/tools/qqcstylegenerator/src/bridge.cpp
@@ -16,7 +16,6 @@ Bridge::Bridge(bool guiMode)
m_targetDirectory = settings.value("targetDirectory").toString();
m_figmaUrlOrId = settings.value("figmaUrlOrId").toString();
m_figmaToken = settings.value("figmaToken").toString();
- m_overwriteQml = settings.value("overwriteQml").toBool();
m_selectedControls = settings.value("selectedControls", availableControls()).toStringList();
m_selectedImageFormats = settings.value("selectedImageFormats", QStringList() << "png@1x" << "png@2x").toStringList();
m_selectedFallbackStyle = settings.value("selectedFallbackStyle", "Basic").toString();
@@ -30,7 +29,6 @@ Bridge::~Bridge()
settings.setValue("targetDirectory", m_targetDirectory);
settings.setValue("figmaUrlOrId", m_figmaUrlOrId);
settings.setValue("figmaToken", m_figmaToken);
- settings.setValue("overwriteQml", m_overwriteQml);
settings.setValue("selectedControls", m_selectedControls);
settings.setValue("selectedImageFormats", m_selectedImageFormats);
settings.setValue("selectedFallbackStyle", m_selectedFallbackStyle);
diff --git a/tools/qqcstylegenerator/src/bridge.h b/tools/qqcstylegenerator/src/bridge.h
index 22c2da3dc3..e4d609886b 100644
--- a/tools/qqcstylegenerator/src/bridge.h
+++ b/tools/qqcstylegenerator/src/bridge.h
@@ -13,9 +13,7 @@ class Bridge : public QObject {
Q_PROPERTY(QString targetDirectory MEMBER m_targetDirectory NOTIFY targetDirectoryChanged)
Q_PROPERTY(QString figmaUrlOrId MEMBER m_figmaUrlOrId NOTIFY figmaUrlOrIdChanged)
Q_PROPERTY(QString figmaToken MEMBER m_figmaToken NOTIFY figmaTokenChanged)
- Q_PROPERTY(bool verbose MEMBER m_verbose NOTIFY verboseChanged)
Q_PROPERTY(bool sanity MEMBER m_sanity NOTIFY sanityChanged)
- Q_PROPERTY(bool overwriteQml MEMBER m_overwriteQml NOTIFY overwriteQmlChanged)
public:
Bridge(bool guiMode);
@@ -71,8 +69,6 @@ public:
QStringList m_selectedImageFormats;
bool m_sanity = false;
- bool m_verbose = false;
- bool m_overwriteQml = false;
bool m_guiMode = false;
private:
diff --git a/tools/qqcstylegenerator/src/stylegenerator.h b/tools/qqcstylegenerator/src/stylegenerator.h
index 2709355ab0..22d13d459e 100644
--- a/tools/qqcstylegenerator/src/stylegenerator.h
+++ b/tools/qqcstylegenerator/src/stylegenerator.h
@@ -452,7 +452,7 @@ private:
// Copy files (typically the QML control) into the style folder
QStringList files = getStringList("copy", controlObj, false);
for (const QString &file : files)
- copyFileToStyleFolder(file, m_bridge->m_overwriteQml);
+ copyFileToStyleFolder(file, false);
// Add this control to the list of controls that goes into the qmldir file
m_qmlDirControls.append(controlName);