mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
Replaced some qsl with u""_q literal.
This commit is contained in:
@@ -143,7 +143,7 @@ void applyReadContext(ReadSettingsContext &&context) {
|
||||
|
||||
bool _readOldSettings(bool remove, ReadSettingsContext &context) {
|
||||
bool result = false;
|
||||
QFile file(cWorkingDir() + qsl("tdata/config"));
|
||||
auto file = QFile(cWorkingDir() + u"tdata/config"_q);
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
LOG(("App Info: reading old config..."));
|
||||
QDataStream stream(&file);
|
||||
@@ -240,9 +240,9 @@ void _readOldUserSettingsFields(
|
||||
bool _readOldUserSettings(bool remove, ReadSettingsContext &context) {
|
||||
bool result = false;
|
||||
// We dropped old test authorizations when migrated to multi auth.
|
||||
//const auto testPrefix = (cTestMode() ? qsl("_test") : QString());
|
||||
//const auto testPrefix = (cTestMode() ? u"_test"_q : QString());
|
||||
const auto testPrefix = QString();
|
||||
QFile file(cWorkingDir() + cDataFile() + testPrefix + qsl("_config"));
|
||||
QFile file(cWorkingDir() + cDataFile() + testPrefix + u"_config"_q);
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
LOG(("App Info: reading old user config..."));
|
||||
qint32 version = 0;
|
||||
@@ -321,7 +321,7 @@ void _readOldMtpDataFields(
|
||||
bool _readOldMtpData(bool remove, ReadSettingsContext &context) {
|
||||
bool result = false;
|
||||
// We dropped old test authorizations when migrated to multi auth.
|
||||
//const auto testPostfix = (cTestMode() ? qsl("_test") : QString());
|
||||
//const auto testPostfix = (cTestMode() ? u"_test"_q : QString());
|
||||
const auto testPostfix = QString();
|
||||
QFile file(cWorkingDir() + cDataFile() + testPostfix);
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
@@ -355,13 +355,13 @@ void start() {
|
||||
|
||||
_localLoader = new TaskQueue(kFileLoaderQueueStopTimeout);
|
||||
|
||||
_basePath = cWorkingDir() + qsl("tdata/");
|
||||
_basePath = cWorkingDir() + u"tdata/"_q;
|
||||
if (!QDir().exists(_basePath)) QDir().mkpath(_basePath);
|
||||
|
||||
ReadSettingsContext context;
|
||||
FileReadDescriptor settingsData;
|
||||
// We dropped old test authorizations when migrated to multi auth.
|
||||
//const auto name = cTestMode() ? qsl("settings_test") : qsl("settings");
|
||||
//const auto name = cTestMode() ? u"settings_test"_q : u"settings"_q;
|
||||
const auto name = u"settings"_q;
|
||||
if (!ReadFile(settingsData, name, _basePath)) {
|
||||
_readOldSettings(true, context);
|
||||
@@ -442,7 +442,7 @@ void writeSettings() {
|
||||
if (!QDir().exists(_basePath)) QDir().mkpath(_basePath);
|
||||
|
||||
// We dropped old test authorizations when migrated to multi auth.
|
||||
//const auto name = cTestMode() ? qsl("settings_test") : qsl("settings");
|
||||
//const auto name = cTestMode() ? u"settings_test"_q : u"settings"_q;
|
||||
const auto name = u"settings"_q;
|
||||
FileWriteDescriptor settings(name, _basePath);
|
||||
if (_settingsSalt.isEmpty() || !SettingsKey) {
|
||||
|
Reference in New Issue
Block a user