mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-24 18:28:57 +00:00
VideoPlayer: Pledge the "VideoPlayer" configuration domain
This commit is contained in:
parent
17a1e2eed1
commit
61add64f0f
Notes:
sideshowbarker
2024-07-17 08:36:27 +09:00
Author: https://github.com/caoimhebyrne
Commit: 61add64f0f
Pull-request: https://github.com/SerenityOS/serenity/pull/18767
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/LucasChollet
Reviewed-by: https://github.com/awesomekling
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
Add a link
Reference in a new issue