Diffusion KInit 88be45955944

Lessen log spam by not checking for existence of file with empty name

Authored by rkflx on Sep 15 2018, 8:36 PM.

Description

Lessen log spam by not checking for existence of file with empty name

Summary:
Calls to QFile::exists() while starting a Plasma session
resulted in Empty filename passed to function being logged
since Qt 5.10 (0dee566e98f5 in qtbase).

This can be avoided by skipping the check for empty filenames, which
would have returned false in any case. Similarly to what was done in
R241:549fc81e8e8a, also port to the faster QFileInfo::exists().

Note this does not simply hide a deeper issue, i.e. the actual cause
resulting in the empty variable, because libpath.isEmpty() will be
handled explicitly later on. In the case under investigation
/usr/lib64/libexec/org_kde_powerdevil did not match
/usr/lib64/libexec/kf5, but even if it was in that subfolder there
would have been no corresponding libkdeinit5_ anyway.

CCBUG: 388611

Test Plan:
Grep session log for "Empty filename passed to function" after
restarting the Plasma session and compare before/after.

Reviewers: Frameworks

Subscribers: dfaure, kde-frameworks-devel, dhaumann

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D9987

Details