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:
parent
26c680ae1f
commit
0ca7100168
@ -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")
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user