Code cleanup on the Profile Settings
ClosedPublic

Authored by tcanabrava on Jun 14 2018, 12:14 PM.

Details

Summary

Favor manual list creator over for loop for small list

Three items, create them manually, cleaner and less
computationally expensive.

Btw - this is ugly, both ways. I blame QStandardItemModel.

Simplify Logic

Use auto when types are explicit

Simplify Logic: use ternary when it improves readability

Stack when heap's uneeded.

There's absolutely no point on creating a QPointer
and manually deleting the item later. Just create
the variable on the stack

Auto when type's explicit

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tcanabrava created this revision.Jun 14 2018, 12:14 PM
Restricted Application added a project: Konsole. · View Herald TranscriptJun 14 2018, 12:14 PM
Restricted Application added a subscriber: konsole-devel. · View Herald Transcript
tcanabrava requested review of this revision.Jun 14 2018, 12:14 PM
hindenburg accepted this revision.Jun 16 2018, 7:30 PM

Looks fine - go ahead and commit when you want

This revision is now accepted and ready to land.Jun 16 2018, 7:30 PM
This revision was automatically updated to reflect the committed changes.