mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 09:55:55 +00:00
Use faster code path
From Qt doc: Using this function is faster than using QFileInfo(file).exists() for file system access.
This commit is contained in:
parent
ed310c2dac
commit
b4f23d8154
@ -597,7 +597,7 @@ void Utils::Misc::openFolderSelect(const QString &absolutePath)
|
|||||||
{
|
{
|
||||||
const QString path = Utils::Fs::fromNativePath(absolutePath);
|
const QString path = Utils::Fs::fromNativePath(absolutePath);
|
||||||
// If the item to select doesn't exist, try to open its parent
|
// 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("/")));
|
openPath(path.left(path.lastIndexOf("/")));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user