Replace several Q_ASSERTs with proper checks
Summary:
The code has some preconditions on supplied values when interacting
with the DB. Instead of silently corrupting the DB with bogus values
when using non-debug builds, check any provided arguments.
Reviewers: Baloo, Frameworks, ngraham, poboiko, dhaumann
Reviewed By: dhaumann
Subscribers: dhaumann, ngraham, apol, sitter, kde-frameworks-devel, broulik, Frameworks
Tags: Frameworks, Baloo
Differential Revision: https://phabricator.kde.org/D12336