michaelh created this revision.
michaelh added reviewers: Baloo, Frameworks.
Restricted Application added projects: Frameworks, Baloo.
michaelh requested review of this revision.
REVISION SUMMARY
Add `mounted-only` option to 'list' and 'devices' command
Use a common function to determine if a
michaelh added a dependency: D11753: baloodb: Add clean command.
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D1
To: michaelh, #baloo, #frameworks
Cc: ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, alexeymin
michaelh edited the summary of this revision.
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D1
To: michaelh, #baloo, #frameworks
Cc: ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, alexeymin
michaelh added a task: T8250: Sanitize the database.
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D1
To: michaelh, #baloo, #frameworks
Cc: ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, alexeymin
michaelh added inline comments.
INLINE COMMENTS
> main.cpp:161
> return i18n("\n\nCommands:\n%1", allCommandsStr);
> }
>
Ideas for better formatting this are welcome.
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D1
To: michaelh, #baloo, #frameworks
Cc:
michaelh added a dependent revision: D12044: baloodb: Improve interface.
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D1
To: michaelh, #baloo, #frameworks
Cc: ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, alexeymin
bruns added inline comments.
INLINE COMMENTS
> databasesanitizer.cpp:252
> +auto& summary = listResult.second;
> for (const auto& info: listResult.first) {
> +if (ignoredDevices[info.id] == false) {
If ignoredDevices is a Set/List, you can do a filter pass over the fileList
fir
michaelh added inline comments.
INLINE COMMENTS
> bruns wrote in databasesanitizer.cpp:252
> If ignoredDevices is a Set/List, you can do a filter pass over the fileList
> first.
>
> auto& fileList = listResult.first;
> auto tail = fileList.end();
> for (auto deviceId : ignoredDevices) {
>
michaelh updated this revision to Diff 32321.
michaelh added a comment.
- Use remove_if
REPOSITORY
R293 Baloo
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D1?vs=32176&id=32321
BRANCH
sanitize-dry (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D1
michaelh added inline comments.
INLINE COMMENTS
> databasesanitizer.cpp:180
> + [deviceId,&summary] (const FileInfo& info) {
> + summary.accessible += info.accessible;
> + return info.id == deviceId;
How can this
bruns added inline comments.
INLINE COMMENTS
> databasesanitizer.cpp:179
> +tail = std::remove_if(infos.begin(), tail,
> + [deviceId,&summary] (const FileInfo& info) {
> + summary.accessible += info.accessible;
missing space
> da
michaelh updated this revision to Diff 32422.
michaelh added a comment.
- Apply suggested changes
- Correct summary error
- Repair cleaning
- Comment some decisions
REPOSITORY
R293 Baloo
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D1?vs=32321&id=32422
BRANCH
sanitiz
michaelh added a comment.
I went I little overboard with `remove_if` and had to repair.
Device filtering is also broken see inline comment.
INLINE COMMENTS
> databasesanitizer.cpp:160
> const QByteArray rootPath =
> QFile::encodeName(vol.rootPath());
> con
michaelh updated this revision to Diff 32426.
michaelh added a comment.
- Filter by device id
REPOSITORY
R293 Baloo
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D1?vs=32422&id=32426
BRANCH
sanitize-dry (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D
michaelh marked an inline comment as done.
michaelh added inline comments.
INLINE COMMENTS
> databasesanitizer.cpp:196
> + summary.accessible += (info.deviceId ==
> deviceId && info.accessible ? 1 : 0);
> + return info.deviceId == deviceI
michaelh marked 6 inline comments as done.
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D1
To: michaelh, #baloo, #frameworks
Cc: bruns, ashaposhnikov, michaelh, astippich, spoorun
bruns added inline comments.
INLINE COMMENTS
> databasesanitizer.cpp:179
> +
> +bool isMounted(const quint32 id) {
> +return m_devices.mounted.contains(id);
`isMounted(id)` can be implemented as `getStorageInfo(id).isValid()`
> databasesanitizer.cpp:183
> +
> +bool isUnMounted(c
michaelh updated this revision to Diff 32578.
michaelh marked 5 inline comments as done.
michaelh added a comment.
- Revert most previous changes
- Use `isMounted()` and `isObscured()`
- Remove documents recursively
REPOSITORY
R293 Baloo
CHANGES SINCE LAST UPDATE
https://phabricator.k
michaelh updated this revision to Diff 32579.
michaelh added a comment.
- Correct typo
REPOSITORY
R293 Baloo
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D1?vs=32578&id=32579
BRANCH
sanitize-dry (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D1
michaelh updated this revision to Diff 32580.
michaelh added a comment.
- That was no typo
REPOSITORY
R293 Baloo
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D1?vs=32579&id=32580
BRANCH
sanitize-dry (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D122
michaelh marked an inline comment as done.
michaelh added a comment.
I'm sorry for making so much noise with all those stupid mistakes. It's
probably best for me to let this rest for a few days, relax a little and gain
some distance.
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabric
astippich added a comment.
Herald added a subscriber: kde-frameworks-devel.
@bruns this still applies cleanly to current master, do you think this and
the dependent revision are still worth it to merge?
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D1
To: michael
22 matches
Mail list logo