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
This commit is contained in:
Gianluca Recchia 2019-01-17 05:54:33 +01:00 committed by Jonathan White
parent 891f67a1cd
commit 9a5bbea2e4
No known key found for this signature in database
GPG Key ID: 440FC65F2E0C6E01

View File

@ -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"));
}