diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py
index 418f6967792071557e74ff258f46b97ba5e49c8a..2aacbf68c15051cc29837f377045c2a4063be9c4 100644
--- a/tests/system/shared/qtcreator.py
+++ b/tests/system/shared/qtcreator.py
@@ -21,11 +21,13 @@ source("../../shared/editor_utils.py")
 
 def waitForCleanShutdown(timeOut=10):
     appCtxt = currentApplicationContext()
-    shutdownDone = False
+    shutdownDone = (str(appCtxt)=="")
     if platform.system() in ('Windows','Microsoft'):
         endtime = datetime.utcnow() + timedelta(seconds=timeOut)
         while not shutdownDone:
             # following work-around because os.kill() works for win not until python 2.7
+            if appCtxt.pid==-1:
+                break
             tasks = subprocess.Popen("tasklist /FI \"PID eq %d\"" % appCtxt.pid, shell=True,stdout=subprocess.PIPE)
             output = tasks.communicate()[0]
             tasks.stdout.close()
@@ -47,7 +49,7 @@ def waitForCleanShutdown(timeOut=10):
 
 def __removeTmpSettingsDir__():
     waitForCleanShutdown()
-    deleteDirIfExists(os.path.dirname(tmpSettingsDir))
+    deleteDirIfExists(os.path.dirname(os.path.dirname(tmpSettingsDir)))
 
 if platform.system() in ('Windows', 'Microsoft'):
     sdkPath = "C:\\QtSDK"
@@ -67,5 +69,5 @@ tmpSettingsDir = os.path.abspath(tmpSettingsDir+"/settings")
 shutil.copytree(cwd, tmpSettingsDir)
 # the following only doesn't work if the test ends in an exception
 atexit.register(__removeTmpSettingsDir__)
-SettingsPath = " -settingspath %s" % tmpSettingsDir
+SettingsPath = ' -settingspath "%s"' % tmpSettingsDir
 
diff --git a/tests/system/shared/qtquick.py b/tests/system/shared/qtquick.py
index 98b664bf0b16658b79c105f232e952fffff05440..899bdeeda06b3d1708b56ee5e23d4471cfea0208 100644
--- a/tests/system/shared/qtquick.py
+++ b/tests/system/shared/qtquick.py
@@ -119,8 +119,11 @@ def runAndCloseQtQuickUI():
     # the following is currently a work-around for not using hooking into subprocesses
     if (waitForObject(":Qt Creator_Core::Internal::OutputPaneToggleButton").checked!=True):
         clickButton(":Qt Creator_Core::Internal::OutputPaneToggleButton")
-    clickButton(":Qt Creator.Stop_QToolButton")
+    stop = findObject(":Qt Creator.Stop_QToolButton")
+    waitFor("stop.enabled==True")
+    clickButton(stop)
     if platform.system()=="Darwin":
+        waitFor("stop.enabled==False")
         snooze(2)
         nativeType("<Escape>")
     return True
diff --git a/tests/system/suite_qtquick/tst_qml_editor/test.py b/tests/system/suite_qtquick/tst_qml_editor/test.py
index 4c7edff0f0a0df68976801d2891fdca7d26a13c0..f2bf98e3c9b2543485f047de187551b979eb3d3f 100644
--- a/tests/system/suite_qtquick/tst_qml_editor/test.py
+++ b/tests/system/suite_qtquick/tst_qml_editor/test.py
@@ -32,11 +32,22 @@ def testRenameId():
     model = navTree.model()
     files = ["Core.ContextMenu\\.qml", "Core.GridMenu\\.qml", "Core.ListMenu\\.qml", "focus\\.qml"]
     originalTexts = {}
+    editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
+                           "window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
+    # temporarily store editor content for synchronizing purpose
+    # usage of formerTxt is done because I couldn't get waitForSignal() to work
+    # it always stored a different object into the signalObjects map as it looked up afterwards
+    # although used objectMap.realName() for both
+    formerTxt = editor.plainText
     for file in files:
         doubleClickFile(navTree, file)
-        editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
-                               "window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
-        originalTexts.setdefault(file, "%s" % editor.plainText)
+        # wait until editor content switched to the double-clicked file
+        while formerTxt==editor.plainText:
+            editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
+                                   "window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
+        # store content for next round
+        formerTxt = editor.plainText
+        originalTexts.setdefault(file, "%s" % formerTxt)
         test.log("stored %s's content" % file.replace("Core.","").replace("\\",""))
     # last opened file is the main file focus.qml
     line = "FocusScope\s*\{"
@@ -52,21 +63,32 @@ def testRenameId():
                        "window=':Qt Creator_Core::Internal::MainWindow'}"), "renamedView")
     clickButton(waitForObject("{text='Replace' type='QToolButton' unnamed='1' visible='1' "
                               "window=':Qt Creator_Core::Internal::MainWindow'}"))
+    # store editor content for synchronizing purpose
+    formerTxt = editor.plainText
     for file in files:
         doubleClickFile(navTree, file)
-        editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
-                               "window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
-        modifiedText = "%s" % editor.plainText
+        # wait until editor content switched to double-clicked file
+        while formerTxt==editor.plainText:
+            editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
+                                   "window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
+        # store content for next round
+        formerTxt = editor.plainText
         originalText = originalTexts.get(file).replace("mainView", "renamedView")
-        test.compare(originalText,modifiedText)
+        test.compare(originalText,formerTxt, "Comparing %s" % file.replace("Core.","").replace("\\",""))
     invokeMenuItem("File","Save All")
 
 def doubleClickFile(navTree, file):
     treeElement = ("untitled.QML.%s/qml.%s" %
-                   (templateDir.replace("\\", "/").replace("_", "\\_").replace(".","\\."),file))
+                   (maskSpecialCharsForProjectTree(templateDir),file))
     waitForObjectItem(navTree, treeElement)
     doubleClickItem(navTree, treeElement, 5, 5, 0, Qt.LeftButton)
 
+def maskSpecialCharsForProjectTree(filename):
+    filename = filename.replace("\\", "/").replace("_", "\\_").replace(".","\\.")
+    # undoing mask operations on chars masked by mistake
+    filename = filename.replace("/?","\\?").replace("/*","\\*")
+    return filename
+
 def cleanup():
     global workingDir, templateDir
     waitForCleanShutdown()