diff options
author | Federico Guerinoni <guerinoni.federico@gmail.com> | 2023-01-21 00:30:05 +0100 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2023-02-03 05:10:51 -0700 |
commit | 17e9db4fa153f5ee0149f5de1b212984522d7d48 (patch) | |
tree | e1176ba98d73049c856ab2fcee2a8570d8219fb2 /Ladybird/Settings.cpp | |
parent | 80da16e54a8595130f1f849923220f6671e6c1a7 (diff) | |
download | serenity-17e9db4fa153f5ee0149f5de1b212984522d7d48.zip |
Ladybird: Add setting for page to open on new tab
Diffstat (limited to 'Ladybird/Settings.cpp')
-rw-r--r-- | Ladybird/Settings.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Ladybird/Settings.cpp b/Ladybird/Settings.cpp index 3e4e0fef3e..56baafb05d 100644 --- a/Ladybird/Settings.cpp +++ b/Ladybird/Settings.cpp @@ -8,9 +8,9 @@ namespace Browser { -Settings::Settings(QObject* parent) +Settings::Settings() { - m_qsettings = new QSettings("Serenity", "Ladybird", parent); + m_qsettings = new QSettings("Serenity", "Ladybird", this); } QString Settings::homepage() @@ -23,4 +23,14 @@ void Settings::set_homepage(QString const& homepage) m_qsettings->setValue("homepage", homepage); } +QString Settings::new_tab_page() +{ + return m_qsettings->value("new_tab_page", "about:blank").toString(); +} + +void Settings::set_new_tab_page(QString const& page) +{ + m_qsettings->setValue("new_tab_page", page); +} + } |