reset 'busy' cursor if editor could not be created

This commit is contained in:
hjk
2009-11-19 09:52:34 +01:00
parent 4461ec2ef5
commit 1d0758d8b1

View File

@@ -1201,10 +1201,12 @@ IEditor *EditorManager::openEditorWithContents(const QString &editorKind,
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
IEditor *edt = createEditor(editorKind); IEditor *edt = createEditor(editorKind);
if (!edt) if (!edt) {
QApplication::restoreOverrideCursor();
return 0; return 0;
}
if (!edt || !edt->createNew(contents)) { if (!edt->createNew(contents)) {
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
delete edt; delete edt;
edt = 0; edt = 0;