forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user