2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-08 18:36:16 +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

@@ -153,7 +153,7 @@ bool FileParser::readKeyValue(const char *&from, const char *end) {
}
QByteArray FileParser::ReadFile(const QString &absolutePath, const QString &relativePath) {
QFile file(QFileInfo(relativePath).exists() ? relativePath : absolutePath);
QFile file(QFileInfo::exists(relativePath) ? relativePath : absolutePath);
if (!file.open(QIODevice::ReadOnly)) {
Ui::Integration::Instance().writeLogEntry(u"Lang Error: Could not open file at '%1' ('%2')"_q.arg(relativePath, absolutePath));
return QByteArray();