MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / execExternal

Method execExternal

Telegram/SourceFiles/core/sandbox.cpp:659–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

657}
658
659uint64 Sandbox::execExternal(const QString &cmd) {
660 DEBUG_LOG(("Sandbox Info: executing external command '%1'").arg(cmd));
661 if (cmd == "show") {
662 if (Core::IsAppLaunched() && Core::App().activePrimaryWindow()) {
663 const auto window = Core::App().activePrimaryWindow();
664 window->activate();
665 return Platform::ActivationWindowId(window->widget());
666 } else if (const auto window = PreLaunchWindow::instance()) {
667 window->activate();
668 return Platform::ActivationWindowId(window);
669 }
670 } else if (cmd == "quit") {
671 Quit();
672 }
673 return 0;
674}
675
676} // namespace Core
677

Callers

nothing calls this directly

Calls 8

IsAppLaunchedFunction · 0.85
AppClass · 0.85
QuitFunction · 0.85
activePrimaryWindowMethod · 0.80
ActivationWindowIdFunction · 0.50
instanceFunction · 0.50
activateMethod · 0.45
widgetMethod · 0.45

Tested by

no test coverage detected