From 5e6920c427b30232e47039d26cbaec7173c837d2 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sat, 8 Sep 2018 15:41:10 +0200 Subject: Save WebProfile config when changed --- plugins/ProfileEditor/forms/profileview.cpp | 5 +++++ plugins/ProfileEditor/forms/profileview.ui | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'plugins') diff --git a/plugins/ProfileEditor/forms/profileview.cpp b/plugins/ProfileEditor/forms/profileview.cpp index 2ffb119..caa9723 100644 --- a/plugins/ProfileEditor/forms/profileview.cpp +++ b/plugins/ProfileEditor/forms/profileview.cpp @@ -20,6 +20,7 @@ void ProfileView::connectSetting(QCheckBox *checkBox, QWebEngineSettings *settin connect(checkBox, &QCheckBox::clicked, [this, settings, attr](bool checked) { this->m_isChanged = true; settings->setAttribute(attr, checked); + emit m_profile->attributeChanged(attr, checked); }); } @@ -33,6 +34,10 @@ ProfileView::ProfileView(WebProfile *profile, QWidget *parent) // general tab ui->name->setText(profile->name()); + connect(ui->name, &QLineEdit::editingFinished, profile, [=]() { + profile->setName(ui->name->text()); + }); + ui->offTheRecord->setChecked(profile->isOffTheRecord()); ui->homepage->setText(profile->homepage().toString()); diff --git a/plugins/ProfileEditor/forms/profileview.ui b/plugins/ProfileEditor/forms/profileview.ui index 2b25184..74b6d5d 100644 --- a/plugins/ProfileEditor/forms/profileview.ui +++ b/plugins/ProfileEditor/forms/profileview.ui @@ -38,11 +38,7 @@ - - - false - - + @@ -253,7 +249,7 @@ 0 0 - 584 + 276 855 -- cgit v1.2.1