Fix coding style issues in Scene::paintSimpleScreen
ClosedPublic

Authored by zzag on Oct 7 2019, 10:45 AM.

Diff Detail

Repository
R108 KWin
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 17407
Build 17425: arc lint + arc unit
zzag created this revision.Oct 7 2019, 10:45 AM
Restricted Application added a project: KWin. · View Herald TranscriptOct 7 2019, 10:45 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Oct 7 2019, 10:45 AM
fredrik added a subscriber: fredrik.Oct 7 2019, 4:51 PM
fredrik added inline comments.
scene.cpp
258

The comment here is lost.

277

Why the change to qobject_cast<>?

zzag updated this revision to Diff 67445.Oct 7 2019, 5:26 PM

Fredrik's comments.

zzag added inline comments.Oct 7 2019, 5:29 PM
scene.cpp
258

Oops, fixed.

277

qobject_cast is considered to be a better choice because it's faster (I didn't benchmark it though) and doesn't need RTTI. However, in this case it is a leftover. Fixed.

zzag marked 4 inline comments as done.Oct 7 2019, 5:30 PM
romangg accepted this revision.Oct 29 2019, 3:37 PM
romangg added a subscriber: romangg.
romangg added inline comments.
scene.cpp
277

auto *client =....

281

auto *cc =...

const?

No qobject_cast here?

This revision is now accepted and ready to land.Oct 29 2019, 3:37 PM
zzag added inline comments.Oct 29 2019, 3:49 PM
scene.cpp
281

No qobject_cast here?

I would be in favor of using qobject_cast for casting QObjects all over kwin, however switching from dynamic_cast to qobject_cast doesn't really align with this patch.

This revision was automatically updated to reflect the committed changes.