Reinvent deprecated qSort as Utils::sort

Change-Id: I4f6011cc2b6127037249aabc2426a88ad7108ebf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Nikita Baryshnikov
2014-06-16 18:25:52 +04:00
committed by hjk
parent eefd0f4332
commit 12103e0f67
75 changed files with 275 additions and 307 deletions

View File

@@ -50,6 +50,7 @@
#include <qtsupport/baseqtversion.h>
#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtversionmanager.h>
#include <utils/algorithm.h>
#include <utils/environment.h>
#include <utils/sleep.h>
@@ -248,7 +249,7 @@ void AndroidConfig::updateNdkInformation() const
const QString &fileName = it.next();
m_availableNdkPlatforms.push_back(fileName.mid(fileName.lastIndexOf(QLatin1Char('-')) + 1).toInt());
}
qSort(m_availableNdkPlatforms.begin(), m_availableNdkPlatforms.end(), qGreater<int>());
Utils::sort(m_availableNdkPlatforms, std::greater<int>());
// detect toolchain host
QStringList hostPatterns;
@@ -494,7 +495,7 @@ QVector<AndroidDeviceInfo> AndroidConfig::connectedDevices(QString *error) const
devices.push_back(dev);
}
qSort(devices.begin(), devices.end(), androidDevicesLessThan);
Utils::sort(devices, androidDevicesLessThan);
if (devices.isEmpty() && error)
*error = QApplication::translate("AndroidConfiguration",
"No devices found in output of: %1")
@@ -631,7 +632,7 @@ QVector<AndroidDeviceInfo> AndroidConfig::androidVirtualDevices() const
dev.type = AndroidDeviceInfo::Emulator;
devices.push_back(dev);
}
qSort(devices.begin(), devices.end(), androidDevicesLessThan);
Utils::sort(devices, androidDevicesLessThan);
return devices;
}