Compare commits
118 Commits
release-3.
...
release-3.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab83c2fff5 | ||
|
|
106f5d7cc0 | ||
|
|
11943f6b88 | ||
|
|
665e0967a5 | ||
|
|
85b42fc3cf | ||
|
|
99e6d0010d | ||
|
|
b294d89b4f | ||
|
|
b78d1a82df | ||
|
|
96644c12ab | ||
|
|
45d10b1398 | ||
|
|
ef328f83c5 | ||
|
|
6cf780f57c | ||
|
|
37b048f2ab | ||
|
|
260ed50f10 | ||
|
|
307b5b7091 | ||
|
|
1de9da89c1 | ||
|
|
5fadb0d53e | ||
|
|
49fa853dde | ||
|
|
7555380964 | ||
|
|
36d299f891 | ||
|
|
658cc53f85 | ||
|
|
08f4c0ed12 | ||
|
|
5917b33ec6 | ||
|
|
65ec3d0e0f | ||
|
|
61c0c439f1 | ||
|
|
4cbe3fd6f7 | ||
|
|
94df3f44d7 | ||
|
|
370effd0d3 | ||
|
|
ff6e058dea | ||
|
|
d3a6bcf7bf | ||
|
|
c6a9a94331 | ||
|
|
abdcaebc8e | ||
|
|
c5a433a71e | ||
|
|
0a10b98975 | ||
|
|
506f933c48 | ||
|
|
1399a9c86a | ||
|
|
1fc916865c | ||
|
|
8790092a81 | ||
|
|
00f9180b81 | ||
|
|
0236b1bd6d | ||
|
|
bb61b3c05f | ||
|
|
78469c8faa | ||
|
|
3947f9c8ae | ||
|
|
6c6ebaf485 | ||
|
|
57915462b0 | ||
|
|
8b94da20d3 | ||
|
|
84c65c2b50 | ||
|
|
e8c9db0084 | ||
|
|
19419b85ff | ||
|
|
5eb8a2a9f0 | ||
|
|
95bdb61ad2 | ||
|
|
d79c79b4ae | ||
|
|
9b77d1f9f3 | ||
|
|
659fa242e2 | ||
|
|
1ba13b32a8 | ||
|
|
1c38568f42 | ||
|
|
7c1f712181 | ||
|
|
81d813c4c5 | ||
|
|
2cf7e94767 | ||
|
|
9f71dd2c61 | ||
|
|
f93374a946 | ||
|
|
4158465109 | ||
|
|
125d130984 | ||
|
|
f66ef95918 | ||
|
|
634b4d4f4d | ||
|
|
ced950a764 | ||
|
|
d84c367db5 | ||
|
|
79aa3dfbcf | ||
|
|
a308c6b9d0 | ||
|
|
614c1f5d6e | ||
|
|
fde9c2b9e9 | ||
|
|
84a39671de | ||
|
|
20086543de | ||
|
|
1002e69e44 | ||
|
|
09aa930142 | ||
|
|
ada76381a1 | ||
|
|
e4d5e38727 | ||
|
|
99349193b4 | ||
|
|
d69047df2e | ||
|
|
8318fc2b61 | ||
|
|
ff5a633a8e | ||
|
|
28fcadc9ee | ||
|
|
8a98cd5e20 | ||
|
|
0706c3b3c8 | ||
|
|
17188e31c5 | ||
|
|
45d1e93ad2 | ||
|
|
4c6f8413cb | ||
|
|
db5e06a48f | ||
|
|
e51013117c | ||
|
|
11148fcda6 | ||
|
|
d74e96f65f | ||
|
|
454cd4c120 | ||
|
|
8d5992d7cf | ||
|
|
c37ad843b4 | ||
|
|
2d130bfa85 | ||
|
|
4ac1f7b09e | ||
|
|
db8d8b73a1 | ||
|
|
c2dbf50d0b | ||
|
|
7bb99ceeea | ||
|
|
44fff4f503 | ||
|
|
a087232404 | ||
|
|
ac96667af2 | ||
|
|
8f5a0a273f | ||
|
|
74869d87f6 | ||
|
|
1f0ccabd1c | ||
|
|
c6e294a130 | ||
|
|
96bff490a3 | ||
|
|
7c3155ba44 | ||
|
|
74b26edc0d | ||
|
|
959ee4c46b | ||
|
|
4a9b772b72 | ||
|
|
d5aef5c8cc | ||
|
|
7780e9ad0a | ||
|
|
4612a5a882 | ||
|
|
3a5fe38be0 | ||
|
|
d68b0c529b | ||
|
|
c41082f610 | ||
|
|
b6af8f190c |
81
Changelog
@@ -1,3 +1,84 @@
|
||||
* Sun Feb 02 2014 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.8
|
||||
- BUGFIX: Really fix build of v3.1.6
|
||||
|
||||
* Sun Feb 02 2014 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.7
|
||||
- BUGFIX: Fix build of v3.1.6
|
||||
|
||||
* Sun Feb 02 2014 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.6
|
||||
- BUGFIX: Fix 'preview file' regression. Closes #1285. (sledgehammer999)
|
||||
- BUGFIX: Fix peers and seeds sorting in transfer list. (Angel Alonso)
|
||||
- BUGFIX: Fix btdigg search engine. (BTDigg research team)
|
||||
- BUGFIX: Save statistics every 15min and only if there was new traffic. Fixes #1288 and partially #1272. (sledgehammer999)
|
||||
- BUGFIX: Fix share ratio text in the 'general' tab. (sledgehammer999)
|
||||
- BUGFIX: Output a more generic message when blocking IPs and don't use italics in the log. (sledgehammer999)
|
||||
- BUGFIX: Allow 2 decimals when setting the share ratio. Closes #1303. (sledgehammer999)
|
||||
- BUGFIX: Fix extratorrents search plugin. (sledgehammer999)
|
||||
- BUGFIX: Use shorter names for amount columns in main UI (Gelmir)
|
||||
- BUGFIX: Fix overstretched options dialog. Closes #1293. (sledgehammer999)
|
||||
- BUGFIX: Don't show a popup menu when no torrent is selected. (sledgehammer999)
|
||||
- BUGFIX: Launch external programs async and don't block. Closes #1252. (sledgehammer999)
|
||||
- BUGFIX: Don't re-announce to trackers when torrent is paused. Closes #1310. (sledgehammer999)
|
||||
- BUGFIX: Bring dialog boxes in the front when qbt doesn't have focus. (sledgehammer999)
|
||||
- BUGFIX: Correctly resize 'name' column of the content tab. Closes #1360. (sledgehammer999)
|
||||
- BUGFIX: Correctly restore 'name' column width when loading magnet links in the 'Add new torrent dialog'. Closes #1334. (sledgehammer999)
|
||||
- WEBUI: Fix sorting by size in WebUI when non-default locale used. (Vladimir Golovnev)
|
||||
- UI: Reposition statistics menu item. (sledgehammer999)
|
||||
- UI: Convert more accurately decimal numbers to text. (sledgehammer999)
|
||||
- WINDOWS/OSX: Improvements on the behavior of the program updater(closes #1282) (sledgehammer999)
|
||||
- LINUX: Explicitle tell that we don't support freedesktop's startup notify standard. Fixes GNOME issues. Closes #1217. (sledgehammer999)
|
||||
- LINUX: Add our WM_CLASS in the .desktop file so window managers know how to group our windows. (sledgehammer999)
|
||||
- OTHER: Sync translations from Transifex.
|
||||
|
||||
* Thu 16 Jan 2014 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.5
|
||||
- BUGFIX: Fix compilation with Qt 4.7. Closes #1215. (sledgehammer999)
|
||||
- BUGFIX: Third attempt at fixing saving settings on OS shutdown. (sledgehammer999)
|
||||
- BUGFIX: Preview now correctly uses the selected file. Closes #1222 #1182. (sledgehammer999)
|
||||
- BUGFIX: Allow to resize the columns in Add New Torrent dialog. Closes #1207 #676 (sledgehammer999)
|
||||
- BUGFIX: Ensure that at least one column in the tranferlist is always visible. Closes #1165. (sledgehammer999)
|
||||
- BUGFIX: Ensure that the options window will always be placed onscreen. Closes #1226. (sledgehammer999)
|
||||
- BUGFIX: Delete temporary files after they aren't needed. Closes #1188. (sledgehammer999)
|
||||
- BUGFIX: Correctly detect libtorrent version. (sledgehammer999)
|
||||
- BUGFIX: Various code cppcheck fixes (Konstantin Goncharik)
|
||||
- BUGFIX: Remove isohunt search engine and update thepiratebay url (sledgehammer999)
|
||||
- BUGFIX: Fix rss settings corruption when checking regexp and going to other rule. (Gelmir)
|
||||
- BUGFIX: Don't count paused torrents for the autoshutdown. Closes #1280. (sledgehammer999)
|
||||
- LINUX: Fix notifications with xfce4-notifyd.
|
||||
- OSX: Added basic retina support. Closes #1251. (Sébastien Lavoie)
|
||||
- OTHER: Sync translations from Transifex.
|
||||
|
||||
* Sun 29 Dec 2013 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.4
|
||||
- FEATURE: Statistics dialog (Gelmir)
|
||||
- FEATURE: Tooltips explaining each peer's connection flags (sledgehammer999)
|
||||
- FEATURE: Win/Mac Check for program updates every 15min and allow the user to manually check for updates through the help menu. (sledgehammer999)
|
||||
- BUGFIX: Better dialog message for torrent delete confirmation (sledgehammer999)
|
||||
- BUGFIX: Fix resizing grip location. Closes #1146. (sledgehammer999)
|
||||
- BUGFIX: Lock toolbar in place. Closes #1144. (sledgehammer999)
|
||||
- BUGFIX: Second attempt at fixing saving settings on shutdown. (sledgehammer999)
|
||||
- BUGFIX: Sort labels in 'Add new torrent' dialog. Closes #1150 #411. (sledgehammer999)
|
||||
- LINUX: Fix build under Ubuntu 13.10 (sledgehammer999)
|
||||
- LINUX: Make sleep and shutdown functions work on systemd's logind (Faheem Pervez)
|
||||
|
||||
* Mon Nov 20 2013 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.3
|
||||
- FEATURE: Add a key shortcut to "Add link to torrent..." (Angel Alonso)
|
||||
- BUGFIX: Make all columns and headers use the same text alignment in the transferlist. (sledgehammer999)
|
||||
- BUGFIX: Fix build system for Unix/Linux. (sledgehammer999)
|
||||
- BUGFIX: Case insensitive sort in Peers list. Closes #1066. (sledgehammer999)
|
||||
- BUGFIX: Small optimization of WebUI responses when there isn't a data payload. (sledgehammer999)
|
||||
- BUGFIX: Hide empty folders after filtering. Closes #74. (sledgehammer999)
|
||||
- BUGFIX: Expand folders when filtering files. Closes #1076. (sledgehammer999)
|
||||
- BUGFIX: Updated search plugin's URL (Zach Thibeau)
|
||||
- BUGFIX: Strip some png to fix incorrect sRGB profiles. (Angel Alonso)
|
||||
- BUGFIX: Fixed font issues on OSX Mavericks (Zach Thibeau)
|
||||
- BUGFIX: Improve text in the About dialog (Artem S. Tashkinov)
|
||||
- BUGFIX: Always show a peer IP address as a tool tip (Artem S. Tashkinov)
|
||||
- BUGFIX: Fix inhibit system functionality. Closes #766. (sledgehammer999)
|
||||
- BUGFIX: WebUI: Don't gzip too small payloads. (sledgehammer999)
|
||||
- BUGFIX: Correctly detect if the browser supports gzip compression. (sledgehammer999)
|
||||
- BUGFIX: Fix WebUI link to 'Anonymous mode' explanation. Closes #1093. (sledgehammer999)
|
||||
- BUGFIX: Correctly update tracker tier number in the trackers tab. Closes #1075. (sledgehammer999)
|
||||
- BUGFIX: Speed improvements.(sledgehammer999)
|
||||
- OTHER: Updated translations.
|
||||
|
||||
* Tue Nov 05 2013 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.2
|
||||
- BUGFIX: Fix WebUI gzip compression. Closes #1037. (sledgehammer999)
|
||||
- BUGFIX: Fix compilation with qt < 4.8.0. Closes #1043. (sledgehammer999)
|
||||
|
||||
2
configure
vendored
@@ -511,7 +511,7 @@ public:
|
||||
QStringList libDirs;
|
||||
if (!s.isEmpty())
|
||||
libDirs << s;
|
||||
libDirs << "/usr/lib/" << "/usr/lib64/" << "/usr/local/lib/" << "/usr/local/lib64/";
|
||||
libDirs << "/usr/lib/" << "/usr/lib/i386-linux-gnu/" << "/usr/lib64/" << "/usr/lib/x86_64-linux-gnu/" << "/usr/local/lib/" << "/usr/lib/local/i386-linux-gnu/" << "/usr/local/lib64/" << "/usr/local/lib/x86_64-linux-gnu/";
|
||||
|
||||
foreach(const QString& lib, required_libs) {
|
||||
bool found = false;
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
QStringList libDirs;
|
||||
if (!s.isEmpty())
|
||||
libDirs << s;
|
||||
libDirs << "/usr/lib/" << "/usr/lib64/" << "/usr/local/lib/" << "/usr/local/lib64/";
|
||||
libDirs << "/usr/lib/" << "/usr/lib/i386-linux-gnu/" << "/usr/lib64/" << "/usr/lib/x86_64-linux-gnu/" << "/usr/local/lib/" << "/usr/lib/local/i386-linux-gnu/" << "/usr/local/lib64/" << "/usr/local/lib/x86_64-linux-gnu/";
|
||||
|
||||
foreach(const QString& lib, required_libs) {
|
||||
bool found = false;
|
||||
|
||||
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 4.5 KiB |
BIN
src/Icons/oxygen/view-statistics.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
@@ -8,6 +8,8 @@ MimeType=application/x-bittorrent;x-scheme-handler/magnet;
|
||||
Name=qBittorrent
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=false
|
||||
StartupWMClass=qbittorrent
|
||||
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 593 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 590 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 426 B |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 522 B |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 443 B |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 495 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 359 B |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 538 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 591 B |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 583 B |
@@ -50,7 +50,7 @@ class about : public QDialog, private Ui::AboutDlg{
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
// About
|
||||
QString aboutText =
|
||||
QString::fromUtf8("<!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:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;\"><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">") +
|
||||
QString::fromUtf8("<!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-size:11pt; font-weight:400; font-style:normal;\"><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">") +
|
||||
tr("An advanced BitTorrent client programmed in C++, based on Qt4 toolkit and libtorrent-rasterbar.") +
|
||||
QString::fromUtf8(" <br /><br />") +
|
||||
trUtf8("Copyright ©2006-2013 The qBittorrent project") +
|
||||
|
||||
@@ -40,12 +40,12 @@
|
||||
#include "iconprovider.h"
|
||||
#include "fs_utils.h"
|
||||
#include "autoexpandabledialog.h"
|
||||
#include "messageboxraised.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
#include <QUrl>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QTimer>
|
||||
#include <QFileDialog>
|
||||
#include <libtorrent/version.hpp>
|
||||
@@ -81,6 +81,8 @@ AddNewTorrentDialog::AddNewTorrentDialog(QWidget *parent) :
|
||||
foreach (const QString& label, customLabels) {
|
||||
ui->label_combo->addItem(label);
|
||||
}
|
||||
ui->label_combo->model()->sort(0);
|
||||
ui->content_tree->header()->setSortIndicator(0, Qt::AscendingOrder);
|
||||
loadState();
|
||||
// Signal / slots
|
||||
connect(ui->adv_button, SIGNAL(clicked(bool)), SLOT(showAdvancedSettings(bool)));
|
||||
@@ -102,9 +104,7 @@ void AddNewTorrentDialog::loadState()
|
||||
{
|
||||
QIniSettings settings;
|
||||
settings.beginGroup(QString::fromUtf8("AddNewTorrentDialog"));
|
||||
QByteArray state = settings.value("treeHeaderState").toByteArray();
|
||||
if (!state.isEmpty())
|
||||
ui->content_tree->header()->restoreState(state);
|
||||
m_headerState = settings.value("treeHeaderState").toByteArray();
|
||||
int width = settings.value("width", -1).toInt();
|
||||
if (width >= 0) {
|
||||
QRect geo = geometry();
|
||||
@@ -183,7 +183,7 @@ bool AddNewTorrentDialog::loadTorrent(const QString& torrent_path, const QString
|
||||
m_filePath = torrent_path;
|
||||
|
||||
if (!QFile::exists(m_filePath)) {
|
||||
QMessageBox::critical(0, tr("I/O Error"), tr("The torrent file does not exist."));
|
||||
MessageBoxRaised::critical(0, tr("I/O Error"), tr("The torrent file does not exist."));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -193,73 +193,18 @@ bool AddNewTorrentDialog::loadTorrent(const QString& torrent_path, const QString
|
||||
m_torrentInfo = new torrent_info(m_filePath.toUtf8().data());
|
||||
m_hash = misc::toQString(m_torrentInfo->info_hash());
|
||||
} catch(const std::exception& e) {
|
||||
QMessageBox::critical(0, tr("Invalid torrent"), tr("Failed to load the torrent: %1").arg(e.what()));
|
||||
MessageBoxRaised::critical(0, tr("Invalid torrent"), tr("Failed to load the torrent: %1").arg(e.what()));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Prevent showing the dialog if download is already present
|
||||
if (QBtSession::instance()->getTorrentHandle(m_hash).is_valid()) {
|
||||
QMessageBox::information(0, tr("Already in download list"), tr("Torrent is already in download list. Merging trackers."), QMessageBox::Ok);
|
||||
MessageBoxRaised::information(0, tr("Already in download list"), tr("Torrent is already in download list. Merging trackers."), QMessageBox::Ok);
|
||||
QBtSession::instance()->addTorrent(m_filePath, false, m_url);;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set dialog title
|
||||
setWindowTitle(misc::toQStringU(m_torrentInfo->name()));
|
||||
|
||||
// Set torrent information
|
||||
QString comment = misc::toQString(m_torrentInfo->comment());
|
||||
ui->comment_lbl->setText(comment.replace('\n', ' '));
|
||||
ui->date_lbl->setText(m_torrentInfo->creation_date() ? misc::toQString(*m_torrentInfo->creation_date()) : tr("Not available"));
|
||||
updateDiskSpaceLabel();
|
||||
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
file_storage fs = m_torrentInfo->files();
|
||||
#endif
|
||||
|
||||
// Populate m_filesList
|
||||
for (int i = 0; i < m_torrentInfo->num_files(); ++i) {
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
m_filesPath << misc::toQStringU(fs.file_path(m_torrentInfo->file_at(i)));
|
||||
#else
|
||||
m_filesPath << misc::toQStringU(m_torrentInfo->file_at(i).path.string());
|
||||
#endif
|
||||
}
|
||||
|
||||
// Prepare content tree
|
||||
if (m_torrentInfo->num_files() > 1) {
|
||||
m_contentModel = new TorrentContentFilterModel(this);
|
||||
connect(m_contentModel->model(), SIGNAL(filteredFilesChanged()), SLOT(updateDiskSpaceLabel()));
|
||||
ui->content_tree->setModel(m_contentModel);
|
||||
ui->content_tree->hideColumn(PROGRESS);
|
||||
m_contentDelegate = new PropListDelegate();
|
||||
ui->content_tree->setItemDelegate(m_contentDelegate);
|
||||
connect(ui->content_tree, SIGNAL(clicked(const QModelIndex&)), ui->content_tree, SLOT(edit(const QModelIndex&)));
|
||||
connect(ui->content_tree, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayContentTreeMenu(const QPoint&)));
|
||||
|
||||
// List files in torrent
|
||||
m_contentModel->model()->setupModelData(*m_torrentInfo);
|
||||
|
||||
// Expand root folder
|
||||
ui->content_tree->setExpanded(m_contentModel->index(0, 0), true);
|
||||
ui->content_tree->header()->setResizeMode(0, QHeaderView::Stretch);
|
||||
} else {
|
||||
// Update save paths (append file name to them)
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
QString single_file_relpath = misc::toQStringU(fs.file_path(m_torrentInfo->file_at(0)));
|
||||
#else
|
||||
QString single_file_relpath = misc::toQStringU(m_torrentInfo->file_at(0).path.string());
|
||||
#endif
|
||||
for (int i=0; i<ui->save_path_combo->count()-1; ++i) {
|
||||
ui->save_path_combo->setItemText(i, fsutils::toDisplayPath(QDir(ui->save_path_combo->itemText(i)).absoluteFilePath(single_file_relpath)));
|
||||
}
|
||||
}
|
||||
|
||||
QIniSettings settings;
|
||||
showAdvancedSettings(settings.value("AddNewTorrentDialog/expanded").toBool());
|
||||
// Set dialog position
|
||||
setdialogPosition();
|
||||
|
||||
setupTreeview();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -270,13 +215,13 @@ bool AddNewTorrentDialog::loadMagnet(const QString &magnet_uri)
|
||||
m_url = magnet_uri;
|
||||
m_hash = misc::magnetUriToHash(m_url);
|
||||
if (m_hash.isEmpty()) {
|
||||
QMessageBox::critical(0, tr("Invalid magnet link"), tr("This magnet link was not recognized"));
|
||||
MessageBoxRaised::critical(0, tr("Invalid magnet link"), tr("This magnet link was not recognized"));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Prevent showing the dialog if download is already present
|
||||
if (QBtSession::instance()->getTorrentHandle(m_hash).is_valid()) {
|
||||
QMessageBox::information(0, tr("Already in download list"), tr("Magnet link is already in download list. Merging trackers."), QMessageBox::Ok);
|
||||
MessageBoxRaised::information(0, tr("Already in download list"), tr("Magnet link is already in download list. Merging trackers."), QMessageBox::Ok);
|
||||
QBtSession::instance()->addMagnetUri(m_url, false);
|
||||
return false;
|
||||
}
|
||||
@@ -441,7 +386,7 @@ void AddNewTorrentDialog::renameSelectedFile()
|
||||
index.data().toString(), &ok).trimmed();
|
||||
if (ok && !new_name_last.isEmpty()) {
|
||||
if (!fsutils::isValidFileSystemName(new_name_last)) {
|
||||
QMessageBox::warning(this, tr("The file could not be renamed"),
|
||||
MessageBoxRaised::warning(this, tr("The file could not be renamed"),
|
||||
tr("This file name contains forbidden characters, please choose a different one."),
|
||||
QMessageBox::Ok);
|
||||
return;
|
||||
@@ -467,7 +412,7 @@ void AddNewTorrentDialog::renameSelectedFile()
|
||||
if (i == file_index) continue;
|
||||
if (fsutils::sameFileNames(m_filesPath.at(i), new_name)) {
|
||||
// Display error message
|
||||
QMessageBox::warning(this, tr("The file could not be renamed"),
|
||||
MessageBoxRaised::warning(this, tr("The file could not be renamed"),
|
||||
tr("This name is already in use in this folder. Please use a different name."),
|
||||
QMessageBox::Ok);
|
||||
return;
|
||||
@@ -502,7 +447,7 @@ void AddNewTorrentDialog::renameSelectedFile()
|
||||
#else
|
||||
if (current_name.startsWith(new_path, Qt::CaseInsensitive)) {
|
||||
#endif
|
||||
QMessageBox::warning(this, tr("The folder could not be renamed"),
|
||||
MessageBoxRaised::warning(this, tr("The folder could not be renamed"),
|
||||
tr("This name is already in use in this folder. Please use a different name."),
|
||||
QMessageBox::Ok);
|
||||
return;
|
||||
@@ -665,6 +610,23 @@ void AddNewTorrentDialog::updateMetadata(const QTorrentHandle &h) {
|
||||
setMetadataProgressIndicator(true, tr("Parsing metadata..."));
|
||||
|
||||
// Update UI
|
||||
setupTreeview();
|
||||
setMetadataProgressIndicator(false, tr("Metadata retrieval complete"));
|
||||
} catch (invalid_handle&) {
|
||||
MessageBoxRaised::critical(0, tr("I/O Error"), ("Unknown error."));
|
||||
setMetadataProgressIndicator(false, tr("Unknown error"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void AddNewTorrentDialog::setMetadataProgressIndicator(bool visibleIndicator, const QString &labelText) {
|
||||
// Always show info label when waiting for metadata
|
||||
ui->lblMetaLoading->setVisible(true);
|
||||
ui->lblMetaLoading->setText(labelText);
|
||||
ui->progMetaLoading->setVisible(visibleIndicator);
|
||||
}
|
||||
|
||||
void AddNewTorrentDialog::setupTreeview() {
|
||||
// Set dialog title
|
||||
setWindowTitle(misc::toQStringU(m_torrentInfo->name()));
|
||||
|
||||
@@ -674,13 +636,13 @@ void AddNewTorrentDialog::updateMetadata(const QTorrentHandle &h) {
|
||||
ui->date_lbl->setText(m_torrentInfo->creation_date() ? misc::toQString(*m_torrentInfo->creation_date()) : tr("Not available"));
|
||||
updateDiskSpaceLabel();
|
||||
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
#if LIBTORRENT_VERSION_NUM >= 1600
|
||||
file_storage fs = m_torrentInfo->files();
|
||||
#endif
|
||||
|
||||
// Populate m_filesList
|
||||
for (int i = 0; i < m_torrentInfo->num_files(); ++i) {
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
#if LIBTORRENT_VERSION_NUM >= 1600
|
||||
m_filesPath << misc::toQStringU(fs.file_path(m_torrentInfo->file_at(i)));
|
||||
#else
|
||||
m_filesPath << misc::toQStringU(m_torrentInfo->file_at(i).path.string());
|
||||
@@ -688,7 +650,7 @@ void AddNewTorrentDialog::updateMetadata(const QTorrentHandle &h) {
|
||||
}
|
||||
|
||||
// Prepare content tree
|
||||
if (m_torrentInfo->num_files() > 1) {
|
||||
if (fs.num_files() > 1) {
|
||||
m_contentModel = new TorrentContentFilterModel(this);
|
||||
connect(m_contentModel->model(), SIGNAL(filteredFilesChanged()), SLOT(updateDiskSpaceLabel()));
|
||||
ui->content_tree->setModel(m_contentModel);
|
||||
@@ -700,13 +662,14 @@ void AddNewTorrentDialog::updateMetadata(const QTorrentHandle &h) {
|
||||
|
||||
// List files in torrent
|
||||
m_contentModel->model()->setupModelData(*m_torrentInfo);
|
||||
if (!m_headerState.isEmpty())
|
||||
ui->content_tree->header()->restoreState(m_headerState);
|
||||
|
||||
// Expand root folder
|
||||
ui->content_tree->setExpanded(m_contentModel->index(0, 0), true);
|
||||
ui->content_tree->header()->setResizeMode(0, QHeaderView::Stretch);
|
||||
} else {
|
||||
// Update save paths (append file name to them)
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
#if LIBTORRENT_VERSION_NUM >= 1600
|
||||
QString single_file_relpath = misc::toQStringU(fs.file_path(m_torrentInfo->file_at(0)));
|
||||
#else
|
||||
QString single_file_relpath = misc::toQStringU(m_torrentInfo->file_at(0).path.string());
|
||||
@@ -720,17 +683,4 @@ void AddNewTorrentDialog::updateMetadata(const QTorrentHandle &h) {
|
||||
showAdvancedSettings(settings.value("AddNewTorrentDialog/expanded").toBool());
|
||||
// Set dialog position
|
||||
setdialogPosition();
|
||||
setMetadataProgressIndicator(false, tr("Metadata retrieval complete"));
|
||||
} catch (invalid_handle&) {
|
||||
QMessageBox::critical(0, tr("I/O Error"), ("Unknown error."));
|
||||
setMetadataProgressIndicator(false, tr("Unknown error"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void AddNewTorrentDialog::setMetadataProgressIndicator(bool visibleIndicator, const QString &labelText) {
|
||||
// Always show info label when waiting for metadata
|
||||
ui->lblMetaLoading->setVisible(true);
|
||||
ui->lblMetaLoading->setText(labelText);
|
||||
ui->progMetaLoading->setVisible(visibleIndicator);
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ private:
|
||||
void loadState();
|
||||
void saveState();
|
||||
void setMetadataProgressIndicator(bool visibleIndicator, const QString &labelText = QString());
|
||||
void setupTreeview();
|
||||
|
||||
private:
|
||||
Ui::AddNewTorrentDialog *ui;
|
||||
@@ -98,6 +99,7 @@ private:
|
||||
QStringList m_filesPath;
|
||||
bool m_hasRenamedFile;
|
||||
QShortcut *editHotkey;
|
||||
QByteArray m_headerState;
|
||||
};
|
||||
|
||||
#endif // ADDNEWTORRENTDIALOG_H
|
||||
|
||||
@@ -176,9 +176,6 @@
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="headerStretchLastSection">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Are you sure you want to delete the selected torrents from the transfer list?</string>
|
||||
<string notr="true">deletion message goes here</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
|
||||
@@ -40,8 +40,12 @@ class DeletionConfirmationDlg : public QDialog, private Ui::confirmDeletionDlg {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DeletionConfirmationDlg(QWidget *parent=0): QDialog(parent) {
|
||||
DeletionConfirmationDlg(QWidget *parent, const int &size, const QString &name): QDialog(parent) {
|
||||
setupUi(this);
|
||||
if (size == 1)
|
||||
label->setText(tr("Are you sure you want to delete \"%1\" from the transfer list?", "Are you sure you want to delete \"ubuntu-linux-iso\" from the transfer list?").arg(name));
|
||||
else
|
||||
label->setText(tr("Are you sure you want to delete these %1 torrents from the transfer list?", "Are you sure you want to delete these 5 torrents from the transfer list?").arg(QString::number(size)));
|
||||
// Icons
|
||||
lbl_warn->setPixmap(IconProvider::instance()->getIcon("dialog-warning").pixmap(lbl_warn->height()));
|
||||
lbl_warn->setFixedWidth(lbl_warn->height());
|
||||
@@ -57,10 +61,10 @@ class DeletionConfirmationDlg : public QDialog, private Ui::confirmDeletionDlg {
|
||||
return checkPermDelete->isChecked();
|
||||
}
|
||||
|
||||
static bool askForDeletionConfirmation(bool *delete_local_files) {
|
||||
DeletionConfirmationDlg dlg;
|
||||
static bool askForDeletionConfirmation(bool& delete_local_files, const int& size, const QString& name) {
|
||||
DeletionConfirmationDlg dlg(NULL, size, name);
|
||||
if (dlg.exec() == QDialog::Accepted) {
|
||||
*delete_local_files = dlg.shouldDeleteLocalFiles();
|
||||
delete_local_files = dlg.shouldDeleteLocalFiles();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -134,8 +134,8 @@ void DownloadThread::processDlFinished(QNetworkReply* reply) {
|
||||
}
|
||||
// Success
|
||||
QTemporaryFile *tmpfile = new QTemporaryFile;
|
||||
tmpfile->setAutoRemove(false);
|
||||
if (tmpfile->open()) {
|
||||
tmpfile->setAutoRemove(false);
|
||||
QString filePath = tmpfile->fileName();
|
||||
qDebug("Temporary filename is: %s", qPrintable(filePath));
|
||||
if (reply->isOpen() || reply->open(QIODevice::ReadOnly)) {
|
||||
@@ -153,6 +153,7 @@ void DownloadThread::processDlFinished(QNetworkReply* reply) {
|
||||
emit downloadFinished(url, filePath);
|
||||
} else {
|
||||
delete tmpfile;
|
||||
fsutils::forceRemove(filePath);
|
||||
// Error when reading the request
|
||||
emit downloadFailure(url, tr("I/O Error"));
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ class HeadlessLoader: public QObject {
|
||||
|
||||
public:
|
||||
HeadlessLoader(const QStringList &torrentCmdLine) {
|
||||
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(shutdownCleanUp()), Qt::DirectConnection);
|
||||
Preferences pref;
|
||||
// Enable Web UI
|
||||
pref.setWebUiEnabled(true);
|
||||
@@ -61,11 +62,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
~HeadlessLoader() {
|
||||
public slots:
|
||||
void shutdownCleanUp() {
|
||||
Preferences().sync();
|
||||
QBtSession::drop();
|
||||
}
|
||||
|
||||
public slots:
|
||||
// Call this function to exit qBittorrent headless loader
|
||||
// and return to prompt (object will be deleted by main)
|
||||
void exit() {
|
||||
|
||||
@@ -314,6 +314,7 @@
|
||||
<file>Icons/oxygen/view-filter.png</file>
|
||||
<file>Icons/oxygen/view-preview.png</file>
|
||||
<file>Icons/oxygen/view-refresh.png</file>
|
||||
<file>Icons/oxygen/view-statistics.png</file>
|
||||
<file>Icons/oxygen/wallet-open.png</file>
|
||||
<file>Icons/oxygen/webui.png</file>
|
||||
<file>Icons/skin/arrow-right.gif</file>
|
||||
|
||||