mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
Ladybird: Add setting for page to open on new tab
This commit is contained in:
parent
80da16e54a
commit
17e9db4fa1
Notes:
sideshowbarker
2024-07-17 05:21:12 +09:00
Author: https://github.com/guerinoni
Commit: 17e9db4fa1
Pull-request: https://github.com/SerenityOS/serenity/pull/17116
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/AtkinsSJ
6 changed files with 26 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue