0003-qqmlprofilerevent_p-needs-c-limits-inlcude-fixes-gcc.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From cc8d62f556c065d28a52e4b784b5d22f2cca3001 Mon Sep 17 00:00:00 2001
  2. From: Peter Seiderer <ps.report@gmx.net>
  3. Date: Thu, 22 Jul 2021 23:13:43 +0200
  4. Subject: [PATCH] qqmlprofilerevent_p: needs c++ limits inlcude (fixes gcc-11
  5. compile)
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=UTF-8
  8. Content-Transfer-Encoding: 8bit
  9. Fixes:
  10. In file included from qqmlprofilertypedevent_p.h:43,
  11. from qqmlprofilertypedevent.cpp:40:
  12. qqmlprofilerevent_p.h: In member function ‘void QQmlProfilerEvent::assignNumbers(const Container&)’:
  13. qqmlprofilerevent_p.h:314:65: error: ‘numeric_limits’ is not a member of ‘std’
  14. 314 | static_cast<quint16>(numbers.size()) : std::numeric_limits<quint16>::max();
  15. | ^~~~~~~~~~~~~~
  16. qqmlprofilerevent_p.h:314:87: error: expected primary-expression before ‘>’ token
  17. 314 | static_cast<quint16>(numbers.size()) : std::numeric_limits<quint16>::max();
  18. | ^
  19. qqmlprofilerevent_p.h:314:90: error: ‘::max’ has not been declared; did you mean ‘std::max’?
  20. 314 | static_cast<quint16>(numbers.size()) : std::numeric_limits<quint16>::max();
  21. | ^~~
  22. | std::max
  23. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  24. ---
  25. src/qmldebug/qqmlprofilerevent_p.h | 1 +
  26. 1 file changed, 1 insertion(+)
  27. diff --git a/src/qmldebug/qqmlprofilerevent_p.h b/src/qmldebug/qqmlprofilerevent_p.h
  28. index a7e37d1964..01b2f58f16 100644
  29. --- a/src/qmldebug/qqmlprofilerevent_p.h
  30. +++ b/src/qmldebug/qqmlprofilerevent_p.h
  31. @@ -48,6 +48,7 @@
  32. #include <QtCore/qmetatype.h>
  33. #include <initializer_list>
  34. +#include <limits>
  35. #include <type_traits>
  36. //
  37. --
  38. 2.32.0