From b4f23d815419a3131b8d4c68f7bb47c68a62f289 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Fri, 9 Mar 2018 01:04:57 +0800 Subject: [PATCH] Use faster code path From Qt doc: Using this function is faster than using QFileInfo(file).exists() for file system access. --- src/base/utils/misc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/utils/misc.cpp b/src/base/utils/misc.cpp index d4970588a..d4027b3d2 100644 --- a/src/base/utils/misc.cpp +++ b/src/base/utils/misc.cpp @@ -597,7 +597,7 @@ void Utils::Misc::openFolderSelect(const QString &absolutePath) { const QString path = Utils::Fs::fromNativePath(absolutePath); // If the item to select doesn't exist, try to open its parent - if (!QFileInfo(path).exists()) { + if (!QFileInfo::exists(path)) { openPath(path.left(path.lastIndexOf("/"))); return; }