mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
Userland: Convert command line arguments to String/StringView
StringView was used where possible. Some utilities still use libc functions which expect null-terminated strings, so String objects were used there instead.
This commit is contained in:
parent
fded8f861d
commit
60f6bc902b
25 changed files with 101 additions and 100 deletions
|
@ -140,7 +140,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
|
||||
char const* coredump_path = nullptr;
|
||||
String coredump_path {};
|
||||
bool unlink_on_exit = false;
|
||||
StringBuilder full_backtrace;
|
||||
|
||||
|
@ -265,7 +265,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto& debug_button = *widget->find_descendant_of_type_named<GUI::Button>("debug_button");
|
||||
debug_button.set_icon(TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-hack-studio.png")));
|
||||
debug_button.on_click = [&](int) {
|
||||
GUI::Process::spawn_or_show_error(window, "/bin/HackStudio", Array { "-c", coredump_path });
|
||||
GUI::Process::spawn_or_show_error(window, "/bin/HackStudio", Array { "-c", coredump_path.characters() });
|
||||
};
|
||||
|
||||
auto& save_backtrace_button = *widget->find_descendant_of_type_named<GUI::Button>("save_backtrace_button");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue