mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:27: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:
parent
938051feb8
commit
acde7d12b0
37 changed files with 51 additions and 51 deletions
|
@ -137,7 +137,7 @@ Field::Field(GUI::Label& flag_label, GUI::Label& time_label, GUI::Button& face_b
|
|||
set_face(Face::Default);
|
||||
|
||||
{
|
||||
auto config = Core::ConfigFile::get_for_app("Minesweeper");
|
||||
auto config = Core::ConfigFile::open_for_app("Minesweeper");
|
||||
bool single_chording = config->read_num_entry("Minesweeper", "SingleChording", false);
|
||||
int mine_count = config->read_num_entry("Game", "MineCount", 10);
|
||||
int rows = config->read_num_entry("Game", "Rows", 9);
|
||||
|
@ -488,7 +488,7 @@ void Field::set_field_size(size_t rows, size_t columns, size_t mine_count)
|
|||
if (m_rows == rows && m_columns == columns && m_mine_count == mine_count)
|
||||
return;
|
||||
{
|
||||
auto config = Core::ConfigFile::get_for_app("Minesweeper", Core::ConfigFile::AllowWriting::Yes);
|
||||
auto config = Core::ConfigFile::open_for_app("Minesweeper", Core::ConfigFile::AllowWriting::Yes);
|
||||
config->write_num_entry("Game", "MineCount", mine_count);
|
||||
config->write_num_entry("Game", "Rows", rows);
|
||||
config->write_num_entry("Game", "Columns", columns);
|
||||
|
@ -503,7 +503,7 @@ void Field::set_field_size(size_t rows, size_t columns, size_t mine_count)
|
|||
|
||||
void Field::set_single_chording(bool enabled)
|
||||
{
|
||||
auto config = Core::ConfigFile::get_for_app("Minesweeper", Core::ConfigFile::AllowWriting::Yes);
|
||||
auto config = Core::ConfigFile::open_for_app("Minesweeper", Core::ConfigFile::AllowWriting::Yes);
|
||||
m_single_chording = enabled;
|
||||
config->write_bool_entry("Minesweeper", "SingleChording", m_single_chording);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue