Commit graph

4921 commits

Author SHA1 Message Date
Ivan Sorokin
da867fd022 Split trackerlogin into .h and .cpp 2014-11-05 03:10:39 +03:00
Ivan Sorokin
ed197a193d Split statusbar into .h and .cpp 2014-11-05 03:10:39 +03:00
Ivan Sorokin
6347700ee3 Move libtorrent includes to .cpp
This commit probably fixes #2119.

The only important change in this commit is moving
session::get_ip_filter() from FilterParserThread::processFilterFile() to
FilterParserThread::run(). Previously we called it in main thread, but
now we calls it in worker thread. I don't now what libtorrent contract
about threads, but I assume that if it is ok to set_ip_filter from
other thread, it is ok to get it.
2014-11-05 03:10:39 +03:00
Ivan Sorokin
17f5ffcaec Split filterparserthread into .h and .cpp 2014-11-05 03:10:39 +03:00
Vladimir Golovnev (Glassez)
0660398c28 Replace Mascot with qBittorrent logo on WebUI login page. 2014-11-03 16:31:41 +03:00
Vladimir Golovnev (Glassez)
651bf4f9aa Fix status returned to banned user. 2014-11-03 16:31:40 +03:00
sledgehammer999
6f14b34470 WEBUI: Protect against timing attacks. Closes #2108. 2014-11-02 21:41:29 +02:00
Gabriele
b63f647c2c Add "Total Size" column to transfer list
This column shows the total size of the related torrent taking into
account also the unwanted data.

Closes #1233.
2014-11-02 19:56:03 +01:00
Gabriele
b1af99ffba Add "Last Activity" column to transfer list
This column shows the time elapsed since the related torrent has
received or sent a chunk.

Closes #517.
2014-11-02 19:56:03 +01:00
Gabriele
a501f9d223 Add "Last Seen Complete" column to transfer list
This column shows when we or one of our peers last saw a complete
copy of the related torrent.

Closes #483.
2014-11-02 19:15:10 +01:00
Ivan Sorokin
51c9d358b4 Implement O(1) SpeedSample::average() instead of O(N) 2014-11-02 20:03:49 +03:00
Ivan Sorokin
4ff08ff691 New improved Sample in TorrentSpeedMonitor 2014-11-02 20:03:49 +03:00
Ivan Sorokin
0d311062f3 Unused function 2014-11-02 20:03:49 +03:00
sledgehammer999
d62498b48c Merge pull request #2106 from sorokin/fix-memleak-in-torrentmodel
Fix a memleak in torrentmodel.
2014-11-02 16:43:04 +02:00
sledgehammer999
37d83cf6a8 Merge pull request #2092 from pmzqla/cleanup
Remove unused code
2014-11-02 16:41:40 +02:00
sledgehammer999
4f2b7c2e10 Merge pull request #2081 from sorokin/split
Split a few files into .h and .cpp
2014-11-02 16:40:41 +02:00
sledgehammer999
cfa28ec68c Merge pull request #2080 from sorokin/cleanup-torrent-model
Cleanup torrent model item
2014-11-02 16:36:52 +02:00
sledgehammer999
73a05a67a4 Merge pull request #2057 from pmzqla/sort-content
Put directories first when sorting torrent content by name
2014-11-02 16:28:25 +02:00
sledgehammer999
6d5c9ff7d4 Merge pull request #2095 from DoumanAsh/piratebay_https
Return https connection for piratebay
2014-11-02 15:48:40 +02:00
sledgehammer999
08de7f7439 Merge pull request #2059 from sorokin/fix-eta
Fix ETA calculation
2014-11-02 15:41:40 +02:00
sledgehammer999
46f3009e4b Merge pull request #2051 from pmzqla/filter-input
Improve input box to filter torrent list
2014-11-02 15:25:49 +02:00
sledgehammer999
238703cb0e Remove unused variables. 2014-11-02 15:03:53 +02:00
sledgehammer999
9e6d57057f Add back contact info in the copyright notices. 2014-11-02 15:03:40 +02:00
Ivan Sorokin
9771cb796c Unused include 2014-11-02 15:37:07 +03:00
Ivan Sorokin
807960b768 Fix a memleak in torrentmodel.
Perhaps we should finally move to C++11 and std::unique_ptr?
2014-11-02 14:56:19 +03:00
Vladimir Golovnev (Glassez)
8a65dbaa4f WebUI core redesign. 2014-11-02 13:54:48 +03:00
DoumanAsh
b4e31c9a1b Use https for Piratebay search plugin. Closes #2093 2014-10-30 21:30:45 +03:00
Gabriele
fe030f1540 Remove unused code
Leftovers of 4ec176b683 ("Make possible to move file to .unwanted
directory after downloading")
2014-10-28 23:12:22 +01:00
Vladimir Golovnev (Glassez)
9853a9fec9 Modify Http parser/generator classes. 2014-10-26 19:52:15 +03:00
Vladimir Golovnev (Glassez)
3d20f2f670 Prepare WebUI resources.
Html/Css/JavaScript files displacement.
Also add new icon.
2014-10-26 19:52:01 +03:00
Gabriele
bdf27451ad Put directories first when sorting torrent content by name
Closes #1594.
2014-10-25 21:14:56 +02:00
Ivan Sorokin
8f0d49bb1b Remove default argument from TorrentPersistentData::setAddedDate() 2014-10-25 16:12:17 +04:00
Ivan Sorokin
16eb407453 Split src/torrentpersistentdata into .h and .cpp 2014-10-25 16:12:17 +04:00
Ivan Sorokin
e1b4c5534e Split src/transferlistfilterswidget into .h and .cpp 2014-10-25 16:12:17 +04:00
Ivan Sorokin
03b06fbf81 Split src/transferlistdelegate into .h and .cpp 2014-10-25 16:12:17 +04:00
Ivan Sorokin
2d98b8f192 Call TorrentModelItem::state() directly in getTorrentStatusReport
There is no point in wraping/unwraping QVariant.
2014-10-25 14:25:26 +04:00
Ivan Sorokin
80297697dd Remove mutable fields from TorrentModelItem
The querying of TR_STATUS doesn't affect color and icon now.
2014-10-25 14:25:25 +04:00
Ivan Sorokin
ad116edac7 Use Qt::GlobalColor to refer to color instead of string
Qt uses binary search to convert string to QColor, we don't need that
binary search at all. This patch could be considered as optimization, but
in reality creating QColor takes only 0.2% of time. So it should be visible
at all.

This could be considered as cleanup for not calling expensive functions
from non-expensive ones.
2014-10-25 14:25:21 +04:00
sledgehammer999
b0f767e699 Merge pull request #2060 from glassez/fwd_decl_fixes
Fix libtorrent types forward declaration errors/warnings.
2014-10-21 17:25:57 +03:00
sledgehammer999
e750ae3a79 Use boost:bind() as the docs show. Allows compilation with older gcc versions. 2014-10-21 16:28:06 +03:00
Vladimir Golovnev (Glassez)
ab2d506e09 Fix libtorrent types forward declaration errors/warnings. 2014-10-21 16:33:04 +04:00
Ivan Sorokin
637246c1c7 Cleaup includes 2014-10-21 12:13:56 +04:00
Ivan Sorokin
5f0d6f3c6d Fix incorrect ETA calculation 2014-10-21 12:13:52 +04:00
Gabriele
ea1d7afdef Focus transfer list on startup
The torrent list filter will be focused otherwise and its placeholder
text will be hidden on startup.
2014-10-20 19:58:31 +02:00
Gabriele
afb03725ad Add placeholder text to the input to filter the torrent list
Users can mistakenly think the input box is to search for torrents
and not to filter the torrent list. A placeholder text will make things
clear.
2014-10-20 19:58:31 +02:00
Gabriele
1a63f6af1b Show input box to filter torrent list only when the list is shown
It's misleading to show the filter on every tab when it works only
for the torrent list.
2014-10-20 19:57:39 +02:00
sledgehammer999
ce4ef37820 Remove superfluous semicolon(;). 2014-10-20 20:39:13 +03:00
sledgehammer999
c2f2d0a363 Don't show multiple unlock UI dialogs. Closes #2040. 2014-10-20 20:34:46 +03:00
sledgehammer999
2203d0a043 Merge pull request #2041 from sorokin/optimize-natural-sort
Optimize misc::naturalSort()
2014-10-19 18:57:14 +03:00
Ivan Sorokin
a278261806 Optimize misc::naturalSort()
Previous implementation used QRegExp to find a first digit. That is
utterly ineffective.

When torrent list is sorted by name (a column that uses the naturalSort() for
comparison), naturalSort could take 18.6% of the time of the UI thread. Optimize it
so now it takes 1% of the time of the UI thread.
2014-10-19 14:20:16 +04:00
sledgehammer999
9b71e4ffc9 Use the correct character encoding for exceptions coming from libtorrent. 2014-10-18 17:22:50 +03:00
sledgehammer999
89ae72d5c4 Merge pull request #2042 from sorokin/optimize-includes
Optimize includes
2014-10-18 16:42:30 +03:00
sledgehammer999
d02984cbed Merge pull request #2027 from pmzqla/system_icons
Increase maximum size of system icons
2014-10-18 15:10:29 +03:00
sledgehammer999
7c03167cde Merge pull request #2026 from pmzqla/master
Make Windows icons suitable for high dpi screens
2014-10-18 14:27:51 +03:00
sledgehammer999
dd711bf377 Merge pull request #2035 from pmzqla/torrentpath
Allow relative torrent paths when qBittorrent is already running
2014-10-18 14:27:14 +03:00
Gabriele
05929b78c6 Allow relative torrent paths when qBittorrent is already running
Adding new torrents from the command line while qBittorrent was
already running was possible only providing the absolute path to
the file.
2014-10-18 13:04:18 +02:00
sledgehammer999
aca4731145 Merge pull request #2031 from pmzqla/panel
Set minimum width of the left panel in the preferences
2014-10-18 13:43:40 +03:00
sledgehammer999
c2e0baa6a6 Merge pull request #2034 from pmzqla/sections
Don't stretch the last section in the transfer list
2014-10-18 13:31:39 +03:00
Ivan Sorokin
de5f38a160 Speedup compilation speed
libtorrent has a relatively heavy headers, that take lots of time to
process. This commit removes unnecessary includes of libtorrent headers
and replaces them with forward declarations.

I had to move some functions in QBtSession from slots to regular
functions because moc'ed file want to see complete types of all
parameters of slots.

"time make" of full rebuild before this series of commits:

real    13m35.937s
user    12m1.295s
sys     1m25.908s

after:

real    10m54.390s
user    9m31.167s
sys     1m12.580s
2014-10-18 12:19:05 +04:00
Ivan Sorokin
f6732e87f2 Remove inclusion of "qtracker.h" in "qbtsession.h" 2014-10-18 12:19:05 +04:00
Ivan Sorokin
b2e3739da2 Replace include of <libtorrent/session.hpp> with forward declaration 2014-10-18 12:19:05 +04:00
Ivan Sorokin
c9b27e032b Remove inclusion of alertdispatch.h from qbtsession.h 2014-10-18 12:19:04 +04:00
Ivan Sorokin
83dd35dbc9 Make alertdispatcher.h self contained and replace include libtorrent/session with forward declaration 2014-10-18 12:19:04 +04:00
Ivan Sorokin
5ea1a4c3cc Remove inclusion of <QThread> from misc.h 2014-10-18 12:19:04 +04:00
Ivan Sorokin
be338b969c Remove unneccessary includes of libtorrent in misc.h 2014-10-18 12:19:04 +04:00
Gabriele
fc02b11f65 Don't stretch the last section in the transfer list
Since the content of some sections is right aligned, automatically
resizing the width of the last one to fill the header could be
sometimes undesired.

Let the user choose the width of each section and never change his
preference.
2014-10-15 16:22:33 +02:00
Gabriele
93abeb3643 Set minimum width of the left panel in the preferences
Change also the default width and set it to the minimum.
This minimum width prevents the horizontal scrollbar from appearing.

The size of the items in the list depends on the Qt style, so the
left panel could be few pixels larger than required with some of them.
2014-10-14 22:52:30 +02:00
Gabriele
5b7ee14416 Make Windows icons suitable for high dpi screens
The maximum size of the icons is now 256x256 pixels so that
Windows can correctly scale them.

The 256x256 layer for the main icon was created upscaling the
192x192 png available in the source tree. Hence, the icon might
not be perfect at the maximum size.

The icon for the file association was made from scratch and it's
visually similar to the previous icon.
2014-10-14 17:52:22 +02:00
sledgehammer999
f9dc945730 Merge pull request #2025 from BrunoReX/search_term
Fix search inconsistency between Python versions
2014-10-14 17:11:40 +03:00
Gabriele
becab3a013 Remove unneeded tooltip 2014-10-14 00:15:31 +02:00
Gabriele
616895b2c9 Increase maximum size of system icons
System icons were limited to a size 24x24 pixels, while the embedded
icons are 32x32 pixels big.
2014-10-13 18:54:05 +02:00
Bruno Barbieri
f288162e99 Fix search inconsistency between Python versions
Closes #2012
2014-10-13 07:42:06 -03:00
John S. Peterson
d27bff4df4 adding a save resume data interval option
because some SSD users oppose frequent disk writes
2014-10-12 20:14:09 +02:00
DoumanAsh
a62e30ea88 Pirate bay search engine update 2014-10-12 20:15:18 +04:00
sledgehammer999
0e0e8f7c27 Merge pull request #2005 from BrunoReX/python3_utf8
Fix search engine encoding issues with python3 on Windows
2014-10-12 19:06:34 +03:00
sledgehammer999
91e53971b2 Merge pull request #1997 from BrunoReX/torrentreactor_fix
Fix TorrentReactor search plugin
2014-10-12 17:12:22 +03:00
sledgehammer999
f50eac4c15 Merge pull request #2022 from sorokin/for-sledgehammer
a small optimization, a micro optimization and a fix
2014-10-12 17:06:34 +03:00
sledgehammer999
e10e2e1719 Change the program updater's URL for Windows and Mac OS X. Closes #1954. 2014-10-12 16:42:33 +03:00
Ivan Sorokin
b995a9d75e Fix race condition in QAlertDispatcher
It was possible that QAlertDispatcher::dispatch() could access (lock)
mutex that was destroyed by main thread. Fix this by moving mutex into a
tag.
2014-10-12 12:25:56 +04:00
Ivan Sorokin
333978f1ff Use std::vector instead of std::deque in QAlertDispatcher
As we never use {push,pop}_front std::vector works here perfectly.
Also reserve memory for std::vector out of lock.

This could be considered as an optimization, but in reality this is just
using right container in right place. According to my measurements total
speedup is under 0.2%.
2014-10-12 12:25:47 +04:00
Ivan Sorokin
d89d9c2f75 Fewer calls to torrent_handle::info_hash() 2014-10-12 12:09:52 +04:00
Bruno Barbieri
698e5ef0f1 Replace deprecated sgmllib with HTMLParser/html.parser 2014-10-05 18:04:10 -03:00
Bruno Barbieri
2bdfd140cb Fix search engine encoding issues with python3 on Windows
Closes #1996
2014-10-05 17:03:43 -03:00
Bruno Barbieri
dc8853cd87 Fix TorrentReactor search plugin 2014-10-04 07:20:42 -03:00
Ivan Sorokin
ddd2025968 Fix heap-buffer-overrun in PropertiesWidget::displayFilesListMenu 2014-10-01 23:20:01 +04:00
paolo-sz
b47fba49cc Correctly detect python in PATH 2014-09-25 09:28:58 +02:00
sledgehammer999
8408f56d6f Fix large cache support on amd64 arch pt2. 2014-09-21 14:01:58 +03:00
sledgehammer999
97419f840a Consider queued items before deciding to 'auto-shutdown on downloads completion'. Closes #1942. 2014-09-21 13:50:32 +03:00
sledgehammer999
0650d28da7 Merge pull request #1941 from Gelmir/magnet_redirect
Work around magnet redirection in feeds
2014-09-21 13:36:47 +03:00
sledgehammer999
88baa710fd Merge pull request #1947 from Gelmir/x64_cache_fix
Fix large cache support on amd64 arch
2014-09-21 13:11:32 +03:00
masux
f1e0ef87a4 This fix qbittorrent/qBittorrent#1949 2014-09-21 09:16:59 +02:00
Nick Tiskov
65f570b816 Fix large cache support on amd64 arch 2014-09-19 17:42:40 +04:00
Nick Tiskov
a7e445c575 Work around magnet redirection in feeds 2014-09-16 00:35:46 +04:00
sledgehammer999
94043e60c7 Merge pull request #1919 from masux/master
Fixed extratorrent.cc search engine.
2014-09-15 17:38:06 +03:00
Martin Janco
1290d7cac4 Fixed extratorrent.cc search engine. 2014-09-15 16:29:20 +02:00
sledgehammer999
79191b3f34 Sync translations from Transifex and run lupdate. 2014-09-15 00:33:21 +03:00
lojack5
ac3efb664a fix import torrent with "Keep incomplete torrents in:" ticked
* also had to account for "Append the label of the torrent to the save path",
  but again, this was only an issue when "Keep incomplete torrents in:" is
  selected

* A multi-file torrent with only one file (ie: a single file within a folder),
  was being treated as a single-file torrent, making it impossible to import.
  Multi-file torrent detection code was copied from libtorrent.  The
  information is available in libtorrent (under torrent_info::m_multifile),
  however it's a private member and I chose to go with copying the code that
  determines it, rather than modifying a library qBittorrent depends on.

Conflicts:
	src/torrentimportdlg.cpp
2014-09-15 00:05:13 +03:00
sledgehammer999
59379942ac Don't display the Search Engine tab by default. 2014-09-14 22:20:58 +03:00
sledgehammer999
b6d4030cd8 WINDOWS: Search first in PATH for python. Closes #956. 2014-09-14 22:20:57 +03:00
sledgehammer999
1144555eca WINDOWS: Can now correctly detect 64bit and 32bit python installations on 64bit Windows. Closes #1148 #445 #795 #1708. 2014-09-14 22:20:56 +03:00
sledgehammer999
574abc7cdb WINDOWS: Don't create keys in the registry if python isn't found. Closes #1370. 2014-09-14 22:20:55 +03:00
sledgehammer999
0799dc293c WINDOWS: Check for python before creating the search engine tab. Prevents the creation of python specific files in the user's PC if no python is found. Closes #1370. 2014-09-14 22:20:36 +03:00
sledgehammer999
5528f60a15 SMTP: send the local hostname as FQDN. See discussion in #1845 for more info. 2014-09-13 18:00:51 +03:00
sledgehammer999
f9aee5e3ab Forward declare classes where possible in 'TransferListWidget'. 2014-09-13 16:49:16 +03:00
sledgehammer999
baf9d21072 Show stalled downloads that are uploading under the 'Active' filter. Closes #1654." 2014-09-13 16:49:11 +03:00
diger
e7f1dacd6c Fix Qt5 support 2014-09-11 08:44:25 +06:00
sledgehammer999
cc4d17fbf0 Merge pull request #1819 from diger/haiku
Add patches for support Haiku (https://www.haiku-os.org)
2014-09-04 14:43:52 +03:00
diger
c22190fbf7 Add patches for support Haiku (https://www.haiku-os.org) 2014-09-04 13:23:16 +06:00
sledgehammer999
2a5393cf53 SMTP: Fix edge case where nothing was sent when no authentication was needed. Relates to #1845. 2014-09-02 17:31:44 +03:00
sledgehammer999
bf0ed595c7 Don't use IPv4 addresses when the user has enabled IPv6 address in the settings. 2014-09-02 14:45:42 +03:00
sledgehammer999
a708c642ef SMTP: Fix finding the local address. 2014-09-02 14:25:54 +03:00
sledgehammer999
487ca568b8 SMTP: Send the IP of the configured Network Interface. Relates to #1845. 2014-09-01 15:07:05 +03:00
sledgehammer999
54bf386794 SMTP: Support multiline greeting from server in INIT state. Thanks to Ivanov Juriy for helping identify the problem. Relates to #1845. 2014-08-31 14:32:09 +03:00
sledgehammer999
f22f7cf17a Fix available disk space label on single file torrents. 2014-08-31 00:05:38 +03:00
sledgehammer999
45e95e6cc2 Don't translate file extensions. Closes #1907. 2014-08-30 21:54:57 +03:00
sledgehammer999
94fc2f9c3d Don't display the context menu in 'Content' and 'HTTP Sources' buttons when no torrent is selected. It prevents crashes. Closes #1906, #1900. 2014-08-30 19:52:57 +03:00
sledgehammer999
de5ad05d0a Merge pull request #1902 from YuriIvanov/issue#1650
Add peer port column to PeerListWidget. Closes #1650.
2014-08-30 19:27:19 +03:00
sledgehammer999
11d39ba6ef Right align numerical values in the transfer list. Partially revert 51a9a9aab. Closes #1903. 2014-08-30 18:36:20 +03:00
Ivanov Juriy
d5f372fae8 Add peer port column to PeerListWidget. Closes #1650. 2014-08-30 15:28:59 +04:00
sledgehammer999
7753bc38e9 Merge pull request #1895 from YuriIvanov/issue#1845
add host address parameter to helo smtp request
2014-08-28 23:18:37 +03:00
sledgehammer999
495800d6e9 Possible fix for crash in RSS code. Closes #1901. 2014-08-28 19:00:57 +03:00
sledgehammer999
611bddf485 Merge pull request #1881 from benhutchins/feature-webui-safe
Fix Help menu links in WebUI
2014-08-28 18:29:42 +03:00
sledgehammer999
0b8fad69fa Option to disable connections not supported by proxies. Closes #1894. 2014-08-26 00:32:10 +03:00
sledgehammer999
cd99f0ea43 Don't disable DHT/LSD/UPnP in the GUI when anonymous mode is enabled. 2014-08-25 19:22:44 +03:00
Ivanov Juriy
a7ad34418f add host address parameter to helo smtp request 2014-08-25 14:26:30 +04:00
sledgehammer999
58ad90fa9c Set 'Cancel' as the default button in the shutdown confirmation dialog. 2014-08-23 23:22:47 +03:00
sledgehammer999
7c80277c04 Sync translations from Transifex and run lupdate. 2014-08-23 22:31:49 +03:00
sledgehammer999
f6156217d0 Added 'Shutdown now' button in shutdown confirmation dialog. Closes #969. 2014-08-23 22:22:03 +03:00
sledgehammer999
634000e7a9 Split ShutdownConfirmDlg into .h/.cpp files. 2014-08-23 21:55:38 +03:00
sledgehammer999
66b375de07 Don't listen on IPv6 address by default. Prevents network connectivity problems. Closes #1880. 2014-08-23 21:55:36 +03:00
Benjamin Hutchins
89fda12597 Removed essentially useless "Visit website" iframe and changed it to a regular link. Improves fix qbittorrent/qBittorrent#1343 2014-08-15 22:29:50 -04:00
Benjamin Hutchins
9143c440a5 Removed broken "Documentation" iframe from the webui. Improves fix qbittorrent/qBittorrent#1343 2014-08-15 22:29:50 -04:00
Benjamin Hutchins
afc5601697 Removed broken Report a bug iframe from the webui. fixes qbittorrent/qBittorrent#1343 2014-08-15 22:29:50 -04:00
sledgehammer999
2b061dab0a Sync translations from Transifex and run lupdate. 2014-08-15 13:52:14 +03:00
sledgehammer999
3e734ab4f6 Add 'Open' and 'Open Containing Folder' entries in the content's right-click menu. Closes #1143. 2014-08-15 12:53:18 +03:00
sledgehammer999
efb3936ef1 Fix the adding of .torrent files via http links which was broken by 30bc5a1da6. 2014-08-15 11:33:09 +03:00
sledgehammer999
12302ee86f Sort finished torrents by completed date when sorting by queue number. 2014-08-15 02:19:25 +03:00
sledgehammer999
bef61b695f Don't mix finished/unifinished torrents when sorting by ETA. Closes #1688. 2014-08-15 02:19:21 +03:00
sledgehammer999
e294b2f456 Added 'Ratio Limit' column. Closes #936. 2014-08-14 21:05:53 +03:00
sledgehammer999
e0190d5576 Add 'Completed' column. Closes #1241. 2014-08-14 20:22:02 +03:00
sledgehammer999
fe0df04ea8 Sync translations from Transifex and run lupdate. 2014-08-10 01:28:31 +03:00
sledgehammer999
35736b8bb4 Show disk space while retrieving metadata. Closes #1693. 2014-08-09 23:10:20 +03:00
sledgehammer999
36cba3b354 When qBT is launched with a magnet don't show it in the transferlist while the metadata are being loaded in the background. 2014-08-09 22:07:49 +03:00
sledgehammer999
30bc5a1da6 Show the loaded torrents in the transferlist when qBT is launched with a torrent/magnet and the AddNewTorrentDialog is showing. Closes #1564. 2014-08-09 21:15:17 +03:00
sledgehammer999
6cb7de33f6 Don't shrink transferlist rows when scrolling horizontally. Closes #1613. 2014-08-08 23:32:54 +03:00
sledgehammer999
061d4fc721 Revert "Fix WebUI sort by size/speed for some locales (with comma as decimal point)."
This reverts commit 87d118e87c.
2014-08-08 03:03:57 +03:00
sledgehammer999
2729abfd32 Revert "Fix WebUI sort by ratio for some locales (with comma as decimal point)."
This reverts commit c3942fb0b3.
2014-08-08 03:03:40 +03:00
sledgehammer999
d44df4f985 Don't localize double numbers in the webui. Closes #1525. 2014-08-08 02:59:48 +03:00
sledgehammer999
4908ed4e78 Run lupdate. 2014-08-08 00:12:42 +03:00
sledgehammer999
9819353c9d Sync translations from Transifex. 2014-08-08 00:11:26 +03:00
sledgehammer999
80d6a5a73e Allow disabling of OS cache. This will prevent RAM increases on Windows when seeding many files. Closes #1699. 2014-08-07 23:09:58 +03:00
sledgehammer999
7763a6d2d5 Limit max cache to 1800MiB for 32bits compiled binaries and to 4GiB for other. Closes #1698. 2014-08-07 23:09:57 +03:00
sledgehammer999
97cf824c4d Fix checkbox for 'Copy .torrent files to' setting, which was broken by b70621. Closes #1748. 2014-08-06 01:08:13 +03:00
sledgehammer999
6e6d285a02 Fix compilation on MACOS. 2014-08-05 14:54:28 +03:00
sledgehammer999
15d3df380c Migrate everything to use the new Preferences class and not access directly the qbittorrent.ini file.(webui) 2014-08-05 02:34:22 +03:00
sledgehammer999
d8d95d2195 Migrate everything to use the new Preferences class and not access directly the qbittorrent.ini file. 2014-08-05 02:34:21 +03:00
sledgehammer999
da6ce859c0 Cache preferences in memory. Closes #1272, #1523, #1694. 2014-08-05 02:33:50 +03:00
sledgehammer999
d0e0b25c9e Installer correctly associates torrents and magnet links with qBittorrent under non-admin accounts. Closes #291 #527 #579 #614 #964. 2014-07-30 00:09:57 +03:00
sledgehammer999
25c923c69e Merge pull request #1470 from glassez/assoc
Fix Windows file associations creation
2014-07-20 20:23:01 +03:00
sledgehammer999
8f32f86453 Merge pull request #1782 from sorokin/alert-disp-qt5
Fix alertdispatcher.cpp compilability on Qt5.
2014-07-20 20:21:29 +03:00
sledgehammer999
6e76d5cf41 Run lupdate. 2014-07-16 00:48:12 +03:00
sledgehammer999
eb3ca94172 Sync translations from Transifex. 2014-07-16 00:44:48 +03:00
sledgehammer999
e2748ec3ac Remove deprecated feature of separate DHT port. 2014-07-16 00:17:21 +03:00
sledgehammer999
08e14cdc26 Fix possible crashes. Closes #1814. 2014-07-14 22:00:40 +03:00
Bryan Roscoe
f6a324a1bd Scan Folder dialog now remembers last location
Also fix fs_utils spacing
2014-07-13 19:50:57 -05:00
Bryan Roscoe
27afbaf7e7 Fix column resizing issues 2014-07-13 17:03:58 -05:00
sledgehammer999
7419e930ab Indentation fixes. 2014-07-06 23:18:37 +03:00
sledgehammer999
d6d20074be Merge pull request #1447 from BrunoReX/hibernation
Add option to hibernate computer in Auto-Shutdown menu
2014-07-06 23:11:29 +03:00
sledgehammer999
9a18b50751 Some fixes for commit 6dabf50781. 2014-07-06 21:39:27 +03:00
sledgehammer999
3ad1cc8289 Merge pull request #1779 from sorokin/move-storage
Speedup and fix a bug in torrent moving.
2014-07-06 19:19:59 +03:00
Bruno Barbieri
00e09435b2 Add option to hibernate computer in Auto-Shutdown menu 2014-07-06 06:13:36 -03:00
Ivan Sorokin
6dabf50781 Speedup and fix a bug in torrent moving.
This commit implements a map where qbittorrent store a state of
current torrent movings. This commit speed up
torrents moving a bit and also fix a bug when qbittorrent doesn't do
cleanup action when a single torrent is moved several times without
waiting for a previous move to complete.

How it worked before.

Libtorrent has a function torrent_handle::move_storage() that allows to move a
torrent to a specific directory. This function is asynchorous. It means that
this function quits instantaneously and when the actual operation
completes the alert 'storage_moved_alert' or
'storage_moved_failed_alert' will be sent. The storage_moved_alert contains a
torrent_handle and a new path to where the torrent is moved.

During handling of storage_moved_alert, qbittorrent needs not only new path,
but also an old path to perform some of cleanup actions (like removing an old
folder if it is empty). This was achieved by storing a value named
'previous save path' in TorrentPersistentData. A previous save path is
written when move_storage() is issued and is read when
storage_moved_alert is received.

Problems.

This mechanism has two negative aspects:

1. TorrentPersistentData is very slow. As torrent_handle::move_storage() is asynchoronous,
TorrentPersistentData is responsible for more that 99.8% of time
QTorrentHandle::move_storage(). This percent could be higher when there
are lots of torrents and lower when there are few of them.

2. TorrentPersistentData stores only one previous path. But many
move_storage()'s could be issued without waiting for previous to
complete. Subsequent move_storage()'s overwrites previous save path of a
previous move.

A fix.

The fix is simple. Before issueing move_storage() the oldPath is stored in
a special map called 'torrentMoveStates'. When a storage_moved_alert
is received the map is consulted and an alert is handled.

When user moves torrent when previous moving have not yet finished, the
new location is saved in a field 'queuedPath' the same map. When
torrent moving is completed (or failed) qbittorrent attemps to perform
move again to the queued location.

Future direction.

This fix removes one slow read and one slow write to
TorrentPersistentData on torrent moving, but there is still exists
TorrentPersistentData::saveSavePath in handleStorageMovedAlert(), so
overall time for UI hang should be reduced only threefold. A speeding up
TorrentPersistentData should be addressed in a separate commit.

I don't know if I should clean up torrentMoveStates when torrent is
deleted. In any case, torrent could be deleted when corresponding alert
is in alert queue. So if we decide to clean up torrentMoveStates, then
we should not treat receiving alert from unknown torrent as a error.
2014-06-23 11:21:24 +04:00
Ivan Sorokin
ce9da1ba1e Fix alertdispatcher.cpp compilability on Qt5. 2014-06-23 00:14:58 +04:00
Ivan Sorokin
fddd337e34 Suppress warning about signed/unsigned mismatch. 2014-06-22 19:48:21 +04:00
sledgehammer999
273725d9dc Fix file renaming. 2014-06-18 23:41:52 +03:00
sledgehammer999
c673b1a7d7 Bring mainwindow in front when notification is clicked and other windows are in front. 2014-06-18 23:22:25 +03:00
sledgehammer999
7e9b47948b Run lupdate. 2014-06-10 23:22:39 +03:00
sledgehammer999
66c08bcc5d Sync translations from Transifex. 2014-06-10 23:19:43 +03:00
sledgehammer999
03072050fb Update search engines versions.txt file. Closes #1745. 2014-06-08 23:58:30 +03:00
sledgehammer999
d58d87a691 Use completed time from libtorrent directly. Closes #1726. 2014-06-07 14:44:08 +03:00
sledgehammer999
07f76f4939 Merge pull request #1733 from glassez/fix_build
Fix building with Qt5 (missing QObject decl).
2014-06-04 21:55:52 +03:00
sledgehammer999
a361c0ea03 Use the torrent_status for the queue_position too. 2014-06-04 20:26:23 +03:00
Vladimir Golovnev (Glassez)
446a9efe9e Fix building with Qt5 (missing QObject decl). 2014-06-04 17:38:35 +04:00
Vladimir Golovnev (Glassez)
ec092414b5 Fix Windows file associations creation.
Now qBittorrent create global ProgId during installation (using HKLM hive)
and allow to associate .torrent files with it (using HKCU).
2014-06-04 17:37:28 +04:00
Vladimir Golovnev (Glassez)
9f310318c2 Use new JSON parser/generator.
Qt4: Use QJson (http://qjson.sourceforge.net).
Qt5: Use native Qt JSON API.
2014-06-04 17:01:41 +04:00
Vladimir Golovnev (Glassez)
f9c3719d12 Add QJson files. 2014-06-04 17:01:40 +04:00
Vladimir Golovnev (Glassez)
6e59877cee Remove old JSON classes. 2014-06-04 17:01:39 +04:00
Vladimir Golovnev (Glassez)
268562bff3 Fix HTTP request parsing on Qt5. 2014-06-04 17:01:39 +04:00
Ivan Sorokin
510818d631 Replaced dynamic_cast with switch on alert type.
Conflicts:
	src/qtlibtorrent/qbtsession.cpp
2014-06-04 11:08:31 +04:00
Ivan Sorokin
1244a46cbb Extract alert handling to separate functions. 2014-06-04 11:08:31 +04:00
sledgehammer999
27c641ffaa Rework the GUI code for private torrents. 2014-06-04 00:49:03 +03:00
Ivan Sorokin
32c203d2e6 Copyright notices for alert dispatcher. 2014-06-04 01:40:00 +04:00
sledgehammer999
a6fa27467f Fix previous commits. 2014-06-03 21:19:25 +03:00
Ivan Sorokin
c2a23f2265 use stats_alert in TorrentSpeedMonitor
Conflicts:
	src/qtlibtorrent/qbtsession.cpp
2014-06-02 00:35:27 +04:00
Ivan Sorokin
6f38616193 extract torrent statistics from torrent speed monitor to separate file 2014-06-02 00:31:45 +04:00
Ivan Sorokin
b50d7331c7 use post_status_update()
Conflicts:
	src/qtlibtorrent/qbtsession.cpp
2014-06-02 00:31:45 +04:00
Ivan Sorokin
eb46326d23 use set_alert_dispatch instead of timer to get an alerts from libtorrent
libtorrent allows setting a custom dispatch handler that is invoked in
libtorrent thread when new alerts are incoming. QAlertDispatcher is a
class that allows to translate these alerts to UI thread.

The concept is very simple:

1. On initialization QAlertDispatcher constructor calls set_alert_dispatch() passing
 QAlertDispatcher::dispatch as argument.

2. On deinitialization destructor calls set_alert_dispatch() passing a empty
 function. (line 25) libtorrent handles thos and switches back to queuing
 alerts in queue.

3. QAlertDispatcher::dispatch() adds alert to queue and notifies UI thread that new
 alerts are incoming. Enqueuing is done in function enqueueToMainThread().
 The invariant of class is the following:

    if alert queue is not empty, in message loop of UI thread contains a queued
    invocation of deliverSignal().

4. When message loop is pumped UI thread execute deliverSignal() function.
 It emit appropriate signal and if queue is still not empty (for example
 if slot doesn't grab alerts) rewind enqueuing to main thread.

This is a idea. But here is some details.

1. When QAlertDispatcher is destoyed, libtorrent still can call
QAlertDispatcher::dispatch a few times after destruction. This is
handled by passing a "tag". A tag is a object that references QAlertDispatch.
Tag could be invalidated. So on destruction QAlertDispatcher invalidates a tag
and then unsubscribes from alerts. When QAlertDispatcher::dispatch is called
with invalid tag it simply discard an alert.

    Therefore we could drop a few alerts during unsubscription. So we unsubscribe
    only at exit when missing some alerts is not a problem.

2. Another problem is in QBtSession::saveFastResumeData(). It pumps alert
queue synchronously. My first attempt was to destroy QAlertDispatcher
and then pump libtorrent queue. But as I was afraid of losing alerts I
supported synchronous querying of alerts in QAlertDispatcher.
(QAlertDispatcher::getPendingAlerts)

Conflicts:
	src/qtlibtorrent/qbtsession.cpp
2014-06-02 00:31:45 +04:00
Ivan Sorokin
329b754197 cache torrent_status 2014-06-02 00:31:42 +04:00
Ivan Sorokin
5af778bc93 don't make the same request to TorrentModelItem twice 2014-05-25 12:32:09 +04:00
Ivan Sorokin
1c98c11dd0 speed up icon loading 2014-05-25 12:32:09 +04:00