mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:17:35 +00:00
Ladybird: Add Settings class
This commit is contained in:
parent
1b682e4b2c
commit
a838004725
5 changed files with 61 additions and 1 deletions
26
Ladybird/Settings.cpp
Normal file
26
Ladybird/Settings.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Filiph Sandström <filiph.sandstrom@filfatstudios.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "Settings.h"
|
||||
|
||||
namespace Browser {
|
||||
|
||||
Settings::Settings()
|
||||
{
|
||||
m_qsettings = new QSettings("Serenity", "Ladybird");
|
||||
}
|
||||
|
||||
QString Settings::homepage()
|
||||
{
|
||||
return m_qsettings->value("homepage", "https://www.serenityos.org/").toString();
|
||||
}
|
||||
|
||||
void Settings::set_homepage(QString const& homepage)
|
||||
{
|
||||
m_qsettings->setValue("homepage", homepage);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue