Android: Remove dependency on plugin object pool

Change-Id: Ic6908cca581a0d6155c8c43c86163347ca578a4c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
hjk
2018-01-26 14:57:01 +01:00
parent 14297c9543
commit 7ab872ce6a
7 changed files with 41 additions and 31 deletions

View File

@@ -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,21 +96,10 @@ bool AndroidPlugin::initialize(const QStringList &arguments, QString *errorMessa
RunControl::registerWorker<AndroidRunConfiguration, AndroidQmlToolingSupport>(
QML_PREVIEW_RUN_MODE);
new AndroidConfigurations(this);
m_runData = new AndroidPluginRunData;
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);
addAutoReleasedObject(new Internal::AndroidManifestEditorFactory);
connect(KitManager::instance(), &KitManager::kitsLoaded,
this, &AndroidPlugin::kitsRestored);