bero added a comment.
Another option would be switching the code to use if instead of switch/case
so the || operator would actually do what the code expected (and x || x, unlike
duplicate case values, isn't an error)
REPOSITORY
R128 User Manager
REVISION DETAIL
https://phabricator.kde.o
bero updated this revision to Diff 76032.
bero added a comment.
Probably best to just add a comment explaining what needs to be done if
AccountModel::* roles ever diverge from DisplayRole/DecorationRole...
Leaving the code the way it is now will result in a harder to trace error if
Qt ev
bero added a comment.
Actually the obvious fix doesn't work (thought it was so obvious that I
submitted it before testing, sorry) because Qt::DisplayRole and
AccountModel::FriendlyName are both 0 (-> duplicate case value) and
Qt::DecorationRole and AccountModel::Face are both 1 (-> duplicate
bero created this revision.
bero added a reviewer: Frameworks.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
bero requested review of this revision.
REVISION SUMMARY
Building user-manager 5.18.1 with clang++ 10.0 resulted in 2 compiler
warnings - a quick look at the c