prevent a QFileInfo warning

Authored by rjvbb on Apr 27 2020, 8:32 AM.

Description

prevent a QFileInfo warning

DolphinSearchBox::init() can generate a terminal warning depending on
the user's search history:

QFileInfo::absolutePath: Constructed with empty filename

The warning can seem to appear randomly if you don't use the search
feature often, because of its dependency on previous search activity.

Prevent this warning by adding a simple check if the current
m_searchPath is valid or not. This check has no effect on the value
returned by DolphinSearchBox::isIndexingEnabled() and is in line with
the fact that m_searchPath == QUrl() indicates that no search path has
been set.

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

Details

Committed
rjvbbApr 27 2020, 8:32 AM
Differential Revision
D29194: [dolphin] : prevent QFileInfo warning
Parents
R318:caf2fe1c4388: Add an option to show tabs from last time when Dolphin starts
Branches
Unknown
Tags
Unknown