Squish: Prevent possible timing issue

Change-Id: Ia13ae58792c73453b89b8288c5807448f7438c37
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
Robert Loehning
2013-09-11 23:17:28 +02:00
parent e93f8edcb8
commit b044f25c2b

View File

@@ -612,8 +612,9 @@ def addCPlusPlusFileToCurrentProject(name, template, forceOverwrite=False):
"visible='1' window=%s}" % window)
replaceEditorContent(lineEdit, name)
clickButton(waitForObject(":Next_QPushButton"))
fileExistedBefore = os.path.exists(os.path.join(basePath, name))
__createProjectHandleLastPage__()
if (os.path.exists(os.path.join(basePath, name))):
if (fileExistedBefore):
overwriteDialog = "{type='Core::Internal::PromptOverwriteDialog' unnamed='1' visible='1'}"
waitForObject(overwriteDialog)
if forceOverwrite: