mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
config: Stop using DeprecatedString
This commit is contained in:
parent
739e657ad0
commit
f7375d664c
Notes:
sideshowbarker
2024-07-16 21:10:28 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/f7375d664c Pull-request: https://github.com/SerenityOS/serenity/pull/17793 Reviewed-by: https://github.com/krkk Reviewed-by: https://github.com/trflynn89
1 changed files with 7 additions and 7 deletions
|
@ -12,10 +12,10 @@
|
|||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
Core::EventLoop loop;
|
||||
DeprecatedString domain;
|
||||
DeprecatedString group;
|
||||
DeprecatedString key;
|
||||
DeprecatedString value_to_write;
|
||||
StringView domain;
|
||||
StringView group;
|
||||
StringView key;
|
||||
StringView value_to_write;
|
||||
bool remove = false;
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
|
@ -28,19 +28,19 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.parse(arguments);
|
||||
|
||||
if (remove) {
|
||||
if (!key.is_null())
|
||||
if (!key.is_empty())
|
||||
Config::remove_key(domain, group, key);
|
||||
else
|
||||
Config::remove_group(domain, group);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (key.is_null() && value_to_write.is_null()) {
|
||||
if (key.is_empty() && value_to_write.is_empty()) {
|
||||
Config::add_group(domain, group);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!key.is_null() && !value_to_write.is_null()) {
|
||||
if (!key.is_empty() && !value_to_write.is_empty()) {
|
||||
Config::write_string(domain, group, key, value_to_write);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue