aboutsummaryrefslogtreecommitdiff
path: root/plugins/ProfileEditor
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-09-08 15:41:10 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-09-08 17:22:24 +0200
commit5e6920c427b30232e47039d26cbaec7173c837d2 (patch)
tree6daf69335854e8106399bb2bcba27162f999f476 /plugins/ProfileEditor
parentReplace ProfileManager::profileList() with ProfileManager::idList() (diff)
downloadsmolbote-5e6920c427b30232e47039d26cbaec7173c837d2.tar.xz
Save WebProfile config when changed
Diffstat (limited to 'plugins/ProfileEditor')
-rw-r--r--plugins/ProfileEditor/forms/profileview.cpp5
-rw-r--r--plugins/ProfileEditor/forms/profileview.ui8
2 files changed, 7 insertions, 6 deletions
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 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="QLineEdit" name="name">
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
+ <widget class="QLineEdit" name="name"/>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="offTheRecord">
@@ -253,7 +249,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>584</width>
+ <width>276</width>
<height>855</height>
</rect>
</property>