Browse Source

Fix issues with virtual

Code cleanup
adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
0ca7100168
  1. 5
      src/webui/httpresponsegenerator.cpp
  2. 8
      src/webui/httpresponsegenerator.h

5
src/webui/httpresponsegenerator.cpp

@ -48,11 +48,6 @@ void HttpResponseGenerator::stripMessage()
message.clear(); message.clear();
} }
QByteArray HttpResponseGenerator::toByteArray() const
{
return QHttpResponseHeader::toString().toLocal8Bit() + message;
}
void HttpResponseGenerator::setContentTypeByExt(const QString ext) void HttpResponseGenerator::setContentTypeByExt(const QString ext)
{ {
if(ext == "css") if(ext == "css")

8
src/webui/httpresponsegenerator.h

@ -36,15 +36,17 @@
class HttpResponseGenerator : public QHttpResponseHeader class HttpResponseGenerator : public QHttpResponseHeader
{ {
private:
QByteArray message;
public: public:
void setMessage(const QByteArray message); void setMessage(const QByteArray message);
void setMessage(const QString message); void setMessage(const QString message);
void stripMessage(); void stripMessage();
void setContentTypeByExt(const QString ext); void setContentTypeByExt(const QString ext);
virtual QByteArray toByteArray() const; inline QByteArray toByteArray() const { return QHttpResponseHeader::toString().toLocal8Bit() + message; }
private:
QByteArray message;
}; };
#endif #endif

Loading…
Cancel
Save