summaryrefslogtreecommitdiff
path: root/src/opensearch/opensearchengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opensearch/opensearchengine.cpp')
-rw-r--r--src/opensearch/opensearchengine.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/opensearch/opensearchengine.cpp b/src/opensearch/opensearchengine.cpp
index febcebea..dcd0f8b4 100644
--- a/src/opensearch/opensearchengine.cpp
+++ b/src/opensearch/opensearchengine.cpp
@@ -43,15 +43,15 @@
OpenSearchEngine::OpenSearchEngine(QObject *parent)
- : QObject(parent)
- , m_parser(0)
+ : QObject(parent)
+ , m_parser(0)
{
}
OpenSearchEngine::~OpenSearchEngine()
{
- if (m_parser)
+ if (m_parser)
{
delete m_parser;
}
@@ -64,10 +64,10 @@ QString OpenSearchEngine::parseTemplate(const QString &searchTerm, const QString
// Simple conversion to RFC 3066.
language = language.replace(QL1C('_'), QL1C('-'));
QString country = language;
- country = (country.remove(0, country.indexOf(QL1C('-'))+1)).toLower();
+ country = (country.remove(0, country.indexOf(QL1C('-')) + 1)).toLower();
const int firstDashPosition = country.indexOf(QL1C('-'));
if (firstDashPosition >= 0)
- country = country.mid(firstDashPosition+1);
+ country = country.mid(firstDashPosition + 1);
QString result = searchTemplate;
result.replace(QL1S("{count}"), QL1S("20"));
@@ -121,7 +121,7 @@ void OpenSearchEngine::setSearchUrlTemplate(const QString &searchUrlTemplate)
KUrl OpenSearchEngine::searchUrl(const QString &searchTerm) const
{
- if (m_searchUrlTemplate.isEmpty())
+ if (m_searchUrlTemplate.isEmpty())
{
return KUrl();
}
@@ -129,7 +129,7 @@ KUrl OpenSearchEngine::searchUrl(const QString &searchTerm) const
KUrl retVal = KUrl::fromEncoded(parseTemplate(searchTerm, m_searchUrlTemplate).toUtf8());
QList<Parameter>::const_iterator i;
- for ( i = m_searchParameters.constBegin(); i != m_searchParameters.constEnd(); ++i)
+ for (i = m_searchParameters.constBegin(); i != m_searchParameters.constEnd(); ++i)
{
retVal.addQueryItem(i->first, parseTemplate(searchTerm, i->second));
}
@@ -158,7 +158,7 @@ void OpenSearchEngine::setSuggestionsUrlTemplate(const QString &suggestionsUrlTe
KUrl OpenSearchEngine::suggestionsUrl(const QString &searchTerm) const
{
- if (m_suggestionsUrlTemplate.isEmpty())
+ if (m_suggestionsUrlTemplate.isEmpty())
{
return KUrl();
}
@@ -166,7 +166,7 @@ KUrl OpenSearchEngine::suggestionsUrl(const QString &searchTerm) const
KUrl retVal = KUrl::fromEncoded(parseTemplate(searchTerm, m_suggestionsUrlTemplate).toUtf8());
QList<Parameter>::const_iterator i;
- for( i = m_suggestionsParameters.constBegin(); i != m_suggestionsParameters.constEnd(); ++i)
+ for (i = m_suggestionsParameters.constBegin(); i != m_suggestionsParameters.constEnd(); ++i)
{
retVal.addQueryItem(i->first, parseTemplate(searchTerm, i->second));
}