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

Fix indentation size in qtlibtorrent/* files.

This commit is contained in:
Vladimir Golovnev (Glassez) 2015-02-25 12:48:40 +03:00
parent 92757b9f22
commit 0e4ef42ddf
17 changed files with 3834 additions and 3834 deletions

View File

@ -41,8 +41,8 @@
#include <memory>
namespace libtorrent {
class session;
class alert;
class session;
class alert;
}
class QAlertDispatcher : public QObject {

View File

@ -36,8 +36,8 @@
#include <QStringList>
namespace libtorrent {
class session;
struct ip_filter;
class session;
struct ip_filter;
}
using namespace std;

View File

@ -108,13 +108,13 @@ QBtSession::QBtSession()
DHTEnabled(false), queueingEnabled(false),
m_torrentExportEnabled(false),
m_finishedTorrentExportEnabled(false)
#ifndef DISABLE_GUI
#ifndef DISABLE_GUI
, geoipDBLoaded(false), resolve_countries(false)
#endif
#endif
, m_tracker(0), m_shutdownAct(NO_SHUTDOWN)
#if LIBTORRENT_VERSION_NUM < 10000
#if LIBTORRENT_VERSION_NUM < 10000
, m_upnp(0), m_natpmp(0)
#endif
#endif
, m_alertDispatcher(0)
{
BigRatioTimer = new QTimer(this);
@ -289,9 +289,9 @@ void QBtSession::handleMagnetRedirect(const QString &url_new, const QString &url
}
#endif
addMagnetSkipAddDlg(url_new, savePath_label.first, savePath_label.second,
#ifndef DISABLE_GUI
#ifndef DISABLE_GUI
state,
#endif
#endif
url_old);
}
else
@ -1215,7 +1215,7 @@ void QBtSession::initializeAddTorrentParams(const QString &hash, add_torrent_par
p.storage_mode = storage_mode_sparse;
// Priorities
/*if (TorrentTempData::hasTempData(hash)) {
/*if (TorrentTempData::hasTempData(hash)) {
std::vector<int> fp;
TorrentTempData::getFilesPriority(hash, fp);
if (!fp.empty()) {
@ -2832,10 +2832,10 @@ void QBtSession::addMagnetInteractive(const QString& uri)
}
#ifndef DISABLE_GUI
void QBtSession::addMagnetSkipAddDlg(const QString& uri, const QString& save_path, const QString& label,
void QBtSession::addMagnetSkipAddDlg(const QString& uri, const QString& save_path, const QString& label,
const RssDownloadRule::AddPausedState &aps, const QString &uri_old) {
#else
void QBtSession::addMagnetSkipAddDlg(const QString& uri, const QString& save_path, const QString& label, const QString &uri_old) {
void QBtSession::addMagnetSkipAddDlg(const QString& uri, const QString& save_path, const QString& label, const QString &uri_old) {
#endif
if (!save_path.isEmpty() || !label.isEmpty())
savepathLabel_fromurl[uri] = qMakePair(fsutils::fromNativePath(save_path), label);
@ -2860,10 +2860,10 @@ void QBtSession::addMagnetInteractive(const QString& uri)
}
#ifndef DISABLE_GUI
void QBtSession::downloadUrlAndSkipDialog(QString url, QString save_path, QString label,
void QBtSession::downloadUrlAndSkipDialog(QString url, QString save_path, QString label,
const QList<QNetworkCookie>& cookies, const RssDownloadRule::AddPausedState &aps) {
#else
void QBtSession::downloadUrlAndSkipDialog(QString url, QString save_path, QString label, const QList<QNetworkCookie>& cookies) {
void QBtSession::downloadUrlAndSkipDialog(QString url, QString save_path, QString label, const QList<QNetworkCookie>& cookies) {
#endif
//emit aboutToDownloadFromUrl(url);
const QUrl qurl = QUrl::fromEncoded(url.toUtf8());

View File

@ -49,42 +49,42 @@
#endif
namespace libtorrent {
struct add_torrent_params;
struct pe_settings;
struct proxy_settings;
class session;
struct session_status;
struct add_torrent_params;
struct pe_settings;
struct proxy_settings;
class session;
struct session_status;
class alert;
struct torrent_finished_alert;
struct save_resume_data_alert;
struct file_renamed_alert;
struct torrent_deleted_alert;
struct storage_moved_alert;
struct storage_moved_failed_alert;
struct metadata_received_alert;
struct file_error_alert;
struct file_completed_alert;
struct torrent_paused_alert;
struct tracker_error_alert;
struct tracker_reply_alert;
struct tracker_warning_alert;
struct portmap_error_alert;
struct portmap_alert;
struct peer_blocked_alert;
struct peer_ban_alert;
struct fastresume_rejected_alert;
struct url_seed_alert;
struct listen_succeeded_alert;
struct listen_failed_alert;
struct torrent_checked_alert;
struct external_ip_alert;
struct state_update_alert;
struct stats_alert;
class alert;
struct torrent_finished_alert;
struct save_resume_data_alert;
struct file_renamed_alert;
struct torrent_deleted_alert;
struct storage_moved_alert;
struct storage_moved_failed_alert;
struct metadata_received_alert;
struct file_error_alert;
struct file_completed_alert;
struct torrent_paused_alert;
struct tracker_error_alert;
struct tracker_reply_alert;
struct tracker_warning_alert;
struct portmap_error_alert;
struct portmap_alert;
struct peer_blocked_alert;
struct peer_ban_alert;
struct fastresume_rejected_alert;
struct url_seed_alert;
struct listen_succeeded_alert;
struct listen_failed_alert;
struct torrent_checked_alert;
struct external_ip_alert;
struct state_update_alert;
struct stats_alert;
#if LIBTORRENT_VERSION_NUM < 10000
class upnp;
class natpmp;
class upnp;
class natpmp;
#endif
}

View File

@ -43,42 +43,42 @@ namespace {
QIcon get_paused_icon() {
static QIcon cached = QIcon(":/icons/skin/paused.png");
return cached;
}
}
QIcon get_queued_icon() {
static QIcon cached = QIcon(":/icons/skin/queued.png");
return cached;
}
}
QIcon get_downloading_icon() {
static QIcon cached = QIcon(":/icons/skin/downloading.png");
return cached;
}
}
QIcon get_stalled_downloading_icon() {
static QIcon cached = QIcon(":/icons/skin/stalledDL.png");
return cached;
}
}
QIcon get_uploading_icon() {
static QIcon cached = QIcon(":/icons/skin/uploading.png");
return cached;
}
}
QIcon get_stalled_uploading_icon() {
static QIcon cached = QIcon(":/icons/skin/stalledUP.png");
return cached;
}
}
QIcon get_checking_icon() {
static QIcon cached = QIcon(":/icons/skin/checking.png");
return cached;
}
}
QIcon get_error_icon() {
static QIcon cached = QIcon(":/icons/skin/error.png");
return cached;
}
}
}
TorrentModelItem::TorrentModelItem(const QTorrentHandle &h)

View File

@ -45,7 +45,7 @@ struct TorrentStatusReport {
};
class TorrentModelItem : public QObject {
Q_OBJECT
Q_OBJECT
public:
enum State {STATE_DOWNLOADING, STATE_DOWNLOADING_META, STATE_ALLOCATING, STATE_STALLED_DL, STATE_SEEDING, STATE_STALLED_UP, STATE_QUEUED_DL, STATE_QUEUED_UP, STATE_CHECKING_UP, STATE_CHECKING_DL, STATE_QUEUED_CHECK, STATE_QUEUED_FASTCHECK, STATE_PAUSED_DL, STATE_PAUSED_UP, STATE_PAUSED_MISSING, STATE_INVALID};

View File

@ -38,7 +38,7 @@ using namespace libtorrent;
namespace {
template<class T> struct Sample {
template<class T> struct Sample {
Sample()
: download()
, upload()
@ -57,46 +57,46 @@ namespace {
T download;
T upload;
};
};
template <typename T>
Sample<T>& operator+=(Sample<T>& lhs, Sample<T> const& rhs) {
template <typename T>
Sample<T>& operator+=(Sample<T>& lhs, Sample<T> const& rhs) {
lhs.download += rhs.download;
lhs.upload += rhs.upload;
return lhs;
}
}
template <typename T>
Sample<T>& operator-=(Sample<T>& lhs, Sample<T> const& rhs) {
template <typename T>
Sample<T>& operator-=(Sample<T>& lhs, Sample<T> const& rhs) {
lhs.download -= rhs.download;
lhs.upload -= rhs.upload;
return lhs;
}
}
template <typename T>
Sample<T> operator+(Sample<T> const& lhs, Sample<T> const& rhs) {
template <typename T>
Sample<T> operator+(Sample<T> const& lhs, Sample<T> const& rhs) {
return Sample<T>(lhs.download + rhs.download, lhs.upload + rhs.upload);
}
}
template <typename T>
Sample<T> operator-(Sample<T> const& lhs, Sample<T> const& rhs) {
template <typename T>
Sample<T> operator-(Sample<T> const& lhs, Sample<T> const& rhs) {
return Sample<T>(lhs.download - rhs.download, lhs.upload - rhs.upload);
}
}
template <typename T>
Sample<T> operator*(Sample<T> const& lhs, T rhs) {
template <typename T>
Sample<T> operator*(Sample<T> const& lhs, T rhs) {
return Sample<T>(lhs.download * rhs, lhs.upload * rhs);
}
}
template <typename T>
Sample<T> operator*(T lhs,Sample<T> const& rhs) {
template <typename T>
Sample<T> operator*(T lhs,Sample<T> const& rhs) {
return Sample<T>(lhs * rhs.download, lhs * rhs.upload);
}
}
template <typename T>
Sample<T> operator/(Sample<T> const& lhs, T rhs) {
template <typename T>
Sample<T> operator/(Sample<T> const& lhs, T rhs) {
return Sample<T>(lhs.download / rhs, lhs.upload / rhs);
}
}
}
class SpeedSample {