diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2013-09-03 00:52:45 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-05 17:46:27 +0200 |
commit | c6d3fa1dcfbacdbcfb23b76ca6c5cede0ea9a5ef (patch) | |
tree | d37c6985caf0265f56cb317679eb02765b6c3915 /src/plugins/platforminputcontexts/compose | |
parent | 62533768c8babff37ba20a86f2c5602ed2c24085 (diff) |
Remove deprecated QtAlgorithms calls from the compose inputcontext
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html
Change-Id: I75ecfb84befd5dcc44f2ffcbef2cb6f1cc39cfd8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/plugins/platforminputcontexts/compose')
-rw-r--r-- | src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp index 116c6cfa7d..c222b62a36 100644 --- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp +++ b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp @@ -47,6 +47,8 @@ #include <QtCore/QStringList> #include <QtCore/QString> +#include <algorithm> + #include <xkbcommon/xkbcommon.h> #ifdef XKBCOMMON_0_2_0 @@ -445,6 +447,6 @@ void TableGenerator::orderComposeTable() // Stable-sorting to ensure that the item that appeared before the other in the // original container will still appear first after the sort. This property is // needed to handle the cases when user re-defines already defined key sequence - qStableSort(m_composeTable.begin(), m_composeTable.end(), Compare()); + std::stable_sort(m_composeTable.begin(), m_composeTable.end(), Compare()); } diff --git a/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp index 611b9fdd9b..65b93b1a45 100644 --- a/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp +++ b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp @@ -45,6 +45,8 @@ #include <QtGui/QKeyEvent> #include <QtCore/QDebug> +#include <algorithm> + QT_BEGIN_NAMESPACE //#define DEBUG_COMPOSING @@ -170,7 +172,7 @@ static bool isDuplicate(const QComposeTableElement &lhs, const QComposeTableElem bool QComposeInputContext::checkComposeTable() { QVector<QComposeTableElement>::const_iterator it = - qLowerBound(m_composeTable.constBegin(), m_composeTable.constEnd(), m_composeBuffer, Compare()); + std::lower_bound(m_composeTable.constBegin(), m_composeTable.constEnd(), m_composeBuffer, Compare()); // prevent dereferencing an 'end' iterator, which would result in a crash if (it == m_composeTable.constEnd()) |