mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-21 08:33:45 +08:00
Have a global Core::Launcher accessor
This allows to use Launcher in code executing before Sandbox is created
This commit is contained in:
@@ -24,8 +24,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
namespace Platform {
|
||||
namespace {
|
||||
|
||||
Launcher *LauncherInstance = nullptr;
|
||||
|
||||
class Arguments {
|
||||
public:
|
||||
void push(QByteArray argument) {
|
||||
@@ -50,15 +48,6 @@ private:
|
||||
Launcher::Launcher(int argc, char *argv[])
|
||||
: Core::Launcher(argc, argv)
|
||||
, _arguments(argv, argv + argc) {
|
||||
Expects(LauncherInstance == nullptr);
|
||||
|
||||
LauncherInstance = this;
|
||||
}
|
||||
|
||||
Launcher &Launcher::Instance() {
|
||||
Expects(LauncherInstance != nullptr);
|
||||
|
||||
return *LauncherInstance;
|
||||
}
|
||||
|
||||
int Launcher::exec() {
|
||||
|
||||
Reference in New Issue
Block a user