Core: make ICore interface static

This mainly serves two purposes:
(a) it saves a function call in ICore::instance()->foo() vs ICore::foo() at runtime
(b) it saves typing and reduces line noise when reading

It's also (mostly) source compatible, as ICore::instance()->foo() remains compilable.

Change-Id: Icf7be0bce17fefe3560473534a8991ff79cbecc3
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
hjk
2012-01-18 23:25:34 +01:00
parent 951b1120d6
commit 0fbd7f320f
10 changed files with 269 additions and 406 deletions

View File

@@ -34,7 +34,7 @@
#include "actioncontainer.h"
#include "command.h"
#include "actionmanager_p.h"
#include "coreimpl.h"
#include "icore.h"
#include "coreconstants.h"
#include "editormanager.h"
#include "externaltool.h"
@@ -127,7 +127,7 @@ enum { debugMainWindow = 0 };
MainWindow::MainWindow() :
EventFilteringMainWindow(),
m_coreImpl(new CoreImpl(this)),
m_coreImpl(new ICore(this)),
m_additionalContexts(Constants::C_GLOBAL),
m_settings(ExtensionSystem::PluginManager::instance()->settings()),
m_globalSettings(ExtensionSystem::PluginManager::instance()->globalSettings()),