mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-31 12:00:16 -07:00
Web UI code optimization and clean up
This commit is contained in:
parent
ab0355f8d6
commit
4385b941bb
6 changed files with 89 additions and 101 deletions
|
@ -34,23 +34,22 @@
|
|||
|
||||
#include<QHttpRequestHeader>
|
||||
|
||||
class HttpRequestParser : public QHttpRequestHeader {
|
||||
class HttpRequestParser {
|
||||
|
||||
public:
|
||||
HttpRequestParser();
|
||||
~HttpRequestParser();
|
||||
bool isParsable() const;
|
||||
bool isError() const;
|
||||
QString url() const;
|
||||
QByteArray message() const;
|
||||
QString get(const QString& key) const;
|
||||
QString post(const QString& key) const;
|
||||
QByteArray torrent() const;
|
||||
void write(QByteArray ba);
|
||||
void write(const QByteArray& ba);
|
||||
inline QHttpRequestHeader& header() { return m_header; }
|
||||
|
||||
private:
|
||||
bool m_headerDone;
|
||||
bool m_messageDone;
|
||||
QHttpRequestHeader m_header;
|
||||
bool m_error;
|
||||
QByteArray m_data;
|
||||
QString m_path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue