KRunner: Refactor deprecated toSet() method
AbandonedPublic

Authored by alex on Feb 23 2020, 1:09 PM.

Details

Reviewers
mlaurent
apol
Group Reviewers
Plasma
Summary

The deprecated toSet method of the QList class has been refactored as in the deprecation message suggested.

Test Plan

Should compile without this deprecation warning.

Diff Detail

Repository
R308 KRunner
Branch
deprecation_fix (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22816
Build 22834: arc lint + arc unit
alex created this revision.Feb 23 2020, 1:09 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 23 2020, 1:09 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
alex requested review of this revision.Feb 23 2020, 1:09 PM

Hi there. Since KF5 min. supported Qt version is 5.12, you have to make the code conditional so that it still build on Qt < 5.14.

(Qt 5.14 is where range-iterators-based constructors were introduced to Qt containers including QList https://doc.qt.io/qt-5/qlist.html#QList-4).

For an example see: https://phabricator.kde.org/R91:202af7d3f3275c998f06fbb8f414f23215e867ef

alex updated this revision to Diff 76219.Feb 23 2020, 1:31 PM

Keep compatibility with Qt < 5.14

alex added a reviewer: Plasma.Feb 23 2020, 1:36 PM

Thanks :-)

apol accepted this revision.Feb 23 2020, 11:30 PM

Makes sense. It would be ideal to have a way to do an unsorted comparison without having to create 2 temporary sets every time, although I guess it's out of scope here.

This revision is now accepted and ready to land.Feb 23 2020, 11:30 PM
alex abandoned this revision.Apr 19 2020, 6:57 PM

This gets already handled/discussed in D28135