Commit 7ae94bb2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile without deprecated method

parent f2ce9aef
...@@ -19,7 +19,9 @@ include(KDECMakeSettings) ...@@ -19,7 +19,9 @@ include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMAddTests) include(ECMAddTests)
include(GenerateExportHeader) include(GenerateExportHeader)
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
endif()
# find_package(KdepimLibs) # find_package(KdepimLibs)
# set_package_properties(KdepimLibs PROPERTIES DESCRIPTION "KDE PIM Libraries" # set_package_properties(KdepimLibs PROPERTIES DESCRIPTION "KDE PIM Libraries"
# URL "http://www.kde.org" # URL "http://www.kde.org"
......
...@@ -261,7 +261,7 @@ void SourcesModel::slotMatchesChanged(const QList<Plasma::QueryMatch>& l) ...@@ -261,7 +261,7 @@ void SourcesModel::slotMatchesChanged(const QList<Plasma::QueryMatch>& l)
m_duplicates.clear(); m_duplicates.clear();
QList<Plasma::QueryMatch> list(l); QList<Plasma::QueryMatch> list(l);
qSort(list); std::sort(list.begin(), list.end());
for (auto it = list.crbegin(), end = list.crend(); it != end; ++it) { for (auto it = list.crbegin(), end = list.crend(); it != end; ++it) {
slotMatchAdded(*it); slotMatchAdded(*it);
...@@ -308,7 +308,7 @@ void SourcesModel::slotMatchesChanged(const QList<Plasma::QueryMatch>& l) ...@@ -308,7 +308,7 @@ void SourcesModel::slotMatchesChanged(const QList<Plasma::QueryMatch>& l)
return lHigher; return lHigher;
} }
}; };
qStableSort(m_types.begin(), m_types.end(), sortFunc); std::stable_sort(m_types.begin(), m_types.end(), sortFunc);
m_modelPopulated = true; m_modelPopulated = true;
endResetModel(); endResetModel();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment