D12222: baloodb: Use complete access filtering for all outputs

2019-04-13 Thread Alexander Stippich
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:

D12222: baloodb: Use complete access filtering for all outputs

2018-04-19 Thread Michael Heidelbach
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

D12222: baloodb: Use complete access filtering for all outputs

2018-04-19 Thread Michael Heidelbach
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=32580 BRANCH sanitize-dry (branched from master) REVISION DETAIL https://phabricator.kde.org/D1

D12222: baloodb: Use complete access filtering for all outputs

2018-04-19 Thread Michael Heidelbach
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=32579 BRANCH sanitize-dry (branched from master) REVISION DETAIL https://phabricator.kde.org/D1

D12222: baloodb: Use complete access filtering for all outputs

2018-04-19 Thread Michael Heidelbach
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

D12222: baloodb: Use complete access filtering for all outputs

2018-04-17 Thread Stefan Brüns
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

D12222: baloodb: Use complete access filtering for all outputs

2018-04-17 Thread Michael Heidelbach
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

D12222: baloodb: Use complete access filtering for all outputs

2018-04-17 Thread Michael Heidelbach
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 ==

D12222: baloodb: Use complete access filtering for all outputs

2018-04-17 Thread Michael Heidelbach
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=32426 BRANCH sanitize-dry (branched from master) REVISION DETAIL

D12222: baloodb: Use complete access filtering for all outputs

2018-04-17 Thread Michael Heidelbach
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()); >

D12222: baloodb: Use complete access filtering for all outputs

2018-04-17 Thread Michael Heidelbach
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=32422 BRANCH

D12222: baloodb: Use complete access filtering for all outputs

2018-04-16 Thread Stefan Brüns
bruns added inline comments. INLINE COMMENTS > databasesanitizer.cpp:179 > +tail = std::remove_if(infos.begin(), tail, > + [deviceId,] (const FileInfo& info) { > + summary.accessible += info.accessible; missing space >

D12222: baloodb: Use complete access filtering for all outputs

2018-04-16 Thread Michael Heidelbach
michaelh added inline comments. INLINE COMMENTS > databasesanitizer.cpp:180 > + [deviceId,] (const FileInfo& info) { > + summary.accessible += info.accessible; > + return info.id == deviceId; How can this work?

D12222: baloodb: Use complete access filtering for all outputs

2018-04-16 Thread Michael Heidelbach
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=32321 BRANCH sanitize-dry (branched from master) REVISION DETAIL https://phabricator.kde.org/D1

D12222: baloodb: Use complete access filtering for all outputs

2018-04-16 Thread Michael Heidelbach
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) {

D12222: baloodb: Use complete access filtering for all outputs

2018-04-16 Thread Stefan Brüns
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

D12222: baloodb: Use complete access filtering for all outputs

2018-04-15 Thread Michael Heidelbach
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

D12222: baloodb: Use complete access filtering for all outputs

2018-04-15 Thread Michael Heidelbach
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

D12222: baloodb: Use complete access filtering for all outputs

2018-04-15 Thread Michael Heidelbach
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

D12222: baloodb: Use complete access filtering for all outputs

2018-04-15 Thread Michael Heidelbach
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

D12222: baloodb: Use complete access filtering for all outputs

2018-04-15 Thread Michael Heidelbach
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

D12222: baloodb: Use complete access filtering for all outputs

2018-04-15 Thread Michael Heidelbach
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