diff options
author | hjk <hjk@qt.io> | 2019-05-27 16:09:44 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-05-28 05:51:40 +0000 |
commit | 2b1c8aa8777bfacb2d65cf137b45be86b58ef3cf (patch) | |
tree | 313688371de0cee8f2a4174d82a7828d051f3cf3 | |
parent | 24560d883093e88d1c8f3c237c84b0d2fd720d0c (diff) | |
download | qt-creator-2b1c8aa8777bfacb2d65cf137b45be86b58ef3cf.tar.gz |
ProjectExplorer: Introduce a alias for QList<Tasks>
Change-Id: I91391ad22b420926b0f512cac23cfe009048b218
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
73 files changed, 359 insertions, 360 deletions
diff --git a/src/plugins/android/androidgdbserverkitinformation.cpp b/src/plugins/android/androidgdbserverkitinformation.cpp index 5266bed89f..06baec3a07 100644 --- a/src/plugins/android/androidgdbserverkitinformation.cpp +++ b/src/plugins/android/androidgdbserverkitinformation.cpp @@ -86,9 +86,9 @@ void AndroidGdbServerKitAspect::setup(Kit *kit) kit->setValue(id(), autoDetect(kit).toString()); } -QList<Task> AndroidGdbServerKitAspect::validate(const Kit *) const +Tasks AndroidGdbServerKitAspect::validate(const Kit *) const { - return QList<Task>(); + return {}; } bool AndroidGdbServerKitAspect::isApplicableToKit(const Kit *k) const diff --git a/src/plugins/android/androidgdbserverkitinformation.h b/src/plugins/android/androidgdbserverkitinformation.h index 04cd757d11..ebf416ae09 100644 --- a/src/plugins/android/androidgdbserverkitinformation.h +++ b/src/plugins/android/androidgdbserverkitinformation.h @@ -37,7 +37,7 @@ public: AndroidGdbServerKitAspect(); void setup(ProjectExplorer::Kit *) override; - QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *) const override; + ProjectExplorer::Tasks validate(const ProjectExplorer::Kit *) const override; bool isApplicableToKit(const ProjectExplorer::Kit *k) const override; ItemList toUserOutput(const ProjectExplorer::Kit *) const override; diff --git a/src/plugins/baremetal/iarewparser.cpp b/src/plugins/baremetal/iarewparser.cpp index 66a7317618..532126cabd 100644 --- a/src/plugins/baremetal/iarewparser.cpp +++ b/src/plugins/baremetal/iarewparser.cpp @@ -247,18 +247,18 @@ void BareMetalPlugin::testIarOutputParsers_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); QTest::newRow("pass-through stdout") << "Sometext" << OutputParserTester::STDOUT << "Sometext\n" << QString() - << QList<Task>() + << Tasks() << QString(); QTest::newRow("pass-through stderr") << "Sometext" << OutputParserTester::STDERR << QString() << "Sometext\n" - << QList<Task>() + << Tasks() << QString(); const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE; @@ -269,7 +269,7 @@ void BareMetalPlugin::testIarOutputParsers_data() << OutputParserTester::STDOUT << QString::fromLatin1("Error in command line: Some error\n") << QString() - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("Error in command line: Some error"), Utils::FileName(), -1, @@ -284,7 +284,7 @@ void BareMetalPlugin::testIarOutputParsers_data() << QString() << QString::fromLatin1("\"c:\\foo\\main.c\",63 Warning[Pe223]:\n" " Some warning \"foo\" bar\n") - << (QList<Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("[Pe223]: Some warning \"foo\" bar"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo\\main.c")), 63, @@ -302,7 +302,7 @@ void BareMetalPlugin::testIarOutputParsers_data() " ^\n" "\"c:\\foo\\main.c\",63 Warning[Pe223]:\n" " Some warning\n") - << (QList<Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("[Pe223]: Some warning\n" " some_detail;\n" " ^"), @@ -320,7 +320,7 @@ void BareMetalPlugin::testIarOutputParsers_data() << QString::fromLatin1("\"c:\\foo\\main.c\",63 Warning[Pe223]:\n" " Some warning\n" " , split\n") - << (QList<Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("[Pe223]: Some warning, split"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo\\main.c")), 63, @@ -334,7 +334,7 @@ void BareMetalPlugin::testIarOutputParsers_data() << QString() << QString::fromLatin1("\"c:\\foo\\main.c\",63 Error[Pe223]:\n" " Some error\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("[Pe223]: Some error"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo\\main.c")), 63, @@ -352,7 +352,7 @@ void BareMetalPlugin::testIarOutputParsers_data() " ^\n" "\"c:\\foo\\main.c\",63 Error[Pe223]:\n" " Some error\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("[Pe223]: Some error\n" " some_detail;\n" " ^"), @@ -370,7 +370,7 @@ void BareMetalPlugin::testIarOutputParsers_data() << QString::fromLatin1("\"c:\\foo\\main.c\",63 Error[Pe223]:\n" " Some error\n" " , split\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("[Pe223]: Some error, split"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo\\main.c")), 63, @@ -388,7 +388,7 @@ void BareMetalPlugin::testIarOutputParsers_data() " o\\bar\\mai\n" " n.c.o\n" "]\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("[Li005]: Some error \"foo\""), Utils::FileName::fromUserInput(QLatin1String("c:\\foo\\bar\\main.c.o")), -1, @@ -406,7 +406,7 @@ void BareMetalPlugin::testIarOutputParsers_data() " c:\\foo.c\n" " c:\\bar.c\n" "Fatal error detected, aborting.\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("[Su011]: Some error:\n" " c:\\foo.c\n" " c:\\bar.c"), @@ -420,7 +420,7 @@ void BareMetalPlugin::testIarOutputParsers_data() << OutputParserTester::STDERR << QString() << QString::fromLatin1("At end of source Error[Pe040]: Some error \";\"\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("[Pe040]: Some error \";\""), Utils::FileName(), -1, @@ -434,7 +434,7 @@ void BareMetalPlugin::testIarOutputParsers() testbench.appendOutputParser(new IarParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); QFETCH(QString, outputLines); diff --git a/src/plugins/baremetal/keilparser.cpp b/src/plugins/baremetal/keilparser.cpp index 44639c4106..67b4d18641 100644 --- a/src/plugins/baremetal/keilparser.cpp +++ b/src/plugins/baremetal/keilparser.cpp @@ -236,18 +236,18 @@ void BareMetalPlugin::testKeilOutputParsers_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); QTest::newRow("pass-through stdout") << "Sometext" << OutputParserTester::STDOUT << "Sometext\n" << QString() - << QList<Task>() + << Tasks() << QString(); QTest::newRow("pass-through stderr") << "Sometext" << OutputParserTester::STDERR << QString() << "Sometext\n" - << QList<Task>() + << Tasks() << QString(); const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE; @@ -259,7 +259,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << OutputParserTester::STDERR << QString() << QString::fromLatin1("\"c:\\foo\\main.c\", line 63: Warning: #1234: Some warning\n") - << (QList<Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("#1234: Some warning"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo\\main.c")), 63, @@ -275,7 +275,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << QString::fromLatin1("\"c:\\foo\\main.c\", line 63: Warning: #1234: Some warning\n" " int f;\n" " ^\n") - << (QList<Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("#1234: Some warning\n" " int f;\n" " ^"), @@ -289,7 +289,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << OutputParserTester::STDERR << QString() << QString::fromLatin1("\"c:\\foo\\main.c\", line 63: Error: #1234: Some error\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("#1234: Some error"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo\\main.c")), 63, @@ -301,7 +301,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << OutputParserTester::STDERR << QString() << QString::fromLatin1("\"flash.sct\", line 51 (column 20): Error: L1234: Some error\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("L1234: Some error"), Utils::FileName::fromUserInput(QLatin1String("flash.sct")), 51, @@ -317,7 +317,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << QString::fromLatin1("\"c:\\foo\\main.c\", line 63: Error: #1234: Some error\n" " int f;\n" " ^\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("#1234: Some error\n" " int f;\n" " ^"), @@ -331,7 +331,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << OutputParserTester::STDERR << QString() << QString::fromLatin1("\"c:\\foo\\main.c\", line 71: Error: At end of source: #40: Some error\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("#40: Some error"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo\\main.c")), 71, @@ -343,7 +343,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << OutputParserTester::STDERR << QString() << QString::fromLatin1("Error: L6226E: Some error.\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("L6226E: Some error."), Utils::FileName(), -1, @@ -358,7 +358,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << OutputParserTester::STDOUT << QString::fromLatin1("*** WARNING #A9 IN 15 (c:\\foo\\dscr.a51, LINE 15): Some warning\n") << QString() - << (QList<Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("#A9: Some warning"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo\\dscr.a51")), 15, @@ -370,7 +370,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << OutputParserTester::STDOUT << QString::fromLatin1("*** ERROR #A9 IN 15 (c:\\foo\\dscr.a51, LINE 15): Some error\n") << QString() - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("#A9: Some error"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo\\dscr.a51")), 15, @@ -386,7 +386,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() " Some detail 1\n" " Some detail N\n") << QString() - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("Assembler fatal error\n" " Some detail 1\n" " Some detail N"), @@ -401,7 +401,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << OutputParserTester::STDOUT << QString::fromLatin1("*** WARNING C123 IN LINE 13 OF c:\\foo.c: Some warning\n") << QString() - << (QList<Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("C123: Some warning"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo.c")), 13, @@ -413,7 +413,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << OutputParserTester::STDOUT << QString::fromLatin1("*** WARNING C123 IN LINE 13 OF c:\\foo.c: Some warning : 'extended text'\n") << QString() - << (QList<Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("C123: Some warning : 'extended text'"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo.c")), 13, @@ -425,7 +425,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << OutputParserTester::STDOUT << QString::fromLatin1("*** ERROR C123 IN LINE 13 OF c:\\foo.c: Some error\n") << QString() - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("C123: Some error"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo.c")), 13, @@ -437,7 +437,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << OutputParserTester::STDOUT << QString::fromLatin1("*** ERROR C123 IN LINE 13 OF c:\\foo.c: Some error : 'extended text'\n") << QString() - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("C123: Some error : 'extended text'"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo.c")), 13, @@ -453,7 +453,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() " Some detail 1\n" " Some detail N\n") << QString() - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("Compiler fatal error\n" " Some detail 1\n" " Some detail N"), @@ -468,7 +468,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() << OutputParserTester::STDOUT << QString::fromLatin1("*** FATAL ERROR L456: Some error\n") << QString() - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("L456: Some error"), Utils::FileName(), -1, @@ -484,7 +484,7 @@ void BareMetalPlugin::testKeilOutputParsers_data() " Some detail 1\n" " Some detail N\n") << QString() - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("L456: Some error\n" " Some detail 1\n" " Some detail N"), @@ -500,7 +500,7 @@ void BareMetalPlugin::testKeilOutputParsers() testbench.appendOutputParser(new KeilParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); QFETCH(QString, outputLines); diff --git a/src/plugins/baremetal/sdccparser.cpp b/src/plugins/baremetal/sdccparser.cpp index 24531ab7e1..d1575bce89 100644 --- a/src/plugins/baremetal/sdccparser.cpp +++ b/src/plugins/baremetal/sdccparser.cpp @@ -190,18 +190,18 @@ void BareMetalPlugin::testSdccOutputParsers_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); QTest::newRow("pass-through stdout") << "Sometext" << OutputParserTester::STDOUT << "Sometext\n" << QString() - << QList<Task>() + << Tasks() << QString(); QTest::newRow("pass-through stderr") << "Sometext" << OutputParserTester::STDERR << QString() << "Sometext\n" - << QList<Task>() + << Tasks() << QString(); const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE; @@ -213,7 +213,7 @@ void BareMetalPlugin::testSdccOutputParsers_data() << OutputParserTester::STDERR << QString() << QString::fromLatin1("c:\\foo\\main.c:63: warning 123: Some warning\n") - << (QList<Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("Some warning"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo\\main.c")), 63, @@ -229,7 +229,7 @@ void BareMetalPlugin::testSdccOutputParsers_data() << QString::fromLatin1("c:\\foo\\main.c:63: warning 123: Some warning\n" "details #1\n" " details #2\n") - << (QList<Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("Some warning\n" "details #1\n" " details #2"), @@ -243,7 +243,7 @@ void BareMetalPlugin::testSdccOutputParsers_data() << OutputParserTester::STDERR << QString() << QString::fromLatin1("c:\\foo\\main.c:63: error 123: Some error\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("Some error"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo\\main.c")), 63, @@ -259,7 +259,7 @@ void BareMetalPlugin::testSdccOutputParsers_data() << QString::fromLatin1("c:\\foo\\main.c:63: error 123: Some error\n" "details #1\n" " details #2\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("Some error\n" "details #1\n" " details #2"), @@ -273,7 +273,7 @@ void BareMetalPlugin::testSdccOutputParsers_data() << OutputParserTester::STDERR << QString() << QString::fromLatin1("c:\\foo\\main.c:63: syntax error: Some error\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("Some error"), Utils::FileName::fromUserInput(QLatin1String("c:\\foo\\main.c")), 63, @@ -285,7 +285,7 @@ void BareMetalPlugin::testSdccOutputParsers_data() << OutputParserTester::STDERR << QString() << QString::fromLatin1("at 1: error 123: Some error\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("Some error"), Utils::FileName(), -1, @@ -297,7 +297,7 @@ void BareMetalPlugin::testSdccOutputParsers_data() << OutputParserTester::STDERR << QString() << QString::fromLatin1("?ASlink-Warning-Couldn't find library 'foo.lib'\n") - << (QList<Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("Couldn't find library 'foo.lib'"), Utils::FileName(), -1, @@ -309,7 +309,7 @@ void BareMetalPlugin::testSdccOutputParsers_data() << OutputParserTester::STDERR << QString() << QString::fromLatin1("?ASlink-Error-<cannot open> : \"foo.rel\"\n") - << (QList<Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("<cannot open> : \"foo.rel\""), Utils::FileName(), -1, @@ -323,7 +323,7 @@ void BareMetalPlugin::testSdccOutputParsers() testbench.appendOutputParser(new SdccParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); QFETCH(QString, outputLines); diff --git a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp index 8e3ed0290b..b3aa6f3ccc 100644 --- a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp +++ b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp @@ -245,9 +245,9 @@ void CMakeKitAspect::setCMakeTool(Kit *k, const Core::Id id) k->setValue(TOOL_ID, toSet.toSetting()); } -QList<Task> CMakeKitAspect::validate(const Kit *k) const +Tasks CMakeKitAspect::validate(const Kit *k) const { - QList<Task> result; + Tasks result; CMakeTool *tool = CMakeKitAspect::cmakeTool(k); if (tool) { CMakeTool::Version version = tool->version(); @@ -650,12 +650,12 @@ QVariant CMakeGeneratorKitAspect::defaultValue(const Kit *k) const return GeneratorInfo({it->name, extraGenerator, QString(), QString()}).toVariant(); } -QList<Task> CMakeGeneratorKitAspect::validate(const Kit *k) const +Tasks CMakeGeneratorKitAspect::validate(const Kit *k) const { CMakeTool *tool = CMakeKitAspect::cmakeTool(k); GeneratorInfo info = generatorInfo(k); - QList<Task> result; + Tasks result; if (tool) { if (!tool->isValid()) { result << Task(Task::Warning, tr("CMake Tool is unconfigured, CMake generator will be ignored."), @@ -952,9 +952,9 @@ QVariant CMakeConfigurationKitAspect::defaultValue(const Kit *k) const return tmp; } -QList<Task> CMakeConfigurationKitAspect::validate(const Kit *k) const +Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const { - QTC_ASSERT(k, return QList<Task>()); + QTC_ASSERT(k, return Tasks()); const QtSupport::BaseQtVersion *const version = QtSupport::QtKitAspect::qtVersion(k); const ToolChain *const tcC = ToolChainKitAspect::toolChain(k, ProjectExplorer::Constants::C_LANGUAGE_ID); @@ -980,7 +980,7 @@ QList<Task> CMakeConfigurationKitAspect::validate(const Kit *k) const qtInstallDirs = CMakeConfigItem::cmakeSplitValue(expandedValue.toString()); } - QList<Task> result; + Tasks result; // Validate Qt: if (qmakePath.isEmpty()) { if (version && version->isValid() && isQt4) { diff --git a/src/plugins/cmakeprojectmanager/cmakekitinformation.h b/src/plugins/cmakeprojectmanager/cmakekitinformation.h index 57710e2bb3..7920cc1a27 100644 --- a/src/plugins/cmakeprojectmanager/cmakekitinformation.h +++ b/src/plugins/cmakeprojectmanager/cmakekitinformation.h @@ -47,7 +47,7 @@ public: static void setCMakeTool(ProjectExplorer::Kit *k, const Core::Id id); // KitAspect interface - QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const final; + ProjectExplorer::Tasks validate(const ProjectExplorer::Kit *k) const final; void setup(ProjectExplorer::Kit *k) final; void fix(ProjectExplorer::Kit *k) final; ItemList toUserOutput(const ProjectExplorer::Kit *k) const final; @@ -77,7 +77,7 @@ public: static QStringList generatorArguments(const ProjectExplorer::Kit *k); // KitAspect interface - QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const final; + ProjectExplorer::Tasks validate(const ProjectExplorer::Kit *k) const final; void setup(ProjectExplorer::Kit *k) final; void fix(ProjectExplorer::Kit *k) final; void upgrade(ProjectExplorer::Kit *k) final; @@ -103,7 +103,7 @@ public: static CMakeConfig defaultConfiguration(const ProjectExplorer::Kit *k); // KitAspect interface - QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const final; + ProjectExplorer::Tasks validate(const ProjectExplorer::Kit *k) const final; void setup(ProjectExplorer::Kit *k) final; void fix(ProjectExplorer::Kit *k) final; ItemList toUserOutput(const ProjectExplorer::Kit *k) const final; diff --git a/src/plugins/cmakeprojectmanager/cmakeparser.cpp b/src/plugins/cmakeprojectmanager/cmakeparser.cpp index a06a68f684..ac3a55dfe4 100644 --- a/src/plugins/cmakeprojectmanager/cmakeparser.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeparser.cpp @@ -146,7 +146,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); + QTest::addColumn<Tasks>("tasks"); QTest::addColumn<QString>("outputLines"); const Core::Id categoryBuild = Constants::TASK_CATEGORY_BUILDSYSTEM; @@ -155,12 +155,12 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() QTest::newRow("pass-through stdout") << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString::fromLatin1("Sometext\n") << QString() - << QList<ProjectExplorer::Task>() + << Tasks() << QString(); QTest::newRow("pass-through stderr") << QString::fromLatin1("Sometext") << OutputParserTester::STDERR << QString() << QString::fromLatin1("Sometext\n") - << QList<ProjectExplorer::Task>() + << Tasks() << QString(); // positive tests @@ -177,7 +177,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() " .hxx .in .txx\n\n") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Error, QLatin1String("Cannot find source file: unknownFile.qml Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx"), Utils::FileName::fromUserInput(QLatin1String("src/1/app/CMakeLists.txt")), 70, @@ -193,7 +193,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() " add_subdirectory given source \"app1\" which is not an existing directory.\n\n") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Error, QLatin1String("add_subdirectory given source \"app1\" which is not an existing directory."), Utils::FileName::fromUserInput(QLatin1String("src/1/CMakeLists.txt")), 8, @@ -205,7 +205,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() " Unknown CMake command \"i_am_wrong_command\".\n\n") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Error, QLatin1String("Unknown CMake command \"i_am_wrong_command\"."), Utils::FileName::fromUserInput(QLatin1String("src/1/CMakeLists.txt")), 8, @@ -217,7 +217,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() " message called with incorrect number of arguments\n\n") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Error, QLatin1String("message called with incorrect number of arguments"), Utils::FileName::fromUserInput(QLatin1String("src/1/CMakeLists.txt")), 8, @@ -231,7 +231,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() "\".") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Error, QLatin1String("Parse error. Expected \"(\", got newline with text \"\n\"."), Utils::FileName::fromUserInput(QLatin1String("/test/path/CMakeLists.txt")), 9, @@ -244,7 +244,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() "CMAKE_MAKE_PROGRAM\n") << OutputParserTester::STDERR << QString() << QString::fromLatin1("Missing variable is:\nCMAKE_MAKE_PROGRAM\n") - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Error, QLatin1String("Error required internal CMake variable not set, cmake may be not be built correctly."), Utils::FileName(), -1, categoryBuild)) @@ -257,7 +257,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() " \".\n") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Error, QLatin1String("Parse error. Expected \"(\", got newline with text \" \"."), Utils::FileName::fromUserInput(QLatin1String("CMakeLists.txt")), 4, @@ -270,7 +270,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data() "Argument not separated from preceding token by whitespace.") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Warning, QLatin1String("Argument not separated from preceding token by whitespace."), Utils::FileName::fromUserInput(QLatin1String("/test/path/CMakeLists.txt")), 9, @@ -284,7 +284,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser() testbench.appendOutputParser(new CMakeParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); QFETCH(QString, outputLines); diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index 34a82a8176..29b6d8cb30 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -402,9 +402,9 @@ bool CMakeProject::knowsAllBuildExecutables() const return false; } -QList<Task> CMakeProject::projectIssues(const Kit *k) const +Tasks CMakeProject::projectIssues(const Kit *k) const { - QList<Task> result = Project::projectIssues(k); + Tasks result = Project::projectIssues(k); if (!CMakeKitAspect::cmakeTool(k)) result.append(createProjectTask(Task::TaskType::Error, tr("No cmake tool set."))); diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.h b/src/plugins/cmakeprojectmanager/cmakeproject.h index f77f0982c5..de8dd9f800 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.h +++ b/src/plugins/cmakeprojectmanager/cmakeproject.h @@ -67,7 +67,7 @@ public: bool knowsAllBuildExecutables() const final; - QList<ProjectExplorer::Task> projectIssues(const ProjectExplorer::Kit *k) const final; + ProjectExplorer::Tasks projectIssues(const ProjectExplorer::Kit *k) const final; void runCMake(); void runCMakeAndScanProjectTree(); diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index 48072a328b..f087733815 100644 --- a/src/plugins/debugger/debuggerkitinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -343,9 +343,9 @@ Runnable DebuggerKitAspect::runnable(const Kit *kit) return runnable; } -QList<Task> DebuggerKitAspect::validateDebugger(const Kit *k) +Tasks DebuggerKitAspect::validateDebugger(const Kit *k) { - QList<Task> result; + Tasks result; const ConfigurationErrors errors = configurationErrors(k); if (errors == NoConfigurationError) diff --git a/src/plugins/debugger/debuggerkitinformation.h b/src/plugins/debugger/debuggerkitinformation.h index c07e4e0b50..3e5bfba1bb 100644 --- a/src/plugins/debugger/debuggerkitinformation.h +++ b/src/plugins/debugger/debuggerkitinformation.h @@ -41,7 +41,7 @@ class DEBUGGER_EXPORT DebuggerKitAspect : public ProjectExplorer::KitAspect public: DebuggerKitAspect(); - QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override + ProjectExplorer::Tasks validate(const ProjectExplorer::Kit *k) const override { return DebuggerKitAspect::validateDebugger(k); } void setup(ProjectExplorer::Kit *k) override; @@ -61,7 +61,7 @@ public: }; Q_DECLARE_FLAGS(ConfigurationErrors, ConfigurationError) - static QList<ProjectExplorer::Task> validateDebugger(const ProjectExplorer::Kit *k); + static ProjectExplorer::Tasks validateDebugger(const ProjectExplorer::Kit *k); static ConfigurationErrors configurationErrors(const ProjectExplorer::Kit *k); ProjectExplorer::KitAspectWidget *createConfigWidget(ProjectExplorer::Kit *k) const override; diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index 27460f2222..af933ac8c5 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -959,7 +959,7 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, AllowTerminal allowTerm // This will only be shown in some cases, but we don't want to access // the kit at that time anymore. - const QList<Task> tasks = DebuggerKitAspect::validateDebugger(kit); + const Tasks tasks = DebuggerKitAspect::validateDebugger(kit); for (const Task &t : tasks) { if (t.type != Task::Warning) m_runParameters.validationErrors.append(t.description); diff --git a/src/plugins/nim/project/nimcompilerbuildstep.cpp b/src/plugins/nim/project/nimcompilerbuildstep.cpp index 0a790a187e..be93d4e61b 100644 --- a/src/plugins/nim/project/nimcompilerbuildstep.cpp +++ b/src/plugins/nim/project/nimcompilerbuildstep.cpp @@ -316,19 +316,19 @@ void NimPlugin::testNimParser_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); // negative tests QTest::newRow("pass-through stdout") << "Sometext" << OutputParserTester::STDOUT << "Sometext\n" << QString() - << QList<Task>() + << Tasks() << QString(); QTest::newRow("pass-through stderr") << "Sometext" << OutputParserTester::STDERR << QString() << "Sometext\n" - << QList<Task>() + << Tasks() << QString(); // positive tests @@ -336,7 +336,7 @@ void NimPlugin::testNimParser_data() << QString::fromLatin1("main.nim(23, 1) Error: undeclared identifier: 'x'") << OutputParserTester::STDERR << QString("") << QString("main.nim(23, 1) Error: undeclared identifier: 'x'\n") - << QList<Task>({Task(Task::Error, + << Tasks({Task(Task::Error, "Error: undeclared identifier: 'x'", Utils::FileName::fromUserInput("main.nim"), 23, ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)}) @@ -346,7 +346,7 @@ void NimPlugin::testNimParser_data() << QString::fromLatin1("lib/pure/parseopt.nim(56, 34) Warning: quoteIfContainsWhite is deprecated [Deprecated]") << OutputParserTester::STDERR << QString("") << QString("lib/pure/parseopt.nim(56, 34) Warning: quoteIfContainsWhite is deprecated [Deprecated]\n") - << QList<Task>({Task(Task::Warning, + << Tasks({Task(Task::Warning, "Warning: quoteIfContainsWhite is deprecated [Deprecated]", Utils::FileName::fromUserInput("lib/pure/parseopt.nim"), 56, ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)}) @@ -359,7 +359,7 @@ void NimPlugin::testNimParser() testbench.appendOutputParser(new NimParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); QFETCH(QString, outputLines); diff --git a/src/plugins/nim/project/nimproject.cpp b/src/plugins/nim/project/nimproject.cpp index 9b2a147073..2691398356 100644 --- a/src/plugins/nim/project/nimproject.cpp +++ b/src/plugins/nim/project/nimproject.cpp @@ -150,11 +150,10 @@ void NimProject::updateProject() emitParsingFinished(true); } -QList<Task> NimProject::projectIssues(const Kit *k) const +Tasks NimProject::projectIssues(const Kit *k) const { - QList<Task> result = Project::projectIssues(k); - auto tc = dynamic_cast<NimToolChain *>(ToolChainKitAspect::toolChain(k, - Constants::C_NIMLANGUAGE_ID)); + Tasks result = Project::projectIssues(k); + auto tc = dynamic_cast<NimToolChain *>(ToolChainKitAspect::toolChain(k, Constants::C_NIMLANGUAGE_ID)); if (!tc) { result.append(createProjectTask(Task::TaskType::Error, tr("No Nim compiler set."))); return result; diff --git a/src/plugins/nim/project/nimproject.h b/src/plugins/nim/project/nimproject.h index 5670fbe533..c7bee38de5 100644 --- a/src/plugins/nim/project/nimproject.h +++ b/src/plugins/nim/project/nimproject.h @@ -41,7 +41,7 @@ class NimProject : public ProjectExplorer::Project public: explicit NimProject(const Utils::FileName &fileName); - QList<ProjectExplorer::Task> projectIssues(const ProjectExplorer::Kit *k) const final; + ProjectExplorer::Tasks projectIssues(const ProjectExplorer::Kit *k) const final; Utils::FileNameList nimFiles() const; QVariantMap toMap() const final; diff --git a/src/plugins/projectexplorer/ansifilterparser.cpp b/src/plugins/projectexplorer/ansifilterparser.cpp index 402dcf6f9b..a2db2c1a6f 100644 --- a/src/plugins/projectexplorer/ansifilterparser.cpp +++ b/src/plugins/projectexplorer/ansifilterparser.cpp @@ -168,7 +168,7 @@ void ProjectExplorerPlugin::testAnsiFilterOutputParser() QFETCH(QString, childStdErrLines); testbench.testParsing(input, inputChannel, - QList<Task>(), childStdOutLines, childStdErrLines, + Tasks(), childStdOutLines, childStdErrLines, QString()); } diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp index d0c5baebd0..45dee444cf 100644 --- a/src/plugins/projectexplorer/buildconfiguration.cpp +++ b/src/plugins/projectexplorer/buildconfiguration.cpp @@ -404,7 +404,7 @@ BuildConfigurationFactory::~BuildConfigurationFactory() g_buildConfigurationFactories.removeOne(this); } -const QList<Task> BuildConfigurationFactory::reportIssues(ProjectExplorer::Kit *kit, const QString &projectPath, +const Tasks BuildConfigurationFactory::reportIssues(ProjectExplorer::Kit *kit, const QString &projectPath, const QString &buildDir) const { if (m_issueReporter) diff --git a/src/plugins/projectexplorer/buildconfiguration.h b/src/plugins/projectexplorer/buildconfiguration.h index 7e6e155312..fb16fa0cd6 100644 --- a/src/plugins/projectexplorer/buildconfiguration.h +++ b/src/plugins/projectexplorer/buildconfiguration.h @@ -27,6 +27,7 @@ #include "projectexplorer_export.h" #include "projectconfiguration.h" +#include "task.h" #include <utils/environment.h> #include <utils/fileutils.h> @@ -40,7 +41,6 @@ class Kit; class NamedWidget; class Node; class Target; -class Task; class PROJECTEXPLORER_EXPORT BuildConfiguration : public ProjectConfiguration { @@ -150,10 +150,10 @@ public: static BuildConfigurationFactory *find(const Kit *k, const QString &projectPath); static BuildConfigurationFactory *find(Target *parent); - using IssueReporter = std::function<QList<ProjectExplorer::Task>(Kit *, const QString &, const QString &)>; + using IssueReporter = std::function<Tasks(Kit *, const QString &, const QString &)>; void setIssueReporter(const IssueReporter &issueReporter); - const QList<Task> reportIssues(ProjectExplorer::Kit *kit, - const QString &projectPath, const QString &buildDir) const; + const Tasks reportIssues(ProjectExplorer::Kit *kit, + const QString &projectPath, const QString &buildDir) const; protected: virtual QList<BuildInfo> availableBuilds(const Target *parent) const = 0; diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp index f2302c08d7..eece545e07 100644 --- a/src/plugins/projectexplorer/buildmanager.cpp +++ b/src/plugins/projectexplorer/buildmanager.cpp @@ -376,7 +376,7 @@ void BuildManager::nextBuildQueue() const QString projectName = d->m_currentBuildStep->project()->displayName(); const QString targetName = t->displayName(); addToOutputWindow(tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName), BuildStep::OutputFormat::Stderr); - const QList<Task> kitTasks = t->kit()->validate(); + const Tasks kitTasks = t->kit()->validate(); if (!kitTasks.isEmpty()) { addToOutputWindow(tr("The kit %1 has configuration issues which might be the root cause for this problem.") .arg(targetName), BuildStep::OutputFormat::Stderr); diff --git a/src/plugins/projectexplorer/clangparser.cpp b/src/plugins/projectexplorer/clangparser.cpp index 98d733e69f..ced5bda3a2 100644 --- a/src/plugins/projectexplorer/clangparser.cpp +++ b/src/plugins/projectexplorer/clangparser.cpp @@ -141,7 +141,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE; @@ -149,19 +149,19 @@ void ProjectExplorerPlugin::testClangOutputParser_data() QTest::newRow("pass-through stdout") << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString::fromLatin1("Sometext\n") << QString() - << QList<Task>() + << Tasks() << QString(); QTest::newRow("pass-through stderr") << QString::fromLatin1("Sometext") << OutputParserTester::STDERR << QString() << QString::fromLatin1("Sometext\n") - << QList<Task>() + << Tasks() << QString(); QTest::newRow("clang++ warning") << QString::fromLatin1("clang++: warning: argument unused during compilation: '-mthreads'") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Warning, QLatin1String("argument unused during compilation: '-mthreads'"), Utils::FileName(), -1, @@ -171,7 +171,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() << QString::fromLatin1("clang++: error: no input files [err_drv_no_input_files]") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QLatin1String("no input files [err_drv_no_input_files]"), Utils::FileName(), -1, @@ -184,7 +184,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() " ^") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Unknown, QLatin1String("In file included from ..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h:45:"), Utils::FileName::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h")), 45, @@ -202,7 +202,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() " ^") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Unknown, QLatin1String("instantiated from:\n" "# define Q_CORE_EXPORT Q_DECL_IMPORT\n" @@ -216,7 +216,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() " ^") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QLatin1String("'bits/c++config.h' file not found\n" "#include <bits/c++config.h>\n" @@ -231,7 +231,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Warning, QLatin1String("?: has lower precedence than +; + will be evaluated first [-Wparentheses]\n" " int x = option->rect.x() + horizontal ? 2 : 6;\n" @@ -245,7 +245,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() "CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'") << OutputParserTester::STDERR << QString() << QString::fromLatin1("Check dependencies\n") - << (QList<Task>() + << (Tasks() << Task(Task::Error, QLatin1String("No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) were found."), Utils::FileName(), -1, @@ -259,7 +259,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() << QString::fromLatin1("/home/qtwebkithelpviewer.h:0: Note: No relevant classes found. No output generated.") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Unknown, QLatin1String("Note: No relevant classes found. No output generated."), Utils::FileName::fromUserInput(QLatin1String("/home/qtwebkithelpviewer.h")), 0, @@ -274,7 +274,7 @@ void ProjectExplorerPlugin::testClangOutputParser() testbench.appendOutputParser(new ClangParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); QFETCH(QString, outputLines); diff --git a/src/plugins/projectexplorer/customparser.cpp b/src/plugins/projectexplorer/customparser.cpp index 8c0b287ce4..dfdb71c4d4 100644 --- a/src/plugins/projectexplorer/customparser.cpp +++ b/src/plugins/projectexplorer/customparser.cpp @@ -215,7 +215,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() QTest::addColumn<int>("warningMessageCap"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE; @@ -230,7 +230,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << QString() << 1 << 2 << 3 << QString() << 1 << 2 << 3 << QString::fromLatin1("Sometext\n") << QString() - << QList<Task>() + << Tasks() << QString(); QTest::newRow("pass-through stdout") @@ -241,7 +241,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << simplePattern << 1 << 2 << 3 << QString() << 1 << 2 << 3 << QString::fromLatin1("Sometext\n") << QString() - << QList<Task>() + << Tasks() << QString(); QTest::newRow("pass-through stderr") @@ -252,7 +252,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << simplePattern << 1 << 2 << 3 << QString() << 1 << 2 << 3 << QString() << QString::fromLatin1("Sometext\n") - << QList<Task>() + << Tasks() << QString(); const QString simpleError = "main.c:9: error: `sfasdf' undeclared (first use this function)"; @@ -267,7 +267,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << simplePattern << 1 << 2 << 3 << QString() << 0 << 0 << 0 << QString() << QString() - << QList<Task>{Task(Task::Error, message, fileName, 9, categoryCompile)} + << Tasks{Task(Task::Error, message, fileName, 9, categoryCompile)} << QString(); const QString pathPattern = "^([a-z\\./]+):(\\d+): error: ([^\\s].+)$"; @@ -282,7 +282,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << pathPattern << 1 << 2 << 3 << QString() << 0 << 0 << 0 << QString() << QString() - << QList<Task>{Task(Task::Error, message, expandedFileName, 9, categoryCompile)} + << Tasks{Task(Task::Error, message, expandedFileName, 9, categoryCompile)} << QString(); expandedFileName = FileName::fromString("/home/src/project/subdir/main.c"); @@ -294,7 +294,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << pathPattern << 1 << 2 << 3 << QString() << 0 << 0 << 0 << QString() << QString() - << QList<Task>{Task(Task::Error, message, expandedFileName, 9, categoryCompile)} + << Tasks{Task(Task::Error, message, expandedFileName, 9, categoryCompile)} << QString(); workingDir = "/home/src/build-project"; @@ -306,7 +306,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << pathPattern << 1 << 2 << 3 << QString() << 0 << 0 << 0 << QString() << QString() - << QList<Task>{Task(Task::Error, message, expandedFileName, 9, categoryCompile)} + << Tasks{Task(Task::Error, message, expandedFileName, 9, categoryCompile)} << QString(); QTest::newRow("simple error on wrong channel") @@ -317,7 +317,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << simplePattern << 1 << 2 << 3 << QString() << 0 << 0 << 0 << simpleErrorPassThrough << QString() - << QList<Task>() + << Tasks() << QString(); QTest::newRow("simple error on other wrong channel") @@ -328,7 +328,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << simplePattern << 1 << 2 << 3 << QString() << 0 << 0 << 0 << QString() << simpleErrorPassThrough - << QList<Task>() + << Tasks() << QString(); const QString simpleError2 = "Error: Line 19 in main.c: `sfasdf' undeclared (first use this function)"; @@ -343,7 +343,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << simplePattern2 << 2 << 1 << 3 << QString() << 1 << 2 << 3 << QString() << QString() - << QList<Task>{Task(Task::Error, message, fileName, lineNumber2, categoryCompile)} + << Tasks{Task(Task::Error, message, fileName, lineNumber2, categoryCompile)} << QString(); QTest::newRow("another simple error on stdout") @@ -354,7 +354,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << simplePattern2 << 2 << 1 << 3 << QString() << 1 << 2 << 3 << QString() << QString() - << QList<Task>{Task(Task::Error, message, fileName, lineNumber2, categoryCompile)} + << Tasks{Task(Task::Error, message, fileName, lineNumber2, categoryCompile)} << QString(); const QString simpleWarningPattern = "^([a-z]+\\.[a-z]+):(\\d+): warning: ([^\\s].+)$"; @@ -369,7 +369,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << QString() << 1 << 2 << 3 << simpleWarningPattern << 1 << 2 << 3 << QString() << QString() - << QList<Task>{Task(Task::Warning, warningMessage, fileName, 1234, categoryCompile)} + << Tasks{Task(Task::Warning, warningMessage, fileName, 1234, categoryCompile)} << QString(); const QString simpleWarning2 = "Warning: `helloWorld' declared but not used (main.c:19)"; @@ -384,7 +384,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << simplePattern2 << 1 << 2 << 3 << simpleWarningPattern2 << 2 << 3 << 1 << QString() << QString() - << QList<Task>{Task(Task::Warning, warningMessage, fileName, lineNumber2, categoryCompile)} + << Tasks{Task(Task::Warning, warningMessage, fileName, lineNumber2, categoryCompile)} << QString(); QTest::newRow("warning on wrong channel") @@ -395,7 +395,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << QString() << 1 << 2 << 3 << simpleWarningPattern2 << 2 << 3 << 1 << simpleWarningPassThrough2 << QString() - << QList<Task>() + << Tasks() << QString(); QTest::newRow("warning on other wrong channel") @@ -406,7 +406,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << QString() << 1 << 2 << 3 << simpleWarningPattern2 << 2 << 3 << 1 << QString() << simpleWarningPassThrough2 - << QList<Task>() + << Tasks() << QString(); QTest::newRow("error and *warning*") @@ -417,7 +417,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << simplePattern << 1 << 2 << 3 << simpleWarningPattern << 1 << 2 << 3 << QString() << QString() - << QList<Task>{Task(Task::Warning, warningMessage, fileName, 1234, categoryCompile)} + << Tasks{Task(Task::Warning, warningMessage, fileName, 1234, categoryCompile)} << QString(); QTest::newRow("*error* when equal pattern") @@ -428,7 +428,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << simplePattern << 1 << 2 << 3 << simplePattern << 1 << 2 << 3 << QString() << QString() - << QList<Task>{Task(Task::Error, message, fileName, 9, categoryCompile)} + << Tasks{Task(Task::Error, message, fileName, 9, categoryCompile)} << QString(); const QString unitTestError = "../LedDriver/LedDriverTest.c:63: FAIL: Expected 0x0080 Was 0xffff"; @@ -445,7 +445,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() << unitTestPattern << 1 << 2 << 3 << QString() << 1 << 2 << 3 << QString() << QString() - << QList<Task>{Task(Task::Error, unitTestMessage, unitTestFileName, unitTestLineNumber, categoryCompile)} + << Tasks{Task(Task::Error, unitTestMessage, unitTestFileName, unitTestLineNumber, categoryCompile)} << QString(); } @@ -466,7 +466,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers() QFETCH(int, warningMessageCap); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, outputLines); CustomParserSettings settings; diff --git a/src/plugins/projectexplorer/extracompiler.cpp b/src/plugins/projectexplorer/extracompiler.cpp index 30b7fbef01..85fabdf623 100644 --- a/src/plugins/projectexplorer/extracompiler.cpp +++ b/src/plugins/projectexplorer/extracompiler.cpp @@ -59,7 +59,7 @@ public: const Project *project; Utils::FileName source; FileNameToContentsHash contents; - QList<Task> issues; + Tasks issues; QDateTime compileTime; Core::IEditor *lastEditor = nullptr; QMetaObject::Connection activeBuildConfigConnection; @@ -265,7 +265,7 @@ Utils::Environment ExtraCompiler::buildEnvironment() const return Utils::Environment::systemEnvironment(); } -void ExtraCompiler::setCompileIssues(const QList<Task> &issues) +void ExtraCompiler::setCompileIssues(const Tasks &issues) { d->issues = issues; d->updateIssues(); @@ -380,10 +380,10 @@ bool ProcessExtraCompiler::prepareToRun(const QByteArray &sourceContents) return true; } -QList<Task> ProcessExtraCompiler::parseIssues(const QByteArray &stdErr) +Tasks ProcessExtraCompiler::parseIssues(const QByteArray &stdErr) { Q_UNUSED(stdErr); - return QList<Task>(); + return {}; } void ProcessExtraCompiler::runImpl(const ContentProvider &provider) diff --git a/src/plugins/projectexplorer/extracompiler.h b/src/plugins/projectexplorer/extracompiler.h index 006555ffc6..d5732470d4 100644 --- a/src/plugins/projectexplorer/extracompiler.h +++ b/src/plugins/projectexplorer/extracompiler.h @@ -79,7 +79,7 @@ signals: protected: Utils::Environment buildEnvironment() const; - void setCompileIssues(const QList<Task> &issues); + void setCompileIssues(const Tasks &issues); private: void onTargetsBuilt(Project *project); @@ -123,7 +123,7 @@ protected: { Q_UNUSED(process); Q_UNUSED(sourceContents); } virtual FileNameToContentsHash handleProcessFinished(QProcess *process) = 0; - virtual QList<Task> parseIssues(const QByteArray &stdErr); + virtual Tasks parseIssues(const QByteArray &stdErr); private: using ContentProvider = std::function<QByteArray()>; diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp index 9b1fe34256..6f18cf6c54 100644 --- a/src/plugins/projectexplorer/gccparser.cpp +++ b/src/plugins/projectexplorer/gccparser.cpp @@ -199,7 +199,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE; @@ -207,18 +207,18 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() QTest::newRow("pass-through stdout") << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString::fromLatin1("Sometext\n") << QString() - << QList<Task>() + << Tasks() << QString(); QTest::newRow("pass-through stderr") << QString::fromLatin1("Sometext") << OutputParserTester::STDERR << QString() << QString::fromLatin1("Sometext\n") - << QList<Task>() + << Tasks() << QString(); QTest::newRow("ar output") << QString::fromLatin1("../../../../x86/i686-unknown-linux-gnu/bin/i686-unknown-linux-gnu-ar: creating lib/libSkyView.a") << OutputParserTester::STDERR << QString() << QString::fromLatin1("../../../../x86/i686-unknown-linux-gnu/bin/i686-unknown-linux-gnu-ar: creating lib/libSkyView.a\n") - << QList<Task>() + << Tasks() << QString(); QTest::newRow("GCCE error") @@ -227,7 +227,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "/temp/test/untitled8/main.cpp:9: error: (Each undeclared identifier is reported only once for each function it appears in.)") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Unknown, QLatin1String("In function `int main(int, char**)':"), Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), -1, @@ -246,7 +246,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("/src/corelib/global/qglobal.h:1635: warning: inline function `QDebug qDebug()' used but never defined") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Warning, QLatin1String("inline function `QDebug qDebug()' used but never defined"), Utils::FileName::fromUserInput(QLatin1String("/src/corelib/global/qglobal.h")), 1635, @@ -256,7 +256,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("main.cpp:7:2: warning: Some warning") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("Some warning"), Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 7, categoryCompile)) @@ -265,7 +265,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("C:\\temp\\test\\untitled8\\main.cpp:7: #error Symbian error") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QLatin1String("#error Symbian error"), Utils::FileName::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8\\main.cpp")), 7, @@ -276,7 +276,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("C:\\temp\\test\\untitled8\\main.cpp:8: warning: #warning Symbian warning") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Warning, QLatin1String("#warning Symbian warning"), Utils::FileName::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8\\main.cpp")), 8, @@ -286,7 +286,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("/temp/test/untitled8/main.cpp:8:2: warning: #warning Symbian warning") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Warning, QLatin1String("#warning Symbian warning"), Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), 8, @@ -298,7 +298,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "collect2: ld returned 1 exit status") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Unknown, QLatin1String("In function `main':"), Utils::FileName::fromUserInput(QLatin1String("main.o")), -1, @@ -319,7 +319,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "collect2: ld returned 1 exit status") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Unknown, QLatin1String("In function `main':"), Utils::FileName::fromUserInput(QLatin1String("main.o")), -1, @@ -338,7 +338,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("c:\\Qt\\4.6\\lib/QtGuid4.dll: file not recognized: File format not recognized") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QLatin1String("file not recognized: File format not recognized"), Utils::FileName::fromUserInput(QLatin1String("c:\\Qt\\4.6\\lib/QtGuid4.dll")), -1, @@ -348,7 +348,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("g++: /usr/local/lib: No such file or directory") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QLatin1String("/usr/local/lib: No such file or directory"), Utils::FileName(), -1, @@ -361,7 +361,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "../../../../master/src/plugins/debugger/gdb/gdbengine.cpp:2115: warning: unused variable 'handler'") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Unknown, QLatin1String("In member function 'void Debugger::Internal::GdbEngine::handleBreakInsert2(const Debugger::Internal::GdbResponse&)':"), Utils::FileName::fromUserInput(QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp")), -1, @@ -381,7 +381,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp:264: error: expected ';' before ':' token") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Unknown, QLatin1String("In member function 'void ProjectExplorer::ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()':"), Utils::FileName::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp")), -1, @@ -401,13 +401,13 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << OutputParserTester::STDERR << QString() << QString::fromLatin1("distcc[73168] (dcc_get_hostlist) Warning: no hostlist is set; can't distribute work\n" "distcc[73168] (dcc_build_somewhere) Warning: failed to distribute, running locally instead\n") - << QList<Task>() + << Tasks() << QString(); QTest::newRow("ld warning (QTCREATORBUG-905)") << QString::fromLatin1("ld: warning: Core::IEditor* QVariant::value<Core::IEditor*>() const has different visibility (hidden) in .obj/debug-shared/openeditorsview.o and (default) in .obj/debug-shared/editormanager.o") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Warning, QLatin1String("Core::IEditor* QVariant::value<Core::IEditor*>() const has different visibility (hidden) in .obj/debug-shared/openeditorsview.o and (default) in .obj/debug-shared/editormanager.o"), Utils::FileName(), -1, @@ -417,7 +417,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("ld: fatal: Symbol referencing errors. No output written to testproject") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Error, QLatin1String("Symbol referencing errors. No output written to testproject"), Utils::FileName(), -1, @@ -427,13 +427,13 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("TeamBuilder Client:: error: could not find Scheduler, running Job locally...") << OutputParserTester::STDERR << QString() << QString::fromLatin1("TeamBuilder Client:: error: could not find Scheduler, running Job locally...\n") - << QList<Task>() + << Tasks() << QString(); QTest::newRow("note") << QString::fromLatin1("/home/dev/creator/share/qtcreator/debugger/dumper.cpp:1079: note: initialized from here") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("initialized from here"), Utils::FileName::fromUserInput(QLatin1String("/home/dev/creator/share/qtcreator/debugger/dumper.cpp")), 1079, @@ -444,7 +444,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c:194: warning: suggest explicit braces to avoid ambiguous 'else'") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("In static member function 'static std::_Rb_tree_node_base* std::_Rb_global<_Dummy>::_Rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&, std::_Rb_tree_node_base*&, std::_Rb_tree_node_base*&)':"), Utils::FileName::fromUserInput(QLatin1String("/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c")), -1, @@ -458,13 +458,13 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("rm: cannot remove `release/moc_mainwindow.cpp': No such file or directory") << OutputParserTester::STDERR << QString() << QString::fromLatin1("rm: cannot remove `release/moc_mainwindow.cpp': No such file or directory\n") - << QList<Task>() + << Tasks() << QString(); QTest::newRow("ld: missing library") << QString::fromLatin1("/usr/bin/ld: cannot find -ldoesnotexist") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Error, QLatin1String("cannot find -ldoesnotexist"), Utils::FileName(), -1, @@ -476,7 +476,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "../../scriptbug/main.cpp:8: warning: unused variable c") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("In function void foo(i) [with i = double]:"), Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), -1, @@ -494,7 +494,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("main.cpp:10: instantiated from here ") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("instantiated from here"), Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 10, @@ -504,7 +504,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("/dev/creator/src/plugins/find/basetextfind.h: In constructor 'Find::BaseTextFind::BaseTextFind(QTextEdit*)':") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("In constructor 'Find::BaseTextFind::BaseTextFind(QTextEdit*)':"), Utils::FileName::fromUserInput(QLatin1String("/dev/creator/src/plugins/find/basetextfind.h")), -1, @@ -519,7 +519,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "../../scriptbug/main.cpp:5: warning: unused parameter v") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("At global scope:"), Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), -1, @@ -546,7 +546,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("/home/code/test.cpp:54:38: fatal error: test.moc: No such file or directory") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Error, QLatin1String("test.moc: No such file or directory"), Utils::FileName::fromUserInput(QLatin1String("/home/code/test.cpp")), 54, @@ -560,7 +560,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "collect2: ld returned 1 exit status") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("In function `QPlotAxis':"), Utils::FileName::fromUserInput(QLatin1String("debug/qplotaxis.o")), -1, @@ -587,7 +587,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "../stl/main.cpp:31: warning: unused parameter index") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("In member function typename _Vector_base<_Tp, _Alloc>::_Tp_alloc_type::const_reference Vector<_Tp, _Alloc>::at(int) [with _Tp = Point, _Alloc = Allocator<Point>]:"), Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), -1, @@ -617,7 +617,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "C:/Symbian_SDK/epoc32/include/e32cmn.inl:7094: warning: returning reference to temporary") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("In file included from C:/Symbian_SDK/epoc32/include/e32cmn.h:6792,"), Utils::FileName::fromUserInput(QLatin1String("C:/Symbian_SDK/epoc32/include/e32cmn.h")), 6792, @@ -640,7 +640,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("../../../src/XmlUg/targetdelete.c: At top level:") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("At top level:"), Utils::FileName::fromUserInput(QLatin1String("../../../src/XmlUg/targetdelete.c")), -1, @@ -653,7 +653,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "/Symbian/SDK/epoc32/include/variant/Symbian_OS.hrh:1134:26: warning: no newline at end of file") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("In file included from /Symbian/SDK/EPOC32/INCLUDE/GCCE/GCCE.h:15,"), Utils::FileName::fromUserInput(QLatin1String("/Symbian/SDK/EPOC32/INCLUDE/GCCE/GCCE.h")), 15, @@ -672,7 +672,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("release/main.o:main.cpp:(.text+0x42): undefined reference to `MainWindow::doSomething()'") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Error, QLatin1String("undefined reference to `MainWindow::doSomething()'"), Utils::FileName::fromUserInput(QLatin1String("main.cpp")), -1, @@ -684,7 +684,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "../../../src/shared/proparser/profileevaluator.cpp:2817:9: warning: case value '0' not in enumerated type 'ProFileEvaluator::Private::TestFunc'") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("In member function 'ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateConditionalFunction(const ProString&, const ProStringList&)':"), Utils::FileName::fromUserInput(QLatin1String("../../../src/shared/proparser/profileevaluator.cpp")), -1, @@ -700,7 +700,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "./mw.h:4:0: warning: \"STUPID_DEFINE\" redefined") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("In file included from <command-line>:0:0:"), Utils::FileName::fromUserInput(QLatin1String("<command-line>")), 0, @@ -716,7 +716,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "file.h:21:5: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("In function 'void UnitTest::CheckEqual(UnitTest::TestResults&, const Expected&, const Actual&, const UnitTest::TestDetails&) [with Expected = unsigned int, Actual = int]':"), Utils::FileName::fromUserInput(QLatin1String("file.h")), -1, @@ -734,7 +734,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("cns5k_ins_parser_tests.cpp:(.text._ZN20CNS5kINSParserEngine21DropBytesUntilStartedEP14CircularBufferIhE[CNS5kINSParserEngine::DropBytesUntilStarted(CircularBuffer<unsigned char>*)]+0x6d): undefined reference to `CNS5kINSPacket::SOH_BYTE'") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Error, QLatin1String("undefined reference to `CNS5kINSPacket::SOH_BYTE'"), Utils::FileName::fromUserInput(QLatin1String("cns5k_ins_parser_tests.cpp")), -1, @@ -745,7 +745,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("mainwindow.ui: Warning: The name 'pushButton' (QPushButton) is already in use, defaulting to 'pushButton1'.") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Warning, QLatin1String("The name 'pushButton' (QPushButton) is already in use, defaulting to 'pushButton1'."), Utils::FileName::fromUserInput(QLatin1String("mainwindow.ui")), -1, @@ -756,7 +756,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("libimf.so: warning: warning: feupdateenv is not implemented and will always fail") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Warning, QLatin1String("warning: feupdateenv is not implemented and will always fail"), Utils::FileName::fromUserInput(QLatin1String("libimf.so")), -1, @@ -770,7 +770,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() " ^") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("In file included from /home/code/src/creator/src/libs/extensionsystem/pluginerrorview.cpp:31:0:"), Utils::FileName::fromUserInput(QLatin1String("/home/code/src/creator/src/libs/extensionsystem/pluginerrorview.cpp")), 31, @@ -791,7 +791,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "main.cpp:7:22: error: within this context") << OutputParserTester::STDERR << QString() << QString() - << ( QList<Task>() + << ( Tasks() << Task(Task::Unknown, QLatin1String("In file included from /usr/include/qt4/QtCore/QString:1:0,"), Utils::FileName::fromUserInput(QLatin1String("/usr/include/qt4/QtCore/QString")), 1, @@ -821,7 +821,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "collect2: error: ld returned 1 exit status") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Unknown, QLatin1String("In function `foo()':"), Utils::FileName::fromUserInput(QLatin1String("foo.o")), -1, @@ -847,7 +847,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "collect2: error: ld returned 1 exit status") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QLatin1String("multiple definition of `foo'"), Utils::FileName::fromUserInput(QLatin1String("foo.o")), -1, @@ -867,7 +867,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << "obj/gtest-clang-printing.o:gtest-clang-printing.cpp:llvm::VerifyDisableABIBreakingChecks: error: undefined reference to 'llvm::DisableABIBreakingChecks'" << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QLatin1String("error: undefined reference to 'llvm::DisableABIBreakingChecks'"), Utils::FileName::fromString("gtest-clang-printing.cpp"), -1, @@ -879,7 +879,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("ranlib: file: lib/libtest.a(Test0.cpp.o) has no symbols") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Warning, QLatin1String("file: lib/libtest.a(Test0.cpp.o) has no symbols"), Utils::FileName(), -1, @@ -890,7 +890,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("/path/to/XCode/and/ranlib: file: lib/libtest.a(Test0.cpp.o) has no symbols") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Warning, QLatin1String("file: lib/libtest.a(Test0.cpp.o) has no symbols"), Utils::FileName(), -1, @@ -901,7 +901,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString::fromLatin1("/home/qtwebkithelpviewer.h:0: Note: No relevant classes found. No output generated.") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Unknown, QLatin1String("Note: No relevant classes found. No output generated."), Utils::FileName::fromUserInput(QLatin1String("/home/qtwebkithelpviewer.h")), 0, @@ -916,7 +916,7 @@ void ProjectExplorerPlugin::testGccOutputParsers() testbench.appendOutputParser(new GccParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); QFETCH(QString, outputLines); diff --git a/src/plugins/projectexplorer/gnumakeparser.cpp b/src/plugins/projectexplorer/gnumakeparser.cpp index f7ce1144bc..8932157159 100644 --- a/src/plugins/projectexplorer/gnumakeparser.cpp +++ b/src/plugins/projectexplorer/gnumakeparser.cpp @@ -234,7 +234,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); QTest::addColumn<QStringList>("additionalSearchDirs"); @@ -242,14 +242,14 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() << QStringList() << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString::fromLatin1("Sometext\n") << QString() - << QList<Task>() + << Tasks() << QString() << QStringList(); QTest::newRow("pass-through stderr") << QStringList() << QString::fromLatin1("Sometext") << OutputParserTester::STDERR << QString() << QString::fromLatin1("Sometext\n") - << QList<Task>() + << Tasks() << QString() << QStringList(); QTest::newRow("pass-through gcc infos") @@ -266,7 +266,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() "../../scriptbug/main.cpp: In instantiation of void bar(i) [with i = double]:\n" "../../scriptbug/main.cpp:8: instantiated from void foo(i) [with i = double]\n" "../../scriptbug/main.cpp:22: instantiated from here\n") - << QList<Task>() + << Tasks() << QString() << QStringList(); @@ -277,7 +277,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() "make[4]: Entering directory `/home/code/build/qt/examples/opengl/grabber'") << OutputParserTester::STDOUT << QString() << QString() - << QList<Task>() + << Tasks() << QString() << QStringList({"/home/code/build/qt/examples/opengl/grabber", "/home/code/build/qt/examples/opengl/grabber", "/test/dir"}); @@ -286,7 +286,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() << QString::fromLatin1("make[4]: Leaving directory `/home/code/build/qt/examples/opengl/grabber'") << OutputParserTester::STDOUT << QString() << QString() - << QList<Task>() + << Tasks() << QString() << QStringList("/test/dir"); QTest::newRow("make error") @@ -294,7 +294,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() << QString::fromLatin1("make: *** No rule to make target `hello.c', needed by `hello.o'. Stop.") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QString::fromLatin1("No rule to make target `hello.c', needed by `hello.o'. Stop."), Utils::FileName(), -1, @@ -308,7 +308,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() "make[2]: *** [sub-projectexplorer-make_default] Error 2") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QString::fromLatin1("[.obj/debug-shared/gnumakeparser.o] Error 1"), Utils::FileName(), -1, @@ -320,7 +320,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() << QString::fromLatin1("Makefile:360: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QString::fromLatin1("missing separator (did you mean TAB instead of 8 spaces?). Stop."), Utils::FileName::fromUserInput(QLatin1String("Makefile")), 360, @@ -333,7 +333,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() "mingw32-make: *** [debug] Error 2") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QString::fromLatin1("[debug/qplotaxis.o] Error 1"), Utils::FileName(), -1, @@ -345,7 +345,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() << QString::fromLatin1("mingw64-make.exe[1]: *** [dynlib.inst] Error -1073741819") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QString::fromLatin1("[dynlib.inst] Error -1073741819"), Utils::FileName(), -1, @@ -357,7 +357,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() << QString::fromLatin1("make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Warning, QString::fromLatin1("jobserver unavailable: using -j1. Add `+' to parent make rule."), Utils::FileName(), -1, @@ -369,7 +369,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() << QString::fromLatin1("/home/dev/creator/share/qtcreator/debugger/dumper.cpp:1079: note: initialized from here") << OutputParserTester::STDERR << QString() << QString::fromLatin1("/home/dev/creator/share/qtcreator/debugger/dumper.cpp:1079: note: initialized from here\n") - << QList<Task>() + << Tasks() << QString() << QStringList(); QTest::newRow("Full path make exe") @@ -377,7 +377,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() << QString::fromLatin1("C:\\Qt\\4.6.2-Symbian\\s60sdk\\epoc32\\tools\\make.exe: *** [sis] Error 2") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QString::fromLatin1("[sis] Error 2"), Utils::FileName(), -1, @@ -389,7 +389,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() << QString::fromLatin1("make: g++: Command not found") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Error, QString::fromLatin1("g++: Command not found"), Utils::FileName(), -1, @@ -401,7 +401,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data() << QString::fromLatin1("Makefile:794: warning: overriding commands for target `xxxx.app/Contents/Info.plist'") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Warning, QString::fromLatin1("overriding commands for target `xxxx.app/Contents/Info.plist'"), Utils::FileName::fromString(QLatin1String("Makefile")), 794, @@ -422,7 +422,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing() QFETCH(QStringList, extraSearchDirs); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); QFETCH(QString, outputLines); diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp index 7d6fe5603d..670c2eb801 100644 --- a/src/plugins/projectexplorer/kit.cpp +++ b/src/plugins/projectexplorer/kit.cpp @@ -255,9 +255,9 @@ bool Kit::hasWarning() const return d->m_hasWarning; } -QList<Task> Kit::validate() const +Tasks Kit::validate() const { - QList<Task> result; + Tasks result; for (KitAspect *aspect : KitManager::kitAspects()) result.append(aspect->validate(this)); @@ -550,7 +550,7 @@ IOutputParser *Kit::createOutputParser() const return first; } -QString Kit::toHtml(const QList<Task> &additional) const +QString Kit::toHtml(const Tasks &additional) const { QString result; QTextStream str(&result); diff --git a/src/plugins/projectexplorer/kit.h b/src/plugins/projectexplorer/kit.h index dfdf477107..935db0aa8b 100644 --- a/src/plugins/projectexplorer/kit.h +++ b/src/plugins/projectexplorer/kit.h @@ -71,7 +71,7 @@ public: bool isValid() const; bool hasWarning() const; - QList<Task> validate() const; + Tasks validate() const; void fix(); // Fix the individual kit information: Make sure it contains a valid value. // Fix will not look at other information in the kit! void setup(); // Apply advanced magic(TM). Used only once on each kit during initial setup. @@ -116,7 +116,7 @@ public: void addToEnvironment(Utils::Environment &env) const; IOutputParser *createOutputParser() const; - QString toHtml(const QList<Task> &additional = QList<Task>()) const; + QString toHtml(const Tasks &additional = Tasks()) const; Kit *clone(bool keepName = false) const; void copyFrom(const Kit *k); diff --git a/src/plugins/projectexplorer/kitinformation.cpp b/src/plugins/projectexplorer/kitinformation.cpp index 5c6eb44066..500d8afd5b 100644 --- a/src/plugins/projectexplorer/kitinformation.cpp +++ b/src/plugins/projectexplorer/kitinformation.cpp @@ -122,9 +122,9 @@ SysRootKitAspect::SysRootKitAspect() setPriority(31000); } -QList<Task> SysRootKitAspect::validate(const Kit *k) const +Tasks SysRootKitAspect::validate(const Kit *k) const { - QList<Task> result; + Tasks result; const Utils::FileName dir = SysRootKitAspect::sysRoot(k); if (dir.isEmpty()) return result; @@ -369,9 +369,9 @@ static QVariant defaultToolChainValue() return result; } -QList<Task> ToolChainKitAspect::validate(const Kit *k) const +Tasks ToolChainKitAspect::validate(const Kit *k) const { - QList<Task> result; + Tasks result; const QList<ToolChain*> tcList = toolChains(k); if (tcList.isEmpty()) { @@ -809,10 +809,10 @@ void DeviceTypeKitAspect::setup(Kit *k) k->setValue(id(), QByteArray(Constants::DESKTOP_DEVICE_TYPE)); } -QList<Task> DeviceTypeKitAspect::validate(const Kit *k) const +Tasks DeviceTypeKitAspect::validate(const Kit *k) const { Q_UNUSED(k); - return QList<Task>(); + return {}; } KitAspectWidget *DeviceTypeKitAspect::createConfigWidget(Kit *k) const @@ -971,10 +971,10 @@ QVariant DeviceKitAspect::defaultValue(const Kit *k) const return QString(); } -QList<Task> DeviceKitAspect::validate(const Kit *k) const +Tasks DeviceKitAspect::validate(const Kit *k) const { IDevice::ConstPtr dev = DeviceKitAspect::device(k); - QList<Task> result; + Tasks result; if (dev.isNull()) result.append(Task(Task::Warning, tr("No device set."), Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM))); @@ -1234,9 +1234,9 @@ EnvironmentKitAspect::EnvironmentKitAspect() setPriority(29000); } -QList<Task> EnvironmentKitAspect::validate(const Kit *k) const +Tasks EnvironmentKitAspect::validate(const Kit *k) const { - QList<Task> result; + Tasks result; QTC_ASSERT(k, return result); const QVariant variant = k->value(EnvironmentKitAspect::id()); diff --git a/src/plugins/projectexplorer/kitinformation.h b/src/plugins/projectexplorer/kitinformation.h index 58d8988271..104d3a1eb2 100644 --- a/src/plugins/projectexplorer/kitinformation.h +++ b/src/plugins/projectexplorer/kitinformation.h @@ -50,7 +50,7 @@ class PROJECTEXPLORER_EXPORT SysRootKitAspect : public KitAspect public: SysRootKitAspect(); - QList<Task> validate(const Kit *k) const override; + Tasks validate(const Kit *k) const override; KitAspectWidget *createConfigWidget(Kit *k) const override; ItemList toUserOutput(const Kit *k) const override; void addToMacroExpander(Kit *kit, Utils::MacroExpander *expander) const override; @@ -71,7 +71,7 @@ class PROJECTEXPLORER_EXPORT ToolChainKitAspect : public KitAspect public: ToolChainKitAspect(); - QList<Task> validate(const Kit *k) const override; + Tasks validate(const Kit *k) const override; void upgrade(Kit *k) override; void fix(Kit *k) override; void setup(Kit *k) override; @@ -116,7 +116,7 @@ public: DeviceTypeKitAspect(); void setup(Kit *k) override; - QList<Task> validate(const Kit *k) const override; + Tasks validate(const Kit *k) const override; KitAspectWidget *createConfigWidget(Kit *k) const override; ItemList toUserOutput(const Kit *k) const override; @@ -139,7 +139,7 @@ class PROJECTEXPLORER_EXPORT DeviceKitAspect : public KitAspect public: DeviceKitAspect(); - QList<Task> validate(const Kit *k) const override; + Tasks validate(const Kit *k) const override; void fix(Kit *k) override; void setup(Kit *k) override; @@ -177,7 +177,7 @@ class PROJECTEXPLORER_EXPORT EnvironmentKitAspect : public KitAspect public: EnvironmentKitAspect(); - QList<Task> validate(const Kit *k) const override; + Tasks validate(const Kit *k) const override; void fix(Kit *k) override; void addToEnvironment(const Kit *k, Utils::Environment &env) const override; diff --git a/src/plugins/projectexplorer/kitmanager.h b/src/plugins/projectexplorer/kitmanager.h index 8fb2f26164..d1ad022dfc 100644 --- a/src/plugins/projectexplorer/kitmanager.h +++ b/src/plugins/projectexplorer/kitmanager.h @@ -80,7 +80,7 @@ public: bool isEssential() const { return m_essential; } // called to find issues with the kit - virtual QList<Task> validate(const Kit *) const = 0; + virtual Tasks validate(const Kit *) const = 0; // called after restoring a kit, so upgrading of kit information settings can be done virtual void upgrade(Kit *) { return; } // called to fix issues with this kitinformation. Does not modify the rest of the kit. diff --git a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp index b69f49e3bc..f032073665 100644 --- a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp +++ b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp @@ -211,7 +211,7 @@ bool KitManagerConfigWidget::hasWarning() const QString KitManagerConfigWidget::validityMessage() const { - QList<Task> tmp; + Tasks tmp; if (!m_hasUniqueName) { tmp.append(Task(Task::Warning, tr("Display name is not unique."), Utils::FileName(), -1, ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)); diff --git a/src/plugins/projectexplorer/linuxiccparser.cpp b/src/plugins/projectexplorer/linuxiccparser.cpp index 04dbb6c65f..22682a2688 100644 --- a/src/plugins/projectexplorer/linuxiccparser.cpp +++ b/src/plugins/projectexplorer/linuxiccparser.cpp @@ -141,25 +141,25 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); QTest::newRow("pass-through stdout") << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString::fromLatin1("Sometext\n") << QString() - << QList<Task>() + << Tasks() << QString(); QTest::newRow("pass-through stderr") << QString::fromLatin1("Sometext") << OutputParserTester::STDERR << QString() << QString::fromLatin1("Sometext\n") - << QList<Task>() + << Tasks() << QString(); QTest::newRow("pch creation") << QString::fromLatin1("\".pch/Qt5Core.pchi.cpp\": creating precompiled header file \".pch/Qt5Core.pchi\"") << OutputParserTester::STDERR << QString() << QString() - << QList<Task>() + << Tasks() << QString(); QTest::newRow("undeclared function") @@ -169,7 +169,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data() "\n") << OutputParserTester::STDERR << QString() << QString::fromLatin1("\n") - << (QList<Task>() + << (Tasks() << Task(Task::Error, QLatin1String("identifier \"f\" is undefined\nf(0);"), Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 13, @@ -185,7 +185,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data() "\n") << OutputParserTester::STDERR << QString() << QString::fromLatin1("\n") - << (QList<Task>() + << (Tasks() << Task(Task::Error, QLatin1String("identifier \"f\" is undefined\nf(0);"), Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 13, @@ -200,7 +200,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data() "\n") << OutputParserTester::STDERR << QString() << QString::fromLatin1("\n") - << (QList<Task>() + << (Tasks() << Task(Task::Error, QLatin1String("function \"AClass::privatefunc\" (declared at line 4 of \"main.h\") is inaccessible\nb.privatefunc();"), Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 53, @@ -214,7 +214,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data() "\n") << OutputParserTester::STDERR << QString() << QString::fromLatin1("\n") - << (QList<Task>() + << (Tasks() << Task(Task::Warning, QLatin1String("use of \"=\" where \"==\" may have been intended\nwhile (a = true)"), Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 41, @@ -224,7 +224,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data() << QString::fromLatin1("/home/qtwebkithelpviewer.h:0: Note: No relevant classes found. No output generated.") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Unknown, QLatin1String("Note: No relevant classes found. No output generated."), Utils::FileName::fromUserInput(QLatin1String("/home/qtwebkithelpviewer.h")), 0, @@ -239,7 +239,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers() testbench.appendOutputParser(new LinuxIccParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); QFETCH(QString, outputLines); diff --git a/src/plugins/projectexplorer/msvcparser.cpp b/src/plugins/projectexplorer/msvcparser.cpp index b99880252a..4fe6a379e8 100644 --- a/src/plugins/projectexplorer/msvcparser.cpp +++ b/src/plugins/projectexplorer/msvcparser.cpp @@ -307,25 +307,25 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); QTest::newRow("pass-through stdout") << "Sometext" << OutputParserTester::STDOUT << "Sometext\n" << "" - << QList<Task>() + << Tasks() << ""; QTest::newRow("pass-through stderr") << "Sometext" << OutputParserTester::STDERR << "" << "Sometext\n" - << QList<Task>() + << Tasks() << ""; QTest::newRow("labeled error") << "qmlstandalone\\main.cpp(54) : error C4716: 'findUnresolvedModule' : must return a value" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Error, "C4716: 'findUnresolvedModule' : must return a value", FileName::fromUserInput("qmlstandalone\\main.cpp"), 54, @@ -336,7 +336,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << "qmlstandalone\\main.cpp(54): error C4716: 'findUnresolvedModule' : must return a value" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Error, "C4716: 'findUnresolvedModule' : must return a value", FileName::fromUserInput("qmlstandalone\\main.cpp"), 54, @@ -347,7 +347,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << "1>qmlstandalone\\main.cpp(54) : error C4716: 'findUnresolvedModule' : must return a value" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Error, "C4716: 'findUnresolvedModule' : must return a value", FileName::fromUserInput("qmlstandalone\\main.cpp"), 54, @@ -358,7 +358,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << "x:\\src\\plugins\\projectexplorer\\msvcparser.cpp(69) : warning C4100: 'something' : unreferenced formal parameter" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Warning, "C4100: 'something' : unreferenced formal parameter", FileName::fromUserInput("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp"), 69, @@ -370,7 +370,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << "1>x:\\src\\plugins\\projectexplorer\\msvcparser.cpp(69) : warning C4100: 'something' : unreferenced formal parameter" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Warning, "C4100: 'something' : unreferenced formal parameter", FileName::fromUserInput("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp"), 69, @@ -382,7 +382,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() " x:\\src\\plugins\\texteditor\\completionsupport.h(39) : see declaration of 'TextEditor::CompletionItem'" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Warning, "C4099: 'TextEditor::CompletionItem' : type name first seen using 'struct' now seen using 'class'", FileName::fromUserInput("x:\\src\\plugins\\texteditor\\icompletioncollector.h"), 50, @@ -398,7 +398,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() " x:\\src\\plugins\\texteditor\\completionsupport.h(39) : see declaration of 'TextEditor::CompletionItem'" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Warning, "C4099: 'TextEditor::CompletionItem' : type name first seen using 'struct' now seen using 'class'", FileName::fromUserInput("x:\\src\\plugins\\texteditor\\icompletioncollector.h"), 50, @@ -413,7 +413,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Error, "LNK1146: no argument specified with option '/LIBPATH:'", FileName(), -1, @@ -425,7 +425,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << "cl : Command line warning D9002 : ignoring unknown option '-fopenmp'" << OutputParserTester::STDERR << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Warning, "D9002 : ignoring unknown option '-fopenmp'", FileName(), -1, @@ -440,7 +440,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() " No constructor could take the source type, or constructor overload resolution was ambiguous" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Error, "C2440: 'initializing' : cannot convert from 'int' to 'std::_Tree<_Traits>::iterator'\n" "with\n" @@ -455,7 +455,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << "main.obj : error LNK2019: unresolved external symbol \"public: void __thiscall Data::doit(void)\" (?doit@Data@@QAEXXZ) referenced in function _main" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Error, "LNK2019: unresolved external symbol \"public: void __thiscall Data::doit(void)\" (?doit@Data@@QAEXXZ) referenced in function _main", FileName::fromUserInput("main.obj"), -1, @@ -465,7 +465,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << "debug\\Experimentation.exe : fatal error LNK1120: 1 unresolved externals" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Error, "LNK1120: 1 unresolved externals", FileName::fromUserInput("debug\\Experimentation.exe"), -1, @@ -476,7 +476,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << "Error: dependent '..\\..\\..\\..\\creator-2.5\\src\\plugins\\coreplugin\\ifile.h' does not exist." << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Error, "dependent '..\\..\\..\\..\\creator-2.5\\src\\plugins\\coreplugin\\ifile.h' does not exist.", FileName(), -1, @@ -486,7 +486,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << "Error: dependent 'main.cpp' does not exist." << OutputParserTester::STDERR << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Error, "dependent 'main.cpp' does not exist.", FileName(), -1, @@ -504,7 +504,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() " ]" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Warning, "C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'", FileName::fromUserInput("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility"), 2227, @@ -530,7 +530,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() " or 'D:\\Project\\types.h(71) : Types::UINT64'" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Error, "C2872: 'UINT64' : ambiguous symbol", FileName::fromUserInput("D:\\Project\\file.h"), 98, @@ -548,7 +548,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << "/home/qtwebkithelpviewer.h:0: Note: No relevant classes found. No output generated." << OutputParserTester::STDERR << "" << "/home/qtwebkithelpviewer.h:0: Note: No relevant classes found. No output generated.\n" - << (QList<ProjectExplorer::Task>()) + << (Tasks()) << ""; QTest::newRow("error with note") @@ -556,7 +556,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() "main.cpp(6): note: see declaration of 'func'" << OutputParserTester::STDOUT << "" << "" - << (QList<Task>() + << (Tasks() << Task(Task::Error, "C2733: 'func': second C linkage of overloaded function not allowed", FileName::fromUserInput("main.cpp"), 7, @@ -571,7 +571,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data() << QString::fromUtf8("cl: командная строка warning D9025: переопределение \"/MDd\" на \"/MTd\"") << OutputParserTester::STDERR << "" << "" - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Warning, QString::fromUtf8("D9025: переопределение \"/MDd\" на \"/MTd\""), FileName(), -1, Constants::TASK_CATEGORY_COMPILE)) @@ -584,7 +584,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers() testbench.appendOutputParser(new MsvcParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); QFETCH(QString, outputLines); @@ -600,7 +600,7 @@ void ProjectExplorerPlugin::testClangClOutputParsers_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); const QString warning1 = "private field 'm_version' is not used [-Wunused-private-field]\n" @@ -643,7 +643,7 @@ void ProjectExplorerPlugin::testClangClOutputParsers_data() << input << OutputParserTester::STDERR << "" << expectedStderr - << (QList<Task>() + << (Tasks() << Task(Task::Warning, warning1.trimmed(), FileName::fromUserInput("./qwindowseglcontext.h"), 282, Constants::TASK_CATEGORY_COMPILE) @@ -668,7 +668,7 @@ void ProjectExplorerPlugin::testClangClOutputParsers() testbench.appendOutputParser(new ClangClParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); QFETCH(QString, outputLines); diff --git a/src/plugins/projectexplorer/outputparser_test.cpp b/src/plugins/projectexplorer/outputparser_test.cpp index cb2a9772c3..ee7207f05f 100644 --- a/src/plugins/projectexplorer/outputparser_test.cpp +++ b/src/plugins/projectexplorer/outputparser_test.cpp @@ -43,7 +43,7 @@ OutputParserTester::OutputParserTester() = default; // test functions: void OutputParserTester::testParsing(const QString &lines, Channel inputChannel, - QList<Task> tasks, + Tasks tasks, const QString &childStdOutLines, const QString &childStdErrLines, const QString &outputLines) diff --git a/src/plugins/projectexplorer/outputparser_test.h b/src/plugins/projectexplorer/outputparser_test.h index 7836331632..43920d0ebf 100644 --- a/src/plugins/projectexplorer/outputparser_test.h +++ b/src/plugins/projectexplorer/outputparser_test.h @@ -50,7 +50,7 @@ public: // test functions: void testParsing(const QString &lines, Channel inputChannel, - QList<Task> tasks, + Tasks tasks, const QString &childStdOutLines, const QString &childStdErrLines, const QString &outputLines); @@ -76,7 +76,7 @@ private: QString m_receivedStdErrChildLine; QString m_receivedStdOutChildLine; - QList<Task> m_receivedTasks; + Tasks m_receivedTasks; QString m_receivedOutput; friend class TestTerminator; diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp index a23e14f51e..9bae7c339a 100644 --- a/src/plugins/projectexplorer/project.cpp +++ b/src/plugins/projectexplorer/project.cpp @@ -331,9 +331,9 @@ Target *Project::target(Kit *k) const return Utils::findOrDefault(d->m_targets, Utils::equal(&Target::kit, k)); } -QList<Task> Project::projectIssues(const Kit *k) const +Tasks Project::projectIssues(const Kit *k) const { - QList<Task> result; + Tasks result; if (!k->isValid()) result.append(createProjectTask(Task::TaskType::Error, tr("Kit is not valid."))); return {}; diff --git a/src/plugins/projectexplorer/project.h b/src/plugins/projectexplorer/project.h index 85f514ff33..6704e47107 100644 --- a/src/plugins/projectexplorer/project.h +++ b/src/plugins/projectexplorer/project.h @@ -126,7 +126,7 @@ public: Target *activeTarget() const; Target *target(Core::Id id) const; Target *target(Kit *k) const; - virtual QList<Task> projectIssues(const Kit *k) const; + virtual Tasks projectIssues(const Kit *k) const; std::unique_ptr<Target> createTarget(Kit *k); static bool copySteps(Target *sourceTarget, Target *newTarget); diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp index 045ea97d04..c8e707a549 100644 --- a/src/plugins/projectexplorer/targetsettingspanel.cpp +++ b/src/plugins/projectexplorer/targetsettingspanel.cpp @@ -299,7 +299,7 @@ class TargetItem : public TypedTreeItem<TreeItem, TargetGroupItem> public: enum { DefaultPage = 0 }; // Build page. - TargetItem(Project *project, Id kitId, const QList<Task> &issues) + TargetItem(Project *project, Id kitId, const Tasks &issues) : m_project(project), m_kitId(kitId), m_kitIssues(issues) { m_kitWarningForProject = containsType(m_kitIssues, Task::TaskType::Warning); @@ -499,7 +499,7 @@ public: int m_currentChild = DefaultPage; bool m_kitErrorsForProject = false; bool m_kitWarningForProject = false; - QList<Task> m_kitIssues; + Tasks m_kitIssues; private: enum class IconOverlay { diff --git a/src/plugins/projectexplorer/targetsetupwidget.cpp b/src/plugins/projectexplorer/targetsetupwidget.cpp index 2bab82f245..6aa66517e3 100644 --- a/src/plugins/projectexplorer/targetsetupwidget.cpp +++ b/src/plugins/projectexplorer/targetsetupwidget.cpp @@ -318,7 +318,7 @@ QPair<Task::TaskType, QString> TargetSetupWidget::findIssues(const BuildInfo &in return qMakePair(Task::Unknown, QString()); QString buildDir = info.buildDirectory.toString(); - QList<Task> issues; + Tasks issues; if (info.factory()) issues = info.factory()->reportIssues(m_kit, m_projectPath, buildDir); diff --git a/src/plugins/projectexplorer/task.cpp b/src/plugins/projectexplorer/task.cpp index 9860271329..beac102b90 100644 --- a/src/plugins/projectexplorer/task.cpp +++ b/src/plugins/projectexplorer/task.cpp @@ -168,7 +168,7 @@ uint qHash(const Task &task) return task.taskId; } -QString toHtml(const QList<Task> &issues) +QString toHtml(const Tasks &issues) { QString result; QTextStream str(&result); @@ -191,7 +191,7 @@ QString toHtml(const QList<Task> &issues) return result; } -bool containsType(const QList<Task> &issues, Task::TaskType type) +bool containsType(const Tasks &issues, Task::TaskType type) { return Utils::contains(issues, [type](const Task &t) { return t.type == type; }); } diff --git a/src/plugins/projectexplorer/task.h b/src/plugins/projectexplorer/task.h index 82ff6fcb13..6f704b35d0 100644 --- a/src/plugins/projectexplorer/task.h +++ b/src/plugins/projectexplorer/task.h @@ -102,13 +102,15 @@ private: friend class TaskHub; }; +using Tasks = QList<Task>; + bool PROJECTEXPLORER_EXPORT operator==(const Task &t1, const Task &t2); uint PROJECTEXPLORER_EXPORT qHash(const Task &task); bool PROJECTEXPLORER_EXPORT operator<(const Task &a, const Task &b); -QString PROJECTEXPLORER_EXPORT toHtml(const QList<Task> &issues); -bool PROJECTEXPLORER_EXPORT containsType(const QList<Task> &issues, Task::TaskType); +QString PROJECTEXPLORER_EXPORT toHtml(const Tasks &issues); +bool PROJECTEXPLORER_EXPORT containsType(const Tasks &issues, Task::TaskType); } //namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/taskhub.cpp b/src/plugins/projectexplorer/taskhub.cpp index 5ed8aa9677..b68f8dd4df 100644 --- a/src/plugins/projectexplorer/taskhub.cpp +++ b/src/plugins/projectexplorer/taskhub.cpp @@ -117,7 +117,7 @@ TaskHub::TaskHub() { m_instance = this; qRegisterMetaType<ProjectExplorer::Task>("ProjectExplorer::Task"); - qRegisterMetaType<QList<ProjectExplorer::Task> >("QList<ProjectExplorer::Task>"); + qRegisterMetaType<Tasks >("Tasks"); } TaskHub::~TaskHub() diff --git a/src/plugins/projectexplorer/taskmodel.cpp b/src/plugins/projectexplorer/taskmodel.cpp index a0744909b1..a2a8d5dca9 100644 --- a/src/plugins/projectexplorer/taskmodel.cpp +++ b/src/plugins/projectexplorer/taskmodel.cpp @@ -86,12 +86,12 @@ void TaskModel::addCategory(Core::Id categoryId, const QString &categoryName) m_categories.insert(categoryId, data); } -QList<Task> TaskModel::tasks(Core::Id categoryId) const +Tasks TaskModel::tasks(Core::Id categoryId) const { if (!categoryId.isValid()) return m_tasks; - QList<Task> taskList; + Tasks taskList; foreach (const Task &t, m_tasks) { if (t.category == categoryId) taskList.append(t); diff --git a/src/plugins/projectexplorer/taskmodel.h b/src/plugins/projectexplorer/taskmodel.h index f371b90ace..f48e66d5d3 100644 --- a/src/plugins/projectexplorer/taskmodel.h +++ b/src/plugins/projectexplorer/taskmodel.h @@ -53,7 +53,7 @@ public: QString categoryDisplayName(Core::Id categoryId) const; void addCategory(Core::Id categoryId, const QString &categoryName); - QList<Task> tasks(Core::Id categoryId = Core::Id()) const; + Tasks tasks(Core::Id categoryId = Core::Id()) const; void addTask(const Task &t); void removeTask(unsigned int id); void clearTasks(Core::Id categoryId = Core::Id()); @@ -110,7 +110,7 @@ private: }; QHash<Core::Id,CategoryData> m_categories; // category id to data - QList<Task> m_tasks; // all tasks (in order of id) + Tasks m_tasks; // all tasks (in order of id) QHash<QString,bool> m_fileNotFound; QFont m_fileMeasurementFont; diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp index 16e67681ed..f65ed6937c 100644 --- a/src/plugins/projectexplorer/toolchain.cpp +++ b/src/plugins/projectexplorer/toolchain.cpp @@ -382,9 +382,9 @@ Utils::LanguageVersion ToolChain::languageVersion(const Core::Id &language, cons Used by the tool chain kit information to validate the kit. */ -QList<Task> ToolChain::validateKit(const Kit *) const +Tasks ToolChain::validateKit(const Kit *) const { - return QList<Task>(); + return {}; } QString ToolChain::sysRoot() const diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h index 13bab867b8..1d0dcd0af0 100644 --- a/src/plugins/projectexplorer/toolchain.h +++ b/src/plugins/projectexplorer/toolchain.h @@ -31,12 +31,12 @@ #include "abi.h" #include "headerpath.h" #include "projectmacro.h" +#include "task.h" #include "toolchaincache.h" #include <coreplugin/id.h> #include <utils/cpplanguage_details.h> -#include <utils/fileutils.h> #include <QObject> #include <QSet> @@ -68,7 +68,6 @@ class Abi; class IOutputParser; class ToolChainConfigWidget; class ToolChainFactory; -class Task; class Kit; namespace Internal { class ToolChainSettingsAccessor; } @@ -152,7 +151,7 @@ public: // Used by the toolchainmanager to save user-generated tool chains. // Make sure to call this function when deriving! virtual QVariantMap toMap() const; - virtual QList<Task> validateKit(const Kit *k) const; + virtual Tasks validateKit(const Kit *k) const; virtual bool isJobCountSupported() const { return true; } diff --git a/src/plugins/projectexplorer/xcodebuildparser.cpp b/src/plugins/projectexplorer/xcodebuildparser.cpp index a96d4bb097..dd9f0c879f 100644 --- a/src/plugins/projectexplorer/xcodebuildparser.cpp +++ b/src/plugins/projectexplorer/xcodebuildparser.cpp @@ -139,7 +139,7 @@ void ProjectExplorerPlugin::testXcodebuildParserParsing_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); QTest::addColumn<ProjectExplorer::XcodebuildParser::XcodebuildStatus>("finalStatus"); @@ -147,42 +147,42 @@ void ProjectExplorerPlugin::testXcodebuildParserParsing_data() << XcodebuildParser::OutsideXcodebuild << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString::fromLatin1("Sometext\n") << QString() - << QList<Task>() + << Tasks() << QString() << XcodebuildParser::OutsideXcodebuild; QTest::newRow("outside pass-through stderr") << XcodebuildParser::OutsideXcodebuild << QString::fromLatin1("Sometext") << OutputParserTester::STDERR << QString() << QString::fromLatin1("Sometext\n") - << QList<Task>() + << Tasks() << QString() << XcodebuildParser::OutsideXcodebuild; QTest::newRow("inside pass stdout to stderr") << XcodebuildParser::InXcodebuild << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString() << QString::fromLatin1("Sometext\n") - << QList<Task>() + << Tasks() << QString() << XcodebuildParser::InXcodebuild; QTest::newRow("inside ignore stderr") << XcodebuildParser::InXcodebuild << QString::fromLatin1("Sometext") << OutputParserTester::STDERR << QString() << QString() - << QList<Task>() + << Tasks() << QString() << XcodebuildParser::InXcodebuild; QTest::newRow("unknown pass stdout to stderr") << XcodebuildParser::UnknownXcodebuildState << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString() << QString::fromLatin1("Sometext\n") - << QList<Task>() + << Tasks() << QString() << XcodebuildParser::UnknownXcodebuildState; QTest::newRow("unknown ignore stderr (change?)") << XcodebuildParser::UnknownXcodebuildState << QString::fromLatin1("Sometext") << OutputParserTester::STDERR << QString() << QString() - << QList<Task>() + << Tasks() << QString() << XcodebuildParser::UnknownXcodebuildState; QTest::newRow("switch outside->in->outside") @@ -196,7 +196,7 @@ void ProjectExplorerPlugin::testXcodebuildParserParsing_data() "outside2") << OutputParserTester::STDOUT << QString::fromLatin1("outside\noutside2\n") << QString::fromLatin1("in xcodebuild\nin xcodebuild2\n") - << QList<Task>() + << Tasks() << QString() << XcodebuildParser::OutsideXcodebuild; QTest::newRow("switch Unknown->in->outside") @@ -208,7 +208,7 @@ void ProjectExplorerPlugin::testXcodebuildParserParsing_data() "outside") << OutputParserTester::STDOUT << QString::fromLatin1("outside\n") << QString::fromLatin1("unknown\nin xcodebuild\n") - << QList<Task>() + << Tasks() << QString() << XcodebuildParser::OutsideXcodebuild; QTest::newRow("switch in->unknown") @@ -218,7 +218,7 @@ void ProjectExplorerPlugin::testXcodebuildParserParsing_data() "unknownErr") << OutputParserTester::STDERR << QString() << QString() - << (QList<Task>() + << (Tasks() << Task( Task::Error, QCoreApplication::translate("ProjectExplorer::XcodebuildParser", @@ -235,7 +235,7 @@ void ProjectExplorerPlugin::testXcodebuildParserParsing_data() "unknownErr") << OutputParserTester::STDERR << QString() << QString::fromLatin1("outErr\n") - << (QList<Task>() + << (Tasks() << Task( Task::Error, QCoreApplication::translate("ProjectExplorer::XcodebuildParser", @@ -249,7 +249,7 @@ void ProjectExplorerPlugin::testXcodebuildParserParsing_data() << XcodebuildParser::InXcodebuild << QString::fromLatin1("/somepath/somefile.app: replacing existing signature") << OutputParserTester::STDOUT << QString() << QString() - << (QList<Task>() + << (Tasks() << Task(Task::Warning, QCoreApplication::translate("ProjectExplorer::XcodebuildParser", "Replacing signature"), @@ -262,7 +262,7 @@ void ProjectExplorerPlugin::testXcodebuildParserParsing_data() << XcodebuildParser::OutsideXcodebuild << QString::fromLatin1("/somepath/somefile.app: replacing existing signature") << OutputParserTester::STDOUT << QString::fromLatin1("/somepath/somefile.app: replacing existing signature\n") << QString() - << QList<Task>() + << Tasks() << QString() << XcodebuildParser::OutsideXcodebuild; } @@ -282,7 +282,7 @@ void ProjectExplorerPlugin::testXcodebuildParserParsing() QFETCH(OutputParserTester::Channel, inputChannel); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, outputLines); QFETCH(ProjectExplorer::XcodebuildParser::XcodebuildStatus, finalStatus); diff --git a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp index 61c7aa5722..04194d818e 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp +++ b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp @@ -369,10 +369,10 @@ QbsBuildConfigurationFactory::QbsBuildConfigurationFactory() registerBuildConfiguration<QbsBuildConfiguration>(Constants::QBS_BC_ID); setSupportedProjectType(Constants::PROJECT_ID); setSupportedProjectMimeTypeName(Constants::MIME_TYPE); - setIssueReporter([](Kit *k, const QString &projectPath, const QString &buildDir) -> QList<Task> { + setIssueReporter([](Kit *k, const QString &projectPath, const QString &buildDir) -> Tasks { const QtSupport::BaseQtVersion * const version = QtSupport::QtKitAspect::qtVersion(k); return version ? version->reportIssues(projectPath, buildDir) - : QList<ProjectExplorer::Task>(); + : Tasks(); }); } diff --git a/src/plugins/qbsprojectmanager/qbskitinformation.cpp b/src/plugins/qbsprojectmanager/qbskitinformation.cpp index a6784b9a50..53f3b9a142 100644 --- a/src/plugins/qbsprojectmanager/qbskitinformation.cpp +++ b/src/plugins/qbsprojectmanager/qbskitinformation.cpp @@ -107,7 +107,7 @@ Core::Id QbsKitAspect::id() return "Qbs.KitInformation"; } -QList<Task> QbsKitAspect::validate(const Kit *) const { return QList<Task>(); } +Tasks QbsKitAspect::validate(const Kit *) const { return {}; } KitAspect::ItemList QbsKitAspect::toUserOutput(const Kit *k) const { diff --git a/src/plugins/qbsprojectmanager/qbskitinformation.h b/src/plugins/qbsprojectmanager/qbskitinformation.h index 2967999496..1113f2ce01 100644 --- a/src/plugins/qbsprojectmanager/qbskitinformation.h +++ b/src/plugins/qbsprojectmanager/qbskitinformation.h @@ -44,7 +44,7 @@ public: private: static Core::Id id(); - QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *) const override; + ProjectExplorer::Tasks validate(const ProjectExplorer::Kit *) const override; ItemList toUserOutput(const ProjectExplorer::Kit *) const override; ProjectExplorer::KitAspectWidget *createConfigWidget(ProjectExplorer::Kit *) const override; }; diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp index e393e75a51..0ecf92b9fe 100644 --- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp @@ -586,7 +586,7 @@ QmakeBuildConfigurationFactory::QmakeBuildConfigurationFactory() setSupportedProjectMimeTypeName(Constants::PROFILE_MIMETYPE); setIssueReporter([](Kit *k, const QString &projectPath, const QString &buildDir) { QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(k); - QList<Task> issues; + Tasks issues; if (version) issues << version->reportIssues(projectPath, buildDir); if (QmakeSettings::warnAgainstUnalignedBuildDir() diff --git a/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp b/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp index c385df53dc..c3ebac1dcf 100644 --- a/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp +++ b/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp @@ -92,9 +92,9 @@ QmakeKitAspect::QmakeKitAspect() setPriority(24000); } -QList<Task> QmakeKitAspect::validate(const Kit *k) const +Tasks QmakeKitAspect::validate(const Kit *k) const { - QList<Task> result; + Tasks result; QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(k); FileName mkspec = QmakeKitAspect::mkspec(k); diff --git a/src/plugins/qmakeprojectmanager/qmakekitinformation.h b/src/plugins/qmakeprojectmanager/qmakekitinformation.h index e54af3fdfc..fd818d0b9e 100644 --- a/src/plugins/qmakeprojectmanager/qmakekitinformation.h +++ b/src/plugins/qmakeprojectmanager/qmakekitinformation.h @@ -37,7 +37,7 @@ class QmakeKitAspect : public ProjectExplorer::KitAspect public: QmakeKitAspect(); - QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override; + ProjectExplorer::Tasks validate(const ProjectExplorer::Kit *k) const override; void setup(ProjectExplorer::Kit *k) override; ProjectExplorer::KitAspectWidget *createConfigWidget(ProjectExplorer::Kit *k) const override; diff --git a/src/plugins/qmakeprojectmanager/qmakeparser.cpp b/src/plugins/qmakeprojectmanager/qmakeparser.cpp index 4af888cc2c..5c706989ab 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparser.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparser.cpp @@ -110,26 +110,26 @@ void QmakeProjectManagerPlugin::testQmakeOutputParsers_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); QTest::newRow("pass-through stdout") << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString::fromLatin1("Sometext\n") << QString() - << QList<ProjectExplorer::Task>() + << Tasks() << QString(); QTest::newRow("pass-through stderr") << QString::fromLatin1("Sometext") << OutputParserTester::STDERR << QString() << QString::fromLatin1("Sometext\n") - << QList<ProjectExplorer::Task>() + << Tasks() << QString(); QTest::newRow("qMake error") << QString::fromLatin1("Project ERROR: undefined file") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Error, QLatin1String("undefined file"), Utils::FileName(), -1, @@ -140,7 +140,7 @@ void QmakeProjectManagerPlugin::testQmakeOutputParsers_data() << QString::fromLatin1("e:\\project.pro:14: Parse Error ('sth odd')") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Error, QLatin1String("Parse Error ('sth odd')"), Utils::FileName::fromUserInput(QLatin1String("e:\\project.pro")), @@ -152,7 +152,7 @@ void QmakeProjectManagerPlugin::testQmakeOutputParsers_data() << QString::fromLatin1("Project WARNING: bearer module might require ReadUserData capability") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Warning, QLatin1String("bearer module might require ReadUserData capability"), Utils::FileName(), -1, @@ -163,7 +163,7 @@ void QmakeProjectManagerPlugin::testQmakeOutputParsers_data() << QString::fromLatin1("WARNING: Failure to find: blackberrycreatepackagestepconfigwidget.cpp") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Warning, QLatin1String("Failure to find: blackberrycreatepackagestepconfigwidget.cpp"), Utils::FileName(), -1, @@ -174,7 +174,7 @@ void QmakeProjectManagerPlugin::testQmakeOutputParsers_data() << QString::fromLatin1("WARNING: e:\\QtSDK\\Simulator\\Qt\\msvc2008\\lib\\qtmaind.prl:1: Unescaped backslashes are deprecated.") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Warning, QLatin1String("Unescaped backslashes are deprecated."), Utils::FileName::fromUserInput(QLatin1String("e:\\QtSDK\\Simulator\\Qt\\msvc2008\\lib\\qtmaind.prl")), 1, @@ -184,7 +184,7 @@ void QmakeProjectManagerPlugin::testQmakeOutputParsers_data() << QString::fromLatin1("/home/qtwebkithelpviewer.h:0: Note: No relevant classes found. No output generated.") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() + << (Tasks() << Task(Task::Unknown, QLatin1String("Note: No relevant classes found. No output generated."), Utils::FileName::fromUserInput(QLatin1String("/home/qtwebkithelpviewer.h")), 0, @@ -198,7 +198,7 @@ void QmakeProjectManagerPlugin::testQmakeOutputParsers() testbench.appendOutputParser(new QMakeParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); QFETCH(QString, outputLines); diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 81f3216b89..97fcaf6dad 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -540,9 +540,9 @@ void QmakeProject::buildFinished(bool success) m_invalidateQmakeVfsContents = true; } -QList<Task> QmakeProject::projectIssues(const Kit *k) const +Tasks QmakeProject::projectIssues(const Kit *k) const { - QList<Task> result = Project::projectIssues(k); + Tasks result = Project::projectIssues(k); if (!QtSupport::QtKitAspect::qtVersion(k)) result.append(createProjectTask(Task::TaskType::Error, tr("No Qt version set in kit."))); else if (!QtSupport::QtKitAspect::qtVersion(k)->isValid()) diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.h b/src/plugins/qmakeprojectmanager/qmakeproject.h index f042d190aa..b079ecbe11 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.h +++ b/src/plugins/qmakeprojectmanager/qmakeproject.h @@ -61,7 +61,7 @@ public: QmakeProFile *rootProFile() const; - QList<ProjectExplorer::Task> projectIssues(const ProjectExplorer::Kit *k) const final; + ProjectExplorer::Tasks projectIssues(const ProjectExplorer::Kit *k) const final; QmakeProFileNode *rootProjectNode() const final; diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp index c497103e82..e96fc9d240 100644 --- a/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp @@ -298,7 +298,7 @@ void QmakeProjectConfigWidget::updateProblemLabel() QString buildDirectory = m_buildConfiguration->target()->project()->projectDirectory().toString(); if (m_buildConfiguration->isShadowBuild()) buildDirectory = m_buildConfiguration->buildDirectory().toString(); - QList<ProjectExplorer::Task> issues; + Tasks issues; issues = version->reportIssues(proFileName, buildDirectory); Utils::sort(issues); diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp index fc2dc6c21f..96ae059365 100644 --- a/src/plugins/qmakeprojectmanager/qmakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp @@ -234,7 +234,7 @@ bool QMakeStep::init() QTC_ASSERT(node, return false); QString proFile = node->filePath().toString(); - QList<ProjectExplorer::Task> tasks = qtVersion->reportIssues(proFile, workingDirectory); + Tasks tasks = qtVersion->reportIssues(proFile, workingDirectory); Utils::sort(tasks); if (!tasks.isEmpty()) { diff --git a/src/plugins/qmljseditor/qmltaskmanager.cpp b/src/plugins/qmljseditor/qmltaskmanager.cpp index 0a20b7569f..0110478020 100644 --- a/src/plugins/qmljseditor/qmltaskmanager.cpp +++ b/src/plugins/qmljseditor/qmltaskmanager.cpp @@ -60,9 +60,9 @@ QmlTaskManager::QmlTaskManager() connect(&m_updateDelay, &QTimer::timeout, this, [this] { updateMessagesNow(); }); } -static QList<Task> convertToTasks(const QList<DiagnosticMessage> &messages, const FileName &fileName, Core::Id category) +static Tasks convertToTasks(const QList<DiagnosticMessage> &messages, const FileName &fileName, Core::Id category) { - QList<Task> result; + Tasks result; foreach (const DiagnosticMessage &msg, messages) { Task::TaskType type = msg.isError() ? Task::Error : Task::Warning; Task task(type, msg.message, fileName, msg.loc.startLine, category); @@ -71,7 +71,7 @@ static QList<Task> convertToTasks(const QList<DiagnosticMessage> &messages, cons return result; } -static QList<Task> convertToTasks(const QList<StaticAnalysis::Message> &messages, const FileName &fileName, Core::Id category) +static Tasks convertToTasks(const QList<StaticAnalysis::Message> &messages, const FileName &fileName, Core::Id category) { QList<DiagnosticMessage> diagnostics; foreach (const StaticAnalysis::Message &msg, messages) @@ -179,7 +179,7 @@ void QmlTaskManager::displayAllResults() void QmlTaskManager::insertTask(const Task &task) { - QList<Task> tasks = m_docsWithTasks.value(task.file.toString()); + Tasks tasks = m_docsWithTasks.value(task.file.toString()); tasks.append(task); m_docsWithTasks.insert(task.file.toString(), tasks); TaskHub::addTask(task); @@ -188,7 +188,7 @@ void QmlTaskManager::insertTask(const Task &task) void QmlTaskManager::removeTasksForFile(const QString &fileName) { if (m_docsWithTasks.contains(fileName)) { - const QList<Task> tasks = m_docsWithTasks.value(fileName); + const Tasks tasks = m_docsWithTasks.value(fileName); foreach (const Task &task, tasks) TaskHub::removeTask(task); m_docsWithTasks.remove(fileName); diff --git a/src/plugins/qmljseditor/qmltaskmanager.h b/src/plugins/qmljseditor/qmltaskmanager.h index 646aed7a22..dfc8174ba1 100644 --- a/src/plugins/qmljseditor/qmltaskmanager.h +++ b/src/plugins/qmljseditor/qmltaskmanager.h @@ -65,7 +65,7 @@ private: { public: QString fileName; - QList<ProjectExplorer::Task> tasks; + ProjectExplorer::Tasks tasks; }; static void collectMessages(QFutureInterface<FileErrorMessages> &future, QmlJS::Snapshot snapshot, @@ -74,7 +74,7 @@ private: bool updateSemantic); private: - QHash<QString, QList<ProjectExplorer::Task> > m_docsWithTasks; + QHash<QString, ProjectExplorer::Tasks > m_docsWithTasks; QFutureWatcher<FileErrorMessages> m_messageCollector; QTimer m_updateDelay; bool m_updatingSemantic = false; diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index dbe7e394d0..7d07bc1bde 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -287,9 +287,9 @@ void QmlProject::refreshTargetDirectory() updateDeploymentData(target); } -QList<Task> QmlProject::projectIssues(const Kit *k) const +Tasks QmlProject::projectIssues(const Kit *k) const { - QList<Task> result = Project::projectIssues(k); + Tasks result = Project::projectIssues(k); const QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(k); if (!version) diff --git a/src/plugins/qmlprojectmanager/qmlproject.h b/src/plugins/qmlprojectmanager/qmlproject.h index cd4eb020c4..c04e83d63b 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.h +++ b/src/plugins/qmlprojectmanager/qmlproject.h @@ -48,7 +48,7 @@ public: explicit QmlProject(const Utils::FileName &filename); ~QmlProject() override; - QList<ProjectExplorer::Task> projectIssues(const ProjectExplorer::Kit *k) const final; + ProjectExplorer::Tasks projectIssues(const ProjectExplorer::Kit *k) const final; bool validProjectFile() const; diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 7b6d1643fa..0788afc6ba 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -352,9 +352,9 @@ QSet<Id> BaseQtVersion::availableFeatures() const return features; } -QList<Task> BaseQtVersion::validateKit(const Kit *k) +Tasks BaseQtVersion::validateKit(const Kit *k) { - QList<Task> result; + Tasks result; BaseQtVersion *version = QtKitAspect::qtVersion(k); Q_ASSERT(version == this); @@ -1466,11 +1466,11 @@ void BaseQtVersion::recheckDumper() m_versionInfoUpToDate = false; } -QList<Task> BaseQtVersion::reportIssuesImpl(const QString &proFile, const QString &buildDir) const +Tasks BaseQtVersion::reportIssuesImpl(const QString &proFile, const QString &buildDir) const { Q_UNUSED(proFile); Q_UNUSED(buildDir); - QList<Task> results; + Tasks results; if (!isValid()) { //: %1: Reason for being invalid @@ -1492,9 +1492,9 @@ QList<Task> BaseQtVersion::reportIssuesImpl(const QString &proFile, const QStrin return results; } -QList<Task> BaseQtVersion::reportIssues(const QString &proFile, const QString &buildDir) const +Tasks BaseQtVersion::reportIssues(const QString &proFile, const QString &buildDir) const { - QList<Task> results = reportIssuesImpl(proFile, buildDir); + Tasks results = reportIssuesImpl(proFile, buildDir); Utils::sort(results); return results; } diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h index 5de6cef5d6..9d6ceb318b 100644 --- a/src/plugins/qtsupport/baseqtversion.h +++ b/src/plugins/qtsupport/baseqtversion.h @@ -31,6 +31,7 @@ #include <utils/macroexpander.h> #include <projectexplorer/abi.h> +#include <projectexplorer/task.h> #include <QSet> #include <QStringList> @@ -48,7 +49,6 @@ class Kit; class ToolChain; class HeaderPath; class Target; -class Task; } // namespace ProjectExplorer QT_BEGIN_NAMESPACE @@ -201,7 +201,7 @@ public: /// Check a .pro-file/Qt version combination on possible issues /// @return a list of tasks, ordered on severity (errors first, then /// warnings and finally info items. - QList<ProjectExplorer::Task> reportIssues(const QString &proFile, const QString &buildDir) const; + ProjectExplorer::Tasks reportIssues(const QString &proFile, const QString &buildDir) const; static bool isQmlDebuggingSupported(ProjectExplorer::Kit *k, QString *reason = nullptr); bool isQmlDebuggingSupported(QString *reason = nullptr) const; @@ -221,7 +221,7 @@ public: virtual QSet<Core::Id> targetDeviceTypes() const = 0; - virtual QList<ProjectExplorer::Task> validateKit(const ProjectExplorer::Kit *k); + virtual ProjectExplorer::Tasks validateKit(const ProjectExplorer::Kit *k); Utils::FileName headerPath() const; Utils::FileName docsPath() const; @@ -261,7 +261,7 @@ protected: BaseQtVersion(); BaseQtVersion(const BaseQtVersion &other) = delete; - virtual QList<ProjectExplorer::Task> reportIssuesImpl(const QString &proFile, const QString &buildDir) const; + virtual ProjectExplorer::Tasks reportIssuesImpl(const QString &proFile, const QString &buildDir) const; // helper function for desktop and simulator to figure out the supported abis based on the libraries Utils::FileNameList qtCorePaths() const; diff --git a/src/plugins/qtsupport/qscxmlcgenerator.cpp b/src/plugins/qtsupport/qscxmlcgenerator.cpp index d3afa52aa8..567f25cd24 100644 --- a/src/plugins/qtsupport/qscxmlcgenerator.cpp +++ b/src/plugins/qtsupport/qscxmlcgenerator.cpp @@ -52,9 +52,9 @@ QScxmlcGenerator::QScxmlcGenerator(const Project *project, m_impl = m_tmpdir.path() + QLatin1Char('/') + targets[1].fileName(); } -QList<Task> QScxmlcGenerator::parseIssues(const QByteArray &processStderr) +Tasks QScxmlcGenerator::parseIssues(const QByteArray &processStderr) { - QList<Task> issues; + Tasks issues; foreach (const QByteArray &line, processStderr.split('\n')) { QByteArrayList tokens = line.split(':'); diff --git a/src/plugins/qtsupport/qscxmlcgenerator.h b/src/plugins/qtsupport/qscxmlcgenerator.h index 64a852c9e6..49cd1dd2cb 100644 --- a/src/plugins/qtsupport/qscxmlcgenerator.h +++ b/src/plugins/qtsupport/qscxmlcgenerator.h @@ -49,7 +49,7 @@ private: Utils::FileName tmpFile() const; ProjectExplorer::FileNameToContentsHash handleProcessFinished(QProcess *process) override; bool prepareToRun(const QByteArray &sourceContents) override; - QList<ProjectExplorer::Task> parseIssues(const QByteArray &processStderr) override; + ProjectExplorer::Tasks parseIssues(const QByteArray &processStderr) override; Utils::TemporaryDirectory m_tmpdir; QString m_header; diff --git a/src/plugins/qtsupport/qtkitinformation.cpp b/src/plugins/qtsupport/qtkitinformation.cpp index dfa58e91a2..93fad8c08c 100644 --- a/src/plugins/qtsupport/qtkitinformation.cpp +++ b/src/plugins/qtsupport/qtkitinformation.cpp @@ -193,7 +193,7 @@ void QtKitAspect::setup(ProjectExplorer::Kit *k) k->setValue(id(), candidates.first()->uniqueId()); } -QList<ProjectExplorer::Task> QtKitAspect::validate(const ProjectExplorer::Kit *k) const +Tasks QtKitAspect::validate(const ProjectExplorer::Kit *k) const { QTC_ASSERT(QtVersionManager::isLoaded(), return { }); BaseQtVersion *version = qtVersion(k); diff --git a/src/plugins/qtsupport/qtkitinformation.h b/src/plugins/qtsupport/qtkitinformation.h index 565e5aef0f..d155b8ea5f 100644 --- a/src/plugins/qtsupport/qtkitinformation.h +++ b/src/plugins/qtsupport/qtkitinformation.h @@ -44,7 +44,7 @@ public: void setup(ProjectExplorer::Kit *k) override; - QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override; + ProjectExplorer::Tasks validate(const ProjectExplorer::Kit *k) const override; void fix(ProjectExplorer::Kit *) override; ProjectExplorer::KitAspectWidget *createConfigWidget(ProjectExplorer::Kit *k) const override; diff --git a/src/plugins/qtsupport/qtparser.cpp b/src/plugins/qtsupport/qtparser.cpp index a1642222f1..08be37d5ab 100644 --- a/src/plugins/qtsupport/qtparser.cpp +++ b/src/plugins/qtsupport/qtparser.cpp @@ -96,19 +96,19 @@ void QtSupportPlugin::testQtOutputParser_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); + QTest::addColumn<Tasks >("tasks"); QTest::addColumn<QString>("outputLines"); QTest::newRow("pass-through stdout") << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString::fromLatin1("Sometext\n") << QString() - << QList<ProjectExplorer::Task>() + << Tasks() << QString(); QTest::newRow("pass-through stderr") << QString::fromLatin1("Sometext") << OutputParserTester::STDERR << QString() << QString::fromLatin1("Sometext\n") - << QList<ProjectExplorer::Task>() + << Tasks() << QString(); QTest::newRow("pass-through gcc infos") << QString::fromLatin1("/temp/test/untitled8/main.cpp: In function `int main(int, char**)':\n" @@ -123,13 +123,13 @@ void QtSupportPlugin::testQtOutputParser_data() "../../scriptbug/main.cpp: In instantiation of void bar(i) [with i = double]:\n" "../../scriptbug/main.cpp:8: instantiated from void foo(i) [with i = double]\n" "../../scriptbug/main.cpp:22: instantiated from here\n") - << QList<ProjectExplorer::Task>() + << Tasks() << QString(); QTest::newRow("qdoc warning") << QString::fromLatin1("/home/user/dev/qt5/qtscript/src/script/api/qscriptengine.cpp:295: warning: Can't create link to 'Object Trees & Ownership'") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("Can't create link to 'Object Trees & Ownership'"), Utils::FileName::fromUserInput(QLatin1String("/home/user/dev/qt5/qtscript/src/script/api/qscriptengine.cpp")), 295, ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)) @@ -138,7 +138,7 @@ void QtSupportPlugin::testQtOutputParser_data() << QString::fromLatin1("..\\untitled\\errorfile.h:0: Warning: No relevant classes found. No output generated.") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("No relevant classes found. No output generated."), Utils::FileName::fromUserInput(QLatin1String("..\\untitled\\errorfile.h")), 0, ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)) @@ -147,7 +147,7 @@ void QtSupportPlugin::testQtOutputParser_data() << QString::fromLatin1("c:\\code\\test.h(96): Warning: Property declaration ) has no READ accessor function. The property will be invalid.") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("Property declaration ) has no READ accessor function. The property will be invalid."), Utils::FileName::fromUserInput(QLatin1String("c:\\code\\test.h")), 96, ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)) @@ -156,7 +156,7 @@ void QtSupportPlugin::testQtOutputParser_data() << QString::fromLatin1("/home/qtwebkithelpviewer.h:0: Note: No relevant classes found. No output generated.") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() << Task(Task::Unknown, + << (Tasks() << Task(Task::Unknown, QLatin1String("No relevant classes found. No output generated."), Utils::FileName::fromUserInput(QLatin1String("/home/qtwebkithelpviewer.h")), 0, ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)) @@ -165,7 +165,7 @@ void QtSupportPlugin::testQtOutputParser_data() << QString::fromLatin1("E:/sandbox/creator/loaden/src/libs/utils/iwelcomepage.h(54): Error: Undefined interface") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() << Task(Task::Error, + << (Tasks() << Task(Task::Error, QLatin1String("Undefined interface"), Utils::FileName::fromUserInput(QLatin1String("E:/sandbox/creator/loaden/src/libs/utils/iwelcomepage.h")), 54, ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)) @@ -174,7 +174,7 @@ void QtSupportPlugin::testQtOutputParser_data() << QString::fromLatin1("Warning: dropping duplicate messages in '/some/place/qtcreator_fr.qm'") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::Task>() << Task(Task::Warning, + << (Tasks() << Task(Task::Warning, QLatin1String("dropping duplicate messages"), Utils::FileName::fromUserInput(QLatin1String("/some/place/qtcreator_fr.qm")), -1, ProjectExplorer::Constants::TASK_CATEGORY_COMPILE)) @@ -187,7 +187,7 @@ void QtSupportPlugin::testQtOutputParser() testbench.appendOutputParser(new QtParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<Task>, tasks); + QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); QFETCH(QString, outputLines); diff --git a/src/plugins/qtsupport/qttestparser.cpp b/src/plugins/qtsupport/qttestparser.cpp index eb907fc460..0492f0631b 100644 --- a/src/plugins/qtsupport/qttestparser.cpp +++ b/src/plugins/qtsupport/qttestparser.cpp @@ -115,7 +115,7 @@ void QtSupportPlugin::testQtTestOutputParser() "PASS : MyTest::anotherTest()\n"; const FileName theFile = FileName::fromString(HostOsInfo::isWindowsHost() ? QString("C:/dev/tests/tst_mytest.cpp") : QString("/home/me/tests/tst_mytest.cpp")); - const QList<Task> expectedTasks{ + const Tasks expectedTasks{ Task(Task::Error, "XPASS : MyTest::someTest()", theFile, 154, Constants::TASK_CATEGORY_AUTOTEST), Task(Task::Error, "FAIL! : MyTest::someOtherTest(init) " diff --git a/tests/auto/toolchaincache/toolchaincache.pro b/tests/auto/toolchaincache/toolchaincache.pro index 5dea077c20..cdb1ca0bb7 100644 --- a/tests/auto/toolchaincache/toolchaincache.pro +++ b/tests/auto/toolchaincache/toolchaincache.pro @@ -1,5 +1,3 @@ -QT -= gui - include(../qttest.pri) SOURCES += \ diff --git a/tests/auto/toolchaincache/toolchaincache.qbs b/tests/auto/toolchaincache/toolchaincache.qbs index c814441539..7f1a2adbf1 100644 --- a/tests/auto/toolchaincache/toolchaincache.qbs +++ b/tests/auto/toolchaincache/toolchaincache.qbs @@ -3,6 +3,7 @@ import qbs QtcAutotest { name: "ToolChainCache autotest" Depends { name: "ProjectExplorer" } + Depends { name: "Qt.gui" } // For QIcon in Task Group { name: "Test sources" files: "tst_toolchaincache.cpp" |