diff options
author | dt <qtc-committer@nokia.com> | 2010-03-12 13:53:00 +0100 |
---|---|---|
committer | dt <qtc-committer@nokia.com> | 2010-03-12 15:00:15 +0100 |
commit | 7c11c4d8b07054a87bd59551f3209679371a8d23 (patch) | |
tree | fefc2b72492696b22128547ff26c0624164f1164 /src | |
parent | 4d8a264fb8f6ca57b7715394ed253f2e8f1e1936 (diff) |
Move TaskWindow::Task out of the nesting to ProjectExplorer::
Since otherwise we can't forward declare it.
Diffstat (limited to 'src')
22 files changed, 293 insertions, 292 deletions
diff --git a/src/plugins/projectexplorer/abstractprocessstep.cpp b/src/plugins/projectexplorer/abstractprocessstep.cpp index df97c77bcf0..bd9205322cf 100644 --- a/src/plugins/projectexplorer/abstractprocessstep.cpp +++ b/src/plugins/projectexplorer/abstractprocessstep.cpp @@ -84,8 +84,8 @@ void AbstractProcessStep::setOutputParser(ProjectExplorer::IOutputParser *parser if (m_outputParserChain) { connect(parser, SIGNAL(addOutput(QString)), this, SLOT(outputAdded(QString))); - connect(parser, SIGNAL(addTask(ProjectExplorer::TaskWindow::Task)), - this, SLOT(taskAdded(ProjectExplorer::TaskWindow::Task))); + connect(parser, SIGNAL(addTask(ProjectExplorer::Task)), + this, SLOT(taskAdded(ProjectExplorer::Task))); } } @@ -258,9 +258,9 @@ void AbstractProcessStep::checkForCancel() } } -void AbstractProcessStep::taskAdded(const ProjectExplorer::TaskWindow::Task &task) +void AbstractProcessStep::taskAdded(const ProjectExplorer::Task &task) { - TaskWindow::Task editable(task); + Task editable(task); QString filePath = QDir::cleanPath(task.file.trimmed()); if (!filePath.isEmpty() && !QDir::isAbsolutePath(filePath)) { // We have no save way to decide which file in which subfolder diff --git a/src/plugins/projectexplorer/abstractprocessstep.h b/src/plugins/projectexplorer/abstractprocessstep.h index 75255cbdfcb..0705cfde392 100644 --- a/src/plugins/projectexplorer/abstractprocessstep.h +++ b/src/plugins/projectexplorer/abstractprocessstep.h @@ -144,7 +144,7 @@ private slots: void slotProcessFinished(int, QProcess::ExitStatus); void checkForCancel(); - void taskAdded(const ProjectExplorer::TaskWindow::Task &task); + void taskAdded(const ProjectExplorer::Task &task); void outputAdded(const QString &string); private: diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp index 43910353661..2eb17c79291 100644 --- a/src/plugins/projectexplorer/buildmanager.cpp +++ b/src/plugins/projectexplorer/buildmanager.cpp @@ -133,8 +133,8 @@ void BuildManager::cancel() // (And we want those to be before the cancel message.) QTimer::singleShot(0, this, SLOT(emitCancelMessage())); - disconnect(m_currentBuildStep, SIGNAL(addTask(ProjectExplorer::TaskWindow::Task)), - this, SLOT(addToTaskWindow(ProjectExplorer::TaskWindow::Task))); + disconnect(m_currentBuildStep, SIGNAL(addTask(ProjectExplorer::Task)), + this, SLOT(addToTaskWindow(ProjectExplorer::Task))); disconnect(m_currentBuildStep, SIGNAL(addOutput(QString)), this, SLOT(addToOutputWindow(QString))); decrementActiveBuildSteps(m_currentBuildStep->buildConfiguration()->target()->project()); @@ -171,8 +171,8 @@ void BuildManager::clearBuildQueue() { foreach (BuildStep *bs, m_buildQueue) { decrementActiveBuildSteps(bs->buildConfiguration()->target()->project()); - disconnect(bs, SIGNAL(addTask(ProjectExplorer::TaskWindow::Task)), - this, SLOT(addToTaskWindow(ProjectExplorer::TaskWindow::Task))); + disconnect(bs, SIGNAL(addTask(ProjectExplorer::Task)), + this, SLOT(addToTaskWindow(ProjectExplorer::Task))); disconnect(bs, SIGNAL(addOutput(QString)), this, SLOT(addToOutputWindow(QString))); } @@ -260,7 +260,7 @@ void BuildManager::showBuildResults() //toggleTaskWindow(); } -void BuildManager::addToTaskWindow(const ProjectExplorer::TaskWindow::Task &task) +void BuildManager::addToTaskWindow(const ProjectExplorer::Task &task) { m_taskWindow->addTask(task); } @@ -275,8 +275,8 @@ void BuildManager::nextBuildQueue() if (m_canceling) return; - disconnect(m_currentBuildStep, SIGNAL(addTask(ProjectExplorer::TaskWindow::Task)), - this, SLOT(addToTaskWindow(ProjectExplorer::TaskWindow::Task))); + disconnect(m_currentBuildStep, SIGNAL(addTask(ProjectExplorer::Task)), + this, SLOT(addToTaskWindow(ProjectExplorer::Task))); disconnect(m_currentBuildStep, SIGNAL(addOutput(QString)), this, SLOT(addToOutputWindow(QString))); @@ -343,8 +343,8 @@ bool BuildManager::buildQueueAppend(QList<BuildStep *> steps) int i = 0; for (; i < count; ++i) { BuildStep *bs = steps.at(i); - connect(bs, SIGNAL(addTask(ProjectExplorer::TaskWindow::Task)), - this, SLOT(addToTaskWindow(ProjectExplorer::TaskWindow::Task))); + connect(bs, SIGNAL(addTask(ProjectExplorer::Task)), + this, SLOT(addToTaskWindow(ProjectExplorer::Task))); connect(bs, SIGNAL(addOutput(QString)), this, SLOT(addToOutputWindow(QString))); init = bs->init(); @@ -364,8 +364,8 @@ bool BuildManager::buildQueueAppend(QList<BuildStep *> steps) // disconnect the buildsteps again for (int j = 0; j <= i; ++j) { BuildStep *bs = steps.at(j); - disconnect(bs, SIGNAL(addTask(ProjectExplorer::TaskWindow::Task)), - this, SLOT(addToTaskWindow(ProjectExplorer::TaskWindow::Task))); + disconnect(bs, SIGNAL(addTask(ProjectExplorer::Task)), + this, SLOT(addToTaskWindow(ProjectExplorer::Task))); disconnect(bs, SIGNAL(addOutput(QString)), this, SLOT(addToOutputWindow(QString))); } diff --git a/src/plugins/projectexplorer/buildmanager.h b/src/plugins/projectexplorer/buildmanager.h index 90fa5bd2984..66ad7e24a1d 100644 --- a/src/plugins/projectexplorer/buildmanager.h +++ b/src/plugins/projectexplorer/buildmanager.h @@ -92,7 +92,7 @@ signals: void tasksChanged(); private slots: - void addToTaskWindow(const ProjectExplorer::TaskWindow::Task &task); + void addToTaskWindow(const ProjectExplorer::Task &task); void addToOutputWindow(const QString &string); void nextBuildQueue(); diff --git a/src/plugins/projectexplorer/buildstep.h b/src/plugins/projectexplorer/buildstep.h index dd655c63272..9f5f8629348 100644 --- a/src/plugins/projectexplorer/buildstep.h +++ b/src/plugins/projectexplorer/buildstep.h @@ -102,7 +102,7 @@ public: signals: // Add a task. - void addTask(const ProjectExplorer::TaskWindow::Task &task); + void addTask(const ProjectExplorer::Task &task); // The string is added to the generated output, usually in the output // window. // It should be in html format, that is properly escaped diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp index 34bb674a10f..512cbe58a86 100644 --- a/src/plugins/projectexplorer/gccparser.cpp +++ b/src/plugins/projectexplorer/gccparser.cpp @@ -62,31 +62,31 @@ void GccParser::stdError(const QString &line) if (lne.startsWith(QLatin1String("collect2:")) || lne.startsWith(QLatin1String("ERROR:")) || lne == QLatin1String("* cpp failed")) { - emit addTask(TaskWindow::Task(TaskWindow::Error, - lne /* description */, - QString() /* filename */, - -1 /* linenumber */, - Constants::TASK_CATEGORY_COMPILE)); + emit addTask(Task(Task::Error, + lne /* description */, + QString() /* filename */, + -1 /* linenumber */, + Constants::TASK_CATEGORY_COMPILE)); return; } else if (m_regExpGccNames.indexIn(lne) > -1) { - emit addTask(TaskWindow::Task(TaskWindow::Error, - lne.mid(m_regExpGccNames.matchedLength()), /* description */ - QString(), /* filename */ - -1, /* line */ - Constants::TASK_CATEGORY_COMPILE)); + emit addTask(Task(Task::Error, + lne.mid(m_regExpGccNames.matchedLength()), /* description */ + QString(), /* filename */ + -1, /* line */ + Constants::TASK_CATEGORY_COMPILE)); return; } else if (m_regExp.indexIn(lne) > -1) { QString filename = m_regExp.cap(1); int lineno = m_regExp.cap(3).toInt(); - TaskWindow::Task task(TaskWindow::Unknown, - m_regExp.cap(7) /* description */, - filename, lineno, - Constants::TASK_CATEGORY_COMPILE); + Task task(Task::Unknown, + m_regExp.cap(7) /* description */, + filename, lineno, + Constants::TASK_CATEGORY_COMPILE); if (m_regExp.cap(6) == QLatin1String("warning")) - task.type = TaskWindow::Warning; + task.type = Task::Warning; else if (m_regExp.cap(6) == QLatin1String("error") || task.description.startsWith(QLatin1String("undefined reference to"))) - task.type = TaskWindow::Error; + task.type = Task::Error; // Prepend "#warning" or "#error" if that triggered the match on (warning|error) // We want those to show how the warning was triggered @@ -101,23 +101,23 @@ void GccParser::stdError(const QString &line) if (!ok) lineno = -1; QString description = m_regExpLinker.cap(5); - TaskWindow::Task task(TaskWindow::Error, - description, - m_regExpLinker.cap(1) /* filename */, - lineno, - Constants::TASK_CATEGORY_COMPILE); + Task task(Task::Error, + description, + m_regExpLinker.cap(1) /* filename */, + lineno, + Constants::TASK_CATEGORY_COMPILE); if (description.startsWith(QLatin1String("In function ")) || description.startsWith(QLatin1String("In member function "))) - task.type = TaskWindow::Unknown; + task.type = Task::Unknown; emit addTask(task); return; } else if (m_regExpIncluded.indexIn(lne) > -1) { - emit addTask(TaskWindow::Task(TaskWindow::Unknown, - lne /* description */, - m_regExpIncluded.cap(1) /* filename */, - m_regExpIncluded.cap(2).toInt() /* linenumber */, - Constants::TASK_CATEGORY_COMPILE)); + emit addTask(Task(Task::Unknown, + lne /* description */, + m_regExpIncluded.cap(1) /* filename */, + m_regExpIncluded.cap(2).toInt() /* linenumber */, + Constants::TASK_CATEGORY_COMPILE)); return; } IOutputParser::stdError(line); @@ -138,19 +138,19 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdErrLines"); - QTest::addColumn<QList<ProjectExplorer::TaskWindow::Task> >("tasks"); + QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); QTest::addColumn<QString>("outputLines"); QTest::newRow("pass-through stdout") << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString::fromLatin1("Sometext") << QString() - << QList<ProjectExplorer::TaskWindow::Task>() + << QList<ProjectExplorer::Task>() << QString(); QTest::newRow("pass-through stderr") << QString::fromLatin1("Sometext") << OutputParserTester::STDERR << QString() << QString::fromLatin1("Sometext") - << QList<ProjectExplorer::TaskWindow::Task>() + << QList<ProjectExplorer::Task>() << QString(); QTest::newRow("GCCE error") @@ -159,16 +159,16 @@ 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<ProjectExplorer::TaskWindow::Task>() - << TaskWindow::Task(TaskWindow::Unknown, + << (QList<ProjectExplorer::Task>() + << Task(Task::Unknown, QLatin1String("In function `int main(int, char**)':"), QLatin1String("/temp/test/untitled8/main.cpp"), -1, Constants::TASK_CATEGORY_COMPILE) - << TaskWindow::Task(TaskWindow::Error, + << Task(Task::Error, QLatin1String("`sfasdf' undeclared (first use this function)"), QLatin1String("/temp/test/untitled8/main.cpp"), 9, Constants::TASK_CATEGORY_COMPILE) - << TaskWindow::Task(TaskWindow::Error, + << Task(Task::Error, QLatin1String("(Each undeclared identifier is reported only once for each function it appears in.)"), QLatin1String("/temp/test/untitled8/main.cpp"), 9, Constants::TASK_CATEGORY_COMPILE) @@ -178,48 +178,48 @@ 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<ProjectExplorer::TaskWindow::Task>() - << TaskWindow::Task(TaskWindow::Warning, - QLatin1String("inline function `QDebug qDebug()' used but never defined"), - QLatin1String("/src/corelib/global/qglobal.h"), 1635, - Constants::TASK_CATEGORY_COMPILE)) + << (QList<ProjectExplorer::Task>() + << Task(Task::Warning, + QLatin1String("inline function `QDebug qDebug()' used but never defined"), + QLatin1String("/src/corelib/global/qglobal.h"), 1635, + Constants::TASK_CATEGORY_COMPILE)) << QString(); QTest::newRow("warning") << QString::fromLatin1("main.cpp:7:2: warning: Some warning") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::TaskWindow::Task>() << TaskWindow::Task(TaskWindow::Warning, - QLatin1String("Some warning"), - QLatin1String("main.cpp"), 7, - Constants::TASK_CATEGORY_COMPILE)) + << (QList<ProjectExplorer::Task>() << Task(Task::Warning, + QLatin1String("Some warning"), + QLatin1String("main.cpp"), 7, + Constants::TASK_CATEGORY_COMPILE)) << QString(); QTest::newRow("GCCE #error") << QString::fromLatin1("C:\\temp\\test\\untitled8\\main.cpp:7: #error Symbian error") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::TaskWindow::Task>() << TaskWindow::Task(TaskWindow::Error, - QLatin1String("#error Symbian error"), - QLatin1String("C:\\temp\\test\\untitled8\\main.cpp"), 7, - Constants::TASK_CATEGORY_COMPILE)) + << (QList<ProjectExplorer::Task>() << Task(Task::Error, + QLatin1String("#error Symbian error"), + QLatin1String("C:\\temp\\test\\untitled8\\main.cpp"), 7, + Constants::TASK_CATEGORY_COMPILE)) << QString(); // Symbian reports #warning(s) twice (using different syntax). QTest::newRow("GCCE #warning1") << QString::fromLatin1("C:\\temp\\test\\untitled8\\main.cpp:8: warning: #warning Symbian warning") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::TaskWindow::Task>() << TaskWindow::Task(TaskWindow::Warning, - QLatin1String("#warning Symbian warning"), - QLatin1String("C:\\temp\\test\\untitled8\\main.cpp"), 8, - Constants::TASK_CATEGORY_COMPILE)) + << (QList<ProjectExplorer::Task>() << Task(Task::Warning, + QLatin1String("#warning Symbian warning"), + QLatin1String("C:\\temp\\test\\untitled8\\main.cpp"), 8, + Constants::TASK_CATEGORY_COMPILE)) << QString(); QTest::newRow("GCCE #warning2") << QString::fromLatin1("/temp/test/untitled8/main.cpp:8:2: warning: #warning Symbian warning") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::TaskWindow::Task>() << TaskWindow::Task(TaskWindow::Warning, - QLatin1String("#warning Symbian warning"), - QLatin1String("/temp/test/untitled8/main.cpp"), 8, - Constants::TASK_CATEGORY_COMPILE)) + << (QList<ProjectExplorer::Task>() << Task(Task::Warning, + QLatin1String("#warning Symbian warning"), + QLatin1String("/temp/test/untitled8/main.cpp"), 8, + Constants::TASK_CATEGORY_COMPILE)) << QString(); QTest::newRow("Undefined reference (debug)") << QString::fromLatin1("main.o: In function `main':\n" @@ -227,18 +227,18 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "collect2: ld returned 1 exit status") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::TaskWindow::Task>() - << TaskWindow::Task(TaskWindow::Unknown, - QLatin1String("In function `main':"), - QLatin1String("main.o"), -1, - Constants::TASK_CATEGORY_COMPILE) - << TaskWindow::Task(TaskWindow::Error, - QLatin1String("undefined reference to `MainWindow::doSomething()'"), - QLatin1String("C:\\temp\\test\\untitled8/main.cpp"), 8, - Constants::TASK_CATEGORY_COMPILE) - << TaskWindow::Task(TaskWindow::Error, - QLatin1String("collect2: ld returned 1 exit status"), - QString(), -1, + << (QList<ProjectExplorer::Task>() + << Task(Task::Unknown, + QLatin1String("In function `main':"), + QLatin1String("main.o"), -1, + Constants::TASK_CATEGORY_COMPILE) + << Task(Task::Error, + QLatin1String("undefined reference to `MainWindow::doSomething()'"), + QLatin1String("C:\\temp\\test\\untitled8/main.cpp"), 8, + Constants::TASK_CATEGORY_COMPILE) + << Task(Task::Error, + QLatin1String("collect2: ld returned 1 exit status"), + QString(), -1, Constants::TASK_CATEGORY_COMPILE) ) << QString(); @@ -248,40 +248,40 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "collect2: ld returned 1 exit status") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::TaskWindow::Task>() - << TaskWindow::Task(TaskWindow::Unknown, - QLatin1String("In function `main':"), - QLatin1String("main.o"), -1, - Constants::TASK_CATEGORY_COMPILE) - << TaskWindow::Task(TaskWindow::Error, - QLatin1String("undefined reference to `MainWindow::doSomething()'"), - QLatin1String("C:\\temp\\test\\untitled8/main.cpp"), -1, - Constants::TASK_CATEGORY_COMPILE) - << TaskWindow::Task(TaskWindow::Error, - QLatin1String("collect2: ld returned 1 exit status"), - QString(), -1, - Constants::TASK_CATEGORY_COMPILE) + << (QList<ProjectExplorer::Task>() + << Task(Task::Unknown, + QLatin1String("In function `main':"), + QLatin1String("main.o"), -1, + Constants::TASK_CATEGORY_COMPILE) + << Task(Task::Error, + QLatin1String("undefined reference to `MainWindow::doSomething()'"), + QLatin1String("C:\\temp\\test\\untitled8/main.cpp"), -1, + Constants::TASK_CATEGORY_COMPILE) + << Task(Task::Error, + QLatin1String("collect2: ld returned 1 exit status"), + QString(), -1, + Constants::TASK_CATEGORY_COMPILE) ) << QString(); QTest::newRow("linker: dll format not recognized") << QString::fromLatin1("c:\\Qt\\4.6\\lib/QtGuid4.dll: file not recognized: File format not recognized") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::TaskWindow::Task>() - << TaskWindow::Task(TaskWindow::Error, - QLatin1String("file not recognized: File format not recognized"), - QLatin1String("c:\\Qt\\4.6\\lib/QtGuid4.dll"), -1, - Constants::TASK_CATEGORY_COMPILE)) + << (QList<ProjectExplorer::Task>() + << Task(Task::Error, + QLatin1String("file not recognized: File format not recognized"), + QLatin1String("c:\\Qt\\4.6\\lib/QtGuid4.dll"), -1, + Constants::TASK_CATEGORY_COMPILE)) << QString(); QTest::newRow("Invalid rpath") << QString::fromLatin1("g++: /usr/local/lib: No such file or directory") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::TaskWindow::Task>() - << TaskWindow::Task(TaskWindow::Error, - QLatin1String("/usr/local/lib: No such file or directory"), - QString(), -1, - Constants::TASK_CATEGORY_COMPILE)) + << (QList<ProjectExplorer::Task>() + << Task(Task::Error, + QLatin1String("/usr/local/lib: No such file or directory"), + QString(), -1, + Constants::TASK_CATEGORY_COMPILE)) << QString(); QTest::newRow("Invalid rpath") @@ -290,19 +290,19 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() "../../../../master/src/plugins/debugger/gdb/gdbengine.cpp:2115: warning: unused variable 'handler'") << OutputParserTester::STDERR << QString() << QString() - << (QList<ProjectExplorer::TaskWindow::Task>() - << TaskWindow::Task(TaskWindow::Unknown, - QLatin1String("In member function 'void Debugger::Internal::GdbEngine::handleBreakInsert2(const Debugger::Internal::GdbResponse&)':"), - QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), -1, - Constants::TASK_CATEGORY_COMPILE) - << TaskWindow::Task(TaskWindow::Warning, - QLatin1String("unused variable 'index'"), - QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), 2114, - Constants::TASK_CATEGORY_COMPILE) - << TaskWindow::Task(TaskWindow::Warning, - QLatin1String("unused variable 'handler'"), - QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), 2115, - Constants::TASK_CATEGORY_COMPILE)) + << (QList<ProjectExplorer::Task>() + << Task(Task::Unknown, + QLatin1String("In member function 'void Debugger::Internal::GdbEngine::handleBreakInsert2(const Debugger::Internal::GdbResponse&)':"), + QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), -1, + Constants::TASK_CATEGORY_COMPILE) + << Task(Task::Warning, + QLatin1String("unused variable 'index'"), + QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), 2114, + Constants::TASK_CATEGORY_COMPILE) + << Task(Task::Warning, + QLatin1String("unused variable 'handler'"), + QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp"), 2115, + Constants::TASK_CATEGORY_COMPILE)) << QString(); } @@ -312,7 +312,7 @@ void ProjectExplorerPlugin::testGccOutputParsers() testbench.appendOutputParser(new GccParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(QList<TaskWindow::Task>, tasks); + QFETCH(QList<Task>, 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 53b6602fdd2..929a99fa5aa 100644 --- a/src/plugins/projectexplorer/gnumakeparser.cpp +++ b/src/plugins/projectexplorer/gnumakeparser.cpp @@ -70,9 +70,9 @@ void GnuMakeParser::removeDirectory(const QString &dir) m_directories.removeAll(dir); } -void GnuMakeParser::taskAdded(const ProjectExplorer::TaskWindow::Task &task) +void GnuMakeParser::taskAdded(const ProjectExplorer::Task &task) { - ProjectExplorer::TaskWindow::Task editable(task); + ProjectExplorer::Task editable(task); QString filePath(QDir::cleanPath(task.file.trimmed())); if (!filePath.isEmpty() && !QDir::isAbsolutePath(filePath)) { diff --git a/src/plugins/projectexplorer/gnumakeparser.h b/src/plugins/projectexplorer/gnumakeparser.h index e194647c21b..30f82bca8c8 100644 --- a/src/plugins/projectexplorer/gnumakeparser.h +++ b/src/plugins/projectexplorer/gnumakeparser.h @@ -47,7 +47,7 @@ public: virtual void stdOutput(const QString &line); public slots: - virtual void taskAdded(const ProjectExplorer::TaskWindow::Task &task); + virtual void taskAdded(const ProjectExplorer::Task &task); private: void addDirectory(const QString &dir); diff --git a/src/plugins/projectexplorer/ioutputparser.cpp b/src/plugins/projectexplorer/ioutputparser.cpp index b74836a0918..2b43514bab6 100644 --- a/src/plugins/projectexplorer/ioutputparser.cpp +++ b/src/plugins/projectexplorer/ioutputparser.cpp @@ -52,8 +52,8 @@ void IOutputParser::appendOutputParser(IOutputParser *parser) m_parser = parser; connect(parser, SIGNAL(addOutput(QString)), this, SLOT(outputAdded(QString))); - connect(parser, SIGNAL(addTask(ProjectExplorer::TaskWindow::Task)), - this, SLOT(taskAdded(ProjectExplorer::TaskWindow::Task))); + connect(parser, SIGNAL(addTask(ProjectExplorer::Task)), + this, SLOT(taskAdded(ProjectExplorer::Task))); } IOutputParser *IOutputParser::takeOutputParserChain() @@ -85,7 +85,7 @@ void IOutputParser::outputAdded(const QString &string) emit addOutput(string); } -void IOutputParser::taskAdded(const ProjectExplorer::TaskWindow::Task &task) +void IOutputParser::taskAdded(const ProjectExplorer::Task &task) { emit addTask(task); } diff --git a/src/plugins/projectexplorer/ioutputparser.h b/src/plugins/projectexplorer/ioutputparser.h index cfa4161b3af..298193a8580 100644 --- a/src/plugins/projectexplorer/ioutputparser.h +++ b/src/plugins/projectexplorer/ioutputparser.h @@ -69,7 +69,7 @@ signals: /// line! void addOutput(const QString &string); /// Should be emitted for each task seen in the output. - void addTask(const ProjectExplorer::TaskWindow::Task &task); + void addTask(const ProjectExplorer::Task &task); public slots: /// Subparsers have their addOutput signal connected to this slot. @@ -77,7 +77,7 @@ public slots: virtual void outputAdded(const QString &string); /// Subparsers have their addTask signal connected to this slot. /// This method can be overwritten to change the task. - virtual void taskAdded(const ProjectExplorer::TaskWindow::Task &task); + virtual void taskAdded(const ProjectExplorer::Task &task); private: IOutputParser *m_parser; diff --git a/src/plugins/projectexplorer/metatypedeclarations.h b/src/plugins/projectexplorer/metatypedeclarations.h index 567155c33b3..120f0b019ce 100644 --- a/src/plugins/projectexplorer/metatypedeclarations.h +++ b/src/plugins/projectexplorer/metatypedeclarations.h @@ -40,7 +40,8 @@ class SessionManager; class IApplicationOutput; class IOutputParser; class GlobalConfigManagerInterface; -struct TaskWindow::Task; +class Project; +class Task; namespace Internal { class CommandQObject; @@ -56,7 +57,7 @@ Q_DECLARE_METATYPE(QList<ProjectExplorer::Internal::CommandQObject*>) Q_DECLARE_METATYPE(ProjectExplorer::IOutputParser*) Q_DECLARE_METATYPE(ProjectExplorer::GlobalConfigManagerInterface*) -Q_DECLARE_METATYPE(ProjectExplorer::TaskWindow::Task) -Q_DECLARE_METATYPE(QList<ProjectExplorer::TaskWindow::Task>) +Q_DECLARE_METATYPE(ProjectExplorer::Task) +Q_DECLARE_METATYPE(QList<ProjectExplorer::Task>) #endif // PROJECTEXPLORERMETATYPEDECLARATIONS_H diff --git a/src/plugins/projectexplorer/msvcparser.cpp b/src/plugins/projectexplorer/msvcparser.cpp index 82dd19321e6..6a5979b6a8c 100644 --- a/src/plugins/projectexplorer/msvcparser.cpp +++ b/src/plugins/projectexplorer/msvcparser.cpp @@ -44,11 +44,11 @@ void MsvcParser::stdOutput(const QString &line) { QString lne = line.trimmed(); if (m_compileRegExp.indexIn(lne) > -1 && m_compileRegExp.numCaptures() == 4) { - emit addTask(TaskWindow::Task(toType(m_compileRegExp.cap(3).toInt()) /* task type */, - m_compileRegExp.cap(4) /* description */, - m_compileRegExp.cap(1) /* filename */, - m_compileRegExp.cap(2).toInt() /* linenumber */, - Constants::TASK_CATEGORY_COMPILE)); + emit addTask(Task(toType(m_compileRegExp.cap(3).toInt()) /* task type */, + m_compileRegExp.cap(4) /* description */, + m_compileRegExp.cap(1) /* filename */, + m_compileRegExp.cap(2).toInt() /* linenumber */, + Constants::TASK_CATEGORY_COMPILE)); return; } if (m_linkRegExp.indexIn(lne) > -1 && m_linkRegExp.numCaptures() == 3) { @@ -56,22 +56,22 @@ void MsvcParser::stdOutput(const QString &line) if (fileName.contains(QLatin1String("LINK"), Qt::CaseSensitive)) fileName.clear(); - emit addTask(TaskWindow::Task(toType(m_linkRegExp.cap(2).toInt()) /* task type */, - m_linkRegExp.cap(3) /* description */, - fileName /* filename */, - -1 /* line number */, - Constants::TASK_CATEGORY_COMPILE)); + emit addTask(Task(toType(m_linkRegExp.cap(2).toInt()) /* task type */, + m_linkRegExp.cap(3) /* description */, + fileName /* filename */, + -1 /* line number */, + Constants::TASK_CATEGORY_COMPILE)); return; } IOutputParser::stdError(line); } -TaskWindow::TaskType MsvcParser::toType(int number) +Task::TaskType MsvcParser::toType(int number) { if (number == 0) - return TaskWindow::Unknown; + return Task::Unknown; else if (number > 4000 && number < 5000) - return TaskWindow::Warning; + return Task::Warning; else - return TaskWindow::Error; + return Task::Error; } diff --git a/src/plugins/projectexplorer/msvcparser.h b/src/plugins/projectexplorer/msvcparser.h index 1224b0801eb..74591a5922e 100644 --- a/src/plugins/projectexplorer/msvcparser.h +++ b/src/plugins/projectexplorer/msvcparser.h @@ -48,7 +48,7 @@ public: virtual void stdOutput(const QString &line); private: - TaskWindow::TaskType toType(int number); + Task::TaskType toType(int number); QRegExp m_compileRegExp; QRegExp m_linkRegExp; }; diff --git a/src/plugins/projectexplorer/outputparser_test.cpp b/src/plugins/projectexplorer/outputparser_test.cpp index 317e8d44d24..09dc063979e 100644 --- a/src/plugins/projectexplorer/outputparser_test.cpp +++ b/src/plugins/projectexplorer/outputparser_test.cpp @@ -47,7 +47,7 @@ OutputParserTester::~OutputParserTester() // test methods: void OutputParserTester::testParsing(const QString &lines, Channel inputChannel, - QList<TaskWindow::Task> tasks, + QList<Task> tasks, const QString &childStdOutLines, const QString &childStdErrLines, const QString &outputLines) @@ -78,8 +78,8 @@ void OutputParserTester::testParsing(const QString &lines, } } -void OutputParserTester::testTaskMangling(const TaskWindow::Task input, - const TaskWindow::Task output) +void OutputParserTester::testTaskMangling(const Task input, + const Task output) { reset(); childParser()->taskAdded(input); @@ -145,7 +145,7 @@ void OutputParserTester::outputAdded(const QString &line) m_receivedOutput.append(line); } -void OutputParserTester::taskAdded(const ProjectExplorer::TaskWindow::Task &task) +void OutputParserTester::taskAdded(const ProjectExplorer::Task &task) { m_receivedTasks.append(task); } diff --git a/src/plugins/projectexplorer/outputparser_test.h b/src/plugins/projectexplorer/outputparser_test.h index 5f53a7681b7..89b2292c383 100644 --- a/src/plugins/projectexplorer/outputparser_test.h +++ b/src/plugins/projectexplorer/outputparser_test.h @@ -50,12 +50,12 @@ public: // test methods: void testParsing(const QString &lines, Channel inputChannel, - QList<TaskWindow::Task> tasks, + QList<Task> tasks, const QString &childStdOutLines, const QString &childStdErrLines, const QString &outputLines); - void testTaskMangling(const TaskWindow::Task input, - const TaskWindow::Task output); + void testTaskMangling(const Task input, + const Task output); void testOutputMangling(const QString &input, const QString &output); @@ -69,7 +69,7 @@ public: private slots: void outputAdded(const QString &line); - void taskAdded(const ProjectExplorer::TaskWindow::Task &task); + void taskAdded(const ProjectExplorer::Task &task); private: void reset(); @@ -78,7 +78,7 @@ private: QString m_receivedStdErrChildLine; QString m_receivedStdOutChildLine; - QList<TaskWindow::Task> m_receivedTasks; + QList<Task> m_receivedTasks; QString m_receivedOutput; }; diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp index 738abb7ab24..5f62d247e4c 100644 --- a/src/plugins/projectexplorer/taskwindow.cpp +++ b/src/plugins/projectexplorer/taskwindow.cpp @@ -110,8 +110,8 @@ public: QString categoryDisplayName(const QString &categoryId) const; void addCategory(const QString &categoryId, const QString &categoryName); - QList<TaskWindow::Task> tasks(const QString &categoryId = QString()) const; - void addTask(const TaskWindow::Task &task); + QList<Task> tasks(const QString &categoryId = QString()) const; + void addTask(const Task &task); void clearTasks(const QString &categoryId = QString()); int sizeOfFile(); @@ -120,12 +120,12 @@ public: enum Roles { File = Qt::UserRole, Line, Description, FileNotFound, Type, Category }; - QIcon iconFor(TaskWindow::TaskType type); + QIcon iconFor(Task::TaskType type); private: QHash<QString,QString> m_categories; // category id -> display name - QList<TaskWindow::Task> m_tasks; // all tasks (in order of insertion) - QMap<QString,QList<TaskWindow::Task> > m_tasksInCategory; // categoryId->tasks + QList<Task> m_tasks; // all tasks (in order of insertion) + QMap<QString,QList<Task> > m_tasksInCategory; // categoryId->tasks QHash<QString,bool> m_fileNotFound; int m_maxSizeOfFileName; @@ -219,7 +219,7 @@ void TaskModel::addCategory(const QString &categoryId, const QString &categoryNa m_categories.insert(categoryId, categoryName); } -QList<TaskWindow::Task> TaskModel::tasks(const QString &categoryId) const +QList<Task> TaskModel::tasks(const QString &categoryId) const { if (categoryId.isEmpty()) { return m_tasks; @@ -228,11 +228,11 @@ QList<TaskWindow::Task> TaskModel::tasks(const QString &categoryId) const } } -void TaskModel::addTask(const TaskWindow::Task &task) +void TaskModel::addTask(const Task &task) { Q_ASSERT(m_categories.keys().contains(task.category)); - QList<TaskWindow::Task> tasksInCategory = m_tasksInCategory.value(task.category); + QList<Task> tasksInCategory = m_tasksInCategory.value(task.category); tasksInCategory.append(task); m_tasksInCategory.insert(task.category, tasksInCategory); @@ -271,14 +271,14 @@ void TaskModel::clearTasks(const QString &categoryId) m_maxSizeOfFileName = 0; } else { // TODO: Optimize this for consecutive rows - foreach (const TaskWindow::Task &task, m_tasksInCategory.value(categoryId)) { + foreach (const Task &task, m_tasksInCategory.value(categoryId)) { int index = m_tasks.indexOf(task); Q_ASSERT(index >= 0); beginRemoveRows(QModelIndex(), index, index); m_tasks.removeAt(index); - QList<TaskWindow::Task> tasksInCategory = m_tasksInCategory.value(categoryId); + QList<Task> tasksInCategory = m_tasksInCategory.value(categoryId); tasksInCategory.removeOne(task); m_tasksInCategory.insert(categoryId, tasksInCategory); @@ -347,11 +347,11 @@ QString TaskModel::categoryDisplayName(const QString &categoryId) const return m_categories.value(categoryId); } -QIcon TaskModel::iconFor(TaskWindow::TaskType type) +QIcon TaskModel::iconFor(Task::TaskType type) { - if (type == TaskWindow::Error) + if (type == Task::Error) return m_errorIcon; - else if (type == TaskWindow::Warning) + else if (type == Task::Warning) return m_warningIcon; else return QIcon(); @@ -399,15 +399,15 @@ bool TaskFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceP bool accept = true; QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent); - TaskWindow::TaskType type = TaskWindow::TaskType(index.data(TaskModel::Type).toInt()); + Task::TaskType type = Task::TaskType(index.data(TaskModel::Type).toInt()); switch (type) { - case TaskWindow::Unknown: + case Task::Unknown: accept = m_includeUnknowns; break; - case TaskWindow::Warning: + case Task::Warning: accept = m_includeWarnings; break; - case TaskWindow::Error: + case Task::Error: accept = m_includeErrors; break; } @@ -423,7 +423,7 @@ bool TaskFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceP // TaskWindow ///// -static QToolButton *createFilterButton(TaskWindow::TaskType type, +static QToolButton *createFilterButton(Task::TaskType type, const QString &toolTip, TaskModel *model, QObject *receiver, const char *slot) { @@ -474,7 +474,7 @@ TaskWindow::TaskWindow() connect(m_copyAction, SIGNAL(triggered()), SLOT(copy())); - m_filterWarningsButton = createFilterButton(TaskWindow::Warning, + m_filterWarningsButton = createFilterButton(Task::Warning, tr("Show Warnings"), m_model, this, SLOT(setShowWarnings(bool))); @@ -489,8 +489,8 @@ TaskWindow::TaskWindow() m_categoriesButton->setPopupMode(QToolButton::InstantPopup); m_categoriesButton->setMenu(m_categoriesMenu); - qRegisterMetaType<ProjectExplorer::TaskWindow::Task>("ProjectExplorer::TaskWindow::Task"); - qRegisterMetaType<QList<ProjectExplorer::TaskWindow::Task> >("QList<ProjectExplorer::TaskWindow::Task>"); + qRegisterMetaType<ProjectExplorer::Task>("ProjectExplorer::Task"); + qRegisterMetaType<QList<ProjectExplorer::Task> >("QList<ProjectExplorer::Task>"); updateActions(); } @@ -570,10 +570,10 @@ void TaskWindow::copy() QString description = index.data(TaskModel::Description).toString(); QString type; switch (index.data(TaskModel::Type).toInt()) { - case TaskWindow::Error: + case Task::Error: type = "error: "; break; - case TaskWindow::Warning: + case Task::Warning: type = "warning: "; break; } @@ -633,7 +633,7 @@ int TaskWindow::errorTaskCount(const QString &categoryId) const int errorTaskCount = 0; foreach (const Task &task, m_model->tasks(categoryId)) { - if (task.type == TaskWindow::Error) + if (task.type == Task::Error) ++ errorTaskCount; } @@ -821,7 +821,7 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, painter->setPen(textColor); TaskModel *model = static_cast<TaskFilterModel *>(view->model())->taskModel(); - TaskWindow::TaskType type = TaskWindow::TaskType(index.data(TaskModel::Type).toInt()); + Task::TaskType type = Task::TaskType(index.data(TaskModel::Type).toInt()); QIcon icon = model->iconFor(type); painter->drawPixmap(TASK_ICON_MARGIN, opt.rect.top() + TASK_ICON_MARGIN, icon.pixmap(TASK_ICON_SIZE, TASK_ICON_SIZE)); @@ -916,7 +916,7 @@ QWidget *TaskWindowContext::widget() // // functions // -bool ProjectExplorer::operator==(const TaskWindow::Task &t1, const TaskWindow::Task &t2) +bool ProjectExplorer::operator==(const Task &t1, const Task &t2) { return t1.type == t2.type && t1.line == t2.line @@ -925,7 +925,7 @@ bool ProjectExplorer::operator==(const TaskWindow::Task &t1, const TaskWindow::T && t1.category == t2.category; } -uint ProjectExplorer::qHash(const TaskWindow::Task &task) +uint ProjectExplorer::qHash(const Task &task) { return qHash(task.file) + task.line; } diff --git a/src/plugins/projectexplorer/taskwindow.h b/src/plugins/projectexplorer/taskwindow.h index e92acfbd72c..3592591f400 100644 --- a/src/plugins/projectexplorer/taskwindow.h +++ b/src/plugins/projectexplorer/taskwindow.h @@ -50,6 +50,33 @@ class TaskWindowContext; } // namespace Internal +struct Task { + enum TaskType { + Unknown, + Error, + Warning + }; + + Task() : type(Unknown), line(-1) + { } + Task(TaskType type_, const QString &description_, + const QString &file_, int line_, const QString &category_) : + type(type_), description(description_), file(file_), line(line_), category(category_) + { } + Task(const Task &source) : + type(source.type), description(source.description), file(source.file), + line(source.line), category(source.category) + { } + ~Task() + { } + + TaskType type; + QString description; + QString file; + int line; + QString category; +}; + class PROJECTEXPLORER_EXPORT TaskWindow : public Core::IOutputPane { Q_OBJECT @@ -58,33 +85,6 @@ public: TaskWindow(); ~TaskWindow(); - enum TaskType { - Unknown, - Error, - Warning - }; - - struct Task { - Task() : type(Unknown), line(-1) - { } - Task(TaskType type_, const QString &description_, - const QString &file_, int line_, const QString &category_) : - type(type_), description(description_), file(file_), line(line_), category(category_) - { } - Task(const Task &source) : - type(source.type), description(source.description), file(source.file), - line(source.line), category(source.category) - { } - ~Task() - { } - - TaskType type; - QString description; - QString file; - int line; - QString category; - }; - void addCategory(const QString &categoryId, const QString &displayName); void addTask(const Task &task); @@ -137,8 +137,8 @@ private: QMenu *m_categoriesMenu; }; -bool operator==(const TaskWindow::Task &t1, const TaskWindow::Task &t2); -uint qHash(const TaskWindow::Task &task); +bool operator==(const Task &t1, const Task &t2); +uint qHash(const Task &task); } //namespace ProjectExplorer diff --git a/src/plugins/qmlprojectmanager/qmltaskmanager.cpp b/src/plugins/qmlprojectmanager/qmltaskmanager.cpp index afc495c7a6a..72455057b54 100644 --- a/src/plugins/qmlprojectmanager/qmltaskmanager.cpp +++ b/src/plugins/qmlprojectmanager/qmltaskmanager.cpp @@ -54,12 +54,12 @@ void QmlTaskManager::documentUpdated(QmlJS::Document::Ptr /*doc*/) m_taskWindow->clearTasks(Constants::TASK_CATEGORY_QML); foreach (const QmlJS::DiagnosticMessage &msg, doc->diagnosticMessages()) { - ProjectExplorer::TaskWindow::TaskType type - = msg.isError() ? ProjectExplorer::TaskWindow::Error - : ProjectExplorer::TaskWindow::Warning; + ProjectExplorer::Task::TaskType type + = msg.isError() ? ProjectExplorer::Task::Error + : ProjectExplorer::Task::Warning; - ProjectExplorer::TaskWindow::Task task(type, msg.message, doc->fileName(), msg.loc.startLine, - Constants::TASK_CATEGORY_QML); + ProjectExplorer::Task task(type, msg.message, doc->fileName(), msg.loc.startLine, + Constants::TASK_CATEGORY_QML); m_taskWindow->addTask(task); } #endif diff --git a/src/plugins/qt4projectmanager/qmakeparser.cpp b/src/plugins/qt4projectmanager/qmakeparser.cpp index 24a91172085..14971e7fe60 100644 --- a/src/plugins/qt4projectmanager/qmakeparser.cpp +++ b/src/plugins/qt4projectmanager/qmakeparser.cpp @@ -36,7 +36,7 @@ using namespace Qt4ProjectManager; using namespace Qt4ProjectManager::Internal; -using ProjectExplorer::TaskWindow; +using ProjectExplorer::Task; QMakeParser::QMakeParser() { @@ -47,11 +47,11 @@ void QMakeParser::stdError(const QString &line) QString lne(line.trimmed()); if (lne.startsWith(QLatin1String("Project ERROR:"))) { const QString description = lne.mid(15); - emit addTask(TaskWindow::Task(TaskWindow::Error, - description, - QString() /* filename */, - -1 /* linenumber */, - ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)); + emit addTask(Task(Task::Error, + description, + QString() /* filename */, + -1 /* linenumber */, + ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)); return; } IOutputParser::stdError(line); diff --git a/src/plugins/qt4projectmanager/qt-s60/abldparser.cpp b/src/plugins/qt4projectmanager/qt-s60/abldparser.cpp index 5419e9c2ce8..9cc7595f3ef 100644 --- a/src/plugins/qt4projectmanager/qt-s60/abldparser.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/abldparser.cpp @@ -55,19 +55,19 @@ void AbldParser::stdOutput(const QString &line) QString lne = line.trimmed(); // possible ABLD.bat errors: if (lne.startsWith(QLatin1String("Is Perl, version "))) { - emit addTask(TaskWindow::Task(TaskWindow::Error, - lne /* description */, - QString() /* filename */, - -1 /* linenumber */, - TASK_CATEGORY_BUILDSYSTEM)); + emit addTask(Task(Task::Error, + lne /* description */, + QString() /* filename */, + -1 /* linenumber */, + TASK_CATEGORY_BUILDSYSTEM)); return; } if (lne.startsWith(QLatin1String("FATAL ERROR:"))) { - emit addTask(TaskWindow::Task(TaskWindow::Error, - lne /* description */, - QString() /* filename */, - -1 /* linenumber */, - TASK_CATEGORY_BUILDSYSTEM)); + emit addTask(Task(Task::Error, + lne /* description */, + QString() /* filename */, + -1 /* linenumber */, + TASK_CATEGORY_BUILDSYSTEM)); m_waitingForStdOutContinuation = false; return; } @@ -77,15 +77,15 @@ void AbldParser::stdOutput(const QString &line) m_currentFile = m_perlIssue.cap(2); m_currentLine = m_perlIssue.cap(3).toInt(); - TaskWindow::Task task(TaskWindow::Unknown, - m_perlIssue.cap(4) /* description */, - m_currentFile, m_currentLine, - TASK_CATEGORY_BUILDSYSTEM); + Task task(Task::Unknown, + m_perlIssue.cap(4) /* description */, + m_currentFile, m_currentLine, + TASK_CATEGORY_BUILDSYSTEM); if (m_perlIssue.cap(1) == QLatin1String("WARNING")) - task.type = TaskWindow::Warning; + task.type = Task::Warning; else if (m_perlIssue.cap(1) == QLatin1String("ERROR")) - task.type = TaskWindow::Error; + task.type = Task::Error; emit addTask(task); return; @@ -97,10 +97,10 @@ void AbldParser::stdOutput(const QString &line) } if (m_waitingForStdOutContinuation) { - emit addTask(TaskWindow::Task(TaskWindow::Unknown, - lne /* description */, - m_currentFile, m_currentLine, - TASK_CATEGORY_BUILDSYSTEM)); + emit addTask(Task(Task::Unknown, + lne /* description */, + m_currentFile, m_currentLine, + TASK_CATEGORY_BUILDSYSTEM)); m_waitingForStdOutContinuation = true; return; } @@ -117,20 +117,20 @@ void AbldParser::stdError(const QString &line) if (lne.startsWith(QLatin1String("ABLD ERROR:")) || lne.startsWith(QLatin1String("This project does not support ")) || lne.startsWith(QLatin1String("Platform "))) { - emit addTask(TaskWindow::Task(TaskWindow::Error, - lne /* description */, - QString() /* filename */, - -1 /* linenumber */, - TASK_CATEGORY_BUILDSYSTEM)); + emit addTask(Task(Task::Error, + lne /* description */, + QString() /* filename */, + -1 /* linenumber */, + TASK_CATEGORY_BUILDSYSTEM)); return; } if (lne.startsWith(QLatin1String("Died at "))) { - emit addTask(TaskWindow::Task(TaskWindow::Error, - lne /* description */, - QString() /* filename */, - -1 /* linenumber */, - TASK_CATEGORY_BUILDSYSTEM)); + emit addTask(Task(Task::Error, + lne /* description */, + QString() /* filename */, + -1 /* linenumber */, + TASK_CATEGORY_BUILDSYSTEM)); m_waitingForStdErrContinuation = false; return; } @@ -146,29 +146,29 @@ void AbldParser::stdError(const QString &line) } if (lne.startsWith(QLatin1String("WARNING: "))) { QString description = lne.mid(9); - emit addTask(TaskWindow::Task(TaskWindow::Warning, description, - m_currentFile, - -1 /* linenumber */, - TASK_CATEGORY_BUILDSYSTEM)); + emit addTask(Task(Task::Warning, description, + m_currentFile, + -1 /* linenumber */, + TASK_CATEGORY_BUILDSYSTEM)); m_waitingForStdErrContinuation = true; return; } if (lne.startsWith(QLatin1String("ERROR: "))) { QString description = lne.mid(7); - emit addTask(TaskWindow::Task(TaskWindow::Error, description, - m_currentFile, - -1 /* linenumber */, - TASK_CATEGORY_BUILDSYSTEM)); + emit addTask(Task(Task::Error, description, + m_currentFile, + -1 /* linenumber */, + TASK_CATEGORY_BUILDSYSTEM)); m_waitingForStdErrContinuation = true; return; } if (m_waitingForStdErrContinuation) { - emit addTask(TaskWindow::Task(TaskWindow::Unknown, - lne /* description */, - m_currentFile, - -1 /* linenumber */, - TASK_CATEGORY_BUILDSYSTEM)); + emit addTask(Task(Task::Unknown, + lne /* description */, + m_currentFile, + -1 /* linenumber */, + TASK_CATEGORY_BUILDSYSTEM)); m_waitingForStdErrContinuation = true; return; } diff --git a/src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp b/src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp index 32dd8bf2a05..e7ad6efd1b7 100644 --- a/src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp @@ -55,11 +55,11 @@ void RvctParser::stdError(const QString &line) { QString lne = line.trimmed(); if (m_linkerProblem.indexIn(lne) > -1) { - emit addTask(TaskWindow::Task(TaskWindow::Error, - m_linkerProblem.cap(2) /* description */, - m_linkerProblem.cap(1) /* filename */, - -1 /* linenumber */, - TASK_CATEGORY_COMPILE)); + emit addTask(Task(Task::Error, + m_linkerProblem.cap(2) /* description */, + m_linkerProblem.cap(1) /* filename */, + -1 /* linenumber */, + TASK_CATEGORY_COMPILE)); return; } @@ -67,14 +67,14 @@ void RvctParser::stdError(const QString &line) m_lastFile = m_warningOrError.cap(1); m_lastLine = m_warningOrError.cap(2).toInt(); - TaskWindow::Task task(TaskWindow::Unknown, - m_warningOrError.cap(5) /* description */, - m_lastFile, m_lastLine, - TASK_CATEGORY_COMPILE); + Task task(Task::Unknown, + m_warningOrError.cap(5) /* description */, + m_lastFile, m_lastLine, + TASK_CATEGORY_COMPILE); if (m_warningOrError.cap(4) == "Warning") - task.type = TaskWindow::Warning; + task.type = Task::Warning; else if (m_warningOrError.cap(4) == "Error") - task.type = TaskWindow::Error; + task.type = Task::Error; m_additionalInfo = true; @@ -89,9 +89,9 @@ void RvctParser::stdError(const QString &line) if (m_additionalInfo) { // Report any lines after a error/warning message as these contain // additional information on the problem. - emit addTask(TaskWindow::Task(TaskWindow::Unknown, lne, - m_lastFile, m_lastLine, - TASK_CATEGORY_COMPILE)); + emit addTask(Task(Task::Unknown, lne, + m_lastFile, m_lastLine, + TASK_CATEGORY_COMPILE)); return; } IOutputParser::stdError(line); diff --git a/src/plugins/qt4projectmanager/qt-s60/winscwparser.cpp b/src/plugins/qt4projectmanager/qt-s60/winscwparser.cpp index ef2151a504e..d1d98a6e159 100644 --- a/src/plugins/qt4projectmanager/qt-s60/winscwparser.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/winscwparser.cpp @@ -51,13 +51,13 @@ void WinscwParser::stdOutput(const QString &line) QString lne = line.trimmed(); if (m_compilerProblem.indexIn(lne) > -1) { - TaskWindow::Task task(TaskWindow::Error, - m_compilerProblem.cap(3) /* description */, - m_compilerProblem.cap(1) /* filename */, - m_compilerProblem.cap(2).toInt() /* linenumber */, - TASK_CATEGORY_COMPILE); + Task task(Task::Error, + m_compilerProblem.cap(3) /* description */, + m_compilerProblem.cap(1) /* filename */, + m_compilerProblem.cap(2).toInt() /* linenumber */, + TASK_CATEGORY_COMPILE); if (task.description.startsWith(QLatin1String("warning: "))) { - task.type = TaskWindow::Warning; + task.type = Task::Warning; task.description = task.description.mid(9); } emit addTask(task); @@ -71,11 +71,11 @@ void WinscwParser::stdError(const QString &line) QString lne = line.trimmed(); if (m_linkerProblem.indexIn(lne) > -1) { - emit addTask(TaskWindow::Task(TaskWindow::Error, - m_linkerProblem.cap(2) /* description */, - m_linkerProblem.cap(1) /* filename */, - -1 /* linenumber */, - TASK_CATEGORY_COMPILE)); + emit addTask(Task(Task::Error, + m_linkerProblem.cap(2) /* description */, + m_linkerProblem.cap(1) /* filename */, + -1 /* linenumber */, + TASK_CATEGORY_COMPILE)); return; } IOutputParser::stdError(line); |