From 17e9db4fa153f5ee0149f5de1b212984522d7d48 Mon Sep 17 00:00:00 2001 From: Federico Guerinoni Date: Sat, 21 Jan 2023 00:30:05 +0100 Subject: Ladybird: Add setting for page to open on new tab --- Ladybird/Settings.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'Ladybird/Settings.cpp') 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); +} + } -- cgit v1.2.3