From a3ee1e4ed516b2c8cc073ae5a81fe35f4e7a035b Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 11 Aug 2021 05:15:28 +0400 Subject: [PATCH] Remove mentions of unused -testmode flag --- Telegram/SourceFiles/_other/updater_linux.cpp | 4 ---- Telegram/SourceFiles/_other/updater_osx.m | 5 +---- Telegram/SourceFiles/_other/updater_win.cpp | 5 +---- Telegram/SourceFiles/core/launcher.cpp | 1 - 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/Telegram/SourceFiles/_other/updater_linux.cpp b/Telegram/SourceFiles/_other/updater_linux.cpp index c5cfe12696..660fdc7cca 100644 --- a/Telegram/SourceFiles/_other/updater_linux.cpp +++ b/Telegram/SourceFiles/_other/updater_linux.cpp @@ -384,7 +384,6 @@ int main(int argc, char *argv[]) { bool writeprotected = false; bool tosettings = false; bool startintray = false; - bool testmode = false; bool externalupdater = false; bool customWorkingDir = false; @@ -399,8 +398,6 @@ int main(int argc, char *argv[]) { debug = _debug = true; } else if (equal(argv[i], "-startintray")) { startintray = true; - } else if (equal(argv[i], "-testmode")) { - testmode = true; } else if (equal(argv[i], "-externalupdater")) { externalupdater = true; } else if (equal(argv[i], "-tosettings")) { @@ -503,7 +500,6 @@ int main(int argc, char *argv[]) { if (autostart) push("-autostart"); if (debug) push("-debug"); if (startintray) push("-startintray"); - if (testmode) push("-testmode"); if (externalupdater) push("-externalupdater"); if (tosettings) push("-tosettings"); if (key) { diff --git a/Telegram/SourceFiles/_other/updater_osx.m b/Telegram/SourceFiles/_other/updater_osx.m index 24bbe3092f..72358ce81f 100644 --- a/Telegram/SourceFiles/_other/updater_osx.m +++ b/Telegram/SourceFiles/_other/updater_osx.m @@ -90,7 +90,7 @@ int main(int argc, const char * argv[]) { openLog(); pid_t procId = 0; - BOOL update = YES, toSettings = NO, autoStart = NO, startInTray = NO, testMode = NO, freeType = NO, externalUpdater = NO; + BOOL update = YES, toSettings = NO, autoStart = NO, startInTray = NO, freeType = NO, externalUpdater = NO; BOOL customWorkingDir = NO; NSString *key = nil; for (int i = 0; i < argc; ++i) { @@ -114,8 +114,6 @@ int main(int argc, const char * argv[]) { _debug = YES; } else if ([@"-startintray" isEqualToString:[NSString stringWithUTF8String:argv[i]]]) { startInTray = YES; - } else if ([@"-testmode" isEqualToString:[NSString stringWithUTF8String:argv[i]]]) { - testMode = YES; } else if ([@"-freetype" isEqualToString:[NSString stringWithUTF8String:argv[i]]]) { freeType = YES; } else if ([@"-externalupdater" isEqualToString:[NSString stringWithUTF8String:argv[i]]]) { @@ -256,7 +254,6 @@ int main(int argc, const char * argv[]) { if (toSettings) [args addObject:@"-tosettings"]; if (_debug) [args addObject:@"-debug"]; if (startInTray) [args addObject:@"-startintray"]; - if (testMode) [args addObject:@"-testmode"]; if (freeType) [args addObject:@"-freetype"]; if (externalUpdater) [args addObject:@"-externalupdater"]; if (autoStart) [args addObject:@"-autostart"]; diff --git a/Telegram/SourceFiles/_other/updater_win.cpp b/Telegram/SourceFiles/_other/updater_win.cpp index 172a716566..bbb495a5fc 100644 --- a/Telegram/SourceFiles/_other/updater_win.cpp +++ b/Telegram/SourceFiles/_other/updater_win.cpp @@ -343,7 +343,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prevInstance, LPWSTR cmdPara LPWSTR *args; int argsCount; - bool needupdate = false, autostart = false, debug = false, writeprotected = false, startintray = false, testmode = false, freetype = false, externalupdater = false; + bool needupdate = false, autostart = false, debug = false, writeprotected = false, startintray = false, freetype = false, externalupdater = false; args = CommandLineToArgvW(GetCommandLine(), &argsCount); if (args) { for (int i = 1; i < argsCount; ++i) { @@ -357,8 +357,6 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prevInstance, LPWSTR cmdPara openLog(); } else if (equal(args[i], L"-startintray")) { startintray = true; - } else if (equal(args[i], L"-testmode")) { - testmode = true; } else if (equal(args[i], L"-freetype")) { freetype = true; } else if (equal(args[i], L"-externalupdater")) { @@ -432,7 +430,6 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prevInstance, LPWSTR cmdPara if (autostart) targs += L" -autostart"; if (debug) targs += L" -debug"; if (startintray) targs += L" -startintray"; - if (testmode) targs += L" -testmode"; if (freetype) targs += L" -freetype"; if (externalupdater) targs += L" -externalupdater"; if (!customWorkingDir.empty()) { diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp index 362432bfff..32b9c691d8 100644 --- a/Telegram/SourceFiles/core/launcher.cpp +++ b/Telegram/SourceFiles/core/launcher.cpp @@ -446,7 +446,6 @@ void Launcher::processArguments() { AllLeftValues, }; auto parseMap = std::map { - { "-testmode" , KeyFormat::NoValues }, { "-debug" , KeyFormat::NoValues }, { "-freetype" , KeyFormat::NoValues }, { "-many" , KeyFormat::NoValues },