diff options
author | hjk <qtc-committer@nokia.com> | 2009-01-20 11:52:04 +0100 |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2009-01-20 11:52:04 +0100 |
commit | 113b81e9dbc67dab5252eb9b6a8aaa57efda3de0 (patch) | |
tree | 7a80819280d648a2cdd1eecf1cf645d6bbcc64d5 /src/plugins/debugger/debuggerplugin.cpp | |
parent | d1dac15cc57549ac7da6c6007685e5bacdbf1828 (diff) | |
download | qt-creator-113b81e9dbc67dab5252eb9b6a8aaa57efda3de0.tar.gz |
replace ExtensionSystem::PluginManager::instance()->getObject<Core::ICore>() by Core::ICore::instance()
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
-rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 8fa465d543..7fd564a3a0 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -55,12 +55,12 @@ #include <coreplugin/rightpane.h> #include <coreplugin/uniqueidmanager.h> -#include <extensionsystem/pluginmanager.h> - #include <cplusplus/ExpressionUnderCursor.h> #include <cppeditor/cppeditorconstants.h> +#include <extensionsystem/pluginmanager.h> + #include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/session.h> @@ -346,7 +346,7 @@ DebuggerPlugin::~DebuggerPlugin() static QSettings *settings() { - return ExtensionSystem::PluginManager::instance()->getObject<ICore>()->settings(); + return ICore::instance()->settings(); } void DebuggerPlugin::shutdown() @@ -387,7 +387,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *error_mes m_pm = ExtensionSystem::PluginManager::instance(); - ICore *core = m_pm->getObject<Core::ICore>(); + ICore *core = ICore::instance(); QTC_ASSERT(core, return false); Core::ActionManager *am = core->actionManager(); @@ -713,8 +713,7 @@ ProjectExplorer::ProjectExplorerPlugin *DebuggerPlugin::projectExplorer() const /*! Activates the previous mode when the current mode is the debug mode. */ void DebuggerPlugin::activatePreviousMode() { - ICore *core = m_pm->getObject<Core::ICore>(); - Core::ModeManager *const modeManager = core->modeManager(); + Core::ModeManager *const modeManager = ICore::instance()->modeManager(); if (modeManager->currentMode() == modeManager->mode(Constants::MODE_DEBUG) && !m_previousMode.isEmpty()) { @@ -725,7 +724,7 @@ void DebuggerPlugin::activatePreviousMode() void DebuggerPlugin::activateDebugMode() { - ICore *core = m_pm->getObject<Core::ICore>(); + ICore *core = ICore::instance(); Core::ModeManager *modeManager = core->modeManager(); m_previousMode = QLatin1String(modeManager->currentMode()->uniqueModeName()); modeManager->activateMode(QLatin1String(MODE_DEBUG)); @@ -733,7 +732,7 @@ void DebuggerPlugin::activateDebugMode() void DebuggerPlugin::queryCurrentTextEditor(QString *fileName, int *lineNumber, QObject **object) { - ICore *core = m_pm->getObject<Core::ICore>(); + ICore *core = ICore::instance(); if (!core || !core->editorManager()) return; Core::IEditor *editor = core->editorManager()->currentEditor(); @@ -872,7 +871,7 @@ void DebuggerPlugin::gotoLocation(const QString &fileName, int lineNumber, void DebuggerPlugin::changeStatus(int status) { bool startIsContinue = (status == DebuggerInferiorStopped); - ICore *core = m_pm->getObject<Core::ICore>(); + ICore *core = ICore::instance(); if (startIsContinue) { core->addAdditionalContext(m_gdbRunningContext); core->updateContext(); @@ -916,8 +915,7 @@ void DebuggerPlugin::readSettings() #if defined(Q_OS_WIN32) defaultCommand.append(".exe"); #endif - Core::ICore *coreIFace = m_pm->getObject<Core::ICore>(); - QString defaultScript = coreIFace->resourcePath() + + QString defaultScript = ICore::instance()->resourcePath() + QLatin1String("/gdb/qt4macros"); s->beginGroup(QLatin1String("DebugMode")); |