VideoPlayer: Pledge the "VideoPlayer" configuration domain

This commit is contained in:
Caoimhe 2023-05-11 11:40:00 +01:00 committed by Andrew Kaster
parent 17a1e2eed1
commit 61add64f0f
2 changed files with 6 additions and 1 deletions

View file

@ -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)

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibConfig/Client.h>
#include <LibCore/ArgsParser.h>
#include <LibGUI/Application.h>
#include <LibGUI/Icon.h>
@ -19,7 +20,11 @@ ErrorOr<int> 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);