Commit c63dd913 authored by Daniel Teske's avatar Daniel Teske
Browse files

Make AndroidManager completely static



All the methods are static now, so there's no need to instanciate the
class.

Change-Id: Ibb615f1f863ed1ad8e27dfb44d69998ea1061550
Reviewed-by: default avatarBogDan Vatra <bog_dan_ro@yahoo.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 560abd61
......@@ -79,17 +79,6 @@ namespace {
namespace Android {
namespace Internal {
AndroidManager *AndroidManager::m_instance = 0;
AndroidManager *AndroidManager::instance()
{
return m_instance;
}
AndroidManager::~AndroidManager()
{
}
bool AndroidManager::supportsAndroid(ProjectExplorer::Target *target)
{
if (!qobject_cast<Qt4ProjectManager::Qt4Project *>(target->project()))
......@@ -696,16 +685,6 @@ bool AndroidManager::saveLibsXml(ProjectExplorer::Target *target, QDomDocument &
return saveXmlFile(target, doc, libsPath(target));
}
AndroidManager::AndroidManager(QObject *parent) :
QObject(parent)
{
m_instance = this;
// ProjectExplorer::SessionManager *sm = ProjectExplorerPlugin::instance()->session();
// connect(sm, SIGNAL(projectAdded(ProjectExplorer::Project*)),
// this, SLOT(handleProjectAdditions(ProjectExplorer::Project*)));
}
void AndroidManager::raiseError(const QString &reason)
{
QMessageBox::critical(0, tr("Error creating Android templates"), reason);
......
......@@ -58,10 +58,6 @@ public:
ReleaseBuildSigned
};
static AndroidManager *instance();
~AndroidManager();
static bool supportsAndroid(ProjectExplorer::Target *target);
static QString packageName(ProjectExplorer::Target *target);
......@@ -121,8 +117,6 @@ public:
static bool setPrebundledLibs(ProjectExplorer::Target *target, const QStringList &libs);
private:
explicit AndroidManager(QObject *parent = 0);
static void raiseError(const QString &reason);
static bool openXmlFile(ProjectExplorer::Target *target, QDomDocument &doc,
const Utils::FileName &fileName, bool createAndroidTemplates = false);
......@@ -165,10 +159,6 @@ private:
static QStringList dependencies(const Utils::FileName &readelfPath, const QString &lib);
static int setLibraryLevel(const QString &library, LibrariesMap &mapLibs);
static bool qtLibrariesLessThan(const Library &a, const Library &b);
static AndroidManager *m_instance;
friend class Android::AndroidPlugin;
};
} // namespace Internal
......
......@@ -67,8 +67,6 @@ bool AndroidPlugin::initialize(const QStringList &arguments,
Internal::AndroidConfigurations::instance(this);
new Internal::AndroidManager(this);
addAutoReleasedObject(new Internal::AndroidRunControlFactory);
addAutoReleasedObject(new Internal::AndroidRunConfigurationFactory);
addAutoReleasedObject(new Internal::AndroidPackageInstallationFactory);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment