From cbaecba8dcca9f64fc8f613e876ee8a5b3ef008b Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 11 Jul 2023 16:34:46 +0200 Subject: [PATCH] Don't protect qstringbuilder.h indirect includes It's a) not needed, because qstringbuilder.h simply just defines op% and not op+ when these defines are not set and b) surprising for users that they have to include if they want to use op% without also setting one of these defines. Finally, it just throws readers of the code off the track for no good reason. So, drop the external guards for qtringbuilder.h in qstring.h and qstringconverter.h. Task-number: QTBUG-114208 Change-Id: I00b3e405d905d319437c32a7253b39de1625d096 Reviewed-by: Qt CI Bot Reviewed-by: Ivan Solovev Reviewed-by: Thiago Macieira Reviewed-by: Dennis Oberst (cherry picked from commit 15ff5bafa0cdb21134c6c4660206c16d26960da8) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/text/qstring.h | 2 -- src/corelib/text/qstringconverter.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h index f3c7ce10266..1ab4ed97874 100644 --- a/src/corelib/text/qstring.h +++ b/src/corelib/text/qstring.h @@ -1493,9 +1493,7 @@ inline QString operator"" _qs(const char16_t *str, size_t size) noexcept QT_END_NAMESPACE -#if defined(QT_USE_FAST_OPERATOR_PLUS) || defined(QT_USE_QSTRINGBUILDER) #include -#endif #ifdef Q_L1S_VIEW_IS_PRIMARY # undef Q_L1S_VIEW_IS_PRIMARY diff --git a/src/corelib/text/qstringconverter.h b/src/corelib/text/qstringconverter.h index 373c1ad1e91..e12516966a8 100644 --- a/src/corelib/text/qstringconverter.h +++ b/src/corelib/text/qstringconverter.h @@ -13,9 +13,7 @@ #include #include -#if defined(QT_USE_FAST_OPERATOR_PLUS) || defined(QT_USE_QSTRINGBUILDER) #include -#endif QT_BEGIN_NAMESPACE