forked from qt-creator/qt-creator
Make document model static and add some document related methods
Change-Id: Ibcb863e67a2433529c9d2b6dec237f9d8b1d8d50 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -154,7 +154,7 @@ ExtensionSystem::IPlugin::ShutdownFlag CppToolsPlugin::aboutToShutdown()
|
||||
void CppToolsPlugin::switchHeaderSource()
|
||||
{
|
||||
QString otherFile = correspondingHeaderOrSource(
|
||||
Core::EditorManager::currentEditor()->document()->filePath());
|
||||
Core::EditorManager::currentDocument()->filePath());
|
||||
if (!otherFile.isEmpty())
|
||||
Core::EditorManager::openEditor(otherFile);
|
||||
}
|
||||
@@ -162,7 +162,7 @@ void CppToolsPlugin::switchHeaderSource()
|
||||
void CppToolsPlugin::switchHeaderSourceInNextSplit()
|
||||
{
|
||||
QString otherFile = correspondingHeaderOrSource(
|
||||
Core::EditorManager::currentEditor()->document()->filePath());
|
||||
Core::EditorManager::currentDocument()->filePath());
|
||||
if (!otherFile.isEmpty())
|
||||
Core::EditorManager::openEditor(otherFile, Core::Id(), Core::EditorManager::OpenInOtherSplit);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user