0034-Fix-kmap2qmap-build-with-clang.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. From: Samuel Gaist <samuel.gaist@edeltech.ch>
  2. Date: Wed, 4 Mar 2015 20:16:50 +0000 (+0100)
  3. Subject: Fix kmap2qmap build on OS X
  4. X-Git-Tag: v5.4.2~6
  5. X-Git-Url: https://codereview.qt-project.org/gitweb?p=qt%2Fqttools.git;a=commitdiff_plain;h=cf196a2565235f649b88fac55b53270bea23458d;hp=3070815a24239bd0f469bfeb8d0a1f091974e28e
  6. Fix kmap2qmap build on OS X
  7. Currently kmap2qmap fails to build on OS X (clang) This patch aims to
  8. fix this.
  9. Change-Id: I61c985dc7ad1f2486368c39aa976599d274942ab
  10. Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
  11. ---
  12. Upstream-Status: Backport
  13. Index: qt-everywhere-opensource-src-4.8.7/tools/kmap2qmap/main.cpp
  14. ===================================================================
  15. --- qt-everywhere-opensource-src-4.8.7.orig/tools/kmap2qmap/main.cpp
  16. +++ qt-everywhere-opensource-src-4.8.7/tools/kmap2qmap/main.cpp
  17. @@ -385,9 +385,11 @@ static const int symbol_synonyms_size =
  18. // makes the generated array in --header mode a bit more human readable
  19. QT_BEGIN_NAMESPACE
  20. -static bool operator<(const QWSKeyboard::Mapping &m1, const QWSKeyboard::Mapping &m2)
  21. -{
  22. - return m1.keycode != m2.keycode ? m1.keycode < m2.keycode : m1.modifiers < m2.modifiers;
  23. +namespace QWSKeyboard {
  24. + static bool operator<(const Mapping &m1, const Mapping &m2)
  25. + {
  26. + return m1.keycode != m2.keycode ? m1.keycode < m2.keycode : m1.modifiers < m2.modifiers;
  27. + }
  28. }
  29. QT_END_NAMESPACE