From d4af85597e389594a3f69fd2c79059f7d8826275 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 8 Mar 2011 17:29:11 +0100 Subject: Checking for the empty string causing Rohan & Pano's bug... Next test CCBUG:267316 By the way, are you sure this is yet happening? I can no more reproduce it since the first fix... --- src/opensearch/opensearchengine.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/opensearch') diff --git a/src/opensearch/opensearchengine.cpp b/src/opensearch/opensearchengine.cpp index cfd9b4b6..80eb308f 100644 --- a/src/opensearch/opensearchengine.cpp +++ b/src/opensearch/opensearchengine.cpp @@ -270,6 +270,9 @@ ResponseList OpenSearchEngine::parseSuggestion(const QByteArray &resp) if (!m_parser) return ResponseList(); + if(resp.isEmpty()) + return ResponseList(); + return m_parser->parse(resp); } @@ -282,7 +285,7 @@ QString OpenSearchEngine::type() QString OpenSearchEngine::suggestionPathFor(const QString &searchTerm) { - return KStandardDirs::locateLocal("cache", QString("opensearch/") + m_name + QString("/") + searchTerm, true); + return KStandardDirs::locateLocal("cache", QL1S("opensearch/") + m_name + QL1S("/") + searchTerm, true); } -- cgit v1.2.1