forked from qt-creator/qt-creator
reset 'busy' cursor if editor could not be created
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user