summaryrefslogtreecommitdiff
path: root/src/settings/privacywidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings/privacywidget.cpp')
-rw-r--r--src/settings/privacywidget.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/settings/privacywidget.cpp b/src/settings/privacywidget.cpp
index 5fcd6b83..08677068 100644
--- a/src/settings/privacywidget.cpp
+++ b/src/settings/privacywidget.cpp
@@ -48,8 +48,7 @@ PrivacyWidget::PrivacyWidget(QWidget *parent)
{
setupUi(this);
- // JAVASCRIPT
- updateJavascriptSettings(ReKonfig::javascriptEnabled());
+ reload();
// DO NOT TRACK
KConfigGroup cg = KConfigGroup(KSharedConfig::openConfig("kioslaverc", KConfig::NoGlobals), QString());
@@ -70,22 +69,15 @@ void PrivacyWidget::save()
KConfigGroup cg = KConfigGroup(KSharedConfig::openConfig("kioslaverc", KConfig::NoGlobals), QString());
cg.writeEntry("DoNotTrack", doNotTrackCheckBox->isChecked());
cg.sync();
-}
-
-bool PrivacyWidget::changed()
-{
- return _changed;
+ reload();
}
-void PrivacyWidget::hasChanged()
-{
-}
-
-
-void PrivacyWidget::updateJavascriptSettings(bool b)
+void PrivacyWidget::reload()
{
+ bool b = ReKonfig::javascriptEnabled();
+
kcfg_javascriptCanAccessClipboard->setEnabled(b);
kcfg_javascriptCanOpenWindows->setEnabled(b);
@@ -103,6 +95,19 @@ void PrivacyWidget::updateJavascriptSettings(bool b)
}
+bool PrivacyWidget::changed()
+{
+ return _changed;
+}
+
+
+void PrivacyWidget::hasChanged()
+{
+ _changed = true;
+ emit changed(true);
+}
+
+
void PrivacyWidget::launchCacheSettings()
{
QString program = QL1S("kcmshell4");