Fix compilation on Windows (Remove using namespace libtorrent; from headers)

This commit is contained in:
Christophe Dumez 2010-11-22 21:55:32 +00:00
parent 61208fce13
commit 8a5dc1f239
33 changed files with 118 additions and 109 deletions

View file

@ -34,8 +34,6 @@
#include "qbtsession.h"
#include "ui_console.h"
using namespace libtorrent;
class consoleDlg : public QDialog, private Ui_ConsoleDlg{
Q_OBJECT

View file

@ -40,7 +40,6 @@
#include <libtorrent/session.hpp>
#include <libtorrent/ip_filter.hpp>
using namespace libtorrent;
using namespace std;
// P2B Stuff
@ -56,8 +55,8 @@ class FilterParserThread : public QThread {
Q_OBJECT
private:
session *s;
ip_filter filter;
libtorrent::session *s;
libtorrent::ip_filter filter;
bool abort;
QString filePath;
@ -94,7 +93,7 @@ protected:
}
public:
FilterParserThread(QObject* parent, session *s) : QThread(parent), s(s), abort(false) {
FilterParserThread(QObject* parent, libtorrent::session *s) : QThread(parent), s(s), abort(false) {
}
@ -177,7 +176,7 @@ public:
}
// Now Add to the filter
try {
filter.add_rule(startAddr, endAddr, ip_filter::blocked);
filter.add_rule(startAddr, endAddr, libtorrent::ip_filter::blocked);
}catch(exception){
qDebug("Bad line in filter file, avoided crash...");
}
@ -246,7 +245,7 @@ public:
continue;
}
try {
filter.add_rule(startAddr, endAddr, ip_filter::blocked);
filter.add_rule(startAddr, endAddr, libtorrent::ip_filter::blocked);
} catch(std::exception&) {
qDebug("p2p file: line %d is malformed.", nbLine);
qDebug("Line was: %s", line.constData());
@ -313,10 +312,10 @@ public:
// Network byte order to Host byte order
// asio address_v4 contructor expects it
// that way
address_v4 first(ntohl(start));
address_v4 last(ntohl(end));
libtorrent::address_v4 first(ntohl(start));
libtorrent::address_v4 last(ntohl(end));
// Apply to bittorrent session
filter.add_rule(first, last, ip_filter::blocked);
filter.add_rule(first, last, libtorrent::ip_filter::blocked);
}
}
else if(version==3) {
@ -358,10 +357,10 @@ public:
// Network byte order to Host byte order
// asio address_v4 contructor expects it
// that way
address_v4 first(ntohl(start));
address_v4 last(ntohl(end));
libtorrent::address_v4 first(ntohl(start));
libtorrent::address_v4 last(ntohl(end));
// Apply to bittorrent session
filter.add_rule(first, last, ip_filter::blocked);
filter.add_rule(first, last, libtorrent::ip_filter::blocked);
if(abort) return;
}
} else {
@ -391,16 +390,16 @@ public:
start();
}
static void processFilterList(session *s, QStringList IPs) {
static void processFilterList(libtorrent::session *s, QStringList IPs) {
// First, import current filter
ip_filter filter = s->get_ip_filter();
libtorrent::ip_filter filter = s->get_ip_filter();
foreach(const QString &ip, IPs) {
qDebug("Manual ban of peer %s", ip.toLocal8Bit().constData());
boost::system::error_code ec;
address_v4 addr = address_v4::from_string(ip.toLocal8Bit().constData(), ec);
libtorrent::address_v4 addr = libtorrent::address_v4::from_string(ip.toLocal8Bit().constData(), ec);
Q_ASSERT(!ec);
if(!ec)
filter.add_rule(addr, addr, ip_filter::blocked);
filter.add_rule(addr, addr, libtorrent::ip_filter::blocked);
}
s->set_ip_filter(filter);
}

View file

@ -73,6 +73,8 @@ const int UNLEN = 256;
#include <QDBusMessage>
#endif
using namespace libtorrent;
QString misc::QDesktopServicesDataLocation() {
#ifdef Q_WS_WIN
LPWSTR path=new WCHAR[256];

View file

@ -47,8 +47,6 @@
const qlonglong MAX_ETA = 8640000;
using namespace libtorrent;
/* Miscellaneaous functions that can be useful */
class misc : public QObject{
Q_OBJECT
@ -73,14 +71,14 @@ public:
return QString::fromUtf8(str);
}
static inline QString toQString(sha1_hash hash) {
static inline QString toQString(libtorrent::sha1_hash hash) {
std::ostringstream o;
o << hash;
return QString(o.str().c_str());
}
static inline sha1_hash toSha1Hash(QString hash) {
return sha1_hash(qPrintable(hash));
static inline libtorrent::sha1_hash toSha1Hash(QString hash) {
return libtorrent::sha1_hash(qPrintable(hash));
}
static void chmod644(const QDir& folder);
@ -93,10 +91,10 @@ public:
return tmp.join("/");
}
static inline sha1_hash QStringToSha1(const QString& s) {
static inline libtorrent::sha1_hash QStringToSha1(const QString& s) {
std::string str(s.toLocal8Bit().data());
std::istringstream i(str);
sha1_hash x;
libtorrent::sha1_hash x;
i>>x;
return x;
}
@ -122,8 +120,8 @@ public:
static quint64 computePathSize(QString path);
static QString truncateRootFolder(boost::intrusive_ptr<torrent_info> t);
static QString truncateRootFolder(torrent_handle h);
static QString truncateRootFolder(boost::intrusive_ptr<libtorrent::torrent_info> t);
static QString truncateRootFolder(libtorrent::torrent_handle h);
static QString updateLabelInSavePath(const QString& defaultSavePath, QString save_path, const QString old_label, const QString new_label);

View file

@ -50,6 +50,8 @@
#include "scannedfoldersmodel.h"
#include "qinisettings.h"
using namespace libtorrent;
// Constructor
options_imp::options_imp(QWidget *parent):QDialog(parent){
qDebug("-> Constructing Options");

View file

@ -37,8 +37,6 @@
// actions on double-click on torrents
enum DoubleClickAction {TOGGLE_PAUSE, OPEN_DEST, NO_ACTION};
using namespace libtorrent;
class QCloseEvent;
class AdvancedSettings;

View file

@ -47,8 +47,6 @@
#define SIZE 1
#define PROGRESS 2
using namespace libtorrent;
class previewSelect: public QDialog, private Ui::preview {
Q_OBJECT
@ -105,7 +103,7 @@ public:
previewList->setItemDelegate(listDelegate);
previewList->header()->resizeSection(0, 200);
// Fill list in
std::vector<size_type> fp;
std::vector<libtorrent::size_type> fp;
h.file_progress(fp);
unsigned int nbFiles = h.num_files();
for(unsigned int i=0; i<nbFiles; ++i){

View file

@ -47,6 +47,8 @@ const QString RSS_URL = "http://sourceforge.net/api/file/index/project-id/163414
const QString FILE_EXT = "EXE";
#endif
using namespace libtorrent;
ProgramUpdater::ProgramUpdater(QObject *parent) :
QObject(parent)
{
@ -55,7 +57,7 @@ ProgramUpdater::ProgramUpdater(QObject *parent) :
// Proxy support
if(pref.isProxyEnabled()) {
QNetworkProxy proxy;
switch(pref.getHTTPProxyType()) {
switch(pref.getProxyType()) {
case Proxy::SOCKS4:
case Proxy::SOCKS5:
case Proxy::SOCKS5_PW:
@ -64,8 +66,8 @@ ProgramUpdater::ProgramUpdater(QObject *parent) :
proxy.setType(QNetworkProxy::HttpProxy);
break;
}
proxy.setHostName(pref.getHTTPProxyIp());
proxy.setPort(pref.getHTTPProxyPort());
proxy.setHostName(pref.getProxyIp());
proxy.setPort(pref.getProxyPort());
// Proxy authentication
if(pref.isProxyAuthEnabled()) {
proxy.setUser(pref.getProxyUsername());

View file

@ -38,7 +38,6 @@
#include <libtorrent/bitfield.hpp>
#include <math.h>
using namespace libtorrent;
#define BAR_HEIGHT 18
class DownloadedPiecesBar: public QWidget {
@ -54,7 +53,7 @@ public:
setFixedHeight(BAR_HEIGHT);
}
void setProgress(const bitfield &pieces, const bitfield &downloading_pieces) {
void setProgress(const libtorrent::bitfield &pieces, const libtorrent::bitfield &downloading_pieces) {
if(pieces.empty()) {
// Empty bar
QPixmap pix = QPixmap(1, 1);
@ -67,8 +66,8 @@ public:
const uint w = width();
if(nb_pieces > w) {
const uint ratio = floor(nb_pieces/(double)w);
bitfield scaled_pieces(ceil(nb_pieces/(double)ratio), false);
bitfield scaled_downloading(ceil(nb_pieces/(double)ratio), false);
libtorrent::bitfield scaled_pieces(ceil(nb_pieces/(double)ratio), false);
libtorrent::bitfield scaled_downloading(ceil(nb_pieces/(double)ratio), false);
uint scaled_index = 0;
for(qulonglong i=0; i<nb_pieces; i+= ratio) {
bool have = true;

View file

@ -45,8 +45,6 @@
#include <boost/asio/ip/tcp.hpp>
#endif
using namespace libtorrent;
class PeerAdditionDlg: public QDialog, private Ui::addPeerDialog {
Q_OBJECT

View file

@ -45,6 +45,8 @@
#include <vector>
#include "qinisettings.h"
using namespace libtorrent;
PeerListWidget::PeerListWidget(PropertiesWidget *parent): QTreeView(parent), properties(parent), display_flags(false) {
// Visual settings
setRootIsDecorated(false);

View file

@ -62,8 +62,8 @@ public:
public slots:
void loadPeers(const QTorrentHandle &h, bool force_hostname_resolution=false);
QStandardItem* addPeer(QString ip, peer_info peer);
void updatePeer(QString ip, peer_info peer);
QStandardItem* addPeer(QString ip, libtorrent::peer_info peer);
void updatePeer(QString ip, libtorrent::peer_info peer);
void handleResolved(QString ip, QString hostname);
void updatePeerHostNameResolutionState();
void updatePeerCountryResolutionState();

View file

@ -55,6 +55,8 @@
#include "qinisettings.h"
#include "proptabbar.h"
using namespace libtorrent;
PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, TransferListWidget *transferList):
QWidget(parent), transferList(transferList), main_window(main_window) {
@ -248,7 +250,7 @@ void PropertiesWidget::loadTorrentInfos(QTorrentHandle &_h) {
// Expand first item if possible
filesList->expand(PropListModel->index(0, 0));
}
} catch(invalid_handle e) {
} catch(invalid_handle& e) {
}
// Load dynamic data

View file

@ -152,7 +152,7 @@ public:
if(index.column() != PRIORITY) return 0;
if(properties) {
QTorrentHandle h = properties->getCurrentTorrent();
if(!h.is_valid() || static_cast<torrent_handle>(h).is_seed() || !h.has_metadata()) return 0;
if(!h.is_valid() || static_cast<libtorrent::torrent_handle>(h).is_seed() || !h.has_metadata()) return 0;
}
if(index.data().toInt() <= 0) {
// IGNORED or MIXED

View file

@ -43,6 +43,8 @@
#include "qbtsession.h"
#include "qinisettings.h"
using namespace libtorrent;
TrackerList::TrackerList(PropertiesWidget *properties): QTreeWidget(), properties(properties) {
// Graphical settings
setRootIsDecorated(false);

View file

@ -79,8 +79,8 @@ public slots:
}
QList<QUrl> existingTrackers;
// Load from torrent handle
std::vector<announce_entry> tor_trackers = h.trackers();
std::vector<announce_entry>::iterator itr = tor_trackers.begin();
std::vector<libtorrent::announce_entry> tor_trackers = h.trackers();
std::vector<libtorrent::announce_entry>::iterator itr = tor_trackers.begin();
while(itr != tor_trackers.end()) {
existingTrackers << QUrl(misc::toQString(itr->url));
itr++;

View file

@ -69,6 +69,8 @@
#include <boost/filesystem/exception.hpp>
#include <queue>
using namespace libtorrent;
QBtSession* QBtSession::m_instance = 0;
const int MAX_TRACKER_ERRORS = 2;

View file

@ -51,8 +51,6 @@
#include "qtorrenthandle.h"
#include "trackerinfos.h"
using namespace libtorrent;
#define MAX_SAMPLES 20
class downloadThread;
@ -75,11 +73,11 @@ public:
static void drop();
~QBtSession();
QTorrentHandle getTorrentHandle(QString hash) const;
std::vector<torrent_handle> getTorrents() const;
std::vector<libtorrent::torrent_handle> getTorrents() const;
bool isFilePreviewPossible(QString fileHash) const;
float getPayloadDownloadRate() const;
float getPayloadUploadRate() const;
session_status getSessionStatus() const;
libtorrent::session_status getSessionStatus() const;
int getListenPort() const;
float getRealRatio(QString hash) const;
QHash<QString, TrackerInfos> getTrackersInfo(QString hash) const;
@ -91,7 +89,7 @@ public:
qlonglong getETA(QString hash);
inline QStringList getConsoleMessages() const { return consoleMessages; }
inline QStringList getPeerBanMessages() const { return peerBanMessages; }
inline session* getSession() const { return s; }
inline libtorrent::session* getSession() const { return s; }
inline bool useTemporaryFolder() const { return !defaultTempPath.isEmpty(); }
inline QString getDefaultSavePath() const { return defaultSavePath; }
inline ScanFoldersModel* getScanFoldersModel() const { return m_scanFolders; }
@ -132,8 +130,8 @@ public slots:
void setUploadRateLimit(long rate);
void setMaxRatio(float ratio);
void setDHTPort(int dht_port);
void setProxySettings(const proxy_settings &proxySettings);
void setSessionSettings(const session_settings &sessionSettings);
void setProxySettings(const libtorrent::proxy_settings &proxySettings);
void setSessionSettings(const libtorrent::session_settings &sessionSettings);
void startTorrentsInPause(bool b);
void setDefaultTempPath(QString temppath);
void setAppendLabelToSavePath(bool append);
@ -143,7 +141,7 @@ public slots:
void appendqBextensionToTorrent(QTorrentHandle &h, bool append);
void setAppendqBExtension(bool append);
#endif
void applyEncryptionSettings(pe_settings se);
void applyEncryptionSettings(libtorrent::pe_settings se);
void setDownloadLimit(QString hash, long val);
void setUploadLimit(QString hash, long val);
void enableUPnP(bool b);
@ -169,7 +167,7 @@ protected:
bool loadFastResumeData(QString hash, std::vector<char> &buf);
void loadTorrentSettings(QTorrentHandle h);
void loadTorrentTempData(QTorrentHandle h, QString savePath, bool magnet);
add_torrent_params initializeAddTorrentParams(QString hash);
libtorrent::add_torrent_params initializeAddTorrentParams(QString hash);
protected slots:
void addTorrentsFromScanFolder(QStringList&);
@ -181,7 +179,7 @@ protected slots:
void sendNotificationEmail(QTorrentHandle h);
void autoRunExternalProgram(QTorrentHandle h, bool async=true);
void cleanUpAutoRunProcess(int);
void mergeTorrents(QTorrentHandle h_ex, boost::intrusive_ptr<torrent_info> t);
void mergeTorrents(QTorrentHandle h_ex, boost::intrusive_ptr<libtorrent::torrent_info> t);
void exportTorrentFile(QTorrentHandle h);
signals:
@ -211,7 +209,7 @@ private:
private:
// Bittorrent
session *s;
libtorrent::session *s;
QPointer<QTimer> timerAlerts;
QPointer<BandwidthScheduler> bd_scheduler;
QMap<QUrl, QPair<QString, QString> > savepathLabel_fromurl;

View file

@ -45,6 +45,8 @@
#include <libtorrent/entry.hpp>
#include <boost/filesystem/fstream.hpp>
using namespace libtorrent;
QTorrentHandle::QTorrentHandle(torrent_handle h): torrent_handle(h) {}
//

View file

@ -35,14 +35,12 @@
#include <libtorrent/torrent_handle.hpp>
#include <libtorrent/torrent_info.hpp>
using namespace libtorrent;
#include <QString>
class QStringList;
// A wrapper for torrent_handle in libtorrent
// to interact well with Qt types
class QTorrentHandle : public torrent_handle {
class QTorrentHandle : public libtorrent::torrent_handle {
public:
@ -51,7 +49,7 @@ class QTorrentHandle : public torrent_handle {
//
QTorrentHandle() {}
explicit QTorrentHandle(torrent_handle h);
explicit QTorrentHandle(libtorrent::torrent_handle h);
//
// Getters
@ -59,15 +57,15 @@ class QTorrentHandle : public torrent_handle {
QString hash() const;
QString name() const;
float progress() const;
bitfield pieces() const;
libtorrent::bitfield pieces() const;
QString current_tracker() const;
bool is_paused() const;
bool has_filtered_pieces() const;
size_type total_size() const;
size_type piece_length() const;
libtorrent::size_type total_size() const;
libtorrent::size_type piece_length() const;
int num_pieces() const;
size_type total_wanted_done() const;
size_type total_wanted() const;
libtorrent::size_type total_wanted_done() const;
libtorrent::size_type total_wanted() const;
float download_payload_rate() const;
float upload_payload_rate() const;
int num_connections() const;
@ -78,22 +76,22 @@ class QTorrentHandle : public torrent_handle {
int num_incomplete() const;
QString save_path() const;
QStringList url_seeds() const;
size_type actual_size() const;
libtorrent::size_type actual_size() const;
int num_files() const;
int queue_position() const;
bool is_queued() const;
QString filename_at(unsigned int index) const;
size_type filesize_at(unsigned int index) const;
torrent_status::state_t state() const;
libtorrent::size_type filesize_at(unsigned int index) const;
libtorrent::torrent_status::state_t state() const;
QString creator() const;
QString comment() const;
size_type total_failed_bytes() const;
size_type total_redundant_bytes() const;
size_type total_payload_download() const;
size_type total_payload_upload() const;
size_type all_time_upload() const;
size_type all_time_download() const;
size_type total_done() const;
libtorrent::size_type total_failed_bytes() const;
libtorrent::size_type total_redundant_bytes() const;
libtorrent::size_type total_payload_download() const;
libtorrent::size_type total_payload_upload() const;
libtorrent::size_type all_time_upload() const;
libtorrent::size_type all_time_download() const;
libtorrent::size_type total_done() const;
QStringList files_path() const;
QStringList uneeded_files_path() const;
bool has_missing_files() const;
@ -112,7 +110,7 @@ class QTorrentHandle : public torrent_handle {
QString firstFileSavePath() const;
bool has_error() const;
QString error() const;
void downloading_pieces(bitfield &bf) const;
void downloading_pieces(libtorrent::bitfield &bf) const;
//
// Setters
@ -125,7 +123,7 @@ class QTorrentHandle : public torrent_handle {
void file_priority(int index, int priority) const;
void set_tracker_login(QString username, QString password);
void move_storage(QString path) const;
void add_tracker(const announce_entry& url);
void add_tracker(const libtorrent::announce_entry& url);
void prioritize_first_last_piece(bool b);
void rename_file(int index, QString name);
bool save_torrent_file(QString path);

View file

@ -46,8 +46,6 @@
#include <boost/asio/ip/tcp.hpp>
#endif
using namespace libtorrent;
const int MAX_THREADS = 20;
const int CACHE_SIZE = 500;

View file

@ -37,8 +37,6 @@
#include "misc.h"
#include "qbtsession.h"
using namespace libtorrent;
class SpeedLimitDialog : public QDialog, private Ui_bandwidth_dlg {
Q_OBJECT

View file

@ -25,6 +25,7 @@ ICONS_PATH = Icons
# use "CONFIG -= debug" to disable debug
CONFIG += debug
#CONFIG += release
# Disable debug output in release mode
!debug {

View file

@ -177,7 +177,7 @@ public slots:
void refreshStatusBar() {
// Update connection status
const session_status sessionStatus = QBtSession::instance()->getSessionStatus();
const libtorrent::session_status sessionStatus = QBtSession::instance()->getSessionStatus();
if(!QBtSession::instance()->getSession()->is_listening()) {
connecStatusLblIcon->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/disconnected.png")));
connecStatusLblIcon->setToolTip(QString::fromUtf8("<b>")+tr("Connection Status:")+QString::fromUtf8("</b><br>")+tr("Offline. This usually means that qBittorrent failed to listen on the selected port for incoming connections."));

View file

@ -54,6 +54,8 @@
#include "torrentadditiondlg.h"
using namespace libtorrent;
torrentAdditionDialog::torrentAdditionDialog(QWidget *parent) :
QDialog(parent), old_label(""), hidden_height(0) {
const Preferences pref;

View file

@ -37,8 +37,6 @@
#include <libtorrent/torrent_info.hpp>
using namespace libtorrent;
class TorrentFilesModel;
class PropListDelegate;
@ -84,7 +82,7 @@ private:
TorrentFilesModel *PropListModel;
PropListDelegate *PropDelegate;
unsigned int nbFiles;
boost::intrusive_ptr<torrent_info> t;
boost::intrusive_ptr<libtorrent::torrent_info> t;
QStringList files_path;
bool is_magnet;
int hidden_height;

View file

@ -41,6 +41,8 @@
const uint NB_PIECES_MIN = 1200;
const uint NB_PIECES_MAX = 2200;
using namespace libtorrent;
TorrentCreatorDlg::TorrentCreatorDlg(QWidget *parent): QDialog(parent), creatorThread(0) {
setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);

View file

@ -40,7 +40,6 @@
#include <libtorrent/torrent_info.hpp>
#include "proplistdelegate.h"
#include "misc.h"
using namespace libtorrent;
enum FilePriority {IGNORED=0, NORMAL=1, HIGH=2, MAXIMUM=7, PARTIAL=-1};
enum TreeItemType {TFILE, FOLDER, ROOT};
@ -60,7 +59,7 @@ private:
public:
// File Construction
TreeItem(file_entry f, TreeItem *parent, int _file_index) {
TreeItem(libtorrent::file_entry f, TreeItem *parent, int _file_index) {
Q_ASSERT(parent);
parentItem = parent;
type = TFILE;
@ -333,7 +332,7 @@ public:
delete rootItem;
}
void updateFilesProgress(std::vector<size_type> fp) {
void updateFilesProgress(std::vector<libtorrent::size_type> fp) {
for(unsigned int i=0; i<fp.size(); ++i) {
Q_ASSERT(fp[i] >= 0);
files_index[i]->setProgress(fp[i]);
@ -519,7 +518,7 @@ public:
emit layoutChanged();
}
void setupModelData(torrent_info const& t) {
void setupModelData(libtorrent::torrent_info const& t) {
qDebug("setup model data called");
if(t.num_files() == 0) return;
// Initialize files_index array
@ -551,7 +550,7 @@ public:
// Iterate over files
int i = 0;
torrent_info::file_iterator fi = t.begin_files();
libtorrent::torrent_info::file_iterator fi = t.begin_files();
while(fi != t.end_files()) {
current_parent = root_folder;
QString path = QDir::cleanPath(misc::toQStringU(fi->path.string())).replace("\\", "/");

View file

@ -4,8 +4,6 @@
#include <libtorrent/entry.hpp>
#include <QString>
using namespace libtorrent;
struct QPeer {
bool operator!=(const QPeer &other) const {
@ -20,13 +18,13 @@ struct QPeer {
return ip+":"+QString::number(port);
}
entry toEntry(bool no_peer_id) const {
entry::dictionary_type peer_map;
libtorrent::entry toEntry(bool no_peer_id) const {
libtorrent::entry::dictionary_type peer_map;
if(!no_peer_id)
peer_map["id"] = entry(peer_id.toStdString());
peer_map["ip"] = entry(ip.toStdString());
peer_map["port"] = entry(port);
return entry(peer_map);
peer_map["id"] = libtorrent::entry(peer_id.toStdString());
peer_map["ip"] = libtorrent::entry(ip.toStdString());
peer_map["port"] = libtorrent::entry(port);
return libtorrent::entry(peer_map);
}
QString ip;

View file

@ -37,8 +37,6 @@
#include "ui_login.h"
#include "qtorrenthandle.h"
using namespace libtorrent;
class trackerLogin : public QDialog, private Ui::authentication{
Q_OBJECT

View file

@ -40,6 +40,8 @@
#include <QDebug>
#include <QTranslator>
using namespace libtorrent;
EventManager::EventManager(QObject *parent)
: QObject(parent)
{

View file

@ -46,6 +46,8 @@
#include <QRegExp>
#include <QTemporaryFile>
using namespace libtorrent;
HttpConnection::HttpConnection(QTcpSocket *socket, HttpServer *parent)
: QObject(parent), socket(socket), httpserver(parent)
{

View file

@ -5,15 +5,26 @@ INCLUDEPATH += $$quote(C:/qBittorrent/RC_0_15/zlib)
INCLUDEPATH += $$quote(C:/OpenSSL/include)
LIBS += $$quote(-LC:/OpenSSL/lib/VC)
LIBS += $$quote(-L$C:/qBittorrent/libs)
LIBS += $$quote(-LC:/qBittorrent/libs)
# LIBTORRENT DEFINES
DEFINES += BOOST_ALL_NO_LIB BOOST_ASIO_HASH_MAP_BUCKETS=1021 BOOST_EXCEPTION_DISABLE
DEFINES += BOOST_FILESYSTEM_STATIC_LINK=1 BOOST_MULTI_INDEX_DISABLE_SERIALIZATION
DEFINES += BOOST_SYSTEM_STATIC_LINK=1 BOOST_THREAD_USE_LIB BOOST_THREAD_USE_LIB=1
DEFINES += TORRENT_USE_OPENSSL UNICODE WIN32 WIN32_LEAN_AND_MEAN
DEFINES += _CRT_SECURE_NO_DEPRECATE _FILE_OFFSET_BITS=64 _SCL_SECURE_NO_DEPRECATE
DEFINES += _UNICODE _WIN32 _WIN32_WINNT=0x0500 __USE_W32_SOCKETS
DEFINES += BOOST_ALL_NO_LIB
DEFINES += BOOST_ASIO_HASH_MAP_BUCKETS=1021
DEFINES += BOOST_EXCEPTION_DISABLE
DEFINES += BOOST_SYSTEM_STATIC_LINK=1
DEFINES += BOOST_THREAD_USE_LIB
DEFINES += BOOST_THREAD_USE_LIB=1
DEFINES += TORRENT_USE_OPENSSL
DEFINES += UNICODE
DEFINES += WIN32
DEFINES += WIN32_LEAN_AND_MEAN
DEFINES += _CRT_SECURE_NO_DEPRECATE
DEFINES += _FILE_OFFSET_BITS=64
DEFINES += _SCL_SECURE_NO_DEPRECATE
DEFINES += _UNICODE
DEFINES += _WIN32
DEFINES += _WIN32_WINNT=0x0500
DEFINES += __USE_W32_SOCKETS
DEFINES += WITH_SHIPPED_GEOIP_H
debug {