2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Use static QFileInfo::exists

This commit is contained in:
Ilya Fedin
2021-03-13 23:05:36 +04:00
committed by John Preston
parent 9a73c99935
commit 508762cd2c
4 changed files with 8 additions and 8 deletions

View File

@@ -213,7 +213,7 @@ QString FileNameUnsafe(
}
QString nameBase = path + nameStart;
name = nameBase + extension;
for (int i = 0; QFileInfo(name).exists(); ++i) {
for (int i = 0; QFileInfo::exists(name); ++i) {
name = nameBase + QString(" (%1)").arg(i + 2) + extension;
}