diff options
Diffstat (limited to 'src/opensearch/suggestionparser.cpp')
-rw-r--r-- | src/opensearch/suggestionparser.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/opensearch/suggestionparser.cpp b/src/opensearch/suggestionparser.cpp index 56cd2c8e..01581bf9 100644 --- a/src/opensearch/suggestionparser.cpp +++ b/src/opensearch/suggestionparser.cpp @@ -36,7 +36,7 @@ #include<QByteArray> #include<QStringList> -ResponseList SuggestionParser::parse(const QByteArray &resp) +ResponseList SuggestionParser::parse(const QByteArray &) { return ResponseList(); } @@ -70,6 +70,7 @@ ResponseList XMLParser::parse(const QByteArray &resp) { QString title; QString url; + QString image; QString description; while (!m_reader.isEndElement() && !m_reader.atEnd()) @@ -77,11 +78,12 @@ ResponseList XMLParser::parse(const QByteArray &resp) m_reader.readNext(); if (m_reader.name() == QL1S("Text")) title = m_reader.readElementText(); - if (m_reader.name() == QL1S("Url")) url = m_reader.readElementText(); + if (m_reader.name() == QL1S("Url")) url = m_reader.readElementText(); + if (m_reader.name() == QL1S("Image")) image = m_reader.readElementText(); if (m_reader.name() == QL1S("Description")) description = m_reader.readElementText(); } - rlist << Response(url, title, description); + rlist << Response(url, title, image, description); } } @@ -129,4 +131,4 @@ ResponseList JSONParser::parse(const QByteArray &resp) } return rlist; -}
\ No newline at end of file +} |