summaryrefslogtreecommitdiff
path: root/src/plugins/android/androidplugin.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-01-26 14:57:01 +0100
committerhjk <hjk@qt.io>2018-01-30 10:21:18 +0000
commit7ab872ce6aacd9f3e9e20e8934ab17c9ef5e5a6b (patch)
tree27ed1edba5784d718ffe40e9d89cb4dcacf6c9d6 /src/plugins/android/androidplugin.cpp
parent14297c95436f7fe1ab40397b24ae150b79cb71e4 (diff)
downloadqt-creator-7ab872ce6aacd9f3e9e20e8934ab17c9ef5e5a6b.tar.gz
Android: Remove dependency on plugin object pool
Change-Id: Ic6908cca581a0d6155c8c43c86163347ca578a4c Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Diffstat (limited to 'src/plugins/android/androidplugin.cpp')
-rw-r--r--src/plugins/android/androidplugin.cpp40
1 files changed, 23 insertions, 17 deletions
diff --git a/src/plugins/android/androidplugin.cpp b/src/plugins/android/androidplugin.cpp
index 3f14c09077..7e1b88d754 100644
--- a/src/plugins/android/androidplugin.cpp
+++ b/src/plugins/android/androidplugin.cpp
@@ -49,24 +49,41 @@
# include "androidqbspropertyprovider.h"
#endif
-#include <coreplugin/icore.h>
-
#include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/kitmanager.h>
#include <qtsupport/qtversionmanager.h>
-#include <QtPlugin>
-
using namespace ProjectExplorer;
using namespace ProjectExplorer::Constants;
using namespace Android::Internal;
namespace Android {
+class AndroidPluginRunData
+{
+public:
+ AndroidConfigurations androidConfiguration;
+ AndroidSettingsPage settingsPage;
+ AndroidDeployQtStepFactory deployQtStepFactory;
+ AndroidQtVersionFactory qtVersionFactory;
+ AndroidToolChainFactory toolChainFactory;
+ AndroidDeployConfigurationFactory deployConfigurationFactory;
+ AndroidDeviceFactory deviceFactory;
+ AndroidPotentialKit potentialKit;
+ JavaEditorFactory javaEditorFactory;
+ AndroidPackageInstallationFactory packackeInstallationFactory;
+ AndroidManifestEditorFactory manifestEditorFactory;
+};
+
AndroidPlugin::AndroidPlugin()
{ }
+AndroidPlugin::~AndroidPlugin()
+{
+ delete m_runData;
+}
+
bool AndroidPlugin::initialize(const QStringList &arguments, QString *errorMessage)
{
Q_UNUSED(arguments);
@@ -79,20 +96,9 @@ bool AndroidPlugin::initialize(const QStringList &arguments, QString *errorMessa
RunControl::registerWorker<AndroidRunConfiguration, AndroidQmlToolingSupport>(
QML_PREVIEW_RUN_MODE);
- new AndroidConfigurations(this);
-
- addAutoReleasedObject(new Internal::AndroidDeployQtStepFactory);
- addAutoReleasedObject(new Internal::AndroidSettingsPage);
- addAutoReleasedObject(new Internal::AndroidQtVersionFactory);
- addAutoReleasedObject(new Internal::AndroidToolChainFactory);
- addAutoReleasedObject(new Internal::AndroidDeployConfigurationFactory);
- addAutoReleasedObject(new Internal::AndroidDeviceFactory);
- addAutoReleasedObject(new Internal::AndroidPotentialKit);
- addAutoReleasedObject(new Internal::JavaEditorFactory);
- addAutoReleasedObject(new Internal::AndroidPackageInstallationFactory);
- KitManager::registerKitInformation(new Internal::AndroidGdbServerKitInformation);
+ m_runData = new AndroidPluginRunData;
- addAutoReleasedObject(new Internal::AndroidManifestEditorFactory);
+ KitManager::registerKitInformation(new Internal::AndroidGdbServerKitInformation);
connect(KitManager::instance(), &KitManager::kitsLoaded,
this, &AndroidPlugin::kitsRestored);