mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 21:52:32 -06:00
Fix compilation warnings in smtp.h (cgreco)
This commit is contained in:
@@ -128,7 +128,8 @@ QBtSession::QBtSession()
|
||||
//s->add_extension(&create_metadata_plugin);
|
||||
s->add_extension(&create_ut_metadata_plugin);
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
s->add_extension(&create_lt_trackers_plugin);
|
||||
if(pref.trackerExchangeEnabled())
|
||||
s->add_extension(&create_lt_trackers_plugin);
|
||||
#endif
|
||||
if(pref.isPeXEnabled()) {
|
||||
PeXEnabled = true;
|
||||
@@ -393,7 +394,7 @@ void QBtSession::configureSession() {
|
||||
sessionSettings.auto_scrape_interval = 1200; // 20 minutes
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
sessionSettings.announce_to_all_trackers = true;
|
||||
sessionSettings.announce_to_all_tiers = true; //uTorrent behavior
|
||||
sessionSettings.announce_to_all_tiers = false;
|
||||
sessionSettings.auto_scrape_min_interval = 900; // 15 minutes
|
||||
#endif
|
||||
sessionSettings.cache_size = pref.diskCacheSize()*64;
|
||||
@@ -633,6 +634,22 @@ void QBtSession::initWebUi() {
|
||||
} else {
|
||||
httpServer = new HttpServer(3000, this);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_OPENSSL
|
||||
if (pref.isWebUiHttpsEnabled()) {
|
||||
QSslCertificate cert(pref.getWebUiHttpsCertificate());
|
||||
QSslKey key;
|
||||
const QByteArray raw_key = pref.getWebUiHttpsKey();
|
||||
key = QSslKey(raw_key, QSsl::Rsa);
|
||||
if (!cert.isNull() && !key.isNull())
|
||||
httpServer->enableHttps(cert, key);
|
||||
else
|
||||
httpServer->disableHttps();
|
||||
} else {
|
||||
httpServer->disableHttps();
|
||||
}
|
||||
#endif
|
||||
|
||||
httpServer->setAuthorization(username, password);
|
||||
httpServer->setlocalAuthEnabled(pref.isWebUiLocalAuthEnabled());
|
||||
if(!httpServer->isListening()) {
|
||||
|
||||
@@ -572,6 +572,14 @@ return torrent_handle::status(0x0).distributed_copies;
|
||||
#endif
|
||||
}
|
||||
|
||||
void QTorrentHandle::file_progress(std::vector<size_type>& fp) const {
|
||||
torrent_handle::file_progress(fp
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
, torrent_handle::piece_granularity
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Setters
|
||||
//
|
||||
@@ -658,7 +666,7 @@ void QTorrentHandle::prioritize_files(const vector<int> &files) const {
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
bool was_seed = is_seed();
|
||||
vector<size_type> progress;
|
||||
torrent_handle::file_progress(progress);
|
||||
file_progress(progress);
|
||||
torrent_handle::prioritize_files(files);
|
||||
for(uint i=0; i<files.size(); ++i) {
|
||||
// Move unwanted files to a .unwanted subfolder
|
||||
|
||||
@@ -119,6 +119,7 @@ public:
|
||||
void downloading_pieces(libtorrent::bitfield &bf) const;
|
||||
bool has_metadata() const;
|
||||
float distributed_copies() const;
|
||||
void file_progress(std::vector<libtorrent::size_type>& fp) const;
|
||||
|
||||
//
|
||||
// Setters
|
||||
|
||||
Reference in New Issue
Block a user