forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -266,9 +266,7 @@ QString CppToolsPlugin::correspondingHeaderOrSourceI(const QString &fileName) co
|
||||
return m_headerSourceMapping.value(fi.absoluteFilePath());
|
||||
|
||||
const Core::MimeDatabase *mimeDatase = Core::ICore::mimeDatabase();
|
||||
ProjectExplorer::ProjectExplorerPlugin *explorer =
|
||||
ProjectExplorer::ProjectExplorerPlugin::instance();
|
||||
ProjectExplorer::Project *project = (explorer ? explorer->currentProject() : 0);
|
||||
ProjectExplorer::Project *project = ProjectExplorer::ProjectExplorerPlugin::currentProject();
|
||||
|
||||
const FileType type = fileType(mimeDatase, fi);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user