mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
Compare commits
14 Commits
release-2.
...
release-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89a1eb1bca | ||
|
|
de228fe074 | ||
|
|
8846f52ce1 | ||
|
|
545ce42d4e | ||
|
|
faf8b0e3f5 | ||
|
|
70a0b3cff3 | ||
|
|
24ab195d2f | ||
|
|
4bd2641d70 | ||
|
|
7c5779eee0 | ||
|
|
0bbe4426c2 | ||
|
|
595a190508 | ||
|
|
ec30fe2498 | ||
|
|
4d80d6ef5c | ||
|
|
3d53e641c1 |
@@ -1,3 +1,12 @@
|
|||||||
|
* Sun May 20 - Christophe Dumez <chris@qbittorrent.org> - v2.9.9
|
||||||
|
- BUGFIX: More reliable RSS feed parsing (closes #1001777)
|
||||||
|
- BUGFIX: Better support for cookies in RSS
|
||||||
|
- BUGFIX: Make sure show/hide text in tray icon menu is correct
|
||||||
|
- COSMETIC: Improve style of left panel
|
||||||
|
- COSMETIC: Never disable properties panel
|
||||||
|
- COSMETIC: Make sure first tab is initially selected in options dialog
|
||||||
|
- COSMETIC: Fix a few focus issues on Mac OS X
|
||||||
|
|
||||||
* Sat May 5 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.8
|
* Sat May 5 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.8
|
||||||
- BUGFIX: Various UI style fixes
|
- BUGFIX: Various UI style fixes
|
||||||
- BUGFIX: Fix compilation with gcc 4.7
|
- BUGFIX: Fix compilation with gcc 4.7
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ DATADIR = /usr/local/share
|
|||||||
# Use pkg-config to get all necessary libtorrent DEFINES
|
# Use pkg-config to get all necessary libtorrent DEFINES
|
||||||
CONFIG += link_pkgconfig
|
CONFIG += link_pkgconfig
|
||||||
PKGCONFIG += libtorrent-rasterbar
|
PKGCONFIG += libtorrent-rasterbar
|
||||||
|
DEFINES += BOOST_ASIO_DYN_LINK
|
||||||
|
|
||||||
# Special include/libs paths (macports)
|
# Special include/libs paths (macports)
|
||||||
INCLUDEPATH += /usr/include/openssl /usr/include /opt/local/include/boost /opt/local/include
|
INCLUDEPATH += /usr/include/openssl /usr/include /opt/local/include/boost /opt/local/include
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>2.9.8</string>
|
<string>2.9.9</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
#include <QNetworkRequest>
|
#include <QNetworkRequest>
|
||||||
#include <QNetworkProxy>
|
#include <QNetworkProxy>
|
||||||
#include <QNetworkCookie>
|
|
||||||
#include <QNetworkCookieJar>
|
#include <QNetworkCookieJar>
|
||||||
|
|
||||||
#include "downloadthread.h"
|
#include "downloadthread.h"
|
||||||
@@ -109,39 +108,21 @@ void DownloadThread::processDlFinished(QNetworkReply* reply) {
|
|||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef DISABLE_GUI
|
void DownloadThread::downloadTorrentUrl(const QString &url, const QList<QNetworkCookie>& cookies)
|
||||||
void DownloadThread::loadCookies(const QString &host_name, QString url) {
|
{
|
||||||
const QList<QByteArray> raw_cookies = RssSettings().getHostNameCookies(host_name);
|
|
||||||
QNetworkCookieJar *cookie_jar = m_networkManager.cookieJar();
|
|
||||||
QList<QNetworkCookie> cookies;
|
|
||||||
qDebug("Loading cookies for host name: %s", qPrintable(host_name));
|
|
||||||
foreach(const QByteArray& raw_cookie, raw_cookies) {
|
|
||||||
QList<QByteArray> cookie_parts = raw_cookie.split('=');
|
|
||||||
if(cookie_parts.size() == 2) {
|
|
||||||
qDebug("Loading cookie: %s", raw_cookie.constData());
|
|
||||||
cookies << QNetworkCookie(cookie_parts.first(), cookie_parts.last());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cookie_jar->setCookiesFromUrl(cookies, url);
|
|
||||||
m_networkManager.setCookieJar(cookie_jar);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void DownloadThread::downloadTorrentUrl(const QString &url) {
|
|
||||||
// Process request
|
// Process request
|
||||||
QNetworkReply *reply = downloadUrl(url);
|
QNetworkReply *reply = downloadUrl(url, cookies);
|
||||||
connect(reply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(checkDownloadSize(qint64,qint64)));
|
connect(reply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(checkDownloadSize(qint64,qint64)));
|
||||||
}
|
}
|
||||||
|
|
||||||
QNetworkReply* DownloadThread::downloadUrl(const QString &url){
|
QNetworkReply* DownloadThread::downloadUrl(const QString &url, const QList<QNetworkCookie>& cookies) {
|
||||||
// Update proxy settings
|
// Update proxy settings
|
||||||
applyProxySettings();
|
applyProxySettings();
|
||||||
#ifndef DISABLE_GUI
|
// Set cookies
|
||||||
// Load cookies
|
if (!cookies.empty()) {
|
||||||
QString host_name = QUrl::fromEncoded(url.toUtf8()).host();
|
qDebug("Setting %d cookies for url: %s", cookies.size(), qPrintable(url));
|
||||||
if(!host_name.isEmpty())
|
m_networkManager.cookieJar()->setCookiesFromUrl(cookies, url);
|
||||||
loadCookies(host_name, url);
|
}
|
||||||
#endif
|
|
||||||
// Process download request
|
// Process download request
|
||||||
qDebug("url is %s", qPrintable(url));
|
qDebug("url is %s", qPrintable(url));
|
||||||
const QUrl qurl = QUrl::fromEncoded(url.toUtf8());
|
const QUrl qurl = QUrl::fromEncoded(url.toUtf8());
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
#define DOWNLOADTHREAD_H
|
#define DOWNLOADTHREAD_H
|
||||||
|
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
|
#include <QNetworkCookie>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QSslError>
|
#include <QSslError>
|
||||||
@@ -45,8 +46,8 @@ class DownloadThread : public QObject {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DownloadThread(QObject* parent = 0);
|
DownloadThread(QObject* parent = 0);
|
||||||
QNetworkReply* downloadUrl(const QString &url);
|
QNetworkReply* downloadUrl(const QString &url, const QList<QNetworkCookie>& raw_cookies = QList<QNetworkCookie>());
|
||||||
void downloadTorrentUrl(const QString &url);
|
void downloadTorrentUrl(const QString &url, const QList<QNetworkCookie>& raw_cookies = QList<QNetworkCookie>());
|
||||||
//void setProxy(QString IP, int port, QString username, QString password);
|
//void setProxy(QString IP, int port, QString username, QString password);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
@@ -63,9 +64,6 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
QString errorCodeToString(QNetworkReply::NetworkError status);
|
QString errorCodeToString(QNetworkReply::NetworkError status);
|
||||||
void applyProxySettings();
|
void applyProxySettings();
|
||||||
#ifndef DISABLE_GUI
|
|
||||||
void loadCookies(const QString &host_name, QString url);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QNetworkAccessManager m_networkManager;
|
QNetworkAccessManager m_networkManager;
|
||||||
|
|||||||
@@ -714,7 +714,6 @@ void MainWindow::toggleVisibility(QSystemTrayIcon::ActivationReason e) {
|
|||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
actionToggleVisibility->setText(isVisible() ? tr("Hide") : tr("Show"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display About Dialog
|
// Display About Dialog
|
||||||
@@ -1209,12 +1208,17 @@ void MainWindow::updateAltSpeedsBtn(bool alternative) {
|
|||||||
actionUse_alternative_speed_limits->setChecked(alternative);
|
actionUse_alternative_speed_limits->setChecked(alternative);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::updateTrayIconMenu()
|
||||||
|
{
|
||||||
|
actionToggleVisibility->setText(isVisible() ? tr("Hide") : tr("Show"));
|
||||||
|
}
|
||||||
|
|
||||||
QMenu* MainWindow::getTrayIconMenu() {
|
QMenu* MainWindow::getTrayIconMenu() {
|
||||||
if(myTrayIconMenu)
|
if(myTrayIconMenu)
|
||||||
return myTrayIconMenu;
|
return myTrayIconMenu;
|
||||||
// Tray icon Menu
|
// Tray icon Menu
|
||||||
myTrayIconMenu = new QMenu(this);
|
myTrayIconMenu = new QMenu(this);
|
||||||
actionToggleVisibility->setText(isVisible() ? tr("Hide") : tr("Show"));
|
connect(myTrayIconMenu, SIGNAL(aboutToShow()), SLOT(updateTrayIconMenu()));
|
||||||
myTrayIconMenu->addAction(actionToggleVisibility);
|
myTrayIconMenu->addAction(actionToggleVisibility);
|
||||||
myTrayIconMenu->addSeparator();
|
myTrayIconMenu->addSeparator();
|
||||||
myTrayIconMenu->addAction(actionOpen);
|
myTrayIconMenu->addAction(actionOpen);
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ protected slots:
|
|||||||
void notifyOfUpdate(QString);
|
void notifyOfUpdate(QString);
|
||||||
void showConnectionSettings();
|
void showConnectionSettings();
|
||||||
void minimizeWindow();
|
void minimizeWindow();
|
||||||
|
void updateTrayIconMenu();
|
||||||
// Keyboard shortcuts
|
// Keyboard shortcuts
|
||||||
void createKeyboardShortcuts();
|
void createKeyboardShortcuts();
|
||||||
void displayTransferTab() const;
|
void displayTransferTab() const;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentRow">
|
<property name="currentRow">
|
||||||
<number>-1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -1419,7 +1419,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>395</width>
|
<width>363</width>
|
||||||
<height>480</height>
|
<height>480</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, Tra
|
|||||||
trackerDownButton->setIcon(IconProvider::instance()->getIcon("go-down"));
|
trackerDownButton->setIcon(IconProvider::instance()->getIcon("go-down"));
|
||||||
|
|
||||||
state = VISIBLE;
|
state = VISIBLE;
|
||||||
setEnabled(false);
|
|
||||||
|
|
||||||
// Set Properties list model
|
// Set Properties list model
|
||||||
PropListModel = new TorrentFilesFilterModel();
|
PropListModel = new TorrentFilesFilterModel();
|
||||||
@@ -204,7 +203,6 @@ void PropertiesWidget::clear() {
|
|||||||
PropListModel->model()->clear();
|
PropListModel->model()->clear();
|
||||||
showPiecesAvailability(false);
|
showPiecesAvailability(false);
|
||||||
showPiecesDownloaded(false);
|
showPiecesDownloaded(false);
|
||||||
setEnabled(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QTorrentHandle PropertiesWidget::getCurrentTorrent() const {
|
QTorrentHandle PropertiesWidget::getCurrentTorrent() const {
|
||||||
@@ -241,7 +239,6 @@ void PropertiesWidget::loadTorrentInfos(const QTorrentHandle &_h) {
|
|||||||
clear();
|
clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setEnabled(true);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Save path
|
// Save path
|
||||||
|
|||||||
@@ -2757,7 +2757,8 @@ QString QBtSession::getSavePath(const QString &hash, bool fromScanDir, QString f
|
|||||||
// Take an url string to a torrent file,
|
// Take an url string to a torrent file,
|
||||||
// download the torrent file to a tmp location, then
|
// download the torrent file to a tmp location, then
|
||||||
// add it to download list
|
// add it to download list
|
||||||
void QBtSession::downloadFromUrl(const QString &url) {
|
void QBtSession::downloadFromUrl(const QString &url, const QList<QNetworkCookie>& cookies)
|
||||||
|
{
|
||||||
addConsoleMessage(tr("Downloading '%1', please wait...", "e.g: Downloading 'xxx.torrent', please wait...").arg(url)
|
addConsoleMessage(tr("Downloading '%1', please wait...", "e.g: Downloading 'xxx.torrent', please wait...").arg(url)
|
||||||
#ifndef DISABLE_GUI
|
#ifndef DISABLE_GUI
|
||||||
, QPalette::WindowText
|
, QPalette::WindowText
|
||||||
@@ -2765,7 +2766,7 @@ void QBtSession::downloadFromUrl(const QString &url) {
|
|||||||
);
|
);
|
||||||
//emit aboutToDownloadFromUrl(url);
|
//emit aboutToDownloadFromUrl(url);
|
||||||
// Launch downloader thread
|
// Launch downloader thread
|
||||||
downloader->downloadTorrentUrl(url);
|
downloader->downloadTorrentUrl(url, cookies);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QBtSession::downloadFromURLList(const QStringList& urls) {
|
void QBtSession::downloadFromURLList(const QStringList& urls) {
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QNetworkCookie>
|
||||||
|
|
||||||
#include <libtorrent/version.hpp>
|
#include <libtorrent/version.hpp>
|
||||||
#include <libtorrent/session.hpp>
|
#include <libtorrent/session.hpp>
|
||||||
@@ -107,7 +108,7 @@ public slots:
|
|||||||
QTorrentHandle addMagnetUri(QString magnet_uri, bool resumed=false);
|
QTorrentHandle addMagnetUri(QString magnet_uri, bool resumed=false);
|
||||||
void loadSessionState();
|
void loadSessionState();
|
||||||
void saveSessionState();
|
void saveSessionState();
|
||||||
void downloadFromUrl(const QString &url);
|
void downloadFromUrl(const QString &url, const QList<QNetworkCookie>& cookies = QList<QNetworkCookie>());
|
||||||
void deleteTorrent(const QString &hash, bool delete_local_files = false);
|
void deleteTorrent(const QString &hash, bool delete_local_files = false);
|
||||||
void startUpTorrents();
|
void startUpTorrents();
|
||||||
void recheckTorrent(const QString &hash);
|
void recheckTorrent(const QString &hash);
|
||||||
|
|||||||
@@ -124,13 +124,14 @@ void RSSImp::on_actionManage_cookies_triggered() {
|
|||||||
Q_ASSERT(!m_feedList->selectedItems().empty());
|
Q_ASSERT(!m_feedList->selectedItems().empty());
|
||||||
// Get feed hostname
|
// Get feed hostname
|
||||||
QString feed_url = m_feedList->getItemID(m_feedList->selectedItems().first());
|
QString feed_url = m_feedList->getItemID(m_feedList->selectedItems().first());
|
||||||
QString feed_hostname = QUrl::fromEncoded(feed_url.toLocal8Bit()).host();
|
QString feed_hostname = QUrl::fromEncoded(feed_url.toUtf8()).host();
|
||||||
qDebug("RSS Feed hostname is: %s", qPrintable(feed_hostname));
|
qDebug("RSS Feed hostname is: %s", qPrintable(feed_hostname));
|
||||||
Q_ASSERT(!feed_hostname.isEmpty());
|
Q_ASSERT(!feed_hostname.isEmpty());
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
RssSettings settings;
|
RssSettings settings;
|
||||||
QList<QByteArray> raw_cookies = CookiesDlg::askForCookies(this, settings.getHostNameCookies(feed_hostname), &ok);
|
QList<QByteArray> raw_cookies = CookiesDlg::askForCookies(this, settings.getHostNameCookies(feed_hostname), &ok);
|
||||||
if(ok) {
|
if (ok) {
|
||||||
|
qDebug() << "Settings cookies for host name: " << feed_hostname;
|
||||||
settings.setHostNameCookies(feed_hostname, raw_cookies);
|
settings.setHostNameCookies(feed_hostname, raw_cookies);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -325,10 +326,23 @@ void RSSImp::downloadTorrent() {
|
|||||||
foreach(const QListWidgetItem* item, selected_items) {
|
foreach(const QListWidgetItem* item, selected_items) {
|
||||||
const RssArticle article = m_feedList->getRSSItemFromUrl(item->data(Article::FeedUrlRole).toString())
|
const RssArticle article = m_feedList->getRSSItemFromUrl(item->data(Article::FeedUrlRole).toString())
|
||||||
->getItem(item->data(Article::IdRole).toString());
|
->getItem(item->data(Article::IdRole).toString());
|
||||||
if(article.hasAttachment()) {
|
// Load possible cookies
|
||||||
QBtSession::instance()->downloadFromUrl(article.torrentUrl());
|
QList<QNetworkCookie> cookies;
|
||||||
|
QString feed_url = m_feedList->getItemID(m_feedList->selectedItems().first());
|
||||||
|
QString feed_hostname = QUrl::fromEncoded(feed_url.toUtf8()).host();
|
||||||
|
const QList<QByteArray> raw_cookies = RssSettings().getHostNameCookies(feed_hostname);
|
||||||
|
foreach (const QByteArray& raw_cookie, raw_cookies) {
|
||||||
|
QList<QByteArray> cookie_parts = raw_cookie.split('=');
|
||||||
|
if (cookie_parts.size() == 2) {
|
||||||
|
qDebug("Loading cookie: %s = %s", cookie_parts.first().constData(), cookie_parts.last().constData());
|
||||||
|
cookies << QNetworkCookie(cookie_parts.first(), cookie_parts.last());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
qDebug("Loaded %d cookies for RSS item\n", cookies.size());
|
||||||
|
if (article.hasAttachment()) {
|
||||||
|
QBtSession::instance()->downloadFromUrl(article.torrentUrl(), cookies);
|
||||||
} else {
|
} else {
|
||||||
QBtSession::instance()->downloadFromUrl(article.link());
|
QBtSession::instance()->downloadFromUrl(article.link(), cookies);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -229,6 +229,13 @@ RssArticle::RssArticle(RssFeed* parent, QXmlStreamReader& xml)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// If guid is empty, fall back to some other identifier
|
||||||
|
if (d->guid.isEmpty()) {
|
||||||
|
if (!d->link.isEmpty())
|
||||||
|
d->guid = d->link;
|
||||||
|
else if (!d->title.isEmpty())
|
||||||
|
d->guid = d->title;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RssArticle::RssArticle(RssFeed* parent, const QString &guid) {
|
RssArticle::RssArticle(RssFeed* parent, const QString &guid) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#VERSION: 1.21
|
#VERSION: 1.22
|
||||||
#AUTHORS: Christophe Dumez (chris@qbittorrent.org)
|
#AUTHORS: Christophe Dumez (chris@qbittorrent.org)
|
||||||
|
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@@ -39,7 +39,7 @@ class kickasstorrents(object):
|
|||||||
self.results = []
|
self.results = []
|
||||||
|
|
||||||
def download_torrent(self, info):
|
def download_torrent(self, info):
|
||||||
print download_file(info)
|
print download_file(info, info)
|
||||||
|
|
||||||
def search(self, what, cat='all'):
|
def search(self, what, cat='all'):
|
||||||
ret = []
|
ret = []
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#VERSION: 1.21
|
#VERSION: 1.22
|
||||||
#AUTHORS: Christophe Dumez (chris@qbittorrent.org)
|
#AUTHORS: Christophe Dumez (chris@qbittorrent.org)
|
||||||
|
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@@ -39,7 +39,7 @@ class kickasstorrents(object):
|
|||||||
self.results = []
|
self.results = []
|
||||||
|
|
||||||
def download_torrent(self, info):
|
def download_torrent(self, info):
|
||||||
print(download_file(info))
|
print(download_file(info, info))
|
||||||
|
|
||||||
def search(self, what, cat='all'):
|
def search(self, what, cat='all'):
|
||||||
ret = []
|
ret = []
|
||||||
|
|||||||
@@ -421,7 +421,8 @@ void SearchEngine::downloadTorrent(QString engine_url, QString torrent_url) {
|
|||||||
qDebug("Converting bc link to magnet link");
|
qDebug("Converting bc link to magnet link");
|
||||||
torrent_url = misc::bcLinkToMagnet(torrent_url);
|
torrent_url = misc::bcLinkToMagnet(torrent_url);
|
||||||
}
|
}
|
||||||
if(torrent_url.startsWith("magnet:")) {
|
qDebug() << Q_FUNC_INFO << torrent_url;
|
||||||
|
if (torrent_url.startsWith("magnet:")) {
|
||||||
QStringList urls;
|
QStringList urls;
|
||||||
urls << torrent_url;
|
urls << torrent_url;
|
||||||
mp_mainWindow->downloadFromURLList(urls);
|
mp_mainWindow->downloadFromURLList(urls);
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
|
#include <QLabel>
|
||||||
|
|
||||||
#include "transferlistdelegate.h"
|
#include "transferlistdelegate.h"
|
||||||
#include "transferlistwidget.h"
|
#include "transferlistwidget.h"
|
||||||
@@ -62,6 +63,7 @@ public:
|
|||||||
// Accept drop
|
// Accept drop
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
|
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
|
||||||
|
setStyleSheet("QListWidget { background: transparent; border: 0 }");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redefine addItem() to make sure the list stays sorted
|
// Redefine addItem() to make sure the list stays sorted
|
||||||
@@ -158,13 +160,14 @@ public:
|
|||||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
// Height is fixed (sizeHint().height() is used)
|
// Height is fixed (sizeHint().height() is used)
|
||||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||||
|
setStyleSheet("QListWidget { background: transparent; border: 0 }");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QSize sizeHint() const {
|
QSize sizeHint() const {
|
||||||
QSize size = QListWidget::sizeHint();
|
QSize size = QListWidget::sizeHint();
|
||||||
// Height should be exactly the height of the content
|
// Height should be exactly the height of the content
|
||||||
size.setHeight(contentsSize().height() + 2 * frameWidth());
|
size.setHeight(contentsSize().height() + 2 * frameWidth() + 6);
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,10 +193,23 @@ public:
|
|||||||
// Construct lists
|
// Construct lists
|
||||||
vLayout = new QVBoxLayout();
|
vLayout = new QVBoxLayout();
|
||||||
vLayout->setContentsMargins(0, 4, 0, 4);
|
vLayout->setContentsMargins(0, 4, 0, 4);
|
||||||
|
QFont font;
|
||||||
|
font.setBold(true);
|
||||||
|
font.setCapitalization(QFont::SmallCaps);
|
||||||
|
QLabel *torrentsLabel = new QLabel(tr("Torrents"));
|
||||||
|
torrentsLabel->setIndent(2);
|
||||||
|
torrentsLabel->setFont(font);
|
||||||
|
vLayout->addWidget(torrentsLabel);
|
||||||
statusFilters = new StatusFiltersWidget(this);
|
statusFilters = new StatusFiltersWidget(this);
|
||||||
vLayout->addWidget(statusFilters);
|
vLayout->addWidget(statusFilters);
|
||||||
|
statusFilters->setFocusPolicy(Qt::NoFocus);
|
||||||
|
QLabel *labelsLabel = new QLabel(tr("Labels"));
|
||||||
|
labelsLabel->setIndent(2);
|
||||||
|
labelsLabel->setFont(font);
|
||||||
|
vLayout->addWidget(labelsLabel);
|
||||||
labelFilters = new LabelFiltersList(this);
|
labelFilters = new LabelFiltersList(this);
|
||||||
vLayout->addWidget(labelFilters);
|
vLayout->addWidget(labelFilters);
|
||||||
|
labelFilters->setFocusPolicy(Qt::NoFocus);
|
||||||
setLayout(vLayout);
|
setLayout(vLayout);
|
||||||
labelFilters->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
labelFilters->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
statusFilters->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
statusFilters->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
PROJECT_NAME = qbittorrent
|
PROJECT_NAME = qbittorrent
|
||||||
PROJECT_VERSION = 2.9.8
|
PROJECT_VERSION = 2.9.9
|
||||||
|
|
||||||
os2 {
|
os2 {
|
||||||
DEFINES += VERSION=\'\"v$${PROJECT_VERSION}\"\'
|
DEFINES += VERSION=\'\"v$${PROJECT_VERSION}\"\'
|
||||||
@@ -9,4 +9,4 @@ os2 {
|
|||||||
|
|
||||||
DEFINES += VERSION_MAJOR=2
|
DEFINES += VERSION_MAJOR=2
|
||||||
DEFINES += VERSION_MINOR=9
|
DEFINES += VERSION_MINOR=9
|
||||||
DEFINES += VERSION_BUGFIX=8
|
DEFINES += VERSION_BUGFIX=9
|
||||||
|
|||||||
Reference in New Issue
Block a user