Commit graph

1421 commits

Author SHA1 Message Date
Mike Tzou
9d135441db
Merge pull request #12942 from Chocobo1/cacheCountry
Cache country lookup result in PeerInfo class
2020-05-30 12:36:15 +08:00
Vladimir Golovnev (Glassez)
a6ad95278c
Fix invalid assertion
Closes #12938.
2020-05-29 09:35:19 +03:00
Chocobo1
472dd96716
Cache country lookup result in PeerInfo class
The country lookup happens quite often when "Resolve peer countries"
option is enabled.
2020-05-29 13:49:52 +08:00
an0n666
6d85ae8f62 Address some issues regarding private torrents 2020-05-26 14:18:15 +06:00
Vladimir Golovnev (Glassez)
f4efa530dc
Create header for common BitTorrent declarations 2020-05-25 20:32:35 +03:00
Vladimir Golovnev (Glassez)
4a1e3de06d
Find complete files when checking torrent 2020-05-25 20:31:59 +03:00
Vladimir Golovnev
dde7421f59
Merge pull request #12848 from jagannatharjun/move-icons
Move all icon resources in icons folder root
2020-05-19 07:39:55 +03:00
jagannatharjun
ab91d546e5 Move all icon resources to icon folder root 2020-05-18 20:30:51 +05:30
Mike Tzou
774c0276f0
Merge pull request #12847 from Chocobo1/deprecated
Don't use deprecated Qt function options
2020-05-18 11:41:11 +08:00
Chocobo1
7c8846fc53
Don't use deprecated QRegularExpression option
The following is the warning from compiler:
rss_item.cpp:70:79: warning: ‘QRegularExpression::OptimizeOnFirstUsageOption’ is deprecated: This option does not have any effect since Qt 5.12 [-Wdeprecated-declarations]
2020-05-16 21:05:15 +08:00
Vladimir Golovnev
306499f7a8
Merge pull request #12843 from glassez/fix-rename-rule
Fix renaming RSS autodownload rule
2020-05-15 21:40:23 +03:00
Vladimir Golovnev (Glassez)
1b5dd0aa2d
Fix renaming RSS autodownload rule 2020-05-15 09:41:40 +03:00
Vladimir Golovnev
841536c9c5
Merge pull request #12805 from glassez/move-storage
Wait for storage to be moved when removing torrent
2020-05-12 07:34:45 +03:00
Chocobo1
be152f45c9
Define and use Http::HeaderMap type 2020-05-11 00:34:28 +08:00
Vladimir Golovnev (Glassez)
53fd0e1607
Wait for storage to be moved when removing torrent 2020-05-10 14:31:33 +03:00
Chocobo1
d57b9be706
Rename function 2020-05-10 02:53:32 +08:00
Chocobo1
74a2168bc1
Define and use a proper HTTP header structure 2020-05-10 02:53:11 +08:00
Vladimir Golovnev (Glassez)
378a863611
Remove unwanted files after torrent removed 2020-05-09 19:19:13 +03:00
Vladimir Golovnev (Glassez)
e49c554044
Improve "move torrent storage" queue 2020-05-09 19:19:13 +03:00
Vladimir Golovnev (Glassez)
b6bf09fc0f
Fix calculation of torrent current state
Some actions can be performed despite of other states
(e.g. "Errored" torrent can check its files currently)
so the states that relate to such actions should override
other (so-called "static") states.
2020-05-09 19:19:13 +03:00
Vladimir Golovnev (Glassez)
a8c333ff25
Drop "private" subfolders
"private" subfolders violate the structure of the project,
since the existence of all other subfolders is based on a
different principle.
In addition, there is no clear line between "private" and
"non private".
2020-05-08 14:59:18 +03:00
Vladimir Golovnev (Glassez)
642bf7b8a6
CMake: Don't split GUI code into several libraries 2020-05-01 17:03:00 +03:00
Mike Tzou
2aa80fe9ba
Merge pull request #12689 from thalieht/subfolder
Rename "Create subfolder" option to "Keep subfolder"
2020-05-01 14:09:17 +08:00
Chocobo1
5ca26516eb
Handle empty piece range properly
Related: #12677.
2020-04-30 13:18:57 +08:00
Chocobo1
f6eb341b32
Clean up code 2020-04-30 13:18:24 +08:00
Mike Tzou
4f820163ff
Merge pull request #12691 from Chocobo1/iterator
Support range-based iteration in IndexRange class
2020-04-30 13:10:13 +08:00
Mike Tzou
7061242681
Merge pull request #12176 from NotTsunami/ssl
Add HTTPS tracker certificate validation option
2020-04-30 13:09:31 +08:00
Chocobo1
6d167e9a28
Remove const from class variables
It prohibits copy construction, copy assignment and move semantics.
2020-04-29 21:32:34 +08:00
Chocobo1
21581141f6
Support range-based iteration in IndexRange class 2020-04-29 21:15:24 +08:00
thalieht
1bdffe1729 Rename "Create subfolder" to "Keep top-level folder"
Closes #12673
2020-04-29 03:09:38 +03:00
Mike Tzou
7bc572afb9
Merge pull request #12602 from Chocobo1/metatype 2020-04-24 22:13:27 +08:00
Vladimir Golovnev
4b897e7702
Merge pull request #12603 from glassez/fix-crash
Fix crash when torrent is deleted on limit reached
2020-04-24 07:45:35 +03:00
Vladimir Golovnev (Glassez)
22bda12d6c
Fix crash when torrent is deleted on limit reached 2020-04-23 16:56:53 +03:00
Chocobo1
9efd5eaed3
Register datatype properly
Qt 5.9.5 doesn't seem to recognize it, this patch fixes it.
Fix up: d8401c76f5.
Related: #12601.
2020-04-23 21:42:51 +08:00
Chocobo1
bb80b378c1
Add ability to send custom HTTP headers 2020-04-23 12:13:01 +08:00
NotTsunami
cc1ebbf379 Add HTTPS tracker certificate validation option
This commit adds a new libtorrent setting to validate HTTPS tracker
certificates. When enabled, libtorrent will validate the certificate
of HTTPS trackers against the system's certificate store. This option
is only enabled on libtorrent versions >= 1.2.6 and on non-Windows
systems, as OpenSSL does not use the system's certificate store on
Windows.
2020-04-22 15:50:17 -04:00
sledgehammer999
f758b24486
Merge pull request #12487 from an0n666/no-localhost-on-invalid
Use configured net interface even when it is missing
2020-04-22 17:49:08 +03:00
an0n666
e3e5da7a71 Use configured net interface even when it is missing 2020-04-21 19:04:43 +06:00
Chocobo1
1b80890696
Reduce padding in class
TorrentHandleImpl size is reduced from 768 bytes to 736 bytes.
CreateTorrentParams size didn't change.
Size numbers are from x64.
2020-04-19 11:44:41 +08:00
Chocobo1
ac2d063add
Move initialization default values to header 2020-04-19 11:42:49 +08:00
Mike Tzou
30ce2dfdf3
Merge pull request #12530 from Chocobo1/logger
Reduce padding in structure
2020-04-19 10:17:18 +08:00
Mike Tzou
b06d44b242
Merge pull request #12526 from Chocobo1/pr_12162
Change default upload slot choking limits
2020-04-19 10:17:04 +08:00
Mike Tzou
349a07a443
Merge pull request #12531 from Chocobo1/final
Add final specifier to classes
2020-04-19 10:16:44 +08:00
sledgehammer999
a17b1f2b78
Use static_cast for explicit type conversions 2020-04-18 18:22:40 +03:00
Chocobo1
648d44d9b9
Reduce padding in structure
Log::Msg originally takes 32 bytes, now shrinks to 24 bytes.
Log::Peer originally takes 40 bytes, now shrinks to 32 bytes.
2020-04-18 18:33:46 +08:00
Chocobo1
d3d3f7dbb3
Add final specifier to classes
This allow compilers to generate more efficient code.
2020-04-17 13:18:40 +08:00
Vladimir Golovnev
2681093d27
Merge pull request #12513 from glassez/torrent-impl
Split TorrentHandle interface and implementation
2020-04-17 07:40:28 +03:00
Mike Tzou
a5fe96f793
Merge pull request #12458 from jagannatharjun/log
Convert the Log widget to use custom View/Model
2020-04-17 11:27:35 +08:00
Vladimir Golovnev (Glassez)
1132b84548
Split TorrentHandle interface and implementation 2020-04-16 20:22:26 +03:00
an0n666
ec6b249509
Change default upload slot choking limits 2020-04-16 23:46:48 +08:00
jagannatharjun
fd89717330 Convert the Log widget to use custom View/Model
Co-authored-by: sledgehammer999 <hammered999@gmail.com>
2020-04-15 22:18:00 +05:30
Mike Tzou
e030fc067b
Merge pull request #12422 from an0n666/increase-timeout
Change default stop_tracker_timeout settings
2020-04-15 11:44:29 +08:00
an0n666
1168387df0 Change default stop_tracker_timeout settings 2020-04-13 16:05:36 +06:00
Raif Atef
1549b782e6 Do not use 0.0.0.0 or [::] for outgoing interfaces
Fixes #12443
2020-04-12 08:41:18 +02:00
Mike Tzou
c25b3e623c
Merge pull request #12423 from an0n666/remove-strict-superseeding
Remove deprecated strict super seeding mode from advanced settings
2020-04-12 00:41:28 +08:00
Mike Tzou
43e5e242ff
Merge pull request #12450 from Chocobo1/noBuffer
Avoid holding encoded resume data in memory
2020-04-09 13:21:32 +08:00
Chocobo1
e7890fb727
Preallocate output buffer 2020-04-08 13:06:39 +08:00
Chocobo1
d476ae4f14
Fix header inclusion order 2020-04-08 11:58:12 +08:00
Vladimir Golovnev
eb0295197c
Merge pull request #12301 from jozsefsallai/master
Better Python path detection on Windows
2020-04-07 22:29:26 +03:00
Chocobo1
d8401c76f5
Avoid holding encoded resume data in memory
Now it the encoded resume data will be streamed to file instead of a
temporary buffer holding the whole of it.
2020-04-07 16:02:09 +08:00
Vladimir Golovnev
fe81633403
Merge pull request #12436 from glassez/fix-savepath
Save "resume data" when torrent storage is moved
2020-04-07 09:54:51 +03:00
an0n666
026aad2c04 Remove deprecated strict super seeding mode from advanced settings 2020-04-07 09:54:32 +06:00
Mike Tzou
f58f425175
Merge pull request #12430 from rwasef1830/add-outgoing-interfaces
Fix outgoing interfaces not getting assigned in case addr is not null.
2020-04-07 10:10:32 +08:00
Raif Atef
bf1c9e34d7 Fix outgoing interface is not getting assigned
Assignment was missing in main branch of condition statement.
Closes https://github.com/qbittorrent/qBittorrent/issues/12421
2020-04-06 14:45:44 +02:00
Vladimir Golovnev (Glassez)
0a8c2f75af
Save "resume data" when torrent storage is moved 2020-04-06 12:16:27 +03:00
Mike Tzou
26941a5b02
Merge pull request #12427 from Chocobo1/io
Avoid inefficient behavior
2020-04-06 12:13:30 +08:00
Mike Tzou
3021b99a50
Merge pull request #12420 from Chocobo1/locale
Sort locale language list
2020-04-06 12:12:50 +08:00
Mike Tzou
cc090c8e37
Merge pull request #12416 from NotTsunami/master
Set disk cache size for older libtorrent versions
2020-04-06 12:12:12 +08:00
Chocobo1
2fa6a7f6f5
Avoid inefficient behavior
Since the class needs to be copy-constructible, there may be many
copies of an instance. So instead of writing to the device on every
destructor call, only flush buffer on the last destructor call.
2020-04-06 01:04:12 +08:00
Chocobo1
5eaedb13e5
Sort locale language list 2020-04-05 19:21:37 +08:00
NotTsunami
e48612a703 Set disk cache size for older libtorrent versions
Libtorrent versions older than 1.2.6 have a bug when setting disk
cache size to auto.

See 6c880159c9.
2020-04-04 21:36:01 -04:00
Mike Tzou
a10cee0f2b
Merge pull request #12364 from Chocobo1/fileOutIter
Avoid holding entire file in memory
2020-04-04 11:07:59 +08:00
Chocobo1
9f281c2d25
Avoid holding entire file in memory
Previously we need a file buffer that is as large as the file size and
this could be a problem when user has less free memory available or
having very large data. Now with the help of `FileOutputIterator`,
we can have a much smaller, fixed size immediate file buffer and also
the code looks nice with `lt::bencode()`.
2020-04-03 18:27:13 +08:00
Chocobo1
17f608685d
Improve logging for errors
This commit also allows the strings to be translated.
2020-04-02 11:20:09 +08:00
József Sallai
f9564564f8 Detect python3 executable on Windows 2020-04-02 00:31:41 +03:00
Vladimir Golovnev
96c5af7ae9
Merge pull request #12363 from glassez/fix-unexpected-resume
Fix unexpected torrent resume after app restart
2020-04-01 20:20:44 +03:00
Vladimir Golovnev (Glassez)
8bd9a97f6f
Fix unexpected torrent resume after app restart
Closes #12322.
2020-04-01 18:01:18 +03:00
sledgehammer999
bbe5465ba6
Merge pull request #12317 from sledgehammer999/fix_broken_save_path
Fix broken UNC paths in fastresumes on Windows
2020-03-31 18:34:31 +03:00
sledgehammer999
13af503003
Fix broken UNC paths in fastresumes on Windows
See #12245 and #12282
2020-03-30 15:21:15 +03:00
Mike Tzou
59f99bb984
Merge pull request #12282 from Tester798/fix-12245
Fix regression when fastresume contains network path
2020-03-30 12:53:17 +08:00
Mike Tzou
8a8607bf93
Merge pull request #12175 from NotTsunami/upnp
Add UPnP lease duration advanced option
2020-03-29 12:29:10 +08:00
NotTsunami
6b4925d222 Add UPnP lease duration advanced option
This is a new setting added that is pending addition to
libtorrent 1.2.6. This setting is important because some routers do
not support expiration times on port-maps and do not return an error
either, silently failing. The previous default of permanent leases is
retained.
2020-03-28 00:32:32 -04:00
Mike Tzou
82c23e67a4
Merge pull request #12299 from Chocobo1/initialize
Initialize struct variables
2020-03-28 10:53:38 +08:00
Mike Tzou
c6e26f5dd0
Merge pull request #12232 from Chocobo1/warning
Add logging for SOCKS5 proxy errors
2020-03-27 22:22:13 +08:00
Chocobo1
af430d6635
Initialize struct variables
clang static analyzer was emitting some warning about uninitialized
variable usage and this patch fixes it.
2020-03-27 16:01:01 +08:00
Mike Tzou
c0b0c6dcfc
Merge pull request #12259 from Chocobo1/dtor
Rely on Qt ownership to free resources
2020-03-27 01:06:39 +08:00
Tester798
1c6b4c0a79 Fix regression when fastresume contains network path
Closes #12245 after regression was introduced in #11785.
2020-03-26 18:54:13 +02:00
Chocobo1
54a685e953
Add logging for SOCKS5 proxy errors 2020-03-26 21:51:05 +08:00
Chocobo1
9630e7b689
Rely on Qt ownership to free resources
The m_reply has already changed parent in
DownloadHandlerImpl::assignNetworkReply() and thus we can rely on Qt
ownership to delete the object.
2020-03-26 14:39:18 +08:00
Chocobo1
7de8a4d6e0
Construct QString more efficiently 2020-03-25 12:00:11 +08:00
Chocobo1
2c23840947
Allow to translate error messages 2020-03-25 12:00:11 +08:00
Mike Tzou
ab30cfcdb0
Merge pull request #12207 from FranciscoPombal/fix-webapi
WebAPI: fix matching uncategorized torrents
2020-03-22 21:23:56 +08:00
FranciscoPombal
7d24e1c063 WebAPI: fix matching uncategorized torrents
Closes #11748.
2020-03-22 03:49:06 +00:00
Mike Tzou
f44f1ffc97
Merge pull request #12206 from thalieht/monitoredTMM
Disable Auto TMM when not using default savepath from monitored folder
2020-03-21 12:23:40 +08:00
thalieht
598c856c88 Disable Auto TMM when not using default savepath from monitored folder 2020-03-19 21:13:44 +02:00
Vladimir Golovnev
c323f64c96
Merge pull request #12188 from thalieht/queuemove
Append new move storage job to queue
2020-03-17 07:18:27 +03:00
thalieht
18289f2395 Append new move storage job to queue
fixup e4ff206e3c
2020-03-16 22:39:31 +02:00
Chocobo1
6c307774f1
Get library version strings at runtime
We mostly use boost in header-only mode, so it is a non-trivial job to
get the version string at runtime.
2020-03-16 21:27:42 +08:00
Vladimir Golovnev
5127156ba4
Merge pull request #12035 from glassez/move-storage
Move torrent storages one by one
2020-03-13 15:59:05 +03:00
Mike Tzou
dc4e9e3779
Merge pull request #11813 from Chocobo1/python
Drop python2 support
2020-03-07 10:18:45 +08:00
Mike Tzou
73ee901c45
Merge pull request #12113 from Chocobo1/smart_ptr
Use helper functions to construct smart pointers
2020-03-06 13:12:41 +08:00
Chocobo1
290d198977
Use proper type for piece index 2020-03-06 01:47:28 +08:00
Chocobo1
2157e500ef
Use helper functions to construct smart pointers 2020-03-05 19:32:28 +08:00
Mike Tzou
ca01b049a6
Merge pull request #12108 from Chocobo1/bits
Avoid unnecessary memory writes
2020-03-04 23:50:12 +08:00
Mike Tzou
949daf6c73
Merge pull request #12037 from an0n666/seed-mode-fix
Check if file exists in seed mode
2020-03-04 23:49:47 +08:00
an0n666
f7d2085b0a Check if file exists in seed mode 2020-03-04 17:38:00 +06:00
Chocobo1
24cd7c3611
Avoid unnecessary memory writes
Before this change, qbt spent ~1% in these two functions, now it
only spends about ~0.5% in my naive testing.
2020-03-04 03:18:39 +08:00
Vladimir Golovnev
b519ece18b
Merge pull request #12095 from glassez/resume-torrent
Let libtorrent decide whether to resume a torrent
2020-03-01 19:54:16 +03:00
Vladimir Golovnev (Glassez)
74884d57ec
Let libtorrent decide whether to resume a torrent 2020-03-01 08:08:01 +03:00
Mike Tzou
9649c2a163
Merge pull request #12043 from FranciscoPombal/fix-embedded-tracker
Fix embedded tracker
2020-02-27 21:06:58 +08:00
Vladimir Golovnev
4d2943a782
Merge pull request #12033 from glassez/save-torrent
Allow to save downloaded metadata as torrent file
2020-02-27 08:49:40 +03:00
FranciscoPombal
966f891d91 Fix response to event=stopped
BEP-3 says all tracker responses to valid announce requests should be bencoded dictionaries with at least the "peers" and "interval" keys; the "peers" key can be empty.

Also clarify support for BEP-21.
2020-02-26 20:47:33 +00:00
FranciscoPombal
af6f63f82c Don't use IPv4-mapped IPv6
Always register peers with either IPv4 or IPv6.
Fixes potential connection issues.

Also clarify related BEP-24 support.
2020-02-26 20:44:09 +00:00
FranciscoPombal
abc69dfd20 Fix BEP-23 support
The embedded tracker was returning a non-compliant response.
The peer lists should be packed strings instead of lists.

Also clarify level of compliance with BEP-7.
2020-02-26 20:42:14 +00:00
FranciscoPombal
9f045500d1 Fix IPv6 endianness 2020-02-26 20:42:07 +00:00
Vladimir Golovnev (Glassez)
e4ff206e3c
Move torrent storages one by one 2020-02-26 10:20:04 +03:00
Vladimir Golovnev (Glassez)
dd0cee44c1
Allow to save downloaded metadata as torrent file 2020-02-26 08:10:11 +03:00
FranciscoPombal
dc6a56afcb Revert using random port by default
Revert change introduced in https://github.com/qbittorrent/qBittorrent/pull/11637 and also revert the associated follow-up https://github.com/qbittorrent/qBittorrent/pull/12000.

Reason: https://github.com/arvidn/libtorrent/pull/4335
2020-02-21 14:47:37 +00:00
sledgehammer999
193da7f2f9
Merge pull request #12014 from sledgehammer999/alt_IP_db_provider
Use IP geolocation database by DB-IP instead of MaxMind
2020-02-18 17:05:52 +02:00
sledgehammer999
ea1481beef
Use IP geolocation database by DB-IP instead of MaxMind
Closes #11792
2020-02-18 16:11:28 +02:00
Mike Tzou
bf6a88b3d2
Merge pull request #12021 from Chocobo1/trackerentry
Simplify TrackerEntry::status() logic
2020-02-18 02:22:05 +08:00
Chocobo1
e825473289
Simplify TrackerEntry::status() logic 2020-02-17 18:46:30 +08:00
sledgehammer999
322ae3e0bc
Merge pull request #11825 from FranciscoPombal/stalled_filter
Add stalled filters to GUI and Web API/UI
2020-02-16 18:32:37 +02:00
Mike Tzou
04132f6266
Merge pull request #11999 from an0n666/fix-not-contacted-tracker
Do not list not contacted trackers as error
2020-02-16 20:27:41 +08:00
an0n666
8423f43209 Do not list not contacted trackers as error 2020-02-15 19:44:14 +00:00
sledgehammer999
385d7247b7
Merge pull request #12016 from Chocobo1/errMsg
Include resume folder path in exception message
2020-02-15 19:41:39 +02:00
Vladimir Golovnev
362305f339
Merge pull request #12013 from glassez/fix-rss
Don't access download handler after it's finished
2020-02-15 07:02:59 +03:00
Mike Tzou
dbea2d95f9
Merge pull request #12004 from Chocobo1/authCount
Add configurable ban options for WebUI
2020-02-15 09:43:16 +08:00
Chocobo1
45c357dfe2
Include resume folder path in exception message
The message in RuntimeError exception will be displayed to the users and
users would be clueless if we don't show the path.
2020-02-15 02:48:55 +08:00
Chocobo1
6eb190c373
Expose WebUI ban duration to users 2020-02-14 16:23:30 +08:00
Vladimir Golovnev (Glassez)
3762514662
Don't access download handler after it's finished 2020-02-14 08:24:49 +03:00
Chocobo1
f88d6b2e55
Expose WebUI ban counter to users 2020-02-14 12:31:12 +08:00
Tester798
58711cbe7e Fix portable mode
Try to fix portable mode bug. Closes #11706, #11178, #7765.
2020-02-12 19:56:25 +02:00
Mike Tzou
316f34cbf5
Merge pull request #11994 from Chocobo1/profile
Unify singleton pattern in Profile class
2020-02-12 23:59:47 +08:00
Chocobo1
5de75eff05
Unify singleton pattern in Profile class
1. Use unified function names `initInstance()` and `freeInstance()` and
make them public.
2. Add `freeInstance()` to avoid noise from memory leak detectors.
3. Let `instance()`return a pointer directly to avoid unnecessary
indirections when invoking functions.
2020-02-11 15:30:59 +08:00
Vladimir Golovnev (Glassez)
8bb34482ea
Handle HTTP redirections manually
Qt doesn't support Magnet protocol so we need to handle all redirections
manually to allow redirections to Magnet URIs.
2020-02-11 09:31:42 +03:00
Chocobo1
baa13c044a
Drop python2 support
Closes #11811.
2020-02-08 12:36:45 +08:00
Chocobo1
a6cdba17f0
Fix singleton class ownership
We shouldn't allow Qt parent ownership in here.
2020-02-07 15:34:04 +08:00
NotTsunami
6748e8d787 Remove redundant null checks
Attempting to delete a null pointer is a noop in C++.

Closes #2864.

[1] https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null
2020-02-03 16:38:51 -05:00
Chocobo1
b2ab6c1858
Let ReverseResolution always return/emit a result 2020-01-30 19:24:18 +08:00
Chocobo1
a2ebd77eac
Manually abort lookup on class destruction
Some lookup might take longer so instead of waiting them, we abort them
manually.
2020-01-30 14:11:03 +08:00
Chocobo1
86e3d0d816
Improve ReverseResolution class
* Use QHostAddress type for IP
* Avoid double lookup
* Use larger cache size
2020-01-30 14:11:03 +08:00
Mike Tzou
11bea8d393
Merge pull request #11918 from thalieht/peerssameip
Show any multiple connections from the same IP in peer list
2020-01-30 12:59:17 +08:00
thalieht
5f415c292d Show any multiple connections from the same IP in peer list
The uniqueness of peers is now determined by their
IP, port and connection type (uTP etc.) instead of just their IP
2020-01-29 20:40:10 +02:00
Chocobo1
5905c085c6
Use systematic approach to generate hash
The basic idea is to hash each class member and then mix them with xor
operation.
However the `seed` must be handled with care, it should only be
introduced once when mixing the hashes of each class member, otherwise
under some circumstances the `seed` might xor with itself and thus break
the intended effect.
2020-01-27 18:14:27 +08:00
Chocobo1
1740f968df
Revise qHash function
Instead of xor and narrowing the integers ourselves, now we let qHash()
from Qt do the job properly.
2020-01-27 12:53:22 +08:00
Chocobo1
2b4490d8a7
Use faster hash function
qHash(QString) will need to hash/loop through all the data while the new
code will only need one memcpy() and a few bit manipulations.
2020-01-27 12:53:13 +08:00
Vladimir Golovnev
89e72b38ea
Merge pull request #11881 from glassez/extension
Simplify torrent startup handling
2020-01-22 06:11:33 +03:00
Vladimir Golovnev (Glassez)
f2285e1b63
Redesign torrent startup handling 2020-01-21 10:14:59 +03:00
Chocobo1
3fce1db2eb
Migrate away from deprecated settings
Libtorrent has deprecated `upnp_ignore_nonrouters` in
https://github.com/arvidn/libtorrent/pull/4251
2020-01-16 23:44:54 +08:00