aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/qqmlsysteminformation.cpp
blob: 589a40858e2de090a2781ebbd856251c2375b49b (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#include "qqmlsysteminformation_p.h"
#include <QtCore/qsysinfo.h>

QT_BEGIN_NAMESPACE

/*!
    \qmltype SystemInformation
    \inherits QtObject
    \inqmlmodule QtCore
    \since 6.4
    \brief Provides information about the system.

    The SystemInformation singleton type provides information about the system,
    using the same API as \l QSysInfo.

    \qml
    property string prettyProductName: SystemInformation.prettyProductName
    \endqml

    \sa QSysInfo
*/

QQmlSystemInformation::QQmlSystemInformation(QObject *parent) : QObject(parent)
{
}

int QQmlSystemInformation::wordSize() const
{
    return QSysInfo::WordSize;
}

QQmlSystemInformation::Endian QQmlSystemInformation::byteOrder() const
{
    return static_cast<Endian>(QSysInfo::ByteOrder);
}

QString QQmlSystemInformation::buildCpuArchitecture() const
{
    return QSysInfo::buildCpuArchitecture();
}

QString QQmlSystemInformation::currentCpuArchitecture() const
{
    return QSysInfo::currentCpuArchitecture();
}

QString QQmlSystemInformation::buildAbi() const
{
    return QSysInfo::buildAbi();
}

QString QQmlSystemInformation::kernelType() const
{
    return QSysInfo::kernelType();
}

QString QQmlSystemInformation::kernelVersion() const
{
    return QSysInfo::kernelVersion();
}

QString QQmlSystemInformation::productType() const
{
    return QSysInfo::productType();
}

QString QQmlSystemInformation::productVersion() const
{
    return QSysInfo::productVersion();
}

QString QQmlSystemInformation::prettyProductName() const
{
    return QSysInfo::prettyProductName();
}

QString QQmlSystemInformation::machineHostName() const
{
    return QSysInfo::machineHostName();
}

QByteArray QQmlSystemInformation::machineUniqueId() const
{
    return QSysInfo::machineUniqueId();
}

QByteArray QQmlSystemInformation::bootUniqueId() const
{
    return QSysInfo::bootUniqueId();
}

QT_END_NAMESPACE

#include "moc_qqmlsysteminformation_p.cpp"