Refactor getters in OutputScreens
ClosedPublic

Authored by zzag on Apr 15 2019, 10:27 PM.

Details

Summary

kdelibs coding style recommends to avoid abbreviations, i.e. variable
names like compMngr, errStr, and so on are bad. Unfortunately, all
getters in OutputScreens don't follow that recommendation. In general,
we could address this issue by renaming enOuts but there is a bit simpler
approach to implement most of those getters.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Apr 15 2019, 10:27 PM
Restricted Application added a project: KWin. · View Herald TranscriptApr 15 2019, 10:28 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Apr 15 2019, 10:28 PM
apol added a subscriber: apol.Apr 15 2019, 11:37 PM
apol added inline comments.
outputscreens.cpp
44–45

You don't need to create a new function, you can use QVector::value right here. There's little point in creating a function that just creates a function.

116

I'd suggest using iterators here.

zzag added inline comments.Apr 15 2019, 11:42 PM
outputscreens.cpp
116

Why?

apol added inline comments.Apr 15 2019, 11:50 PM
outputscreens.cpp
116

Eh you are right, i is used elsewhere too, never mind.

zzag added inline comments.Apr 16 2019, 7:57 PM
outputscreens.cpp
44–45

Well, maybe. It depends on how you look at it.

davidedmundson accepted this revision.Apr 24 2019, 11:52 PM
This revision is now accepted and ready to land.Apr 24 2019, 11:52 PM
This revision was automatically updated to reflect the committed changes.