aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/boot2qt/qdbqtversion.cpp
blob: bf67ee5bc999059501f7be43f365bad9e9ab443e (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
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "qdbqtversion.h"

#include "qdbconstants.h"
#include "qdbtr.h"

#include <qtsupport/baseqtversion.h>
#include <qtsupport/qtsupporttr.h>

namespace Qdb::Internal {

class QdbQtVersion final : public QtSupport::QtVersion
{
public:
    QString description() const final
    {
        return QtSupport::Tr::tr("Boot2Qt", "Qt version is used for Boot2Qt development");
    }
    QSet<Utils::Id> targetDeviceTypes() const final
    {
        return {Utils::Id(Constants::QdbLinuxOsType)};
    }
};

class QdbQtVersionFactory final : public QtSupport::QtVersionFactory
{
public:
    QdbQtVersionFactory()
    {
        setQtVersionCreator([] { return new QdbQtVersion; });
        setSupportedType("Qdb.EmbeddedLinuxQt");
        setPriority(99);
        setRestrictionChecker([](const SetupData &setup) {
            return setup.platforms.contains("boot2qt");
        });
    }
};

void setupQdbQtVersion()
{
    static QdbQtVersionFactory theQdbQtVersionFactory;
}

} // Qdb::Internal