summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/systeminfo.cpp
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2023-11-14 13:14:03 +0200
committerKatja Marttila <katja.marttila@qt.io>2023-11-22 10:22:41 +0200
commita771d88f321ecf2d3f2d97aaf0e3b4fc45e55f0a (patch)
tree8c9b1924fd670548ded65abc3f511efa1ae0cd27 /src/libs/installer/systeminfo.cpp
parente14e9f072fb1d269c6be22ef98678ec589aeda0c (diff)
Add buildCpuArchitecture() to systemInfo
To access buildCpuArchitecture from script Task-number: QTIFW-3224 Change-Id: I02086f7d3e064fe53d6fa9322b8832110c40c6b1 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src/libs/installer/systeminfo.cpp')
-rw-r--r--src/libs/installer/systeminfo.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/libs/installer/systeminfo.cpp b/src/libs/installer/systeminfo.cpp
index 6a1976c4a..0b9b00500 100644
--- a/src/libs/installer/systeminfo.cpp
+++ b/src/libs/installer/systeminfo.cpp
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2023 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
@@ -55,6 +55,7 @@ SystemInfo::SystemInfo(QObject *parent) : QObject(parent)
\list
\li "i386"
\li "x86_64"
+ \li "arm64"
\endlist
\note This function depends on what the OS will report and may not detect the actual CPU
@@ -62,7 +63,7 @@ SystemInfo::SystemInfo(QObject *parent) : QObject(parent)
OS running on a 64-bit CPU is usually unable to determine whether the CPU is actually capable
of running 64-bit programs.
- \sa QSysInfo::currentCpuArchitecture()
+ \sa QSysInfo::currentCpuArchitecture() \sa buildCpuArchitecture()
*/
QString SystemInfo::currentCpuArchitecture() const
{
@@ -70,6 +71,29 @@ QString SystemInfo::currentCpuArchitecture() const
}
/*!
+ \property SystemInfo::buildCpuArchitecture
+
+ The architecture of the CPU that the application was compiled for, in text format.
+
+ Possible values include:
+ \list
+ \li "i386"
+ \li "x86_64"
+ \li "arm64"
+ \endlist
+
+ \note Note that this may not match the actual CPU that the application is running on if
+ there's an emulation layer or if the CPU supports multiple architectures (like x86-64
+ processors supporting i386 applications). To detect that, use \c installer.currentCpuArchitecture()
+
+ \sa QSysInfo::buildCpuArchitecture() \sa currentCpuArchitecture()
+*/
+QString SystemInfo::buildCpuArchitecture() const
+{
+ return QSysInfo::buildCpuArchitecture();
+}
+
+/*!
\property SystemInfo::kernelType
The type of the operating system kernel the installer was compiled for. It is also the