aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/gnumakeparser.h
blob: 8ab742f126e5c0871ab346e4c4ad4dd8c5fb36d4 (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
34
35
36
37
38
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include "ioutputparser.h"

#include <QRegularExpression>
#include <QStringList>

namespace ProjectExplorer {

class PROJECTEXPLORER_EXPORT GnuMakeParser : public ProjectExplorer::OutputTaskParser
{
public:
    explicit GnuMakeParser();

private:
    Result handleLine(const QString &line, Utils::OutputFormat type) override;
    bool hasFatalErrors() const override;

    void emitTask(const ProjectExplorer::Task &task);

    QRegularExpression m_makeDir;
    QRegularExpression m_makeLine;
    QRegularExpression m_threeStarError;
    QRegularExpression m_errorInMakefile;

    bool m_suppressIssues = false;

    int m_fatalErrorCount = 0;
};

#ifdef WITH_TESTS
namespace Internal { QObject *createGnuMakeParserTest(); }
#endif

} // namespace ProjectExplorer