From ed5136897947ac863312eafebd5f26940e887b8c Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Thu, 9 Apr 2015 13:34:12 +0200 Subject: [PATCH] EditorManager: Don't show a empty error message Change-Id: I64c4adf6fb8177a928fe6d95507bdfd795e8adbd Task-number: QTCREATORBUG-14064 Reviewed-by: Eike Ziller --- src/plugins/coreplugin/editormanager/editormanager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 0ce471f6da7..9591262b4a6 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -589,6 +589,8 @@ IEditor *EditorManagerPrivate::openEditor(EditorView *view, const QString &fileN QString errorString; if (!editor->open(&errorString, fn, realFn)) { QApplication::restoreOverrideCursor(); + if (errorString.isEmpty()) + errorString = tr("Could not open \"%1\": Unknown error").arg(realFn); QMessageBox::critical(ICore::mainWindow(), EditorManager::tr("File Error"), errorString); delete editor; return 0;