Don't check whether an empty filename exists
Summary:
Since 5.10 (commit 0dee566e98 in qtbase) Qt complains if we make a
system call with an empty filename (with a "Empty filename passed to
function" runtime warning).
There is no reason to call exists() if we already know that a filename
is empty. While at it, port to QFileInfo::exists() which is faster.
Test Plan: Together with D8696, fixes all the runtime warnings when running tests/kfilewidgettest_gui.
Reviewers: dfaure
Reviewed By: dfaure
Subscribers: apol, Frameworks
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D8697