From 1186c495f8e16dc068537e28c37c546cfa7f86c2 Mon Sep 17 00:00:00 2001 From: Ali Kianian Date: Wed, 23 Apr 2025 12:08:58 +0300 Subject: [PATCH] EffectComposer: Remove unused attributes Change-Id: Ib87cb2b1add0496e6cc15927a91a87976eb95a4d Reviewed-by: Shrief Gabr Reviewed-by: Miikka Heikkinen --- src/plugins/effectcomposer/effectcomposermodel.cpp | 9 ++++----- src/plugins/effectcomposer/effectcomposermodel.h | 9 +-------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/plugins/effectcomposer/effectcomposermodel.cpp b/src/plugins/effectcomposer/effectcomposermodel.cpp index e7c9d5e707a..dbf0e53a7b7 100644 --- a/src/plugins/effectcomposer/effectcomposermodel.cpp +++ b/src/plugins/effectcomposer/effectcomposermodel.cpp @@ -1666,7 +1666,7 @@ void EffectComposerModel::saveResources(const QString &name) } } - writeToFile(qmlUtf8, qmlFilePath, FileType::Text); + writeToFile(qmlUtf8, qmlFilePath); newFileNames.insert(qmlFilename); // Save shaders and images @@ -2298,11 +2298,11 @@ void EffectComposerModel::bakeShaders() setVertexShader(generateVertexShader()); QString vs = m_vertexShader; - writeToFile(vs.toUtf8(), m_vertexSourceFilename, FileType::Text); + writeToFile(vs.toUtf8(), m_vertexSourceFilename); setFragmentShader(generateFragmentShader()); QString fs = m_fragmentShader; - writeToFile(fs.toUtf8(), m_fragmentSourceFilename, FileType::Text); + writeToFile(fs.toUtf8(), m_fragmentSourceFilename); QtSupport::QtVersion *qtVer = QtSupport::QtKitAspect::qtVersion(kit); if (!qtVer) { @@ -2835,8 +2835,7 @@ void EffectComposerModel::addOrUpdateNodeUniform(int idx, const QVariantMap &dat startRebakeTimer(); } -bool EffectComposerModel::writeToFile( - const QByteArray &buf, const QString &fileName, [[maybe_unused]] FileType fileType) +bool EffectComposerModel::writeToFile(const QByteArray &buf, const QString &fileName) { Utils::FilePath fp = Utils::FilePath::fromString(fileName); fp.absolutePath().createDir(); diff --git a/src/plugins/effectcomposer/effectcomposermodel.h b/src/plugins/effectcomposer/effectcomposermodel.h index ccf211b6f16..c2a3c5877b6 100644 --- a/src/plugins/effectcomposer/effectcomposermodel.h +++ b/src/plugins/effectcomposer/effectcomposermodel.h @@ -10,7 +10,6 @@ #include #include -#include #include #include #include @@ -264,12 +263,7 @@ private: QList defaultPreviewImages() const; QUrl defaultPreviewImage() const; - enum class FileType - { - Binary, - Text - }; - bool writeToFile(const QByteArray &buf, const QString &filename, FileType fileType); + bool writeToFile(const QByteArray &buf, const QString &filename); QList m_nodes; QPointer m_effectComposerNodesModel; @@ -303,7 +297,6 @@ private: // Used in preview QML, at ShaderEffect component of the file QString m_previewEffectPropertiesString; QString m_qmlComponentString; - bool m_loadComponentImages = true; bool m_isEnabled = true; bool m_hasValidTarget = false; QString m_currentComposition;