Port away from deprecated qSort function
Reviewers: #kwin, romangg Reviewed By: #kwin, romangg Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D22354
This commit is contained in:
parent
c7639fd7ed
commit
927f579df9
5 changed files with 7 additions and 7 deletions
|
@ -176,7 +176,7 @@ void TestBuiltInEffectLoader::testKnownEffects()
|
|||
KWin::BuiltInEffectLoader loader;
|
||||
QStringList result = loader.listOfKnownEffects();
|
||||
QCOMPARE(result.size(), expectedEffects.size());
|
||||
qSort(result);
|
||||
std::sort(result.begin(), result.end());
|
||||
for (int i = 0; i < expectedEffects.size(); ++i) {
|
||||
QCOMPARE(result.at(i), expectedEffects.at(i));
|
||||
}
|
||||
|
@ -557,7 +557,7 @@ void TestBuiltInEffectLoader::testLoadAllEffects()
|
|||
QCOMPARE(list.size(), 2);
|
||||
loadedEffects << list.at(1).toString();
|
||||
}
|
||||
qSort(loadedEffects);
|
||||
std::sort(loadedEffects.begin(), loadedEffects.end());
|
||||
QCOMPARE(loadedEffects.at(0), QStringLiteral("kscreen"));
|
||||
QCOMPARE(loadedEffects.at(1), QStringLiteral("mouseclick"));
|
||||
}
|
||||
|
|
|
@ -437,7 +437,7 @@ void TestScriptedEffectLoader::testLoadAllEffects()
|
|||
QCOMPARE(list.size(), 2);
|
||||
loadedEffects << list.at(1).toString();
|
||||
}
|
||||
qSort(loadedEffects);
|
||||
std::sort(loadedEffects.begin(), loadedEffects.end());
|
||||
QCOMPARE(loadedEffects.at(0), kwin4 + QStringLiteral("eyeonscreen"));
|
||||
QCOMPARE(loadedEffects.at(1), kwin4 + QStringLiteral("fade"));
|
||||
}
|
||||
|
|
|
@ -1133,7 +1133,7 @@ void PresentWindowsEffect::calculateWindowTransformationsKompose(EffectWindowLis
|
|||
QRect availRect = effects->clientArea(ScreenArea, screen, effects->currentDesktop());
|
||||
if (m_showPanel) // reserve space for the panel
|
||||
availRect = effects->clientArea(MaximizeArea, screen, effects->currentDesktop());
|
||||
qSort(windowlist); // The location of the windows should not depend on the stacking order
|
||||
std::sort(windowlist.begin(), windowlist.end()); // The location of the windows should not depend on the stacking order
|
||||
|
||||
// Following code is taken from Kompose 0.5.4, src/komposelayout.cpp
|
||||
|
||||
|
@ -1280,7 +1280,7 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
|
|||
|
||||
// As we are using pseudo-random movement (See "slot") we need to make sure the list
|
||||
// is always sorted the same way no matter which window is currently active.
|
||||
qSort(windowlist);
|
||||
std::sort(windowlist.begin(), windowlist.end());
|
||||
|
||||
QRect area = effects->clientArea(ScreenArea, screen, effects->currentDesktop());
|
||||
if (m_showPanel) // reserve space for the panel
|
||||
|
|
|
@ -397,7 +397,7 @@ void EffectsModel::load(LoadOptions options)
|
|||
loadJavascriptEffects(kwinConfig);
|
||||
loadPluginEffects(kwinConfig, configs);
|
||||
|
||||
qSort(m_pendingEffects.begin(), m_pendingEffects.end(),
|
||||
std::sort(m_pendingEffects.begin(), m_pendingEffects.end(),
|
||||
[](const EffectData &a, const EffectData &b) {
|
||||
if (a.category == b.category) {
|
||||
if (a.exclusiveGroup == b.exclusiveGroup) {
|
||||
|
|
|
@ -389,7 +389,7 @@ void CompositingType::generateCompositing()
|
|||
it++;
|
||||
}
|
||||
|
||||
qSort(m_compositingList.begin(), m_compositingList.end(), [](const CompositingData &a, const CompositingData &b) {
|
||||
std::sort(m_compositingList.begin(), m_compositingList.end(), [](const CompositingData &a, const CompositingData &b) {
|
||||
return a.type < b.type;
|
||||
});
|
||||
endResetModel();
|
||||
|
|
Loading…
Reference in a new issue