Use static QFile methods in linux platform code
This commit is contained in:
parent
3d18d28dc5
commit
f980cade39
|
@ -272,8 +272,8 @@ bool GenerateDesktopFile(
|
||||||
|
|
||||||
if (IsStaticBinary()) {
|
if (IsStaticBinary()) {
|
||||||
DEBUG_LOG(("App Info: removing old .desktop files"));
|
DEBUG_LOG(("App Info: removing old .desktop files"));
|
||||||
QFile(qsl("%1telegram.desktop").arg(targetPath)).remove();
|
QFile::remove(qsl("%1telegram.desktop").arg(targetPath));
|
||||||
QFile(qsl("%1telegramdesktop.desktop").arg(targetPath)).remove();
|
QFile::remove(qsl("%1telegramdesktop.desktop").arg(targetPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -986,9 +986,9 @@ QString psAppDataPath() {
|
||||||
if (!home.isEmpty()) {
|
if (!home.isEmpty()) {
|
||||||
auto oldPath = home + qsl(".TelegramDesktop/");
|
auto oldPath = home + qsl(".TelegramDesktop/");
|
||||||
auto oldSettingsBase = oldPath + qsl("tdata/settings");
|
auto oldSettingsBase = oldPath + qsl("tdata/settings");
|
||||||
if (QFile(oldSettingsBase + '0').exists()
|
if (QFile::exists(oldSettingsBase + '0')
|
||||||
|| QFile(oldSettingsBase + '1').exists()
|
|| QFile::exists(oldSettingsBase + '1')
|
||||||
|| QFile(oldSettingsBase + 's').exists()) {
|
|| QFile::exists(oldSettingsBase + 's')) {
|
||||||
return oldPath;
|
return oldPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1140,15 +1140,15 @@ void InstallLauncher(bool force) {
|
||||||
if (!QDir(icons).exists()) QDir().mkpath(icons);
|
if (!QDir(icons).exists()) QDir().mkpath(icons);
|
||||||
|
|
||||||
const auto icon = icons + kIconName.utf16() + qsl(".png");
|
const auto icon = icons + kIconName.utf16() + qsl(".png");
|
||||||
auto iconExists = QFile(icon).exists();
|
auto iconExists = QFile::exists(icon);
|
||||||
if (Local::oldSettingsVersion() < 10021 && iconExists) {
|
if (Local::oldSettingsVersion() < 10021 && iconExists) {
|
||||||
// Icon was changed.
|
// Icon was changed.
|
||||||
if (QFile(icon).remove()) {
|
if (QFile::remove(icon)) {
|
||||||
iconExists = false;
|
iconExists = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!iconExists) {
|
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));
|
DEBUG_LOG(("App Info: Icon copied to '%1'").arg(icon));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue