aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2024-02-01 18:31:24 +0100
committerhjk <hjk@qt.io>2024-02-02 13:42:38 +0000
commit66f6b4c32ea368345c06e3ffa6feeca007aca257 (patch)
treea7dd1657f77f8a5a61c98b1afe4790c9b8e42a2c /src/plugins/projectexplorer
parent534c1c94b635850fc00dcf22f2f81f3aa8ba7f06 (diff)
ProjectExplorer: Hide JsonWizardFactoryJsExtension in .cpp
Change-Id: Ia540ce9f053b218e6986cc568cb287c98707d39d Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp57
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h19
2 files changed, 35 insertions, 41 deletions
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp
index c8299be8e8..0febbcd414 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp
@@ -80,6 +80,39 @@ static QList<JsonWizardGeneratorFactory *> &generatorFactories()
return theGeneratorFactories;
}
+namespace Internal {
+
+class JsonWizardFactoryJsExtension final : public QObject
+{
+ Q_OBJECT
+
+public:
+ JsonWizardFactoryJsExtension(Id platformId,
+ const QSet<Id> &availableFeatures,
+ const QSet<Id> &pluginFeatures)
+ : m_platformId(platformId)
+ , m_availableFeatures(availableFeatures)
+ , m_pluginFeatures(pluginFeatures)
+ {}
+
+ Q_INVOKABLE QVariant value(const QString &name) const
+ {
+ if (name == "Platform")
+ return m_platformId.toString();
+ if (name == "Features")
+ return Id::toStringList(m_availableFeatures);
+ if (name == "Plugins")
+ return Id::toStringList(m_pluginFeatures);
+ return {};
+ }
+
+private:
+ Id m_platformId;
+ QSet<Id> m_availableFeatures;
+ QSet<Id> m_pluginFeatures;
+};
+
+} // namespace Internal
int JsonWizardFactory::m_verbose = 0;
@@ -870,26 +903,6 @@ bool JsonWizardFactory::initialize(const QVariantMap &data, const FilePath &base
return errorMessage->isEmpty();
}
-namespace Internal {
-
-JsonWizardFactoryJsExtension::JsonWizardFactoryJsExtension(Id platformId,
- const QSet<Id> &availableFeatures,
- const QSet<Id> &pluginFeatures)
- : m_platformId(platformId)
- , m_availableFeatures(availableFeatures)
- , m_pluginFeatures(pluginFeatures)
-{}
-
-QVariant JsonWizardFactoryJsExtension::value(const QString &name) const
-{
- if (name == "Platform")
- return m_platformId.toString();
- if (name == "Features")
- return Id::toStringList(m_availableFeatures);
- if (name == "Plugins")
- return Id::toStringList(m_pluginFeatures);
- return {};
-}
-
-} // namespace Internal
} // namespace ProjectExplorer
+
+#include "jsonwizardfactory.moc"
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h
index c72808db66..ea8e2e24b9 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h
@@ -95,23 +95,4 @@ private:
friend class ProjectExplorerPluginPrivate;
};
-namespace Internal {
-
-class JsonWizardFactoryJsExtension : public QObject
-{
- Q_OBJECT
-public:
- JsonWizardFactoryJsExtension(Utils::Id platformId,
- const QSet<Utils::Id> &availableFeatures,
- const QSet<Utils::Id> &pluginFeatures);
-
- Q_INVOKABLE QVariant value(const QString &name) const;
-
-private:
- Utils::Id m_platformId;
- QSet<Utils::Id> m_availableFeatures;
- QSet<Utils::Id> m_pluginFeatures;
-};
-
-} // namespace Internal
} // namespace ProjectExplorer