Applications: Port SpaceAnalyzer to LibMain

This commit is contained in:
Lenny Maiorani 2022-02-09 15:51:48 -07:00 committed by Linus Groh
parent ed971f1134
commit 4b18a25e22
Notes: sideshowbarker 2024-07-17 19:04:22 +09:00
2 changed files with 5 additions and 4 deletions

View file

@ -12,4 +12,4 @@ set(SOURCES
)
serenity_app(SpaceAnalyzer ICON app-space-analyzer)
target_link_libraries(SpaceAnalyzer LibDesktop LibGfx LibGUI)
target_link_libraries(SpaceAnalyzer LibDesktop LibGfx LibGUI LibMain)

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, the SerenityOS developers.
* Copyright (c) 2021-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -24,6 +24,7 @@
#include <LibGUI/Menubar.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/Statusbar.h>
#include <LibMain/Main.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
@ -298,9 +299,9 @@ static String get_absolute_path_to_selected_node(const SpaceAnalyzer::TreeMapWid
return path_builder.build();
}
int main(int argc, char* argv[])
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
auto app = GUI::Application::construct(argc, argv);
auto app = GUI::Application::construct(arguments);
RefPtr<Tree> tree = adopt_ref(*new Tree(""));