From 9a5bbea2e4a91775804de697cc2e49cb33a8fc7f Mon Sep 17 00:00:00 2001 From: Gianluca Recchia Date: Thu, 17 Jan 2019 05:54:33 +0100 Subject: [PATCH] Use QFileInfo's exists() static method The exists() static method is documented to be faster than its equivalent member method. See https://doc.qt.io/qt-5/qfileinfo.html#exists-1 --- src/gui/DatabaseWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index 134cbb12..9d52af78 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -1532,7 +1532,7 @@ bool DatabaseWidget::saveAs() { while (true) { QString oldFilePath = m_db->filePath(); - if (!QFileInfo(oldFilePath).exists()) { + if (!QFileInfo::exists(oldFilePath)) { oldFilePath = QDir::toNativeSeparators(config()->get("LastDir", QDir::homePath()).toString() + "/" + tr("Passwords").append(".kdbx")); }