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>
This commit is contained in:
Giuseppe D'Angelo 2013-09-03 00:52:45 +02:00 committed by The Qt Project
parent 62533768c8
commit c6d3fa1dcf
2 changed files with 6 additions and 2 deletions

View File

@ -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());
}

View File

@ -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())