mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 07:46:17 -07:00
Add compile definition to indicate using of libtorrent 2.0 (#15297)
The compile definition is temporary which will be removed when qbt ditches libtorrent 1.x.
This commit is contained in:
parent
bed643e627
commit
138c911ef4
23 changed files with 85 additions and 93 deletions
|
@ -55,7 +55,7 @@ StatsDialog::StatsDialog(QWidget *parent)
|
|||
connect(BitTorrent::Session::instance(), &BitTorrent::Session::statsUpdated
|
||||
, this, &StatsDialog::update);
|
||||
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
m_ui->labelCacheHitsText->hide();
|
||||
m_ui->labelCacheHits->hide();
|
||||
#endif
|
||||
|
@ -87,7 +87,7 @@ void StatsDialog::update()
|
|||
((atd > 0) && (atu > 0))
|
||||
? Utils::String::fromDouble(static_cast<qreal>(atu) / atd, 2)
|
||||
: "-");
|
||||
#if (LIBTORRENT_VERSION_NUM < 20000)
|
||||
#ifndef QBT_USES_LIBTORRENT2
|
||||
// Cache hits
|
||||
const qreal readRatio = cs.readRatio;
|
||||
m_ui->labelCacheHits->setText(QString::fromLatin1("%1%").arg((readRatio > 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue