summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-11-21 15:34:11 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-11-22 10:49:44 +0000
commite43eddc8799919d4e0270743d67a340e1b2aea3f (patch)
tree63cfc7f7e72104753c622252361e5354653bf243 /src
parent4abb08378b8568ba25d6a2d2bdd7b9825b870827 (diff)
downloadqtwebsockets-e43eddc8799919d4e0270743d67a340e1b2aea3f.tar.gz
Replace QT_HAS_INCLUDE() wrapper macro with __has_include()
Using wrappers for these macros is problematic when for example passing the -frewrite-includes flag to preprocess sources before shipping off to distcc or Icecream. It will also start producing warnings when compilers implement http://eel.is/c++draft/cpp.cond#7.sentence-2. See for example https://reviews.llvm.org/D49091 See qtbase change c3bd5ffdc8a3b459f18ba6e35fca93e29f3b0ab0. Change-Id: I79d15f92c4d1af3ae3cdd2c0c615dca36c761d1a Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/websockets/qwebsocketserver.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/websockets/qwebsocketserver.h b/src/websockets/qwebsocketserver.h
index 1ef7fbb..4dd04da 100644
--- a/src/websockets/qwebsocketserver.h
+++ b/src/websockets/qwebsocketserver.h
@@ -16,7 +16,7 @@
#include <QtNetwork/QSslError>
#endif
-#if QT_HAS_INCLUDE(<chrono>)
+#if __has_include(<chrono>)
#include <chrono>
#endif
@@ -54,7 +54,7 @@ public:
void setMaxPendingConnections(int numConnections);
int maxPendingConnections() const;
-#if QT_HAS_INCLUDE(<chrono>) || defined(Q_QDOC)
+#if __has_include(<chrono>) || defined(Q_QDOC)
void setHandshakeTimeout(std::chrono::milliseconds msec)
{
setHandshakeTimeout(int(msec.count()));