D12336: Replace several Q_ASSERTs with proper checks
Aleix Pol Gonzalez
noreply at phabricator.kde.org
Sat Sep 29 16:02:00 BST 2018
apol added subscribers: sitter, apol.
apol added a comment.
If it was silently corrupting the DB maybe the right solution would have been to integrate baloo properly with KCrash.
Like @sitter did in https://phabricator.kde.org/D15573.
INLINE COMMENTS
> documenturldb.cpp:44
> {
> - Q_ASSERT(docId > 0);
> - Q_ASSERT(!url.isEmpty());
> - Q_ASSERT(!url.endsWith('/'));
> + if (!docId || url.isEmpty() || url.endsWith('/')) {
> + return false;
Would it make sense to include a warning then? If it's a wrong input, we'll need ways to debug it now that it won't be giving a backtrace.
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D12336
To: bruns, #baloo, michaelh, #frameworks
Cc: apol, sitter, kde-frameworks-devel, broulik, #frameworks, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180929/fe0b5ced/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list