Commit 646dcf0e authored by Robert Loehning's avatar Robert Loehning

Squish: Hack when "Open File" dialog can't be found

Happens to me with binary packages for Linux.

Change-Id: I688103ba2df26056468e89271e815b5717effeee
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 2b02c006
......@@ -252,7 +252,8 @@ def selectFromFileDialog(fileName, waitForFile=False):
else:
fName = os.path.basename(os.path.abspath(fileName))
pName = os.path.dirname(os.path.abspath(fileName)) + os.sep
waitForObject("{name='QFileDialog' type='QFileDialog' visible='1'}")
try:
waitForObject("{name='QFileDialog' type='QFileDialog' visible='1'}", 5000)
pathLine = waitForObject("{name='fileNameEdit' type='QLineEdit' visible='1'}")
snooze(1)
replaceEditorContent(pathLine, pName)
......@@ -261,6 +262,11 @@ def selectFromFileDialog(fileName, waitForFile=False):
snooze(1)
replaceEditorContent(pathLine, fName)
clickButton(waitForObject("{text='Open' type='QPushButton'}"))
except:
nativeType(pName + fName)
snooze(1)
nativeType("<Return>")
snooze(3)
if waitForFile:
fileCombo = waitForObject(":Qt Creator_FilenameQComboBox")
if not waitFor("str(fileCombo.currentText) in fileName", 5000):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment