From 4b18a25e22f4724fcde4b6add89847d9df11dc42 Mon Sep 17 00:00:00 2001 From: Lenny Maiorani Date: Wed, 9 Feb 2022 15:51:48 -0700 Subject: [PATCH] Applications: Port SpaceAnalyzer to LibMain --- Userland/Applications/SpaceAnalyzer/CMakeLists.txt | 2 +- Userland/Applications/SpaceAnalyzer/main.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Userland/Applications/SpaceAnalyzer/CMakeLists.txt b/Userland/Applications/SpaceAnalyzer/CMakeLists.txt index 7b99dff2a89..f6115ea9651 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 d1b7297698d..29f2f9d7646 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 #include #include +#include #include #include #include @@ -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 serenity_main(Main::Arguments arguments) { - auto app = GUI::Application::construct(argc, argv); + auto app = GUI::Application::construct(arguments); RefPtr tree = adopt_ref(*new Tree(""));