summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-05-03 21:45:10 +0200
committerMontel Laurent <[email protected]>2017-05-03 21:45:10 +0200
commitb2281067936d3f260deed9b75ceb1d3e5aca7f26 (patch)
treeaa812690ec497bce28d2ea8fb3e5b80ca23ed474
parentb7d9084b466471a3436172fc54a8116af724f9c2 (diff)
Port qSort method
-rw-r--r--plugins/plasma/pimeventsplugin/autotests/eventdatavisitortest.cpp5
-rw-r--r--plugins/plasma/pimeventsplugin/pimcalendarsmodel.cpp4
2 files changed, 5 insertions, 4 deletions
diff --git a/plugins/plasma/pimeventsplugin/autotests/eventdatavisitortest.cpp b/plugins/plasma/pimeventsplugin/autotests/eventdatavisitortest.cpp
index 1325abe..98f8a07 100644
--- a/plugins/plasma/pimeventsplugin/autotests/eventdatavisitortest.cpp
+++ b/plugins/plasma/pimeventsplugin/autotests/eventdatavisitortest.cpp
@@ -289,8 +289,9 @@ void EventDataVisitorTest::testEventDataIdVisitor()
auto results = visitor.results();
- qSort(results);
- qSort(expectedUids);
+
+ std::sort(results.begin(), results.end());
+ std::sort(expectedUids.begin(), expectedUids.end());
QCOMPARE(results, expectedUids);
}
diff --git a/plugins/plasma/pimeventsplugin/pimcalendarsmodel.cpp b/plugins/plasma/pimeventsplugin/pimcalendarsmodel.cpp
index 1a7acfa..8be5dd0 100644
--- a/plugins/plasma/pimeventsplugin/pimcalendarsmodel.cpp
+++ b/plugins/plasma/pimeventsplugin/pimcalendarsmodel.cpp
@@ -128,8 +128,8 @@ void PimCalendarsModel::saveConfig()
auto group = config->group("PIMEventsPlugin");
auto savedList = group.readEntry("calendars", QList<qint64>());
auto currentList = mEnabledCalendars.toList();
- qSort(savedList);
- qSort(currentList);
+ std::sort(savedList.begin(), savedList.end());
+ std::sort(currentList.begin(), currentList.end());
if (currentList != savedList) {
group.writeEntry("calendars", currentList);