[kcmkwin/kwindesktop] Make Slide effect configurable
ClosedPublic

Authored by zzag on Jun 14 2018, 5:22 PM.

Details

Summary

Even though the Slide effect has a KCM, it's not possible to configure
it [slide effect] from the virtual desktops KCM.

This change addresses the problem above.

Before

After

BUG: 395377

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.Jun 14 2018, 5:22 PM
Restricted Application added a project: KWin. · View Herald TranscriptJun 14 2018, 5:22 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Jun 14 2018, 5:22 PM
zzag edited the summary of this revision. (Show Details)Jun 14 2018, 5:23 PM
davidedmundson accepted this revision.Jun 16 2018, 8:40 PM
davidedmundson added a subscriber: davidedmundson.
davidedmundson added inline comments.
kcmkwin/kwindesktop/main.cpp
526

can you add Q_FALLTHROUGH when pushing

This revision is now accepted and ready to land.Jun 16 2018, 8:40 PM
zzag added inline comments.Jun 16 2018, 9:06 PM
kcmkwin/kwindesktop/main.cpp
526

Why?

davidedmundson added inline comments.Jun 16 2018, 9:14 PM
kcmkwin/kwindesktop/main.cpp
526

Tells both the next person and the compiler that you're deliberately treating 1 and 2 the same and haven't just forgotten to return.

Otherwise you get something like:
/home/david/projects/kde5/src/kde/workspace/plasma-workspace/libtaskmanager/tasksmodel.cpp:816:13: warning: this statement may fall through [-Wimplicit-fallthrough=]

Exact situations of what warns are compiler warns about are currently ambiguous and changing, so this might not currently, but it certainly won't do any harm.

zzag added inline comments.Jun 16 2018, 9:25 PM
kcmkwin/kwindesktop/main.cpp
526

No, I know what Q_FALLTHROUGH is. I don't understand why we need it here. I thought that's totally fine to have such kind of fall through:

case 1:
case 2:
case 42:
    return;

Am I wrong?

zzag added inline comments.Jun 16 2018, 9:46 PM
kcmkwin/kwindesktop/main.cpp
526

OK, I've re-read your last sentence. I don't think clang or gcc would produce warnings for such kind of fall though. It's worth to mention that LLVM use "case 1: case 2:" quite often.

davidedmundson added inline comments.Jun 17 2018, 4:16 PM
kcmkwin/kwindesktop/main.cpp
526

I'm aware they don't currently, I still think it's nicer form, but I also really don't care that much.

Push whichever you prefer.

This revision was automatically updated to reflect the committed changes.