blob: 4a6b8dc0fb0738a502094f5fb948d3a7f3721705 (
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
|
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include <projectexplorer/ioutputparser.h>
#include <projectexplorer/task.h>
#include <QRegularExpression>
namespace CMakeProjectManager::Internal {
class CMakeAutogenParser : public ProjectExplorer::OutputTaskParser
{
public:
explicit CMakeAutogenParser();
private:
Result handleLine(const QString &line, Utils::OutputFormat type) override;
void flush() override;
enum ExpectedState { NONE, LINE_SEPARATOR, LINE_DESCRIPTION };
ExpectedState m_expectedState = NONE;
ProjectExplorer::Task m_lastTask;
QRegularExpression m_commonError;
QRegularExpression m_commonWarning;
QRegularExpression m_separatorLine;
int m_lines = 0;
};
#ifdef WITH_TESTS
QObject *createCMakeAutogenParserTest();
#endif
} // namespace CMakeProjectManager::Internal
|