diff --git a/TODO b/TODO index d51855e36..7a41de938 100644 --- a/TODO +++ b/TODO @@ -42,4 +42,4 @@ - Display more info in log (UPnP) - Update to libtorrent SVN (0.13) - Use its UPnP/NAT-PMP built-in support instead of ours - - Use its piece prioritization support (Add comboboxes in properties) \ No newline at end of file + - Use its piece prioritization support \ No newline at end of file diff --git a/src/FinishedTorrents.cpp b/src/FinishedTorrents.cpp index c48915beb..ab7e0d650 100644 --- a/src/FinishedTorrents.cpp +++ b/src/FinishedTorrents.cpp @@ -28,7 +28,6 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession){ setupUi(this); nbFinished = 0; - ((GUI*)parent)->setTabText(1, tr("Finished") +" (0)"); this->parent = parent; this->BTSession = BTSession; finishedListModel = new QStandardItemModel(0,9); diff --git a/src/GUI.cpp b/src/GUI.cpp index 0914fd17b..a245feef7 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -66,6 +66,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){ tabs->addTab(rssWidget, tr("RSS")); tabs->setTabIcon(3, QIcon(QString::fromUtf8(":/Icons/rss.png"))); readSettings(); + // Tabs text + nbTorrents = 0; + tabs->setTabText(0, tr("Downloads") + " (0)"); + tabs->setTabText(1, tr("Finished") + " (0)"); // Setting icons this->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/qbittorrent32.png"))); actionOpen->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/open.png"))); @@ -116,8 +120,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){ if(!loadColWidthDLList()){ downloadList->header()->resizeSection(0, 200); } - nbTorrents = 0; - tabs->setTabText(0, tr("Downloads") +" (0)"); #ifndef NO_UPNP connect(&BTSession, SIGNAL(noWanServiceDetected()), this, SLOT(displayNoUPnPWanServiceDetected())); connect(&BTSession, SIGNAL(wanServiceDetected()), this, SLOT(displayUPnPWanServiceDetected())); diff --git a/src/properties_imp.cpp b/src/properties_imp.cpp index 1103d19cd..2ba7ebcb6 100644 --- a/src/properties_imp.cpp +++ b/src/properties_imp.cpp @@ -44,7 +44,6 @@ properties::properties(QWidget *parent, torrent_handle &h, QStringList trackerEr filesList->setModel(PropListModel); PropDelegate = new PropListDelegate(); filesList->setItemDelegate(PropDelegate); -// connect(filesList, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(toggleSelectedState(const QModelIndex&))); connect(filesList, SIGNAL(clicked(const QModelIndex&)), filesList, SLOT(edit(const QModelIndex&))); connect(addTracker_button, SIGNAL(clicked()), this, SLOT(askForTracker())); connect(removeTracker_button, SIGNAL(clicked()), this, SLOT(deleteSelectedTrackers())); @@ -303,30 +302,6 @@ void properties::setAllPiecesState(bool selected){ } } -// Toggle the selected state of a file within the torrent when we -// double click on it. -// void properties::toggleSelectedState(const QModelIndex& index){ -// int row = index.row(); -// if(selectionBitmask.at(row)){ -// // File is selected -// selectionBitmask.erase(selectionBitmask.begin()+row); -// selectionBitmask.insert(selectionBitmask.begin()+row, 0); -// // Update list infos -// setRowColor(row, "green"); -// PropListModel->setData(PropListModel->index(row, SELECTED), QVariant(true)); -// }else{ -// // File is not selected -// selectionBitmask.erase(selectionBitmask.begin()+row); -// selectionBitmask.insert(selectionBitmask.begin()+row, 1); -// // Update list infos -// setRowColor(row, "red"); -// PropListModel->setData(PropListModel->index(row, SELECTED), QVariant(false)); -// } -// h.filter_files(selectionBitmask); -// // Save filtered pieces to a file to remember them -// saveFilteredFiles(); -// } - void properties::on_incrementalDownload_stateChanged(int){ qDebug("Incremental download toggled"); torrent_info torrentInfo = h.get_torrent_info(); diff --git a/src/properties_imp.h b/src/properties_imp.h index a41c3e50e..8f5ef5064 100644 --- a/src/properties_imp.h +++ b/src/properties_imp.h @@ -48,7 +48,6 @@ class properties : public QDialog, private Ui::properties{ void on_okButton_clicked(); void on_incrementalDownload_stateChanged(int); void setRowColor(int row, QString color); -// void toggleSelectedState(const QModelIndex& index); void saveFilteredFiles(); void updateProgress(); void loadFilteredFiles(); diff --git a/src/rss.h b/src/rss.h index 44496255b..a5f3dcb80 100644 --- a/src/rss.h +++ b/src/rss.h @@ -19,13 +19,13 @@ * Contact : chris@qbittorrent.org, arnaud@qbittorrent.org */ -#define STREAM_MAX_ITEM 15 -// TODO : not used yet -#define GLOBAL_MAX_ITEM 150 - #ifndef RSS_H #define RSS_H +#define STREAM_MAX_ITEM 15 +// FIXME: not used yet +#define GLOBAL_MAX_ITEM 150 + #include #include #include @@ -36,9 +36,7 @@ #include "misc.h" #include "downloadThread.h" -class RssItem; class RssStream; -class RssManager; // Item of a rss stream, single information class RssItem{ @@ -58,9 +56,8 @@ class RssItem{ read = false; parent = _parent; downloadLink = "none"; - QDomElement property=properties.firstChild().toElement(); - while(!property.isNull()) - { + QDomElement property = properties.firstChild().toElement(); + while(!property.isNull()) { // setters if (property.tagName() == "title") title = property.text(); @@ -182,7 +179,7 @@ class RssStream : public QObject{ i++; } } - + QString getTitle() const{ return this->title; } @@ -379,7 +376,7 @@ class RssManager{ url.append("rss.xml"); } } - + if(hasStream(url)<0){ RssStream* stream = new RssStream(url); this->streamList.append(stream); @@ -437,7 +434,7 @@ class RssManager{ this->streamList.replace(index, stream); } } - + // return the position index of a stream, if the manager owns it short hasStream(RssStream* stream) const{ QString url = stream->getUrl(); @@ -469,7 +466,7 @@ class RssManager{ streamListAlias.replace(index, newAlias); } } - + }; #endif diff --git a/src/src.pro b/src/src.pro index 2057675c8..88c2af4be 100644 --- a/src/src.pro +++ b/src/src.pro @@ -11,7 +11,7 @@ TARGET = qbittorrent CONFIG += qt thread x11 network # Update this VERSION for each release -DEFINES += VERSION=\\\"v0.10.0alpha5\\\" +DEFINES += VERSION=\\\"v0.10.0alpha6\\\" DEFINES += VERSION_MAJOR=0 DEFINES += VERSION_MINOR=10 DEFINES += VERSION_BUGFIX=0