@ -403,7 +403,7 @@ void HttpConnection::respondCommand(const QString& command) {
tmpfile->write(m_parser.torrent());
tmpfile->close();
emit torrentReadyToBeDownloaded(tmpfile->fileName(), false, QString(), false);
delete tmpfile;
tmpfile->deleteLater();
} else {
std::cerr << "I/O Error: Could not create temporary file" << std::endl;
@ -61,7 +61,7 @@ QString HttpRequestParser::post(const QString& key) const {
return m_postMap.value(key);
}
QByteArray HttpRequestParser::torrent() const {
const QByteArray& HttpRequestParser::torrent() const {
return m_torrentContent;
@ -44,7 +44,7 @@ public:
QByteArray message() const;
QString get(const QString& key) const;
QString post(const QString& key) const;
QByteArray torrent() const;
const QByteArray& torrent() const;
void write(const QByteArray& ba);
inline QHttpRequestHeader& header() { return m_header; }