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

Replace str_const with base::const_string.

This commit is contained in:
John Preston
2020-01-29 12:44:37 +03:00
parent c03df169b3
commit 74d848311b
18 changed files with 89 additions and 114 deletions

View File

@@ -42,7 +42,7 @@ using Platform::File::internal::EscapeShell;
namespace {
constexpr auto kDesktopFile = str_const(":/misc/telegramdesktop.desktop");
constexpr auto kDesktopFile = ":/misc/telegramdesktop.desktop"_cs;
#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION
void SandboxAutostart(bool autostart) {
@@ -121,14 +121,14 @@ bool GenerateDesktopFile(const QString &targetPath, const QString &args) {
QString fileText;
QFile source(str_const_toString(kDesktopFile));
QFile source(kDesktopFile.utf16());
if (source.open(QIODevice::ReadOnly)) {
QTextStream s(&source);
fileText = s.readAll();
source.close();
} else {
LOG(("App Error: Could not open '%1' for read")
.arg(str_const_toString(kDesktopFile)));
.arg(kDesktopFile.utf16()));
return false;
}