summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qkeysequence.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qkeysequence.cpp')
-rw-r--r--src/gui/kernel/qkeysequence.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index 9464d979321..16324b3659c 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -60,6 +60,8 @@
#include <Carbon/Carbon.h>
#endif
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
#if defined(Q_OS_MACX)
@@ -107,8 +109,8 @@ static const MacSpecialKey * const MacSpecialKeyEntriesEnd = entries + NumEntrie
QChar qt_macSymbolForQtKey(int key)
{
- const MacSpecialKey *i = qBinaryFind(entries, MacSpecialKeyEntriesEnd, key);
- if (i == MacSpecialKeyEntriesEnd)
+ const MacSpecialKey *i = std::lower_bound(entries, MacSpecialKeyEntriesEnd, key);
+ if ((i == MacSpecialKeyEntriesEnd) || (key < *i))
return QChar();
ushort macSymbol = i->macSymbol;
if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)