summaryrefslogtreecommitdiff
path: root/src/opensearch/opensearchwriter.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/opensearchwriter.cpp
parentImproving tab previews (diff)
downloadrekonq-82167d2422a4b6e3071dca68cf65a66e1da41ab4.tar.xz
A round of the "new" astyle 2.01...
Diffstat (limited to 'src/opensearch/opensearchwriter.cpp')
-rw-r--r--src/opensearch/opensearchwriter.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/opensearch/opensearchwriter.cpp b/src/opensearch/opensearchwriter.cpp
index d1464275..d6a34f54 100644
--- a/src/opensearch/opensearchwriter.cpp
+++ b/src/opensearch/opensearchwriter.cpp
@@ -37,7 +37,7 @@
OpenSearchWriter::OpenSearchWriter()
- : QXmlStreamWriter()
+ : QXmlStreamWriter()
{
setAutoFormatting(true);
}
@@ -45,10 +45,10 @@ OpenSearchWriter::OpenSearchWriter()
bool OpenSearchWriter::write(QIODevice *device, OpenSearchEngine *engine)
{
- if (!engine)
+ if(!engine)
return false;
- if (!device->isOpen())
+ if(!device->isOpen())
device->open(QIODevice::WriteOnly);
setDevice(device);
@@ -63,29 +63,29 @@ void OpenSearchWriter::write(OpenSearchEngine *engine)
writeStartElement(QL1S("OpenSearchDescription"));
writeDefaultNamespace(QL1S("http://a9.com/-/spec/opensearch/1.1/"));
- if (!engine->name().isEmpty())
+ if(!engine->name().isEmpty())
{
writeTextElement(QL1S("ShortName"), engine->name());
}
- if (!engine->description().isEmpty())
+ if(!engine->description().isEmpty())
{
writeTextElement(QL1S("Description"), engine->description());
}
- if (!engine->searchUrlTemplate().isEmpty())
+ if(!engine->searchUrlTemplate().isEmpty())
{
writeStartElement(QL1S("Url"));
writeAttribute(QL1S("method"), QL1S("get"));
writeAttribute(QL1S("template"), engine->searchUrlTemplate());
- if (!engine->searchParameters().empty())
+ if(!engine->searchParameters().empty())
{
writeNamespace(QL1S("http://a9.com/-/spec/opensearch/extensions/parameters/1.0/"), QL1S("p"));
QList<OpenSearchEngine::Parameter>::const_iterator end = engine->searchParameters().constEnd();
QList<OpenSearchEngine::Parameter>::const_iterator i = engine->searchParameters().constBegin();
- for (; i != end; ++i)
+ for(; i != end; ++i)
{
writeStartElement(QL1S("p:Parameter"));
writeAttribute(QL1S("name"), i->first);
@@ -97,20 +97,20 @@ void OpenSearchWriter::write(OpenSearchEngine *engine)
writeEndElement();
}
- if (!engine->suggestionsUrlTemplate().isEmpty())
+ if(!engine->suggestionsUrlTemplate().isEmpty())
{
writeStartElement(QL1S("Url"));
writeAttribute(QL1S("method"), QL1S("get"));
writeAttribute(QL1S("type"), engine->type());
writeAttribute(QL1S("template"), engine->suggestionsUrlTemplate());
- if (!engine->suggestionsParameters().empty())
+ if(!engine->suggestionsParameters().empty())
{
writeNamespace(QL1S("http://a9.com/-/spec/opensearch/extensions/parameters/1.0/"), QL1S("p"));
QList<OpenSearchEngine::Parameter>::const_iterator end = engine->suggestionsParameters().constEnd();
QList<OpenSearchEngine::Parameter>::const_iterator i = engine->suggestionsParameters().constBegin();
- for (; i != end; ++i)
+ for(; i != end; ++i)
{
writeStartElement(QL1S("p:Parameter"));
writeAttribute(QL1S("name"), i->first);
@@ -122,7 +122,7 @@ void OpenSearchWriter::write(OpenSearchEngine *engine)
writeEndElement();
}
- if (!engine->imageUrl().isEmpty())
+ if(!engine->imageUrl().isEmpty())
writeTextElement(QL1S("Image"), engine->imageUrl());
writeEndElement();