forked from qt-creator/qt-creator
QmakeAndroidSupport: Pimpl and remove use of global object pool
Change-Id: I2b893ac8fd72d920a538739de2c0ccfa2a9ba354 Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user