Commit e3ce98a6 authored by Cristian Greco's avatar Cristian Greco

Imported Upstream version 1.5.0

parent 3b4a1aed
* Thu Sep 3 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.0
- FEATURE: Added Magnet URI support
- FEATURE: Search engine supports category-based requests
- FEATURE: Make use of torrent enclosure in RSS feeds for direct download
- FEATURE: Implemented a RSS feed downloader with filter support
- FEATURE: Save old RSS item to hard disk to remember them on start up
- FEATURE: Display free disk space in torrent addition dialog
- FEATURE: In torrent addition from URL, paste clipboard content if it contains an URL
- FEATURE: RSS feeds URLs can now be copied to clipboard
- FEATURE: RSS feeds can now be grouped into folders
- FEATURE: Added "Unread" item to RSS feed list to display all unread news
- FEATURE: If a torrent contains a torrent file, process downloaded torrent file too
- FEATURE: A random listening port can be chosen automatically
- BUGFIX: torrent resume code rewrited
- BUGFIX: Fixed uTorrent spoofing code
- BUGFIX: Greatly improved column sorting code
- BUGFIX: Possibility to create trackerless torrents
- BUGFIX: Better item coloring in torrent content filtering dialog
- COSMETIC: Redesigned search tab to improve usability
- COSMETIC: Redesigned RSS tab to improve usability
- COSMETIC: Improved tracker errors readability
* Sun Aug 21 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.4.1
- BUGFIX: Fix problems when changing save path (if using temporary download folder)
- BUGFIX: Display real save path instead of the temporary one in torrent properties
- BUGFIX: Catching invalid_handle exception to avoid rare crashes
- BUGFIX: Fixed popup menu position in RSS feeds list
- BUGFIX: Don't save RSS feed state if it could not be updated
* Thu Aug 13 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.4.0
- FEATURE: Display swarm information in lists
- FEATURE: Allow to define temporary download folder
......
......@@ -23,7 +23,7 @@ public:
if(!libs.isEmpty())
conf->addLib(libs);
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, adv_ver, &version, &incs, &libs, &other))
printf("\nWarning: libtorrent-rasterbar v%s was detected. Although it will compile and run, you will probably experience some bugs. Please consider updating to v%s!\n", version.toUtf8().data(), adv_ver.toUtf8().data());
printf("\nWarning: libtorrent-rasterbar v%s was detected. Although it will compile and run, you will probably experience some bugs. Please consider updating to v%s!\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
return true;
}
};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -35,6 +35,7 @@
#include "qtorrenthandle.h"
class QStandardItemModel;
class QSortFilterProxyModel;
class bittorrent;
class FinishedListDelegate;
......@@ -47,6 +48,7 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
bittorrent *BTSession;
FinishedListDelegate *finishedListDelegate;
QStandardItemModel *finishedListModel;
QSortFilterProxyModel *proxyModel;
unsigned int nbFinished;
void hideOrShowColumn(int index);
bool loadHiddenColumns();
......@@ -69,10 +71,6 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
void displayFinishedHoSMenu(const QPoint&);
void setRowColor(int row, QString color);
void saveColWidthFinishedList() const;
void toggleFinishedListSortOrder(int index);
void sortFinishedList(int index=-1, Qt::SortOrder sortOrder=Qt::AscendingOrder);
void sortFinishedListFloat(int index, Qt::SortOrder sortOrder);
void sortFinishedListString(int index, Qt::SortOrder sortOrder);
void updateFileSize(QString hash);
void on_actionSet_upload_limit_triggered();
void notifyTorrentDoubleClicked(const QModelIndex& index);
......@@ -93,6 +91,8 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
void deleteTorrent(QString hash);
void showPropertiesFromHash(QString hash);
void loadLastSortedColumn();
void saveLastSortedColumn();
void updateMetadata(QTorrentHandle &h);
signals:
void torrentMovedFromFinishedList(QString);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -143,6 +143,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
void fullDiskError(QTorrentHandle& h, QString msg) const;
void handleDownloadFromUrlFailure(QString, QString) const;
void createSystrayDelayed();
void setPaused(QTorrentHandle &h) const;
// Keyboard shortcuts
void createKeyboardShortcuts();
void displayDownTab() const;
......@@ -191,6 +192,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
void setTabText(int index, QString text) const;
void openDestinationFolder() const;
void goBuyPage() const;
void copyMagnetURI() const;
void updateRatio();
protected:
......
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
[Desktop Entry]
Categories=Qt;Network;P2P
Comment=V1.4.0
Categories=Qt;Network;P2P;
Comment=V1.5.0
Exec=qbittorrent %f
GenericName=Bittorrent client
GenericName[bg]=Торент клиент
GenericName[cs]=Bittorrent klient
GenericName[de]=Bittorren Client
GenericName[el]=Τορεντ πελάτης
GenericName[el]=Bittorrent πελάτης
GenericName[es]=Cliente Bittorrent
GenericName[fi]=Bittorrent-ohjelma
GenericName[fr]=Client Bittorrent
GenericName[hu]=Bittorrent kliens
GenericName[it]=Client Bittorrent
GenericName[ja]=Bittorrent クライアント
GenericName[ko]=비토렌트 클라이언트
GenericName[nl]=Bittorrent client
GenericName[nl]=Bittorrent-cliënt
GenericName[pl]=Klient Bittorrent
GenericName[pt]=Cliente Bittorrent
GenericName[pt_BR]=Cliente Bittorrent
GenericName[ro]=Client Bittorrent
GenericName[ru]=клиент Bittorrent
GenericName[sk]=Klient siete Bittorrent
GenericName[sv]=Bittorrent-klient
GenericName[tr]=Bittorrent istemcisi
GenericName[uk]=Bittorrent-клієнт
......
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
......@@ -33,6 +33,7 @@
#include <QStandardItemModel>
#include <QHeaderView>
#include <QSettings>
#include <QSortFilterProxyModel>
#include "SearchTab.h"
#include "SearchListDelegate.h"
......@@ -45,45 +46,63 @@
#define SEARCH_LEECHERS 3
#define SEARCH_ENGINE 4
SearchTab::SearchTab(SearchEngine *parent) : QWidget()
SearchTab::SearchTab(SearchEngine *parent) : QWidget(), parent(parent)
{
box=new QVBoxLayout();
results_lbl=new QLabel();
resultsBrowser = new QTreeView();
resultsBrowser->setSelectionMode(QAbstractItemView::ExtendedSelection);
box->addWidget(results_lbl);
box->addWidget(resultsBrowser);
setLayout(box);
// Set Search results list model
SearchListModel = new QStandardItemModel(0,6);
SearchListModel->setHeaderData(SEARCH_NAME, Qt::Horizontal, tr("Name", "i.e: file name"));
SearchListModel->setHeaderData(SEARCH_SIZE, Qt::Horizontal, tr("Size", "i.e: file size"));
SearchListModel->setHeaderData(SEARCH_SEEDERS, Qt::Horizontal, tr("Seeders", "i.e: Number of full sources"));
SearchListModel->setHeaderData(SEARCH_LEECHERS, Qt::Horizontal, tr("Leechers", "i.e: Number of partial sources"));
SearchListModel->setHeaderData(SEARCH_ENGINE, Qt::Horizontal, tr("Search engine"));
resultsBrowser->setModel(SearchListModel);
resultsBrowser->hideColumn(URL_COLUMN); // Hide url column
SearchDelegate = new SearchListDelegate();
resultsBrowser->setItemDelegate(SearchDelegate);
// Make search list header clickable for sorting
resultsBrowser->header()->setClickable(true);
resultsBrowser->header()->setSortIndicatorShown(true);
// Connect signals to slots (search part)
connect(resultsBrowser, SIGNAL(doubleClicked(const QModelIndex&)), parent, SLOT(downloadSelectedItem(const QModelIndex&)));
connect(resultsBrowser->header(), SIGNAL(sectionPressed(int)), this, SLOT(sortSearchList(int)));
// Load last columns width for search results list
if(!loadColWidthResultsList()){
resultsBrowser->header()->resizeSection(0, 275);
}
box=new QVBoxLayout();
results_lbl=new QLabel();
resultsBrowser = new QTreeView();
resultsBrowser->setSelectionMode(QAbstractItemView::ExtendedSelection);
box->addWidget(results_lbl);
box->addWidget(resultsBrowser);
setLayout(box);
// Set Search results list model
SearchListModel = new QStandardItemModel(0,6);
SearchListModel->setHeaderData(SEARCH_NAME, Qt::Horizontal, tr("Name", "i.e: file name"));
SearchListModel->setHeaderData(SEARCH_SIZE, Qt::Horizontal, tr("Size", "i.e: file size"));
SearchListModel->setHeaderData(SEARCH_SEEDERS, Qt::Horizontal, tr("Seeders", "i.e: Number of full sources"));
SearchListModel->setHeaderData(SEARCH_LEECHERS, Qt::Horizontal, tr("Leechers", "i.e: Number of partial sources"));
SearchListModel->setHeaderData(SEARCH_ENGINE, Qt::Horizontal, tr("Search engine"));
resultsBrowser->hideColumn(URL_COLUMN); // Hide url column
proxyModel = new QSortFilterProxyModel();
proxyModel->setDynamicSortFilter(true);
proxyModel->setSourceModel(SearchListModel);
resultsBrowser->setModel(proxyModel);
SearchDelegate = new SearchListDelegate();
resultsBrowser->setItemDelegate(SearchDelegate);
resultsBrowser->setRootIsDecorated(false);
resultsBrowser->setAllColumnsShowFocus(true);
resultsBrowser->setSortingEnabled(true);
// Connect signals to slots (search part)
connect(resultsBrowser, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(downloadSelectedItem(const QModelIndex&)));
// Load last columns width for search results list
if(!loadColWidthResultsList()){
resultsBrowser->header()->resizeSection(0, 275);
}
// Sort by Seeds
resultsBrowser->sortByColumn(SEEDERS, Qt::DescendingOrder);
}
void SearchTab::downloadSelectedItem(const QModelIndex& index) {
QString engine_url = proxyModel->data(proxyModel->index(index.row(), ENGINE_URL_COLUMN)).toString();
QString torrent_url = proxyModel->data(proxyModel->index(index.row(), URL_COLUMN)).toString();
setRowColor(index.row(), "red");
parent->downloadTorrent(engine_url, torrent_url);
}
SearchTab::~SearchTab() {
delete resultsBrowser;
delete SearchListModel;
delete SearchDelegate;
delete box;
delete results_lbl;
delete resultsBrowser;
delete SearchListModel;
delete proxyModel;
delete SearchDelegate;
}
QHeaderView* SearchTab::header() const {
......@@ -100,87 +119,31 @@ bool SearchTab::loadColWidthResultsList() {
return false;
unsigned int listSize = width_list.size();
for(unsigned int i=0; i<listSize; ++i){
resultsBrowser->header()->resizeSection(i, width_list.at(i).toInt());
resultsBrowser->header()->resizeSection(i, width_list.at(i).toInt());
}
return true;
}
QLabel* SearchTab::getCurrentLabel()
{
return results_lbl;
return results_lbl;
}
QTreeView* SearchTab::getCurrentTreeView()
{
return resultsBrowser;
return resultsBrowser;
}
QStandardItemModel* SearchTab::getCurrentSearchListModel()
{
return SearchListModel;
return SearchListModel;
}
// Set the color of a row in data model
void SearchTab::setRowColor(int row, QString color){
for(int i=0; i<SearchListModel->columnCount(); ++i){
SearchListModel->setData(SearchListModel->index(row, i), QVariant(QColor(color)), Qt::ForegroundRole);
for(int i=0; i<proxyModel->columnCount(); ++i){
proxyModel->setData(proxyModel->index(row, i), QVariant(QColor(color)), Qt::ForegroundRole);
}
}
void SearchTab::sortSearchList(int index){
static Qt::SortOrder sortOrder = Qt::AscendingOrder;
if(resultsBrowser->header()->sortIndicatorSection() == index){
sortOrder = (sortOrder == Qt::DescendingOrder) ? Qt::AscendingOrder : Qt::DescendingOrder; ;
}
resultsBrowser->header()->setSortIndicator(index, sortOrder);
switch(index){
case SEEDERS:
case LEECHERS:
case SIZE:
sortSearchListInt(index, sortOrder);
break;
default:
sortSearchListString(index, sortOrder);
}
}
void SearchTab::sortSearchListInt(int index, Qt::SortOrder sortOrder){
QList<QPair<int, qlonglong> > lines;
// Insertion sorting
for(int i=0; i<SearchListModel->rowCount(); ++i){
misc::insertSort(lines, QPair<int,qlonglong>(i, SearchListModel->data(SearchListModel->index(i, index)).toLongLong()), sortOrder);
}
// Insert items in new model, in correct order
int nbRows_old = lines.size();
for(int row=0; row<lines.size(); ++row){
SearchListModel->insertRow(SearchListModel->rowCount());
int sourceRow = lines[row].first;
for(int col=0; col<6; ++col){
SearchListModel->setData(SearchListModel->index(nbRows_old+row, col), SearchListModel->data(SearchListModel->index(sourceRow, col)));
SearchListModel->setData(SearchListModel->index(nbRows_old+row, col), SearchListModel->data(SearchListModel->index(sourceRow, col), Qt::ForegroundRole), Qt::ForegroundRole);
}
}
// Remove old rows
SearchListModel->removeRows(0, nbRows_old);
}
void SearchTab::sortSearchListString(int index, Qt::SortOrder sortOrder){
QList<QPair<int, QString> > lines;
// Insetion sorting
for(int i=0; i<SearchListModel->rowCount(); ++i){
misc::insertSortString(lines, QPair<int, QString>(i, SearchListModel->data(SearchListModel->index(i, index)).toString()), sortOrder);
}
// Insert items in new model, in correct order
int nbRows_old = lines.size();
for(int row=0; row<nbRows_old; ++row){
SearchListModel->insertRow(SearchListModel->rowCount());
int sourceRow = lines[row].first;
for(int col=0; col<6; ++col){
SearchListModel->setData(SearchListModel->index(nbRows_old+row, col), SearchListModel->data(SearchListModel->index(sourceRow, col)));
SearchListModel->setData(SearchListModel->index(nbRows_old+row, col), SearchListModel->data(SearchListModel->index(sourceRow, col), Qt::ForegroundRole), Qt::ForegroundRole);
}
}
// Remove old rows
SearchListModel->removeRows(0, nbRows_old);
}
......@@ -41,32 +41,34 @@ class SearchEngine;
class QTreeView;
class QHeaderView;
class QStandardItemModel;
class QSortFilterProxyModel;
class SearchTab: public QWidget, public Ui::search_engine {
Q_OBJECT
private:
QVBoxLayout *box;
QLabel *results_lbl;
QTreeView *resultsBrowser;
QStandardItemModel *SearchListModel;
QSortFilterProxyModel *proxyModel;
SearchListDelegate *SearchDelegate;
SearchEngine *parent;
protected slots:
void downloadSelectedItem(const QModelIndex& index);
public:
SearchTab(SearchEngine *parent);
~SearchTab();
bool loadColWidthResultsList();
QLabel * getCurrentLabel();
QStandardItemModel * getCurrentSearchListModel();
QTreeView * getCurrentTreeView();
void setRowColor(int row, QString color);
QHeaderView* header() const;
class SearchTab : public QWidget, public Ui::search_engine
{
Q_OBJECT
private:
QVBoxLayout *box;
QLabel *results_lbl;
QTreeView *resultsBrowser;
QStandardItemModel *SearchListModel;
SearchListDelegate *SearchDelegate;
public:
SearchTab(SearchEngine *parent);
~SearchTab();
bool loadColWidthResultsList();
QLabel * getCurrentLabel();
QStandardItemModel * getCurrentSearchListModel();
QTreeView * getCurrentTreeView();
void setRowColor(int row, QString color);
QHeaderView* header() const;
protected slots:
void sortSearchList(int index);
void sortSearchListInt(int index, Qt::SortOrder sortOrder);
void sortSearchListString(int index, Qt::SortOrder sortOrder);
};
#endif
......
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>addTorrentDialog</class>
<widget class="QDialog" name="addTorrentDialog" >
<property name="geometry" >
<widget class="QDialog" name="addTorrentDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>511</width>
<height>441</height>
<height>461</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string>Torrent addition dialog</string>
</property>
<layout class="QVBoxLayout" >
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="fileNameLbl" >
<property name="text" >
<widget class="QLabel" name="fileNameLbl">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line" >
<property name="orientation" >
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="savePathLbl" >
<property name="font" >
<widget class="QLabel" name="savePathLbl">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>Save path:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="savePathTxt" />
<widget class="QLineEdit" name="savePathTxt"/>
</item>
<item>
<widget class="QToolButton" name="browseButton" >
<property name="text" >
<widget class="QToolButton" name="browseButton">
<property name="text">
<string>...</string>
</property>
</widget>
......@@ -70,39 +62,108 @@
</layout>
</item>
<item>
<widget class="QLabel" name="torrentContentLbl" >
<property name="font" >
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Torrent size:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_torrent_size">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<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>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Free disk space:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_disk_space">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_space_msg">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<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>
</item>
<item>
<widget class="QLabel" name="torrentContentLbl">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<property name="text">
<string>Torrent content:</string>
</property>
</widget>
</item>
<item>
<widget class="QTreeView" name="torrentContentList" >
<property name="contextMenuPolicy" >
<widget class="QTreeView" name="torrentContentList">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="editTriggers" >
<property name="editTriggers">
<set>QAbstractItemView::AllEditTriggers</set>
</property>
<property name="selectionMode" >
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<layout class="QHBoxLayout">
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
......@@ -111,25 +172,25 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="collapseAllButton" >
<property name="text" >
<widget class="QPushButton" name="collapseAllButton">
<property name="text">
<string>Collapse all</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="expandAllButton" >
<property name="text" >
<widget class="QPushButton" name="expandAllButton">
<property name="text">
<string>Expand all</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
......@@ -140,42 +201,33 @@
</layout>
</item>
<item>
<widget class="QCheckBox" name="checkIncrementalDL" >
<property name="text" >
<string>Download in correct order (slower but good for previewing)</string>
<widget class="QCheckBox" name="checkIncrementalDL">
<property name="text">
<string>Download in sequential order (slower but good for previewing)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="addInPause" >
<property name="text" >
<widget class="QCheckBox" name="addInPause">
<property name="text">
<string>Add to download list in paused state</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="spacing" >