Kill Runner: Move config keys to new file
ClosedPublic

Authored by alex on Feb 22 2020, 2:10 PM.

Details

Summary

The config keys/sorting enum have been moved to a new file, before this the runner included the header of the config class.
This patch originated from https://phabricator.kde.org/D27513, but it was requested to split it up into separate patches.

Test Plan

Should compile.

Diff Detail

Repository
R120 Plasma Workspace
Branch
arcpatch-D27576
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24006
Build 24024: arc lint + arc unit
alex created this revision.Feb 22 2020, 2:10 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 22 2020, 2:10 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
alex requested review of this revision.Feb 22 2020, 2:10 PM
meven accepted this revision.Mar 20 2020, 11:10 AM

Minor nitpick
So the code basically extracts from KillRunnerConfigForm the Config constants.

runners/kill/killrunner.cpp
65

You can use the enum as default value here I guess : Sort::NONE

This revision is now accepted and ready to land.Mar 20 2020, 11:10 AM
alex updated this revision to Diff 78137.Mar 21 2020, 6:59 AM

Use cast for the default value

alex marked an inline comment as done.Mar 21 2020, 7:02 AM
alex added inline comments.
runners/kill/killrunner.cpp
65

What you suggested is not possible, because the enum is not declared as an enum qobject and declaring it just for this one occurrence seems unnecessary to me :-).
But using an int cast of the default value makes the code more readable.

alex marked 2 inline comments as done.Mar 24 2020, 8:31 PM
alex added a comment.Apr 2 2020, 6:37 AM

Quick question: I just realized that I committed the second commit with a wrong username (this will get rejected when I try to land the patch).
What is the best way to solve this?

Quick question: I just realized that I committed the second commit with a wrong username (this will get rejected when I try to land the patch).

git config user.name

then

git commit --amend --author "Your Name <youremail>"

alex updated this revision to Diff 79224.Apr 3 2020, 2:33 PM

Fix wrong username

alex added a comment.EditedApr 3 2020, 2:37 PM

Thanks! 😃

alex added a comment.Apr 29 2020, 7:07 PM

@meven and others, may I ship this?

meven accepted this revision.May 10 2020, 5:27 PM
In D27576#659971, @alex wrote:

@meven and others, may I ship this?

Yep ship it, it is low risk.

This revision was automatically updated to reflect the committed changes.