mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
Ladybird: Add Settings class
This commit is contained in:
parent
1b682e4b2c
commit
a838004725
Notes:
sideshowbarker
2024-07-17 11:30:05 +09:00
Author: https://github.com/filiphsps
Commit: a838004725
Pull-request: https://github.com/SerenityOS/serenity/pull/16583
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/awesomekling ✅
Reviewed-by: https://github.com/linusg
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