Commit 49db5bfa authored by Christian Stenger's avatar Christian Stenger
Browse files

Squish: Add workaround for native file dialogs on Win



Current Squish fails to hook into native file dialogs for
Qt5 builds. The workaround forces Qt Creator to use QFileDialog.

Change-Id: I3a28314bab54178d93cda85c0a36e9202f037c9c
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent ca79e429
......@@ -60,15 +60,19 @@ source("../../shared/workarounds.py")
# function must be called BEFORE any call except the first (which is done always automatically)
def overrideStartApplication():
global startApplication, __origStartApplication__
if (platform.system() != "Darwin"):
if (platform.system() == "Linux"):
return
if (__origStartApplication__ == None):
__origStartApplication__ = startApplication
def startApplication(*args):
args = list(args)
if str(args[0]).startswith('qtcreator'):
args[0] = args[0].replace('qtcreator', '"Qt Creator"', 1)
test.log("Using workaround for MacOS (different AUT name)")
if platform.system() == 'Darwin':
args[0] = args[0].replace('qtcreator', '"Qt Creator"', 1)
test.log("Using workaround for MacOS (different AUT name)")
elif not isQt4Build:
args[0] = args[0] + ' -platform windows:dialogs=none'
test.log("Using workaround for Windows (failing to hook into native FileDialog)")
return __origStartApplication__(*args)
def startedWithoutPluginError():
......
Supports Markdown
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