Commit 3737a8cb authored by David Redondo's avatar David Redondo 🏎
Browse files

Port away from deprecated QSet related methods

parent 31c7ebe3
......@@ -167,7 +167,7 @@ QStringList RunnerModel::runners() const
void RunnerModel::setRunners(const QStringList &runners)
{
if (m_runners.toSet() != runners.toSet()) {
if (std::is_permutation(runners.cbegin(), runners.cend(), m_runners.cbegin(), m_runners.cend())) {
m_runners = runners;
if (m_runnerManager) {
......
......@@ -274,7 +274,7 @@ void AvailableTranslationsModel::setSelectedLanguages(const QStringList &languag
{
beginResetModel();
m_availableLanguages = (m_installedLanguages - QSet<QString>::fromList(languages)).values();
m_availableLanguages = (m_installedLanguages - QSet<QString>(languages.cbegin(), languages.cend())).values();
QCollator c;
c.setCaseSensitivity(Qt::CaseInsensitive);
......
......@@ -150,7 +150,7 @@ bool LauncherTasksModel::Private::requestAddLauncherToActivities(const QUrl &_ur
return false;
}
const auto activities = ActivitiesSet::fromList(_activities);
const auto activities = ActivitiesSet(_activities.cbegin(), _activities.cend());
if (url.isLocalFile() && KDesktopFile::isDesktopFile(url.toLocalFile())) {
KDesktopFile f(url.toLocalFile());
......@@ -406,7 +406,7 @@ void LauncherTasksModel::setLauncherList(const QStringList &serializedLaunchers)
std::tie(url, _activities) =
deserializeLauncher(serializedLauncher);
auto activities = ActivitiesSet::fromList(_activities);
auto activities = ActivitiesSet(_activities.cbegin(), _activities.cend());
// Is url is not valid, ignore it
if (!isValidLauncherUrl(url)) {
......
......@@ -851,7 +851,7 @@ QStringList TaskGroupingProxyModel::blacklistedAppIds() const
void TaskGroupingProxyModel::setBlacklistedAppIds(const QStringList &list)
{
const QSet<QString> &set = QSet<QString>::fromList(list);
const QSet<QString> &set = QSet<QString>(list.cbegin(), list.cend());
if (d->blacklistedAppIds != set) {
d->blacklistedAppIds = set;
......@@ -882,7 +882,7 @@ QStringList TaskGroupingProxyModel::blacklistedLauncherUrls() const
void TaskGroupingProxyModel::setBlacklistedLauncherUrls(const QStringList &list)
{
const QSet<QString> &set = QSet<QString>::fromList(list);
const QSet<QString> &set = QSet<QString>(list.cbegin(), list.cend());
if (d->blacklistedLauncherUrls != set) {
d->blacklistedLauncherUrls = set;
......
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