Commit 4a21f0c3 authored by hjk's avatar hjk Committed by hjk

Use new static ICore interface.

Change-Id: I9b690d9b150c8d162b15370f9f8986267c9128f1
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent c14a4756
...@@ -39,7 +39,7 @@ bool %PluginName%Plugin::initialize(const QStringList &arguments, QString *error ...@@ -39,7 +39,7 @@ bool %PluginName%Plugin::initialize(const QStringList &arguments, QString *error
Q_UNUSED(arguments) Q_UNUSED(arguments)
Q_UNUSED(errorString) Q_UNUSED(errorString)
Core::ActionManager *am = Core::ICore::instance()->actionManager(); Core::ActionManager *am = Core::ICore::actionManager();
QAction *action = new QAction(tr("%PluginName% action"), this); QAction *action = new QAction(tr("%PluginName% action"), this);
Core::Command *cmd = am->registerAction(action, Constants::ACTION_ID, Core::Command *cmd = am->registerAction(action, Constants::ACTION_ID,
...@@ -72,7 +72,7 @@ ExtensionSystem::IPlugin::ShutdownFlag %PluginName%Plugin::aboutToShutdown() ...@@ -72,7 +72,7 @@ ExtensionSystem::IPlugin::ShutdownFlag %PluginName%Plugin::aboutToShutdown()
void %PluginName%Plugin::triggerAction() void %PluginName%Plugin::triggerAction()
{ {
QMessageBox::information(Core::ICore::instance()->mainWindow(), QMessageBox::information(Core::ICore::mainWindow(),
tr("Action triggered"), tr("Action triggered"),
tr("This is an action from %PluginName%.")); tr("This is an action from %PluginName%."));
} }
......
...@@ -261,8 +261,7 @@ AnalyzerManagerPrivate::~AnalyzerManagerPrivate() ...@@ -261,8 +261,7 @@ AnalyzerManagerPrivate::~AnalyzerManagerPrivate()
void AnalyzerManagerPrivate::setupActions() void AnalyzerManagerPrivate::setupActions()
{ {
Core::ICore *core = Core::ICore::instance(); Core::ActionManager *am = Core::ICore::actionManager();
Core::ActionManager *am = core->actionManager();
const Core::Context globalcontext(Core::Constants::C_GLOBAL); const Core::Context globalcontext(Core::Constants::C_GLOBAL);
Core::Command *command = 0; Core::Command *command = 0;
...@@ -340,7 +339,7 @@ void AnalyzerManagerPrivate::delayedInit() ...@@ -340,7 +339,7 @@ void AnalyzerManagerPrivate::delayedInit()
// Populate Windows->Views menu with standard actions. // Populate Windows->Views menu with standard actions.
Core::Context analyzerContext(Constants::C_ANALYZEMODE); Core::Context analyzerContext(Constants::C_ANALYZEMODE);
ActionManager *am = ICore::instance()->actionManager(); ActionManager *am = ICore::actionManager();
ActionContainer *viewsMenu = ActionContainer *viewsMenu =
am->actionContainer(Core::Id(Core::Constants::M_WINDOW_VIEWS)); am->actionContainer(Core::Id(Core::Constants::M_WINDOW_VIEWS));
Command *cmd = am->registerAction(m_mainWindow->menuSeparator1(), Command *cmd = am->registerAction(m_mainWindow->menuSeparator1(),
...@@ -435,7 +434,7 @@ void AnalyzerManagerPrivate::activateDock(Qt::DockWidgetArea area, QDockWidget * ...@@ -435,7 +434,7 @@ void AnalyzerManagerPrivate::activateDock(Qt::DockWidgetArea area, QDockWidget *
Context globalContext(Core::Constants::C_GLOBAL); Context globalContext(Core::Constants::C_GLOBAL);
ActionManager *am = ICore::instance()->actionManager(); ActionManager *am = ICore::actionManager();
QAction *toggleViewAction = dockWidget->toggleViewAction(); QAction *toggleViewAction = dockWidget->toggleViewAction();
toggleViewAction->setText(dockWidget->windowTitle()); toggleViewAction->setText(dockWidget->windowTitle());
Command *cmd = am->registerAction(toggleViewAction, Command *cmd = am->registerAction(toggleViewAction,
...@@ -449,7 +448,7 @@ void AnalyzerManagerPrivate::activateDock(Qt::DockWidgetArea area, QDockWidget * ...@@ -449,7 +448,7 @@ void AnalyzerManagerPrivate::activateDock(Qt::DockWidgetArea area, QDockWidget *
void AnalyzerManagerPrivate::deactivateDock(QDockWidget *dockWidget) void AnalyzerManagerPrivate::deactivateDock(QDockWidget *dockWidget)
{ {
ActionManager *am = ICore::instance()->actionManager(); ActionManager *am = ICore::actionManager();
QAction *toggleViewAction = dockWidget->toggleViewAction(); QAction *toggleViewAction = dockWidget->toggleViewAction();
am->unregisterAction(toggleViewAction, Core::Id("Analyzer." + dockWidget->objectName())); am->unregisterAction(toggleViewAction, Core::Id("Analyzer." + dockWidget->objectName()));
m_mainWindow->removeDockWidget(dockWidget); m_mainWindow->removeDockWidget(dockWidget);
...@@ -477,7 +476,7 @@ bool buildTypeAccepted(IAnalyzerTool::ToolMode toolMode, ...@@ -477,7 +476,7 @@ bool buildTypeAccepted(IAnalyzerTool::ToolMode toolMode,
bool AnalyzerManagerPrivate::showPromptDialog(const QString &title, const QString &text, bool AnalyzerManagerPrivate::showPromptDialog(const QString &title, const QString &text,
const QString &stopButtonText, const QString &cancelButtonText) const const QString &stopButtonText, const QString &cancelButtonText) const
{ {
Utils::CheckableMessageBox messageBox(Core::ICore::instance()->mainWindow()); Utils::CheckableMessageBox messageBox(Core::ICore::mainWindow());
messageBox.setWindowTitle(title); messageBox.setWindowTitle(title);
messageBox.setText(text); messageBox.setText(text);
messageBox.setStandardButtons(QDialogButtonBox::Yes|QDialogButtonBox::Cancel); messageBox.setStandardButtons(QDialogButtonBox::Yes|QDialogButtonBox::Cancel);
...@@ -523,7 +522,7 @@ void AnalyzerManagerPrivate::startLocalTool(IAnalyzerTool *tool) ...@@ -523,7 +522,7 @@ void AnalyzerManagerPrivate::startLocalTool(IAnalyzerTool *tool)
const QString currentMode = const QString currentMode =
buildType == BuildConfiguration::Debug ? tr("Debug") : tr("Release"); buildType == BuildConfiguration::Debug ? tr("Debug") : tr("Release");
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::settings();
const QString configKey = QLatin1String("Analyzer.AnalyzeCorrectMode"); const QString configKey = QLatin1String("Analyzer.AnalyzeCorrectMode");
int ret; int ret;
if (settings->contains(configKey)) { if (settings->contains(configKey)) {
...@@ -547,7 +546,7 @@ void AnalyzerManagerPrivate::startLocalTool(IAnalyzerTool *tool) ...@@ -547,7 +546,7 @@ void AnalyzerManagerPrivate::startLocalTool(IAnalyzerTool *tool)
const QString checkBoxText = tr("&Do not ask again"); const QString checkBoxText = tr("&Do not ask again");
bool checkBoxSetting = false; bool checkBoxSetting = false;
const QDialogButtonBox::StandardButton button = const QDialogButtonBox::StandardButton button =
Utils::CheckableMessageBox::question(Core::ICore::instance()->mainWindow(), Utils::CheckableMessageBox::question(Core::ICore::mainWindow(),
title, message, checkBoxText, title, message, checkBoxText,
&checkBoxSetting, QDialogButtonBox::Yes|QDialogButtonBox::Cancel, &checkBoxSetting, QDialogButtonBox::Yes|QDialogButtonBox::Cancel,
QDialogButtonBox::Cancel); QDialogButtonBox::Cancel);
...@@ -605,7 +604,7 @@ QAction *AnalyzerManagerPrivate::actionFromToolAndMode(IAnalyzerTool *tool, Star ...@@ -605,7 +604,7 @@ QAction *AnalyzerManagerPrivate::actionFromToolAndMode(IAnalyzerTool *tool, Star
void AnalyzerManagerPrivate::selectSavedTool() void AnalyzerManagerPrivate::selectSavedTool()
{ {
const QSettings *settings = Core::ICore::instance()->settings(); const QSettings *settings = Core::ICore::settings();
const Core::Id lastActiveAction(settings->value(QLatin1String(LAST_ACTIVE_TOOL)).toString()); const Core::Id lastActiveAction(settings->value(QLatin1String(LAST_ACTIVE_TOOL)).toString());
foreach (QAction *action, m_actions) { foreach (QAction *action, m_actions) {
IAnalyzerTool *tool = m_toolFromAction.value(action); IAnalyzerTool *tool = m_toolFromAction.value(action);
...@@ -688,7 +687,7 @@ void AnalyzerManagerPrivate::addTool(IAnalyzerTool *tool, const StartModes &mode ...@@ -688,7 +687,7 @@ void AnalyzerManagerPrivate::addTool(IAnalyzerTool *tool, const StartModes &mode
delayedInit(); // Make sure that there is a valid IMode instance. delayedInit(); // Make sure that there is a valid IMode instance.
const bool blocked = m_toolBox->blockSignals(true); // Do not make current. const bool blocked = m_toolBox->blockSignals(true); // Do not make current.
ActionManager *am = Core::ICore::instance()->actionManager(); ActionManager *am = Core::ICore::actionManager();
foreach (StartMode mode, modes) { foreach (StartMode mode, modes) {
QString actionName = tool->actionName(mode); QString actionName = tool->actionName(mode);
Id menuGroup = tool->menuGroup(mode); Id menuGroup = tool->menuGroup(mode);
...@@ -725,7 +724,7 @@ void AnalyzerManagerPrivate::handleToolFinished() ...@@ -725,7 +724,7 @@ void AnalyzerManagerPrivate::handleToolFinished()
void AnalyzerManagerPrivate::loadToolSettings(IAnalyzerTool *tool) void AnalyzerManagerPrivate::loadToolSettings(IAnalyzerTool *tool)
{ {
QTC_ASSERT(m_mainWindow, return); QTC_ASSERT(m_mainWindow, return);
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::settings();
settings->beginGroup(QLatin1String("AnalyzerViewSettings_") + tool->id().toString()); settings->beginGroup(QLatin1String("AnalyzerViewSettings_") + tool->id().toString());
if (settings->value("ToolSettingsSaved", false).toBool()) if (settings->value("ToolSettingsSaved", false).toBool())
m_mainWindow->restoreSettings(settings); m_mainWindow->restoreSettings(settings);
...@@ -740,7 +739,7 @@ void AnalyzerManagerPrivate::saveToolSettings(IAnalyzerTool *tool, StartMode mod ...@@ -740,7 +739,7 @@ void AnalyzerManagerPrivate::saveToolSettings(IAnalyzerTool *tool, StartMode mod
return; // no active tool, do nothing return; // no active tool, do nothing
QTC_ASSERT(m_mainWindow, return); QTC_ASSERT(m_mainWindow, return);
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::settings();
settings->beginGroup(QLatin1String("AnalyzerViewSettings_") + tool->id().toString()); settings->beginGroup(QLatin1String("AnalyzerViewSettings_") + tool->id().toString());
m_mainWindow->saveSettings(settings); m_mainWindow->saveSettings(settings);
settings->setValue("ToolSettingsSaved", true); settings->setValue("ToolSettingsSaved", true);
......
...@@ -119,7 +119,7 @@ AnalyzerGlobalSettings::~AnalyzerGlobalSettings() ...@@ -119,7 +119,7 @@ AnalyzerGlobalSettings::~AnalyzerGlobalSettings()
void AnalyzerGlobalSettings::readSettings() void AnalyzerGlobalSettings::readSettings()
{ {
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::settings();
QVariantMap map; QVariantMap map;
...@@ -136,7 +136,7 @@ void AnalyzerGlobalSettings::readSettings() ...@@ -136,7 +136,7 @@ void AnalyzerGlobalSettings::readSettings()
void AnalyzerGlobalSettings::writeSettings() const void AnalyzerGlobalSettings::writeSettings() const
{ {
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::settings();
settings->beginGroup(QLatin1String(groupC)); settings->beginGroup(QLatin1String(groupC));
const QVariantMap map = toMap(); const QVariantMap map = toMap();
for (QVariantMap::ConstIterator it = map.begin(); it != map.end(); ++it) for (QVariantMap::ConstIterator it = map.begin(); it != map.end(); ++it)
......
...@@ -49,7 +49,7 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent) ...@@ -49,7 +49,7 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
m_ui->keyFile->setExpectedKind(Utils::PathChooser::File); m_ui->keyFile->setExpectedKind(Utils::PathChooser::File);
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::settings();
settings->beginGroup("AnalyzerStartRemoteDialog"); settings->beginGroup("AnalyzerStartRemoteDialog");
m_ui->host->setText(settings->value("host").toString()); m_ui->host->setText(settings->value("host").toString());
m_ui->port->setValue(settings->value("port", 22).toInt()); m_ui->port->setValue(settings->value("port", 22).toInt());
...@@ -91,7 +91,7 @@ StartRemoteDialog::~StartRemoteDialog() ...@@ -91,7 +91,7 @@ StartRemoteDialog::~StartRemoteDialog()
void StartRemoteDialog::accept() void StartRemoteDialog::accept()
{ {
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::settings();
settings->beginGroup("AnalyzerStartRemoteDialog"); settings->beginGroup("AnalyzerStartRemoteDialog");
settings->setValue("host", m_ui->host->text()); settings->setValue("host", m_ui->host->text());
settings->setValue("port", m_ui->port->value()); settings->setValue("port", m_ui->port->value());
......
...@@ -63,8 +63,7 @@ bool AutotoolsProjectPlugin::initialize(const QStringList &arguments, ...@@ -63,8 +63,7 @@ bool AutotoolsProjectPlugin::initialize(const QStringList &arguments,
{ {
Q_UNUSED(arguments); Q_UNUSED(arguments);
Core::ICore *core = Core::ICore::instance(); if (!Core::ICore::mimeDatabase()->addMimeTypes(QLatin1String(":autotoolsproject/AutotoolsProject.mimetypes.xml"), errorString))
if (!core->mimeDatabase()->addMimeTypes(QLatin1String(":autotoolsproject/AutotoolsProject.mimetypes.xml"), errorString))
return false; return false;
addAutoReleasedObject(new AutotoolsTargetFactory); addAutoReleasedObject(new AutotoolsTargetFactory);
......
...@@ -124,7 +124,6 @@ BazaarPlugin::BazaarPlugin() ...@@ -124,7 +124,6 @@ BazaarPlugin::BazaarPlugin()
: VcsBase::VcsBasePlugin(QLatin1String(Constants::COMMIT_ID)), : VcsBase::VcsBasePlugin(QLatin1String(Constants::COMMIT_ID)),
m_optionsPage(0), m_optionsPage(0),
m_client(0), m_client(0),
m_core(0),
m_commandLocator(0), m_commandLocator(0),
m_changeLog(0), m_changeLog(0),
m_addAction(0), m_addAction(0),
...@@ -156,12 +155,11 @@ bool BazaarPlugin::initialize(const QStringList &arguments, QString *errorMessag ...@@ -156,12 +155,11 @@ bool BazaarPlugin::initialize(const QStringList &arguments, QString *errorMessag
m_client = new BazaarClient(&m_bazaarSettings); m_client = new BazaarClient(&m_bazaarSettings);
initializeVcs(new BazaarControl(m_client)); initializeVcs(new BazaarControl(m_client));
m_core = Core::ICore::instance(); m_actionManager = Core::ICore::actionManager();
m_actionManager = m_core->actionManager();
m_optionsPage = new OptionsPage(); m_optionsPage = new OptionsPage();
addAutoReleasedObject(m_optionsPage); addAutoReleasedObject(m_optionsPage);
m_bazaarSettings.readSettings(m_core->settings()); m_bazaarSettings.readSettings(Core::ICore::settings());
connect(m_client, SIGNAL(changed(QVariant)), versionControl(), SLOT(changed(QVariant))); connect(m_client, SIGNAL(changed(QVariant)), versionControl(), SLOT(changed(QVariant)));
...@@ -571,7 +569,7 @@ void BazaarPlugin::showCommitWidget(const QList<VcsBase::VcsBaseClient::StatusIt ...@@ -571,7 +569,7 @@ void BazaarPlugin::showCommitWidget(const QList<VcsBase::VcsBaseClient::StatusIt
return; return;
} }
Core::IEditor *editor = m_core->editorManager()->openEditor(m_changeLog->fileName(), Core::IEditor *editor = Core::ICore::editorManager()->openEditor(m_changeLog->fileName(),
Constants::COMMIT_ID, Constants::COMMIT_ID,
Core::EditorManager::ModeSwitch); Core::EditorManager::ModeSwitch);
if (!editor) { if (!editor) {
...@@ -612,7 +610,7 @@ void BazaarPlugin::commitFromEditor() ...@@ -612,7 +610,7 @@ void BazaarPlugin::commitFromEditor()
return; return;
//use the same functionality than if the user closes the file without completing the commit //use the same functionality than if the user closes the file without completing the commit
m_core->editorManager()->closeEditors(m_core->editorManager()->editorsForFileName(m_changeLog->fileName())); Core::ICore::editorManager()->closeEditors(Core::ICore::editorManager()->editorsForFileName(m_changeLog->fileName()));
} }
bool BazaarPlugin::submitEditorAboutToClose(VcsBase::VcsBaseSubmitEditor *submitEditor) bool BazaarPlugin::submitEditorAboutToClose(VcsBase::VcsBaseSubmitEditor *submitEditor)
...@@ -643,7 +641,7 @@ bool BazaarPlugin::submitEditorAboutToClose(VcsBase::VcsBaseSubmitEditor *submit ...@@ -643,7 +641,7 @@ bool BazaarPlugin::submitEditorAboutToClose(VcsBase::VcsBaseSubmitEditor *submit
QStringList files = commitEditor->checkedFiles(); QStringList files = commitEditor->checkedFiles();
if (!files.empty()) { if (!files.empty()) {
//save the commit message //save the commit message
if (!m_core->fileManager()->saveFile(editorFile)) if (!Core::ICore::fileManager()->saveFile(editorFile))
return false; return false;
//rewrite entries of the form 'file => newfile' to 'newfile' because //rewrite entries of the form 'file => newfile' to 'newfile' because
......
...@@ -52,7 +52,6 @@ QT_END_NAMESPACE ...@@ -52,7 +52,6 @@ QT_END_NAMESPACE
namespace Core { namespace Core {
class ActionManager; class ActionManager;
class ActionContainer; class ActionContainer;
class ICore;
class Id; class Id;
class IVersionControl; class IVersionControl;
class IEditorFactory; class IEditorFactory;
...@@ -138,7 +137,6 @@ private: ...@@ -138,7 +137,6 @@ private:
OptionsPage *m_optionsPage; OptionsPage *m_optionsPage;
BazaarClient *m_client; BazaarClient *m_client;
Core::ICore *m_core;
Locator::CommandLocator *m_commandLocator; Locator::CommandLocator *m_commandLocator;
Core::ActionManager *m_actionManager; Core::ActionManager *m_actionManager;
Core::ActionContainer *m_bazaarContainer; Core::ActionContainer *m_bazaarContainer;
......
...@@ -126,7 +126,7 @@ void OptionsPage::apply() ...@@ -126,7 +126,7 @@ void OptionsPage::apply()
if (newSettings != plugin->settings()) { if (newSettings != plugin->settings()) {
//assume success and emit signal that settings are changed; //assume success and emit signal that settings are changed;
plugin->setSettings(newSettings); plugin->setSettings(newSettings);
newSettings.writeSettings(Core::ICore::instance()->settings()); newSettings.writeSettings(Core::ICore::settings());
emit settingsChanged(); emit settingsChanged();
} }
} }
......
...@@ -245,7 +245,7 @@ public: ...@@ -245,7 +245,7 @@ public:
if (errorString) if (errorString)
*errorString = errStr; *errorString = errStr;
else else
QMessageBox::critical(Core::ICore::instance()->mainWindow(), tr("File Error"), errStr); QMessageBox::critical(Core::ICore::mainWindow(), tr("File Error"), errStr);
return false; return false;
} }
...@@ -264,7 +264,7 @@ private slots: ...@@ -264,7 +264,7 @@ private slots:
m_editor->addData(block, data); m_editor->addData(block, data);
file.close(); file.close();
} else { } else {
QMessageBox::critical(Core::ICore::instance()->mainWindow(), tr("File Error"), QMessageBox::critical(Core::ICore::mainWindow(), tr("File Error"),
tr("Cannot open %1: %2").arg( tr("Cannot open %1: %2").arg(
QDir::toNativeSeparators(m_fileName), file.errorString())); QDir::toNativeSeparators(m_fileName), file.errorString()));
} }
...@@ -477,7 +477,7 @@ BinEditorPlugin::~BinEditorPlugin() ...@@ -477,7 +477,7 @@ BinEditorPlugin::~BinEditorPlugin()
QAction *BinEditorPlugin::registerNewAction(const QString &id, const QString &title) QAction *BinEditorPlugin::registerNewAction(const QString &id, const QString &title)
{ {
QAction *result = new QAction(title, this); QAction *result = new QAction(title, this);
Core::ICore::instance()->actionManager()->registerAction(result, Core::Id(id), m_context); Core::ICore::actionManager()->registerAction(result, Core::Id(id), m_context);
return result; return result;
} }
...@@ -535,8 +535,7 @@ bool BinEditorPlugin::initialize(const QStringList &arguments, QString *errorMes ...@@ -535,8 +535,7 @@ bool BinEditorPlugin::initialize(const QStringList &arguments, QString *errorMes
Q_UNUSED(arguments) Q_UNUSED(arguments)
Q_UNUSED(errorMessage) Q_UNUSED(errorMessage)
Core::ICore *core = Core::ICore::instance(); connect(Core::ICore::instance(), SIGNAL(contextAboutToChange(Core::IContext *)),
connect(core, SIGNAL(contextAboutToChange(Core::IContext *)),
this, SLOT(updateCurrentEditor(Core::IContext *))); this, SLOT(updateCurrentEditor(Core::IContext *)));
addAutoReleasedObject(new BinEditorFactory(this)); addAutoReleasedObject(new BinEditorFactory(this));
......
...@@ -215,7 +215,7 @@ BookmarkView::BookmarkView(QWidget *parent) : ...@@ -215,7 +215,7 @@ BookmarkView::BookmarkView(QWidget *parent) :
connect(this, SIGNAL(clicked(const QModelIndex &)), connect(this, SIGNAL(clicked(const QModelIndex &)),
this, SLOT(gotoBookmark(const QModelIndex &))); this, SLOT(gotoBookmark(const QModelIndex &)));
ICore::instance()->addContextObject(m_bookmarkContext); ICore::addContextObject(m_bookmarkContext);
setItemDelegate(new BookmarkDelegate(this)); setItemDelegate(new BookmarkDelegate(this));
setFrameStyle(QFrame::NoFrame); setFrameStyle(QFrame::NoFrame);
...@@ -225,7 +225,7 @@ BookmarkView::BookmarkView(QWidget *parent) : ...@@ -225,7 +225,7 @@ BookmarkView::BookmarkView(QWidget *parent) :
BookmarkView::~BookmarkView() BookmarkView::~BookmarkView()
{ {
ICore::instance()->removeContextObject(m_bookmarkContext); ICore::removeContextObject(m_bookmarkContext);
} }
void BookmarkView::contextMenuEvent(QContextMenuEvent *event) void BookmarkView::contextMenuEvent(QContextMenuEvent *event)
......
...@@ -70,8 +70,7 @@ void BookmarksPlugin::extensionsInitialized() ...@@ -70,8 +70,7 @@ void BookmarksPlugin::extensionsInitialized()
bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *) bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
{ {
Core::ICore *core = Core::ICore::instance(); Core::ActionManager *am = Core::ICore::actionManager();
Core::ActionManager *am = core->actionManager();
Core::Context textcontext(TextEditor::Constants::C_TEXTEDITOR); Core::Context textcontext(TextEditor::Constants::C_TEXTEDITOR);
Core::Context globalcontext(Core::Constants::C_GLOBAL); Core::Context globalcontext(Core::Constants::C_GLOBAL);
...@@ -148,7 +147,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *) ...@@ -148,7 +147,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
this, SLOT(bookmarkMarginActionTriggered())); this, SLOT(bookmarkMarginActionTriggered()));
// EditorManager // EditorManager
QObject *editorManager = core->editorManager(); QObject *editorManager = Core::ICore::editorManager();
connect(editorManager, SIGNAL(editorAboutToClose(Core::IEditor*)), connect(editorManager, SIGNAL(editorAboutToClose(Core::IEditor*)),
this, SLOT(editorAboutToClose(Core::IEditor*))); this, SLOT(editorAboutToClose(Core::IEditor*)));
connect(editorManager, SIGNAL(editorOpened(Core::IEditor*)), connect(editorManager, SIGNAL(editorOpened(Core::IEditor*)),
......
...@@ -150,12 +150,10 @@ void Manager::initialize() ...@@ -150,12 +150,10 @@ void Manager::initialize()
connect(sessionManager, SIGNAL(projectRemoved(ProjectExplorer::Project*)), connect(sessionManager, SIGNAL(projectRemoved(ProjectExplorer::Project*)),
SLOT(onProjectListChanged()), Qt::QueuedConnection); SLOT(onProjectListChanged()), Qt::QueuedConnection);
Core::ICore *core = Core::ICore::instance();
// connect to the progress manager for signals about Parsing tasks // connect to the progress manager for signals about Parsing tasks
connect(core->progressManager(), SIGNAL(taskStarted(QString)), connect(Core::ICore::progressManager(), SIGNAL(taskStarted(QString)),
SLOT(onTaskStarted(QString)), Qt::QueuedConnection); SLOT(onTaskStarted(QString)), Qt::QueuedConnection);
connect(core->progressManager(), SIGNAL(allTasksFinished(QString)), connect(Core::ICore::progressManager(), SIGNAL(allTasksFinished(QString)),
SLOT(onAllTasksFinished(QString)), Qt::QueuedConnection); SLOT(onAllTasksFinished(QString)), Qt::QueuedConnection);
// when we signals that really document is updated - sent it to the parser // when we signals that really document is updated - sent it to the parser
......
...@@ -111,7 +111,7 @@ void NavigationWidgetFactory::saveSettings(int position, QWidget *widget) ...@@ -111,7 +111,7 @@ void NavigationWidgetFactory::saveSettings(int position, QWidget *widget)
NavigationWidget *pw = qobject_cast<NavigationWidget *>(widget); NavigationWidget *pw = qobject_cast<NavigationWidget *>(widget);
QTC_ASSERT(pw, return); QTC_ASSERT(pw, return);
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::settings();
QTC_ASSERT(settings, return); QTC_ASSERT(settings, return);
// .beginGroup is not used - to prevent simultaneous access // .beginGroup is not used - to prevent simultaneous access
...@@ -126,7 +126,7 @@ void NavigationWidgetFactory::restoreSettings(int position, QWidget *widget) ...@@ -126,7 +126,7 @@ void NavigationWidgetFactory::restoreSettings(int position, QWidget *widget)
NavigationWidget *pw = qobject_cast<NavigationWidget *>(widget); NavigationWidget *pw = qobject_cast<NavigationWidget *>(widget);
QTC_ASSERT(pw, return); QTC_ASSERT(pw, return);
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::settings();
QTC_ASSERT(settings, return); QTC_ASSERT(settings, return);
// .beginGroup is not used - to prevent simultaneous access // .beginGroup is not used - to prevent simultaneous access
......
...@@ -67,7 +67,7 @@ CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage) ...@@ -67,7 +67,7 @@ CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage)
connect(projectExplorer, SIGNAL(aboutToShowContextMenu(ProjectExplorer::Project*, ProjectExplorer::Node*)), connect(projectExplorer, SIGNAL(aboutToShowContextMenu(ProjectExplorer::Project*, ProjectExplorer::Node*)),
this, SLOT(updateContextMenu(ProjectExplorer::Project*, ProjectExplorer::Node*))); this, SLOT(updateContextMenu(ProjectExplorer::Project*, ProjectExplorer::Node*)));
Core::ActionManager *am = Core::ICore::instance()->actionManager(); Core::ActionManager *am = Core::ICore::actionManager();
Core::ActionContainer *mbuild = Core::ActionContainer *mbuild =
am->actionContainer(ProjectExplorer::Constants::M_BUILDPROJECT); am->actionContainer(ProjectExplorer::Constants::M_BUILDPROJECT);
...@@ -252,8 +252,7 @@ CMakeSettingsPage::CMakeSettingsPage() ...@@ -252,8 +252,7 @@ CMakeSettingsPage::CMakeSettingsPage()