diff options
author | hjk <qtc-committer@nokia.com> | 2012-01-24 18:57:39 +0100 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-01-24 19:20:13 +0100 |
commit | b0b105d5758e85d08057edc2e914a7f2060bfe3f (patch) | |
tree | 1206d80383fd6e4b53673f901dec224c38a824f5 /src/plugins/projectexplorer/session.cpp | |
parent | ecd9f3c4395b099c3d38c4762427fbd822888e9c (diff) | |
download | qt-creator-b0b105d5758e85d08057edc2e914a7f2060bfe3f.tar.gz |
ProjectExplorer: make currentProject static
This saves one function call compared to the instance()->currentProject()
pattern and is typically less to type on the caller site.
Change-Id: I65568f30205fc90e2aaca7e8e7f0192241df8c85
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/plugins/projectexplorer/session.cpp')
-rw-r--r-- | src/plugins/projectexplorer/session.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index 3f334fd7a8..e035ce703a 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -820,7 +820,7 @@ Project *SessionManager::projectForFile(const QString &fileName) const const QList<Project *> &projectList = projects(); // Check current project first - Project *currentProject = ProjectExplorerPlugin::instance()->currentProject(); + Project *currentProject = ProjectExplorerPlugin::currentProject(); if (currentProject && projectContainsFile(currentProject, fileName)) return currentProject; @@ -856,7 +856,7 @@ QString SessionManager::currentSession() const void SessionManager::updateWindowTitle() { if (isDefaultSession(m_sessionName)) { - if (Project *currentProject = ProjectExplorerPlugin::instance()->currentProject()) + if (Project *currentProject = ProjectExplorerPlugin::currentProject()) ICore::editorManager()->setWindowTitleAddition(currentProject->displayName()); else ICore::editorManager()->setWindowTitleAddition(QString()); |