mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
VideoPlayer: Pledge the "VideoPlayer" configuration domain
This commit is contained in:
parent
17a1e2eed1
commit
61add64f0f
2 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue