1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-11-16 11:53:28 +01:00

Compare commits

..

10 Commits

Author SHA1 Message Date
Christophe Dumez
d6101a31f4 Bump to v2.8.4 2011-08-09 20:23:35 +03:00
Christophe Dumez
0f8eadb668 Update Changelog 2011-08-09 20:17:37 +03:00
Christophe Dumez
443f693acf Fix torrent addition dialog geometry saving
When switching between single-file and multi-file torrents, the
dialog geometry saving / loading code was not behaving correctly.
2011-08-09 20:15:08 +03:00
Christophe Dumez
63a458e6ea Preferences: Do not hardcode layout margin 2011-08-09 19:01:08 +03:00
Christophe Dumez
630079f802 Update Changelog 2011-08-08 20:51:29 +03:00
Christophe Dumez
a9a7b9ff75 Disable announce_to_all_trackers to comply with the multi-tracker
specification
(cherry picked from commit 8c491cc831)
2011-08-08 20:50:38 +03:00
Christophe Dumez
dc0a8609da Update changelog 2011-08-07 15:08:54 +03:00
Christophe Dumez
dfd01cfa5a Added back ability to reorder trackers
(cherry picked from commit ac097b9904)
2011-08-07 15:08:14 +03:00
Christophe Dumez
4715746535 Fix "make dist" command to make sure the .git folder is removed
(cherry picked from commit 9066520076)
2011-08-02 19:47:44 +03:00
Christophe Dumez
926b5a7288 Fix "make dist" command now that we use GIT instead of SVN
(cherry picked from commit 2d83482395)
2011-08-02 19:42:22 +03:00
12 changed files with 80 additions and 95 deletions

View File

@@ -1,3 +1,9 @@
* Tue Aug 09 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.8.4
- BUGFIX: Added back ability to reorder trackers
- BUGFIX: Do not announce to all trackers in the same tier to comply
with the multi-tracker specification
- BUGFIX: Fix torrent addition dialog geometry saving
* Tue Aug 02 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.8.3
- BUGFIX: Fix memory usage problem in log tab
- BUGFIX: Make sure the main window is not hidden on startup if no

View File

@@ -6,7 +6,9 @@ include(version.pri)
# Dist
dist.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}/ &&
dist.commands += svn export . ../$${PROJECT_NAME}-$${PROJECT_VERSION} &&
dist.commands += git clone . ../$${PROJECT_NAME}-$${PROJECT_VERSION} &&
dist.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}/.git &&
dist.commands += rm -f ../$${PROJECT_NAME}-$${PROJECT_VERSION}/.gitignore &&
dist.commands += tar zcpvf ../$${PROJECT_NAME}-$${PROJECT_VERSION}.tar.gz ../$${PROJECT_NAME}-$${PROJECT_VERSION} &&
dist.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}

View File

@@ -47,7 +47,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>2.8.3</string>
<string>2.8.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>

View File

@@ -171,8 +171,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>504</width>
<height>537</height>
<width>489</width>
<height>601</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
@@ -487,8 +487,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>504</width>
<height>923</height>
<width>501</width>
<height>999</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -946,9 +946,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-91</y>
<width>504</width>
<height>493</height>
<y>0</y>
<width>489</width>
<height>560</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_20">
@@ -1391,8 +1391,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>363</width>
<height>427</height>
<width>507</width>
<height>510</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_33">
@@ -1803,8 +1803,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>542</width>
<height>455</height>
<width>546</width>
<height>492</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
@@ -1823,9 +1823,6 @@
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_18">
<property name="bottomMargin">
<number>9</number>
</property>
<item>
<widget class="QGroupBox" name="checkDifferentDHTPort">
<property name="title">
@@ -2179,8 +2176,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>425</width>
<height>513</height>
<width>451</width>
<height>594</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_23">
@@ -2556,8 +2553,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>86</width>
<height>16</height>
<width>98</width>
<height>28</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_36"/>

View File

@@ -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);

View File

@@ -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">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Cantarell'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
&lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;-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';&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;-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';&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;-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';&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;-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';&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;-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';&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;p style=&quot;-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';&quot;&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</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">

View File

@@ -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() {

View File

@@ -392,7 +392,8 @@ void QBtSession::configureSession() {
//sessionSettings.announce_to_all_trackers = true;
sessionSettings.auto_scrape_interval = 1200; // 20 minutes
#if LIBTORRENT_VERSION_MINOR > 14
sessionSettings.announce_to_all_trackers = true;
// Comply with the multi-tracker specification
sessionSettings.announce_to_all_trackers = false;
sessionSettings.announce_to_all_tiers = false;
sessionSettings.auto_scrape_min_interval = 900; // 15 minutes
#endif

View File

@@ -59,10 +59,11 @@
using namespace libtorrent;
torrentAdditionDialog::torrentAdditionDialog(QWidget *parent) :
QDialog(parent), old_label(""), hidden_height(0) {
QDialog(parent), old_label(""), hidden_height(0), m_showContentList(true) {
const Preferences pref;
setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
setMinimumSize(0, 0);
// Icons
CancelButton->setIcon(IconProvider::instance()->getIcon("dialog-cancel"));
OkButton->setIcon(IconProvider::instance()->getIcon("list-add"));
@@ -85,8 +86,6 @@ torrentAdditionDialog::torrentAdditionDialog(QWidget *parent) :
contentFilterLayout->insertWidget(1, contentFilterLine);
// Important: as a default, it inserts at the bottom which is not desirable
savePathTxt->setInsertPolicy(QComboBox::InsertAtCurrent);
// Remember columns width
readSettings();
//torrentContentList->header()->setResizeMode(0, QHeaderView::Stretch);
defaultSavePath = pref.getSavePath();
appendLabelToSavePath = pref.appendTorrentLabel();
@@ -132,18 +131,33 @@ void torrentAdditionDialog::closeEvent(QCloseEvent *event)
}
void torrentAdditionDialog::readSettings() {
// The window should NOT be shown before calling this method
Q_ASSERT(!isVisible());
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
restoreGeometry(settings.value("TorrentAdditionDlg/dimensions").toByteArray());
if(!torrentContentList->header()->restoreState(settings.value("TorrentAdditionDlg/ContentHeaderState").toByteArray())) {
qDebug() << Q_FUNC_INFO << "First executation, resize first section to 400px...";
torrentContentList->header()->resizeSection(0, 400); //Default
QString mode = m_showContentList ? "Full" : "Short";
qDebug() << Q_FUNC_INFO << "mode:" << mode;
if (!restoreGeometry(settings.value("TorrentAdditionDlg/geometry" + mode).toByteArray())) {
qDebug() << Q_FUNC_INFO << "Failed to load last known dialog geometry";
if (!m_showContentList) {
qDebug() << Q_FUNC_INFO << "Short mode: adapting default size";
resize(width(), height() - 220); // Default size is for full mode
}
}
if (m_showContentList) {
if(!torrentContentList->header()->restoreState(settings.value("TorrentAdditionDlg/ContentHeaderState").toByteArray())) {
qDebug() << Q_FUNC_INFO << "First executation, resize first section to 400px...";
torrentContentList->header()->resizeSection(0, 400); // Default
}
}
}
void torrentAdditionDialog::saveSettings() {
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
settings.setValue("TorrentAdditionDlg/ContentHeaderState", torrentContentList->header()->saveState());
settings.setValue("TorrentAdditionDlg/dimensions", saveGeometry());
QString mode = m_showContentList ? "Full" : "Short";
settings.setValue("TorrentAdditionDlg/geometry" + mode, saveGeometry());
if (m_showContentList) {
settings.setValue("TorrentAdditionDlg/ContentHeaderState", torrentContentList->header()->saveState());
}
}
void torrentAdditionDialog::limitDialogWidth() {
@@ -165,26 +179,22 @@ void torrentAdditionDialog::limitDialogWidth() {
void torrentAdditionDialog::hideTorrentContent() {
// Disable useless widgets
hidden_height += torrentContentList->height();
torrentContentList->setVisible(false);
hidden_height += torrentContentLbl->height();
//torrentContentLbl->setVisible(false);
hidden_height += selectAllButton->height();
selectNoneButton->setVisible(false);
selectAllButton->setVisible(false);
for(int i=0; i<selectionBtnsLayout->count(); ++i) {
if(selectionBtnsLayout->itemAt(i)->widget())
selectionBtnsLayout->itemAt(i)->widget()->setVisible(false);
}
for(int i=0; i<contentFilterLayout->count(); ++i) {
if(contentFilterLayout->itemAt(i)->widget())
contentFilterLayout->itemAt(i)->widget()->setVisible(false);
}
contentFilterLayout->update();
// Resize main window
setMinimumSize(0, 0);
resize(width(), height()-hidden_height);
m_showContentList = false;
}
void torrentAdditionDialog::showLoadMagnetURI(QString magnet_uri) {
show();
is_magnet = true;
this->from_url = magnet_uri;
@@ -210,8 +220,15 @@ void torrentAdditionDialog::showLoadMagnetURI(QString magnet_uri) {
// No need to display torrent content
hideTorrentContent();
// Remember dialog geometry
readSettings();
// Limit dialog width
limitDialogWidth();
// Display dialog
show();
}
void torrentAdditionDialog::showLoad(QString filePath, QString from_url) {
@@ -317,15 +334,18 @@ void torrentAdditionDialog::showLoad(QString filePath, QString from_url) {
// Update size labels
updateDiskSpaceLabels();
// Show the dialog
show();
// Hide useless widgets
if(t->num_files() <= 1)
hideTorrentContent();
// Remember dialog geometry
readSettings();
// Limit dialog width
limitDialogWidth();
// Show the dialog
show();
}
void torrentAdditionDialog::displayContentListMenu(const QPoint&) {

View File

@@ -91,6 +91,7 @@ private:
bool is_magnet;
int hidden_height;
QStringList path_history;
bool m_showContentList;
};
#endif

View File

@@ -190,12 +190,6 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
@@ -217,18 +211,12 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<layout class="QHBoxLayout" name="selectionBtnsLayout">
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
@@ -250,12 +238,6 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>

View File

@@ -1,5 +1,5 @@
PROJECT_NAME = qbittorrent
PROJECT_VERSION = 2.8.3
PROJECT_VERSION = 2.8.4
os2 {
DEFINES += VERSION=\'\"v$${PROJECT_VERSION}\"\'
@@ -9,4 +9,4 @@ os2 {
DEFINES += VERSION_MAJOR=2
DEFINES += VERSION_MINOR=8
DEFINES += VERSION_BUGFIX=3
DEFINES += VERSION_BUGFIX=4