2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Replace cDebug() with Logs::DebugEnabled().

This commit is contained in:
John Preston
2018-06-05 16:32:26 +03:00
parent 9055b33e92
commit 72f95b984f
22 changed files with 58 additions and 45 deletions

View File

@@ -39,7 +39,10 @@ QMap<QString, Fn<void()>> Codes;
void fillCodes() {
Codes.insert(qsl("debugmode"), [] {
QString text = cDebug() ? qsl("Do you want to disable DEBUG logs?") : qsl("Do you want to enable DEBUG logs?\n\nAll network events will be logged.");
QString text = Logs::DebugEnabled()
? qsl("Do you want to disable DEBUG logs?")
: qsl("Do you want to enable DEBUG logs?\n\n"
"All network events will be logged.");
Ui::show(Box<ConfirmBox>(text, [] {
Messenger::Instance().onSwitchDebugMode();
}));
@@ -59,7 +62,9 @@ void fillCodes() {
Lang::CurrentCloudManager().switchToLanguage(qsl("custom"));
});
Codes.insert(qsl("debugfiles"), [] {
if (!cDebug()) return;
if (!Logs::DebugEnabled()) {
return;
}
if (DebugLogging::FileLoader()) {
Global::RefDebugLoggingFlags() &= ~DebugLogging::FileLoaderFlag;
} else {