diff --git a/src/plugins/projectexplorer/taskmodel.cpp b/src/plugins/projectexplorer/taskmodel.cpp index 80280a5595e..11591e707d7 100644 --- a/src/plugins/projectexplorer/taskmodel.cpp +++ b/src/plugins/projectexplorer/taskmodel.cpp @@ -273,6 +273,8 @@ QVariant TaskModel::data(const QModelIndex &index, int role) const return task.summary; case TaskModel::Description: return task.description(); + case TaskModel::Type: + return int(task.type); } return {}; } diff --git a/src/plugins/projectexplorer/taskmodel.h b/src/plugins/projectexplorer/taskmodel.h index e60d8a30a51..5fa37c02d1a 100644 --- a/src/plugins/projectexplorer/taskmodel.h +++ b/src/plugins/projectexplorer/taskmodel.h @@ -44,7 +44,7 @@ public: int sizeOfLineNumber(const QFont &font); void setFileNotFound(const QModelIndex &index, bool b); - enum Roles { Description = Qt::UserRole, }; + enum Roles { Description = Qt::UserRole, Type}; int taskCount(Utils::Id categoryId); int errorTaskCount(Utils::Id categoryId); diff --git a/tests/system/objects.map b/tests/system/objects.map index 591b671e539..883bfd02af4 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -124,7 +124,7 @@ :Qt Creator.DragDoc_QToolButton {toolTip='Drag to drag documents between splits' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.Events_QDockWidget {name='QmlProfiler.Statistics.DockDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.Events_QTabBar {aboveWidget=':Qt Creator.Events_QDockWidget' type='QTabBar' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'} +:Qt Creator.Issues_QListView {type='Utils::TreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'} :Qt Creator.Project.Menu.File_QMenu {name='Project.Menu.File' type='QMenu'} :Qt Creator.Project.Menu.Folder_QMenu {name='Project.Menu.Folder' type='QMenu' visible='1'} :Qt Creator.QML debugging and profiling:_QComboBox {leftWidget=':Qt Creator.QML debugging and profiling:_QLabel' type='QComboBox' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py index 18ae360fca0..6a2904286a3 100644 --- a/tests/system/shared/build_utils.py +++ b/tests/system/shared/build_utils.py @@ -47,7 +47,7 @@ def checkLastBuild(expectedToFail=False): test.log("checkLastBuild called without a build") return buildIssues = getBuildIssues() - types = [i[5] for i in buildIssues] + types = [i[1] for i in buildIssues] errors = types.count("1") warnings = types.count("2") gotErrors = errors != 0 @@ -89,7 +89,7 @@ def dumpBuildIssues(listModel): issueDump = [] for index in dumpIndices(listModel): issueDump.extend([[str(index.data(role).toString()) for role - in range(Qt.UserRole, Qt.UserRole + 6)]]) + in range(Qt.UserRole, Qt.UserRole + 2)]]) return issueDump diff --git a/tests/system/shared/suites_qtta.py b/tests/system/shared/suites_qtta.py index 2c63e009e83..97032ae0638 100644 --- a/tests/system/shared/suites_qtta.py +++ b/tests/system/shared/suites_qtta.py @@ -20,9 +20,9 @@ def checkSyntaxError(issuesView, expectedTextsArray, warnIfMoreIssues = True): if(warnIfMoreIssues and issuesModel.rowCount() > 1): test.warning("More than one expected issues reported") # iterate issues and check if there exists "Unexpected token" message - for description, type in zip(dumpItems(issuesModel, role=Qt.UserRole + 3), - dumpItems(issuesModel, role=Qt.UserRole + 5)): - # enum Roles { File = Qt::UserRole, Line, MovedLine, Description, FileNotFound, Type, Category, Icon, Task_t }; + for description, type in zip(dumpItems(issuesModel, role=Qt.UserRole), + dumpItems(issuesModel, role=Qt.UserRole + 1)): + # enum Roles { Description = Qt::UserRole, Type}; # check if at least one of expected texts found in issue text for expectedText in expectedTextsArray: if expectedText in description: diff --git a/tests/system/suite_editors/tst_memberoperator/test.py b/tests/system/suite_editors/tst_memberoperator/test.py index ba1f1476850..4d11465b719 100644 --- a/tests/system/suite_editors/tst_memberoperator/test.py +++ b/tests/system/suite_editors/tst_memberoperator/test.py @@ -27,11 +27,11 @@ def __noBuildIssues__(): def __syntaxErrorDetected__(): buildIssues = getBuildIssues(False) for issue in buildIssues: - if issue[3] in ["Expected ';' after expression (fix available)", + if issue[0] in ["Expected ';' after expression (fix available)", "Expected ';' at end of declaration (fix available)", "Use of undeclared identifier 'syntaxError'"]: return True - if re.match(issue[3], "Declaration of reference variable '.+' requires an initializer"): + if re.match(issue[0], "Declaration of reference variable '.+' requires an initializer"): return True return False diff --git a/tests/system/suite_general/tst_opencreator_qbs/test.py b/tests/system/suite_general/tst_opencreator_qbs/test.py index 555e1437582..ca941547c90 100644 --- a/tests/system/suite_general/tst_opencreator_qbs/test.py +++ b/tests/system/suite_general/tst_opencreator_qbs/test.py @@ -24,7 +24,7 @@ def main(): else: test.warning("Parsing project timed out") compareProjectTree(rootNodeTemplate % "Qt Creator", "projecttree_creator.tsv") - buildIssuesTexts = map(lambda i: str(i[3]), getBuildIssues()) + buildIssuesTexts = map(lambda i: str(i[0]), getBuildIssues()) deprecationWarnings = filter(lambda s: "deprecated" in s, buildIssuesTexts) if deprecationWarnings: test.warning("Creator claims that the .qbs file uses deprecated features.", diff --git a/tests/system/suite_general/tst_tasks_handling/test.py b/tests/system/suite_general/tst_tasks_handling/test.py index 053d5d24c74..8c6e2395583 100644 --- a/tests/system/suite_general/tst_tasks_handling/test.py +++ b/tests/system/suite_general/tst_tasks_handling/test.py @@ -58,7 +58,7 @@ def checkOrUncheckMyTasks(): "My Tasks")) def getBuildIssuesTypeCounts(model): - issueTypes = list(map(lambda x: x.data(Qt.UserRole + 5).toInt(), dumpIndices(model))) + issueTypes = list(map(lambda x: x.data(Qt.UserRole + 1).toInt(), dumpIndices(model))) result = [issueTypes.count(0), issueTypes.count(1), issueTypes.count(2)] if len(issueTypes) != sum(result): test.fatal("Found unexpected value(s) for TaskType...")