mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Replaced some qsl with u""_q literal.
This commit is contained in:
@@ -61,7 +61,7 @@ FilteredCommandLineArguments::FilteredCommandLineArguments(
|
||||
#endif // !Q_OS_WIN
|
||||
}
|
||||
#elif defined Q_OS_UNIX
|
||||
if (QFile::exists(cWorkingDir() + qsl("tdata/nowayland"))
|
||||
if (QFile::exists(cWorkingDir() + u"tdata/nowayland"_q)
|
||||
&& qEnvironmentVariableIsEmpty("QT_QPA_PLATFORM")) {
|
||||
LOG(("Wayland: Disable on old installations"));
|
||||
pushArgument("-platform");
|
||||
@@ -87,7 +87,7 @@ void FilteredCommandLineArguments::pushArgument(const char *text) {
|
||||
}
|
||||
|
||||
QString DebugModeSettingPath() {
|
||||
return cWorkingDir() + qsl("tdata/withdebug");
|
||||
return cWorkingDir() + u"tdata/withdebug"_q;
|
||||
}
|
||||
|
||||
void WriteDebugModeSetting() {
|
||||
@@ -113,7 +113,7 @@ void ComputeDebugMode() {
|
||||
}
|
||||
|
||||
void ComputeExternalUpdater() {
|
||||
QFile file(qsl("/etc/tdesktop/externalupdater"));
|
||||
QFile file(u"/etc/tdesktop/externalupdater"_q);
|
||||
|
||||
if (file.exists() && file.open(QIODevice::ReadOnly)) {
|
||||
QTextStream fileStream(&file);
|
||||
@@ -129,13 +129,13 @@ void ComputeExternalUpdater() {
|
||||
}
|
||||
|
||||
void ComputeFreeType() {
|
||||
if (QFile::exists(cWorkingDir() + qsl("tdata/withfreetype"))) {
|
||||
if (QFile::exists(cWorkingDir() + u"tdata/withfreetype"_q)) {
|
||||
cSetUseFreeType(true);
|
||||
}
|
||||
}
|
||||
|
||||
QString InstallBetaVersionsSettingPath() {
|
||||
return cWorkingDir() + qsl("tdata/devversion");
|
||||
return cWorkingDir() + u"tdata/devversion"_q;
|
||||
}
|
||||
|
||||
void WriteInstallBetaVersionsSetting() {
|
||||
@@ -161,7 +161,7 @@ void ComputeInstallBetaVersions() {
|
||||
|
||||
void ComputeInstallationTag() {
|
||||
InstallationTag = 0;
|
||||
auto file = QFile(cWorkingDir() + qsl("tdata/usertag"));
|
||||
auto file = QFile(cWorkingDir() + u"tdata/usertag"_q);
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
const auto result = file.read(
|
||||
reinterpret_cast<char*>(&InstallationTag),
|
||||
@@ -189,7 +189,7 @@ void ComputeInstallationTag() {
|
||||
|
||||
bool MoveLegacyAlphaFolder(const QString &folder, const QString &file) {
|
||||
const auto was = cExeDir() + folder;
|
||||
const auto now = cExeDir() + qsl("TelegramForcePortable");
|
||||
const auto now = cExeDir() + u"TelegramForcePortable"_q;
|
||||
if (QDir(was).exists() && !QDir(now).exists()) {
|
||||
const auto oldFile = was + "/tdata/" + file;
|
||||
const auto newFile = was + "/tdata/alpha";
|
||||
@@ -210,8 +210,8 @@ bool MoveLegacyAlphaFolder(const QString &folder, const QString &file) {
|
||||
}
|
||||
|
||||
bool MoveLegacyAlphaFolder() {
|
||||
if (!MoveLegacyAlphaFolder(qsl("TelegramAlpha_data"), qsl("alpha"))
|
||||
|| !MoveLegacyAlphaFolder(qsl("TelegramBeta_data"), qsl("beta"))) {
|
||||
if (!MoveLegacyAlphaFolder(u"TelegramAlpha_data"_q, u"alpha"_q)
|
||||
|| !MoveLegacyAlphaFolder(u"TelegramBeta_data"_q, u"beta"_q)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -222,8 +222,8 @@ bool CheckPortableVersionFolder() {
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto portable = cExeDir() + qsl("TelegramForcePortable");
|
||||
QFile key(portable + qsl("/tdata/alpha"));
|
||||
const auto portable = cExeDir() + u"TelegramForcePortable"_q;
|
||||
QFile key(portable + u"/tdata/alpha"_q);
|
||||
if (cAlphaVersion()) {
|
||||
Assert(*AlphaPrivateKey != 0);
|
||||
|
||||
@@ -293,7 +293,7 @@ void Launcher::init() {
|
||||
prepareSettings();
|
||||
initQtMessageLogging();
|
||||
|
||||
QApplication::setApplicationName(qsl("TelegramDesktop"));
|
||||
QApplication::setApplicationName(u"TelegramDesktop"_q);
|
||||
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
|
||||
QApplication::setHighDpiScaleFactorRoundingPolicy(
|
||||
Qt::HighDpiScaleFactorRoundingPolicy::Floor);
|
||||
@@ -326,7 +326,7 @@ int Launcher::exec() {
|
||||
|
||||
if (Logs::DebugEnabled()) {
|
||||
const auto openalLogPath = QDir::toNativeSeparators(
|
||||
cWorkingDir() + qsl("DebugLogs/last_openal_log.txt"));
|
||||
cWorkingDir() + u"DebugLogs/last_openal_log.txt"_q);
|
||||
|
||||
qputenv("ALSOFT_LOGLEVEL", "3");
|
||||
|
||||
@@ -350,7 +350,7 @@ int Launcher::exec() {
|
||||
if (!UpdaterDisabled() && cRestartingUpdate()) {
|
||||
DEBUG_LOG(("Sandbox Info: executing updater to install update."));
|
||||
if (!launchUpdater(UpdaterLaunch::PerformUpdate)) {
|
||||
base::Platform::DeleteDirectory(cWorkingDir() + qsl("tupdates/temp"));
|
||||
base::Platform::DeleteDirectory(cWorkingDir() + u"tupdates/temp"_q);
|
||||
}
|
||||
} else if (cRestarting()) {
|
||||
DEBUG_LOG(("Sandbox Info: executing Telegram because of restart."));
|
||||
|
Reference in New Issue
Block a user