From ab7549c7fe58b7375b527f10291dc3ca454dd9e0 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 31 Oct 2010 09:47:09 +0100 Subject: Fix merge code --- src/opensearch/suggestionparser.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'src/opensearch/suggestionparser.h') 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 -#include +#include #include +#include + class Response { @@ -80,6 +81,10 @@ public: {}; }; + +// ----------------------------------------------------------------- + + typedef QList 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 -- cgit v1.2.1