aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qnx/qnxversionnumber.h
blob: a7aed56601fd8ada6e9fd0694966ff980c87dab1 (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
// Copyright (C) 2016 BlackBerry Limited. All rights reserved.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include <QStringList>

namespace Qnx::Internal {

class QnxVersionNumber
{
public:
    QnxVersionNumber(const QStringList &segments);
    QnxVersionNumber(const QString &version);
    QnxVersionNumber();

    int size() const;
    bool isEmpty() const;
    QString segment(int index) const;
    QString toString() const;

    static QnxVersionNumber fromTargetName(const QString &targetName);
    static QnxVersionNumber fromFileName(const QString &fileName, const QRegularExpression &regExp);

    bool operator >(const QnxVersionNumber &b) const;

private:
    QStringList m_segments;
};

} // Qnx::Internal