summaryrefslogtreecommitdiff
path: root/src/plugins/analyzerbase
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2011-07-12 09:57:34 +0200
committerhjk <qthjk@ovi.com>2011-07-12 12:51:07 +0200
commitbe8337f69f959a59dc151d988ad50440c4f362f8 (patch)
treeebcce1f67eba28a3f25204c2a8e948ee4212f1db /src/plugins/analyzerbase
parent53b7f17f6e69e04f498c765f2eaeb24ed5e6169b (diff)
downloadqt-creator-be8337f69f959a59dc151d988ad50440c4f362f8.tar.gz
analyzer: remove unneeded AnalyzerPluginPrivate class
Change-Id: I2fac5e0e8c796d6009ba30da82a5a7a67672851d Reviewed-on: http://codereview.qt.nokia.com/1517 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/analyzerbase')
-rw-r--r--src/plugins/analyzerbase/analyzermanager.cpp6
-rw-r--r--src/plugins/analyzerbase/analyzermanager.h8
-rw-r--r--src/plugins/analyzerbase/analyzerplugin.cpp27
-rw-r--r--src/plugins/analyzerbase/analyzerplugin.h4
4 files changed, 11 insertions, 34 deletions
diff --git a/src/plugins/analyzerbase/analyzermanager.cpp b/src/plugins/analyzerbase/analyzermanager.cpp
index cdf4e5d167..a963cba49b 100644
--- a/src/plugins/analyzerbase/analyzermanager.cpp
+++ b/src/plugins/analyzerbase/analyzermanager.cpp
@@ -775,16 +775,16 @@ AnalyzerManager::~AnalyzerManager()
void AnalyzerManager::extensionsInitialized()
{
- if (d->m_tools.isEmpty())
+ if (m_instance->d->m_tools.isEmpty())
return;
- foreach (IAnalyzerTool *tool, d->m_tools)
+ foreach (IAnalyzerTool *tool, m_instance->d->m_tools)
tool->extensionsInitialized();
}
void AnalyzerManager::shutdown()
{
- d->saveToolSettings(d->m_currentTool, d->m_currentMode);
+ m_instance->d->saveToolSettings(m_instance->d->m_currentTool, m_instance->d->m_currentMode);
}
void AnalyzerManager::addTool(IAnalyzerTool *tool, const StartModes &modes)
diff --git a/src/plugins/analyzerbase/analyzermanager.h b/src/plugins/analyzerbase/analyzermanager.h
index 42700cac90..9db4e12238 100644
--- a/src/plugins/analyzerbase/analyzermanager.h
+++ b/src/plugins/analyzerbase/analyzermanager.h
@@ -56,16 +56,18 @@ typedef QList<StartMode> StartModes;
class IAnalyzerTool;
class AnalyzerManagerPrivate;
+
+// FIXME: Merge with AnalyzerPlugin.
class ANALYZER_EXPORT AnalyzerManager : public QObject
{
Q_OBJECT
public:
- explicit AnalyzerManager(QObject *parent = 0);
+ explicit AnalyzerManager(QObject *parent);
~AnalyzerManager();
- void extensionsInitialized();
- void shutdown();
+ static void extensionsInitialized();
+ static void shutdown();
// Register a tool and initialize it.
static void addTool(IAnalyzerTool *tool, const StartModes &mode);
diff --git a/src/plugins/analyzerbase/analyzerplugin.cpp b/src/plugins/analyzerbase/analyzerplugin.cpp
index e914130f0d..134b5ca521 100644
--- a/src/plugins/analyzerbase/analyzerplugin.cpp
+++ b/src/plugins/analyzerbase/analyzerplugin.cpp
@@ -56,25 +56,6 @@ using namespace Analyzer::Internal;
static AnalyzerPlugin *m_instance = 0;
-
-////////////////////////////////////////////////////////////////////////
-//
-// AnalyzerPluginPrivate
-//
-////////////////////////////////////////////////////////////////////////
-
-class AnalyzerPlugin::AnalyzerPluginPrivate
-{
-public:
- AnalyzerPluginPrivate(AnalyzerPlugin *qq):
- q(qq),
- m_manager(0)
- {}
-
- AnalyzerPlugin *q;
- AnalyzerManager *m_manager;
-};
-
////////////////////////////////////////////////////////////////////////
//
// AnalyzerPlugin
@@ -82,14 +63,12 @@ public:
////////////////////////////////////////////////////////////////////////
AnalyzerPlugin::AnalyzerPlugin()
- : d(new AnalyzerPluginPrivate(this))
{
m_instance = this;
}
AnalyzerPlugin::~AnalyzerPlugin()
{
- delete d;
m_instance = 0;
}
@@ -98,7 +77,7 @@ bool AnalyzerPlugin::initialize(const QStringList &arguments, QString *errorStri
Q_UNUSED(arguments)
Q_UNUSED(errorString)
- d->m_manager = new AnalyzerManager(this);
+ (void) new AnalyzerManager(this);
// Task integration.
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
@@ -111,12 +90,12 @@ bool AnalyzerPlugin::initialize(const QStringList &arguments, QString *errorStri
void AnalyzerPlugin::extensionsInitialized()
{
- d->m_manager->extensionsInitialized();
+ AnalyzerManager::extensionsInitialized();
}
ExtensionSystem::IPlugin::ShutdownFlag AnalyzerPlugin::aboutToShutdown()
{
- d->m_manager->shutdown();
+ AnalyzerManager::shutdown();
return SynchronousShutdown;
}
diff --git a/src/plugins/analyzerbase/analyzerplugin.h b/src/plugins/analyzerbase/analyzerplugin.h
index dc187de686..00bb32eb5b 100644
--- a/src/plugins/analyzerbase/analyzerplugin.h
+++ b/src/plugins/analyzerbase/analyzerplugin.h
@@ -54,10 +54,6 @@ public:
void extensionsInitialized();
ShutdownFlag aboutToShutdown();
-
-private:
- class AnalyzerPluginPrivate;
- AnalyzerPluginPrivate *d;
};
} // namespace Internal