blob: a8090c6b7a6f869670259a4646be3102ec37a9cc (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include "dashboard/dto.h"
#include <utils/expected.h>
#include <QHash>
#include <QUrl>
#include <QVersionNumber>
QT_BEGIN_NAMESPACE
class QIcon;
QT_END_NAMESPACE
namespace ProjectExplorer { class Project; }
namespace Tasking { class Group; }
namespace Axivion::Internal {
struct IssueListSearch
{
QString kind;
QString state;
QString versionStart;
QString versionEnd;
QString owner;
QString filter_path;
int offset = 0;
int limit = 150;
bool computeTotalRowCount = false;
QString toQuery() const;
};
class DashboardInfo
{
public:
QUrl source;
QVersionNumber versionNumber;
QStringList projects;
QHash<QString, QUrl> projectUrls;
std::optional<QUrl> checkCredentialsUrl;
};
using DashboardInfoHandler = std::function<void(const Utils::expected_str<DashboardInfo> &)>;
Tasking::Group dashboardInfoRecipe(const DashboardInfoHandler &handler = {});
// TODO: Wrap into expected_str<>?
using TableInfoHandler = std::function<void(const Dto::TableInfoDto &)>;
Tasking::Group tableInfoRecipe(const QString &prefix, const TableInfoHandler &handler);
// TODO: Wrap into expected_str<>?
using IssueTableHandler = std::function<void(const Dto::IssueTableDto &)>;
Tasking::Group issueTableRecipe(const IssueListSearch &search, const IssueTableHandler &handler);
using HtmlHandler = std::function<void(const QByteArray &)>;
Tasking::Group issueHtmlRecipe(const QString &issueId, const HtmlHandler &handler);
void fetchProjectInfo(const QString &projectName);
std::optional<Dto::ProjectInfoDto> projectInfo();
bool handleCertificateIssue();
QIcon iconForIssue(const QString &prefix);
QString anyToSimpleString(const Dto::Any &any);
} // Axivion::Internal
|