summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-07-27 16:39:07 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2020-09-14 09:47:51 +0200
commit533df067e9869522b348d172fee85b2a501540b6 (patch)
tree6e8472798e855a5206f357317f9267b8042cfffe /src/corelib/global
parentc4378b8620453cd4bfaf12e45f623b3bdc1038e2 (diff)
Purge Q_{STDLIB,COMPILER}_UNICODE_STRINGS
These were now always defined, hence redundant. Leave the #define in place so that we can verify we actually do always define it, in a #else of an existing #if check on it. Change-Id: Iea4c3dbc8f9982268bcf81da5ef17fe2ebf5c462 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qcompilerdetection.h4
-rw-r--r--src/corelib/global/qglobal.cpp4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index f88640dd81..a140e78739 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2016 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
@@ -991,6 +991,8 @@
#ifdef Q_COMPILER_UNICODE_STRINGS
# define Q_STDLIB_UNICODE_STRINGS
+#elif defined(__cplusplus)
+# error "Qt6 requires Unicode string support in both the compiler and the standard library"
#endif
#ifdef __cplusplus
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 4f51a0e259..39f36bb3cc 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -2481,15 +2481,11 @@ QString QSysInfo::currentCpuArchitecture()
*/
QString QSysInfo::buildAbi()
{
-#ifdef Q_COMPILER_UNICODE_STRINGS
// ARCH_FULL is a concatenation of strings (incl. ARCH_PROCESSOR), which breaks
// QStringLiteral on MSVC. Since the concatenation behavior we want is specified
// the same C++11 paper as the Unicode strings, we'll use that macro and hope
// that Microsoft implements the new behavior when they add support for Unicode strings.
return QStringLiteral(ARCH_FULL);
-#else
- return QLatin1String(ARCH_FULL);
-#endif
}
static QString unknownText()