From bafb8220b4968b25f8055d93f0c6bf9f2d71dab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Tue, 22 Oct 2019 16:49:27 +0200 Subject: Disable Clang warning for 'using namespace' in qtextstream.h This header file intentionally puts a 'using namespace' into the global namespace, the artful cleverness of which Clang doesn't properly appreciate. Teach Clang a lesson by disabling the warning. Change-Id: I9754ac5fc9d4c53654854082e1145d8b5fef186d Reviewed-by: Allan Sandfeld Jensen --- src/corelib/serialization/qtextstream.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/corelib/serialization/qtextstream.h b/src/corelib/serialization/qtextstream.h index 4efa84f1f1..935ec16536 100644 --- a/src/corelib/serialization/qtextstream.h +++ b/src/corelib/serialization/qtextstream.h @@ -279,9 +279,12 @@ namespace Qt { using namespace QTextStreamFunctions; } +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG("-Wheader-hygiene") // We use 'using namespace' as that doesn't cause // conflicting definitions compiler errors. using namespace QTextStreamFunctions; +QT_WARNING_POP #endif // QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && !defined(Q_QDOC) inline QTextStreamManipulator qSetFieldWidth(int width) -- cgit v1.2.3