summaryrefslogtreecommitdiff
path: root/src/useragent/useragentwidget.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-02-25 00:19:27 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-02-25 00:19:27 +0100
commit9d20e99fffeebe67fd8ff27cb4f9e353892f5190 (patch)
tree23462fac2e862a2f408a26f94ab024c4174c3458 /src/useragent/useragentwidget.cpp
parentrekonq 0.6.82 (diff)
downloadrekonq-9d20e99fffeebe67fd8ff27cb4f9e353892f5190.tar.xz
Coding style
Diffstat (limited to 'src/useragent/useragentwidget.cpp')
-rw-r--r--src/useragent/useragentwidget.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/useragent/useragentwidget.cpp b/src/useragent/useragentwidget.cpp
index dc4f10ea..0cdddadf 100644
--- a/src/useragent/useragentwidget.cpp
+++ b/src/useragent/useragentwidget.cpp
@@ -33,7 +33,7 @@
UserAgentWidget::UserAgentWidget(QWidget *parent)
- : QWidget(parent)
+ : QWidget(parent)
{
setupUi(this);
@@ -48,9 +48,9 @@ UserAgentWidget::UserAgentWidget(QWidget *parent)
{
QStringList tmp;
tmp << host;
-
+
KConfigGroup hostGroup(&config, host);
- tmp << hostGroup.readEntry( QL1S("UserAgent"), QString());
+ tmp << hostGroup.readEntry(QL1S("UserAgent"), QString());
kDebug() << "TMP: " << tmp;
QTreeWidgetItem *item = new QTreeWidgetItem(sitePolicyTreeWidget, tmp);
@@ -62,17 +62,17 @@ UserAgentWidget::UserAgentWidget(QWidget *parent)
void UserAgentWidget::deleteUserAgent()
{
QTreeWidgetItem *item = sitePolicyTreeWidget->currentItem();
- if(!item)
+ if (!item)
return;
-
- sitePolicyTreeWidget->takeTopLevelItem( sitePolicyTreeWidget->indexOfTopLevelItem(item) );
-
+
+ sitePolicyTreeWidget->takeTopLevelItem(sitePolicyTreeWidget->indexOfTopLevelItem(item));
+
QString host = item->text(0);
kDebug() << "HOST: " << host;
-
+
KConfig config("kio_httprc", KConfig::NoGlobals);
KConfigGroup group(&config, host);
- if(group.exists())
+ if (group.exists())
{
group.deleteGroup();
KProtocolManager::reparseConfiguration();
@@ -83,16 +83,16 @@ void UserAgentWidget::deleteUserAgent()
void UserAgentWidget::deleteAll()
{
sitePolicyTreeWidget->clear();
-
+
KConfig config("kio_httprc", KConfig::NoGlobals);
-
+
QStringList list = config.groupList();
Q_FOREACH(const QString &groupName, list)
{
- kDebug() << "HOST: " << groupName;
-
+ kDebug() << "HOST: " << groupName;
+
KConfigGroup group(&config, groupName);
- group.deleteGroup();
+ group.deleteGroup();
}
KConfigGroup group(&config, QString());
group.deleteGroup();