1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Web UI: Code clean up

This commit is contained in:
Christophe Dumez 2011-09-29 19:41:29 +03:00
parent 9115a2ddc2
commit 3ad81595df

View File

@ -91,7 +91,6 @@ void HttpConnection::read() {
m_generator.setStatusLine(400, "Bad Request");
write();
} else {
if (!m_parser.isError())
respond();
}
}
@ -402,8 +401,6 @@ void HttpConnection::respondCommand(const QString& command) {
// it fails to load on Windows.
QTemporaryFile *tmpfile = new QTemporaryFile (QDir::temp().absoluteFilePath("qBT-XXXXXX.torrent"));
if (tmpfile->open()) {
// Make sure we are writing in binary mode
tmpfile->setTextModeEnabled(false);
tmpfile->write(m_parser.torrent());
tmpfile->close();
emit torrentReadyToBeDownloaded(tmpfile->fileName(), false, QString(), false);