Optimize SortFilterModel role names
ClosedPublic

Authored by broulik on Nov 3 2017, 10:54 AM.

Details

Summary
  • Reserve m_roleIds
  • Avoid double lookup contains+value but use default value argument
  • Constify
Test Plan

I don't get why in syncRoleNames we populate m_roleIds from roleNames() but then set roles to sourceModel()->roleNames().

This class is not exported but only part of the corebindingsplugin so this method can be constified

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Nov 3 2017, 10:54 AM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptNov 3 2017, 10:54 AM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
broulik edited the summary of this revision. (Show Details)Nov 3 2017, 10:54 AM
broulik edited the test plan for this revision. (Show Details)
mwolff accepted this revision.Nov 3 2017, 11:19 AM
mwolff added a subscriber: mwolff.
mwolff added inline comments.
src/declarativeimports/core/datamodel.h
141

why was that kf6 note there?

This revision is now accepted and ready to land.Nov 3 2017, 11:19 AM
broulik added inline comments.Nov 3 2017, 11:21 AM
src/declarativeimports/core/datamodel.h
141

Probably someone added it who thought it could not be changed because you can't for exported classes but this isn't.

This revision was automatically updated to reflect the committed changes.