From 1d0758d8b1f0816e9b45a70bcdb3896da0f1bc8d Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Thu, 19 Nov 2009 09:52:34 +0100
Subject: [PATCH] reset 'busy' cursor if editor could not be created

---
 src/plugins/coreplugin/editormanager/editormanager.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index 39271a21675..21f032904c7 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -1201,10 +1201,12 @@ IEditor *EditorManager::openEditorWithContents(const QString &editorKind,
 
     QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
     IEditor *edt = createEditor(editorKind);
-    if (!edt)
+    if (!edt) {
+        QApplication::restoreOverrideCursor();
         return 0;
+    }
 
-    if (!edt || !edt->createNew(contents)) {
+    if (!edt->createNew(contents)) {
         QApplication::restoreOverrideCursor();
         delete edt;
         edt = 0;
-- 
GitLab