From eba45a0b267f89a38174249875d9dc112df93437 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 11 Feb 2017 15:06:43 +0800 Subject: [PATCH] Cleanup --- src/webui/btjson.cpp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/webui/btjson.cpp b/src/webui/btjson.cpp index f221e15ac..cd58ea6b9 100644 --- a/src/webui/btjson.cpp +++ b/src/webui/btjson.cpp @@ -29,28 +29,31 @@ */ #include "btjson.h" -#include "base/logger.h" -#include "base/utils/misc.h" -#include "base/utils/fs.h" -#include "base/preferences.h" -#include "base/bittorrent/session.h" -#include "base/bittorrent/sessionstatus.h" -#include "base/bittorrent/torrenthandle.h" -#include "base/bittorrent/trackerentry.h" -#include "base/bittorrent/peerinfo.h" -#include "base/torrentfilter.h" -#include "base/net/geoipmanager.h" -#include "jsonutils.h" #include #include + #ifndef QBT_USES_QT5 #include #endif + #if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) #include #endif +#include "base/bittorrent/session.h" +#include "base/bittorrent/sessionstatus.h" +#include "base/bittorrent/peerinfo.h" +#include "base/bittorrent/torrenthandle.h" +#include "base/bittorrent/trackerentry.h" +#include "base/logger.h" +#include "base/net/geoipmanager.h" +#include "base/preferences.h" +#include "base/torrentfilter.h" +#include "base/utils/fs.h" +#include "base/utils/misc.h" +#include "jsonutils.h" + #if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) #define CACHED_VARIABLE(VARTYPE, VAR, DUR) \ @@ -740,9 +743,9 @@ QByteArray btjson::getTorrentsRatesLimits(QStringList &hashes, bool downloadLimi QVariantMap toMap(BitTorrent::TorrentHandle *const torrent) { QVariantMap ret; - ret[KEY_TORRENT_HASH] = QString(torrent->hash()); - ret[KEY_TORRENT_NAME] = torrent->name(); - ret[KEY_TORRENT_SIZE] = torrent->wantedSize(); + ret[KEY_TORRENT_HASH] = QString(torrent->hash()); + ret[KEY_TORRENT_NAME] = torrent->name(); + ret[KEY_TORRENT_SIZE] = torrent->wantedSize(); ret[KEY_TORRENT_PROGRESS] = torrent->progress(); ret[KEY_TORRENT_DLSPEED] = torrent->downloadPayloadRate(); ret[KEY_TORRENT_UPSPEED] = torrent->uploadPayloadRate();