forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,10 +54,6 @@ public:
|
||||
void extensionsInitialized();
|
||||
|
||||
ShutdownFlag aboutToShutdown();
|
||||
|
||||
private:
|
||||
class AnalyzerPluginPrivate;
|
||||
AnalyzerPluginPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user