1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:47:44 +00:00

Everywhere: Rename get in ConfigFile::get_for_{lib,app,system} to open

This patch brings the ConfigFile helpers for opening lib, app and system
configs more inline with the regular ConfigFile::open functions.
This commit is contained in:
networkException 2021-08-21 16:33:54 +02:00 committed by Andreas Kling
parent 938051feb8
commit acde7d12b0
37 changed files with 51 additions and 51 deletions

View file

@ -17,7 +17,7 @@ int main(int, char**)
return 1;
}
auto config = Core::ConfigFile::get_for_app("Audio", Core::ConfigFile::AllowWriting::Yes);
auto config = Core::ConfigFile::open_for_app("Audio", Core::ConfigFile::AllowWriting::Yes);
if (unveil(config->filename().characters(), "rwc") < 0) {
perror("unveil");
return 1;

View file

@ -19,7 +19,7 @@ int main()
return 1;
}
auto keyboard_settings_config = Core::ConfigFile::get_for_app("KeyboardSettings");
auto keyboard_settings_config = Core::ConfigFile::open_for_app("KeyboardSettings");
if (unveil("/bin/keymap", "x") < 0) {
perror("unveil /bin/keymap");

View file

@ -20,7 +20,7 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv)
auto launcher = LaunchServer::Launcher();
launcher.load_handlers();
launcher.load_config(Core::ConfigFile::get_for_app("LaunchServer"));
launcher.load_config(Core::ConfigFile::open_for_app("LaunchServer"));
if (pledge("stdio accept rpath proc exec", nullptr) < 0) {
perror("pledge");

View file

@ -37,7 +37,7 @@ LookupServer::LookupServer()
VERIFY(s_the == nullptr);
s_the = this;
auto config = Core::ConfigFile::get_for_system("LookupServer");
auto config = Core::ConfigFile::open_for_system("LookupServer");
dbgln("Using network config file at {}", config->filename());
m_nameservers = config->read_entry("DNS", "Nameservers", "1.1.1.1,1.0.0.1").split(',');

View file

@ -215,7 +215,7 @@ int main(int, char**)
// Read our config and instantiate services.
// This takes care of setting up sockets.
NonnullRefPtrVector<Service> services;
auto config = Core::ConfigFile::get_for_system("SystemServer");
auto config = Core::ConfigFile::open_for_system("SystemServer");
for (auto name : config->groups()) {
auto service = Service::construct(*config, name);
if (service->is_enabled())

View file

@ -116,7 +116,7 @@ void TaskbarWindow::create_quick_launch_bar()
quick_launch_bar.layout()->set_spacing(0);
quick_launch_bar.set_frame_thickness(0);
auto config = Core::ConfigFile::get_for_app("Taskbar");
auto config = Core::ConfigFile::open_for_app("Taskbar");
constexpr const char* quick_launch = "QuickLaunch";
// FIXME: Core::ConfigFile does not keep the order of the entries.