summaryrefslogtreecommitdiffstats
path: root/src/corelib/text
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/text
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/text')
-rw-r--r--src/corelib/text/qchar.h4
-rw-r--r--src/corelib/text/qstring.h4
-rw-r--r--src/corelib/text/qstringbuilder.h4
3 files changed, 1 insertions, 11 deletions
diff --git a/src/corelib/text/qchar.h b/src/corelib/text/qchar.h
index fd9a4728c8..5d807d97a3 100644
--- a/src/corelib/text/qchar.h
+++ b/src/corelib/text/qchar.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -102,9 +102,7 @@ public:
constexpr QChar(int rc) noexcept : ucs(char16_t(rc & 0xffff)) {}
constexpr QChar(SpecialCharacter s) noexcept : ucs(char16_t(s)) {} // implicit
constexpr QChar(QLatin1Char ch) noexcept : ucs(ch.unicode()) {} // implicit
-#if defined(Q_COMPILER_UNICODE_STRINGS)
constexpr QChar(char16_t ch) noexcept : ucs(ch) {} // implicit
-#endif
#if defined(Q_OS_WIN)
static_assert(sizeof(wchar_t) == sizeof(char16_t));
#endif
diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h
index 76ac8b1119..f6c843b17a 100644
--- a/src/corelib/text/qstring.h
+++ b/src/corelib/text/qstring.h
@@ -905,12 +905,10 @@ public:
static inline QString fromStdWString(const std::wstring &s);
inline std::wstring toStdWString() const;
-#if defined(Q_STDLIB_UNICODE_STRINGS) || defined(Q_QDOC)
static inline QString fromStdU16String(const std::u16string &s);
inline std::u16string toStdU16String() const;
static inline QString fromStdU32String(const std::u32string &s);
inline std::u32string toStdU32String() const;
-#endif
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
static QString fromCFString(CFStringRef string);
@@ -1380,7 +1378,6 @@ inline std::wstring QString::toStdWString() const
inline QString QString::fromStdWString(const std::wstring &s)
{ return fromWCharArray(s.data(), int(s.size())); }
-#if defined(Q_STDLIB_UNICODE_STRINGS)
inline QString QString::fromStdU16String(const std::u16string &s)
{ return fromUtf16(s.data(), int(s.size())); }
@@ -1398,7 +1395,6 @@ inline std::u32string QString::toStdU32String() const
u32str.resize(len);
return u32str;
}
-#endif
#if !defined(QT_NO_DATASTREAM) || (defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE))
Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QString &);
diff --git a/src/corelib/text/qstringbuilder.h b/src/corelib/text/qstringbuilder.h
index d488b962f0..278e402aee 100644
--- a/src/corelib/text/qstringbuilder.h
+++ b/src/corelib/text/qstringbuilder.h
@@ -187,7 +187,6 @@ template <> struct QConcatenable<char> : private QAbstractConcatenable
{ *out++ = c; }
};
-#if defined(Q_COMPILER_UNICODE_STRINGS)
template <> struct QConcatenable<char16_t> : private QAbstractConcatenable
{
typedef char16_t type;
@@ -197,7 +196,6 @@ template <> struct QConcatenable<char16_t> : private QAbstractConcatenable
static inline void appendTo(char16_t c, QChar *&out)
{ *out++ = c; }
};
-#endif
template <> struct QConcatenable<QLatin1Char>
{
@@ -329,7 +327,6 @@ template <> struct QConcatenable<char *> : QConcatenable<const char*>
typedef char *type;
};
-#if defined(Q_COMPILER_UNICODE_STRINGS)
template <int N> struct QConcatenable<const char16_t[N]> : private QAbstractConcatenable
{
using type = const char16_t[N];
@@ -367,7 +364,6 @@ template <> struct QConcatenable<char16_t *> : QConcatenable<const char16_t*>
{
typedef char16_t *type;
};
-#endif // UNICODE_STRINGS
template <> struct QConcatenable<QByteArray> : private QAbstractConcatenable
{