Squish: Fix switching to build or run settings

If too many kits are present and/or the screen resolution is
too low to have QC having the correct minimum windows size
Squish fails to click on the items as it might be necessary
to scroll to them to have them really (user-) visible.
There is an obvious difference between 'visible' for Squish
and 'visible' for the interacting user.

Change-Id: Id658a323fcf2ae3882b225c6ce9383ed2c876e81
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
Christian Stenger
2017-05-10 14:52:51 +02:00
parent d7f79349ed
commit bae0368034

View File

@@ -100,7 +100,9 @@ def switchToBuildOrRunSettingsFor(targetCount, currentTarget, projectSettings):
if not test.verify(not str(findObject(currentTargetIndex).toolTip).startswith(clickToActivate), if not test.verify(not str(findObject(currentTargetIndex).toolTip).startswith(clickToActivate),
"Verifying target '%s' is enabled." % targets[currentTarget]): "Verifying target '%s' is enabled." % targets[currentTarget]):
return False return False
mouseClick(waitForObject(currentTargetIndex)) index = waitForObject(currentTargetIndex)
treeView.scrollTo(index)
mouseClick(index)
if projectSettings == ProjectSettings.BUILD: if projectSettings == ProjectSettings.BUILD:
settingsIndex = getQModelIndexStr("text='Build'", currentTargetIndex) settingsIndex = getQModelIndexStr("text='Build'", currentTargetIndex)