summaryrefslogtreecommitdiff
path: root/src/settings/generalwidget.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-19 18:31:46 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-19 22:22:12 +0200
commit52a2d821885a247c82a4a5b676249c6000e947b5 (patch)
tree998d3a1e2a7059ffe4b63cd4f9316b890267f319 /src/settings/generalwidget.cpp
parenttypo (settins --> settings) (diff)
downloadrekonq-52a2d821885a247c82a4a5b676249c6000e947b5.tar.xz
Added UI option to configure the "Do Not Track" feature
Diffstat (limited to 'src/settings/generalwidget.cpp')
-rw-r--r--src/settings/generalwidget.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/settings/generalwidget.cpp b/src/settings/generalwidget.cpp
index 9f6de0d5..0b11c3f5 100644
--- a/src/settings/generalwidget.cpp
+++ b/src/settings/generalwidget.cpp
@@ -52,11 +52,20 @@ GeneralWidget::GeneralWidget(QWidget *parent)
connect(kcfg_useNewTabPage, SIGNAL(toggled(bool)), this, SLOT(disableHomeSettings(bool)));
checkKGetPresence();
+
+ KConfigGroup cg = KConfigGroup(KSharedConfig::openConfig("kioslaverc", KConfig::NoGlobals), QString());
+ doNotTrackCheckBox->setChecked( cg.readEntry("DoNotTrack", false) );
+
+ connect(doNotTrackCheckBox, SIGNAL(clicked()), this, SLOT(hasChanged()));
}
void GeneralWidget::save()
{
+ KConfigGroup cg = KConfigGroup(KSharedConfig::openConfig("kioslaverc", KConfig::NoGlobals), QString());
+ cg.writeEntry("DoNotTrack", doNotTrackCheckBox->isChecked());
+ cg.sync();
+ kDebug() << "-------------------------------------" << doNotTrackCheckBox->isChecked();
}
@@ -68,6 +77,8 @@ bool GeneralWidget::changed()
void GeneralWidget::hasChanged()
{
+ _changed = true;
+ emit changed(true);
}
@@ -88,6 +99,7 @@ void GeneralWidget::disableHomeSettings(bool b)
setHomeToCurrentPageButton->setEnabled(!b);
}
+
void GeneralWidget::checkKGetPresence()
{
if(KStandardDirs::findExe("kget").isNull())