mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-27 03:39:39 +03:00
Added back ability to reorder trackers
This commit is contained in:
parent
9066520076
commit
ac097b9904
3 changed files with 8 additions and 32 deletions
|
@ -106,13 +106,8 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, Tra
|
|||
ProgressHLayout_2->insertWidget(1, pieces_availability);
|
||||
// Tracker list
|
||||
trackerList = new TrackerList(this);
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
trackerUpButton->setVisible(false);
|
||||
trackerDownButton->setVisible(false);
|
||||
#else
|
||||
connect(trackerUpButton, SIGNAL(clicked()), trackerList, SLOT(moveSelectionUp()));
|
||||
connect(trackerDownButton, SIGNAL(clicked()), trackerList, SLOT(moveSelectionDown()));
|
||||
#endif
|
||||
horizontalLayout_trackers->insertWidget(0, trackerList);
|
||||
// Peers list
|
||||
peersList = new PeerListWidget(this);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>540</width>
|
||||
<width>551</width>
|
||||
<height>274</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<item>
|
||||
<widget class="QStackedWidget" name="stackedProperties">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
|
@ -54,8 +54,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>520</width>
|
||||
<height>373</height>
|
||||
<width>531</width>
|
||||
<height>395</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
|
@ -557,15 +557,16 @@
|
|||
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans'; font-size:8pt; font-weight:400; font-style:normal;">
|
||||
</style></head><body style=" font-family:'Cantarell'; font-size:8pt; font-weight:400; font-style:normal;">
|
||||
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||
<tr>
|
||||
<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; font-family:'Sans';"></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>
|
||||
<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:'Ubuntu';"></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:'Ubuntu';"></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:'Ubuntu';"></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></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 name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
|
@ -628,22 +629,6 @@ p, li { white-space: pre-wrap; }
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="trackerDownButton">
|
||||
<property name="sizePolicy">
|
||||
|
|
|
@ -100,7 +100,6 @@ void TrackerList::setRowColor(int row, QColor color) {
|
|||
}
|
||||
|
||||
void TrackerList::moveSelectionUp() {
|
||||
#if LIBTORRENT_VERSION_MINOR < 15
|
||||
QTorrentHandle h = properties->getCurrentTorrent();
|
||||
if(!h.is_valid()) {
|
||||
clear();
|
||||
|
@ -134,11 +133,9 @@ void TrackerList::moveSelectionUp() {
|
|||
h.replace_trackers(trackers);
|
||||
// Reannounce
|
||||
h.force_reannounce();
|
||||
#endif
|
||||
}
|
||||
|
||||
void TrackerList::moveSelectionDown() {
|
||||
#if LIBTORRENT_VERSION_MINOR < 15
|
||||
QTorrentHandle h = properties->getCurrentTorrent();
|
||||
if(!h.is_valid()) {
|
||||
clear();
|
||||
|
@ -172,7 +169,6 @@ void TrackerList::moveSelectionDown() {
|
|||
h.replace_trackers(trackers);
|
||||
// Reannounce
|
||||
h.force_reannounce();
|
||||
#endif
|
||||
}
|
||||
|
||||
void TrackerList::clear() {
|
||||
|
|
Loading…
Reference in a new issue