EditorManager: Don't show a empty error message

Change-Id: I64c4adf6fb8177a928fe6d95507bdfd795e8adbd
Task-number: QTCREATORBUG-14064
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Daniel Teske
2015-04-09 13:34:12 +02:00
parent 6845cb7fa5
commit ed51368979

View File

@@ -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;