Commit d9686f5b authored by mae's avatar mae

Do not call QProcess::startDetached() with an empty string if no external

editor is defined.
parent 05c35356
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment