forked from qt-creator/qt-creator
Do not call QProcess::startDetached() with an empty string if no external
editor is defined.
This commit is contained in:
@@ -1152,7 +1152,7 @@ void EditorManager::updateActions()
|
||||
|
||||
m_d->m_duplicateAction->setEnabled(curEditor != 0 && curEditor->duplicateSupported());
|
||||
|
||||
m_d->m_openInExternalEditorAction->setEnabled(curEditor != 0);
|
||||
m_d->m_openInExternalEditorAction->setEnabled(curEditor != 0 && !m_d->m_externalEditor.isEmpty());
|
||||
}
|
||||
|
||||
QList<IEditor*> EditorManager::openedEditors() const
|
||||
@@ -1488,6 +1488,9 @@ QString EditorManager::externalEditorHelpText() const
|
||||
|
||||
void EditorManager::openInExternalEditor()
|
||||
{
|
||||
if (m_d->m_externalEditor.isEmpty())
|
||||
return;
|
||||
|
||||
IEditor *editor = currentEditor();
|
||||
if (!editor)
|
||||
return;
|
||||
@@ -1499,7 +1502,6 @@ void EditorManager::openInExternalEditor()
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
QRect rect = editor->widget()->rect();
|
||||
QFont font = editor->widget()->font();
|
||||
QFontMetrics fm(font);
|
||||
|
Reference in New Issue
Block a user