Squish: Fix crash in tst_default_settings

On Windows, compilers of type "Clang" display a QComboBox instead of a QLabel

Change-Id: I68537259d8d5b38b288308675139c92395f6df62
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Robert Loehning
2019-06-14 13:52:34 +02:00
parent a2cfa43468
commit a5821ae06d

View File

@@ -121,10 +121,15 @@ def __compFunc__(it, foundComp, foundCompNames):
pathLineEdit = findObject(":Path.Utils_BaseValidatingLineEdit")
foundComp.append(str(pathLineEdit.text))
except:
label = findObject("{buddy={container=':qt_tabwidget_stackedwidget_QWidget' "
"text='Initialization:' type='QLabel' unnamed='1' visible='1'} "
"type='QLabel' unnamed='1' visible='1'}")
foundComp.append({it:str(label.text)})
objectString = ("{buddy={container=':qt_tabwidget_stackedwidget_QWidget'"
" text='Initialization:' type='QLabel' unnamed='1' visible='1'}"
" type='%s' unnamed='1' visible='1'}")
try:
foundText = findObject(objectString % "QLabel").text
except:
foundText = findObject(objectString % "QComboBox").currentText
foundComp.append({it:str(foundText)})
foundCompNames.append(it)
def __dbgFunc__(it, foundDbg):