summaryrefslogtreecommitdiff
path: root/src/opensearch/opensearchreader.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-10-31 09:47:09 +0100
committerAndrea Diamantini <adjam7@gmail.com>2010-10-31 09:47:09 +0100
commitab7549c7fe58b7375b527f10291dc3ca454dd9e0 (patch)
treee8ffc5c51cd6afe6bba317ed97a9211ef6a9c82a /src/opensearch/opensearchreader.cpp
parentFix CmakeLists (diff)
downloadrekonq-ab7549c7fe58b7375b527f10291dc3ca454dd9e0.tar.xz
Fix merge code
Diffstat (limited to 'src/opensearch/opensearchreader.cpp')
-rw-r--r--src/opensearch/opensearchreader.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/opensearch/opensearchreader.cpp b/src/opensearch/opensearchreader.cpp
index ebca7877..1c106afa 100644
--- a/src/opensearch/opensearchreader.cpp
+++ b/src/opensearch/opensearchreader.cpp
@@ -34,6 +34,9 @@
#include "opensearchengine.h"
#include "suggestionparser.h"
+// KDE Includes
+#include <KLocalizedString>
+
// Qt Includes
#include <QtCore/QIODevice>
@@ -79,7 +82,7 @@ OpenSearchEngine *OpenSearchReader::read()
|| namespaceUri() != QL1S("http://a9.com/-/spec/opensearch/1.1/")
)
{
- raiseError(QObject::tr("The file is not an OpenSearch 1.1 file."));
+ raiseError(i18n("The file is not an OpenSearch 1.1 file."));
return engine;
}
@@ -119,7 +122,10 @@ OpenSearchEngine *OpenSearchReader::read()
while (!(isEndElement() && name() == QL1S("Url")))
{
- if (!isStartElement() || (name() != QL1S("Param") && name() != QL1S("Parameter"))) {
+ if (!isStartElement()
+ || (name() != QL1S("Param")
+ && name() != QL1S("Parameter")))
+ {
readNext();
continue;
}
@@ -138,14 +144,15 @@ OpenSearchEngine *OpenSearchReader::read()
}
}
- if (type == QLatin1String("text/html"))
+ if (type == QL1S("text/html"))
{
engine->setSearchUrlTemplate(url);
engine->setSearchParameters(parameters);
}
else
{
- if (engine->suggestionsUrlTemplate().isEmpty() && type == QL1S("application/x-suggestions+json")) //note: xml is prefered
+ if (engine->suggestionsUrlTemplate().isEmpty()
+ && type == QL1S("application/x-suggestions+json")) //note: xml is prefered
{
engine->setSuggestionsUrlTemplate(url);
engine->setSuggestionsParameters(parameters);