forked from qt-creator/qt-creator
Meson: Fix compile for gcc 5.3
Amends 77d7bb5014.
Change-Id: Ic613e2b9ddcc0e4b86ed78ddc997c7c40120316c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Eike Ziller
parent
14b163c961
commit
43b6b3d1c8
@@ -249,8 +249,8 @@ protected:
|
|||||||
|
|
||||||
struct UnknownBuildOption : BuildOption
|
struct UnknownBuildOption : BuildOption
|
||||||
{
|
{
|
||||||
QVariant value() const override { return "Unknown option"; }
|
QVariant value() const override { return {"Unknown option"}; }
|
||||||
QString valueStr() const override { return "Unknown option"; }
|
QString valueStr() const override { return {"Unknown option"}; }
|
||||||
void setValue(const QVariant &) override {}
|
void setValue(const QVariant &) override {}
|
||||||
Type type() const override { return Type::unknown; }
|
Type type() const override { return Type::unknown; }
|
||||||
BuildOption *copy() const override { return new UnknownBuildOption{*this}; }
|
BuildOption *copy() const override { return new UnknownBuildOption{*this}; }
|
||||||
|
|||||||
@@ -27,6 +27,19 @@
|
|||||||
#include <projectexplorer/taskhub.h>
|
#include <projectexplorer/taskhub.h>
|
||||||
namespace MesonProjectManager {
|
namespace MesonProjectManager {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
struct WarningRegex
|
||||||
|
{
|
||||||
|
const int lineCnt;
|
||||||
|
const QRegularExpression regex;
|
||||||
|
};
|
||||||
|
|
||||||
|
static const WarningRegex multiLineWarnings[] = {
|
||||||
|
WarningRegex{ 3, QRegularExpression{R"!(WARNING: Unknown options:)!"}},
|
||||||
|
WarningRegex{ 2, QRegularExpression{
|
||||||
|
R"!(WARNING: Project specifies a minimum meson_version|WARNING: Deprecated features used:)!"}},
|
||||||
|
WarningRegex{ 1, QRegularExpression{R"!(WARNING: )!"}}};
|
||||||
|
|
||||||
inline void MesonOutputParser::addTask(ProjectExplorer::Task task)
|
inline void MesonOutputParser::addTask(ProjectExplorer::Task task)
|
||||||
{
|
{
|
||||||
#ifndef MESONPARSER_DISABLE_TASKS_FOR_TESTS // small hack to allow unit testing without the banana/monkey/jungle
|
#ifndef MESONPARSER_DISABLE_TASKS_FOR_TESTS // small hack to allow unit testing without the banana/monkey/jungle
|
||||||
@@ -100,7 +113,7 @@ Utils::OutputLineParser::Result MesonOutputParser::processErrors(const QString &
|
|||||||
|
|
||||||
Utils::OutputLineParser::Result MesonOutputParser::processWarnings(const QString &line)
|
Utils::OutputLineParser::Result MesonOutputParser::processWarnings(const QString &line)
|
||||||
{
|
{
|
||||||
for (const auto &warning : m_multiLineWarnings) {
|
for (const auto &warning : multiLineWarnings) {
|
||||||
const auto match = warning.regex.match(line);
|
const auto match = warning.regex.match(line);
|
||||||
if (match.hasMatch()) {
|
if (match.hasMatch()) {
|
||||||
m_remainingLines = warning.lineCnt;
|
m_remainingLines = warning.lineCnt;
|
||||||
|
|||||||
@@ -34,20 +34,8 @@ namespace Internal {
|
|||||||
class MesonOutputParser final : public ProjectExplorer::OutputTaskParser
|
class MesonOutputParser final : public ProjectExplorer::OutputTaskParser
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
struct WarningRegex
|
|
||||||
{
|
|
||||||
const int lineCnt;
|
|
||||||
const QRegularExpression regex;
|
|
||||||
};
|
|
||||||
const QRegularExpression m_errorFileLocRegex{R"((^.*meson.build):(\d+):(\d+): ERROR)"};
|
const QRegularExpression m_errorFileLocRegex{R"((^.*meson.build):(\d+):(\d+): ERROR)"};
|
||||||
const QRegularExpression m_errorOptionRegex{R"!(ERROR: Value)!"};
|
const QRegularExpression m_errorOptionRegex{R"!(ERROR: Value)!"};
|
||||||
const std::array<WarningRegex, 3> m_multiLineWarnings{
|
|
||||||
WarningRegex{3, QRegularExpression{R"!(WARNING: Unknown options:)!"}},
|
|
||||||
WarningRegex{
|
|
||||||
2,
|
|
||||||
QRegularExpression{
|
|
||||||
R"!(WARNING: Project specifies a minimum meson_version|WARNING: Deprecated features used:)!"}},
|
|
||||||
WarningRegex{1, QRegularExpression{R"!(WARNING: )!"}}};
|
|
||||||
int m_remainingLines = 0;
|
int m_remainingLines = 0;
|
||||||
QStringList m_pending;
|
QStringList m_pending;
|
||||||
void pushLine(const QString &line);
|
void pushLine(const QString &line);
|
||||||
|
|||||||
Reference in New Issue
Block a user