blob: 373c92d8affff186e6a1d7b1bf4d411835563bc3 (
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
// 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
#pragma once
#include "ioutputparser.h"
#include <QRegularExpression>
#include <QStringList>
namespace ProjectExplorer {
class PROJECTEXPLORER_EXPORT GnuMakeParser : public ProjectExplorer::OutputTaskParser
{
Q_OBJECT
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;
#if defined WITH_TESTS
friend class ProjectExplorerPlugin;
#endif
};
#if defined WITH_TESTS
class GnuMakeParserTester : public QObject
{
Q_OBJECT
public:
explicit GnuMakeParserTester(GnuMakeParser *parser, QObject *parent = nullptr);
void parserIsAboutToBeDeleted();
Utils::FilePaths directories;
GnuMakeParser *parser;
};
#endif
} // namespace ProjectExplorer
|