mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 22:14:32 +00:00
Fix compilation error introduced in last commit
Display pieces size in torrent properties
This commit is contained in:
parent
6bcbfa2e05
commit
f5b3564392
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
enum AdvSettingsCols {PROPERTY, VALUE};
|
enum AdvSettingsCols {PROPERTY, VALUE};
|
||||||
enum AdvSettingsRows {DISK_CACHE, OUTGOING_PORT_MIN, OUTGOING_PORT_MAX, IGNORE_LIMIT_LAN, COUNT_OVERHEAD, RECHECK_COMPLETED, LIST_REFRESH, RESOLVE_COUNTRIES, RESOLVE_HOSTS, MAX_HALF_OPEN, SUPER_SEEDING, NETWORK_IFACE, PROGRAM_NOTIFICATIONS, TRACKER_STATUS, TRACKER_PORT,
|
enum AdvSettingsRows {DISK_CACHE, OUTGOING_PORT_MIN, OUTGOING_PORT_MAX, IGNORE_LIMIT_LAN, COUNT_OVERHEAD, RECHECK_COMPLETED, LIST_REFRESH, RESOLVE_COUNTRIES, RESOLVE_HOSTS, MAX_HALF_OPEN, SUPER_SEEDING, NETWORK_IFACE, PROGRAM_NOTIFICATIONS, TRACKER_STATUS, TRACKER_PORT,
|
||||||
#if defined(Q_WS_WIN) || define(Q_WS_MAC)
|
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
||||||
UPDATE_CHECK,
|
UPDATE_CHECK,
|
||||||
#endif
|
#endif
|
||||||
ROW_COUNT };
|
ROW_COUNT };
|
||||||
@ -24,7 +24,7 @@ private:
|
|||||||
QSpinBox *spin_cache, *outgoing_ports_min, *outgoing_ports_max, *spin_list_refresh, *spin_maxhalfopen, *spin_tracker_port;
|
QSpinBox *spin_cache, *outgoing_ports_min, *outgoing_ports_max, *spin_list_refresh, *spin_maxhalfopen, *spin_tracker_port;
|
||||||
QCheckBox *cb_ignore_limits_lan, *cb_count_overhead, *cb_recheck_completed, *cb_resolve_countries, *cb_resolve_hosts, *cb_super_seeding, *cb_program_notifications, *cb_tracker_status;
|
QCheckBox *cb_ignore_limits_lan, *cb_count_overhead, *cb_recheck_completed, *cb_resolve_countries, *cb_resolve_hosts, *cb_super_seeding, *cb_program_notifications, *cb_tracker_status;
|
||||||
QComboBox *combo_iface;
|
QComboBox *combo_iface;
|
||||||
#if defined(Q_WS_WIN) || define(Q_WS_MAC)
|
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
||||||
QCheckBox *cb_update_check;
|
QCheckBox *cb_update_check;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ public:
|
|||||||
delete cb_program_notifications;
|
delete cb_program_notifications;
|
||||||
delete spin_tracker_port;
|
delete spin_tracker_port;
|
||||||
delete cb_tracker_status;
|
delete cb_tracker_status;
|
||||||
#if defined(Q_WS_WIN) || define(Q_WS_MAC)
|
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
||||||
delete cb_update_check;
|
delete cb_update_check;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ public slots:
|
|||||||
// Tracker
|
// Tracker
|
||||||
pref.setTrackerEnabled(cb_tracker_status->isChecked());
|
pref.setTrackerEnabled(cb_tracker_status->isChecked());
|
||||||
pref.setTrackerPort(spin_tracker_port->value());
|
pref.setTrackerPort(spin_tracker_port->value());
|
||||||
#if defined(Q_WS_WIN) || define(Q_WS_MAC)
|
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
||||||
pref.setUpdateCheckEnabled(cb_update_check->isChecked());
|
pref.setUpdateCheckEnabled(cb_update_check->isChecked());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -228,7 +228,7 @@ protected slots:
|
|||||||
spin_tracker_port->setMaximum(65535);
|
spin_tracker_port->setMaximum(65535);
|
||||||
spin_tracker_port->setValue(pref.getTrackerPort());
|
spin_tracker_port->setValue(pref.getTrackerPort());
|
||||||
setCellWidget(TRACKER_PORT, VALUE, spin_tracker_port);
|
setCellWidget(TRACKER_PORT, VALUE, spin_tracker_port);
|
||||||
#if defined(Q_WS_WIN) || define(Q_WS_MAC)
|
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
||||||
setItem(UPDATE_CHECK, PROPERTY, new QTableWidgetItem(tr("Check for software updates")));
|
setItem(UPDATE_CHECK, PROPERTY, new QTableWidgetItem(tr("Check for software updates")));
|
||||||
cb_update_check = new QCheckBox();
|
cb_update_check = new QCheckBox();
|
||||||
connect(cb_update_check, SIGNAL(toggled(bool)), this, SLOT(emitSettingsChanged()));
|
connect(cb_update_check, SIGNAL(toggled(bool)), this, SLOT(emitSettingsChanged()));
|
||||||
|
@ -978,7 +978,7 @@ public:
|
|||||||
setValue(QString::fromUtf8("Preferences/Advanced/trackerPort"), port);
|
setValue(QString::fromUtf8("Preferences/Advanced/trackerPort"), port);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_WS_WIN) || define(Q_WS_MAC)
|
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
||||||
bool isUpdateCheckEnabled() const {
|
bool isUpdateCheckEnabled() const {
|
||||||
return value(QString::fromUtf8("Preferences/Advanced/updateCheck"), true).toBool();
|
return value(QString::fromUtf8("Preferences/Advanced/updateCheck"), true).toBool();
|
||||||
}
|
}
|
||||||
|
@ -177,6 +177,7 @@ void PropertiesWidget::clear() {
|
|||||||
qDebug("Clearing torrent properties");
|
qDebug("Clearing torrent properties");
|
||||||
save_path->clear();
|
save_path->clear();
|
||||||
lbl_creationDate->clear();
|
lbl_creationDate->clear();
|
||||||
|
pieceSize_lbl->clear();
|
||||||
hash_lbl->clear();
|
hash_lbl->clear();
|
||||||
comment_text->clear();
|
comment_text->clear();
|
||||||
progress_lbl->clear();
|
progress_lbl->clear();
|
||||||
@ -247,6 +248,8 @@ void PropertiesWidget::loadTorrentInfos(const QTorrentHandle &_h) {
|
|||||||
if(h.has_metadata()) {
|
if(h.has_metadata()) {
|
||||||
// Creation date
|
// Creation date
|
||||||
lbl_creationDate->setText(h.creation_date());
|
lbl_creationDate->setText(h.creation_date());
|
||||||
|
// Pieces size
|
||||||
|
pieceSize_lbl->setText(misc::friendlyUnit(h.piece_length()));
|
||||||
// Comment
|
// Comment
|
||||||
comment_text->setHtml(h.comment());
|
comment_text->setHtml(h.comment());
|
||||||
// URL seeds
|
// URL seeds
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>540</width>
|
<width>540</width>
|
||||||
<height>329</height>
|
<height>274</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@ -53,9 +53,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>-92</y>
|
||||||
<width>520</width>
|
<width>520</width>
|
||||||
<height>355</height>
|
<height>377</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
@ -497,6 +497,49 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Pieces size:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="pieceSize_lbl">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">piece size</string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_8">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>14</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="comment_lbl2">
|
<widget class="QLabel" name="comment_lbl2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Comment:</string>
|
<string>Comment:</string>
|
||||||
@ -506,7 +549,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="4" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextBrowser" name="comment_text">
|
<widget class="QTextBrowser" name="comment_text">
|
||||||
@ -519,6 +562,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="border: none;">
|
<td style="border: none;">
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||||
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans';"></p></td></tr></table></body></html></string>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans';"></p></td></tr></table></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="openExternalLinks">
|
<property name="openExternalLinks">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user