diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2012-09-18 22:41:59 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-19 16:12:30 +0200 |
commit | 1e37d854f71a965ae34c41b7f437683db5e4b6fb (patch) | |
tree | 6cea974ef251d4d584ec5487bcca4c83b5080d18 /src/gui/kernel | |
parent | 21d344524355af7baf9f140bd05d3b5e6bdd154d (diff) |
Remove qLowerBound usages from qtbase
Replace them with std::lower_bound; this allows for deprecation of
qLowerBound.
Change-Id: I536e7338eb85ea6c7c1a5bf23121292767927e0b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qshortcutmap.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp index 04a16c57ff..f626d17d82 100644 --- a/src/gui/kernel/qshortcutmap.cpp +++ b/src/gui/kernel/qshortcutmap.cpp @@ -48,6 +48,8 @@ #include "qcoreapplication.h" #include <private/qkeymapper_p.h> +#include <algorithm> + #ifndef QT_NO_SHORTCUT QT_BEGIN_NAMESPACE @@ -419,7 +421,7 @@ bool QShortcutMap::hasShortcutForKeySequence(const QKeySequence &seq) const Q_D(const QShortcutMap); QShortcutEntry entry(seq); // needed for searching QList<QShortcutEntry>::ConstIterator itEnd = d->sequences.constEnd(); - QList<QShortcutEntry>::ConstIterator it = qLowerBound(d->sequences.constBegin(), itEnd, entry); + QList<QShortcutEntry>::ConstIterator it = std::lower_bound(d->sequences.constBegin(), itEnd, entry); for (;it != itEnd; ++it) { if (matches(entry.keyseq, (*it).keyseq) == QKeySequence::ExactMatch && (*it).correctContext() && (*it).enabled) { @@ -467,7 +469,7 @@ QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e) QShortcutEntry entry(d->newEntries.at(i)); // needed for searching QList<QShortcutEntry>::ConstIterator itEnd = d->sequences.constEnd(); QList<QShortcutEntry>::ConstIterator it = - qLowerBound(d->sequences.constBegin(), itEnd, entry); + std::lower_bound(d->sequences.constBegin(), itEnd, entry); int oneKSResult = QKeySequence::NoMatch; int tempRes = QKeySequence::NoMatch; |