D27514: Fix incorrect use of case statements in accountmodel.cpp

Bernhard Rosenkraenzer noreply at phabricator.kde.org
Thu Feb 20 00:01:37 GMT 2020


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 code shows they're real bugs.
  "case Qt::DisplayRole || AccountModel::FriendlyName:" isn't quite the same as "if(role==Qt::DisplayRole || role==AccountModel::FriendlyName)" -- but that's clearly what is meant here.

TEST PLAN
  Check the output of AccountModel::data() with various role types, including Qt::DisplayRole, AccountModel::FriendlyName, Qt::DecorationRole and AccountModel::Face before and after applying the patch.

REPOSITORY
  R128 User Manager

REVISION DETAIL
  https://phabricator.kde.org/D27514

AFFECTED FILES
  src/lib/accountmodel.cpp

To: bero, #frameworks
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200220/91ab459a/attachment.html>


More information about the Plasma-devel mailing list