diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h index 972e2174d3f..3b99ef78b27 100644 --- a/src/corelib/text/qbytearray.h +++ b/src/corelib/text/qbytearray.h @@ -715,7 +715,7 @@ namespace Qt { inline namespace Literals { inline namespace StringLiterals { -inline QByteArray operator"" _ba(const char *str, size_t size) noexcept +inline QByteArray operator""_ba(const char *str, size_t size) noexcept { return QByteArray(QByteArrayData(nullptr, const_cast(str), qsizetype(size))); } @@ -728,7 +728,7 @@ inline namespace QtLiterals { #if QT_DEPRECATED_SINCE(6, 8) QT_DEPRECATED_VERSION_X_6_8("Use _ba from Qt::StringLiterals namespace instead.") -inline QByteArray operator"" _qba(const char *str, size_t size) noexcept +inline QByteArray operator""_qba(const char *str, size_t size) noexcept { return Qt::StringLiterals::operator""_ba(str, size); } diff --git a/src/corelib/text/qchar.h b/src/corelib/text/qchar.h index e9f0cf3346c..30a15f96a28 100644 --- a/src/corelib/text/qchar.h +++ b/src/corelib/text/qchar.h @@ -627,7 +627,7 @@ namespace Qt { inline namespace Literals { inline namespace StringLiterals { -constexpr inline QLatin1Char operator"" _L1(char ch) noexcept +constexpr inline QLatin1Char operator""_L1(char ch) noexcept { return QLatin1Char(ch); } diff --git a/src/corelib/text/qlatin1stringview.h b/src/corelib/text/qlatin1stringview.h index 257e7b30065..4a7bf357ed3 100644 --- a/src/corelib/text/qlatin1stringview.h +++ b/src/corelib/text/qlatin1stringview.h @@ -352,7 +352,7 @@ namespace Qt { inline namespace Literals { inline namespace StringLiterals { -constexpr inline QLatin1StringView operator"" _L1(const char *str, size_t size) noexcept +constexpr inline QLatin1StringView operator""_L1(const char *str, size_t size) noexcept { return {str, qsizetype(size)}; } diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h index b67ed099de0..c00885dab25 100644 --- a/src/corelib/text/qstring.h +++ b/src/corelib/text/qstring.h @@ -1470,7 +1470,7 @@ qsizetype erase_if(QString &s, Predicate pred) namespace Qt { inline namespace Literals { inline namespace StringLiterals { -inline QString operator"" _s(const char16_t *str, size_t size) noexcept +inline QString operator""_s(const char16_t *str, size_t size) noexcept { return QString(QStringPrivate(nullptr, const_cast(str), qsizetype(size))); } @@ -1483,7 +1483,7 @@ inline namespace QtLiterals { #if QT_DEPRECATED_SINCE(6, 8) QT_DEPRECATED_VERSION_X_6_8("Use _s from Qt::StringLiterals namespace instead.") -inline QString operator"" _qs(const char16_t *str, size_t size) noexcept +inline QString operator""_qs(const char16_t *str, size_t size) noexcept { return Qt::StringLiterals::operator""_s(str, size); }