aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/buildoutputparser/outputprocessor.h
blob: b8dad6270c2f1766fc93b56f2754cb5f23b812ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#include <QObject>

QT_BEGIN_NAMESPACE
class QIODevice;
class QTextStream;
QT_END_NAMESPACE

namespace ProjectExplorer { class Task; }

enum CompilerType {
    CompilerTypeGcc,
    CompilerTypeClang,
    CompilerTypeMsvc
};

class CompilerOutputProcessor : public QObject
{
    Q_OBJECT
public:
    CompilerOutputProcessor(CompilerType compilerType, QIODevice &source);
     ~CompilerOutputProcessor();

    void start();
private:
    void handleTask(const ProjectExplorer::Task &task);

    const CompilerType m_compilerType;
    QIODevice &m_source;
    QTextStream * const m_ostream;
};