[balooshow] Do not print a bogus warning for a non-indexed file
ClosedPublic

Authored by bruns on Apr 6 2019, 10:07 PM.

Details

Summary

balooshow allows to query file information by document id, e.g.
balooshow 12345678. In case the file is not indexed,
Transaction::documentUrl(fid) returns an empty url, and the lookup
Baloo::filePathToId("") returns 0. Don't print a misleading warning,
just state the file is not indexed.

Test Plan

balooshow <unindexed-file-id>

Diff Detail

Repository
R293 Baloo
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Apr 6 2019, 10:07 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptApr 6 2019, 10:07 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Apr 6 2019, 10:07 PM
ngraham added inline comments.Apr 6 2019, 10:58 PM
src/tools/balooshow/main.cpp
142

Why were all these spaces after the colons removed?

bruns updated this revision to Diff 55694.Apr 7 2019, 5:01 PM

readd erroneously removed spaces

bruns added inline comments.Apr 7 2019, 6:09 PM
src/tools/balooshow/main.cpp
142

confused this with a debug stream ...

bruns marked an inline comment as done.Apr 7 2019, 6:09 PM
astippich accepted this revision.Apr 7 2019, 6:40 PM

only one minor nitpick

src/tools/balooshow/main.cpp
136

Also add a space here after "Url:"?

This revision is now accepted and ready to land.Apr 7 2019, 6:40 PM
bruns added inline comments.Apr 7 2019, 6:41 PM
src/tools/balooshow/main.cpp
136

Yes, will add it.

This revision was automatically updated to reflect the committed changes.