Remove qSort usages from the Cocoa helpers

QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I482ce9320c07458a9f76df5823f17d53beec00d8
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
Giuseppe D'Angelo 2013-09-03 00:53:10 +02:00 committed by The Qt Project
parent 2dfbf1bf03
commit fdbabc4f03

View File

@ -53,6 +53,8 @@
#include <QtWidgets/QWidget>
#endif
#include <algorithm>
QT_BEGIN_NAMESPACE
//
@ -320,7 +322,7 @@ QChar qt_mac_qtKey2CocoaKey(Qt::Key key)
mustInit = false;
for (int i=0; i<NumEntries; ++i)
rev_entries[i] = entries[i];
qSort(rev_entries.begin(), rev_entries.end(), qtKey2CocoaKeySortLessThan);
std::sort(rev_entries.begin(), rev_entries.end(), qtKey2CocoaKeySortLessThan);
}
const QVector<KeyPair>::iterator i
= qBinaryFind(rev_entries.begin(), rev_entries.end(), key);