diff options
author | Mustafa Quraish <mustafaq9@gmail.com> | 2021-11-22 18:56:43 -0500 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-11-22 21:13:42 -0800 |
commit | a0ef6554516029605d743880c78e674c1546640b (patch) | |
tree | dd522b22a6aa10166a7c7e5faad4c96e8a2853c4 | |
parent | 3ca00c8ae6858869e08a9827fb9b3ddc511110f6 (diff) | |
download | serenity-a0ef6554516029605d743880c78e674c1546640b.zip |
LibGUI: Let Application constructor accept in Main::Arguments
Instead of manually passing in `arguments.argc` and `arguments.argv`,
we can now just pass in the arguments directly.
-rw-r--r-- | Userland/Libraries/LibGUI/Application.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/Application.h b/Userland/Libraries/LibGUI/Application.h index 31c4a421a9..09b1f50a22 100644 --- a/Userland/Libraries/LibGUI/Application.h +++ b/Userland/Libraries/LibGUI/Application.h @@ -16,6 +16,7 @@ #include <LibGUI/Shortcut.h> #include <LibGUI/Widget.h> #include <LibGfx/Point.h> +#include <LibMain/Main.h> namespace GUI { @@ -85,6 +86,10 @@ public: private: Application(int argc, char** argv, Core::EventLoop::MakeInspectable = Core::EventLoop::MakeInspectable::No); + Application(Main::Arguments const& arguments, Core::EventLoop::MakeInspectable inspectable = Core::EventLoop::MakeInspectable::No) + : Application(arguments.argc, arguments.argv, inspectable) + { + } virtual void event(Core::Event&) override; |