summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2019-10-22 16:49:27 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2019-10-25 13:05:07 +0200
commitbafb8220b4968b25f8055d93f0c6bf9f2d71dab3 (patch)
tree24ebcd0e643e7e08fee0732ae22386eeb2d3e797
parent43f64b4dc810cc5f7877d57cc095d0fa16c8c26b (diff)
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 <allan.jensen@qt.io>
-rw-r--r--src/corelib/serialization/qtextstream.h3
1 files changed, 3 insertions, 0 deletions
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)