summaryrefslogtreecommitdiff
path: root/src/useragent
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-25 19:48:41 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-25 19:48:41 +0200
commit14664e54b1a2dbe9c06f474a0918a262dba04e20 (patch)
tree2f48b455d90b5a966045f8ba6388ac8c0620259f /src/useragent
parentLast SSL fixes (diff)
downloadrekonq-14664e54b1a2dbe9c06f474a0918a262dba04e20.tar.xz
clean up
- QL1S - one stupid kDebug less - codingstyle
Diffstat (limited to 'src/useragent')
-rw-r--r--src/useragent/useragentinfo.cpp26
-rw-r--r--src/useragent/useragentwidget.cpp4
2 files changed, 15 insertions, 15 deletions
diff --git a/src/useragent/useragentinfo.cpp b/src/useragent/useragentinfo.cpp
index 1d473ad8..82871108 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;
@@ -191,7 +191,7 @@ int UserAgentInfo::uaIndexForHost(const QString &host)
bool UserAgentInfo::providerExists(int i)
{
KService::Ptr s = m_providers.at(i);
- if(s.isNull())
+ if (s.isNull())
{
//FIXME Add me when string freeze has been reopened: KMessageBox::error(...)
return false;
diff --git a/src/useragent/useragentwidget.cpp b/src/useragent/useragentwidget.cpp
index 031a387f..92ba3ce4 100644
--- a/src/useragent/useragentwidget.cpp
+++ b/src/useragent/useragentwidget.cpp
@@ -60,7 +60,7 @@ UserAgentWidget::UserAgentWidget(QWidget *parent)
void UserAgentWidget::deleteUserAgent()
{
QTreeWidgetItem *item = sitePolicyTreeWidget->currentItem();
- if(!item)
+ if (!item)
return;
sitePolicyTreeWidget->takeTopLevelItem(sitePolicyTreeWidget->indexOfTopLevelItem(item));
@@ -69,7 +69,7 @@ void UserAgentWidget::deleteUserAgent()
KConfig config("kio_httprc", KConfig::NoGlobals);
KConfigGroup group(&config, host);
- if(group.exists())
+ if (group.exists())
{
group.deleteGroup();
KProtocolManager::reparseConfiguration();