Fix kmap2qmap build on OS X
authorSamuel Gaist <samuel.gaist@edeltech.ch>
Wed, 4 Mar 2015 20:16:50 +0000 (21:16 +0100)
committerSamuel Gaist <samuel.gaist@edeltech.ch>
Thu, 5 Mar 2015 08:38:01 +0000 (08:38 +0000)
Currently kmap2qmap fails to build on OS X (clang) This patch aims to
fix this.

Change-Id: I61c985dc7ad1f2486368c39aa976599d274942ab
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
src/kmap2qmap/main.cpp

index a3f7a39..9817f14 100644 (file)
@@ -395,9 +395,11 @@ static const int symbol_synonyms_size = sizeof(symbol_synonyms)/sizeof(symbol_sy
 
 // makes the generated array in --header mode a bit more human readable
 QT_BEGIN_NAMESPACE
-static bool operator<(const QEvdevKeyboardMap::Mapping &m1, const QEvdevKeyboardMap::Mapping &m2)
-{
-    return m1.keycode != m2.keycode ? m1.keycode < m2.keycode : m1.modifiers < m2.modifiers;
+namespace QEvdevKeyboardMap {
+    static bool operator<(const Mapping &m1, const Mapping &m2)
+    {
+        return m1.keycode != m2.keycode ? m1.keycode < m2.keycode : m1.modifiers < m2.modifiers;
+    }
 }
 QT_END_NAMESPACE