summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLenny Maiorani <lenny@serenityos.org>2022-02-09 15:51:48 -0700
committerLinus Groh <mail@linusgroh.de>2022-02-10 10:23:51 +0000
commit4b18a25e22f4724fcde4b6add89847d9df11dc42 (patch)
tree2087390a75c2075b40af43ea40edb22d65c2c183
parented971f11345b48ff08e438d7cf4d0f997395d420 (diff)
downloadserenity-4b18a25e22f4724fcde4b6add89847d9df11dc42.zip
Applications: Port SpaceAnalyzer to LibMain
-rw-r--r--Userland/Applications/SpaceAnalyzer/CMakeLists.txt2
-rw-r--r--Userland/Applications/SpaceAnalyzer/main.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/Userland/Applications/SpaceAnalyzer/CMakeLists.txt b/Userland/Applications/SpaceAnalyzer/CMakeLists.txt
index 7b99dff2a8..f6115ea965 100644
--- a/Userland/Applications/SpaceAnalyzer/CMakeLists.txt
+++ b/Userland/Applications/SpaceAnalyzer/CMakeLists.txt
@@ -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)
diff --git a/Userland/Applications/SpaceAnalyzer/main.cpp b/Userland/Applications/SpaceAnalyzer/main.cpp
index d1b7297698..29f2f9d764 100644
--- a/Userland/Applications/SpaceAnalyzer/main.cpp
+++ b/Userland/Applications/SpaceAnalyzer/main.cpp
@@ -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(""));