forked from qt-creator/qt-creator
SquishTests: Avoid warnings when reading build issues
tst_APTW01 explicitly disables the Clang Code Model so there is no filter category of that name. Change-Id: I7378e11582bb0231a24404cca212a234ef7f37ed Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -25,13 +25,21 @@ def toggleIssuesFilter(filterName, checked):
|
|||||||
|
|
||||||
|
|
||||||
def getBuildIssues(ignoreCodeModel=True):
|
def getBuildIssues(ignoreCodeModel=True):
|
||||||
|
# Heuristically determine whether the ClandCodeModel is loaded.
|
||||||
|
# The current implementation is inaccurate:
|
||||||
|
# The value may be "True" although the CCM was not loaded due to existing settings or
|
||||||
|
# insufficient memory. This would result in a slightly longer execution and false positive
|
||||||
|
# warnings. Since neither would cause an actual damage and a precise handling would require
|
||||||
|
# a bigger refactoring, this seems acceptable.
|
||||||
|
clangLoaded = " -noload ClangCodeModel" not in currentApplicationContext().commandLine
|
||||||
|
|
||||||
ensureChecked(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton" , silent=True)
|
ensureChecked(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton" , silent=True)
|
||||||
model = waitForObject(":Qt Creator.Issues_QListView").model()
|
model = waitForObject(":Qt Creator.Issues_QListView").model()
|
||||||
if ignoreCodeModel:
|
if ignoreCodeModel and clangLoaded:
|
||||||
# filter out possible code model issues present inside the Issues pane
|
# filter out possible code model issues present inside the Issues pane
|
||||||
toggleIssuesFilter("Clang Code Model", False)
|
toggleIssuesFilter("Clang Code Model", False)
|
||||||
result = dumpBuildIssues(model)
|
result = dumpBuildIssues(model)
|
||||||
if ignoreCodeModel:
|
if ignoreCodeModel and clangLoaded:
|
||||||
# reset the filter
|
# reset the filter
|
||||||
toggleIssuesFilter("Clang Code Model", True)
|
toggleIssuesFilter("Clang Code Model", True)
|
||||||
return result
|
return result
|
||||||
|
Reference in New Issue
Block a user