aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/fossil/branchinfo.h
blob: 8ce50df06b0a681c91c20b37cdaed7db188d341d (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
// Copyright (c) 2018 Artur Shepilko
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include <QString>

namespace Fossil {
namespace Internal {

class BranchInfo
{
public:
    enum BranchFlag {
        Current = 0x01,
        Closed = 0x02,
        Private = 0x04
    };
    Q_DECLARE_FLAGS(BranchFlags, BranchFlag)

    bool isCurrent() const { return flags.testFlag(Current); }

    QString name;
    BranchFlags flags;
};

Q_DECLARE_OPERATORS_FOR_FLAGS(BranchInfo::BranchFlags)

} // namespace Internal
} // namespace Fossil