summaryrefslogtreecommitdiff
path: root/src/opensearch/suggestionparser.h
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/suggestionparser.h
parentFix CmakeLists (diff)
downloadrekonq-ab7549c7fe58b7375b527f10291dc3ca454dd9e0.tar.xz
Fix merge code
Diffstat (limited to 'src/opensearch/suggestionparser.h')
-rw-r--r--src/opensearch/suggestionparser.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/opensearch/suggestionparser.h b/src/opensearch/suggestionparser.h
index 3b72c5d3..158da51f 100644
--- a/src/opensearch/suggestionparser.h
+++ b/src/opensearch/suggestionparser.h
@@ -24,19 +24,20 @@
*
* ============================================================ */
+
#ifndef SUGGESTIONPARSER_H
#define SUGGESTIONPARSER_H
-// Self Includes
-
-// Local Includes
+// Rekonq Includes
+#include "rekonq_defines.h"
// Qt Includes
-#include <QList>
-#include <QtScript/QScriptEngine>
+#include <QtCore/QList>
#include <QtCore/QXmlStreamReader>
+#include <QtScript/QScriptEngine>
+
class Response
{
@@ -80,6 +81,10 @@ public:
{};
};
+
+// -----------------------------------------------------------------
+
+
typedef QList <Response> ResponseList;
@@ -88,7 +93,7 @@ class SuggestionParser
public:
virtual ~SuggestionParser();
virtual ResponseList parse(const QByteArray &resp);
- virtual QString type(){ return ""; }
+ virtual QString type() = 0;
};
@@ -99,9 +104,10 @@ protected:
public:
ResponseList parse(const QByteArray &resp);
- QString type(){ return "application/x-suggestions+xml"; }
+ inline QString type() { return QL1S("application/x-suggestions+xml"); }
};
+
class JSONParser : public SuggestionParser
{
private:
@@ -109,7 +115,7 @@ private:
public:
ResponseList parse(const QByteArray &resp);
- QString type(){ return "application/x-suggestions+json"; }
+ inline QString type() { return QL1S("application/x-suggestions+json"); }
};
#endif //SUGGESTIONPARSER_H