summaryrefslogtreecommitdiff
path: root/src/plugins/qmakeandroidsupport
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-02-08 11:58:59 +0100
committerhjk <hjk@qt.io>2018-02-14 13:34:15 +0000
commit24520b91595c1479716c3e45bf89a8a5fe0f3d37 (patch)
treeee2134e94a8419503e6af95b4648358b338ea6a1 /src/plugins/qmakeandroidsupport
parent6445fb19bb70789bd420b10450af33a616f38260 (diff)
downloadqt-creator-24520b91595c1479716c3e45bf89a8a5fe0f3d37.tar.gz
QmakeAndroidSupport: Pimpl and remove use of global object pool
Change-Id: I2b893ac8fd72d920a538739de2c0ccfa2a9ba354 Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Diffstat (limited to 'src/plugins/qmakeandroidsupport')
-rw-r--r--src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.cpp29
-rw-r--r--src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.h12
2 files changed, 21 insertions, 20 deletions
diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.cpp b/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.cpp
index d9b7566991..dc9bf1c5f0 100644
--- a/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.cpp
+++ b/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.cpp
@@ -30,33 +30,30 @@
#include "qmakeandroidrunfactories.h"
#include "qmakeandroidsupport.h"
-#include <coreplugin/icore.h>
+namespace QmakeAndroidSupport {
+namespace Internal {
-#include <QtPlugin>
-
-using namespace QmakeAndroidSupport::Internal;
-using namespace QmakeAndroidSupport;
-
-QmakeAndroidSupportPlugin::QmakeAndroidSupportPlugin()
+class QmakeAndroidSupportPluginPrivate
{
-
-}
+public:
+ AndroidQmakeBuildConfigurationFactory buildConfigFactory;
+ QmakeAndroidBuildApkStepFactory buildApkStepFactory;
+ QmakeAndroidRunConfigurationFactory runConfigFactory;
+ QmakeAndroidSupport androidSupport;
+};
QmakeAndroidSupportPlugin::~QmakeAndroidSupportPlugin()
{
+ delete d;
}
bool QmakeAndroidSupportPlugin::initialize(const QStringList &arguments, QString *errorMessage)
{
Q_UNUSED(arguments)
Q_UNUSED(errorMessage)
- addAutoReleasedObject(new AndroidQmakeBuildConfigurationFactory);
- addAutoReleasedObject(new QmakeAndroidBuildApkStepFactory);
- addAutoReleasedObject(new QmakeAndroidRunConfigurationFactory);
- addAutoReleasedObject(new QmakeAndroidSupport);
-
+ d = new QmakeAndroidSupportPluginPrivate;
return true;
}
-void QmakeAndroidSupportPlugin::extensionsInitialized()
-{ }
+} // Internal
+} // QmakeAndroidSupport
diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.h b/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.h
index e2f8be83b2..9383d1acee 100644
--- a/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.h
+++ b/src/plugins/qmakeandroidsupport/qmakeandroidsupportplugin.h
@@ -36,10 +36,14 @@ class QmakeAndroidSupportPlugin : public ExtensionSystem::IPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QmakeAndroidSupport.json")
public:
- QmakeAndroidSupportPlugin();
- ~QmakeAndroidSupportPlugin();
- bool initialize(const QStringList &arguments, QString *errorMessage);
- void extensionsInitialized();
+ QmakeAndroidSupportPlugin() = default;
+ ~QmakeAndroidSupportPlugin() final;
+
+private:
+ bool initialize(const QStringList &arguments, QString *errorMessage) final;
+ void extensionsInitialized() final {}
+
+ class QmakeAndroidSupportPluginPrivate *d = nullptr;
};
} // namespace Internal