1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-14 11:52:15 +02:00

Compare commits

...

124 Commits

Author SHA1 Message Date
Christophe Dumez
6db048122a Tagged v1.5.0 release 2009-09-03 12:02:39 +00:00
Christophe Dumez
194eb3ba6e - v1.5.0 release 2009-09-03 11:35:28 +00:00
Christophe Dumez
8792637634 - Fixed uTorrent spoofing code 2009-09-03 11:29:15 +00:00
Christophe Dumez
63ad2def91 - Improve readability of tracker error tooltips
- Update uTorrent spoofer to v1.9.4
2009-09-03 11:05:20 +00:00
Christophe Dumez
f790b80aa3 - Updated Dutch translation 2009-09-02 06:47:32 +00:00
Christophe Dumez
ab78e5b438 - Updated Italian translation 2009-09-01 18:14:26 +00:00
Christophe Dumez
05948e2edf - Bump to rc5 2009-09-01 17:26:34 +00:00
Christophe Dumez
c9c4f7001a - Fix crash when right-clicking on RSS news list (closes #422495) 2009-09-01 17:24:47 +00:00
Christophe Dumez
6cd185d0d5 - Updated Finnish translation 2009-09-01 16:49:13 +00:00
Christophe Dumez
063219cbe7 - Updated Hungarian translation 2009-09-01 16:42:39 +00:00
Christophe Dumez
e324f3792b - Updated Greek translation
- Added Romanian translation to desktop file
2009-09-01 16:42:00 +00:00
Christophe Dumez
0267ecc342 - Updated Czech and Portuguese translations 2009-09-01 16:39:45 +00:00
Christophe Dumez
e53c7aaea6 - Added Portuguese and brazilian translations to desktop file
- Recursive torrent download now consider torrents with more than one file inside
2009-08-31 08:51:55 +00:00
Christophe Dumez
3e90e56266 - Added Slovak and Cseck translations to desktop file 2009-08-31 07:31:34 +00:00
Christophe Dumez
1c1b8acd67 Added Finnish translation to desktop file 2009-08-31 06:14:58 +00:00
Christophe Dumez
811846e5fa - Added Hungarian translation to desktop file (Thanks Charles Barcza) 2009-08-31 01:48:28 +00:00
Christophe Dumez
3ba28885b9 - Added Traditional Chinese translation 2009-08-30 03:42:14 +00:00
Christophe Dumez
8ed1c57c29 - Updated french translation
- Bump to rc4
2009-08-30 02:01:36 +00:00
Christophe Dumez
af5d24c5bc - Forgot to commit this file 2009-08-30 01:24:46 +00:00
Christophe Dumez
9dcd572d60 - BUGFIX: Better item coloring in torrent content filtering dialog
- Updated turkish translation
2009-08-29 09:42:20 +00:00
Christophe Dumez
e024a3ff35 - Updated Finish and Romanian translations 2009-08-29 08:01:43 +00:00
Christophe Dumez
37342e0f0c - Update number of unread items when a feed is deleted 2009-08-29 04:06:25 +00:00
Christophe Dumez
bfbbc1f497 - Updated language files 2009-08-29 04:01:31 +00:00
Christophe Dumez
5d31dcdb15 - Added an icon for articles without attachment 2009-08-29 03:55:14 +00:00
Christophe Dumez
6f89b1f131 - Be less restrictive about RSS feeds, we now display articles even if they don't have embedded torrents. However, RSS feed downloader is not available for said feeds.
- Added an icon to differenciate articles with attachment (torrent)
2009-08-29 03:47:14 +00:00
Christophe Dumez
9d35bda43c - Fix a crash introduced by last commit 2009-08-29 01:44:23 +00:00
Christophe Dumez
e780d83fd0 - Stop displaying items after they were read in "unread" news. 2009-08-28 17:29:34 +00:00
Christophe Dumez
7a59d5e47c - Do not update the icon when clicking "Mark all as read" on a feed that is still loading
- Added some more debug messages
2009-08-28 16:57:28 +00:00
Christophe Dumez
f2ea524be9 - Updated Slovak translation 2009-08-28 10:12:43 +00:00
Christophe Dumez
a33094519c - Fix crash when a new RSS feed is added and its URL is reformatted/simplified by QUrl(URL).toString(). (closes #420116) 2009-08-28 06:38:19 +00:00
Christophe Dumez
e313ae808f - Fixing desktop file (Thanks Alexey Morsov) 2009-08-27 14:38:38 +00:00
Christophe Dumez
dc9802fe1e - Forgot not to remove this file too 2009-08-27 13:20:33 +00:00
Christophe Dumez
64f1d306f4 - Do not remove older torrent parameters files, just to be on the safe side 2009-08-27 13:18:45 +00:00
Christophe Dumez
f3af4867fd - As a default, sort search results list by Top seed first 2009-08-27 12:40:14 +00:00
Christophe Dumez
4fe22dbc57 - Rewrote Column sorting code in search result lists 2009-08-27 12:37:39 +00:00
Christophe Dumez
1d9b524b77 - Fixes compilation problem regarding hash missing 2009-08-27 11:41:29 +00:00
Christophe Dumez
63761afd0a - Got rid of .speedlimits file and use new TorrentPersistantData system 2009-08-27 09:07:33 +00:00
Christophe Dumez
8da148ffa1 - Import URL seeds and trackers from v1.4.x too 2009-08-27 08:43:19 +00:00
Christophe Dumez
e2dc2207d8 - Fixed v1.4.x torrent import 2009-08-27 08:23:35 +00:00
Christophe Dumez
6e87d6655a - Unread items were not updated correctly when a feed was updated 2009-08-27 07:57:52 +00:00
Christophe Dumez
d72485a955 Updated swedish translation 2009-08-27 07:54:32 +00:00
Christophe Dumez
04c6760892 - Fixed missing SLOT usage 2009-08-27 03:29:54 +00:00
Christophe Dumez
382f3e3c86 - Disabled debug mode 2009-08-27 03:15:12 +00:00
Christophe Dumez
c1378450fc - Import torrents from v1.4.x (or earlier) in order not to lose them when updating 2009-08-27 03:13:39 +00:00
Christophe Dumez
4e10a8dbf7 rc1 bump & disabling debug 2009-08-27 02:24:20 +00:00
Christophe Dumez
4f7b4c2a55 - Fix last commit 2009-08-27 02:23:17 +00:00
Christophe Dumez
f98f076335 Updated Russian translation 2009-08-27 02:22:50 +00:00
Christophe Dumez
b148a93a8f - Can now create trackerless torrents 2009-08-27 02:15:47 +00:00
Christophe Dumez
37cf23fe33 - Updated Simplified Chinese translation 2009-08-26 14:33:08 +00:00
Christophe Dumez
87f43123c6 - Update news list when a feed is updated and Unread items are displayed 2009-08-26 12:26:43 +00:00
Christophe Dumez
11dd2d81b8 - Updated french translation 2009-08-26 06:23:13 +00:00
Christophe Dumez
d18d07efed - Updated language files 2009-08-26 06:13:37 +00:00
Christophe Dumez
518a120c07 - Bump to beta4 2009-08-26 06:03:04 +00:00
Christophe Dumez
290bc8b7a6 - Support category-based requests in piratebay search plugin 2009-08-26 06:02:17 +00:00
Christophe Dumez
0ede09efb5 - Updated sorting code for seeding list too 2009-08-26 05:46:15 +00:00
Christophe Dumez
15de12f6dd - Several fixes due to new column sorting code 2009-08-26 05:26:43 +00:00
Christophe Dumez
ef95d6df81 - Code cleanup 2009-08-26 05:09:25 +00:00
Christophe Dumez
f382ba4fd0 - Column sorting fixes 2009-08-26 04:17:05 +00:00
Christophe Dumez
01d504d992 - BUGFIX: Greatly improved column sorting code (download list only for now) 2009-08-26 03:50:20 +00:00
Christophe Dumez
cdd894a6a1 - Completed French translation 2009-08-25 10:02:17 +00:00
Christophe Dumez
d7b2d3497f - Some cosmetic changes 2009-08-25 09:34:50 +00:00
Christophe Dumez
5dbd5c4326 - Updated language files 2009-08-25 09:26:11 +00:00
Christophe Dumez
9a14c4c599 - FEATURE: A random listening port can be chosen automatically 2009-08-25 09:19:02 +00:00
Christophe Dumez
3fa14cd47f - Category support for isohunt engine 2009-08-25 03:09:22 +00:00
Christophe Dumez
941d9b9bd9 - Fixed BTJunkie search engine
- Category support for TorrentReactor engine
2009-08-25 03:01:39 +00:00
Christophe Dumez
3d88b7b05c - Category-based search support for BTJunkie engine 2009-08-25 02:45:39 +00:00
Christophe Dumez
8d39e2a776 - Category combobox is now updated when search engines are enabled/disabled 2009-08-25 02:37:11 +00:00
Christophe Dumez
4a1c8a7279 - Search engine now supports category-based requests (only Mininova engine for now but the rest is coming soon)
- Updated "buy it" icon
2009-08-25 02:31:36 +00:00
Christophe Dumez
b8d8862562 - Redesigned search tab to improve usability
- Started work on categorized searching but not yet functional
2009-08-24 10:18:11 +00:00
Christophe Dumez
40e9105ee5 - Make sure Unread item is updated whenever a feed is updated 2009-08-24 09:47:13 +00:00
Christophe Dumez
0984b8b8e1 - Cannot drop a feed into "Unread" item 2009-08-24 08:20:09 +00:00
Christophe Dumez
3dd7dcc58f - Fix "add new feed subscription" when selecting a feed 2009-08-24 08:17:45 +00:00
Christophe Dumez
6ba5df3ec8 - Fix "Refresh selected stream" when Unread item is selected 2009-08-24 08:12:42 +00:00
Christophe Dumez
1560b4ca3b - Copy Feed URL no longer works on Folders 2009-08-24 08:05:54 +00:00
Christophe Dumez
68d8a9ed47 - Fix "add new Feed" when no item is selected (or Unread item is selected) 2009-08-24 08:03:28 +00:00
Christophe Dumez
ca00f3084d - "add new Feed" when clicking on "Unread" item will not add the new feed as a child to "Unread" item 2009-08-24 07:57:56 +00:00
Christophe Dumez
39c16b20ae - Resized edit-find icon for better quality 2009-08-24 07:46:54 +00:00
Christophe Dumez
666d4622b9 - Updated language files
- Updated search icon
2009-08-24 06:52:50 +00:00
Christophe Dumez
27388643b1 - Updated Changelog 2009-08-24 06:43:47 +00:00
Christophe Dumez
90d17d16a4 - Fix "Unread" name disapearing when marking items read 2009-08-24 06:35:15 +00:00
Christophe Dumez
df0f01cd71 - Fix "Unread" name disapearing on update 2009-08-24 06:31:11 +00:00
Christophe Dumez
480d00d747 - Display "Unread" item in RSS Feed list which displays all unread items 2009-08-24 06:28:31 +00:00
Christophe Dumez
a0923741a4 - Make sure items are not overwriten when drag 'n dropping items in RSS feed list 2009-08-24 04:01:26 +00:00
Christophe Dumez
8e2efc2950 - Fix bad ASSERT
- Bump to beta3
2009-08-24 03:49:29 +00:00
Christophe Dumez
91dee6058e - Safer temporary filename generation: create the temporary file to make sure the name is not generated twice 2009-08-24 03:38:31 +00:00
Christophe Dumez
f5c1343722 Updated language files 2009-08-24 03:16:08 +00:00
Christophe Dumez
d4d0a08390 - Make sure priority column stays sorted when changing torrents priority (closes #417829) 2009-08-24 03:03:06 +00:00
Christophe Dumez
d02aca7323 - Fixed possible crash when moving a feed from one folder to another 2009-08-23 15:18:29 +00:00
Christophe Dumez
fd81567ecd - Remembering open state of RSS folders on startup 2009-08-23 14:56:44 +00:00
Christophe Dumez
8e5f5b5d65 - Fixed crash on feed deletion 2009-08-23 13:52:45 +00:00
Christophe Dumez
215d561b82 - When adding a new feed, add it to the selected folder 2009-08-23 13:47:45 +00:00
Christophe Dumez
dc18780a97 - "Mark items read" on a folder now updates number of unread news 2009-08-23 13:39:15 +00:00
Christophe Dumez
06fb19e8be - Updated selectFirstFeed() function due to code rewrite 2009-08-23 13:35:45 +00:00
Christophe Dumez
3550e31871 - Remove useless code 2009-08-23 13:26:16 +00:00
Christophe Dumez
46c6c4fc9a - UpdateSelectedItems() now sets loading.png icon for all feeds included in selected folders 2009-08-23 13:20:26 +00:00
Christophe Dumez
e126de8ff5 - Always keep number of unread news per folders up to date
- RefreshAllFeeds() only sets loading.png icon for feeds (and not folders)
2009-08-23 13:05:47 +00:00
Christophe Dumez
f2d2e70967 - Updated number of unread news of RSS folders after a feed is moved from one folder to another 2009-08-23 12:49:37 +00:00
Christophe Dumez
48b14d1066 - Major rewrite of rss grouping code because I did not like my first approach. It is not complete yet but it is far more clean and stable 2009-08-23 12:22:19 +00:00
Christophe Dumez
725700420c - RSS feed parent was not updated after being moved to another folder 2009-08-23 09:10:45 +00:00
Christophe Dumez
480df1f5dc - Fixed crash when selecting feeds after they were moved 2009-08-23 09:05:36 +00:00
Christophe Dumez
2fa43dd973 - Started to implement drag n drop in feed list but it is still very buggy 2009-08-23 08:10:56 +00:00
Christophe Dumez
b9f1586068 - Expand parent folder when a new subfolder is created
- Fixed folder renaming
2009-08-22 15:33:31 +00:00
Christophe Dumez
07dbe388f4 - Started to implement 'new Folder' feature for RSS grouping
- Fixed a bug in 'Feed subscribe', the type of the new feed (STREAM) was not set
2009-08-22 15:26:39 +00:00
Christophe Dumez
b2af40c95b - Updated some icons to oxygen theme
- Prepared actions for rss grouping
2009-08-22 15:01:53 +00:00
Christophe Dumez
05569a5011 - Added some more function for rss feeds grouping 2009-08-22 14:41:58 +00:00
Christophe Dumez
73dbce45b2 - Most of the code is there for rss feeds grouping. However it is not used yet and it is probably quite unstable 2009-08-22 14:06:05 +00:00
Christophe Dumez
fdaeafc701 - Fixed overwriting confirmation -> should have 'Yes/No' buttons, not 'Ok' 2009-08-22 13:44:05 +00:00
Christophe Dumez
9ca4e2f1f6 - RSS code remodeling to improve robustness 2009-08-22 03:00:31 +00:00
Christophe Dumez
2b53aa7e81 - Use clickedItem event to update news read status instead of currentItem one to avoid marking items as read although they were not actually clicked by the user
- Use the actual number of unread news instead of (0) when adding a RSS stream to the list since it is now possible that unread news were loaded from hard disk by the class constructor
2009-08-22 02:43:11 +00:00
Christophe Dumez
8e79e918c5 - RSS toolbar: text besides icons instead of under to reduce bar height 2009-08-22 02:34:11 +00:00
Christophe Dumez
687842a949 Code cleanup 2009-08-22 02:30:28 +00:00
Christophe Dumez
645ee86860 Fixed new RSS tab layout (Toolbar) 2009-08-22 02:27:36 +00:00
Christophe Dumez
f50762dfa8 - Updated language files and icon resource file 2009-08-22 02:23:56 +00:00
Christophe Dumez
7e252d3fbd - COSMETIC: Redesigned RSS tab to improve usability 2009-08-22 02:19:40 +00:00
Christophe Dumez
2dc9f10bf4 - Fixed 'Mark all as read' would not refresh news list 2009-08-21 18:36:50 +00:00
Christophe Dumez
bca03706a0 - Delete code that is no longer used 2009-08-21 18:33:36 +00:00
Christophe Dumez
e7663e7b6b - Fixed a slight bug in default RSS feed downloader filter rule (use rule name instead as '*') 2009-08-21 18:27:45 +00:00
Christophe Dumez
2b0e05b453 - Some more RSS polishing 2009-08-21 18:24:29 +00:00
Christophe Dumez
4d67170d3e - Fixed tiny bug in RSS feeds refreshing code 2009-08-21 18:02:35 +00:00
Christophe Dumez
538c028f8a - Some more RSS polishing 2009-08-21 17:49:48 +00:00
Christophe Dumez
2cbbd6ef50 - Slightly improved RSS feeds loading: Saved news can be displayed before the Feed is effectively updated 2009-08-21 14:48:33 +00:00
Christophe Dumez
955d8069e2 - RSS fix: Make sure to update refreshed boolean only if the RSS feed have been refreshed 2009-08-21 14:15:23 +00:00
Christophe Dumez
25d998f1b5 - Added magnet URI support to Web UI 2009-08-21 14:05:03 +00:00
Christophe Dumez
462f6c41cd - Updated Changelog 2009-08-21 11:58:08 +00:00
122 changed files with 17345 additions and 10518 deletions

View File

@@ -1,13 +1,31 @@
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.5.0
* 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 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

View File

@@ -83,7 +83,7 @@ public:
}
QString getMatchingTokens_str() const {
return this->value("matches", "*").toString();
return this->value("matches", "").toString();
}
void setMatchingTokens(QString tokens) {
@@ -353,7 +353,7 @@ protected slots:
if(!filters.hasFilter(new_name)) {
validated = true;
} else {
QMessageBox::critical(0, tr("Invalid filter name"), tr("This filter name is already in use."));
QMessageBox::warning(0, tr("Invalid filter name"), tr("This filter name is already in use."));
}
}while(!validated);
// Rename the filter
@@ -392,7 +392,7 @@ protected slots:
new_name = new_name.trimmed();
if(new_name.isEmpty()) {
// Cannot be left empty
QMessageBox::critical(0, tr("Invalid filter name"), tr("The filter name cannot be left empty."));
QMessageBox::warning(0, tr("Invalid filter name"), tr("The filter name cannot be left empty."));
} else {
validated = true;
}
@@ -408,7 +408,7 @@ protected slots:
if(filter_name.isNull()) return;
if(filters.hasFilter(filter_name)) {
// Filter alread exists
QMessageBox::critical(0, tr("Invalid filter name"), tr("This filter name is already in use."));
QMessageBox::warning(0, tr("Invalid filter name"), tr("This filter name is already in use."));
} else {
validated = true;
}
@@ -430,7 +430,7 @@ protected slots:
if(selected_filter.isEmpty()) return;
QString s = test_line->text().trimmed();
if(s.isEmpty()) {
QMessageBox::critical(0, tr("Filter testing error"), tr("Please specify a test torrent name."));
QMessageBox::warning(0, tr("Filter testing error"), tr("Please specify a test torrent name."));
return;
}
// Get current filter
@@ -455,7 +455,7 @@ protected slots:
filtersList->setCurrentItem(filtersList->item(0));
QMessageBox::information(0, tr("Import successful"), tr("Filters import was successful."));
} else {
QMessageBox::critical(0, tr("Import failure"), tr("Filters could not be imported due to an I/O error."));
QMessageBox::warning(0, tr("Import failure"), tr("Filters could not be imported due to an I/O error."));
}
}
@@ -466,13 +466,13 @@ protected slots:
if(!destination.endsWith(".filters"))
destination += ".filters";
if(QFile::exists(destination)) {
int ret = QMessageBox::question(0, tr("Overwriting confirmation"), tr("Are you sure you want to overwrite existing file?"));
int ret = QMessageBox::question(0, tr("Overwriting confirmation"), tr("Are you sure you want to overwrite existing file?"), QMessageBox::Yes|QMessageBox::No);
if(ret != QMessageBox::Yes) return;
}
if(filters.serialize(destination))
QMessageBox::information(0, tr("Export successful"), tr("Filters export was successful."));
else
QMessageBox::critical(0, tr("Export failure"), tr("Filters could not be exported due to an I/O error."));
QMessageBox::warning(0, tr("Export failure"), tr("Filters could not be exported due to an I/O error."));
}
};

View File

@@ -38,6 +38,7 @@
#include <QFile>
#include <QSettings>
#include <QStandardItemModel>
#include <QSortFilterProxyModel>
#include <QHeaderView>
#include <QMenu>
#include <QMessageBox>
@@ -54,9 +55,16 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
finishedListModel->setHeaderData(F_PEERS, Qt::Horizontal, tr("Connected peers"));
finishedListModel->setHeaderData(F_UPLOAD, Qt::Horizontal, tr("Total uploaded", "i.e: Total amount of uploaded data"));
finishedListModel->setHeaderData(F_RATIO, Qt::Horizontal, tr("Ratio"));
finishedList->setModel(finishedListModel);
proxyModel = new QSortFilterProxyModel();
proxyModel->setDynamicSortFilter(true);
proxyModel->setSourceModel(finishedListModel);
finishedList->setModel(proxyModel);
finishedList->setRootIsDecorated(false);
finishedList->setAllColumnsShowFocus(true);
finishedList->setSortingEnabled(true);
loadHiddenColumns();
// Hide hash column
finishedList->hideColumn(F_HASH);
@@ -69,7 +77,6 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
// Make download list header clickable for sorting
finishedList->header()->setClickable(true);
finishedList->header()->setSortIndicatorShown(true);
connect(finishedList->header(), SIGNAL(sectionPressed(int)), this, SLOT(toggleFinishedListSortOrder(int)));
finishedListDelegate = new FinishedListDelegate(finishedList);
finishedList->setItemDelegate(finishedListDelegate);
connect(finishedList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedListMenu(const QPoint&)));
@@ -104,9 +111,11 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
}
FinishedTorrents::~FinishedTorrents(){
saveLastSortedColumn();
saveColWidthFinishedList();
saveHiddenColumns();
delete finishedListDelegate;
delete proxyModel;
delete finishedListModel;
}
@@ -141,8 +150,8 @@ void FinishedTorrents::addTorrent(QString hash){
// Update the number of finished torrents
++nbFinished;
emit finishedTorrentsNumberChanged(nbFinished);
// Sort List
sortFinishedList();
loadLastSortedColumn();
}
// Set the color of a row in data model
@@ -159,7 +168,7 @@ QStringList FinishedTorrents::getSelectedTorrents(bool only_one) const{
foreach(const QModelIndex &index, selectedIndexes) {
if(index.column() == F_NAME) {
// Get the file hash
QString hash = finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString();
QString hash = getHashFromRow(index.row());
res << hash;
if(only_one) break;
}
@@ -208,6 +217,18 @@ bool FinishedTorrents::loadColWidthFinishedList(){
return true;
}
void FinishedTorrents::saveLastSortedColumn() {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
Qt::SortOrder sortOrder = finishedList->header()->sortIndicatorOrder();
QString sortOrderLetter;
if(sortOrder == Qt::AscendingOrder)
sortOrderLetter = QString::fromUtf8("a");
else
sortOrderLetter = QString::fromUtf8("d");
int index = finishedList->header()->sortIndicatorSection();
settings.setValue(QString::fromUtf8("FinishedListSortedCol"), misc::toQString(index)+sortOrderLetter);
}
void FinishedTorrents::loadLastSortedColumn() {
// Loading last sorted column
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
@@ -220,7 +241,7 @@ void FinishedTorrents::loadLastSortedColumn() {
sortOrder = Qt::AscendingOrder;
sortedCol = sortedCol.left(sortedCol.size()-1);
int index = sortedCol.toInt();
sortFinishedList(index, sortOrder);
finishedList->sortByColumn(index, sortOrder);
}
}
@@ -265,7 +286,7 @@ void FinishedTorrents::on_actionSet_upload_limit_triggered(){
foreach(const QModelIndex &index, selectedIndexes){
if(index.column() == F_NAME){
// Get the file hash
hashes << finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString();
hashes << getHashFromRow(index.row());
}
}
new BandwidthAllocationDialog(this, true, BTSession, hashes);
@@ -351,8 +372,8 @@ void FinishedTorrents::pauseTorrent(QString hash) {
}
QString FinishedTorrents::getHashFromRow(unsigned int row) const {
Q_ASSERT(row < (unsigned int)finishedListModel->rowCount());
return finishedListModel->data(finishedListModel->index(row, F_HASH)).toString();
Q_ASSERT(row < (unsigned int)proxyModel->rowCount());
return proxyModel->data(proxyModel->index(row, F_HASH)).toString();
}
// Will move it to download tab
@@ -369,7 +390,7 @@ void FinishedTorrents::deleteTorrent(QString hash){
// Show torrent properties dialog
void FinishedTorrents::showProperties(const QModelIndex &index){
showPropertiesFromHash(finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString());
showPropertiesFromHash(getHashFromRow(index.row()));
}
void FinishedTorrents::showPropertiesFromHash(QString hash){
@@ -400,7 +421,7 @@ void FinishedTorrents::forceRecheck(){
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
foreach(const QModelIndex &index, selectedIndexes){
if(index.column() == F_NAME){
QString hash = finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString();
QString hash = getHashFromRow(index.row());
QTorrentHandle h = BTSession->getTorrentHandle(hash);
qDebug("Forcing recheck for torrent %s", hash.toLocal8Bit().data());
h.force_recheck();
@@ -416,7 +437,7 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint&){
foreach(const QModelIndex &index, selectedIndexes) {
if(index.column() == F_NAME) {
// Get the file name
QString hash = finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString();
QString hash = getHashFromRow(index.row());
// Get handle and pause the torrent
QTorrentHandle h = BTSession->getTorrentHandle(hash);
if(!h.is_valid()) continue;
@@ -462,7 +483,7 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint&){
*/
// hide/show columns menu
void FinishedTorrents::displayFinishedHoSMenu(const QPoint& pos){
void FinishedTorrents::displayFinishedHoSMenu(const QPoint&){
QMenu hideshowColumn(this);
hideshowColumn.setTitle(tr("Hide or Show Column"));
int lastCol = F_RATIO;
@@ -470,7 +491,7 @@ void FinishedTorrents::displayFinishedHoSMenu(const QPoint& pos){
hideshowColumn.addAction(getActionHoSCol(i));
}
// Call menu
hideshowColumn.exec(mapToGlobal(pos)+QPoint(10,34));
hideshowColumn.exec(QCursor::pos());
}
// toggle hide/show a column
@@ -603,97 +624,3 @@ QAction* FinishedTorrents::getActionHoSCol(int index) {
return NULL;
}
}
/*
* Sorting functions
*/
void FinishedTorrents::toggleFinishedListSortOrder(int index) {
Qt::SortOrder sortOrder = Qt::AscendingOrder;
if(finishedList->header()->sortIndicatorSection() == index){
sortOrder = (Qt::SortOrder)!(bool)finishedList->header()->sortIndicatorOrder();
}
switch(index) {
case F_SIZE:
case F_UPSPEED:
case F_RATIO:
case F_UPLOAD:
sortFinishedListFloat(index, sortOrder);
break;
default:
sortFinishedListString(index, sortOrder);
}
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
QString sortOrderLetter;
if(sortOrder == Qt::AscendingOrder)
sortOrderLetter = QString::fromUtf8("a");
else
sortOrderLetter = QString::fromUtf8("d");
settings.setValue(QString::fromUtf8("FinishedListSortedCol"), misc::toQString(index)+sortOrderLetter);
}
void FinishedTorrents::sortFinishedList(int index, Qt::SortOrder sortOrder){
if(index == -1) {
index = finishedList->header()->sortIndicatorSection();
sortOrder = finishedList->header()->sortIndicatorOrder();
} else {
finishedList->header()->setSortIndicator(index, sortOrder);
}
switch(index) {
case F_SIZE:
case F_UPSPEED:
case F_UPLOAD:
case F_RATIO:
sortFinishedListFloat(index, sortOrder);
break;
default:
sortFinishedListString(index, sortOrder);
}
}
void FinishedTorrents::sortFinishedListFloat(int index, Qt::SortOrder sortOrder){
QList<QPair<int, double> > lines;
// insertion sorting
unsigned int nbRows = finishedListModel->rowCount();
for(unsigned int i=0; i<nbRows; ++i){
misc::insertSort(lines, QPair<int,double>(i, finishedListModel->data(finishedListModel->index(i, index)).toDouble()), sortOrder);
}
// Insert items in new model, in correct order
unsigned int nbRows_old = lines.size();
for(unsigned int row=0; row<nbRows_old; ++row){
finishedListModel->insertRow(finishedListModel->rowCount());
unsigned int sourceRow = lines[row].first;
unsigned int nbColumns = finishedListModel->columnCount();
for(unsigned int col=0; col<nbColumns; ++col){
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col)));
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col), Qt::DecorationRole), Qt::DecorationRole);
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col), Qt::ForegroundRole), Qt::ForegroundRole);
}
}
// Remove old rows
finishedListModel->removeRows(0, nbRows_old);
}
void FinishedTorrents::sortFinishedListString(int index, Qt::SortOrder sortOrder){
QList<QPair<int, QString> > lines;
// Insertion sorting
unsigned int nbRows = finishedListModel->rowCount();
for(unsigned int i=0; i<nbRows; ++i){
misc::insertSortString(lines, QPair<int, QString>(i, finishedListModel->data(finishedListModel->index(i, index)).toString()), sortOrder);
}
// Insert items in new model, in correct order
unsigned int nbRows_old = lines.size();
for(unsigned int row=0; row<nbRows_old; ++row){
finishedListModel->insertRow(finishedListModel->rowCount());
unsigned int sourceRow = lines[row].first;
unsigned int nbColumns = finishedListModel->columnCount();
for(unsigned int col=0; col<nbColumns; ++col){
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col)));
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col), Qt::DecorationRole), Qt::DecorationRole);
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col), Qt::ForegroundRole), Qt::ForegroundRole);
}
}
// Remove old rows
finishedListModel->removeRows(0, nbRows_old);
}

View File

@@ -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,7 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
void deleteTorrent(QString hash);
void showPropertiesFromHash(QString hash);
void loadLastSortedColumn();
void saveLastSortedColumn();
void updateMetadata(QTorrentHandle &h);
signals:

View File

@@ -163,7 +163,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
// Search engine tab
searchEngine = new SearchEngine(BTSession, myTrayIcon, systrayIntegration);
tabs->addTab(searchEngine, tr("Search"));
tabs->setTabIcon(2, QIcon(QString::fromUtf8(":/Icons/skin/search.png")));
tabs->setTabIcon(2, QIcon(QString::fromUtf8(":/Icons/oxygen/edit-find.png")));
readSettings();
// RSS Tab
rssWidget = 0;
@@ -911,7 +911,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
inDownloadList = false;
break;
case 3: //RSSImp
rssWidget->on_delStream_button_clicked();
rssWidget->deleteSelectedItems();
return;
default:
return;
@@ -1027,7 +1027,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
// Connection
// * Ports binding
unsigned short old_listenPort = BTSession->getListenPort();
BTSession->setListeningPortsRange(options->getPorts());
BTSession->setListeningPort(options->getPort());
unsigned short new_listenPort = BTSession->getListenPort();
if(new_listenPort != old_listenPort) {
BTSession->addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg( misc::toQString(new_listenPort)));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1005 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src/Icons/oxygen/remove.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/Icons/oxygen/wallet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,19 +1,26 @@
[Desktop Entry]
Categories=Qt;Network;P2P
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-клієнт

Binary file not shown.

Before

Width:  |  Height:  |  Size: 948 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -114,6 +114,9 @@ class bittorrent : public QObject {
public slots:
QTorrentHandle addTorrent(QString path, bool fromScanDir = false, QString from_url = QString(), bool resumed = false);
QTorrentHandle addMagnetUri(QString magnet_uri, bool resumed=false);
void importOldTorrents();
void applyFormerAttributeFiles(QTorrentHandle h);
void importOldTempData(QString torrent_path);
void loadSessionState();
void saveSessionState();
void downloadFromUrl(QString url);
@@ -133,7 +136,6 @@ class bittorrent : public QObject {
void enableIPFilter(QString filter);
void disableIPFilter();
void setQueueingEnabled(bool enable);
void saveTorrentSpeedLimits(QString hash);
void loadTorrentSpeedLimits(QString hash);
void handleDownloadFailure(QString url, QString reason);
void loadWebSeeds(QString fileHash);
@@ -141,7 +143,7 @@ class bittorrent : public QObject {
void decreaseDlTorrentPriority(QString hash);
void downloadUrlAndSkipDialog(QString url, QString save_path=QString::null);
// Session configuration - Setters
void setListeningPortsRange(std::pair<unsigned short, unsigned short> ports);
void setListeningPort(int port);
void setMaxConnections(int maxConnec);
void setMaxConnectionsPerTorrent(int max);
void setMaxUploadsPerTorrent(int max);
@@ -167,6 +169,7 @@ class bittorrent : public QObject {
void addPeerBanMessage(QString msg, bool from_ipfilter);
void processDownloadedFile(QString, QString);
void saveTrackerFile(QString hash);
void addMagnetSkipAddDlg(QString uri);
protected slots:
void scanDirectory(QString);

View File

@@ -62,22 +62,22 @@
<item>
<widget class="QPushButton" name="addFile_button">
<property name="text">
<string>Add a file</string>
<string>Add file</string>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/Icons/add_file.png</normaloff>:/Icons/add_file.png</iconset>
<normaloff>:/Icons/oxygen/document-new.png</normaloff>:/Icons/oxygen/document-new.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="addFolder_button">
<property name="text">
<string>Add a folder</string>
<string>Add folder</string>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/Icons/add_folder.png</normaloff>:/Icons/add_folder.png</iconset>
<normaloff>:/Icons/oxygen/folder-new.png</normaloff>:/Icons/oxygen/folder-new.png</iconset>
</property>
</widget>
</item>

View File

@@ -166,10 +166,10 @@ void createtorrent::on_createButton_clicked(){
return;
}
QStringList trackers = allItems(trackers_list);
if(!trackers.size()){
/*if(!trackers.size()){
QMessageBox::critical(0, tr("No tracker path set"), tr("Please set at least one tracker"));
return;
}
}*/
QString destination = QFileDialog::getSaveFileName(this, tr("Select destination torrent file"), QDir::homePath(), tr("Torrent Files")+QString::fromUtf8(" (*.torrent)"));
if(!destination.isEmpty()) {
if(!destination.endsWith(QString::fromUtf8(".torrent")))

View File

@@ -142,7 +142,7 @@
<action name="actionBuy_it">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/Icons/money.png</normaloff>:/Icons/money.png</iconset>
<normaloff>:/Icons/oxygen/wallet.png</normaloff>:/Icons/oxygen/wallet.png</iconset>
</property>
<property name="text">
<string>Buy it</string>

View File

@@ -77,13 +77,20 @@ subDownloadThread::~subDownloadThread(){
}
void subDownloadThread::run(){
// XXX: Trick to get a unique filename
// Get a unique filename
QString filePath;
QTemporaryFile *tmpfile = new QTemporaryFile();
if (tmpfile->open()) {
filePath = tmpfile->fileName();
QTemporaryFile tmpfile;
tmpfile.setAutoRemove(false);
if (tmpfile.open()) {
filePath = tmpfile.fileName();
qDebug("Temporary filename is: %s", filePath.toLocal8Bit().data());
} else {
emit downloadFailureST(this, url, tr("I/O Error"));
return;
}
delete tmpfile;
tmpfile.close();
// Now temporary file is created but closed so that
// curl can use it
FILE *f = fopen(filePath.toLocal8Bit().data(), "wb");
if(!f) {
std::cerr << "couldn't open destination file" << "\n";
@@ -134,6 +141,7 @@ void subDownloadThread::run(){
qDebug("Downloading %s", url.toLocal8Bit().data());
if(!abort)
res = curl_easy_perform(curl);
qDebug("done downloading %s", url.toLocal8Bit().data());
/* always cleanup */
curl_easy_cleanup(curl);
fclose(f);
@@ -144,6 +152,7 @@ void subDownloadThread::run(){
} else {
emit downloadFinishedST(this, url, filePath);
}
qDebug("%s Raised the signal", url.toLocal8Bit().data());
} else {
std::cerr << "Could not initialize CURL" << "\n";
}
@@ -158,7 +167,9 @@ downloadThread::~downloadThread(){
abort = true;
condition.wakeOne();
mutex.unlock();
//qDebug("downloadThread deleting subthreads...");
qDeleteAll(subThreads);
//qDebug("downloadThread deleted subthreads");
wait();
}
@@ -174,28 +185,37 @@ void downloadThread::downloadUrl(QString url){
void downloadThread::run(){
forever{
if(abort)
if(abort) {
qDebug("DownloadThread aborting...");
return;
}
mutex.lock();
if(!urls_queue.empty() && subThreads.size() < MAX_THREADS){
QString url = urls_queue.dequeue();
mutex.unlock();
//qDebug("DownloadThread downloading %s...", url.toLocal8Bit().data());
subDownloadThread *st = new subDownloadThread(0, url);
subThreads << st;
connect(st, SIGNAL(downloadFinishedST(subDownloadThread*, QString, QString)), this, SLOT(propagateDownloadedFile(subDownloadThread*, QString, QString)));
connect(st, SIGNAL(downloadFailureST(subDownloadThread*, QString, QString)), this, SLOT(propagateDownloadFailure(subDownloadThread*, QString, QString)));
st->start();
}else{
//qDebug("DownloadThread sleeping...");
condition.wait(&mutex);
//qDebug("DownloadThread woke up");
mutex.unlock();
}
}
}
void downloadThread::propagateDownloadedFile(subDownloadThread* st, QString url, QString path){
qDebug("Downloading %s was successful", url.toLocal8Bit().data());
mutex.lock();
int index = subThreads.indexOf(st);
Q_ASSERT(index != -1);
subThreads.removeAt(index);
mutex.unlock();
qDebug("Deleting subthread");
delete st;
emit downloadFinished(url, path);
mutex.lock();
@@ -203,12 +223,16 @@ void downloadThread::propagateDownloadedFile(subDownloadThread* st, QString url,
condition.wakeOne();
}
mutex.unlock();
qDebug("Out of propagateDownloadedFile");
}
void downloadThread::propagateDownloadFailure(subDownloadThread* st, QString url, QString reason){
qDebug("Downloading %s failed", url.toLocal8Bit().data());
mutex.lock();
int index = subThreads.indexOf(st);
Q_ASSERT(index != -1);
subThreads.removeAt(index);
mutex.unlock();
delete st;
emit downloadFailure(url, reason);
mutex.lock();

Some files were not shown because too many files have changed in this diff Show More