OSDN Git Service

FakeVim: Fix Ctrl+ shortcuts on Mac.
authorcon <qtc-committer@nokia.com>
Thu, 31 Mar 2011 08:16:34 +0000 (10:16 +0200)
committercon <qtc-committer@nokia.com>
Thu, 31 Mar 2011 08:17:02 +0000 (10:17 +0200)
Wouldn't work if there also was a non-ctrl shortcut for the same key.

Task-number: QTCREATORBUG-3928
Reviewed-by: hjk
src/plugins/fakevim/fakevimhandler.cpp

index 824856c..81cc258 100644 (file)
@@ -409,7 +409,13 @@ public:
 
     bool is(int c) const
     {
-        return m_xkey == c && m_modifiers != Qt::ControlModifier;
+        return m_xkey == c && m_modifiers !=
+#ifdef Q_WS_MAC
+                Qt::MetaModifier
+#else
+                Qt::ControlModifier
+#endif
+        ;
     }
 
     bool isControl(int c) const