Skip to content

Commit 07cf221

Browse files
sppmacdawesomekling
authored andcommitted
LibDesktop: Add Launcher::ensure_connection()
This can be use force connection at startup and not to leave 'unix' pledge all the time.
1 parent 3022bad commit 07cf221

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Userland/Libraries/LibDesktop/Launcher.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ static LaunchServerConnection& connection()
5050
return connection;
5151
}
5252

53+
void Launcher::ensure_connection()
54+
{
55+
[[maybe_unused]] auto& conn = connection();
56+
}
57+
5358
ErrorOr<void> Launcher::add_allowed_url(URL const& url)
5459
{
5560
auto response_or_error = connection().try_add_allowed_url(url);

Userland/Libraries/LibDesktop/Launcher.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class Launcher {
3131
static NonnullRefPtr<Details> from_details_str(const String&);
3232
};
3333

34+
static void ensure_connection();
3435
static ErrorOr<void> add_allowed_url(URL const&);
3536
static ErrorOr<void> add_allowed_handler_with_any_url(String const& handler);
3637
static ErrorOr<void> add_allowed_handler_with_only_specific_urls(String const& handler, Vector<URL> const&);

0 commit comments

Comments
 (0)