Improve ConfigDialog API for adding pages, follow list API patterns
ClosedPublic

Authored by kossebau on May 30 2017, 10:20 PM.

Details

Summary

The old API had a single method "add" which then by the second parameter
being a nullptr or not decided whether to insert before that page
as given by the second parameter or append at the end.
This confused code readers a little, so splitting into
two distinct methods following std list API conventions
("append(x)" vs. "insert(before, x)") should improve things,
even if at the cost of an additional symbol.

Diff Detail

Repository
R33 KDevPlatform
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.May 30 2017, 10:20 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptMay 30 2017, 10:20 PM
apol added a subscriber: apol.May 30 2017, 10:42 PM

+1, it already confused me in the last review.

mwolff accepted this revision.May 31 2017, 9:17 AM
mwolff added a subscriber: mwolff.

lgtm, thanks!

This revision is now accepted and ready to land.May 31 2017, 9:17 AM
This revision was automatically updated to reflect the committed changes.