forked from qt-creator/qt-creator
SquishTests: Update and clean up toggling of QML debugging
- The old code was waiting for labels but their properties were outdated. Since these were only used to issue a warning, I removed them. - After removing that, the remaining code branches could be merged. - The branch for CMake would try clicking a button which would not appear at this point in time anymore. That dialog - with changed properties - will now be shown when starting a build. It didn't matter because that brach was unused anyway. I removed it. Change-Id: I564ea7a7c918ba910d50cc42306683613222226d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -213,7 +213,6 @@
|
|||||||
:scrollArea.Details_Utils::DetailsButton {text='Details' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:scrollArea.Details_Utils::DetailsButton {text='Details' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:scrollArea.Edit build configuration:_QComboBox {leftWidget=':scrollArea.Edit build configuration:_QLabel' type='QComboBox' unnamed='1' visible='1'}
|
:scrollArea.Edit build configuration:_QComboBox {leftWidget=':scrollArea.Edit build configuration:_QLabel' type='QComboBox' unnamed='1' visible='1'}
|
||||||
:scrollArea.Edit build configuration:_QLabel {text='Edit build configuration:' type='QLabel' unnamed='1' visible='1'}
|
:scrollArea.Edit build configuration:_QLabel {text='Edit build configuration:' type='QLabel' unnamed='1' visible='1'}
|
||||||
:scrollArea.Library not available_QLabel {name='qmlDebuggingWarningText' text?='Library not available*' type='QLabel' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
|
||||||
:sourceFileLineEdit_Utils::FileNameValidatingLineEdit {name='SrcFileName' type='Utils::FancyLineEdit' visible='1' window=':New_ProjectExplorer::JsonWizard'}
|
:sourceFileLineEdit_Utils::FileNameValidatingLineEdit {name='SrcFileName' type='Utils::FancyLineEdit' visible='1' window=':New_ProjectExplorer::JsonWizard'}
|
||||||
:splitter.Commit File(s)_VcsBase::QActionPushButton {text~='(Commit .+/.+ File.*)' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
:splitter.Commit File(s)_VcsBase::QActionPushButton {text~='(Commit .+/.+ File.*)' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||||
:splitter.Description_QGroupBox {container=':Qt Creator.splitter_QSplitter' name='descriptionBox' title='Description' type='QGroupBox' visible='1'}
|
:splitter.Description_QGroupBox {container=':Qt Creator.splitter_QSplitter' name='descriptionBox' title='Description' type='QGroupBox' visible='1'}
|
||||||
|
@@ -142,41 +142,14 @@ def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShad
|
|||||||
|
|
||||||
buildCfCombo = waitForObject("{leftWidget=':scrollArea.Edit build configuration:_QLabel' "
|
buildCfCombo = waitForObject("{leftWidget=':scrollArea.Edit build configuration:_QLabel' "
|
||||||
"type='QComboBox' unnamed='1' visible='1'}")
|
"type='QComboBox' unnamed='1' visible='1'}")
|
||||||
if shouldBeDebug:
|
buildType = "Debug" if shouldBeDebug else "Release"
|
||||||
test.compare(buildCfCombo.currentText, 'Debug', "Verifying whether it's a debug build")
|
test.compare(buildCfCombo.currentText, buildType,
|
||||||
else:
|
"Verifying whether it's a %s build" % buildType)
|
||||||
test.compare(buildCfCombo.currentText, 'Release', "Verifying whether it's a release build")
|
qmlDebuggingCombo = waitForObject(':Qt Creator.QML debugging and profiling:_QComboBox')
|
||||||
if enableQmlDebug:
|
if (selectFromCombo(qmlDebuggingCombo, "Enable" if enableQmlDebug else "Disable")
|
||||||
try:
|
and buildSystem == "qmake"):
|
||||||
libLabel = waitForObject(":scrollArea.Library not available_QLabel", 2000)
|
# Don't rebuild now
|
||||||
mouseClick(libLabel, libLabel.width - 10, libLabel.height / 2, 0, Qt.LeftButton)
|
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
|
||||||
except:
|
|
||||||
pass
|
|
||||||
# Since waitForObject waits for the object to be enabled,
|
|
||||||
# it will wait here until compilation of the debug libraries has finished.
|
|
||||||
runCMakeButton = ("{type='QPushButton' text='Run CMake' unnamed='1' "
|
|
||||||
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
|
||||||
qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox')
|
|
||||||
if selectFromCombo(qmlDebuggingCombo, 'Enable'):
|
|
||||||
if buildSystem is None or buildSystem == "CMake": # re-run cmake to apply
|
|
||||||
clickButton(waitForObject(runCMakeButton))
|
|
||||||
elif buildSystem == "qmake": # Don't rebuild now
|
|
||||||
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
|
|
||||||
try:
|
|
||||||
problemFound = waitForObject("{window=':Qt Creator_Core::Internal::MainWindow' "
|
|
||||||
"type='QLabel' name='problemLabel' visible='1'}", 1000)
|
|
||||||
if problemFound:
|
|
||||||
test.warning('%s' % problemFound.text)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
qmlDebuggingCombo = findObject(':Qt Creator.QML debugging and profiling:_QComboBox')
|
|
||||||
if selectFromCombo(qmlDebuggingCombo, "Disable"):
|
|
||||||
test.log("Qml debugging libraries are available - unchecked qml debugging.")
|
|
||||||
if buildSystem is None or buildSystem == "CMake": # re-run cmake to apply
|
|
||||||
clickButton(waitForObject(runCMakeButton))
|
|
||||||
elif buildSystem == "qmake": # Don't rebuild now
|
|
||||||
clickButton(waitForObject(":QML Debugging.No_QPushButton", 5000))
|
|
||||||
clickButton(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
clickButton(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
||||||
switchViewTo(ViewConstants.EDIT)
|
switchViewTo(ViewConstants.EDIT)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user