From f980cade395bbcb5c26d1e4d064b42a4397f4f11 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 6 Nov 2020 14:21:19 +0400 Subject: [PATCH] Use static QFile methods in linux platform code --- .../platform/linux/specific_linux.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index b27979c687..deb0e32683 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -272,8 +272,8 @@ bool GenerateDesktopFile( if (IsStaticBinary()) { DEBUG_LOG(("App Info: removing old .desktop files")); - QFile(qsl("%1telegram.desktop").arg(targetPath)).remove(); - QFile(qsl("%1telegramdesktop.desktop").arg(targetPath)).remove(); + QFile::remove(qsl("%1telegram.desktop").arg(targetPath)); + QFile::remove(qsl("%1telegramdesktop.desktop").arg(targetPath)); } return true; @@ -986,9 +986,9 @@ QString psAppDataPath() { if (!home.isEmpty()) { auto oldPath = home + qsl(".TelegramDesktop/"); auto oldSettingsBase = oldPath + qsl("tdata/settings"); - if (QFile(oldSettingsBase + '0').exists() - || QFile(oldSettingsBase + '1').exists() - || QFile(oldSettingsBase + 's').exists()) { + if (QFile::exists(oldSettingsBase + '0') + || QFile::exists(oldSettingsBase + '1') + || QFile::exists(oldSettingsBase + 's')) { return oldPath; } } @@ -1140,15 +1140,15 @@ void InstallLauncher(bool force) { if (!QDir(icons).exists()) QDir().mkpath(icons); const auto icon = icons + kIconName.utf16() + qsl(".png"); - auto iconExists = QFile(icon).exists(); + auto iconExists = QFile::exists(icon); if (Local::oldSettingsVersion() < 10021 && iconExists) { // Icon was changed. - if (QFile(icon).remove()) { + if (QFile::remove(icon)) { iconExists = false; } } if (!iconExists) { - if (QFile(qsl(":/gui/art/logo_256.png")).copy(icon)) { + if (QFile::copy(qsl(":/gui/art/logo_256.png"), icon)) { DEBUG_LOG(("App Info: Icon copied to '%1'").arg(icon)); } }