2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2020 Miklos Marton <martonmiklosqdev@gmail.com>
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2020-02-03 17:17:10 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <utils/outputformatter.h>
|
|
|
|
|
|
2020-02-06 12:20:23 +01:00
|
|
|
#include <QRegularExpression>
|
2020-02-03 17:17:10 +01:00
|
|
|
|
2022-07-29 15:56:28 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QMenu;
|
|
|
|
|
QT_END_NAMESPACE
|
2020-02-25 21:13:39 +02:00
|
|
|
|
2020-02-03 17:17:10 +01:00
|
|
|
namespace VcsBase {
|
|
|
|
|
|
2020-04-16 13:53:05 +02:00
|
|
|
class VcsOutputLineParser : public Utils::OutputLineParser
|
2020-02-03 17:17:10 +01:00
|
|
|
{
|
2020-02-16 14:03:47 +01:00
|
|
|
Q_OBJECT
|
2020-02-03 17:17:10 +01:00
|
|
|
public:
|
2020-04-14 15:28:44 +02:00
|
|
|
VcsOutputLineParser();
|
2021-07-30 16:46:27 +02:00
|
|
|
void fillLinkContextMenu(QMenu *menu, const Utils::FilePath &workingDirectory, const QString &href);
|
|
|
|
|
bool handleVcsLink(const Utils::FilePath &workingDirectory, const QString &href);
|
2020-02-16 14:03:47 +01:00
|
|
|
|
2020-02-03 17:17:10 +01:00
|
|
|
private:
|
2020-04-14 15:28:44 +02:00
|
|
|
Result handleLine(const QString &text, Utils::OutputFormat format) override;
|
2020-03-19 16:00:37 +01:00
|
|
|
|
2020-02-18 01:35:26 +01:00
|
|
|
const QRegularExpression m_regexp;
|
2020-02-03 17:17:10 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|