void CompilerOutputProcessor::start()
{
    ProjectExplorer::OsParser parser;
    parser.appendOutputParser(new QmakeProjectManager::QMakeParser);
    parser.appendOutputParser(new ProjectExplorer::GnuMakeParser);
    parser.appendOutputParser(new QtSupport::QtParser);
    switch (m_compilerType) {
    case CompilerTypeGcc:
        parser.appendOutputParser(new ProjectExplorer::GccParser);
        break;
    case CompilerTypeClang:
        parser.appendOutputParser(new ProjectExplorer::ClangParser);
        break;
#ifdef HAS_MSVC_PARSER
    case CompilerTypeMsvc:
        parser.appendOutputParser(new ProjectExplorer::MsvcParser);
        break;
#endif
    }

    connect(&parser, SIGNAL(addTask(ProjectExplorer::Task)),
            SLOT(handleTask(ProjectExplorer::Task)));
    while (!m_source.atEnd())
        parser.stdError(QString::fromLocal8Bit(m_source.readLine().trimmed()));
    qApp->quit();
}
示例#2
0
void CompilerOutputProcessor::start()
{
    ProjectExplorer::OsParser parser;
    parser.appendOutputParser(new QmakeProjectManager::QMakeParser);
    parser.appendOutputParser(new ProjectExplorer::GnuMakeParser);
    parser.appendOutputParser(new QtSupport::QtParser);
    switch (m_compilerType) {
    case CompilerTypeGcc:
        parser.appendOutputParser(new ProjectExplorer::GccParser);
        break;
    case CompilerTypeClang:
        parser.appendOutputParser(new ProjectExplorer::ClangParser);
        break;
    case CompilerTypeMsvc:
        parser.appendOutputParser(new ProjectExplorer::MsvcParser);
        break;
    }

    connect(&parser, &ProjectExplorer::IOutputParser::addTask,
            this, &CompilerOutputProcessor::handleTask);
    while (!m_source.atEnd())
        parser.stdError(QString::fromLocal8Bit(m_source.readLine().trimmed()));
    QCoreApplication::quit();
}