forked from qt-creator/qt-creator
Support external editors for locator, projects and file system tree
When setting an external editor as the default editor in the MIME type settings. Other operations like File > Open, or when using navigation shortcuts like Follow Symbol, and stepping with the debugger will still always open the file within Qt Creator. The Open with... menu can still be used to explicitly open a file in an external editor afterwards. One of the use cases is to be able to open some files that would otherwise unhelpfully be opened in Qt Creator's binary editor in the systems default editor. Fixes: QTCREATORBUG-13880 Change-Id: I852f097da8badd10de78b74e7078987447eebe98 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -616,7 +616,9 @@ void FolderNavigationWidget::openItem(const QModelIndex &index)
|
||||
if (m_fileSystemModel->isDir(index))
|
||||
return;
|
||||
const QString path = m_fileSystemModel->filePath(index);
|
||||
Core::EditorManager::openEditor(FilePath::fromString(path));
|
||||
Core::EditorManager::openEditor(FilePath::fromString(path),
|
||||
{},
|
||||
Core::EditorManager::AllowExternalEditor);
|
||||
}
|
||||
|
||||
void FolderNavigationWidget::createNewFolder(const QModelIndex &parent)
|
||||
|
||||
Reference in New Issue
Block a user