mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Provide access to un-joined argument list in Core::Launcher
This allows to re-use the variable in Linux-specific code
This commit is contained in:
@@ -46,14 +46,13 @@ private:
|
||||
} // namespace
|
||||
|
||||
Launcher::Launcher(int argc, char *argv[])
|
||||
: Core::Launcher(argc, argv)
|
||||
, _arguments(argv, argv + argc) {
|
||||
: Core::Launcher(argc, argv) {
|
||||
}
|
||||
|
||||
int Launcher::exec() {
|
||||
for (auto i = begin(_arguments), e = end(_arguments); i != e; ++i) {
|
||||
if (*i == "-webviewhelper" && std::distance(i, e) > 1) {
|
||||
Webview::WebKitGTK::SetSocketPath(*(i + 1));
|
||||
for (auto i = arguments().begin(), e = arguments().end(); i != e; ++i) {
|
||||
if (*i == u"-webviewhelper"_q && std::distance(i, e) > 1) {
|
||||
Webview::WebKitGTK::SetSocketPath((i + 1)->toStdString());
|
||||
return Webview::WebKitGTK::Exec();
|
||||
}
|
||||
}
|
||||
|
@@ -21,8 +21,6 @@ private:
|
||||
void initHook() override;
|
||||
bool launchUpdater(UpdaterLaunch action) override;
|
||||
|
||||
std::vector<std::string> _arguments;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Platform
|
||||
|
Reference in New Issue
Block a user