mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-04 14:42:29 -06:00
Coding style clean up
This commit is contained in:
@@ -80,7 +80,7 @@ public:
|
||||
newopt.rect = opt.rect;
|
||||
// We don't want to display 100% unless
|
||||
// the torrent is really complete
|
||||
if(progress > 99.94 && progress < 100.)
|
||||
if (progress > 99.94 && progress < 100.)
|
||||
progress = 99.9;
|
||||
newopt.text = QString(QByteArray::number(progress, 'f', 1))+QString::fromUtf8("%");
|
||||
newopt.progress = (int)progress;
|
||||
@@ -158,16 +158,16 @@ public:
|
||||
}
|
||||
|
||||
QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &/* option */, const QModelIndex &index) const {
|
||||
if(index.column() != PRIORITY) return 0;
|
||||
if(properties) {
|
||||
if (index.column() != PRIORITY) return 0;
|
||||
if (properties) {
|
||||
QTorrentHandle h = properties->getCurrentTorrent();
|
||||
#if LIBTORRENT_VERSION_MINOR > 15
|
||||
if(!h.is_valid() || !h.has_metadata() || h.status(0x0).is_seeding) return 0;
|
||||
if (!h.is_valid() || !h.has_metadata() || h.status(0x0).is_seeding) return 0;
|
||||
#else
|
||||
if(!h.is_valid() || !h.has_metadata() || static_cast<libtorrent::torrent_handle>(h).is_seed()) return 0;
|
||||
if (!h.is_valid() || !h.has_metadata() || static_cast<libtorrent::torrent_handle>(h).is_seed()) return 0;
|
||||
#endif
|
||||
}
|
||||
if(index.data().toInt() <= 0) {
|
||||
if (index.data().toInt() <= 0) {
|
||||
// IGNORED or MIXED
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user