summaryrefslogtreecommitdiff
path: root/src/useragent
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-17 16:46:24 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-17 16:46:24 +0200
commit82167d2422a4b6e3071dca68cf65a66e1da41ab4 (patch)
tree03c1f95a2aa60c48822a463cc3812b5c3415991e /src/useragent
parentImproving tab previews (diff)
downloadrekonq-82167d2422a4b6e3071dca68cf65a66e1da41ab4.tar.xz
A round of the "new" astyle 2.01...
Diffstat (limited to 'src/useragent')
-rw-r--r--src/useragent/useragentinfo.cpp24
-rw-r--r--src/useragent/useragentinfo.h2
-rw-r--r--src/useragent/useragentwidget.cpp10
3 files changed, 18 insertions, 18 deletions
diff --git a/src/useragent/useragentinfo.cpp b/src/useragent/useragentinfo.cpp
index 67390e94..1d473ad8 100644
--- a/src/useragent/useragentinfo.cpp
+++ b/src/useragent/useragentinfo.cpp
@@ -61,7 +61,7 @@ UserAgentInfo::UserAgentInfo()
QString UserAgentInfo::userAgentString(int i)
{
- if (i < 0 || !providerExists(i))
+ if(i < 0 || !providerExists(i))
{
kDebug() << "oh oh... wrong index on the user agent choice! INDEX = " << i;
return QL1S("Default");
@@ -77,12 +77,12 @@ QString UserAgentInfo::userAgentString(int i)
tmp.replace(QL1S("appMachineType"), QString(utsn.machine));
QStringList languageList = KGlobal::locale()->languageList();
- if (languageList.count())
+ if(languageList.count())
{
int ind = languageList.indexOf(QL1S("C"));
- if (ind >= 0)
+ if(ind >= 0)
{
- if (languageList.contains(QL1S("en")))
+ if(languageList.contains(QL1S("en")))
languageList.removeAt(ind);
else
languageList.value(ind) = QL1S("en");
@@ -98,7 +98,7 @@ QString UserAgentInfo::userAgentString(int i)
QString UserAgentInfo::userAgentName(int i)
{
- if (i < 0 || !providerExists(i))
+ if(i < 0 || !providerExists(i))
{
kDebug() << "oh oh... wrong index on the user agent choice! INDEX = " << i;
return QL1S("Default");
@@ -110,7 +110,7 @@ QString UserAgentInfo::userAgentName(int i)
QString UserAgentInfo::userAgentVersion(int i)
{
- if (i < 0 || !providerExists(i))
+ if(i < 0 || !providerExists(i))
{
kDebug() << "oh oh... wrong index on the user agent choice! INDEX = " << i;
return QL1S("Default");
@@ -122,7 +122,7 @@ QString UserAgentInfo::userAgentVersion(int i)
QString UserAgentInfo::userAgentDescription(int i)
{
- if (i < 0 || !providerExists(i))
+ if(i < 0 || !providerExists(i))
{
kDebug() << "oh oh... wrong index on the user agent choice! INDEX = " << i;
return QL1S("Default");
@@ -139,7 +139,7 @@ QStringList UserAgentInfo::availableUserAgents()
{
QStringList UAs;
int n = m_providers.count();
- for (int i = 0; i < n; ++i)
+ for(int i = 0; i < n; ++i)
{
UAs << userAgentDescription(i);
}
@@ -154,9 +154,9 @@ bool UserAgentInfo::setUserAgentForHost(int uaIndex, const QString &host)
QStringList modifiedHosts = config.groupList();
KConfigGroup hostGroup(&config, host);
- if (uaIndex == -1)
+ if(uaIndex == -1)
{
- if (!hostGroup.exists())
+ if(!hostGroup.exists())
{
kDebug() << "Host does NOT exists!";
return false;
@@ -178,10 +178,10 @@ int UserAgentInfo::uaIndexForHost(const QString &host)
QString KDEUserAgent = KProtocolManager::userAgentForHost(host);
int n = m_providers.count();
- for (int i = 0; i < n; ++i)
+ for(int i = 0; i < n; ++i)
{
QString rekonqUserAgent = userAgentString(i);
- if (KDEUserAgent == rekonqUserAgent)
+ if(KDEUserAgent == rekonqUserAgent)
return i;
}
return -1;
diff --git a/src/useragent/useragentinfo.h b/src/useragent/useragentinfo.h
index f95c696c..417aeea1 100644
--- a/src/useragent/useragentinfo.h
+++ b/src/useragent/useragentinfo.h
@@ -72,7 +72,7 @@ private:
QString userAgentDescription(int);
bool providerExists(int);
-
+
private:
KService::List m_providers;
};
diff --git a/src/useragent/useragentwidget.cpp b/src/useragent/useragentwidget.cpp
index 0cdddadf..f5862544 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);
@@ -44,7 +44,7 @@ UserAgentWidget::UserAgentWidget(QWidget *parent)
QStringList hosts = config.groupList();
kDebug() << "HOSTS" << hosts;
- Q_FOREACH(const QString &host, hosts)
+ Q_FOREACH(const QString & host, hosts)
{
QStringList tmp;
tmp << host;
@@ -62,7 +62,7 @@ UserAgentWidget::UserAgentWidget(QWidget *parent)
void UserAgentWidget::deleteUserAgent()
{
QTreeWidgetItem *item = sitePolicyTreeWidget->currentItem();
- if (!item)
+ if(!item)
return;
sitePolicyTreeWidget->takeTopLevelItem(sitePolicyTreeWidget->indexOfTopLevelItem(item));
@@ -72,7 +72,7 @@ void UserAgentWidget::deleteUserAgent()
KConfig config("kio_httprc", KConfig::NoGlobals);
KConfigGroup group(&config, host);
- if (group.exists())
+ if(group.exists())
{
group.deleteGroup();
KProtocolManager::reparseConfiguration();
@@ -87,7 +87,7 @@ void UserAgentWidget::deleteAll()
KConfig config("kio_httprc", KConfig::NoGlobals);
QStringList list = config.groupList();
- Q_FOREACH(const QString &groupName, list)
+ Q_FOREACH(const QString & groupName, list)
{
kDebug() << "HOST: " << groupName;