InputBar: use QFileInfo::exists()

Suggested by:

Clazy: Use the static QFileInfo::exists() instead. It's documented to be faster.
This commit is contained in:
Marcus Hoffmann 2021-12-03 01:01:24 +01:00
parent 5441ea8840
commit abf4b3a0a3

View file

@ -82,7 +82,7 @@ InputBar::insertMimeData(const QMimeData *md)
}
}
if (!path.isEmpty() && QFileInfo{path}.exists()) {
if (!path.isEmpty() && QFileInfo::exists(path)) {
showPreview(*md, path, formats);
} else {
nhlog::ui()->warn("Clipboard does not contain any valid file paths.");