summaryrefslogtreecommitdiff
path: root/src/opensearch/searchengine.cpp
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/opensearch/searchengine.cpp
parentImproving tab previews (diff)
downloadrekonq-82167d2422a4b6e3071dca68cf65a66e1da41ab4.tar.xz
A round of the "new" astyle 2.01...
Diffstat (limited to 'src/opensearch/searchengine.cpp')
-rw-r--r--src/opensearch/searchengine.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/opensearch/searchengine.cpp b/src/opensearch/searchengine.cpp
index 974bcc77..09eb5891 100644
--- a/src/opensearch/searchengine.cpp
+++ b/src/opensearch/searchengine.cpp
@@ -61,10 +61,10 @@ void SearchEngine::reload()
favoriteEngines = cg.readEntry("FavoriteSearchEngines", favoriteEngines);
KService::List favorites;
KService::Ptr service;
- Q_FOREACH(const QString &engine, favoriteEngines)
+ Q_FOREACH(const QString & engine, favoriteEngines)
{
service = KService::serviceByDesktopPath(QString("searchproviders/%1.desktop").arg(engine));
- if (service)
+ if(service)
{
QUrl url = service->property("Query").toUrl();
kDebug() << "ENGINE URL: " << url;
@@ -85,7 +85,7 @@ void SearchEngine::reload()
QString SearchEngine::delimiter()
{
- if (!d->isLoaded)
+ if(!d->isLoaded)
reload();
return d->delimiter;
@@ -94,7 +94,7 @@ QString SearchEngine::delimiter()
KService::List SearchEngine::favorites()
{
- if (!d->isLoaded)
+ if(!d->isLoaded)
reload();
return d->favorites;
@@ -103,7 +103,7 @@ KService::List SearchEngine::favorites()
KService::Ptr SearchEngine::defaultEngine()
{
- if (!d->isLoaded)
+ if(!d->isLoaded)
reload();
return d->defaultEngine;
@@ -116,13 +116,13 @@ KService::Ptr SearchEngine::fromString(const QString &text)
int i = 0;
bool found = false;
KService::Ptr service;
- while (!found && i < providers.size())
+ while(!found && i < providers.size())
{
QStringList list = providers.at(i)->property("Keys").toStringList();
- Q_FOREACH(const QString &key, list)
+ Q_FOREACH(const QString & key, list)
{
const QString searchPrefix = key + delimiter();
- if (text.startsWith(searchPrefix))
+ if(text.startsWith(searchPrefix))
{
service = providers.at(i);
found = true;
@@ -137,7 +137,7 @@ KService::Ptr SearchEngine::fromString(const QString &text)
QString SearchEngine::buildQuery(KService::Ptr engine, const QString &text)
{
- if (!engine)
+ if(!engine)
return QString();
QString query = engine->property("Query").toString();
query = query.replace("\\{@}", KUrl::toPercentEncoding(text));