[Baloo KCM] Add the ability to suspend, resume, and monitor indexing
Needs ReviewPublic

Authored by ngraham on Thu, Nov 21, 5:59 PM.

Details

Reviewers
bruns
davidedmundson
Group Reviewers
VDG
Plasma
Baloo
Summary

Most of this code is lifted straight from the file indexing monitor KInfoCenter KCM.
If and when this lands, that becomes largely redundant and we could consider removing it.

Depends on D25743

FEATURE: 374474
FEATURE: 405307
FIXED-IN: 5.18.0

Test Plan

Everything seems to work.

Diff Detail

Repository
R119 Plasma Desktop
Branch
suspend-and-resume-and-monitor-indexing-from-the-kcm (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 19547
Build 19565: arc lint + arc unit
ngraham created this revision.Thu, Nov 21, 5:59 PM
Restricted Application added a project: Plasma. · View Herald TranscriptThu, Nov 21, 5:59 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Thu, Nov 21, 5:59 PM

For the concept a big +1 from me. I did not even know that we had that in the infocenter...

For the concept a big +1 from me. I did not even know that we had that in the infocenter...

I think most people don't know this, because it's an odd place to have controls to start and stop indexing. If and when this patch lands, I think we could consider removing the Baloo page entirely.

davidedmundson added inline comments.
kcms/baloo/package/contents/ui/constants.js
23 ↗(On Diff #70119)

Why doesn't this come from the plugin?

kcms/baloo/package/contents/ui/main.qml
169

Is the space after %1 deliberate?

ngraham updated this revision to Diff 70859.Tue, Dec 3, 9:02 PM
ngraham marked an inline comment as done.

Correct string error

davidedmundson added inline comments.Wed, Dec 4, 12:34 AM
kcms/baloo/package/contents/ui/main.qml
151

what about:

LowPowerIdle?

ngraham updated this revision to Diff 70904.Wed, Dec 4, 2:57 PM
ngraham marked an inline comment as done.

ALso check for LowPowerIdle state

ngraham added inline comments.Wed, Dec 4, 3:11 PM
kcms/baloo/package/contents/ui/constants.js
23 ↗(On Diff #70119)

I'm not sure exactly what that means or how to do it; can you help me with it?

davidedmundson requested changes to this revision.Wed, Dec 4, 3:21 PM
davidedmundson added inline comments.
kcms/baloo/package/contents/ui/constants.js
23 ↗(On Diff #70119)

See D25743

Code here would become Baloo.Idle

This revision now requires changes to proceed.Wed, Dec 4, 3:21 PM
ngraham edited the summary of this revision. (Show Details)Wed, Dec 4, 3:28 PM
ngraham updated this revision to Diff 70990.Thu, Dec 5, 9:45 PM

Update to work with D25743

davidedmundson added inline comments.Thu, Dec 5, 9:54 PM
kcms/baloo/package/contents/ui/main.qml
140

This is the wrong way round

davidedmundson added inline comments.Fri, Dec 6, 1:03 AM
kcms/baloo/package/contents/ui/main.qml
140

Edit, no it wasn't wrong

But I have found what is.

I export this as the class Baloo, but the import is also under Baloo

So for this to work against my patch it would be Baloo.Baloo.Suspended

ngraham updated this revision to Diff 70998.Fri, Dec 6, 2:53 AM
ngraham marked 2 inline comments as done.

Adjust to D25743 some more

ngraham edited the test plan for this revision. (Show Details)Fri, Dec 6, 2:54 AM

Thanks @davidedmundson. There's one more FIXME in the code that I could use your help with, if you don't mind.

davidedmundson added inline comments.Fri, Dec 6, 6:34 AM
kcms/baloo/package/contents/ui/main.qml
93

Monitor's property is called state. Lowercase S.

A switch statement here might make this a bit easier to read.

ngraham updated this revision to Diff 71013.Fri, Dec 6, 1:44 PM

Address review comments

ngraham added inline comments.Fri, Dec 6, 1:45 PM
kcms/baloo/package/contents/ui/main.qml
93

Done, but now opening the KCM prints a ton of these errors:

QMetaProperty::read: Unable to handle unregistered datatype 'Baloo::IndexerState' for property 'Baloo::Monitor::state'
ngraham marked an inline comment as done.Fri, Dec 6, 1:45 PM