forked from qt-creator/qt-creator
		
	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:
		@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user