summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qglobal.cpp373
-rw-r--r--src/corelib/global/qlogging.cpp24
-rw-r--r--src/corelib/global/qlogging.h4
-rw-r--r--src/corelib/global/qsysinfo.h11
4 files changed, 267 insertions, 145 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 66f2923370..fb7bd9fa01 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -2051,22 +2051,14 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
#if defined(Q_OS_UNIX)
# if (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || defined(Q_OS_FREEBSD)
# define USE_ETC_OS_RELEASE
-# endif
struct QUnixOSVersion
{
- // from uname(2)
- QString sysName;
- QString sysNameLower;
- QString sysRelease;
-
-# if !defined(Q_OS_ANDROID) && !defined(Q_OS_BLACKBERRY) && !defined(Q_OS_MAC)
- // from /etc/os-release or guessed
- QString versionIdentifier; // ${ID}_$VERSION_ID
- QString versionText; // $PRETTY_NAME
-# endif
+ // from /etc/os-release
+ QString productType; // $ID
+ QString productVersion; // $VERSION_ID
+ QString prettyName; // $PRETTY_NAME
};
-# ifdef USE_ETC_OS_RELEASE
static QString unquote(const char *begin, const char *end)
{
if (*begin == '"') {
@@ -2089,7 +2081,6 @@ static bool readEtcOsRelease(QUnixOSVersion &v)
return false;
}
- QString partialIdentifier;
QByteArray buffer(sbuf.st_size, Qt::Uninitialized);
buffer.resize(qt_safe_read(fd, buffer.data(), sbuf.st_size));
qt_safe_close(fd);
@@ -2107,16 +2098,14 @@ static bool readEtcOsRelease(QUnixOSVersion &v)
if (!eol)
eol = end - 1;
+ // note: we're doing a binary search here, so comparison
+ // must always be sorted
int cmp = strncmp(ptr, idString, strlen(idString));
if (cmp < 0)
continue;
if (cmp == 0) {
ptr += strlen(idString);
- QString id = unquote(ptr, eol);
- if (partialIdentifier.isNull())
- partialIdentifier = id;
- else
- v.versionIdentifier = id + QLatin1Char('_') + partialIdentifier;
+ v.productType = unquote(ptr, eol);
continue;
}
@@ -2125,7 +2114,7 @@ static bool readEtcOsRelease(QUnixOSVersion &v)
continue;
if (cmp == 0) {
ptr += strlen(prettyNameString);
- v.versionText = unquote(ptr, eol);
+ v.prettyName = unquote(ptr, eol);
continue;
}
@@ -2134,11 +2123,7 @@ static bool readEtcOsRelease(QUnixOSVersion &v)
continue;
if (cmp == 0) {
ptr += strlen(versionIdString);
- QString id = unquote(ptr, eol);
- if (partialIdentifier.isNull())
- partialIdentifier = id;
- else
- v.versionIdentifier = partialIdentifier + QLatin1Char('_') + id;
+ v.productVersion = unquote(ptr, eol);
continue;
}
}
@@ -2146,34 +2131,6 @@ static bool readEtcOsRelease(QUnixOSVersion &v)
return true;
}
# endif // USE_ETC_OS_RELEASE
-
-static QUnixOSVersion detectUnixVersion()
-{
- QUnixOSVersion v;
- struct utsname u;
- if (uname(&u) != -1) {
- v.sysName = QString::fromLatin1(u.sysname);
- v.sysNameLower = v.sysName.toLower();
- v.sysRelease = QString::fromLatin1(u.release);
- } else {
- v.sysName = QLatin1String("Detection failed");
- // leave sysNameLower & sysRelease unset
- }
-
-# if !defined(Q_OS_ANDROID) && !defined(Q_OS_BLACKBERRY) && !defined(Q_OS_MAC)
-# ifdef USE_ETC_OS_RELEASE
- if (readEtcOsRelease(v))
- return v;
-# endif
-
- if (!v.sysNameLower.isEmpty()) {
- // will produce "qnx_6.5" or "sunos_5.9"
- v.versionIdentifier = v.sysNameLower + QLatin1Char('_') + v.sysRelease;
- }
-# endif
-
- return v;
-}
#endif // Q_OS_UNIX
@@ -2183,7 +2140,8 @@ static QUnixOSVersion detectUnixVersion()
Returns the architecture of the CPU that Qt was compiled for, in text
format. 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).
+ architectures (like x86-64 processors supporting i386 applications). To
+ detect that, use currentCpuArchitecture().
Values returned by this function are stable and will not change over time,
so applications can rely on the returned value as an identifier, except
@@ -2199,7 +2157,7 @@ static QUnixOSVersion detectUnixVersion()
\li "sparc"
\endlist
- \sa QSysInfo::buildAbi()
+ \sa QSysInfo::buildAbi(), QSysInfo::currentCpuArchitecture()
*/
QString QSysInfo::buildCpuArchitecture()
{
@@ -2209,6 +2167,93 @@ QString QSysInfo::buildCpuArchitecture()
/*!
\since 5.4
+ Returns the architecture of the CPU that the application is running on, in
+ text format. Note that this function depends on what the OS will report and
+ may not detect the actual CPU architecture if the OS hides that information
+ or is unable to provide it. For example, a 32-bit OS running on a 64-bit
+ CPU is usually unable to determine the CPU is actually capable of running
+ 64-bit programs.
+
+ Values returned by this function are mostly stable: an attempt will be made
+ to ensure that they stay constant over time and match the values returned
+ by QSysInfo::builldCpuArchitecture(). However, due to the nature of the
+ operating system functions being used, there may be discrepancies.
+
+ Typical returned values are (note: list not exhaustive):
+ \list
+ \li "arm"
+ \li "i386"
+ \li "mips"
+ \li "x86_64"
+ \li "power"
+ \li "sparc"
+ \endlist
+
+ \sa QSysInfo::buildAbi(), QSysInfo::buildCpuArchitecture()
+ */
+QString QSysInfo::currentCpuArchitecture()
+{
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+ // We don't need to catch all the CPU architectures in this function;
+ // only those where the host CPU might be different than the build target
+ // (usually, 64-bit platforms).
+ SYSTEM_INFO info;
+ GetNativeSystemInfo(&info);
+ switch (info.wProcessorArchitecture) {
+# ifdef PROCESSOR_ARCHITECTURE_AMD64
+ case PROCESSOR_ARCHITECTURE_AMD64:
+ return QStringLiteral("x86_64");
+# endif
+# ifdef PROCESSOR_ARCHITECTURE_IA32_ON_WIN64
+ case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64:
+# endif
+ case PROCESSOR_ARCHITECTURE_IA64:
+ return QStringLiteral("ia64");
+ }
+#elif defined(Q_OS_UNIX)
+ // we could use detectUnixVersion() above, but we only need a field no other function does
+ struct utsname u;
+ if (uname(&u) != -1) {
+ // the use of QT_BUILD_INTERNAL here is simply to ensure all branches build
+ // as we don't often build on some of the less common platforms
+# if defined(Q_PROCESSOR_ARM) || defined(QT_BUILD_INTERNAL)
+ if (strcmp(u.machine, "aarch64") == 0)
+ return QStringLiteral("arm64");
+ if (strncmp(u.machine, "armv", 4) == 0)
+ return QStringLiteral("arm");
+# endif
+# if defined(Q_PROCESSOR_POWER) || defined(QT_BUILD_INTERNAL)
+ // harmonize "powerpc" and "ppc" to "power"
+ if (strncmp(u.machine, "ppc", 3) == 0)
+ return QLatin1String("power") + QLatin1String(u.machine + 3);
+ if (strncmp(u.machine, "powerpc", 7) == 0)
+ return QLatin1String("power") + QLatin1String(u.machine + 7);
+ if (strcmp(u.machine, "Power Macintosh") == 0)
+ return QLatin1String("power");
+# endif
+# if defined(Q_PROCESSOR_SPARC) || defined(QT_BUILD_INTERNAL)
+ // Solaris psrinfo -v says "sparcv9", but uname -m says "sun4u"
+ // Linux says "sparc64"
+ if (strcmp(u.machine, "sun4u") == 0 || strcmp(u.machine, "sparc64") == 0)
+ return QStringLiteral("sparcv9");
+ if (strcmp(u.machine, "sparc32") == 0)
+ return QStringLiteral("sparc");
+# endif
+# if defined(Q_PROCESSOR_X86) || defined(QT_BUILD_INTERNAL)
+ // harmonize all "i?86" to "i386"
+ if (strlen(u.machine) == 4 && u.machine[0] == 'i'
+ && u.machine[2] == '8' && u.machine[3] == '6')
+ return QStringLiteral("i386");
+# endif
+ return QString::fromLatin1(u.machine);
+ }
+#endif
+ return buildCpuArchitecture();
+}
+
+/*!
+ \since 5.4
+
Returns the full architecture string that Qt was compiled for. This string
is useful for identifying different, incompatible builds. For example, it
can be used as an identifier to request an upgrade package from a server.
@@ -2261,17 +2306,88 @@ static QString unknownText()
/*!
\since 5.4
- Returns the type of the operating system Qt was compiled for. It's also the
- operating system the application is running on, unless the host operating
- system is running a form of compatibility layer.
+ Returns the type of the operating system kernel Qt was compiled for. It's
+ also the kernel the application is running on, unless the host operating
+ system is running a form of compatibility or virtualization layer.
+
+ Values returned by this function are stable and will not change over time,
+ so applications can rely on the returned value as an identifier, except
+ that new OS kernel types may be added over time.
+
+ On Windows, this function returns the type of Windows kernel, like "wince"
+ or "winnt". On Unix systems, it returns the same as the output of \c{uname
+ -s} (lowercased).
+
+ Note that this function may return surprising values: it returns "linux"
+ for all operating systems running Linux (including Android), "qnx" for all
+ operating systems running QNX (including BlackBerry 10), "freebsd" for
+ Debian/kFreeBSD, and "darwin" for OS X and iOS. For information on the type
+ of product the application is running on, see productType().
+
+ \sa QFileSelector, kernelVersion(), productType(), productVersion(), prettyProductName()
+*/
+QString QSysInfo::kernelType()
+{
+#if defined(Q_OS_WINCE)
+ return QStringLiteral("wince");
+#elif defined(Q_OS_WIN)
+ return QStringLiteral("winnt");
+#elif defined(Q_OS_UNIX)
+ struct utsname u;
+ if (uname(&u) == 0)
+ return QString::fromLatin1(u.sysname).toLower();
+#endif
+ return unknownText();
+}
+
+/*!
+ \since 5.4
+
+ Returns the release version of the operating system kernel. On Windows, it
+ returns the version of the NT or CE kernel. On Unix systems, including
+ Android, BlackBerry and OS X, it returns the same as the \c{uname -r}
+ command would return.
+
+ If the version could not be determined, this function may return an empty
+ string.
+
+ \sa kernelType(), productType(), productVersion(), prettyProductName()
+*/
+QString QSysInfo::kernelVersion()
+{
+#ifdef Q_OS_WINRT
+ // TBD
+ return QString();
+#elif defined(Q_OS_WIN)
+ const OSVERSIONINFO osver = winOsVersion();
+ return QString::number(int(osver.dwMajorVersion)) + QLatin1Char('.') + QString::number(int(osver.dwMinorVersion))
+ + QLatin1Char('.') + QString::number(int(osver.dwBuildNumber));
+#else
+ struct utsname u;
+ if (uname(&u) == 0)
+ return QString::fromLatin1(u.release);
+ return QString();
+#endif
+}
+
+
+/*!
+ \since 5.4
+
+ Returns the product name of the operating system this application is
+ running in. If the application is running on some sort of emulation or
+ virtualization layer (such as WINE on a Unix system), this function will
+ inspect the emulation / virtualization layer.
Values returned by this function are stable and will not change over time,
so applications can rely on the returned value as an identifier, except
that new OS types may be added over time.
- \b{Android note}: this function returns "android" for Linux systems running
- Android userspace, notably when using the Bionic library. For all other
- Linux systems, regardless of C library being used, it returns "linux".
+ \b{Linux and Android note}: this function returns "android" for Linux
+ systems running Android userspace, notably when using the Bionic library.
+ For all other Linux systems, regardless of C library being used, it tries
+ to determine the distribution name and returns that. If determining the
+ distribution name failed, it returns "unknown".
\b{BlackBerry note}: this function returns "blackberry" for QNX systems
running the BlackBerry userspace, but "qnx" for all other QNX-based
@@ -2281,13 +2397,18 @@ static QString unknownText()
systems, "ios" for iOS systems and "darwin" in case the system could not be
determined.
- \b{FreeBSD note}: this function returns "freebsd" for systems running the
- FreeBSD kernel, regardless of whether the userspace runs the traditional
- BSD code or whether it's the GNU system (Debian GNU/kFreeBSD).
+ \b{FreeBSD note}: this function returns "debian" for Debian/kFreeBSD and
+ "unknown" otherwise.
+
+ \b{Windows note}: this function returns "winphone" for builds for Windows
+ Phone, "winrt" for WinRT builds, "wince" for Windows CE and Embedded
+ Compact builds, and "windows" for normal desktop builds.
+
+ For other Unix-type systems, this function usually returns "unknown".
- \sa QFileSelector, prettyOsName()
+ \sa QFileSelector, kernelType(), kernelVersion(), productVersion(), prettyProductName()
*/
-QString QSysInfo::osType()
+QString QSysInfo::productType()
{
// similar, but not identical to QFileSelectorPrivate::platformSelectors
#if defined(Q_OS_WINPHONE)
@@ -2306,8 +2427,6 @@ QString QSysInfo::osType()
#elif defined(Q_OS_ANDROID)
return QStringLiteral("android");
-#elif defined(Q_OS_LINUX)
- return QStringLiteral("linux");
#elif defined(Q_OS_IOS)
return QStringLiteral("ios");
@@ -2316,12 +2435,11 @@ QString QSysInfo::osType()
#elif defined(Q_OS_DARWIN)
return QStringLiteral("darwin");
-#elif defined(Q_OS_FREEBSD_KERNEL)
- return QStringLiteral("freebsd");
-#elif defined(Q_OS_UNIX)
- QUnixOSVersion unixOsVersion = detectUnixVersion();
- if (!unixOsVersion.sysNameLower.isEmpty())
- return unixOsVersion.sysNameLower;
+#elif defined(USE_ETC_OS_RELEASE) // Q_OS_UNIX
+ QUnixOSVersion unixOsVersion;
+ readEtcOsRelease(unixOsVersion);
+ if (!unixOsVersion.productType.isEmpty())
+ return unixOsVersion.productType;
#endif
return unknownText();
}
@@ -2329,19 +2447,28 @@ QString QSysInfo::osType()
/*!
\since 5.4
- Returns the version of the host operating system in string form. For both
- OS X and iOS systems, this returns just the main OS version, such as "7.1",
- "10.6" and "10.7". For Windows systems, this returns the same types
- detected by winVersion(), without the word "Windows". For Linux-based
- systems, it will try to determine the Linux distribution and version.
+ Returns the product version of the operating system in string form. If the
+ version could not be determined, this function returns "unknown".
- If the version could not be determined, this function returns "unknown" for
- Windows and a combination of the osType() and osKernelVersion() for Unix
- systems.
+ It will return the Android, BlackBerry, iOS, OS X, Windows full-product
+ versions on those systems. In particular, on OS X, iOS and Windows, the
+ returned string is similar to the macVersion() or windowsVersion() enums.
+
+ On Linux systems, it will try to determine the distribution version and will
+ return that. This is also done on Debian/kFreeBSD, so this function will
+ return Debian version in that case.
+
+ In all other Unix-type systems, this function always returns "unknown".
- \sa prettyOsName(), osKernelVersion()
+ \note The version string returned from this function is only guaranteed to
+ be orderable on Android, BlackBerry, OS X and iOS. On Windows, some Windows
+ versions are text ("XP" and "Vista", for example). On Linux, the version of
+ the distribution may jump unexpectedly, please refer to the distribution's
+ documentation for versioning practices.
+
+ \sa kernelType(), kernelVersion(), productType(), prettyProductName()
*/
-QString QSysInfo::osVersion()
+QString QSysInfo::productVersion()
{
#if defined(Q_OS_IOS)
int major = (int(MacintoshVersion) >> 4) & 0xf;
@@ -2378,10 +2505,11 @@ QString QSysInfo::osVersion()
deviceinfo_free_details(&deviceInfo);
return bbVersion;
}
-#elif defined(Q_OS_UNIX)
- QUnixOSVersion unixOsVersion = detectUnixVersion();
- if (!unixOsVersion.versionIdentifier.isEmpty())
- return unixOsVersion.versionIdentifier;
+#elif defined(USE_ETC_OS_RELEASE) // Q_OS_UNIX
+ QUnixOSVersion unixOsVersion;
+ readEtcOsRelease(unixOsVersion);
+ if (!unixOsVersion.productVersion.isEmpty())
+ return unixOsVersion.productVersion;
#endif
// fallback
@@ -2391,17 +2519,21 @@ QString QSysInfo::osVersion()
/*!
\since 5.4
- Returns a prettier form of osVersion(), containing other information like
- the operating system type, codenames and other information. The result of
- this function is suitable for displaying to the user, but not for long-term
- storage, as the string may change with updates to Qt.
+ Returns a prettier form of productType() and productVersion(), containing
+ other tokens like the operating system type, codenames and other
+ information. The result of this function is suitable for displaying to the
+ user, but not for long-term storage, as the string may change with updates
+ to Qt.
- \sa osType(), osVersion()
+ If productType() is "unknown", this function will instead use the
+ kernelType() and kernelVersion() functions.
+
+ \sa kernelType(), kernelVersion(), productType(), productVersion()
*/
-QString QSysInfo::prettyOsName()
+QString QSysInfo::prettyProductName()
{
#if defined(Q_OS_IOS)
- return QLatin1String("iOS ") + osVersion();
+ return QLatin1String("iOS ") + productVersion();
#elif defined(Q_OS_OSX)
// get the known codenames
const char *basename = 0;
@@ -2435,55 +2567,30 @@ QString QSysInfo::prettyOsName()
break;
}
if (basename)
- return QLatin1String(basename) + osVersion() + QLatin1Char(')');
+ return QLatin1String(basename) + productVersion() + QLatin1Char(')');
// a future version of OS X
- return QLatin1String("OS X ") + osVersion();
+ return QLatin1String("OS X ") + productVersion();
#elif defined(Q_OS_WINPHONE)
return QLatin1String("Windows Phone ") + QLatin1String(winVer_helper());
#elif defined(Q_OS_WIN)
return QLatin1String("Windows ") + QLatin1String(winVer_helper());
#elif defined(Q_OS_ANDROID)
- return QLatin1String("Android ") + osVersion();
+ return QLatin1String("Android ") + productVersion();
#elif defined(Q_OS_BLACKBERRY)
- return QLatin1String("BlackBerry ") + osVersion();
+ return QLatin1String("BlackBerry ") + productVersion();
#elif defined(Q_OS_UNIX)
- QUnixOSVersion unixOsVersion = detectUnixVersion();
- if (unixOsVersion.versionText.isEmpty())
- return unixOsVersion.sysName;
- else
- return unixOsVersion.sysName + QLatin1String(" (") + unixOsVersion.versionText + QLatin1Char(')');
-#else
- return unknownText();
-#endif
-}
-
-/*!
- \since 5.4
-
- Returns the release version of the operating system. On Windows, it returns
- the version of the kernel, which does not match the version number of the
- OS (e.g., Windows 8 has NT kernel version 6.2). On Unix systems, including
- Android, BlackBerry and OS X, it returns the same as the \c{uname -r}
- command would return.
-
- If the version could not be determined, this function may return an empty
- string.
-
- \sa osVersion(), prettyOsName()
-*/
-QString QSysInfo::osKernelVersion()
-{
-#ifdef Q_OS_WINRT
- // TBD
- return QString();
-#elif defined(Q_OS_WIN)
- const OSVERSIONINFO osver = winOsVersion();
- return QString::number(int(osver.dwMajorVersion)) + QLatin1Char('.') + QString::number(int(osver.dwMinorVersion))
- + QLatin1Char('.') + QString::number(int(osver.dwBuildNumber));
-#else
- return detectUnixVersion().sysRelease;
+# ifdef USE_ETC_OS_RELEASE
+ QUnixOSVersion unixOsVersion;
+ readEtcOsRelease(unixOsVersion);
+ if (!unixOsVersion.prettyName.isEmpty())
+ return unixOsVersion.prettyName;
+# endif
+ struct utsname u;
+ if (uname(&u) == 0)
+ return QString::fromLatin1(u.sysname) + QLatin1Char(' ') + QString::fromLatin1(u.release);
#endif
+ return unknownText();
}
/*!
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 847b7cb4c0..013efec3d5 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Copyright (C) 2014 Olivier Goffart <ogoffart@woboq.com>
** Contact: http://www.qt-project.org/legal
**
@@ -1052,10 +1052,20 @@ static void slog2_default_handler(QtMsgType msgType, const char *message)
Q_GLOBAL_STATIC(QMessagePattern, qMessagePattern)
/*!
- \internal
-*/
-Q_CORE_EXPORT QString qMessageFormatString(QtMsgType type, const QMessageLogContext &context,
- const QString &str)
+ \relates <QtGlobal>
+ \since 5.4
+
+ Generates a formatted string out of the \a type, \a context, \a str arguments.
+
+ qFormatLogMessage returns a QString that is formatted according to the current message pattern.
+ It can be used by custom message handlers to format output similar to Qt's default message
+ handler.
+
+ The function is thread-safe.
+
+ \sa qInstallMessageHandler(), qSetMessagePattern()
+ */
+QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, const QString &str)
{
QString message;
@@ -1278,7 +1288,7 @@ static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &con
bool toConsole;
};
- QString logMessage = qMessageFormatString(type, context, buf);
+ QString logMessage = qFormatLogMessage(type, context, buf);
#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB)
if (!qWinLogToStderr()) {
@@ -1583,7 +1593,7 @@ void qErrnoWarning(int code, const char *msg, ...)
environment variable; if both qSetMessagePattern() is called and QT_MESSAGE_PATTERN is
set, the environment variable takes precedence.
- qSetMessagePattern() has no effect if a custom message handler is installed.
+ Custom message handlers can use qFormatLogMessage() to take \a pattern into account.
\sa qInstallMessageHandler(), {Debugging Techniques}
*/
diff --git a/src/corelib/global/qlogging.h b/src/corelib/global/qlogging.h
index 043f799414..fe965ec7f5 100644
--- a/src/corelib/global/qlogging.h
+++ b/src/corelib/global/qlogging.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -167,6 +167,8 @@ typedef void (*QtMessageHandler)(QtMsgType, const QMessageLogContext &, const QS
Q_CORE_EXPORT QtMessageHandler qInstallMessageHandler(QtMessageHandler);
Q_CORE_EXPORT void qSetMessagePattern(const QString &messagePattern);
+Q_CORE_EXPORT QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context,
+ const QString &buf);
QT_END_NAMESPACE
#endif // QLOGGING_H
diff --git a/src/corelib/global/qsysinfo.h b/src/corelib/global/qsysinfo.h
index 45d54c3873..3a443938f9 100644
--- a/src/corelib/global/qsysinfo.h
+++ b/src/corelib/global/qsysinfo.h
@@ -167,11 +167,14 @@ public:
#endif
static QString buildCpuArchitecture();
+ static QString currentCpuArchitecture();
static QString buildAbi();
- static QString osType();
- static QString osKernelVersion();
- static QString osVersion();
- static QString prettyOsName();
+
+ static QString kernelType();
+ static QString kernelVersion();
+ static QString productType();
+ static QString productVersion();
+ static QString prettyProductName();
};
QT_END_NAMESPACE