Browse Source

Merge pull request #8862 from Chocobo1/cleanup

Code cleanups
adaptive-webui-19844
Mike Tzou 7 years ago committed by GitHub
parent
commit
99a1343b9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      src/base/bittorrent/session.cpp
  2. 17
      src/base/bittorrent/session.h
  3. 8
      src/base/bittorrent/torrentinfo.cpp
  4. 10
      src/base/bittorrent/torrentinfo.h
  5. 3
      src/gui/properties/peersadditiondlg.h
  6. 1
      src/webui/api/torrentscontroller.cpp

16
src/base/bittorrent/session.cpp

@ -49,9 +49,6 @@ @@ -49,9 +49,6 @@
#include <QUuid>
#include <libtorrent/alert_types.hpp>
#if LIBTORRENT_VERSION_NUM >= 10100
#include <libtorrent/bdecode.hpp>
#endif
#include <libtorrent/bencode.hpp>
#include <libtorrent/disk_io_thread.hpp>
#include <libtorrent/error_code.hpp>
@ -60,17 +57,18 @@ @@ -60,17 +57,18 @@
#include <libtorrent/extensions/smart_ban.hpp>
#include <libtorrent/identify_client.hpp>
#include <libtorrent/ip_filter.hpp>
#if LIBTORRENT_VERSION_NUM < 10100
#include <libtorrent/lazy_entry.hpp>
#endif
#include <libtorrent/magnet_uri.hpp>
#include <libtorrent/session.hpp>
#if LIBTORRENT_VERSION_NUM >= 10100
#include <libtorrent/session_stats.hpp>
#endif
#include <libtorrent/session_status.hpp>
#include <libtorrent/torrent_info.hpp>
#if LIBTORRENT_VERSION_NUM < 10100
#include <libtorrent/lazy_entry.hpp>
#else
#include <libtorrent/bdecode.hpp>
#include <libtorrent/session_stats.hpp>
#endif
#include "base/algorithm.h"
#include "base/logger.h"
#include "base/net/downloadhandler.h"

17
src/base/bittorrent/session.h

@ -30,18 +30,14 @@ @@ -30,18 +30,14 @@
#ifndef BITTORRENT_SESSION_H
#define BITTORRENT_SESSION_H
#include <vector>
#include <libtorrent/version.hpp>
#if LIBTORRENT_VERSION_NUM >= 10100
#include <QElapsedTimer>
#endif
#include <vector>
#include <QFile>
#include <QHash>
#include <QList>
#include <QMap>
#if LIBTORRENT_VERSION_NUM < 10100
#include <QMutex>
#endif
#include <QNetworkConfigurationManager>
#include <QPointer>
#include <QSet>
@ -49,6 +45,12 @@ @@ -49,6 +45,12 @@
#include <QVector>
#include <QWaitCondition>
#if LIBTORRENT_VERSION_NUM < 10100
#include <QMutex>
#else
#include <QElapsedTimer>
#endif
#include "base/settingvalue.h"
#include "base/tristatebool.h"
#include "base/types.h"
@ -111,7 +113,6 @@ class QTimer; @@ -111,7 +113,6 @@ class QTimer;
class QStringList;
class QString;
class QUrl;
template<typename T> class QList;
class FilterParserThread;
class BandwidthScheduler;

8
src/base/bittorrent/torrentinfo.cpp

@ -26,20 +26,20 @@ @@ -26,20 +26,20 @@
* exception statement from your version.
*/
#include "torrentinfo.h"
#include <libtorrent/error_code.hpp>
#include <QDebug>
#include <QString>
#include <QList>
#include <QUrl>
#include <QDateTime>
#include <libtorrent/error_code.hpp>
#include "base/utils/misc.h"
#include "base/utils/fs.h"
#include "base/utils/string.h"
#include "infohash.h"
#include "trackerentry.h"
#include "torrentinfo.h"
namespace libt = libtorrent;
using namespace BitTorrent;

10
src/base/bittorrent/torrentinfo.h

@ -29,12 +29,14 @@ @@ -29,12 +29,14 @@
#ifndef BITTORRENT_TORRENTINFO_H
#define BITTORRENT_TORRENTINFO_H
#include <QCoreApplication>
#include <QtGlobal>
#include <libtorrent/torrent_info.hpp>
#include <libtorrent/version.hpp>
#include <QCoreApplication>
#include <QList>
#include <QtGlobal>
#include <QVector>
#include "base/indexrange.h"
class QString;
@ -42,8 +44,6 @@ class QUrl; @@ -42,8 +44,6 @@ class QUrl;
class QDateTime;
class QStringList;
class QByteArray;
template<typename T> class QList;
template<typename T> class QVector;
namespace BitTorrent
{

3
src/gui/properties/peersadditiondlg.h

@ -30,11 +30,10 @@ @@ -30,11 +30,10 @@
#define PEERADDITION_H
#include <QDialog>
#include <QList>
#include "base/bittorrent/peerinfo.h"
template <typename T> class QList;
namespace Ui
{
class addPeersDialog;

1
src/webui/api/torrentscontroller.cpp

@ -762,7 +762,6 @@ void TorrentsController::renameAction() @@ -762,7 +762,6 @@ void TorrentsController::renameAction()
throw APIError(APIErrorType::NotFound);
name.replace(QRegularExpression("\r?\n|\r"), " ");
qDebug() << "Renaming" << torrent->name() << "to" << name;
torrent->setName(name);
}

Loading…
Cancel
Save