1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-25 14:04:23 +00:00

Fix issues with virtual

Code cleanup
This commit is contained in:
Christophe Dumez 2010-10-31 08:55:22 +00:00
parent 26c680ae1f
commit 0ca7100168
2 changed files with 5 additions and 8 deletions

View File

@ -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")

View File

@ -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