From 61add64f0f6766160716a771ca30a562ba2a50bd Mon Sep 17 00:00:00 2001 From: Caoimhe Date: Thu, 11 May 2023 11:40:00 +0100 Subject: [PATCH] VideoPlayer: Pledge the "VideoPlayer" configuration domain --- Userland/Applications/VideoPlayer/CMakeLists.txt | 2 +- Userland/Applications/VideoPlayer/main.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Userland/Applications/VideoPlayer/CMakeLists.txt b/Userland/Applications/VideoPlayer/CMakeLists.txt index 20aaabd61de..84baf49f571 100644 --- a/Userland/Applications/VideoPlayer/CMakeLists.txt +++ b/Userland/Applications/VideoPlayer/CMakeLists.txt @@ -17,4 +17,4 @@ set(GENERATED_SOURCES ) serenity_app(VideoPlayer ICON app-video-player) -target_link_libraries(VideoPlayer PRIVATE LibVideo LibAudio LibCore LibGfx LibGUI LibMain LibFileSystemAccessClient) +target_link_libraries(VideoPlayer PRIVATE LibVideo LibAudio LibConfig LibCore LibGfx LibGUI LibMain LibFileSystemAccessClient) diff --git a/Userland/Applications/VideoPlayer/main.cpp b/Userland/Applications/VideoPlayer/main.cpp index 8d8bd6a5408..24164de59ee 100644 --- a/Userland/Applications/VideoPlayer/main.cpp +++ b/Userland/Applications/VideoPlayer/main.cpp @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include #include #include @@ -19,7 +20,11 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_positional_argument(filename, "The video file to display.", "filename", Core::ArgsParser::Required::No); args_parser.parse(arguments); + Config::pledge_domain("VideoPlayer"); + auto app = TRY(GUI::Application::create(arguments)); + app->set_config_domain(TRY("VideoPlayer"_string)); + auto window = TRY(GUI::Window::try_create()); window->resize(640, 480); window->set_resizable(true);