mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Fix -debug argument
processArguments is called before ComputeDebugMode gets called, Logs::DebugEnabled gets overriden that way. Fix that by setting gDebugMode variable and checking it in ComputeDebugMode.
This commit is contained in:
@@ -94,6 +94,9 @@ void ComputeDebugMode() {
|
||||
if (file.exists() && file.open(QIODevice::ReadOnly)) {
|
||||
Logs::SetDebugEnabled(file.read(1) != "0");
|
||||
}
|
||||
if (cDebugMode()) {
|
||||
Logs::SetDebugEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
void ComputeExternalUpdater() {
|
||||
@@ -482,7 +485,7 @@ void Launcher::processArguments() {
|
||||
SetUpdaterDisabledAtStartup();
|
||||
}
|
||||
gUseFreeType = parseResult.contains("-freetype");
|
||||
Logs::SetDebugEnabled(parseResult.contains("-debug"));
|
||||
gDebugMode = parseResult.contains("-debug");
|
||||
gManyInstance = parseResult.contains("-many");
|
||||
gKeyFile = parseResult.value("-key", {}).join(QString()).toLower();
|
||||
gKeyFile = gKeyFile.replace(QRegularExpression("[^a-z0-9\\-_]"), {});
|
||||
|
Reference in New Issue
Block a user