Avoid side effects due to stale errno value
Summary:
UserMetaData::hasAttribute and isSupported use errno to check if the
syscall was successful. This is insufficient, as a succesful syscall
(return value >= 0) does not reset the errno value.
Also do some minor optimization, there is no need to actually fetch
the value for hasAttribute/isSupported.
Test Plan:
run usermetadatawritertest
old code fails for added test
Reviewers: Baloo, Frameworks, ngraham, poboiko, astippich
Reviewed By: astippich
Subscribers: kde-frameworks-devel
Tags: Frameworks, Baloo
Differential Revision: https://phabricator.kde.org/D18900