1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-07 09:52:18 +02:00

Compare commits

...

1567 Commits

Author SHA1 Message Date
sledgehammer999
2c65b79640 Bump to 4.2.5 2020-04-25 00:29:44 +03:00
sledgehammer999
1ef504631d Update Changelog 2020-04-25 00:25:01 +03:00
sledgehammer999
5468f10184 Bump Web API version 2020-04-25 00:21:06 +03:00
sledgehammer999
5e249c4898 Sync translations from Transifex and run lupdate 2020-04-25 00:11:49 +03:00
Chocobo1
c67d863c93 Register datatype properly
Qt 5.9.5 doesn't seem to recognize it, this patch fixes it.
Fix up: d8401c76f5.
Related: #12601.
2020-04-25 00:01:49 +03:00
Sepro
6e375a38ef WebAPI: Change delimiter from string to char in preferences API 2020-04-25 00:01:47 +03:00
Sepro
0f6768f6ad WebAPI: Expand RSS related API
Added markAsRead API method with optional parameter for specifying single article.
Added the rss_smart_episode_filters and rss_download_repack_proper_episodes keys to preference api.
Added matchingArticles API method for retrieving articles that match specified rule.
2020-04-25 00:01:46 +03:00
Vladimir Golovnev (Glassez)
bdeb662cb0 Fix crash when torrent is deleted on limit reached 2020-04-25 00:01:44 +03:00
Chocobo1
b9b06d5384 Suppress misleading warning message
QString::split() was giving a non-empty QStringList, and
that caused Session::setBannedIPs() to emit misleading warning message.
2020-04-25 00:01:43 +03:00
Chocobo1
6a174b594b Add ability to send custom HTTP headers 2020-04-25 00:01:41 +03:00
schnurlos
f7cd5ac7c7 NSIS: Update german translation 2020-04-25 00:01:21 +03:00
sledgehammer999
50f676c305 Bump to 4.2.4 2020-04-22 18:49:52 +03:00
sledgehammer999
7103ae73cd Update Changelog 2020-04-22 18:46:15 +03:00
sledgehammer999
7d4b8b010f Sync translations from Transifex and run lupdate 2020-04-22 18:45:26 +03:00
an0n666
09bf033226 Use configured net interface even when it is missing 2020-04-22 18:19:33 +03:00
NotTsunami
4e62608802 WebUI: Fix UPnP lease duration get/set
Add missing setProperty and getProperty calls for the new UPnP lease
duration setting.

Fixes 6b4925d222.
Closes #12566.
2020-04-22 18:19:32 +03:00
Chocobo1
37b29bf91a Reduce ambiguity for selecting icons
Related: #12554.
2020-04-22 18:19:31 +03:00
thalieht
d67037136b Don't uncheck Authentication checkbox when changing proxy type
Closes #12525
2020-04-22 18:19:29 +03:00
thalieht
73292137b7 Make a few cosmetic changes in code 2020-04-22 18:19:28 +03:00
C.W. Betts
56f7a4e803 Update Info.plist
Wrap the UTTypeTagSpecifications in arrays, as Xcode does.
2020-04-22 18:19:26 +03:00
Chocobo1
1cea6a25af Add final specifier to GUI classes
Follow up d3d3f7dbb3.
2020-04-22 18:19:23 +03:00
Chocobo1
ebc704ef14 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-22 18:19:22 +03:00
Chocobo1
a2a1a78f44 Move initialization default values to header 2020-04-22 18:19:21 +03:00
Chocobo1
3a54d574b0 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-22 18:19:20 +03:00
an0n666
d0be71c225 Change default upload slot choking limits 2020-04-22 18:19:19 +03:00
Chocobo1
7c04b4acd8 Add final specifier to classes
This allow compilers to generate more efficient code.
2020-04-22 18:19:18 +03:00
sledgehammer999
eda3747c08 Use static_cast for explicit type conversions 2020-04-22 18:19:17 +03:00
sledgehammer999
7d23ea1f80 TravisCI: Use libtorrent with deprecated functions disabled for Linux builds 2020-04-22 18:19:16 +03:00
Vladimir Golovnev (Glassez)
698ee94d0b Split TorrentHandle interface and implementation 2020-04-22 18:19:14 +03:00
jagannatharjun
65d1b588d9 Convert the Log widget to use custom View/Model
Co-authored-by: sledgehammer999 <hammered999@gmail.com>
2020-04-22 18:19:13 +03:00
an0n666
eea693979a Change default stop_tracker_timeout settings 2020-04-22 18:19:12 +03:00
Raif Atef
654bf85a71 Do not use 0.0.0.0 or [::] for outgoing interfaces
Fixes #12443
2020-04-22 18:19:11 +03:00
an0n666
8706a7c973 Remove deprecated strict super seeding mode from advanced settings 2020-04-22 18:19:10 +03:00
Chocobo1
439a2ef597 Fix date format for "Last seen complete"
Closes #12462.
2020-04-22 18:19:08 +03:00
Sepro
c5a7aa7668 Fix unable to add multiple peers in WebUI
Wrong delimiter was used.
2020-04-22 18:19:07 +03:00
Chocobo1
e5bf83a594 Preallocate output buffer 2020-04-22 18:19:06 +03:00
Chocobo1
2a3e64933b Fix header inclusion order 2020-04-22 18:19:05 +03:00
Chocobo1
35f8af32a3 Suppress unused variable warning on macOS 2020-04-22 18:19:04 +03:00
Chocobo1
37354a9e29 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-22 18:19:02 +03:00
József Sallai
7cb14e2a5b Detect python3 executable on Windows 2020-04-22 18:19:01 +03:00
Vladimir Golovnev (Glassez)
4aae7266a5 Save "resume data" when torrent storage is moved 2020-04-22 18:19:00 +03:00
Raif Atef
075245c915 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-22 18:18:59 +03:00
adem
476707cc80 Remove white outline around mascot.png 2020-04-22 18:18:58 +03:00
Chocobo1
7b0b5e3d7f 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-22 18:18:56 +03:00
Chocobo1
4142722303 Sort locale language list 2020-04-22 18:18:55 +03:00
NotTsunami
8ebb11f981 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-22 18:18:54 +03:00
Chocobo1
80016db781 Fix wrong logic that disables "prevent sleeping" timer
Also update power management state early so we don't need to wait for
the timer timeout to have the effect.
2020-04-22 18:18:53 +03:00
Chocobo1
a9f43bd5d2 Clean up coding style 2020-04-22 18:18:52 +03:00
Chocobo1
2f0c3f047a 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-22 18:18:50 +03:00
Vladimir Golovnev (Glassez)
f40a36ecb3 Fix sub-sorting of Transfer list
Closes #12330.
2020-04-22 18:18:50 +03:00
Chocobo1
a1ee1c0448 Remove redundant type attribute
It already defaults to `text/css` if value is absent (in HTML5).
2020-04-22 18:18:49 +03:00
Chocobo1
939f83bdd5 Fix mismatch ID 2020-04-22 18:18:48 +03:00
Chocobo1
e98a887286 Improve logging for errors
This commit also allows the strings to be translated.
2020-04-22 18:18:37 +03:00
sledgehammer999
29e9594859 Bump to 4.2.3 2020-04-02 00:19:58 +03:00
sledgehammer999
e881a42368 Update Changelog 2020-04-02 00:19:54 +03:00
Vladimir Golovnev (Glassez)
67c6107892 Fix unexpected torrent resume after app restart
Closes #12322.
2020-04-02 00:17:45 +03:00
sledgehammer999
ea66edd1cb Sync translations from Transifex and run lupdate 2020-04-01 17:42:06 +03:00
Vladimir Golovnev (Glassez)
cb444978ef Prevent multiple instances for the same app config 2020-04-01 17:18:39 +03:00
sledgehammer999
2794e883b6 Fix broken UNC paths in fastresumes on Windows
See #12245 and #12282
2020-04-01 17:18:38 +03:00
Tester798
e86249a4e8 Fix regression when fastresume contains network path
Closes #12245 after regression was introduced in #11785.
2020-04-01 17:18:37 +03:00
NotTsunami
6f45764629 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-04-01 17:18:36 +03:00
LameLemon
5250a8be42 Add alt and title tags for WebUI footer
Improves accessibility of the WebUI. Closes #12219.
2020-04-01 17:18:35 +03:00
Chocobo1
f3d878324b Initialize struct variables
clang static analyzer was emitting some warning about uninitialized
variable usage and this patch fixes it.
2020-04-01 17:18:34 +03:00
Chocobo1
43d9d16241 Add logging for SOCKS5 proxy errors 2020-04-01 17:18:33 +03:00
Andrei Stepanov
5ad8f60ca1 NSIS: Update Russian translation
Remake of my previous PR https://github.com/qbittorrent/qBittorrent/pull/12251
2020-04-01 17:18:32 +03:00
Chocobo1
539fe7259e Avoid log file excessive flushing
Excessive flushing could happen when a lot of logging happens in a short
time interval.
2020-04-01 17:18:30 +03:00
Chocobo1
6521d00d5b Save log file in UTF-8 encoding
Otherwise it uses sytem defaults: usually UTF-8 on Linux and local 8-bit
encoding on Windows.
2020-04-01 17:18:29 +03:00
Chocobo1
e8010abc8b Rename variable 2020-04-01 17:18:28 +03:00
Chocobo1
99614aaa9d Include translation resources with file globbing
This will include all qtbase_*.qm files and only explicitly listed
qt_*.qm files will be included.
2020-04-01 17:18:27 +03:00
Burak Yavuz
56342c9c79 NSIS: Update Turkish translation 2020-04-01 17:18:25 +03:00
maboroshin
efa748e853 NSIS: Update Japanese translation 2020-04-01 17:18:24 +03:00
Roope Jukkara
26ee009e72 NSIS: Update Finnish translation
Translated most of the finnish installer translation -file to finnish language.
2020-04-01 17:18:22 +03:00
Chocobo1
aff4065e42 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-04-01 17:18:19 +03:00
Nick Korotysh
1c1cac2cba Don't round scaling factor
Qt 5.14 introduced new feature related to HighDPI screens support,
this parameter is called "scale factor rounding policy", and it is
intended to improve fractional scale factor support (like 150%).
Qt::PassThrough value guarantee that no any rounding will applied to
scale factor, and will be used as is.
2020-04-01 17:18:18 +03:00
Chocobo1
ea3c360901 Construct QString more efficiently 2020-04-01 17:18:16 +03:00
Chocobo1
39fe0025cd Allow to translate error messages 2020-04-01 17:18:02 +03:00
sledgehammer999
3c17ad566c Bump to 4.2.2 2020-03-24 16:39:31 +02:00
sledgehammer999
97bfd13060 Update Changelog 2020-03-24 16:38:12 +02:00
sledgehammer999
3e91481672 Sync translations from Transifex and run lupdate 2020-03-24 16:36:04 +02:00
Kacper Michajłow
e131cd16a1 Add missing QPainterPath header include 2020-03-24 16:15:14 +02:00
an0n666
a0976f4181 NSIS: Add option to remove Windows path length limitation 2020-03-24 16:15:13 +02:00
FranciscoPombal
5366bebb97 WebAPI: Always allow whitespace in category names 2020-03-24 16:15:12 +02:00
FranciscoPombal
f51cd36c29 WebAPI: fix matching uncategorized torrents
Closes #11748.
2020-03-24 16:15:12 +02:00
thalieht
553f443fbc Disable Auto TMM when not using default savepath from monitored folder 2020-03-24 16:15:11 +02:00
NotTsunami
97a92984c0 Allow other keypresses in LogListWidget
By not emitting the native signal, all other keypresses other than
the copy and select keysequences are ignored. This should reallow
keyboard navigation within LogListWidget objects.

Closes #12172.
2020-03-24 16:15:10 +02:00
FranciscoPombal
f1489dc2bf Fix total connected peers count calculation
Also fix small typo in function name.
2020-03-24 16:15:10 +02:00
thalieht
716aad9483 Append new move storage job to queue
fixup e4ff206e3c
2020-03-24 16:15:09 +02:00
Chocobo1
8c91c03be2 Use helper function to construct QString
This is shorter and avoids the need of 2 constructors.
2020-03-24 16:15:08 +02:00
Chocobo1
03e6b6e09d 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-24 16:15:07 +02:00
Chocobo1
75d3c03763 Add man page files in Markdown format
This allow us to edit man pages in a humane format.
2020-03-24 16:15:07 +02:00
Vladimir Golovnev (Glassez)
f6b0abbd75 Move torrent storages one by one 2020-03-24 16:15:06 +02:00
Chocobo1
03e8b9f74f Update supported python version
Fix up baa13c044a.
2020-03-24 16:15:05 +02:00
Chocobo1
808f6ad9fb Update Qt translation files 2020-03-24 16:15:05 +02:00
Chocobo1
4cf45aeebf Switch to https link 2020-03-24 16:15:03 +02:00
Vladimir Golovnev (Glassez)
a0cf80c967 Allow single app instance per configuration 2020-03-24 16:15:03 +02:00
Chocobo1
56183ff5d9 Capture pointer by value 2020-03-24 16:15:02 +02:00
Chocobo1
664dabdb7e Initialize boolean variables 2020-03-24 16:15:01 +02:00
Chocobo1
055d752c50 Fix crash when renaming torrent contents
Closes #10328.
2020-03-24 16:15:01 +02:00
Chocobo1
3e4c2193fb Drop python2 support
Closes #11811.
2020-03-24 16:15:00 +02:00
Nick Korotysh
5c2b8d3e10 Delegate GUI scaling work to Qt
Set Qt::AA_EnableHighDpiScaling application attribute when Qt 5.14.x or
newer is used. This fixes a lot of scaling issues on HiDPI displays.

Unfortunately, this flag must be set only before QApllication object
creation, so the only one place where it can be done is main().
2020-03-24 16:14:59 +02:00
Chocobo1
ae9b8720af Use helper functions to construct smart pointers 2020-03-24 16:14:59 +02:00
Chocobo1
30f2d11203 Use proper type for piece index 2020-03-24 16:14:58 +02:00
Chocobo1
9a69afb34a 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-24 16:14:57 +02:00
an0n666
923395b5c7 Check if file exists in seed mode 2020-03-24 16:14:56 +02:00
NotTsunami
9de819ea4a Improve the options tooltips
* Fix wrong fields for translation comments
* Improve torrent management tooltip to cover both modes
* Add new tooltips for potentially confusing settings

Decent progress towards #6346, closes #9994, closes #11528
2020-03-24 16:14:56 +02:00
Vladimir Golovnev (Glassez)
21c8acd55c Let libtorrent decide whether to resume a torrent 2020-03-24 16:14:54 +02:00
FranciscoPombal
709198d2f1 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-03-24 16:14:54 +02:00
FranciscoPombal
87542b4f75 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-03-24 16:14:53 +02:00
FranciscoPombal
566ecefbcf 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-03-24 16:14:53 +02:00
FranciscoPombal
41061f3c39 Fix IPv6 endianness 2020-03-24 16:14:52 +02:00
Vladimir Golovnev (Glassez)
703330c40d Allow to save downloaded metadata as torrent file 2020-03-24 16:14:51 +02:00
maboroshin
5fdd069f66 NSIS: Update Japanese translation 2020-03-24 16:14:51 +02:00
Chocobo1
0ba8111c37 Fix wrong field for translation comment
The `comment` field is used for disambiguation between identical
strings. Our case here should use the `extracomment` field which
meant as comment for translators.
2020-03-24 16:14:50 +02:00
Chocobo1
5d206acb21 Remove misleading translation comment
Also it was using the wrong field for translation comment.
2020-03-24 16:14:49 +02:00
djt3
7f1218a7c7 Change placeholder text in torrent list's filter 2020-03-24 16:14:48 +02:00
schnurlos
c4ed7daf67 NSIS: Update German translation
German translation of "inst_requires_win7" added.
2020-03-24 16:14:47 +02:00
FranciscoPombal
5a09f996ed 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-03-24 16:14:47 +02:00
zywo
dbde206ed4 NSIS: Update French translation 2020-03-24 16:14:46 +02:00
slrslr
0947f93ad3 NSIS: Improve Czech translation 2020-03-24 16:14:45 +02:00
Francisco Pombal
f338d267bc Git: Ignore "build" directory 2020-03-24 16:14:44 +02:00
sledgehammer999
84aa63a3c5 Use IP geolocation database by DB-IP instead of MaxMind
Closes #11792
2020-03-24 16:14:44 +02:00
Chocobo1
c2afc50c02 Simplify TrackerEntry::status() logic 2020-03-24 16:14:43 +02:00
FranciscoPombal
f72e7c0a8f Bump Web API version 2020-03-24 16:14:42 +02:00
FranciscoPombal
575bde1d1d Add stalled filters to GUI and Web API/UI
`/api/v2/torrents/info` can now take the following new values for the`filter` parameter: `stalled`, `stalled_uploading` and `stalled_downloading`.

Requires Web API version bump.

Closes #11787
2020-03-24 16:14:42 +02:00
an0n666
d15fdf2dde Do not list not contacted trackers as error 2020-03-24 16:14:41 +02:00
An0n
868fd53551 Start qBittorrent on Windows start up 2020-03-24 16:14:40 +02:00
Chocobo1
66c2e70016 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-03-24 16:14:39 +02:00
Vladimir Golovnev (Glassez)
89ee24fb3e Don't access download handler after it's finished 2020-03-24 16:14:39 +02:00
Chocobo1
b02eb32806 Expose WebUI ban duration to users 2020-03-24 16:14:38 +02:00
Chocobo1
e162aef5be Fix coding inconsistencies in preferences.html
1. Format table tags properly
2. Add a proper label tag
3. Don't use abbreviation for seconds, we use full name everywhere else
2020-03-24 16:14:37 +02:00
Chocobo1
837528c206 Use QDeadlineTimer for tracking WebUI banned duration
It simplifies our code and the new timer is monotonic.
2020-03-24 16:14:36 +02:00
Chocobo1
b19153287b Expose WebUI ban counter to users 2020-03-24 16:14:36 +02:00
Chocobo1
544d3f9025 Close document properly after writing
Closing document explicitly is recommended by MDN:
https://developer.mozilla.org/en-US/docs/Web/API/Document/write
2020-03-24 16:14:35 +02:00
Nick Korotysh
7a463299ea Inherit text color for filter list elements
Filter list (left side panel) in WebUI is implemented using <a> tags,
CSS defines default style for all <a> elements, and specific style for
filter list elements. Default style for <a> elements sets color, and
this color also used in list. This is looks not so well. So lets just
inherit text color from parent element, and as so as it is not set, so
default text color will be used.
This makes filter list looks like other UI elemets, making all UI more
consistent (like in desktop app).
2020-03-24 16:14:34 +02:00
Tester798
bbaa3a94c5 Fix portable mode
Try to fix portable mode bug. Closes #11706, #11178, #7765.
2020-03-24 16:14:33 +02:00
an0n666
d2834bd7fd Keep legacy default for random port 2020-03-24 16:14:33 +02:00
Chocobo1
534549142e 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-03-24 16:14:32 +02:00
Vladimir Golovnev (Glassez)
5e73afa04e 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-03-24 16:14:31 +02:00
Vladimir Golovnev (Glassez)
6ad1ba1d35 Keep legacy defaults for existing users 2020-03-24 16:14:31 +02:00
Vladimir Golovnev (Glassez)
f978b3a002 Perform settings upgrade for existing user only 2020-03-24 16:14:30 +02:00
Nick Korotysh
2f70d273b4 Use SVG image for WebUI favicon
This will allow browsers to get high quality icon with required
resolution instead of resizing some small raster image.
Browsers can have even more benefit from it. For example, Firefox uses
high resolution icon to display it in "Top Sites" instead of page
preview.

Nothing changes for browsers which doesn't support SVG favicons, older
PNG icon will be used in such case.
2020-03-24 16:14:29 +02:00
Chocobo1
2289bf4005 Fix singleton class ownership
We shouldn't allow Qt parent ownership in here.
2020-03-24 16:14:28 +02:00
NotTsunami
0cd4900e92 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-03-24 16:14:28 +02:00
Chocobo1
0ad8dc39e5 Let ReverseResolution always return/emit a result 2020-03-24 16:14:27 +02:00
Chocobo1
60d133ca6d Speed up lookup time
By adding another variable we can get O(1) lookup time instead of O(n).
Fix up 5f415c292d.
2020-03-24 16:14:26 +02:00
Chocobo1
000a726e20 Manually abort lookup on class destruction
Some lookup might take longer so instead of waiting them, we abort them
manually.
2020-03-24 16:14:26 +02:00
Chocobo1
4006818520 Improve ReverseResolution class
* Use QHostAddress type for IP
* Avoid double lookup
* Use larger cache size
2020-03-24 16:14:25 +02:00
thalieht
756bc3da54 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-03-24 16:14:24 +02:00
Chocobo1
fbb01a36e6 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-03-24 16:14:24 +02:00
Chocobo1
21922ed3b4 Revise qHash function
Instead of xor and narrowing the integers ourselves, now we let qHash()
from Qt do the job properly.
2020-03-24 16:14:23 +02:00
Chocobo1
43fe5214d2 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-03-24 16:14:22 +02:00
Vladimir Golovnev (Glassez)
ab6079e0d5 Track settings changed event in TransferListModel 2020-03-24 16:14:22 +02:00
Vladimir Golovnev (Glassez)
dc0b1ce227 Fix hide zero values 2020-03-24 16:14:21 +02:00
Sakib-Abrar
1db12e4421 Show "∞" instead of " -1" in Preferences 2020-03-24 16:14:20 +02:00
Vladimir Golovnev (Glassez)
b160b56306 Redesign torrent startup handling 2020-03-24 16:14:20 +02:00
NotTsunami
0e6627b0f6 CMake: Fix WebUI checks
When the CMake system was last revamped, the configure variable was
changed from WEBUI to DISABLE_WEBUI, but we are still checking
against WEBUI. This behavior was changed in fa770871e9
2020-03-24 16:14:19 +02:00
NotTsunami
33390bf463 CMake: Remove glibc version detection
If we were conditionally enabling _BSD_SOURCE or _SVID_SOURCE, I can
understand trying to play nice with the compiler and only pass as
needed, however this is not the case and glibc <= 2.19 will not care
that we are passing _DEFAULT_SOURCE. This removes an unnecessary
build step and gives us less to maintain from a build system
perspective.

Small cosmetic changes to MacroQbtCompilerSettings are included.
2020-03-24 16:14:18 +02:00
NotTsunami
2a6ddffb22 CMake: Remove duplicate MSVC check
As of this commit, L98 of winconf.cmake already checks for MSVC
before winconf-msvc calls this macro, so we are guaranteed to be
satisfy the check.
2020-03-24 16:14:17 +02:00
Prince Gupta
06c09f0113 Reorganize UI theme selection 2020-03-24 16:14:17 +02:00
Chocobo1
db258f7461 Migrate away from deprecated settings
Libtorrent has deprecated `upnp_ignore_nonrouters` in
https://github.com/arvidn/libtorrent/pull/4251
2020-03-24 16:14:16 +02:00
NotTsunami
81cec1930b CMake: Remove additional debugging compiler flags
Our previous setup lead to two unintended consequences:

* Debug flags were included in both release and debug builds instead
of just debug builds
* Clang doesn't support -gX (where X is the level of debugging
optimization), but we checked for -Og support instead

This commit avoids both of these scenarios by removing the additional
flags altogether. Partial resolution to #11856.
2020-03-24 16:14:15 +02:00
NotTsunami
7444227c9a WebUI: Use correct operators in logical expressions
As suggested in https://github.com/qbittorrent/qBittorrent/pull/11825#discussion_r365557626
2020-03-24 16:14:15 +02:00
FranciscoPombal
07196571e8 Add piece_extent_affinity to AdvancedSettings
Expose option in WebUI settings and WebAPI.

Requires WebAPI version bump.

Closes #11436.
2020-03-24 16:14:14 +02:00
Denis
b083bd78e7 WebUI: Fix first row renaming in files tab
Ids started from zero and first row converts to false.
Closes #11826.
2020-03-24 16:14:13 +02:00
Vladimir Golovnev (Glassez)
e75a65d798 Fix Transfer list sorting 2020-03-24 16:14:13 +02:00
Chocobo1
e1a10a0375 Fix missing string 2020-03-24 16:14:12 +02:00
Chocobo1
080c542953 Bump python version for new installation 2020-03-24 16:14:11 +02:00
Chocobo1
d7ab472363 Bump copyright year 2020-03-24 16:14:10 +02:00
An0n
c4eb6eccaf Change placement of stop tracker timeout 2020-03-24 16:14:10 +02:00
an0n666
1c091cef76 Expose stop_tracker_timeout in advanced settings 2020-03-24 16:14:09 +02:00
Chocobo1
e37b08a879 Remove unused variable 2020-03-24 16:14:08 +02:00
Chocobo1
39018ef1db Add explicit semicolon 2020-03-24 16:14:07 +02:00
Chocobo1
c6cadb6800 Remove duplicate line 2020-03-24 16:14:06 +02:00
sledgehammer999
0898196a5f Tracker is errored only if all local endpoints fail
Closes #11691
2020-03-24 16:14:06 +02:00
thalieht
4b40b80145 Allow double-click in preview dialog 2020-03-24 16:14:05 +02:00
Vladimir Golovnev (Glassez)
6ade38400e Save resume data after recheck
Closes #11774.
2020-03-24 16:14:04 +02:00
FranciscoPombal
71ca3a5cc9 WebUI: fix populating statistics window
Closes #11665
2020-03-24 16:14:04 +02:00
Vladimir Golovnev (Glassez)
2a3fc0ede1 Use QStyledItemDelegate instead of QItemDelegate 2020-03-24 16:14:03 +02:00
Vladimir Golovnev (Glassez)
1b9fd85497 Fix transfer list architecture
Model returns string for DisplayRole.
Text alignment is set by Model (using TextAlignmentRole).
Delegate performs custom painting only where necessary
(i.e. for Progress bar).
2020-03-24 16:14:02 +02:00
Chocobo1
c73f61c8d4 Remove unused variable 2020-03-24 16:14:02 +02:00
Chocobo1
4205e99479 Migrate away from deprecated API in Qt 5.14 2020-03-24 16:14:01 +02:00
FranciscoPombal
35c7e6bf2c WebUI: Prevent excessive sync requests
Don't sync main data if a request to do so is already in progress.

This prevents piling up of requests and bogging down slow/busy machines, since the current implementation of `/api/v2/sync/maindata` is very computationally intensive, especially with lots of torrents.

Everything gets updated on the next scheduled request anyway (via the timeout mechanism).
2020-03-24 16:13:59 +02:00
FranciscoPombal
37bc47ee04 WebUI: remove unused/deprecated option
Fixup 8200ef6
Remove "Listen on IPv6 address" option.
2020-03-24 16:13:58 +02:00
FranciscoPombal
c5dc361213 WebUI: Implement "Secure" flag for session cookie
Closes #11724.

Option is enabled by default for users using qBittorrent's built-in HTTPS capabilities. This flag will never be set if qBittorrent is using plain HTTP.

Users using HTTPS reverse proxies, like "qbt <-> (http) <-> proxy <-> (https) <-> user" should override the flag in the proxy in order to set it, if they wish to do so.
2020-03-24 16:13:56 +02:00
FranciscoPombal
0c83b3e3a3 Change some settings defaults for better behaviour out of the box
- CheckingMemUsageSize (16 MiB -> 32 MiB): a 16 MiB increase in memory consumption seems worthwhile for a nice performance boost in most cases.
- DiskCacheSize (64 MiB -> Auto): auto yields the best performance without committing to a huge fixed value.
- UseRandomPort (false -> true): The initial port chosen by qBittorrent may clash with something else the user already has that is aways using that port (low probability, but still). Thus, qBittorrent will always fail listening on that port, causing unexpected problems for the user. Users who know they want a fixed port will go to the settings anyway.
2020-03-24 16:13:56 +02:00
Thomas Piccirello
63c9e29419 Rename Country column to "Country / Region"
Not all flags displayed strictly belong to countries.
2020-03-24 16:13:55 +02:00
sledgehammer999
7389dc082f Delete unnecessary explicit return 2020-03-24 16:13:54 +02:00
sledgehammer999
1e05e6a842 Option to show console when external program is run
Windows only.
Closes #9592
2020-03-24 16:13:54 +02:00
sledgehammer999
03550a0932 Use modern unique_ptr practices 2020-03-24 16:13:53 +02:00
Prince Gupta
85c1a9dbe0 Allow transfer list text color changes through QSS 2020-03-24 16:13:52 +02:00
Medvedishce
89de23718b Update free disk space label on Category change in Auto Mode
Closes #8772.
This will fix issue that "Free space on disk:" label in 
Add New Torrent dialog not updated on Category change
when Torrent Management Mode is on Auto mode.
2020-03-24 16:13:51 +02:00
Chocobo1
3760b63582 Replace hard-coded numbers in TrackerFiltersList class 2020-03-24 16:13:50 +02:00
Chocobo1
621ee80539 Simplify null pointer check 2020-03-24 16:13:50 +02:00
Chocobo1
7589487c0c Replace a series of if() by switch() 2020-03-24 16:13:49 +02:00
an0n666
ad7279953e Disable Torrent Queue by default
It should remain disabled by default. Anyone that needs to Queue torrents for seeding/downloading should go to settings and change it to their preference.
2020-03-24 16:13:48 +02:00
Mike Tzou
2bf340a89a Merge pull request #12189 from eszlari/patch-2
Update Linux appdata release version
2020-03-19 12:07:35 +08:00
Peter Eszlari
1d9df11e8c Update Linux appdata release version 2020-03-17 22:48:20 +01:00
sledgehammer999
118af03534 Bump to 4.2.1 2019-12-18 00:49:09 +02:00
sledgehammer999
596a71e03d Update Changelog 2019-12-18 00:44:50 +02:00
sledgehammer999
dab392645d Sync translations from Transifex and run lupdate 2019-12-18 00:33:46 +02:00
sledgehammer999
2d1fa9e154 Bump Web API version 2019-12-18 00:33:44 +02:00
sledgehammer999
3a63fabe9c Don't unnecessarily delete OS files in folders 2019-12-18 00:18:53 +02:00
sledgehammer999
3129712f03 Use the incomplete folder where appropriate
Restored torrents already have the correct path saved in their fastresume. Don't override it.
Magnets and new torrents have to be set explicitly to the incomplete folder if it is enabled.

Closes #11552
2019-12-18 00:18:52 +02:00
Tester798
66baf64e17 Enable portable mode if "profile" directory exists
Enable portable mode if "profile" directory exists in the app dir.
Remove "--portable" command line argument.
Add logging of current profile config directory.
Closes #9445.
2019-12-18 00:18:51 +02:00
Prince Gupta
1bdeab398a Align Properties tab bar correctly on window resize 2019-12-18 00:18:50 +02:00
sledgehammer999
2bda2a37e3 Rework the listening IP/interface selection code
Closes #11561
2019-12-18 00:18:48 +02:00
Chocobo1
027b605fc0 Enable "Apply rate limit to peers on LAN" option by default
Because some ISP will deploy Carrier Grade NAT (means assigning private
IP address to user) and thus accidentally circumvent the speed limiter.

https://www.a10networks.com/blog/carrier-grade-nat/
2019-12-18 00:18:47 +02:00
nl6720
87e1c80e28 Fix quoting of alert() in client.js
Fix alert() I broke in #11615 .
2019-12-18 00:18:46 +02:00
Thomas Piccirello
2d3efbc711 Add ability to rename torrent files from the WebUI
Renaming folders is not yet supported. Closes #8892.
2019-12-18 00:18:45 +02:00
Thomas Piccirello
8e394e0cdb Fix incorrect function being used 2019-12-18 00:18:44 +02:00
nl6720
0623c623d5 Mention lack of HTTPS in WebUI magnet link warning
According to Mozilla docs, registerProtocolHandler() is only
available when using secure contexts (i.e. HTTPS for everything
outside localhost).
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler

The message "Your browser does not support this feature" does not
make this obvious and can lead to confusion if the user is using a
modern browser.
2019-12-18 00:18:42 +02:00
Luigi Baldoni
307d8ec360 Remove -march=native optimisation 2019-12-18 00:18:41 +02:00
Chocobo1
5a518d2f35 Fix incorrect translation displayed after language change
It is expected in WebUI that the language change applies immediately
(without a program restart) and this static caching prevents that.
2019-12-18 00:18:40 +02:00
Chocobo1
93fe20afcd Fix HTML elements size in search tab
Specifying a height/width value might cut the displayed text or
obstruct centering the text in the button, so let it auto decide
instead.
Closes #11553.
2019-12-18 00:18:39 +02:00
Chocobo1
7f217110cd Fix missing translations in search plugins dialog
Closes #11551.
2019-12-18 00:18:37 +02:00
Andrei Stepanov
4e7b33fadf Update russian.nsi 2019-12-18 00:18:36 +02:00
Chocobo1
7926d1755f Fix inconsistent icon for deleting torrent
Closes #11565.
2019-12-18 00:18:35 +02:00
Chocobo1
3a13a3d5ca Show torrent error message in transfer list 2019-12-18 00:18:34 +02:00
Chocobo1
caa8e1658a Fix stuck in wrong torrent state
Before this patch, adding the torrent in
https://github.com/qbittorrent/qBittorrent/issues/11511 and the torrrent
state will stay in torrent_status::checking_resume_data forever.
This is not the correct state since the `torrent_status.errc` field is
non-zero and this commit fixes it.
2019-12-18 00:18:33 +02:00
warren
890ccb7b84 Expand single-item folders in torrent content 2019-12-18 00:18:25 +02:00
sledgehammer999
912b076707 Bump to 4.2.0 2019-12-03 01:19:18 +02:00
sledgehammer999
b7c2f74c19 Update Changelog 2019-12-03 01:18:31 +02:00
sledgehammer999
f46058bbd6 Sync translations from Transifex and run lupdate 2019-12-02 23:37:06 +02:00
sledgehammer999
b296c076f1 Merge pull request #11539 from sledgehammer999/nsis_min_winVer
Enforce min Windows version in NSIS installer
2019-12-02 23:23:10 +02:00
Vladimir Golovnev
a73dfe4a10 Merge pull request #11538 from glassez/rss-logging
Log "RSS Feed successfully downloaded" event
2019-12-02 07:16:56 +03:00
Vladimir Golovnev (Glassez)
9342fb15b3 Log "RSS Feed successfully downloaded" event 2019-12-01 20:19:43 +03:00
sledgehammer999
5d0d8a0b7b Enforce min Windows version in NSIS installer 2019-11-30 15:43:51 +02:00
Mike Tzou
7e0d64294c Merge pull request #11535 from Chocobo1/libt
Migrate away from deprecated API
2019-11-30 10:00:25 +08:00
Chocobo1
bf58555a7a Migrate away from deprecated API 2019-11-29 02:57:31 +08:00
sledgehammer999
56c0f39593 Merge pull request #11520 from sledgehammer999/revert_fastresume_functionality
Revert fastresume functionality
2019-11-27 22:38:21 +02:00
sledgehammer999
bd3f723ebf Merge pull request #11474 from sledgehammer999/webui_bump
Bump Web API version
2019-11-27 22:37:40 +02:00
sledgehammer999
7aa01a1b51 Revert "Always save info dict when saving fastresume"
This reverts commit 4aab44e779.
2019-11-25 15:35:06 +02:00
sledgehammer999
005f0010ec Revert "Fix unable to remove web seeds"
This reverts commit d657c87243.
2019-11-25 15:34:37 +02:00
Vladimir Golovnev
7ff8545f55 Merge pull request #11505 from glassez/fix-build
Fix compilation for Windows 7 with MinGW
2019-11-23 06:22:17 +03:00
Vladimir Golovnev (Glassez)
a4b9a4d9da Fix compilation for Windows 7 with MinGW 2019-11-22 13:03:52 +03:00
sledgehammer999
9c1617b977 Bump to 4.2.0RC 2019-11-21 21:26:48 +02:00
sledgehammer999
442daa31d4 Update Changelog 2019-11-21 21:25:16 +02:00
sledgehammer999
c27457efda Sync translations from Transifex and run lupdate 2019-11-21 21:21:58 +02:00
Mike Tzou
aaf659519a Merge pull request #11499 from Chocobo1/limits
Avoid session reconfiguration when limit has not changed
2019-11-21 01:42:17 +08:00
Chocobo1
af52a18f82 Avoid session reconfiguration when limit has not changed
Fix up 5d46c9b2d6.
2019-11-20 12:22:18 +08:00
Mike Tzou
1bd739dd4a Merge pull request #11493 from Chocobo1/speed
Revise "speed limits" related code
2019-11-18 18:40:31 +08:00
Vladimir Golovnev
76a3f57996 Merge pull request #11494 from thalieht/allowrecheck
Reallow to force recheck torrents that aren't fully started
2019-11-18 10:09:55 +03:00
thalieht
4ffc0cff12 Reallow to force recheck torrents that aren't fully started 2019-11-16 22:13:35 +02:00
Chocobo1
5d46c9b2d6 Revise "speed limits" related code
The old code has a wrong comparison which compares speed limits
in different magnitude: bytes vs KiB. The comparison is removed.
Also the old code treats values that are smaller than 1024 as unlimited
speed which is clearly wrong.
2019-11-17 02:27:59 +08:00
Mike Tzou
30ca4e6986 Merge pull request #11489 from Chocobo1/webapi
Code cleanup
2019-11-15 11:33:47 +08:00
Chocobo1
0f2c61a207 Remove redundant type casting 2019-11-14 12:18:41 +08:00
Chocobo1
b55403ce66 Pass TriStateBool by value 2019-11-14 12:14:30 +08:00
Chocobo1
640f52c05f Let eta function return signed integer
We already use signed integer internally so it make sense to return it
as-is.
2019-11-14 12:14:29 +08:00
Chocobo1
8fe8cbd3d1 Reuse code path in switch cases 2019-11-14 12:14:29 +08:00
Chocobo1
9b5df92078 Give better name to parameter checking function
This function will throw exceptions if the required parameters do not
exsit hence a stronger word is more appropriate here.

Also change the function parameter type to QVector. We don't need the
duplicate entries checking as currently we only use 3 fields at max and
can be easily checked by hand. So drop back to QVector which can be
constructed more efficiently.
2019-11-14 12:14:20 +08:00
Mike Tzou
9cb07db84b Merge pull request #11473 from j1warren/dblclick_preview_file
Add "Preview file" double-click action
2019-11-14 12:02:57 +08:00
Mike Tzou
cdb1874263 Merge pull request #11466 from Xegor/master
Add "create subfolder" option to RSS auto-download rules
2019-11-14 12:02:06 +08:00
Mike Tzou
e69df60f11 Merge pull request #11462 from jagannatharjun/cmake
Fix CMake Windows compilation
2019-11-12 14:37:48 +08:00
Prince Gupta
e3879f9ab9 CMake: Use libraries from winconf.pri 2019-11-12 10:43:25 +05:30
Mike Tzou
e009f17889 Merge pull request #11476 from Chocobo1/lupdate
Address lupdate warnings
2019-11-12 12:47:44 +08:00
warren
74009f13d9 Add "Preview file" double-click action 2019-11-11 23:12:55 +05:00
Chocobo1
ff4aae11f8 Add required header
The header was missing and our cmake CI builds failed as a result.
2019-11-11 20:12:53 +08:00
Xegor
325f36fa4f Add create subfolder option to RSS auto-download rules 2019-11-11 12:46:51 +01:00
Chocobo1
d936bca268 Move DownloadHandlerImpl class to its own file
This also resolves lupdate warning.
2019-11-11 19:41:10 +08:00
Chocobo1
b4c518e075 Run lupdate in CI 2019-11-11 16:40:15 +08:00
Chocobo1
9ef2cd48e0 Fix translation not applied 2019-11-11 16:39:55 +08:00
sledgehammer999
eff0208382 Bump Web API version
Closes #11403
2019-11-11 02:18:59 +02:00
sledgehammer999
0ff3b7641d Correctly update WebUI translations 2019-11-11 02:13:35 +02:00
sledgehammer999
871161310b Sync translations from Transifex and run lupdate 2019-11-11 02:03:06 +02:00
Mike Tzou
d12468ffb5 Merge pull request #11354 from thalieht/pausechecking
Reallow to pause checking torrents
2019-11-09 09:28:18 +08:00
thalieht
f150b3077d Reallow to pause checking torrents 2019-11-08 19:14:50 +02:00
Mike Tzou
6a6c05fba2 Merge pull request #11423 from nl6720/systemd-unit
Order qbittorrent-nox@.service after network-online.target
2019-11-05 09:42:35 +08:00
Mike Tzou
50c20e1ef4 Merge pull request #11446 from Chocobo1/handle
Clean up in Session class
2019-11-05 09:42:19 +08:00
Chocobo1
b408a09755 Remove unused type alias 2019-11-04 13:47:30 +08:00
Chocobo1
1b47350952 Remove anonymous function forward declarations
Also reorder the functions slightly to make it compile.
2019-11-04 12:21:16 +08:00
Mike Tzou
2fb1182700 Merge pull request #11317 from Chocobo1/preview
Fix "preview file" action not working
2019-11-04 11:32:14 +08:00
Mike Tzou
475fbfb712 Merge pull request #11356 from Chocobo1/banIP
Allow to select multiple entries in "banned IP" dialog
2019-11-04 11:29:22 +08:00
Mike Tzou
a7f38eaa82 Merge pull request #11374 from horgan/patch-1
Fix country name misspelling
2019-11-03 00:43:48 +08:00
horgan
89d214bb8f Fix country name misspelling 2019-11-03 00:17:04 +08:00
Mike Tzou
6da39d9279 Merge pull request #11422 from Chocobo1/buffer
Reserve memory for file data buffers
2019-11-02 13:16:21 +08:00
Mike Tzou
565eb4cdc8 Merge pull request #11430 from Chocobo1/qt
Fix integer narrowing on x86
2019-11-01 10:34:56 +08:00
Mike Tzou
d944a0ccbd Merge pull request #11426 from Chocobo1/priority
Add option to control qBittorrent process memory priority
2019-11-01 10:34:39 +08:00
Chocobo1
e262b86c44 Reserve memory for file data buffers 2019-10-31 23:09:28 +08:00
Chocobo1
f31ee6a225 Fix integer narrowing on x86
The f_type is an alias to `int` on 32-bit system and the switch cases
uses `unsigned int`.

Closes #11427.
2019-10-31 13:04:02 +08:00
Chocobo1
6fd678195c Replace deprecated Qt functions
QSet::toList() is replaced by QSet::values()
2019-10-31 12:40:24 +08:00
Chocobo1
0f60121b94 Add option to control qBittorrent process memory priority
This is to avoid Windows swapping out other application data from
OS cache and put in torrent data which hinders other program
responsiveness.

The default value "Below normal" is choosen because casual users have
other higher priority apps (such as browser) running and they don't
expect OS to swap out its data. Dedicated seeders most probably will not
have other app running on their system and would expect qbt has
priority over other background services.

The option only has effect on Windows >= 8.
2019-10-31 03:18:43 +08:00
nl6720
a40d490b76 Order qbittorrent-nox@.service after network-online.target
This ensures that qbittorrent-nox doesn't start while the network is not up yet.
2019-10-30 09:25:24 +02:00
Mike Tzou
c1e0207454 Merge pull request #11307 from Chocobo1/session_conf
Clean up Session class configure routines
2019-10-30 15:13:13 +08:00
Chocobo1
29fe0029f0 Rename variables in Session class 2019-10-30 11:56:16 +08:00
Chocobo1
89c58921de Log error properly 2019-10-30 01:46:57 +08:00
Chocobo1
a3fd340187 Revise Session::getPendingAlerts function signature 2019-10-30 01:46:57 +08:00
Chocobo1
e32ef7f5c5 Use implicit sharing when getting categories from Session class 2019-10-30 01:46:57 +08:00
Chocobo1
865394a59c Clean up Session class variable initialization 2019-10-30 01:46:56 +08:00
Chocobo1
abb3e7ace0 Move libtorrent session initialization to its own function
`m_IPFilteringChanged` default value has changed due to code unification.
2019-10-30 01:46:52 +08:00
Mike Tzou
c73d698718 Merge pull request #11409 from Chocobo1/dpi
Fix screen scaling factor calculation
2019-10-29 09:56:17 +08:00
Chocobo1
4888b22622 Fix screen scaling factor calculation
For some users on Windows the physicalDotsPerInch() could return values
that are smaller than the normal 96 DPI which leads to big dialog sizes
taking the entire screen.
So we need to ensure it is at least 96 DPI.
Closes #11405, #11407.
2019-10-28 15:01:42 +08:00
sledgehammer999
9c466d84ec Bump to 4.2.0beta1 2019-10-27 17:22:47 +02:00
sledgehammer999
721ba608c7 Update Changelog 2019-10-27 17:21:30 +02:00
sledgehammer999
009ccbef7f Bump Web API version
Closes #11304
2019-10-27 17:20:28 +02:00
Mike Tzou
0de5cbaa4b Merge pull request #11377 from Chocobo1/listeningIPs
Clean up "network interfaces configuration" code
2019-10-24 15:02:18 +08:00
Chocobo1
49266cb9e4 Replace boost::int64_t by std::int64_t 2019-10-23 13:43:49 +08:00
Chocobo1
cbe78baff1 Migrate to lt::error_code 2019-10-23 13:43:46 +08:00
Chocobo1
0d3152e4b0 Clean up "network interfaces configuration" code 2019-10-23 13:43:16 +08:00
Mike Tzou
11bebd50d9 Merge pull request #11382 from Chocobo1/cmake
Fix missing libraries in cmake-mingw build
2019-10-23 13:31:20 +08:00
Mike Tzou
06a3a30619 Merge pull request #11384 from Chocobo1/autotools
Update autotools scripts
2019-10-21 11:43:22 +08:00
Chocobo1
d0e084ce1d Update m4 scripts 2019-10-20 01:28:10 +08:00
Chocobo1
48d6286714 Regenerate build-aux scripts
It's been a while since the last update (26bf838a0b)
and there is a lot of changes in upstream.
2019-10-20 01:28:10 +08:00
Chocobo1
bb23366912 Fix missing libraries in cmake-mingw build 2019-10-19 14:03:39 +08:00
Mike Tzou
c5da4d1500 Merge pull request #11344 from Chocobo1/defines
Update libtorrent build defines on Windows
2019-10-12 10:42:22 +08:00
Chocobo1
5e671a4b0b Allow to select multiple entries in "banned IP" dialog 2019-10-11 21:58:35 +08:00
Chocobo1
ccbd9c83e2 Update libtorrent build defines on Windows
`TORRENT_USE_LIBCRYPTO` replaced `TORRENT_USE_OPENSSL` since OpenSSL 1.1.
`TORRENT_DISABLE_RESOLVE_COUNTRIES` has been removed since libtorrent 1.2.
2019-10-09 10:44:42 +08:00
Mike Tzou
c7f092b95f Merge pull request #11322 from Chocobo1/dpi
Use screen real physical DPI on Windows
2019-10-04 12:00:22 +08:00
Chocobo1
0760398e99 Use screen real physical DPI on Windows
Previously was using a hardcoded value which might lead to issues like #11234.
2019-10-03 18:08:48 +08:00
Mike Tzou
339e195043 Merge pull request #11313 from Chocobo1/queue
Preserve relative order when moving to top/bottom in queue
2019-10-03 09:48:30 +08:00
Chocobo1
7f73a71319 Show torrent name in "preview file" related dialogs 2019-10-02 22:27:27 +08:00
Chocobo1
6a462edb72 Don't close preview dialog if selected file failed to open
User may have made a mis-selection and this should not close the dialog
(only when the torrent has multiple previewable files).
2019-10-02 22:24:47 +08:00
Chocobo1
7ed0cd0c35 Fix "preview file" action not working
Root cause is the PreviewSelectDialog::readyToPreviewFile signal is
emitted before it is connected to a slot.
Only single-file torrents are affected.

Closes #11315.
2019-10-02 22:24:29 +08:00
Chocobo1
0607050ecc Clean up PreviewSelectDialog class 2019-10-02 21:12:35 +08:00
Chocobo1
021908320e Preserve relative order when moving to top/bottom in queue
Closes #11312.
2019-10-02 16:03:06 +08:00
Chocobo1
e0a23ba93d Use InfoHash type in queueing operations
This avoids redundant type conversions.
2019-10-02 15:21:16 +08:00
Mike Tzou
a9e6ef183b Merge pull request #11302 from Chocobo1/deletedialog
Revise DeletionConfirmationDialog class
2019-10-01 12:50:10 +08:00
Mike Tzou
c062a31f12 Merge pull request #11293 from Chocobo1/qt
Code clean up
2019-10-01 12:49:54 +08:00
Chocobo1
c632a91ee5 Handle "Delete confirmation" dialog result asynchronously
This is to avoid creating nested event loops as discussed in
https://github.com/qbittorrent/qBittorrent/pull/10786#issuecomment-502795822
2019-09-30 21:37:17 +08:00
Chocobo1
36056ad5af Avoid redundant lookups 2019-09-29 15:13:25 +08:00
Chocobo1
19b6f56a0a Move DeletionConfirmationDialog class to its own .cpp file 2019-09-29 11:29:16 +08:00
Chocobo1
d76adff81d Change Session::deleteTorrent() first parameter to take InfoHash type 2019-09-29 09:52:51 +08:00
Chocobo1
7f453a80d3 Revise SessionSettingsEnums wrapper
This simplify the wrapper to become a namespace.
2019-09-29 09:52:13 +08:00
Chocobo1
7276a79cef Call Windows API directly
We already bumped the OS requirement to Windows 7 and those functions
can be called directly without the need to load them first.
2019-09-29 09:52:13 +08:00
Mike Tzou
975b44d05f Merge pull request #11241 from thalieht/delfolder
Add "Remove torrent and its files" option to share ratio limiting
2019-09-29 09:51:41 +08:00
Mike Tzou
68dcc972fa Merge pull request #11270 from Chocobo1/mutex
Use non-recursive mutex
2019-09-28 12:33:31 +08:00
thalieht
53e7faa47c Rename share ratio limiting options 2019-09-26 13:34:03 +03:00
thalieht
07eb261991 Add "Remove torrent and its files" option to share ratio limiting 2019-09-26 13:34:03 +03:00
Chocobo1
de7d62c128 Clean up code 2019-09-25 15:54:47 +08:00
Chocobo1
103e2b9398 Use non-recursive mutex
The related classes doesn't really need recursive mutex so drop it. And
if it is really required it usually indicates bad design and we should
avoid it anyway.
2019-09-25 15:50:21 +08:00
Mike Tzou
7a3607c729 Merge pull request #11269 from Chocobo1/signals
Improve "stats updated" signal handling in MainWindow class
2019-09-25 09:53:39 +08:00
Mike Tzou
7c7963f93f Merge pull request #11259 from Chocobo1/tristate
Revise TriStateBool class
2019-09-25 09:52:41 +08:00
Chocobo1
58fa5e004f Improve "stats updated" signal handling in MainWindow class 2019-09-24 11:51:29 +08:00
Chocobo1
72faf89e26 Use the same internal data type for conversion function 2019-09-24 10:49:39 +08:00
Mike Tzou
50e0b2ab15 Merge pull request #11251 from Chocobo1/stats
Move "torrent status report" functionality out of Session class
2019-09-24 10:48:52 +08:00
Mike Tzou
5708e53f0a Merge pull request #11264 from Chocobo1/hotkey
Add ability to trigger actions via keypad enter key
2019-09-24 10:48:44 +08:00
sledgehammer999
918ccefdc4 Bump to 4.2.0alpha2 2019-09-23 21:46:08 +03:00
sledgehammer999
85133a6680 Update Changelog 2019-09-23 21:44:35 +03:00
Chocobo1
418164bee4 Move "torrent status report" functionality out of Session class 2019-09-23 21:08:59 +08:00
Chocobo1
9968eb53b2 Remove unused signal 2019-09-23 21:08:59 +08:00
Chocobo1
8bbed461a6 Sort signal declarations in Session class 2019-09-23 21:08:59 +08:00
Chocobo1
c7ac96c4f5 Add ability to trigger action via keypad Enter 2019-09-23 19:18:14 +08:00
Chocobo1
4a71b78e2d Group related code together
And also rename local variables.
2019-09-23 19:18:14 +08:00
Chocobo1
2152a81d11 Add ability to open file via keypad Enter
Closes #11260.
2019-09-23 19:18:07 +08:00
Chocobo1
ed62854af7 Add TriStateBool constructor taking a boolean
And move the constructor taking an int to private.
2019-09-23 13:05:32 +08:00
Mike Tzou
eebb2186c7 Merge pull request #11215 from xnoreq/master
WebUI: fix escaping of HTML special characters
2019-09-22 13:34:35 +08:00
xnor
ecc3ff3ca4 WebUI: fix escaping of HTML special characters
JS code for torrent general properties, files, peers, trackers inconsistently
escaped HTML special characters, then the dynamicTable inconsistently escaped
again and then the value was set to HTML element text or html properties.

To fix this mess, don't escape any property values in the prop-*.js files.
Instead, make dynamicTable set HTML element text instead of html property by
default. This behavior can be overridden by setting a custom updateTd
function on the respective column, if needed. This is where the HTML escaping
should be done.

Also reordered existing updateTd functions to match column order, changed
custom updateTd functions from setting html to text property wherever possible,
removed custom updateTd functions that turned out to be redundant.
2019-09-21 13:09:42 +00:00
Mike Tzou
72e511e3c4 Merge pull request #11254 from Chocobo1/autoTMM
Fix seeding failed after creating a new torrent
2019-09-20 13:25:53 +08:00
Chocobo1
82276b2a99 Rename variable 2019-09-19 16:50:57 +08:00
Chocobo1
e3b9659fb8 Fix seeding failed after creating a new torrent
Closes #11252.
2019-09-19 16:50:31 +08:00
Mike Tzou
3971bf2d58 Merge pull request #11250 from Chocobo1/warning
Improve error messages for url_seed_alert
2019-09-19 11:11:30 +08:00
Chocobo1
4d00435209 Improve error messages for url_seed_alert
Closes #10119.
2019-09-18 15:02:59 +08:00
Vladimir Golovnev
19c70fd659 Merge pull request #11235 from glassez/retry-fetch-rss
Allow to retry fetching RSS feeds. Closes #11168
2019-09-16 09:58:44 +03:00
Mike Tzou
209831d3b0 Merge pull request #11103 from Piccirello/webui-explicit-export
Move JavaScript code into explicit namespaces
2019-09-16 13:31:29 +08:00
Mike Tzou
bf64fe0d2f Merge pull request #11232 from Chocobo1/escape
Revise HTML escaping in GUI
2019-09-16 13:26:49 +08:00
Chocobo1
fccbc5318a Drop logging level to warning for web seed errors 2019-09-15 14:55:16 +08:00
Chocobo1
bab953298b Escape HTML in comment field 2019-09-15 14:41:07 +08:00
Chocobo1
f1243871b0 Remove redundant HTML escaping
The text widget is already set to plaintext and doing HTML escaping will
not give us more security but only makes it harder to read.
2019-09-15 14:40:34 +08:00
Mike Tzou
12c127b482 Merge pull request #11227 from Chocobo1/alert
Handle "alerts dropped" alert from libtorrent
2019-09-15 13:02:34 +08:00
Mike Tzou
fdde2184f5 Merge pull request #11212 from Chocobo1/padFiles
Add option to align file to piece boundary when creating new torrent
2019-09-15 13:02:18 +08:00
Thomas Piccirello
9804a2e06a Fix typo 2019-09-14 18:25:46 -07:00
Thomas Piccirello
1439bcc864 Move JavaScript code into explicit namespaces
This cleans up the global namespace by explicitly exporting shared values. All html and JavaScript files have been converted to use explicit exports except for client.js and mocha-init.js
2019-09-14 18:24:53 -07:00
Vladimir Golovnev (Glassez)
cf6e721b00 Allow to retry fetching RSS feeds 2019-09-14 11:33:03 +03:00
Vladimir Golovnev (Glassez)
73ef69526d Allow to cancel download request 2019-09-14 11:31:07 +03:00
Chocobo1
edcc74c1ae Add option to align file to piece boundary when creating new torrent
Alignment is achieved by adding dummy pad files between files which is
handled by libtorrent.
Closes #10460.
2019-09-14 12:16:50 +08:00
Chocobo1
5e1e983928 Handle "alerts dropped" alert from libtorrent 2019-09-14 12:09:13 +08:00
Mike Tzou
b144d3b797 Merge pull request #11208 from Chocobo1/storage
Improve SettingsStorage behavior
2019-09-09 08:28:31 +08:00
Chocobo1
0a959bcbe7 Clean up SettingsStorage::save()
Also it should return `true` when `m_dirty` is `false`.
2019-09-08 15:03:25 +08:00
Chocobo1
e7e5ee1ea2 Add const to TransactionalSettings class functions 2019-09-08 14:38:14 +08:00
Chocobo1
daf52a2610 Avoid double lookups 2019-09-08 14:28:38 +08:00
Mike Tzou
d2c21ce507 Merge pull request #11195 from Chocobo1/mac
Replace deprecated macro
2019-09-07 11:58:23 +08:00
Mike Tzou
ee8b99ffd5 Merge pull request #11201 from Chocobo1/watcher
Treat .magnet file extension as case insensitive in filesystem watcher
2019-09-07 11:58:10 +08:00
Mike Tzou
f3b4fb8600 Merge pull request #11154 from ClemPera/patch-1
Remove max character limit of location path
2019-09-07 11:55:29 +08:00
Chocobo1
7113174593 Treat .magnet file extension as case insensitive
Closes #11200.
2019-09-06 12:30:50 +08:00
Mike Tzou
ee0f38a696 Merge pull request #11194 from Chocobo1/filename
Fix filename validation on non-Windows OS
2019-09-06 12:00:42 +08:00
Chocobo1
17e4902519 Don't define variable when not building GUI 2019-09-05 20:40:47 +08:00
Chocobo1
0d5b0b9542 Replace deprecated macro
Q_OS_MAC is deprecated and the replacement is Q_OS_MACOS.
2019-09-05 20:16:18 +08:00
Chocobo1
9dc3b18178 Fix filename validation on non-Windows OS
Closes #11191.
2019-09-05 20:05:21 +08:00
Mike Tzou
ef8b37f7fa Merge pull request #11182 from Chocobo1/addPeer
Move error logging of adding peers to the proper place
2019-09-05 09:52:02 +08:00
Chocobo1
2396ef5bd6 Move error logging of adding peers to the proper place 2019-09-04 16:09:24 +08:00
Mike Tzou
80bf5978de Merge pull request #11181 from Chocobo1/fix
Add check for null pointer
2019-09-04 12:09:22 +08:00
Chocobo1
3104291734 Add check for null pointer
Fix up d657c87243.
2019-09-03 22:26:41 +08:00
Mike Tzou
0b58fadc83 Merge pull request #11179 from noraj/patch-1
Fix ambiguity in GitHub Issue template
2019-09-03 12:13:46 +08:00
Mike Tzou
18369f6c21 Merge pull request #11171 from Chocobo1/webui
Conditionally disable port input field
2019-09-03 12:13:16 +08:00
Mike Tzou
4363082173 Merge pull request #11104 from Chocobo1/resume
Fix unable to remove web seeds
2019-09-03 12:12:56 +08:00
Alexandre ZANNI
21d7ca8eab Fix ambiguity in GitHub Issue template 2019-09-02 20:16:26 +02:00
Mike Tzou
1bb06a7428 Merge pull request #11157 from Chocobo1/hostaddr
Construct QHostAddress more efficiently
2019-09-02 13:40:43 +08:00
Chocobo1
60994df8d0 Conditionally disable port input field
Disable port input when "Use different port on each startup" option is selected.
This follows the behavior in GUI.
2019-09-01 22:55:57 +08:00
Chocobo1
2a66bb3127 Construct QHostAddress more efficiently 2019-09-01 22:33:01 +08:00
Clément Pera
f42b10f3b6 Remove max character limit of location path
I removed the maxlength attribute because we couldn't modify the location path when it has more than 100 characters.
2019-09-01 08:02:49 +02:00
Chocobo1
4aab44e779 Always save info dict when saving fastresume
Otherwise torrents loaded from fastresume won't have it and needs
to redownload it from elsewhere and slowing down the startup process.
This is also required for the future where we will drop loading the
`info` dict from .torrent files.
2019-08-31 22:59:33 +08:00
Chocobo1
d657c87243 Fix unable to remove web seeds
As suggested in post [1] we don't need to assign the `ti` field anymore when fastresme
already contains the `info` dict.

[1]: https://github.com/arvidn/libtorrent/issues/3946#issuecomment-523300003
2019-08-31 22:52:22 +08:00
Mike Tzou
2d13f87ba4 Merge pull request #11145 from Chocobo1/qpixmapcache
Setup pixmap cache in a proper place
2019-08-31 11:50:09 +08:00
Mike Tzou
ee8a7beb41 Merge pull request #11143 from Chocobo1/updater
Move "Check for program updates" checkbox out of Advanced settings
2019-08-30 14:55:55 +08:00
Chocobo1
7e0daf1663 Setup pixmap cache in a proper place
There is no need to reset the cache limit to previous value as
QPixmapCache is an application wide cache.
Also raise the cache size to 64MB.
2019-08-30 14:51:27 +08:00
Chocobo1
47b9d8dbc6 Clean up Application class constructor 2019-08-30 14:51:07 +08:00
Mike Tzou
62a3938480 Merge pull request #11085 from Chocobo1/model
Better on-demand reloading of torrent data
2019-08-30 12:45:57 +08:00
Chocobo1
eb784b0d2e Move "Check for program updates" checkbox out of Advanced settings 2019-08-29 06:15:20 +08:00
Chocobo1
b921d96f4b Use Q_ASSERT() to check invariants 2019-08-29 06:07:44 +08:00
Chocobo1
72d1d5d2dd Cut down number of signal emits 2019-08-28 18:38:26 +08:00
Mike Tzou
4a9fc48dee Merge pull request #11135 from Chocobo1/fix
Initialize pointers
2019-08-28 15:40:12 +08:00
Chocobo1
60df790b82 Initialize pointers
Fixup aeabd2d625.
2019-08-28 13:08:36 +08:00
Mike Tzou
7ce26435bd Merge pull request #11126 from Chocobo1/addedTime
Fix wrong "added on" date
2019-08-28 12:04:23 +08:00
Mike Tzou
4a0f5a0c15 Merge pull request #11120 from Chocobo1/peerwidget
Clean up PeerListWidget class
2019-08-28 12:04:12 +08:00
Chocobo1
09503b58fa Clean up loadTorrentResumeData() 2019-08-27 15:01:50 +08:00
Chocobo1
f3ce76110b Simplify code
Instead of using dict_find_list() now we use the simpler dict_find()
since we are going to check its validness anyway.
2019-08-27 15:01:50 +08:00
Chocobo1
3a11c23efd Fix wrong "added on" date
This only happens for magnet links when its metadata has yet to be retrieved.
Closes #11124.
2019-08-27 15:01:50 +08:00
Chocobo1
0891cd4878 Avoid unecessary copying the parameter
Using forwarding reference here so that we won't get unnecessary copies
of the parameter passed to `slot`, for example a lambda function.
2019-08-27 14:30:03 +08:00
Chocobo1
aeabd2d625 Clean up PeerListWidget class 2019-08-27 14:30:03 +08:00
sledgehammer999
69f665ed01 Update Changelog 2019-08-24 19:44:23 +03:00
Mike Tzou
5c7f9530ee Merge pull request #11060 from Chocobo1/tracker
Improve embedded tracker
2019-08-22 12:18:56 +08:00
Mike Tzou
62a2374f49 Merge pull request #11105 from Chocobo1/activity
Handle invalid time activity properly
2019-08-22 12:18:18 +08:00
Mike Tzou
53ec25df28 Merge pull request #11099 from thalieht/rssdotstoicon
Use FileSystemPathEdit in automated rss downloader
2019-08-22 12:17:53 +08:00
Chocobo1
8d0d8e4dcb Improve embedded tracker
Now it conforms to BEPs more closely.
2019-08-21 18:05:50 +08:00
Chocobo1
fba72f5fb7 Simplify code 2019-08-21 17:46:11 +08:00
Chocobo1
bbecf87292 Handle invalid time activity properly
When there is no activity before m_nativeStatus.last_upload will be 0
and this commit will map it to -1 which retain the expected behavior as
before (libtorrent < 1.2 era).
2019-08-21 17:45:04 +08:00
thalieht
e26573d97f Use FileSystemPathEdit in automated rss downloader 2019-08-20 15:34:51 +03:00
Mike Tzou
9b611a6207 Merge pull request #11028 from Piccirello/webui-extract-localstorage
Extract WebUI localStorage access into class
2019-08-20 09:08:16 +08:00
Thomas Piccirello
7047974132 Extract WebUI localStorage access into class 2019-08-18 23:58:11 -07:00
Chocobo1
863c9f9876 Speed up lookup operation in TransferListModel
Previously lookup is O(n), add operation is O(n), remove operation is
O(n).
Now lookup is O(1), add operation is O(1), remove operation is O(n).
n is the number of torrents already recorded.
2019-08-19 11:33:14 +08:00
Chocobo1
9c964cdd97 Fix using out-of-bounds of indexes 2019-08-18 20:00:54 +08:00
Chocobo1
e3483c62ca Remove explicit conversion to QVariant 2019-08-18 20:00:43 +08:00
Chocobo1
1f3bf75fff Better on-demand reloading of torrent data 2019-08-17 15:44:16 +08:00
Mike Tzou
f339f629ae Merge pull request #11080 from Piccirello/remove_duplicate
Remove duplicate log line
2019-08-17 12:27:39 +08:00
Tom Piccirello
24ec4744df Remove duplicate log line 2019-08-15 13:05:28 -07:00
Chocobo1
94f7a095bb Implement proper equal operators 2019-08-16 01:35:41 +08:00
sledgehammer999
10afa8166b Bump to 4.2.0alpha1 2019-08-15 14:21:08 +03:00
sledgehammer999
26abbb12fa Update Changelog 2019-08-15 14:18:29 +03:00
Mike Tzou
d639c16f72 Merge pull request #11075 from Chocobo1/cache
Cache and reuse detected MIME type
2019-08-15 11:11:40 +08:00
Chocobo1
f907328bdc Add const to class function 2019-08-14 20:29:01 +08:00
Chocobo1
230949ee3b Cache and reuse detected MIME type 2019-08-14 17:51:19 +08:00
Mike Tzou
973da6feb8 Merge pull request #11066 from Chocobo1/i18n
Fix translation issues
2019-08-14 13:05:21 +08:00
Chocobo1
b34d90df0b Fix translation issues
By using disambiguation field instead of comment field to differentiate
translations.
2019-08-13 12:20:23 +08:00
Mike Tzou
8555629128 Merge pull request #11057 from Piccirello/fix-pref-saving
Don't save preferences until all options are processed
2019-08-13 11:41:54 +08:00
Mike Tzou
c15e8752ed Merge pull request #11053 from Piccirello/refactor_misc
Simplify WebUI function implementation
2019-08-13 11:41:35 +08:00
Vladimir Golovnev
2cac830749 Merge pull request #11054 from Piccirello/tom_organize_assets
Organize WebUI assets
2019-08-12 14:50:36 +03:00
Vladimir Golovnev
146ef69346 Merge pull request #11055 from glassez/rss-api
Allow to refresh RSS item(s) via WebAPI
2019-08-12 13:58:07 +03:00
Vladimir Golovnev (Glassez)
e649559650 Allow to refresh RSS item(s) via WebAPI 2019-08-12 07:39:23 +03:00
Tom Piccirello
bed143cafa Don't save preferences until all options are processed 2019-08-11 13:44:18 -07:00
Thomas Piccirello
085ae05f19 Move WebUI views into separate folder 2019-08-10 22:14:08 -07:00
Thomas Piccirello
f214dd233b Rename WebUI content files 2019-08-10 22:14:01 -07:00
Thomas Piccirello
b3f9b9e9b2 Rename WebUI toolbar files 2019-08-10 22:13:56 -07:00
Thomas Piccirello
3f8f9a3962 Remove html tags from inline page
This page's content is inserted into the existing page, so the presence of an <html> tag is incorrect.
2019-08-10 22:09:58 -07:00
Thomas Piccirello
feb1570c48 Simplify function implementation 2019-08-10 22:08:15 -07:00
Vladimir Golovnev
2d28f50acd Merge pull request #10928 from Piccirello/webui-search-filter
Support exclusions in WebUI table filters
2019-08-10 21:46:11 +03:00
Mike Tzou
767f024585 Merge pull request #7475 from thalieht/ratiosuperseed
Add option to enable Super Seeding mode once ratio/time limit is reached. Closes #7160.
2019-08-10 11:33:09 +08:00
Mike Tzou
2f32b0962e Merge pull request #11049 from Chocobo1/python
Update outdated strings
2019-08-10 11:32:09 +08:00
thalieht
1f6f1716ad Enable Super Seeding mode once ratio/time limit is reached 2019-08-09 13:06:34 +03:00
Chocobo1
6ac36368cd Update user agent string 2019-08-09 13:12:11 +08:00
Chocobo1
0b6c1694b4 Update python installer URL 2019-08-09 12:47:52 +08:00
Mike Tzou
2427f5d324 Merge pull request #11041 from Chocobo1/splitRef
Revise operations in TorrentHandle class
2019-08-09 12:27:44 +08:00
Mike Tzou
2f28365bfa Merge pull request #11040 from Chocobo1/options
Clean up GUI code
2019-08-09 12:27:14 +08:00
Chocobo1
8d6b9b6181 Revise sort model and delegate code 2019-08-08 22:17:18 +08:00
Chocobo1
061219d0a2 Simplify code 2019-08-08 21:25:28 +08:00
Chocobo1
c420ff29af Revise operations in TorrentHandle class 2019-08-08 18:57:54 +08:00
Chocobo1
b5b678c58f Replace QString::split() by faster alternatives 2019-08-08 18:57:54 +08:00
Mike Tzou
bd493e261e Merge pull request #10523 from Chocobo1/port
Use a randomized port number for the first run
2019-08-08 14:12:54 +08:00
Chocobo1
c61116882b Clean up TransferListModel class 2019-08-08 13:15:47 +08:00
Chocobo1
dcf632b39c Remove redundant margin properties
Those are the same with the default values.
2019-08-08 13:15:47 +08:00
Chocobo1
672b44acba Let OS assign listening port
This applies when "Use different port on startup" option is selected.
2019-08-08 13:14:25 +08:00
Chocobo1
c19f8f6b5e Use a randomized port number for the first run 2019-08-08 13:14:23 +08:00
Mike Tzou
1eeac90a29 Merge pull request #11027 from airium/sort-name
Sort torrent names case-insensitively in webui
2019-08-08 13:02:19 +08:00
Mike Tzou
f31bcc384e Merge pull request #11030 from qbittorrent/webui-increase-window-height
Increase WebUI window heights
2019-08-08 13:01:38 +08:00
Vladimir Golovnev
5558092c1e Merge pull request #11033 from glassez/cmake
CMake: Fix Windows build (once again)
2019-08-07 20:31:32 +03:00
Vladimir Golovnev (Glassez)
6bfa4370b7 CMake: Fix Windows build 2019-08-06 21:50:39 +03:00
airium
2ded6dc636 Sort torrent names case-insensitively in webui 2019-08-06 21:13:36 +08:00
Thomas Piccirello
6b1481d328 Increase WebUI window heights
Using a max height of 600px to avoid unnecessarily tall windows.
2019-08-06 01:48:31 -07:00
Thomas Piccirello
b829a0c687 Support exclusions in WebUI table filters
Closes #10241
2019-08-05 22:55:36 -07:00
Mike Tzou
c65c40a5cb Merge pull request #11020 from Piccirello/remove_workaround
Remove Qt bug workaround
2019-08-06 10:17:52 +08:00
Mike Tzou
7f1bff4eb4 Merge pull request #11017 from Chocobo1/apictrl
Improvements to APIController class
2019-08-06 10:17:27 +08:00
Mike Tzou
ec4240dd06 Merge pull request #11016 from Chocobo1/vista
Raise minimum support to Windows 7
2019-08-06 10:17:11 +08:00
Mike Tzou
d8f0c245f4 Merge pull request #11012 from Piccirello/changelog
Sync Changelog entries between branches
2019-08-06 10:16:46 +08:00
Mike Tzou
2b617b0e71 Merge pull request #11010 from Chocobo1/qvector
Replace QList by QVector
2019-08-06 10:16:28 +08:00
Mike Tzou
7d598b18ca Merge pull request #10158 from Piccirello/webui-peers-table
Add ability to add and ban a peer from the Web UI
2019-08-06 10:16:09 +08:00
Mike Tzou
733da5ffdb Merge pull request #10153 from Piccirello/webui-files-table
Display files hierarchically in Web UI content tab
2019-08-06 10:15:22 +08:00
Chocobo1
d92bf13706 Use a QString directly instead of QStringList 2019-08-05 20:56:16 +08:00
Chocobo1
e90a2c00a5 Replace QList by QVector 2019-08-05 20:56:15 +08:00
Thomas Piccirello
378504de2b Remove Qt bug workaround
The Qt bug is fixed in 5.7.1, while we require Qt >= 5.9.0.
2019-08-05 01:27:47 -07:00
Thomas Piccirello
0fa28f233f Add ability to add and ban a peer from the Web UI 2019-08-05 01:12:59 -07:00
Chocobo1
f4e7b8c6bf Replace QMap with QHash 2019-08-05 09:51:39 +08:00
Chocobo1
c004a84f84 Avoid redundant actions/conversions
QSet::contains(QSet &) isn't doing anything magical it still has the usual loop
inside, so lets just save all the container conversions and do the loop ourselves.
2019-08-05 09:51:38 +08:00
Chocobo1
a3ca277eaf Avoid back and forth string conversions 2019-08-05 09:42:38 +08:00
Mike Tzou
6cc7c700b8 Merge pull request #11000 from Chocobo1/sync
Clean up WebAPI code
2019-08-05 09:41:59 +08:00
Thomas Piccirello
60a1835813 Display files hierarchically in Web UI content tab 2019-08-04 16:02:41 -07:00
Thomas Piccirello
bc8f9840e2 Sync Changelog entries between branches
Closes #10959.
2019-08-04 14:27:22 -07:00
Chocobo1
2f0ae7a7d8 Raise minimum support to Windows 7 2019-08-05 02:31:19 +08:00
Vladimir Golovnev
f4329779e9 Merge pull request #11005 from glassez/cmake
Fix/Improve Cmake scripts
2019-08-03 10:02:01 +03:00
Vladimir Golovnev (Glassez)
6fe063146f CMake: Apply QBT_ADDITONAL_FLAGS on all systems 2019-08-02 19:32:56 +03:00
Vladimir Golovnev (Glassez)
3093751fa4 CMake: Fix compilation on Windows with MSVC 2019-08-02 19:32:53 +03:00
Vladimir Golovnev (Glassez)
7d636d8c3f CMake: Accept <Package>_ROOT from environment 2019-08-02 19:32:48 +03:00
Chocobo1
2346bc8f7c Replace obsoleted QDateTime::toTime_t() 2019-08-01 23:19:21 +08:00
Chocobo1
cfe83275d3 Avoid redundant data copy by using JSON objects directly 2019-08-01 23:18:50 +08:00
Chocobo1
f6ee96ed83 Replace QVariantMap by QVariantHash 2019-07-31 23:48:41 +08:00
Chocobo1
7f300b757f Use C++11 uniform initialization 2019-07-31 23:48:41 +08:00
Chocobo1
bad588a749 Move data keys into anonymous namespace and sort them 2019-07-31 23:48:41 +08:00
Chocobo1
25a94ee60a Avoid redundant data conversions and lookups 2019-07-31 23:48:41 +08:00
Mike Tzou
c0fc4e6d90 Merge pull request #10993 from Piccirello/adjust-verbiage
Adjust wording to sound more natural
2019-07-31 14:24:58 +08:00
Mike Tzou
3811612f80 Merge pull request #10982 from Chocobo1/cleanup
Code base cleanup
2019-07-31 14:24:42 +08:00
Chocobo1
c1659a189b Fix messed up symbols in log 2019-07-31 02:10:22 +08:00
Chocobo1
3ab2fe907f Remove Windows XP remnants 2019-07-31 02:10:22 +08:00
Chocobo1
cdb0db02f9 Replace obsoleted QSysInfo functions 2019-07-31 02:10:22 +08:00
Chocobo1
25c56d3b66 Make use of Utils::Misc::loadWinAPI 2019-07-31 02:10:22 +08:00
Chocobo1
5c015d573b Forward declare types as much as possible 2019-07-31 02:10:22 +08:00
Tom Piccirello
eaa700791b Adjust wording to sound more natural 2019-07-29 00:31:09 -07:00
Mike Tzou
45690967a0 Merge pull request #10970 from Piccirello/webui-search-context-menu
Add context menu to Web UI search table
2019-07-29 12:01:18 +08:00
Mike Tzou
fd17b9bbf0 Merge pull request #10988 from Chocobo1/qbext
Fix incomplete file extension not applied for new torrents
2019-07-29 11:17:38 +08:00
Chocobo1
38fa6d2aee Fix incomplete file extension not applied for new torrents 2019-07-28 13:05:46 +08:00
Mike Tzou
7da2d04898 Merge pull request #10941 from Piccirello/fix-webui-magnet-trackers
Fix WebUI removing parameters from magnet links
2019-07-27 11:50:54 +08:00
Chocobo1
7ab3479a34 Replace static_cast by qOverload 2019-07-26 22:32:18 +08:00
Chocobo1
ee0d2d2220 Move fspathedit_p to private folder 2019-07-26 22:32:18 +08:00
Chocobo1
ca44b40222 Move variables to the proper scope 2019-07-26 22:32:18 +08:00
Thomas Piccirello
c17d653544 Fix WebUI removing parameters from magnet links
Closes #10939
2019-07-26 03:18:16 -07:00
Thomas Piccirello
65dfec9acf Minor refactor on WebUI download page 2019-07-26 03:17:33 -07:00
Thomas Piccirello
6ea6e52d99 Add context menu to Web UI search table
Web UI implementation of #10852.
2019-07-26 02:54:11 -07:00
Thomas Piccirello
35ebd9a095 Default WebUI search tab to enabled
Search plugins and categories are now retrieved when the Search tab is first switched to. This prevents possible unnecessary instantiation of the SearchPluginManager.
2019-07-26 02:53:09 -07:00
Thomas Piccirello
e0037b819a Always send paths with '/' as file separator 2019-07-26 01:03:22 -07:00
Thomas Piccirello
93c8be5b5d Ignore npm installed packages 2019-07-26 01:02:32 -07:00
Mike Tzou
f121e67aba Merge pull request #10954 from Chocobo1/column
Add availability column
2019-07-26 02:09:22 +08:00
Chocobo1
19b8a52e44 Add helper function to convert to fixed-point string 2019-07-25 13:17:14 +08:00
Chocobo1
60faba60ea Add availability column
Closes #1632.
2019-07-25 13:17:14 +08:00
Mike Tzou
cfedbf8e6b Merge pull request #10973 from Chocobo1/peeraddr
Improve parsing in BitTorrent::PeerAddress::parse
2019-07-25 12:09:29 +08:00
Chocobo1
9d88dd2604 Rename class variables 2019-07-24 22:22:02 +08:00
Chocobo1
ccec50e18e Improve parsing in BitTorrent::PeerAddress::parse 2019-07-24 22:22:02 +08:00
Mike Tzou
cf47342cec Merge pull request #10527 from fusioneer-GitHub/webui_tags
Implement tag management for WebUI
2019-07-24 22:07:31 +08:00
Vladimir Golovnev
02ab77053e Merge pull request #10961 from glassez/fastresume
Save updated resume data for completed torrents
2019-07-23 18:47:30 +03:00
Mike Tzou
ce81103398 Merge pull request #10839 from Piccirello/gui-files-table-file-size
Update remaining size of ignored files to 0
2019-07-23 22:57:32 +08:00
Vasiliy Halimonchuk
7fb1e07b39 Remove unused variables 2019-07-23 13:31:50 +03:00
Vasiliy Halimonchuk
80d1c48f0d Fix typos 2019-07-23 13:31:49 +03:00
Vasiliy Halimonchuk
fe0fb3a251 Refactor var to let/const or this 2019-07-23 13:31:43 +03:00
Vasiliy Halimonchuk
b530e19a44 Implement tag management for WebUI 2019-07-23 13:30:11 +03:00
Vladimir Golovnev
cf2e7d77d6 Merge pull request #10950 from glassez/drop-deprecated
Don't use deprecated libtorrent features
2019-07-23 09:19:15 +03:00
Vladimir Golovnev
431ab095e8 Merge pull request #10963 from glassez/peeraddress
Extract PeerAddress class into separate file
2019-07-23 08:40:48 +03:00
Vladimir Golovnev (Glassez)
4021a0c7ce Store libtorrent native file index in QHash 2019-07-23 06:43:39 +03:00
Vladimir Golovnev (Glassez)
3d70ebfc46 Save updated resume data for completed torrents
If fastresume data was rejected we need to save updated
resume data after torrent finishes rechecking.
2019-07-23 06:32:13 +03:00
Vladimir Golovnev (Glassez)
ad6a40d5f4 Extract PeerAddress class into separate file 2019-07-23 06:27:35 +03:00
Vladimir Golovnev (Glassez)
b822d2c380 Fix requested torrent resume data handling
Session should increase an appropriate counter each time
the torrent resume data is requested to save.
2019-07-22 14:22:26 +03:00
Thomas Piccirello
1b23a27acb Update remaining size of ignored files to 0
Also fixes a bug where ignoring the last item within a folder wouldn't recalculate the folder's size
2019-07-21 12:51:35 -07:00
Vladimir Golovnev
efae685c25 Merge pull request #10951 from glassez/cmake
Improve CMake configuration
2019-07-21 19:34:02 +03:00
Vladimir Golovnev (Glassez)
60ffa3030e Don't use deprecated libtorrent features 2019-07-21 19:28:28 +03:00
Vladimir Golovnev (Glassez)
38cf1fb3ee Improve CMake configuration
Don't search for QtSingleApplication library.
Fix building on Windows with MinGW.
2019-07-21 16:41:17 +03:00
Mike Tzou
4f06c091c9 Merge pull request #10949 from Chocobo1/inject
Prevent command injection via "Run external program" function
2019-07-21 12:05:02 +08:00
Chocobo1
a610c8567e Prevent command injection via "Run external program" function
Closes #10925.
2019-07-20 17:42:09 +08:00
Mike Tzou
e53d4e5ff7 Merge pull request #10946 from Chocobo1/override
Add override keyword to functions
2019-07-20 11:37:19 +08:00
Chocobo1
4a90716843 Add override keyword to functions 2019-07-19 11:58:56 +08:00
Mike Tzou
45eba9ec31 Merge pull request #10944 from Chocobo1/cmake
Improve CMake build system
2019-07-19 11:52:33 +08:00
Chocobo1
752d4b85ea Remove compiler warning flags
Apperently nobody care about those warnings so just remove them and let
other more important warnings stand out.
2019-07-18 14:54:51 +08:00
Chocobo1
4153a2e2af Use 2 cpus when compiling on coverity_scan branch 2019-07-18 14:54:51 +08:00
Mike Tzou
7f3291c3de Merge pull request #10942 from Chocobo1/cpp
Move implementation to its own file
2019-07-18 14:06:00 +08:00
Mike Tzou
937c5be4a9 Merge pull request #10931 from Piccirello/webui-mobile-longpress
Add WebUI support for triggering context menus on mobile
2019-07-18 14:01:44 +08:00
Chocobo1
07263d2d70 Move implementation to its own file 2019-07-18 00:30:44 +08:00
Mike Tzou
1e70c52e7a Merge pull request #10934 from Chocobo1/delete
Rely on Qt ownership to delete class members
2019-07-17 12:02:30 +08:00
Vladimir Golovnev
620e1be5a7 Merge pull request #10914 from jagannatharjun/icon-provider
Incorporate GuiIconProvider inside UIThemeManager
2019-07-17 04:39:51 +03:00
Chocobo1
7a5e883cd2 Revise inline keyword usage
And let compiler decide whether to inline functions.
2019-07-16 18:42:55 +08:00
Chocobo1
f6f8aaf3db Put internal function into anonymous namespace 2019-07-16 18:42:26 +08:00
Chocobo1
f993230582 Use uniform initialization 2019-07-16 18:42:26 +08:00
Chocobo1
e74b984a0a Rely on Qt ownership to delete class members 2019-07-16 18:42:26 +08:00
Thomas Piccirello
6af01cfcbe Add WebUI support for triggering context menus on mobile 2019-07-16 02:21:36 -07:00
Thomas Piccirello
f441d561a2 Refactor duplicate code 2019-07-16 01:37:35 -07:00
Prince Gupta
8267a4fef9 Incorporate GuiIconProvider inside UIThemeManager 2019-07-16 09:31:33 +05:30
Mike Tzou
7071c5bda0 Merge pull request #10927 from Piccirello/webui-right-click
Move WebUI copy actions under a submenu
2019-07-16 11:17:55 +08:00
Mike Tzou
a887e1c295 Merge pull request #10926 from Piccirello/webui-protocol-handler
Move registering WebUI magnet handler behind toolbar option
2019-07-16 11:17:24 +08:00
Vladimir Golovnev
17541b0d34 Merge pull request #10921 from glassez/ignore-actions
Ignore some actions on uninitialized torrents
2019-07-15 08:44:42 +03:00
Thomas Piccirello
ba40719d76 Move WebUI copy actions under a submenu 2019-07-14 20:25:11 -07:00
Mike Tzou
e1d073bc6d Merge pull request #10877 from jerrymakesjelly/advanced-preferences
Add advanced options in WebUI
2019-07-15 10:11:09 +08:00
Mike Tzou
94e2c44840 Merge pull request #10918 from Chocobo1/trackers
Various code clean up
2019-07-15 09:59:45 +08:00
Thomas Piccirello
1c3c81db99 Fix missing parenthesis
Introduced in #9995.
2019-07-14 17:41:11 -07:00
Thomas Piccirello
324d20d42c Move registering WebUI magnet handler behind toolbar option
Alert the user if the operation fails due to lack of browser support
2019-07-14 17:40:42 -07:00
Vladimir Golovnev (Glassez)
87d98403f4 Don't break torrent checking 2019-07-14 12:34:50 +03:00
Vladimir Golovnev (Glassez)
9462685c78 Ignore some actions on uninitialized torrents
Some actions can lead to an inconsistent state if applied
to an uninitialized torrent, so we just ignore them.
2019-07-14 12:34:28 +03:00
Vladimir Golovnev
b9da9ebfdf Merge pull request #10910 from glassez/fix-add-torrent
Avoid race conditions when adding torrent
2019-07-14 10:45:05 +03:00
Mike Tzou
75a2274b66 Merge pull request #9995 from thalieht/rename-queue
Rename priority to queue in the context of torrents
2019-07-14 11:13:59 +08:00
Chocobo1
7b568b07e6 Clean up CMakeLists.txt 2019-07-13 19:55:13 +08:00
Chocobo1
032883e278 Move LineEdit files out of subfolder 2019-07-13 19:46:53 +08:00
Chocobo1
23ebb3134b Move QLabels out of class 2019-07-13 19:38:37 +08:00
Chocobo1
cc663746eb Forward declare some classes 2019-07-13 19:38:37 +08:00
thalieht
e917c371d9 Use camelCase for a few WebUI vars 2019-07-13 14:04:16 +03:00
thalieht
7b31868e3c Rename priority to queue in the context of torrents 2019-07-13 14:04:16 +03:00
Vladimir Golovnev (Glassez)
644dc9792d Avoid race conditions when adding torrent 2019-07-13 12:06:07 +03:00
Zhaoyu Gan
07649f713e Add advanced options in WebUI 2019-07-13 14:41:26 +08:00
Chocobo1
599bfc0735 Use Qt object ownership to handle QShortcut deletions 2019-07-13 13:24:27 +08:00
Chocobo1
662e1e6134 Clean up code in TrackerListWidget class 2019-07-13 12:53:26 +08:00
Mike Tzou
afa73d4e89 Merge pull request #10916 from Chocobo1/automanaged
Implement tri-state checkbox action in menu
2019-07-13 11:24:53 +08:00
Chocobo1
b55c6a360a Implement tri-state checkbox action in menu
The new TriStateAction class is an improvement of the old one in the
sense that:
1. Have public method to set states.
2. Can connect to the usual Qt slots.
3. Draws checkbox at the correct offset (where QAction draws) in menu
   and better handling of mouse clicking and keyboard navigating.
2019-07-12 19:57:31 +08:00
Mike Tzou
0aa6f39db0 Merge pull request #10867 from airium/master
Avoid word wrap in webui footer
2019-07-12 11:00:23 +08:00
Mike Tzou
24932f6cb6 Merge pull request #10895 from Chocobo1/tracker
Add dialog to mass edit torrent's tracker
2019-07-12 10:59:50 +08:00
Chocobo1
8eabaf5eb2 Replace QList by QVector 2019-07-11 12:10:19 +08:00
Chocobo1
9e7f50517e Add "Tracker entries" dialog 2019-07-11 12:10:19 +08:00
Mike Tzou
51fa98aa0b Merge pull request #10702 from jagannatharjun/qss-styling
Allow Styling through QSS
2019-07-10 19:32:19 +08:00
Vladimir Golovnev
7d67cc5de7 Merge pull request #10871 from glassez/fix-torrent-checking
Fix torrent checking issues
2019-07-10 06:35:30 +03:00
Prince Gupta
a24925c858 Allow styling with QSS stylesheets 2019-07-09 19:56:55 +05:30
Vladimir Golovnev (Glassez)
9399b876eb Fix torrent checking issues
Start all torrents auto-managed to prevent simultaneous checking
of multiple torrents.
Handle checking state of paused torrent to prevent it from being
resumed when qBittorrent is closed until checking isn't complete.
2019-07-09 08:54:50 +03:00
Mike Tzou
91742d4a53 Merge pull request #10870 from Chocobo1/libt
Use newer libtorrent API (part 5)
2019-07-06 10:57:08 +08:00
Chocobo1
b9094ff8a5 Use proper log message when there are no error 2019-07-05 23:46:12 +08:00
Chocobo1
664cfe7d69 Fix torrent properties not saved for paused torrents 2019-07-05 23:46:12 +08:00
Chocobo1
c4dbe84832 Use newer libtorrent API 2019-07-05 23:46:12 +08:00
Mike Tzou
33b225ac6d Merge pull request #10879 from Chocobo1/listen
Add more libtorrent options to Advanced Settings
2019-07-04 06:28:25 +08:00
Chocobo1
ed2199b91c Add "File pool size" option 2019-07-03 18:06:07 +08:00
Chocobo1
6286bc716c Add "Socket backlog size" option
The default value in libtorrent is 5 which is too small nowadays.
The new default value 30 is chosen to be in line with
QTcpServer::maxPendingConnections().
2019-07-03 17:36:56 +08:00
Chocobo1
73cf3fb68f Use LogMsg() helper 2019-07-02 22:34:22 +08:00
Mike Tzou
4b25f87859 Merge pull request #10874 from Chocobo1/qt
Replace obsoleted Qt functions
2019-07-02 10:57:06 +08:00
Vladimir Golovnev
38362664ce Merge pull request #10866 from glassez/instman
Incorporate QtSingleApplication logic into qBittorrent codebase
2019-07-01 17:58:43 +03:00
Chocobo1
e6c448aa4f Replace obsoleted QProcess::finished(int)
It is replaced by QProcess::finished(int, QProcess::ExitStatus).
2019-07-01 19:08:37 +08:00
Chocobo1
4eff268095 Replace obsoleted QFontMetrics::width()
Qt 5.13 marked QFontMetrics::width() obsolete.
2019-07-01 14:48:53 +08:00
Vladimir Golovnev (Glassez)
c7f3693ad1 Implement "Application instances manager" 2019-06-30 20:02:46 +03:00
Mike Tzou
c0557c296a Merge pull request #10865 from Chocobo1/libt
Use newer libtorrent API (part 4)
2019-06-29 15:28:12 +08:00
Mike Tzou
11000412d8 Merge pull request #10864 from Chocobo1/qapp
Tighten up qtsingleapplication
2019-06-29 15:27:58 +08:00
airium
b389650465 Avoid word wrap in webui footer 2019-06-29 01:15:59 +08:00
Chocobo1
2bc91fba3e Use newer libtorrent API 2019-06-28 20:36:31 +08:00
Chocobo1
46ee193cd8 Restrict QLocalServer access
The default is world access which means even even unprivileged local
accounts can connect to it too.
2019-06-28 09:40:21 +08:00
Chocobo1
6119cb370f Drop suspiciously large data
This is to avoid exhausting system memory.
2019-06-27 20:29:02 +08:00
Mike Tzou
cd654d61fd Merge pull request #10852 from Chocobo1/menu
Improvements to search widget
2019-06-27 10:49:38 +08:00
Mike Tzou
a305032c39 Merge pull request #10853 from Chocobo1/limits
Adjust open file descriptor limit on startup
2019-06-27 10:49:17 +08:00
Chocobo1
da2bfd2457 Replace QList by QVector 2019-06-26 20:30:07 +08:00
Chocobo1
5b9b5ce577 Remove buttons from search widget
These buttons are replaced by right-click menu actions.
2019-06-26 20:30:07 +08:00
Chocobo1
4f5302adf8 Add more copy field actions to search widget
Closes #10250.
2019-06-26 20:30:07 +08:00
Chocobo1
d0bfe9a661 Adjust open file descriptor limit on startup
This raises qbt's open file descriptor limit to the available maximum
(within user privileges) and thus users don't need to adjust it
manually anymore.
2019-06-26 14:08:43 +08:00
Chocobo1
26ff9150a2 Rename label in search widget 2019-06-26 10:52:13 +08:00
Mike Tzou
3d6041ebbd Merge pull request #10850 from Chocobo1/menu
Right click menu improvements
2019-06-26 10:45:45 +08:00
Chocobo1
af5af0ad3f Remove unused lambda capture 2019-06-25 16:12:51 +08:00
Chocobo1
32a861fd1b Add right click menu to SearchJobWidget 2019-06-25 16:12:51 +08:00
Chocobo1
cf89c2f5bf Properly deallocate actions when menu closed
Fixup 3748b995ff.
2019-06-24 11:02:35 +08:00
Chocobo1
412e326cf2 Avoid allocating a new menu/action manually 2019-06-24 11:02:35 +08:00
Chocobo1
04e7b3f6d2 Move copy actions under a submenu 2019-06-24 11:02:34 +08:00
Mike Tzou
8d9b4a19bd Merge pull request #10844 from Chocobo1/cache
Remove upper limit of disk cache setting
2019-06-24 11:01:05 +08:00
Mike Tzou
ded825e419 Merge pull request #10843 from Chocobo1/boost
Remove workaround for boost 1.39
2019-06-24 11:00:47 +08:00
Chocobo1
8220f8d003 Remove MSVC-only compilation flags
Our code base is able to compile without warnings
even when these flags removed.
2019-06-23 12:38:03 +08:00
Chocobo1
7c8948c45e Move _FILE_OFFSET_BITS to its place
_FILE_OFFSET_BITS is only useful for glibc.
2019-06-23 11:44:21 +08:00
Chocobo1
e418ea03e2 Move __USE_W32_SOCKETS to its place
From boost.asio documentation:
> The following platforms may also work:
>   Win32 using Cygwin. (__USE_W32_SOCKETS must be defined.)
2019-06-23 11:39:23 +08:00
Chocobo1
0b1b3c1f84 Use numeric_limits instead of constants from C
In C++, using numeric_limits is more idiomatic compared to using constants.
2019-06-23 11:16:58 +08:00
Chocobo1
38b6ee9e75 Remove workaround for boost 1.39
... by raising minimum version to 1.40.
Bug report: https://svn.boost.org/trac10/ticket/3095
2019-06-23 11:09:05 +08:00
Chocobo1
75c80c3716 Remove limits of "Disk cache expiry interval" setting 2019-06-22 17:13:26 +08:00
Chocobo1
042cd4267f Remove upper limit of "Disk cache" setting 2019-06-22 17:13:24 +08:00
Mike Tzou
1831f71cc4 Merge pull request #10833 from Chocobo1/invokeMethod
Use functor based QMetaObject::invokeMethod
2019-06-22 11:24:47 +08:00
Mike Tzou
17c601e8b8 Merge pull request #10835 from Chocobo1/exec
Avoid creating unnecessary event loops
2019-06-22 11:24:20 +08:00
Mike Tzou
5e76f7d699 Merge pull request #10838 from Piccirello/webui-rename-char-encoding
Fix WebUI encoding of special characters
2019-06-22 11:23:44 +08:00
Mike Tzou
34fbaf3325 Merge pull request #10830 from jagannatharjun/fix-cmake
Fix CMake Windows compilation
2019-06-22 11:23:12 +08:00
Prince Gupta
ece70daaa5 Fix CMake Windows compilation 2019-06-21 18:05:19 +05:30
Tom Piccirello
368fbd9e7d Fix encoding of special characters
Special characters would get html encoded (& -> &amp;). This has been tested against several payloads (e.g. <script>alert(0)</script>) to ensure it's not vulnerable to XSS.
2019-06-20 22:15:32 -07:00
Chocobo1
e47d7fe55c Remove outdated defines 2019-06-21 01:48:55 +08:00
Chocobo1
11fdf91196 Suppress compiler warning
The debug message is emitting a format mismatch warning.
Fixup 4880dc812c.

And add curly brackets to if statement.
2019-06-21 00:32:12 +08:00
Chocobo1
88c3ffbef8 Avoid creating unnecessary event loops
This is part 2.
2019-06-20 11:42:54 +08:00
Chocobo1
e31c1ca780 Use functor based QMetaObject::invokeMethod 2019-06-20 11:36:38 +08:00
Mike Tzou
183db3475a Merge pull request #10816 from Chocobo1/ioerror
Misc. fixes
2019-06-20 11:35:37 +08:00
Chocobo1
4880dc812c Use appropriate type 2019-06-19 18:52:24 +08:00
Chocobo1
516c968373 Support year unit in userFriendlyDuration() 2019-06-19 18:52:24 +08:00
Chocobo1
1de4c2497c Fix wrong "Time Active" value displayed
Closes #9612.
2019-06-19 18:52:24 +08:00
Chocobo1
19f50a363d Fix crash when removing phantom tags
Normally a tag is stored in both session and torrent's fastresume.
A phantom tag is a tag that is stored in fastresume but not in
session.
This crash can occur when user resets his config file and choose
to remove tag from torrent.

Closes #10569.
2019-06-19 18:52:24 +08:00
Chocobo1
e83019bdfa Set wheel event to accepted only if we handle it 2019-06-19 18:52:24 +08:00
Chocobo1
a6c5a90630 Remove redundant variable 2019-06-19 18:52:24 +08:00
Chocobo1
3b015db77d Add comparison operators for ProxyConfiguration 2019-06-19 18:52:24 +08:00
Chocobo1
623210df58 Improve handleFileErrorAlert error message 2019-06-19 18:52:23 +08:00
Mike Tzou
cfd02a4355 Merge pull request #10786 from Chocobo1/dialog
Avoid creating unnecessary event loops
2019-06-19 11:02:09 +08:00
Mike Tzou
68da10c39d Merge pull request #10710 from Kolcha/mac-icon
Add some padding to macOS app icon
2019-06-18 19:58:49 +08:00
Vladimir Golovnev
ec33cdd8b5 Merge pull request #10811 from glassez/fix-unclear-name
Rename "fromNativePath" to "toUniformPath"
2019-06-18 09:15:50 +03:00
Vladimir Golovnev (Glassez)
8e65317d61 Rename "fromNativePath" to "toUniformPath"
Unlike "toNativePath" which name clearly reflects the function result
"fromNativePath" has no such clear meaning.
Since this function converts path into uniform format "toUniformPath"
is better name.
2019-06-17 15:55:49 +03:00
Chocobo1
3748b995ff Avoid creating unnecessary event loops
The `exec()` method will create another event loop and transfer
control over there which might introduce unexpected bugs.
2019-06-17 20:44:57 +08:00
Mike Tzou
206bb018dd Merge pull request #10801 from Chocobo1/timeout
Add WebAPI session timeout settings
2019-06-17 00:18:01 +08:00
Mike Tzou
46d445d042 Merge pull request #10792 from Chocobo1/rename2
Remove empty leftover folders after rename properly
2019-06-16 12:22:22 +08:00
Chocobo1
a64f3bbc6a Reorder if conditions slightly 2019-06-15 19:08:24 +08:00
Chocobo1
9893a415c0 Fix updated save path not saved for paused torrents 2019-06-15 19:08:23 +08:00
Chocobo1
7d860b6c24 Log save_resume_data_failed_alert 2019-06-15 19:08:23 +08:00
Chocobo1
4e87aebf55 Don't remove parent directories
QDir::rmpath removes *all* parent directories while QDir::rmdir removes
the specified directory.
2019-06-15 19:08:23 +08:00
Chocobo1
440860c4a9 Properly remove empty leftover folders after rename
TorrentInfo::origFilePath will return the very original path from
.torrent file, not the most recent file path before the rename operation
and thus the code would not be working as we expected.
2019-06-15 19:08:23 +08:00
Chocobo1
89124bdcc8 Add WebAPI session timeout settings
Raise default timeout to 1 hour.
2019-06-15 18:57:19 +08:00
Mike Tzou
fa3ad7eb57 Merge pull request #10800 from silverqx/focus-behavior-row-options-dlg
Focus behavior row in Options dialog
2019-06-15 11:47:08 +08:00
silverqx
3e97793ef1 Focus behavior row in Options dialog 2019-06-13 17:31:54 +02:00
Mike Tzou
a65f36592a Merge pull request #10788 from silverqx/add-zlib-version-to-gui
Add zlib version to GUI & stackdump
2019-06-13 09:41:42 +08:00
silverqx
4f4f435e76 Add zlib version to GUI & stackdump 2019-06-12 08:02:24 +02:00
Mike Tzou
3a0f0c2f58 Merge pull request #10769 from Chocobo1/rename
Fix unable to rename folder on Windows. Closes #9151.
2019-06-10 10:30:01 +08:00
Mike Tzou
56f0d0fef5 Merge pull request #10781 from Chocobo1/web
Avoid double lookup
2019-06-10 10:27:14 +08:00
Chocobo1
8191f1498a Log file rename failed errors 2019-06-09 19:07:43 +08:00
Chocobo1
eabcae1018 Fix unable to rename folder on Windows
The bug occurs when the new path and old path only differ by letter case.
2019-06-09 19:07:43 +08:00
Chocobo1
9c747d3c6d Move renameSelectedFile(BitTorrent::TorrentInfo &) 2019-06-09 19:07:43 +08:00
Chocobo1
62ccfd37b2 Move renameSelectedFile(BitTorrent::TorrentHandle *) 2019-06-09 19:07:43 +08:00
Chocobo1
5b9ff4a015 Avoid double lookup 2019-06-09 18:56:52 +08:00
Mike Tzou
63b0a5b78c Merge pull request #10775 from Chocobo1/speed
Misc. improvements
2019-06-09 01:57:20 +08:00
Chocobo1
7c9309aa52 Fix wrong indentation 2019-06-08 10:54:04 +08:00
Mike Tzou
370544764e Merge pull request #10750 from Chocobo1/modal
Fix unable to control add torrent dialogs when opened simultaneously
2019-06-06 23:16:35 +08:00
Mike Tzou
f3c0cc3cee Merge pull request #10763 from Chocobo1/connect
Use Qt5 connect syntax
2019-06-06 10:18:46 +08:00
Mike Tzou
c95650c4f3 Merge pull request #10752 from thalieht/fw-declare
Forward declare and remove some unused #include
2019-06-06 10:18:26 +08:00
Chocobo1
431e7179ac Remove redundant variable 2019-06-06 00:20:57 +08:00
Chocobo1
fbd5699786 Use switch statement 2019-06-06 00:15:09 +08:00
Chocobo1
e071c31a4e Use Qt5 connect syntax 2019-06-05 14:17:44 +08:00
Chocobo1
dc9d0ed76f Fix unable to control add torrent dialogs when opened simultaneously 2019-06-05 13:24:49 +08:00
Chocobo1
03fdc0e1c4 Remove redundant disconnect()
The dialog is going out-of-scope in these instance and the signal-slot connection will disconnect
automatically.
2019-06-05 13:22:50 +08:00
Chocobo1
014273d7ec Drop support for "BC Link" format
Fixup 19d6de795c.
2019-06-05 00:42:46 +08:00
thalieht
70f8882f87 Group Qt forward declarations separately from the others 2019-06-04 17:48:55 +03:00
thalieht
9995967fbf Remove some unused #include 2019-06-04 17:48:55 +03:00
thalieht
4370a7eb12 Forward declare in a few places 2019-06-04 17:48:55 +03:00
Vladimir Golovnev
6f6033cf1c Merge pull request #10754 from glassez/fix-magnet
Disable "Upload mode" when start preloaded torrent. Closes #10751
2019-06-04 10:56:11 +03:00
Vladimir Golovnev (Glassez)
b644d6685f Disable "Upload mode" when start preloaded torrent 2019-06-04 07:14:21 +03:00
Vladimir Golovnev (Glassez)
4ae4ae3cfc Fix wrong indentation 2019-06-04 06:55:45 +03:00
Vladimir Golovnev (Glassez)
2c145fa57c Fix incorrectly set torrent startup flag 2019-06-04 06:53:17 +03:00
Mike Tzou
b8e205c048 Merge pull request #10741 from Chocobo1/limit
Fix speed limit not applying to IPv6 peers
2019-06-04 11:09:16 +08:00
Vladimir Golovnev
ecb4a76db7 Merge pull request #10742 from glassez/fix-rss
Ignore RSS articles with non-unique identifiers
2019-06-03 17:26:57 +03:00
Vladimir Golovnev (Glassez)
68ee071331 Ignore RSS articles with non-unique identifiers 2019-06-02 13:30:00 +03:00
Vladimir Golovnev (Glassez)
d710bbd9ef Perform more RSS parsing in working thread 2019-06-02 13:29:41 +03:00
Chocobo1
411b956009 Fix speed limit not applying to IPv6 peers
`TORRENT_USE_IPV6` is not used by libtorrent 1.2 anymore.
2019-06-02 15:00:27 +08:00
Mike Tzou
4d92c7e094 Merge pull request #10737 from Chocobo1/time
Use timestamp from alert
2019-06-02 09:40:45 +08:00
Mike Tzou
87dcbbbd23 Merge pull request #10734 from Chocobo1/folder
Use native folder icon in content tree
2019-06-02 09:40:17 +08:00
Chocobo1
3f2ce8a2b7 Remove unused stats_alert handler
Fixup 0fe9cd05c4.
2019-06-01 11:43:00 +08:00
Chocobo1
39830986c2 Use alert's timestamp
This way has better accuracy than running our own timer.
2019-06-01 11:40:23 +08:00
Mike Tzou
84e683cc99 Merge pull request #10732 from Chocobo1/refactor
Avoid using deprecated stats_alert
2019-06-01 10:07:52 +08:00
Chocobo1
f52dcc08eb Use native folder icon in content tree
This icon is used in content tree where all icons should be OS native
and not the ones from qbt.
2019-06-01 10:00:42 +08:00
Chocobo1
49df1cd3c7 Use less operations when building strings 2019-05-31 14:52:08 +08:00
Chocobo1
0fe9cd05c4 Avoid using deprecated stats_alert
From libtorrent doc:
This alert has been superseded by calling post_torrent_updates() regularly on the session object.
2019-05-31 10:58:23 +08:00
Mike Tzou
db88c2d6a5 Merge pull request #10721 from Chocobo1/sort
Fix wrong comparison result
2019-05-31 10:50:55 +08:00
Mike Tzou
683196f916 Merge pull request #10720 from Chocobo1/arrow
Fix arrow too large on macOS
2019-05-31 10:50:29 +08:00
Mike Tzou
bb3634c382 Merge pull request #10711 from Chocobo1/alert
Log performance alerts from libtorrent
2019-05-31 10:50:03 +08:00
Vladimir Golovnev
c5768e3513 Merge pull request #10723 from glassez/fix-seqdl
Fix sequential downloading when redirected
2019-05-30 10:44:03 +03:00
Vladimir Golovnev (Glassez)
05fd0b5859 Fix sequential downloading when redirected 2019-05-29 15:50:02 +03:00
Chocobo1
36cf689432 Fix wrong comparison result
The QString::toInt() might overflow when the string is long.

Closes #10706.
2019-05-29 00:03:04 +08:00
Chocobo1
0d9fcb0c1d Fix arrow too large on macOS
By changing to use natvie UI tree controls.

Closes #10709.
2019-05-28 22:35:22 +08:00
Chocobo1
45bafab4e0 Log performance alerts from libtorrent 2019-05-27 14:46:33 +08:00
Nick Korotysh
61ae820206 Add some padding to macOS app icon
Added 64px padding to 1024px icon and corresponding padding to smaller
icons. A lot of round icons on macOS have the same padding.

fixes #8222, closes #8930
2019-05-27 08:27:42 +03:00
Chocobo1
9232dd30dc Sort function declarations 2019-05-27 09:29:59 +08:00
Mike Tzou
c5430030e3 Merge pull request #10690 from Chocobo1/rtl
Various visual tweaks
2019-05-26 09:23:22 +08:00
Mike Tzou
4df1bca8bb Merge pull request #10705 from Chocobo1/fix
Fix wrong logic
2019-05-25 15:46:20 +08:00
Chocobo1
1b0ffd7781 Fix wrong logic
The error is caused by silly copy-paste error.
Fixup 09ff735007.
2019-05-25 14:55:27 +08:00
Mike Tzou
485fdf910e Merge pull request #10637 from Chocobo1/ngen3
Use newer libtorrent API (part 3)
2019-05-25 14:50:59 +08:00
Chocobo1
09ff735007 Use newer libtorrent API
This commit covers trackerentry.cpp only.
2019-05-25 11:22:57 +08:00
Mike Tzou
ebdf5225a8 Merge pull request #10684 from jagannatharjun/arrow-transfercategory
Replace CheckBox with Arrow in transferlistfilterswidget
2019-05-25 11:21:06 +08:00
Mike Tzou
9387dbce41 Merge pull request #10675 from Chocobo1/tracker
Replace QList by QVector for tracker related operations
2019-05-24 10:11:20 +08:00
Chocobo1
ccbb4576b6 Tweak visuals in Options dialog 2019-05-23 21:27:50 +08:00
Chocobo1
d7afc91975 Avoid combo boxes extending to the right in Options dialog 2019-05-23 21:07:44 +08:00
Prince Gupta
e283026a3c Replace CheckBox with Arrow in transferlistfilterswidget.cpp 2019-05-22 21:08:04 +05:30
Chocobo1
1e029da5ad Fix search icon placement when using RTL languages 2019-05-22 22:22:12 +08:00
Chocobo1
ed6bb0efdc Replace QList by QVector for tracker related operations 2019-05-22 12:57:22 +08:00
Mike Tzou
f86c5442aa Merge pull request #10656 from Chocobo1/vector
Code cleanups
2019-05-20 17:44:42 +08:00
Chocobo1
802af70e2f Fix typos 2019-05-19 18:51:09 +08:00
Chocobo1
cb4c53c848 Follow the type used in libtorrent 2019-05-19 18:51:09 +08:00
Chocobo1
e92209475e Use range-based for loops 2019-05-19 18:51:09 +08:00
Chocobo1
10e1c35998 Avoid unnecessary double lookup 2019-05-19 12:06:18 +08:00
Chocobo1
c75500670d Use forwarding reference when passing function objects
So instead of passing every function objects by value (a copy is made), now function objects
will be handled properly by reference (for lvalues) or by value (for rvalues).
2019-05-19 12:06:18 +08:00
Chocobo1
6738cdd715 Constify exception references 2019-05-19 12:06:18 +08:00
Chocobo1
e288de7ec1 Forward declare as much as possible 2019-05-19 12:06:18 +08:00
Chocobo1
401bdbf3d9 Remove unused functions 2019-05-19 12:06:18 +08:00
Chocobo1
ff707ea5af Change splitToViews() return type to QVector 2019-05-19 12:06:18 +08:00
Mike Tzou
3d6dccc689 Merge pull request #10627 from Chocobo1/alg
Improve removeIf() to support other types
2019-05-16 10:45:55 +08:00
Mike Tzou
c9ff0abade Merge pull request #10638 from Chocobo1/idxRange
Fix assertion fail
2019-05-16 10:39:33 +08:00
Chocobo1
459cdf6071 Fix assertion fail
When fileSize == 0, the second index could be smaller than the first index,
thus trigger the assert check in IndexInterval constructor.

Closes #10611.
2019-05-15 10:22:21 +08:00
Mike Tzou
dca055656a Merge pull request #10600 from Chocobo1/newtorrentdlg
Change "Add new torrent" dialog to horizontal layout
2019-05-15 09:56:49 +08:00
Evgeny Lensky
62c72091ce Change "Add new torrent" dialog to horizontal layout 2019-05-14 11:03:56 +08:00
Chocobo1
c6f3da1097 Improve removeIf() to support set types
We can now replace QMutable*Iterator by removeIf() which usage is more consistent with other
algorithm functions.
2019-05-14 01:26:01 +08:00
Mike Tzou
4ed8b31641 Merge pull request #10591 from Chocobo1/ngen2
Migrate to update-to-date libtorrent functions (part2)
2019-05-14 01:20:29 +08:00
sledgehammer999
8c4a373ed7 Merge pull request #10633 from sledgehammer999/fix_travis_macos
Fix Travis-CI for macOS and libtorrent 1.1.x
2019-05-13 09:54:35 +03:00
Chocobo1
5aaf040300 Remove libtorrentfwd.h 2019-05-13 11:20:42 +08:00
Chocobo1
3955eef50d Change to lt namespace
Quoting from libtorrent doc:
> In the future, libtorrent will be the alias and lt the namespace name.
2019-05-13 11:20:41 +08:00
Chocobo1
4b263f057d Use newer libtorrent API
This commit covers session.cpp only.
2019-05-13 11:20:41 +08:00
Chocobo1
677a419f0b Use upstream defined namespace
`lt` namespace is defined since libtorrent 1.1.6 and our master branch requires >= 1.1.10,
so there is no need to add #if condition for it.
2019-05-13 11:20:41 +08:00
sledgehammer999
e08d0c4e0f Fix Travis-CI for macOS and libtorrent 1.1.x 2019-05-13 03:03:28 +03:00
Mike Tzou
6d73a7ef0a Merge pull request #10618 from jerrymakesjelly/master
Replace Bytes/s with KiB/s in the adding torrent dialogs in WebUI
2019-05-12 13:50:46 +08:00
Vladimir Golovnev
af7d8f6a43 Merge pull request #10514 from Mataniko/rss-enclosure-type
Download RSS "enclosure" element if no proper MIME type is found
2019-05-11 13:31:46 +03:00
jerrymakesjelly
4b9f0a87cd Change the speed unit from Bytes/s to KiB/s
Updated the adding torrent dialogs in WebUI. Closes #10017.
2019-05-11 12:25:07 +08:00
Mike Tzou
ca0dad7356 Merge pull request #10590 from onlined/fix/close-system-tray-blank-screen
Don't turn screen blank when closed to system tray
2019-05-11 12:24:43 +08:00
Mike Tzou
75e87de473 Merge pull request #10607 from Chocobo1/decodeQuery
Fix '+' char not decoded to space correctly
2019-05-10 09:13:09 +08:00
Chocobo1
bd8d70bf60 Refactor HTTP query parsing 2019-05-09 12:41:30 +08:00
Chocobo1
69d29af097 Fix '+' char not decoded to space correctly
Closes #10606.
2019-05-09 11:17:41 +08:00
Matan Bareket
bd2d636bb5 Download RSS enclosure element if no proper MIME type is found
In the case where an RSS feed doesn't have the "enclosure" element
with type "application/x-bittorrent", fallback to the last enclosure
element which has no "type" attribute.
2019-05-08 13:46:13 -04:00
Mike Tzou
412b51fb3c Merge pull request #10552 from CoryG89/webui-magnet-handler
Register protocol handler in WebUI for magnet links
2019-05-07 11:12:55 +08:00
Mike Tzou
a3fee32b42 Merge pull request #10437 from Chocobo1/ngen
Migrate to update-to-date libtorrent functions
2019-05-07 11:03:34 +08:00
Ekin Dursun
c0c2fe247b Don't turn screen blank when closed to system tray
Closes #9240 and possibly #9121, as @zeule suggested here: https://github.com/qbittorrent/qBittorrent/issues/9240#issuecomment-408025722.
2019-05-07 02:08:46 +03:00
Chocobo1
ae793b7395 Use upstream defined namespace alias 2019-05-06 20:26:15 +08:00
Chocobo1
56434fc8b9 Replace obsoleted QDateTime::fromTime_t() 2019-05-06 20:26:15 +08:00
Chocobo1
3f962ba336 Fix displaying invalid creation date
The bug is only observed when using libtorrent 1.2.
2019-05-06 20:26:14 +08:00
Chocobo1
3f10ac55a3 Migrate to update-to-date libtorrent functions 2019-05-06 20:26:14 +08:00
Cory
d49379789a Register protocol handler in WebUI for magnet links 2019-05-05 11:26:17 -07:00
Mike Tzou
3a3dec1707 Merge pull request #10445 from Chocobo1/crash
Work around crashing in Qt networking library
2019-05-03 22:54:25 +08:00
Mike Tzou
d001927d47 Merge pull request #10557 from Chocobo1/rootfolder
Fix "Create subfolder" option is not working in WebUI
2019-05-03 12:37:23 +08:00
Chocobo1
8aa8b19f37 Fix "Create subfolder" option is not working in WebUI
Closes #10392.
2019-05-02 20:55:50 +08:00
Mike Tzou
2d7b833ae6 Merge pull request #10537 from Chocobo1/template
Minor cleanups
2019-05-01 23:51:23 +08:00
Chocobo1
aaed5f7fe0 Remove unused headers 2019-05-01 11:09:25 +08:00
Chocobo1
375de4f8a6 Replace QMap with QHash when sensible 2019-05-01 11:09:25 +08:00
Chocobo1
44e4a5b13a Avoid performance penalty from type erasure
On average the affected code path is 0.1% faster and the result binary
is 10 KB smaller.
2019-05-01 11:09:25 +08:00
Mike Tzou
f9ac1d4cd5 Merge pull request #10518 from dzmat/more_graphs
Add 12 hour and 24 hour speed graphs. Closes #9686
2019-04-28 18:57:40 +08:00
Mike Tzou
6435e994f1 Merge pull request #10504 from Chocobo1/public
Misc improvements in WebUI
2019-04-24 14:49:28 +08:00
dzmat
7de0f9abed Change number of time axis divisions from 5 to 6 for convenience 2019-04-22 00:15:13 +07:00
dzmat
0af17bf7e9 Add 12 hour and 24 hour speed graphs 2019-04-22 00:15:13 +07:00
Chocobo1
49b57904f9 Use a random number for WebUI cache busting
Also fetch qbt version info via WebAPI properly.
2019-04-18 12:31:23 +08:00
Chocobo1
d022457e0c Use force refresh on WebUI logout
Regardless of the cache header settings, the logout action should never be
allowed to load from cache.
2019-04-17 20:17:26 +08:00
Chocobo1
6e1e7a45a1 Align WebUI login button to the right 2019-04-17 13:34:32 +08:00
Mike Tzou
18be4732b3 Merge pull request #10476 from Piccirello/webui-table-cell-hover
Set title attribute for all WebUI table cells
2019-04-17 13:13:45 +08:00
Mike Tzou
bc2cb057a9 Merge pull request #10469 from Chocobo1/travis
Reduce macOS CI build time
2019-04-17 13:12:57 +08:00
Thomas Piccirello
238ca03936 Set title attribute for all WebUI table cells
Except the Progress Bar
2019-04-15 22:44:28 -07:00
Mike Tzou
7db2d1b8cf Merge pull request #10492 from Chocobo1/server
Remove closed connections immediately
2019-04-16 12:25:40 +08:00
Mike Tzou
c7f89f55d0 Merge pull request #10473 from Chocobo1/warning
Fix unsafe type narrowing (MSVC C4267 warning)
2019-04-16 12:23:30 +08:00
Mike Tzou
08b4cce72a Merge pull request #10485 from CzBiX/login_page
Always use index.html as default page
2019-04-16 12:23:13 +08:00
Chocobo1
a2a669572c Use QSet for tracking server connections
We don't need to maintain order between connections so QSet would be more suitable.
2019-04-15 21:35:35 +08:00
Chocobo1
a35b6cc8dd Remove closed connections immediately
Previously it relied on a timer to drop dead connections but that proved to
be too slow when there is an incoming burst of connections.

Fixes #10487.
2019-04-15 21:35:10 +08:00
Chocobo1
41773a5465 Fix unsafe type narrowing
Appending the warning below:
qBittorrent\src\base/utils/version.h(176): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
qBittorrent\src\base/utils/version.h(185): note: see reference to function template instantiation 'std::array<T,2> Utils::Version<T,2,2>::parseList<StringsList>(const StringsList &)' being compiled
        with
        [
            T=unsigned short,
            StringsList=QList<QByteArray>
        ]
2019-04-15 20:23:26 +08:00
CzBiX
d254a98662 Always use index.html as default page 2019-04-13 18:41:29 +08:00
Mike Tzou
19dfec1e0a Merge pull request #10464 from thalieht/torrent-size-limit
Increase the download request size limit from 10 to 100 MiB
2019-04-11 10:14:49 +08:00
thalieht
2f3b7642c2 Show user friendly size in error 2019-04-10 11:39:27 +03:00
thalieht
25102b9c5d Increase the download size limit to 100 MiB 2019-04-10 11:39:27 +03:00
Chocobo1
73b4fb09dc Reduce macOS CI build time
The `homebrew: update: true` directive updates the whole macOS env which
is unnecessary and increases build time excessively. This commit reverts
back to the old way.
Also the pre-installed cmake & pkg-config version is sufficient so no need
to outdate them.
2019-04-09 16:10:10 +08:00
Mike Tzou
460b73ebda Merge pull request #10438 from Chocobo1/timer
Work around the crash occurred in QTimer
2019-04-09 13:53:48 +08:00
Mike Tzou
4a02922bfb Merge pull request #10458 from Chocobo1/post
Correctly handle '+' sign in x-www-form-urlencoded data
2019-04-09 13:53:12 +08:00
Mike Tzou
7361f730a3 Merge pull request #10449 from thalieht/encryption
Rename "Prefer encryption" to "Allow encryption"
2019-04-09 13:43:17 +08:00
Chocobo1
4bf4313862 Initialize class variable via constructor 2019-04-08 23:29:14 +08:00
Mike Tzou
6a4cb5f0e1 Merge pull request #10390 from Chocobo1/travis
Add more libtorrent 1.2 builds to TravisCI
2019-04-07 21:10:27 +08:00
Chocobo1
94aeeed95f Work around the crash occurred in QTimer
See Qt commit:
https://code.qt.io/cgit/qt/qtbase.git/commit/src/corelib/kernel/qtimer.cpp?id=a623fe8d2a60ff333d5779f877e3b20f0e141ff1

Fixes #9985.
2019-04-07 15:13:33 +08:00
Chocobo1
d86a984e25 Correctly handle '+' sign in x-www-form-urlencoded data
Fixes #10451.
2019-04-07 13:58:16 +08:00
thalieht
371a090cec Rename "Prefer encryption" to "Allow encryption"
Because it actually prefers non-encryption but allows it if requested.
2019-04-05 14:18:49 +03:00
Chocobo1
1ea61db1fb Disable downloading tracker favicons by default
Workaround for a crash in Qt networking library, source:
https://github.com/qbittorrent/qBittorrent/issues/9667#issuecomment-464445025

Closes #9667.
2019-04-05 13:54:40 +08:00
Chocobo1
efe50baddc Add c++14 to QBT_ADD_CONFIG when appropriate 2019-04-01 16:14:28 +08:00
Mike Tzou
e499317695 Merge pull request #10396 from Chocobo1/webui
Document current WebUI browser compatibility
2019-03-26 13:02:14 +08:00
sledgehammer999
74fc86e2ab Update Changelog 2019-03-25 13:39:42 +02:00
sledgehammer999
24fef762ce Merge pull request #10400 from thalieht/search-hotkey-keypad-enter
Make num enter key work the same as return in searchjobwidget
2019-03-25 13:21:07 +02:00
Chocobo1
7e99ce6d7f Document current WebUI browser compatibility 2019-03-23 12:32:20 +08:00
thalieht
3731a3ea65 Make num enter key work the same as return in searchjobwidget 2019-03-22 20:01:48 +02:00
Chocobo1
05b6265a31 Add more libtorrent 1.2 builds to TravisCI 2019-03-19 14:27:19 +08:00
Vladimir Golovnev
6de02b0f2a Merge pull request #10373 from glassez/libtorrent-1.2
Add preliminary support of libtorrent v1.2
2019-03-19 06:08:22 +03:00
sledgehammer999
6c9368ef36 Merge pull request #10385 from sledgehammer999/desktopFile
Remove wrong ifdef
2019-03-18 16:27:54 +02:00
Vladimir Golovnev (Glassez)
ead078a38e Add preliminary support of libtorrent v1.2
libtorrent v1.2 should be built with deprecated features enabled.
2019-03-18 15:17:03 +03:00
sledgehammer999
f403fdb2e8 Remove wrong ifdef 2019-03-17 14:15:50 +02:00
Mike Tzou
20f2c86d25 Merge pull request #10214 from AceLewis/master
Remove autocorrect/autocapitalise in WebUI
2019-03-17 15:05:19 +08:00
Mike Tzou
d1b0c230ed Merge pull request #10366 from Chocobo1/logger
Avoid performance penalty when logger is full
2019-03-17 15:04:53 +08:00
Mike Tzou
05b6865618 Merge pull request #10365 from thalieht/adv-label-links
Add documentation links to some advanced settings
2019-03-15 14:34:33 +08:00
Chocobo1
b7d739ab3f Fix build error
Apparently the function is not available on Windows platforms.
2019-03-15 14:29:54 +08:00
Chocobo1
cb9a160366 Utilize parent pointer appropriately 2019-03-15 14:29:07 +08:00
Chocobo1
874bc84efc Remove excessive usage of pointer 2019-03-15 14:29:06 +08:00
Chocobo1
a3019f56b0 Clean up code 2019-03-15 14:29:06 +08:00
Chocobo1
04fd6e9d04 Avoid performance penalty when logger is full 2019-03-15 14:29:06 +08:00
thalieht
4c53447d35 Remove the max half-open connections option from GUI
Its functionality was deprecated long ago.
2019-03-13 21:08:40 +02:00
thalieht
bcfa62cc76 Rename "#" column to "Tier" in the tracker list 2019-03-13 21:08:40 +02:00
thalieht
cccaca0c01 Center align the section labels in advanced settings 2019-03-13 21:08:40 +02:00
thalieht
3fca49e44d Add documentation links to some advanced settings 2019-03-13 21:08:40 +02:00
Vladimir Golovnev
36f6e9b288 Merge pull request #9702 from knackebrot/master
Fix building qbittorrent-nox on Windows
2019-03-13 18:35:44 +03:00
Mike Tzou
c47d6b517a Merge pull request #10355 from Chocobo1/label
Improve AdvancedSettings::addRow()
2019-03-11 00:25:35 +08:00
Vladimir Golovnev
928ce940c9 Merge pull request #10346 from glassez/download-manager
Improve "Download manager"
2019-03-10 09:13:07 +03:00
Vladimir Golovnev (Glassez)
4ee6a0ba29 Use Qt-provided HTTP redirection handling 2019-03-08 13:06:42 +03:00
Vladimir Golovnev (Glassez)
746916a963 Use DownloadHandler behind the scenes 2019-03-08 13:00:37 +03:00
sledgehammer999
c2d1af9853 Merge pull request #10338 from sledgehammer999/raise_qt5_ver
Raise minimum Qt version to 5.9.0
2019-03-08 00:42:26 +02:00
knackebrot
c7b451b18f Allow headless builds on Windows
Daemonizing is disabled because no direct equivalent exists in win32.
2019-03-07 13:59:10 +01:00
Chocobo1
f9e10616d0 Improve AdvancedSettings::addRow()
1. Add context to connect().
2. Use QLabel in the left table cell, this allows using rich text formatting, such as HTML links.
2019-03-07 16:22:23 +08:00
Mike Tzou
ccd8f3e0f1 Merge pull request #10340 from Chocobo1/move
Move helper functions to Utils::Gui namespace
2019-03-07 15:11:58 +08:00
Mike Tzou
480aa01ea6 Merge pull request #10345 from paolo-sz/master
Avoid crashes on torrent search
2019-03-07 15:08:52 +08:00
paolo-sz
1ea7907e09 Add default tooltip "Searching..." on tab creation. 2019-03-05 20:36:49 +01:00
paolo-sz
22835c0350 Avoid crashes on torrent search
qbittorrent closes itself without any error message when a search tab
should be notified of a status change: fixed bad pointer variable catch
in lambda code.
2019-03-05 20:36:49 +01:00
Chocobo1
78b9eafed2 Replace deprecated qt_mac_set_dock_menu() 2019-03-05 17:17:07 +08:00
Vladimir Golovnev (Glassez)
6cb15706f5 Reduce number of DownloadManager signals 2019-03-05 11:28:29 +03:00
Chocobo1
adbd34c795 Move helper functions to Utils::Gui namespace 2019-03-05 14:55:22 +08:00
sledgehammer999
5c63ad3b95 Raise minimum Qt version to 5.9.0 2019-03-04 16:48:49 +02:00
Mike Tzou
c109b7a57a Merge pull request #10332 from Chocobo1/install
Update INSTALL file
2019-03-04 12:01:02 +08:00
sledgehammer999
8329ca2ed6 Merge pull request #10322 from sledgehammer999/travis_deb
Use custom packages for travis and RC_1_2
2019-03-03 20:35:20 +02:00
Mike Tzou
4ce3cda676 Merge pull request #10319 from eszlari/patch-1
Linux/Wayland: make window title bar icon work
2019-03-03 12:40:59 +08:00
Chocobo1
aa2172f1ad Update INSTALL dependencies 2019-03-02 13:06:30 +08:00
Mike Tzou
0f1fc7be9d Merge pull request #10302 from Chocobo1/uptr
Replace QScopedPointer with std::unqiue_ptr
2019-03-02 12:26:14 +08:00
Mike Tzou
37606891db Merge pull request #10323 from Chocobo1/qt
Replace deprecated functions/variables
2019-03-02 12:25:52 +08:00
Peter Eszlari
9f250713d2 Linux/Wayland: make window title bar icon work 2019-02-28 22:41:08 +01:00
Chocobo1
3dd969df64 Replace deprecated QSignalMapper class 2019-02-28 12:03:08 +08:00
Chocobo1
c6ae1aa9d9 Replace deprecated QString::null 2019-02-28 12:02:03 +08:00
Chocobo1
6dab93f7fd Replace deprecated QDesktopWidget class 2019-02-28 12:02:03 +08:00
Chocobo1
c657134344 Replace deprecated QSslSocket::setDefaultCiphers() 2019-02-28 12:01:36 +08:00
Chocobo1
168d3fbdac Replace deprecated trUtf8() 2019-02-28 12:01:36 +08:00
Chocobo1
c33284fa8c Add compile flag to show Qt deprecation warnings 2019-02-28 12:01:36 +08:00
Mike Tzou
46bc1d12b9 Merge pull request #10314 from thalieht/const2
More const
2019-02-28 11:33:35 +08:00
sledgehammer999
7765c1c739 Use prebuilt packages of RC_1_2 for Travis 2019-02-26 20:26:16 +02:00
Mike Tzou
d7ea9a5f55 Merge pull request #10318 from Chocobo1/ptr
Convert to use private pointer for ui object
2019-02-26 12:13:46 +08:00
thalieht
77aea3c59e Add const to a few pointer arguments 2019-02-25 17:05:15 +02:00
thalieht
ce437817de Make various minor changes 2019-02-25 17:05:15 +02:00
thalieht
89dce36e98 Use uniform initialization on some default arguments 2019-02-25 17:05:15 +02:00
thalieht
8a19a0d4a0 Remove const in declarations' arguments that are passed by value 2019-02-25 17:05:15 +02:00
thalieht
70f1537d9f Add const to almost all remaining vars and arguments that qualify 2019-02-25 17:05:15 +02:00
Chocobo1
e5dca50025 Convert to use private pointer for ui object 2019-02-25 01:22:40 +08:00
Mike Tzou
bb041c0eca Merge pull request #10292 from Chocobo1/rmInvalid
Load torrent from data directly
2019-02-21 23:18:02 +08:00
Mike Tzou
1c14a08390 Merge pull request #10296 from thalieht/clang-tidy
Some suggestions from Clang-tidy
2019-02-21 23:17:29 +08:00
Chocobo1
5c0d9b7eab Load torrent from data directly 2019-02-20 00:14:41 +08:00
Mike Tzou
e621a98a0a Merge pull request #10291 from Chocobo1/redirect
Fix crash due to network redirections
2019-02-20 00:03:53 +08:00
Mike Tzou
12b2b8ad99 Merge pull request #10289 from Chocobo1/travisci
Update .travis.yml
2019-02-20 00:01:21 +08:00
Chocobo1
5e3fddf456 Replace QScopedPointer with std::unqiue_ptr
These 2 types are very similar and we should prefer the one from C++
standard library, this reduces the number of types in our code base.

Also see:
https://stackoverflow.com/questions/40346393/should-i-use-qscopedpointer-or-stdunique-ptr#comment67966940_40346991
2019-02-18 16:06:40 +08:00
Chocobo1
8fe1ff87f1 Limit DownloadHandler max redirection to 20
Closes #10219.
2019-02-17 22:02:48 +08:00
thalieht
86df25a3e9 Remove some unused stuff 2019-02-16 18:54:18 +02:00
thalieht
8c944bd4e1 Avoid repeating the return type 2019-02-16 18:54:18 +02:00
thalieht
9959a901fe Replace deprecated header 'signal.h' with 'csignal' 2019-02-16 18:54:17 +02:00
thalieht
92a290895b Convert vars into refs to avoid copy construction from const refs 2019-02-16 18:54:17 +02:00
thalieht
400792d18e Use isEmpty() instead of size() for emptiness 2019-02-16 18:54:17 +02:00
thalieht
d8cbc9266a Use 'auto' to avoid duplicating the type name 2019-02-16 18:54:17 +02:00
thalieht
947c7e1d64 Convert to range-based for loop 2019-02-16 16:53:26 +02:00
Chocobo1
409557ef30 Clean up code 2019-02-15 19:47:06 +08:00
thalieht
8a3f942385 Don't use 'else' after return/break 2019-02-13 18:23:25 +02:00
Chocobo1
313a95bdd1 Log DownloadManager SSL errors 2019-02-13 20:09:08 +08:00
Chocobo1
184ac3e473 Update .travis.yml
Add build job with libtorrent RC_1_2 branch.
2019-02-13 19:50:03 +08:00
Mike Tzou
78ab0e4ba9 Merge pull request #10220 from thalieht/const
Add const to many vars and arguments
2019-02-13 12:11:00 +08:00
thalieht
445adb0ab4 Convert pass-by-value arguments to const refs where applicable 2019-02-12 02:45:55 +02:00
thalieht
ca3ce87e06 Add const to many vars and arguments
Also remove const in declarations' arguments that are passed by value
2019-02-11 20:19:41 +02:00
Mike Tzou
12aea82031 Merge pull request #10273 from Chocobo1/fix
Fix wrong arg placeholder
2019-02-10 13:31:09 +08:00
Chocobo1
79d7ba8205 Fix wrong arg placeholder 2019-02-09 21:26:45 +08:00
Vladimir Golovnev
0413a05246 Merge pull request #10242 from glassez/ordered-recheck
Force recheck multiple torrents one by one. Closes #9120
2019-02-08 08:19:30 +03:00
Mike Tzou
efed3fc78c Merge pull request #10256 from Chocobo1/license
Add license header
2019-02-08 12:07:08 +08:00
Mike Tzou
c540e57f55 Merge pull request #10227 from Chocobo1/login
Prevent login credential appearing in URL
2019-02-07 13:16:24 +08:00
Mike Tzou
6f0a66ce26 Merge pull request #10255 from Chocobo1/algorithm
Make use of std algorithms and C++14 features
2019-02-07 10:45:40 +08:00
Chocobo1
364a837dbd Revise comments about C++14 2019-02-05 13:35:54 +08:00
Chocobo1
6d29a3af60 Make use of std algorithms 2019-02-05 13:35:54 +08:00
Chocobo1
f789df7edf Add license header 2019-02-04 17:28:55 +08:00
Vladimir Golovnev
e9f3e20e67 Merge pull request #10243 from glassez/content-menu
Close context menu when torrent content model is reset. Closes #9522
2019-02-02 21:13:41 +03:00
AceLewis
bfdd674054 Remove autocorrect/autocapitalise from filepaths on WebUI 2019-02-02 13:50:02 +01:00
Chocobo1
4483b72bfd Move JavaScript code to its own file 2019-02-02 15:00:53 +08:00
Chocobo1
8096e49c24 Display warning when Javascript is disabled 2019-02-02 14:55:08 +08:00
Vladimir Golovnev (Glassez)
5a86c4ac52 Close context menu when content model is reset
Closes #9522.
2019-02-01 18:44:26 +03:00
Vladimir Golovnev (Glassez)
61925f74fd Force recheck multiple torrents one by one
Closes #9120.
2019-02-01 18:15:54 +03:00
Chocobo1
32474b05c5 Remove mootools lib from login page 2019-02-01 13:38:14 +08:00
Chocobo1
814eef1e56 Fix wrong arg placehoder 2019-02-01 13:38:14 +08:00
Chocobo1
0738b3860b Prevent login credential appearing in URL
Closes #10221.
2019-02-01 13:38:12 +08:00
Mike Tzou
40eb8a1f4a Merge pull request #10175 from Chocobo1/cert
Load WebUI certificate & key from file path
2019-02-01 13:37:13 +08:00
Mike Tzou
0facdf3dfb Merge pull request #10190 from Piccirello/webui-sorted-icon
Fix direction of Web UI sorted column icon
2019-02-01 13:20:54 +08:00
Vladimir Golovnev
5c00d89d57 Merge pull request #10231 from glassez/properties
Improve Properties widget
2019-01-31 12:03:46 +03:00
Mike Tzou
9d91b17e33 Merge pull request #10188 from eszlari/appdata-fixes
Appdata: add release, content_rating
2019-01-31 13:28:18 +08:00
Mike Tzou
899b0c1104 Merge pull request #10096 from Piccirello/webui-libtorrent-version
Match WebUI About page to GUI
2019-01-31 13:14:46 +08:00
Chocobo1
52de31ac79 Add migration code for WebUI https related change 2019-01-29 12:52:42 +08:00
Vladimir Golovnev (Glassez)
c631dbdaa1 Improve Properties widget
Drop redundant dependencies.
Refresh after BitTorrent session refreshing  (instead of using timer).
2019-01-28 12:42:12 +03:00
Chocobo1
5cdb3b6a2d Load WebUI certificate & key from file path
This allow users to update certificate & key more easily, i.e. without the need to import them
into qbt.

Closes #6675, #7547, #8315, #8564.
2019-01-28 16:33:48 +08:00
Chocobo1
48d358872f Cleanup header inclusion 2019-01-28 14:34:13 +08:00
Vladimir Golovnev
5b82b681cb Merge pull request #10225 from glassez/http-request
Separate URL components before percent-decoding. Closes #9116
2019-01-28 08:46:41 +03:00
sledgehammer999
bb3ad8acd3 Merge pull request #10191 from sledgehammer999/drop_google
Don't query Google for tracker favicons
2019-01-27 22:19:56 +02:00
sledgehammer999
6fdc02f947 Merge pull request #10201 from sledgehammer999/dead_code
Remove leftover tracker authentication code
2019-01-27 22:19:21 +02:00
Vladimir Golovnev (Glassez)
b0446380c6 Separate URL components before percent-decoding
Allow special characters in query string parameters.
Closes #9116.
2019-01-27 15:33:19 +03:00
Mike Tzou
fc534e88a3 Merge pull request #10155 from Chocobo1/exception
Remove exception handling
2019-01-23 13:44:34 +08:00
sledgehammer999
4a414d50f1 Remove leftover tracker authentication code 2019-01-23 02:38:46 +02:00
Peter Eszlari
b917f4ed01 Add content_rating, release tags to appdata 2019-01-22 16:10:24 +01:00
Mike Tzou
b8def07cd8 Merge pull request #10146 from Piccirello/webui-escape-key
Add Web UI support for escape key
2019-01-22 11:30:50 +08:00
sledgehammer999
009fd0e211 Don't query Google for tracker favicons
It is a bad idea for user privacy to automatically contact a 3rd party
about tracker domains. Especially when the user isn't informed about
this and the 3rd party is Google.

Reverts 1b9882b3a3
2019-01-21 16:15:09 +02:00
Thomas Piccirello
d1dc9a39ae Match WebUI About page to GUI 2019-01-20 18:40:25 -08:00
Thomas Piccirello
86c21baf40 Simplify tab logic 2019-01-20 18:39:15 -08:00
Thomas Piccirello
ece27b84cc Fix wrong element id being used 2019-01-20 16:00:29 -08:00
Thomas Piccirello
81943fb3b0 Fix direction of Web UI sorted column icon 2019-01-20 15:52:38 -08:00
sledgehammer999
3b949c4a8a Merge pull request #10179 from qbittorrent/webui-broken-link
Fix broken image link
2019-01-20 21:58:09 +02:00
Chocobo1
04227f5a41 Add QBT_APP_64BIT define
Now we use QT_POINTER_SIZE to detect CPU bitness, it has the advantage of applicable to all CPU
architectures not limiting to x86 arch.
2019-01-19 10:14:10 +08:00
Chocobo1
6d7e5f82ae Include the correct header
And remove the unused ones
2019-01-19 10:06:33 +08:00
Chocobo1
cf4db1b418 Remove useless exception handling 2019-01-19 10:06:31 +08:00
Tom Piccirello
972b8d11fe Fix broken image link 2019-01-18 17:49:55 -08:00
Mike Tzou
81c09d34ad Merge pull request #10163 from airium/allow-larger-checking-memory-usage
Allow setting larger checking memory usage in GUI
2019-01-19 01:30:55 +08:00
sledgehammer999
f67ded678c Merge pull request #10086 from PeterDaveHello/OptimizePNG
Optimize PNG images losslessly with zopflipng
2019-01-17 12:20:07 +02:00
sledgehammer999
118d14c93f Merge pull request #10172 from sledgehammer999/copyright
Update copyright year
2019-01-17 10:25:48 +02:00
sledgehammer999
2ac7f2defe Update copyright year 2019-01-17 01:08:51 +02:00
sledgehammer999
bbabf6dc1a Merge pull request #10107 from sledgehammer999/translators
Mention Swedish translator
2019-01-17 00:54:48 +02:00
sledgehammer999
6c6d75f607 Mention Swedish translator
Closes #10103
2019-01-17 00:53:38 +02:00
airium
dbca4346aa Allow setting larger checking memory usage in GUI 2019-01-16 14:23:21 +08:00
Mike Tzou
ec90b69c9e Merge pull request #10061 from Piccirello/webui-cache-bust
Include application version in css/js url for cache busting
2019-01-16 12:32:04 +08:00
Mike Tzou
eecdd4c6cf Merge pull request #10072 from Kolcha/mac-info-plist
Cleanup Info.plist
2019-01-16 12:12:22 +08:00
Mike Tzou
ea7ac59a61 Merge pull request #10117 from Chocobo1/appdata
Update appdata
2019-01-15 13:19:39 +08:00
Nick Korotysh
2a5dd7f5ec Cleanup Info.plist
Added few required/recommended and removed obsolete/deprecated keys
according to Apple developers documentation.
Changed CFBundleIdentifier according to reverse DNS convention.
Updated copyright year.
2019-01-14 16:47:07 +03:00
Thomas Piccirello
dbaebf4f33 Rename parametrics.js to speedslider.js 2019-01-14 02:00:08 -08:00
Thomas Piccirello
851c02acb0 Capitalize event name 2019-01-14 00:57:24 -08:00
Thomas Piccirello
2f33ecf37b Fix bug where input wouldn't always be focused 2019-01-14 00:57:24 -08:00
Thomas Piccirello
74a772aafb Add Web UI support for escape key 2019-01-14 00:57:24 -08:00
Mike Tzou
2e5c09aeba Merge pull request #10130 from Chocobo1/svg
Fix icon issues
2019-01-14 10:52:45 +08:00
Peter Dave Hello
eaaf8b8e85 Optimize PNG images losslessly with zopflipng
18 images compressed as below:
dist/unix/menuicons/128x128/apps/qbittorrent.png        | Bin 7736 -> 7674 bytes
dist/unix/menuicons/128x128/status/qbittorrent-tray.png | Bin 7736 -> 7674 bytes
dist/unix/menuicons/16x16/apps/qbittorrent.png          | Bin 986 -> 775 bytes
dist/unix/menuicons/16x16/status/qbittorrent-tray.png   | Bin 986 -> 775 bytes
dist/unix/menuicons/192x192/apps/qbittorrent.png        | Bin 11625 -> 11562 bytes
dist/unix/menuicons/192x192/status/qbittorrent-tray.png | Bin 11625 -> 11562 bytes
dist/unix/menuicons/22x22/apps/qbittorrent.png          | Bin 1169 -> 1163 bytes
dist/unix/menuicons/22x22/status/qbittorrent-tray.png   | Bin 1169 -> 1163 bytes
dist/unix/menuicons/48x48/apps/qbittorrent.png          | Bin 2995 -> 2960 bytes
dist/unix/menuicons/48x48/status/qbittorrent-tray.png   | Bin 2995 -> 2960 bytes
dist/unix/menuicons/72x72/apps/qbittorrent.png          | Bin 4321 -> 4288 bytes
dist/unix/menuicons/72x72/status/qbittorrent-tray.png   | Bin 4321 -> 4288 bytes
dist/unix/menuicons/96x96/apps/qbittorrent.png          | Bin 5712 -> 5624 bytes
dist/unix/menuicons/96x96/status/qbittorrent-tray.png   | Bin 5712 -> 5624 bytes
src/icons/loading.png                                   | Bin 178 -> 174 bytes
src/icons/skin/mascot.png                               | Bin 21876 -> 21084 bytes
src/icons/skin/splash.png                               | Bin 59072 -> 58581 bytes
src/icons/sphere.png                                    | Bin 277 -> 250 bytes
2019-01-13 17:10:45 +08:00
Vladimir Golovnev
7e98035df5 Merge pull request #10136 from glassez/drop-old-libtorrent
Drop support of libtorrent < 1.1.10
2019-01-12 09:44:24 +03:00
Vladimir Golovnev
198034f976 Merge pull request #10145 from glassez/drop-legacy-webapi
Drop legacy WebAPI support
2019-01-11 17:41:53 +03:00
Vladimir Golovnev (Glassez)
6d6af8e70d CMake: Check for required libtorrent version 2019-01-11 15:13:33 +03:00
Vladimir Golovnev (Glassez)
302c99d7d5 Drop support of libtorrent < 1.1.10 2019-01-11 15:13:17 +03:00
Mike Tzou
b7091cf9a4 Merge pull request #10006 from Piccirello/webui-tables
Allow WebUI Trackers and Content tables to be manipulated
2019-01-11 14:10:27 +08:00
Chocobo1
a8ba5bda79 Update WebUI img to use svg images 2019-01-11 13:53:32 +08:00
Chocobo1
6f34afce21 Fix speed limit icon too large on WebUI
Closes #10127.
2019-01-11 13:51:46 +08:00
Chocobo1
83d4641a4d Fix misaligned icons in STATUS list in GUI
The 2 changed icons has different width/height ratio than other icons in STATUS list, thus
they take more width than others when rendered in GUI.
2019-01-11 13:51:46 +08:00
Vladimir Golovnev (Glassez)
2ce3aa9731 Drop legacy WebAPI support 2019-01-10 20:16:06 +03:00
Mike Tzou
77fc731dec Merge pull request #10125 from Chocobo1/boost
Replace boost::function with std::function
2019-01-07 22:02:05 +08:00
Chocobo1
b7627db98c Remove unused headers 2019-01-06 19:19:57 +08:00
Chocobo1
06e82d10f6 Replace boost::function with std::function 2019-01-06 19:19:57 +08:00
Chocobo1
d013e0922d Use the proper Qt type 2019-01-06 18:32:01 +08:00
Thomas Piccirello
f0e67cbb53 Remove excanvas from WebUI
Excanvas adds Canvas support to IE 8 and lower, which we no longer support.
2019-01-04 23:48:17 -08:00
Chocobo1
8dfcb028a6 Update .appdata descriptions 2019-01-05 10:50:02 +08:00
Mike Tzou
d7c561df6b Merge pull request #10106 from Chocobo1/js
Various fixes in WebUI
2019-01-05 10:45:15 +08:00
Chocobo1
168695bd15 Use reverse DNS convention for metadata files naming
Also update appdata install path.

Closes #10111.
2019-01-05 10:37:23 +08:00
sledgehammer999
88295f8075 Merge pull request #10094 from Kolcha/pb-fix
Draw progress bar in Fusion style on macOS systems
2019-01-04 00:31:34 +02:00
sledgehammer999
6eaab41820 Merge pull request #10073 from sledgehammer999/stylized_icons
[cleanup]Converted remaining icons to svg
2019-01-04 00:25:11 +02:00
sledgehammer999
f4bb65b46e Optimize svg files using SVGO 2019-01-04 00:24:30 +02:00
Bert Verhelst
9f8f9b6702 Converted remaining icons to svg 2019-01-04 00:24:30 +02:00
Chocobo1
a0f3678163 Fix only the first newline char is replaced
Must use regex to replace all instances of newline chars.
2019-01-04 00:56:54 +08:00
Chocobo1
9289b009b6 Fix missing semicolon in WebUI 2019-01-04 00:56:43 +08:00
Thomas Piccirello
28fa5a895c Allow WebUI Content tab to be sorted 2019-01-03 00:34:59 -08:00
Thomas Piccirello
06edabb9be Encode torrent name before passing in URL 2019-01-03 00:34:59 -08:00
Thomas Piccirello
26a9af850b Move WebUI Peers code to separate file 2019-01-03 00:34:59 -08:00
Thomas Piccirello
a5266c7018 Prevent WebUI tables from being highlighted 2019-01-03 00:34:59 -08:00
Thomas Piccirello
5d114614bb Allow WebUI Trackers table to be manipulated 2019-01-03 00:34:59 -08:00
Mike Tzou
f3c65f34b6 Merge pull request #10075 from Chocobo1/login
Add autocomplete attribute to WebUI
2019-01-03 14:15:11 +08:00
sledgehammer999
6b2a382ab8 Merge pull request #10066 from sledgehammer999/drop_migration_code
Drop upgrade code
2019-01-02 21:42:31 +02:00
Nick Korotysh
bd1856594b Draw progress bar in Fusion style on macOS systems
Qt has a bug QTBUG-72558, which leads to incorrect progress bar
position, when drawing it in delegate.
Also, since OS X 10.10 Yosemite macOS default style was changed,
and progress bars became very tiny and without text (percentage).
These two cases make qBittorrent look pretty awful, but drawing
progress bar in Fusion style solves both issues.
2019-01-02 10:01:32 +03:00
Mike Tzou
b87987ec89 Merge pull request #10074 from Chocobo1/magneturi
Drop support for "BC Link" format
2019-01-01 23:13:05 +08:00
Chocobo1
2b903fc3d1 Move Utils::Misc::isUrl() function
All usage of this function gets to call Net::DownloadManager eventually.
2018-12-31 20:00:15 +08:00
Chocobo1
6759446639 Cleanup code
Also remove redundant code, it is already handled correctly in subsequent function calls.
2018-12-31 20:00:15 +08:00
Chocobo1
19d6de795c Drop support for "BC Link" format
The format is marked obsolete on 2009.12.28 and has been replaced by magnet links.

http://wiki.bitcomet.com/inside_bitcomet#bc_link_format_obsoleted_as_of_v117
https://www.bitcomet.com/en/changelog
2018-12-31 20:00:15 +08:00
Chocobo1
d133ccc69f Add autocomplete attribute to WebUI
This helps the password manager to identify each field and provide
adequate actions.
2018-12-31 19:36:53 +08:00
sledgehammer999
d322e10a83 Merge pull request #10027 from glassez/compile-ts
Compile translations at build time
2018-12-31 11:31:45 +02:00
Mike Tzou
3772968f49 Merge pull request #10076 from Chocobo1/pr_9756
Prevent flickering preview dialog
2018-12-31 13:45:55 +08:00
sledgehammer999
1fff760722 Drop upgrade code 2018-12-31 00:41:17 +02:00
sledgehammer999
6236aee8d5 Merge pull request #10046 from sledgehammer999/translator
Mention more translators
2018-12-30 18:20:53 +02:00
Chocobo1
dd2763d725 Forward declare TorrentHandle 2018-12-29 18:39:54 +08:00
silver
0b47021504 Prevent flickering preview dialog
Avoid instantiation of a preview dialog, when torrent is not
previewable
2018-12-29 18:39:54 +08:00
Thomas Piccirello
877a2a2802 Include application version in css/js url for cache busting
This change forces new versions of all css and js files to be picked up when qBittorrent is updated.
2018-12-28 13:35:49 -05:00
Thomas Piccirello
9197b0a5ea Add version to lib file name. Move parametrics out of lib folder. 2018-12-28 13:34:48 -05:00
Mike Tzou
4e8ab08425 Merge pull request #10024 from Chocobo1/explicit
Mark constructors as explicit
2018-12-28 09:02:27 +08:00
Chocobo1
a5c53ff756 Simplify InfoHash, TrackerEntry class internals 2018-12-26 12:04:41 +08:00
Chocobo1
2a84345835 Mark constructors as explicit 2018-12-26 12:04:40 +08:00
Mike Tzou
94998b5da0 Merge pull request #10037 from Chocobo1/configure
Enforce C++14 requirement
2018-12-26 12:03:56 +08:00
sledgehammer999
5b62aaa9f8 Mention more translators
Closes #10043
2018-12-25 14:19:07 +02:00
sledgehammer999
fb6bb932da Update Changelog 2018-12-24 18:51:24 +02:00
sledgehammer999
7c172edd50 Sync translations from Transifex and run lupdate 2018-12-24 18:44:53 +02:00
sledgehammer999
05895f360b Update transifex config file 2018-12-24 18:43:19 +02:00
Chocobo1
814488863d Enforce C++14 requirement 2018-12-24 15:11:44 +08:00
Chocobo1
6bd5d0b8e9 Cleanup build scripts 2018-12-24 15:10:57 +08:00
Vladimir Golovnev
dd4cb43e3f Merge pull request #10035 from thalieht/no-meta-resume
Fix regression on resuming torrents without metadata
2018-12-24 08:22:47 +03:00
thalieht
d9416299f4 Fix regression on resuming torrents without metadata 2018-12-23 19:23:34 +02:00
Vladimir Golovnev (Glassez)
7b3eed323b QMake: Compile translations at build time 2018-12-22 16:02:17 +03:00
Mike Tzou
8aa2789ded Merge pull request #10023 from Chocobo1/html
Change qbt exit message to HTML5
2018-12-21 19:31:59 +08:00
Mike Tzou
25cefee0f8 Merge pull request #9959 from Chocobo1/strict
Use Javascript strict mode
2018-12-20 20:16:39 +08:00
Chocobo1
8dd334dc5d Change qbt exit message to HTML5 2018-12-19 18:29:00 +08:00
Mike Tzou
8ab94d7704 Merge pull request #9979 from Chocobo1/i18n_bak
Unify translation files loading action
2018-12-19 15:52:48 +08:00
Chocobo1
e98d4e874f Unify translation files loading action
Since it is possible alternative WebUI could be coded in languages other than English,
WebUI must be able to load user-provided webui_en.qm.
At least one translated string must exist in order to generate an usable .qm file.
2018-12-18 23:14:09 +08:00
sledgehammer999
6f638058d1 Merge pull request #10013 from sledgehammer999/revert_locale
Use configured locale only for translating
2018-12-18 16:28:05 +02:00
Vladimir Golovnev
38f4bea6f1 Merge pull request #9988 from elFarto/master
Keep track of REPACK/PROPER downloads
2018-12-18 08:58:25 +03:00
Stephen Dawkins
70435ab5bf Keep track of REPACK/PROPER downloads
When using the smart episode filter, if the episode contains REPACK and/or
PROPER, these should be stored to prevent it from redownloading a duplicate
episodes.

Closes #9898.
2018-12-17 09:52:12 +00:00
sledgehammer999
9491d40f22 Update transifex config file 2018-12-17 01:33:18 +02:00
sledgehammer999
3f9300dff4 Sync translations from Transifex and run lupdate 2018-12-17 01:22:33 +02:00
sledgehammer999
b69dd05216 Update WebUI .ts files 2018-12-17 01:16:23 +02:00
sledgehammer999
63cf216550 Use configured locale only for translating
Don't use other aspects of it eg for date formatting. We should depend
on the system locale for all these. The user probably likes it that way,
otherwise he would have changed it.
2018-12-17 00:13:28 +02:00
sledgehammer999
fd310e4e69 Merge pull request #10002 from Chocobo1/travisci
Upgrade TravisCI to xenial
2018-12-14 22:57:16 +02:00
sledgehammer999
d6f2647472 Merge pull request #9992 from Kolcha/mac-file-icon
Make file icon look like other macOS icons
2018-12-14 22:55:34 +02:00
Mike Tzou
deed457764 Merge pull request #9993 from Chocobo1/referer
Enforce referrer-policy in WebUI
2018-12-14 13:23:04 +08:00
Chocobo1
72ce5c26db Upgrade TravisCI to xenial
* Remove cmake installation, it is already pre-installed by TravisCI.
* Limit ccache cache size to 512 MB. Previously the size was 5 GB for
macOS and it took 1~3 mins just for packing & uploading the cache,
limiting the size should shorten total build time.
2018-12-14 13:19:00 +08:00
Mike Tzou
eebbf3b1ee Merge pull request #9981 from Piccirello/webui-torrent-filter
Add torrent name filtering to WebUI
2018-12-14 13:18:29 +08:00
Chocobo1
c1912e17c1 Revise CSP header
The majority of the CSP is tuned for built-in WebUI, it may not be
suitable for alternative UI.

Also add QLatin1String to strings. This code path is called repeatedly,
it is worth adding QLatin1String to squeeze out the last bit of
performance.
2018-12-13 15:31:32 +08:00
Chocobo1
d0886f8db0 Reformat WebUI code 2018-12-12 12:30:39 +08:00
Chocobo1
ba32525b45 Fix errors from using strict mode 2018-12-12 12:09:55 +08:00
Chocobo1
1cb065edc6 Use Javascript strict mode 2018-12-12 12:07:31 +08:00
Mike Tzou
1c525d9c19 Merge pull request #9375 from Piccirello/webui-trackers
Add additional tracker info to WebUI
2018-12-12 12:06:32 +08:00
Thomas Piccirello
7f349732ee Send numeric status without translation 2018-12-11 01:37:33 -05:00
Thomas Piccirello
718f66e6a2 Remove condition for unsupported libtorrent version 2018-12-11 01:37:32 -05:00
Thomas Piccirello
9e1f7a72b7 Simplify map initialization 2018-12-11 01:37:32 -05:00
Thomas Piccirello
33351e3d8d Add WebUI Trackers context menu 2018-12-11 01:37:32 -05:00
Thomas Piccirello
4947b0a44f Add DHT, PeX, and LSD to WebUI Tracker list 2018-12-11 01:37:32 -05:00
Thomas Piccirello
b8e4c6b0be Add additional Tracker columns to WebUI 2018-12-11 00:41:18 -05:00
Thomas Piccirello
dd790d94c9 Use const where appropriate 2018-12-11 00:41:18 -05:00
Thomas Piccirello
c89e9d4354 Reorder and rename Tracker list context menu option
Adds an ellipses to indicate that the Edit option opens a dialog. Also moves Edit to top of the list to convey action's prominence.
2018-12-11 00:41:18 -05:00
Thomas Piccirello
b481787574 Rename Tracker List columns
"Received" renamed to "Peers", "Peers" renamed to "Leeches".
2018-12-11 00:41:18 -05:00
sledgehammer999
cd2c448e6d Bump Web API version 2018-12-11 00:41:18 -05:00
Mike Tzou
cf9d903ba9 Merge pull request #9541 from Piccirello/webui-file-priority
Set priority for multiple files in one WebAPI request
2018-12-11 13:32:53 +08:00
Thomas Piccirello
57e625494b Update Copyright email address 2018-12-10 23:21:09 -05:00
Thomas Piccirello
66015164d7 Fix display bugs in WebUI Files tab. Remove <IE9 support
Priority select boxes would frequently go blank due to an unexpected priority value. On first load, the torrent-scoped file checkbox's state was inconsistent with the state of the torrent's files.
2018-12-10 23:21:09 -05:00
Thomas Piccirello
a44ed9cfd3 Fix incorrect priority value sent from WebUI
Closes #9070.
2018-12-10 23:21:09 -05:00
Thomas Piccirello
c5b8f62780 Set priority for multiple files in one WebAPI request
Closes #6259.
2018-12-10 23:21:09 -05:00
Thomas Piccirello
f27dc977e9 Replace prio namespace with FilePriority enum class 2018-12-10 23:21:09 -05:00
Chocobo1
7fd30fa90f Enforce referrer-policy in WebUI
This stops leaking private data to other websites via Referrer header.
2018-12-10 22:17:04 +08:00
Nick Korotysh
afbcf2095f Make file icon look like other macOS icons 2018-12-10 11:16:32 +03:00
Mike Tzou
e1f19b7c75 Merge pull request #9986 from Piccirello/webui-peers-columns
Match WebUI Peers table column order to GUI
2018-12-10 12:34:11 +08:00
Mike Tzou
3ff7d16cfc Merge pull request #9982 from Chocobo1/fixes
Fix TravisCI linux builds
2018-12-10 12:33:51 +08:00
Thomas Piccirello
66f6823965 Add torrent name filtering to WebUI
Closes #721
2018-12-09 11:30:56 -05:00
Vladimir Golovnev
fc08091765 Merge pull request #9940 from glassez/error-msg
Show error message when Session failed to start
2018-12-09 11:16:17 +03:00
Mike Tzou
2eb213e2f9 Merge pull request #9758 from Piccirello/new-search-webui-2
Add Search feature to WebUI
2018-12-09 16:01:21 +08:00
Mike Tzou
c093561532 Merge pull request #9980 from Chocobo1/opensslVersion
Add OpenSSL version to GUI & stackdump
2018-12-09 15:57:33 +08:00
Mike Tzou
0418401ddd Merge pull request #9976 from Piccirello/fix-js-error
Fix JavaScript error
2018-12-09 15:56:38 +08:00
Thomas Piccirello
f3c1e82199 Match WebUI Peers table column order to GUI 2018-12-09 00:36:43 -05:00
Mike Tzou
f32865b0c8 Merge pull request #9752 from Piccirello/webui-autotmm
Add missing Preferences to WebUI
2018-12-08 19:58:27 +08:00
Chocobo1
1b2cdda7e2 Use gcc-5 for TravisCI linux builds
Remove workarounds for CXXFLAGS.
Using 3 compilation jobs should cause process trashing, tune it down to 2.
TravisCI container builds is deprecated, so remove the `sudo: false` command.
2018-12-08 14:15:34 +08:00
Chocobo1
2a428ffd37 Use CC, CXX from environment when available 2018-12-08 13:15:18 +08:00
Chocobo1
f13bcbd772 Add OpenSSL version to GUI & stackdump 2018-12-08 12:46:50 +08:00
Thomas Piccirello
a8d5b146be Fetch data less frequently when torrents tab isn't visible 2018-12-07 23:33:15 -05:00
Thomas Piccirello
b7ad751ec3 Add Search tab to WebUI
Closes #859, #8107.
2018-12-07 23:33:15 -05:00
Chocobo1
a137f1493e Use correct locale to display date 2018-12-08 12:19:56 +08:00
Chocobo1
de437b905b Fix MSVC C4267 warning
The warning was: "warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of
data"
2018-12-08 12:19:56 +08:00
Tom Piccirello
adcfbf0b8c Fix JavaScript error
Fixes a JavaScript error caused by the element lookup returning null
2018-12-07 18:41:32 -05:00
Thomas Piccirello
3aeaf6a054 Disallow setting a blank alternative WebUI location 2018-12-07 00:57:59 -05:00
Thomas Piccirello
402715004c Add slow torrent options 2018-12-07 00:55:29 -05:00
Thomas Piccirello
2ebc6a056e Add "Use alternative Web UI" option 2018-12-07 00:55:29 -05:00
Thomas Piccirello
c237accf82 Add "Apply rate limit to peers on LAN" option 2018-12-07 00:55:29 -05:00
Thomas Piccirello
e499e1ba85 Add email "From" option 2018-12-07 00:55:29 -05:00
Thomas Piccirello
abf43b695b Set WebUI download options using set preferences
"Start torrent" and "Create subfolder" are now set depending on the user's set preferences, which matches the behavior exhibited by the GUI.
2018-12-07 00:55:29 -05:00
Thomas Piccirello
7151d6babd Show list of categories on WebUI download page 2018-12-07 00:55:29 -05:00
Thomas Piccirello
a7c2ee3ce6 Hide WebUI text input for custom monitor save locations 2018-12-07 00:55:29 -05:00
Thomas Piccirello
19ccd8c7d3 Add "When adding a torrent" options 2018-12-07 00:55:29 -05:00
Thomas Piccirello
d05cf47169 Add WebUI Auto TMM options 2018-12-07 00:55:29 -05:00
Thomas Piccirello
bf4df54fb8 Replace all line breaks and fix legend code style. 2018-12-07 00:55:29 -05:00
Thomas Piccirello
127e4acb24 Add speed limit icons to WebUI Speed options 2018-12-07 00:55:29 -05:00
Thomas Piccirello
b9229babfc Add WebUI Random port button and proxy unencrypted password notice 2018-12-07 00:55:29 -05:00
Thomas Piccirello
66e3be1579 Replace WebUI Options fixed-width labels
This allows the labels to auto-expand based on the language used, and also removes unnecessary whitespace. Additionally, this results in a look more consistent with the GUI which right-aligns labels.
2018-12-07 00:55:29 -05:00
Thomas Piccirello
99ca872011 Reorder WebUI options to match GUI 2018-12-07 00:52:50 -05:00
Mike Tzou
6bb4eb825b Merge pull request #9942 from Chocobo1/pbkdf2
Do password hashing properly
2018-12-06 16:22:22 +08:00
Mike Tzou
1eef5b6876 Merge pull request #9373 from FranciscoPombal/checking_mem_usage_adv_settings
Add checking_mem_usage option to AdvancedSettings
2018-12-06 16:20:02 +08:00
Mike Tzou
0ab5b8fcba Merge pull request #9824 from thalieht/style
Convert all foreach() to range-based for()
2018-12-06 16:19:17 +08:00
FranciscoPombal
74be5d9030 Add checking_mem_usage option to AdvancedSettings 2018-12-06 03:10:24 +08:00
Vladimir Golovnev
de9067d6a3 Merge pull request #9967 from thalieht/mac-start-minimized
Save option to start minimized in Mac
2018-12-05 20:30:51 +03:00
Vladimir Golovnev (Glassez)
89deccd9b5 Show error message when Session failed to start 2018-12-05 19:57:44 +03:00
Chocobo1
593052dd93 Revise startup message in nox version
Only print the WebUI username when password is still the default.
2018-12-05 13:28:43 +08:00
Chocobo1
2c8890bd06 Apply PBKDF2 to GUI lock 2018-12-05 13:28:42 +08:00
Chocobo1
05d6a29416 Apply PBKDF2 when storing passwords 2018-12-05 13:28:42 +08:00
Chocobo1
8a6cac8338 Make OpenSSL a direct dependency 2018-12-05 13:28:42 +08:00
Mike Tzou
eb957bb790 Merge pull request #9953 from Chocobo1/announce
Use ip parameter from tracker request if provided
2018-12-05 11:13:03 +08:00
sledgehammer999
31078cb7fd Merge pull request #9907 from sledgehammer999/cxx11_autotools
Autotools: Better C++ mode detection and handling
2018-12-04 17:32:37 +02:00
sledgehammer999
63e4dc566a Autotools: Replace CPPFLAGS with CXXFLAGS 2018-12-04 16:54:51 +02:00
sledgehammer999
d04d6bfcf8 Autotools: Print Boost LDFLAGS nicer 2018-12-04 16:53:48 +02:00
thalieht
6a21acbf1a Save option to start minimized in Mac 2018-12-04 11:43:32 +02:00
sledgehammer999
8f5bbe24ce Autotools: Improve handling of C++ mode 2018-12-04 01:42:14 +02:00
Mike Tzou
1baa71c97a Merge pull request #9938 from Chocobo1/tr
Fix translation issues
2018-12-03 13:30:14 +08:00
Chocobo1
ede9b1a7c4 Fix typo 2018-12-03 12:06:32 +08:00
Chocobo1
b4564f5f4e Use ip parameter from tracker request if provided
Closes #9949.
2018-12-03 00:14:15 +08:00
Chocobo1
b56937f5fa Use QHostAddress for storing IP 2018-12-02 14:18:18 +08:00
Chocobo1
36429887dc Fix wrong locale used in log message 2018-12-01 20:39:20 +08:00
Chocobo1
297ef52dcb Fix weekday names translations
Closes #9933.
2018-12-01 20:32:35 +08:00
Chocobo1
0ad831e48a Fix strings not translated
Closes #9934.
2018-12-01 20:32:34 +08:00
thalieht
1f36b8b89f Combine qAsConst() with copyAsConst() to asConst() 2018-11-28 23:41:23 +02:00
thalieht
6b1d26d555 Convert all foreach() to range-based for() 2018-11-28 23:40:12 +02:00
thalieht
d668a4fe6d Fix coding style for various things 2018-11-28 23:37:35 +02:00
Mike Tzou
5efdd211cc Merge pull request #9892 from Chocobo1/progress
Code cleanup
2018-11-29 01:16:07 +08:00
Vladimir Golovnev
9e00f08ea6 Merge pull request #9883 from glassez/queue
Save torrents queue in separate file
2018-11-28 16:07:29 +03:00
Thomas Piccirello
4d3a894bcb Allow tables to be added without a parent panel 2018-11-28 00:21:56 -05:00
Thomas Piccirello
881b692c58 Simplify implementation 2018-11-28 00:21:56 -05:00
Thomas Piccirello
b2f454399c Add ability to pass urls to the webui download page 2018-11-28 00:21:56 -05:00
Chocobo1
0339e6ee35 Clean up code 2018-11-27 22:01:27 +08:00
Vladimir Golovnev (Glassez)
68508ba657 Save torrents queue in separate file 2018-11-27 16:55:45 +03:00
Vladimir Golovnev (Glassez)
e146c2f227 Fix signed/unsigned integers comparison warning 2018-11-27 16:55:44 +03:00
Mike Tzou
a97543d258 Merge pull request #9919 from Piccirello/webui-sidebar
Show ellipsis when WebUI sidebar is too narrow
2018-11-27 21:02:21 +08:00
Mike Tzou
a7c6e873d4 Merge pull request #9889 from Piccirello/instantiate-search
Only instantiate SearchPluginManager as needed
2018-11-27 21:00:46 +08:00
Thomas Piccirello
64c20bf6b2 Allow WebUI sidebar to be collapsed 2018-11-25 15:05:31 -05:00
Thomas Piccirello
2ef16f669b Show ellipsis when WebUI sidebar is too narrow 2018-11-25 14:57:49 -05:00
Vladimir Golovnev
0e8323659e Merge pull request #9869 from Piccirello/download-bug
Fix WebUI bug on override of Start Torrent option
2018-11-25 06:40:22 +03:00
Mike Tzou
45cfac6c00 Merge pull request #9891 from Chocobo1/i18n
Fix missing words in WebUI
2018-11-24 10:55:13 +08:00
Chocobo1
b79a231d2e Fix missing words in WebUI
This is because Qt translator returns empty string when the translation
is not provided, now we fallback to the original string from source code.

Closes #9868.
2018-11-23 23:42:20 +08:00
Mike Tzou
70707a2664 Merge pull request #9884 from Piccirello/webui-cookie-samesite
Add SameSite attribute to WebUI session cookie
2018-11-22 10:40:37 +08:00
Thomas Piccirello
4885fe6b4c Only instantiate SearchPluginManager as needed 2018-11-21 16:59:38 -05:00
Thomas Piccirello
cd47380b85 Add SameSite attribute to WebUI session cookie
This attribute prevents the cookie from being submitted on any cross-site request, strongly limiting CSRF.

Closes #9877.
2018-11-20 22:12:24 -05:00
Mike Tzou
d05897c89a Merge pull request #9859 from Chocobo1/host
Add option for WebUI Host header validation
2018-11-20 12:37:55 +08:00
Mike Tzou
9826aec4cf Merge pull request #9820 from Piccirello/webui-col-icon
Show icon in WebUI sorted column
2018-11-19 15:06:01 +08:00
Tom Piccirello
2d7138839d Fix WebUI bug on override of Start Download option
Disabled form values aren't submitted, causing the add_paused value not to be sent when Start Torrent was checked. qBittorrent would then fall back to the global Start Download preference.

Closes #9855.
2018-11-18 22:46:19 -05:00
Chocobo1
58be2d4bc2 Put WebUI security related options into a groupbox 2018-11-19 11:05:04 +08:00
Chocobo1
344e47dcfb Add option for WebUI Host header validation
Closes #9743.
2018-11-19 11:05:04 +08:00
Mike Tzou
39ee27785c Merge pull request #9835 from Chocobo1/cppver
Implement proper C++11 mode detection
2018-11-19 10:53:32 +08:00
sledgehammer999
45878fb7dd Sync translations from Transifex and run lupdate 2018-11-19 01:35:31 +02:00
Mike Tzou
d3e012148e Merge pull request #9858 from Chocobo1/clamp
Clamp values properly
2018-11-18 19:43:34 +08:00
Chocobo1
d866033a8e Fix divide-by-zero crash
Previously here was using a cheap method to avoid divisor becoming < 0, but from
the crash stacktrace it seems this is not enough, now the divisor is properly
clamped to have 1 as the minimum.
Also it will now display "Unknown" for invalid calculation results.

Closes #9857.
2018-11-18 13:50:23 +08:00
Vladimir Golovnev
4f565d9f09 Merge pull request #9844 from glassez/fix-rss
Improve RSS Feed updating. Closes #9833
2018-11-17 11:32:04 +03:00
Vladimir Golovnev (Glassez)
64d7cf4794 Improve RSS Feed updating
Don't process "out-of-limit" articles.
Closes #9833.
2018-11-16 10:30:24 +03:00
Mike Tzou
9090f2d321 Merge pull request #9832 from thalieht/fieldwidth
Allow qBt to resize the search filter in search job
2018-11-14 03:58:37 +08:00
Chocobo1
819a84eb7a Implement proper C++11 mode detection
Newer compilers have C++14 mode as default and package maintainers tend
to not specifying a C++ version when building a package, this causes
compatibility issues when (for example) qbt is compiled in C++11 and
dependency lib is in C++14. See issue #9485.

What this commit does:
1. Checks if compiler supports at least C++11
2. Checks if compiler is set in at least C++11 mode
2018-11-13 23:06:41 +08:00
thalieht
59fcfdc13b Allow resizing search filter in search job
Allow qBt to resize the search filter in search job because it causes
qBt's width to exceed the screen's width for laptop users.
2018-11-13 11:20:29 +02:00
Thomas Piccirello
555382779c Show icon in WebUI sorted column 2018-11-12 19:37:54 -05:00
sledgehammer999
ceb4a0d5fe Change FossHub RSS url for updates
The new RSS format is compatible with our current parser. FossHub will
redirect old URL to the new one so older clients will not be affected.
2018-11-11 18:30:00 +02:00
Mike Tzou
547140ec46 Merge pull request #9822 from Chocobo1/fixCrash
Don't double delete a pointer
2018-11-09 00:11:09 +08:00
Chocobo1
626b9eb380 Don't double delete a pointer
`m_searchFilterAction` is owned by Qt, so we shouldn't delete it
manually.
2018-11-08 21:02:44 +08:00
Eugene Shalygin
019da6a98c Merge pull request #9509 from zeule/cmake-cxx14
cmake: use C++14 when available
2018-11-07 14:07:16 +01:00
Mike Tzou
2ce57b97be Merge pull request #9799 from Chocobo1/removeCheckbox
Remove speed limit checkbox in Options dialog
2018-11-07 13:40:43 +08:00
Vladimir Golovnev
d2d28ef19c Merge pull request #9815 from dzmat/fix_zero_graphs
Fix speed graph "high speeds" bug. Closes #9807
2018-11-06 17:15:21 +03:00
dzmat
6fa64c81b7 Fix speed graph "high speeds" bug 2018-11-06 15:53:20 +03:00
Vladimir Golovnev
54e4806e3d Merge pull request #9817 from Piccirello/torrent-dl-success
Handle downloading .torrent file as success
2018-11-06 15:39:51 +03:00
Vladimir Golovnev
46ec72f688 Merge pull request #9580 from glassez/start_paused
Improve handling of torrent startup/recheck
2018-11-06 15:34:21 +03:00
Chocobo1
266ce1d226 Clean up SpeedLimitDialog class 2018-11-05 11:07:52 +08:00
Chocobo1
3fa5358c3f Remove speed limit checkbox in Options dialog
This unifies speed limit UI elements throughout the program.
2018-11-05 11:07:52 +08:00
Tom Piccirello
1b81356a67 Handle downloading .torrent file as success
We don't know whether the download will be successful, so default to success. Closes #9811.
2018-11-04 14:43:33 -05:00
Mike Tzou
a57a026f4c Merge pull request #9804 from Chocobo1/fix_search
Fix defects in search engine
2018-11-04 12:51:49 +08:00
Chocobo1
c1c28ce195 Improve parser for search engine versions.txt
The parse could fail when there is an extra empty line at the end of
file, this patch fixes it.
2018-11-03 01:01:46 +08:00
Chocobo1
ee030cc4eb Fix wrong type passed to arg() 2018-11-03 00:34:25 +08:00
Chocobo1
d52c6230e9 Fix defects found by lgtm.com 2018-11-03 00:34:25 +08:00
Mike Tzou
53f9d031c9 Merge pull request #9800 from Chocobo1/warning
Fix compiler warnings
2018-11-03 00:33:19 +08:00
Vladimir Golovnev (Glassez)
1214cf0fa1 Don't update torrent status unnecessarily 2018-11-02 19:25:39 +03:00
Vladimir Golovnev (Glassez)
9dadb919ef Improve force recheck of paused torrent 2018-11-02 19:25:38 +03:00
Vladimir Golovnev (Glassez)
a8c00456e4 Restore torrent in two steps
Add/restore all torrents in "paused" state and then resume those
that need to be really "resumed" (added/restored in "resumed" state).
Keep torrents with missing files paused.
Force recheck torrent with missing files when it's resumed by the user.
2018-11-02 19:25:26 +03:00
Chocobo1
209e6a889a Fix MSVC warning C4804
Full message of the warning:
webui\api\searchcontroller.cpp(54): warning C4804: '>': unsafe use of type 'bool'
in operation
2018-11-02 14:35:35 +08:00
Vladimir Golovnev
dea6b3d7e0 Merge pull request #9562 from dzmat/round_speed_labels
Improve scaling of speed graphs
2018-11-01 09:46:26 +03:00
Vladimir Golovnev
69bf848f32 Merge pull request #9777 from glassez/fix-altwebui
Fix Alternative Web UI to be available. Closes #9720
2018-10-29 09:20:14 +03:00
Vladimir Golovnev (Glassez)
f309a5279e Fix Alternative Web UI to be available 2018-10-29 08:32:57 +03:00
Vladimir Golovnev
2a67f640f0 Merge pull request #9774 from glassez/fix-locale
Consider empty locale  setting as not set. Closes #9735
2018-10-28 17:43:07 +03:00
Vladimir Golovnev
4fee16fafb Merge pull request #8217 from Piccirello/webui-statusbar-freespace
Free disk space in WebUI status bar
2018-10-28 10:02:49 +03:00
Vladimir Golovnev (Glassez)
5712c05e68 Consider empty locale setting as not set 2018-10-27 20:59:08 +03:00
Vladimir Golovnev
b5d253ae66 Merge pull request #9766 from glassez/fix-indent
Fix indentation in tstool.py
2018-10-27 07:52:29 +03:00
Vladimir Golovnev (Glassez)
f0f329b402 Fix indentation in tstool.py 2018-10-26 20:46:02 +03:00
Vladimir Golovnev
30dadfceea Merge pull request #9718 from qbittorrent/webapi-version-bump
Bump WebAPI version
2018-10-25 08:41:53 +03:00
Mike Tzou
2fd4d50f3a Merge pull request #9754 from silverqx/previewable-ts-ext
Recognize TS files as previewable
2018-10-25 12:56:02 +08:00
silver
0b20750cd5 Recognize *.ts files as previewable 2018-10-24 16:18:35 +02:00
Vladimir Golovnev
7e36cc746f Merge pull request #8584 from Piccirello/new-search-api-2
WebUI search API. Closes #2495
2018-10-24 13:13:16 +03:00
Thomas Piccirello
f2957c721d Use QElapsedTimer 2018-10-22 23:17:46 -04:00
Thomas Piccirello
2aea235e34 Add free disk space to WebUI status bar
Closes #6829.
2018-10-22 22:06:14 -04:00
dzmat
fabd7e34f5 Improve scaling of speed graphs
Make Y axis scale to fix on predetermined nice looking positions
2018-10-21 16:45:32 +07:00
Mike Tzou
c57a7292b6 Merge pull request #9698 from Chocobo1/travis
Fix TravisCI cmake build on macOS
2018-10-18 10:28:04 +08:00
Chocobo1
c269d63bc1 Fix TravisCI cmake build on macOS
Instead of hard coding a macOS version to use, now we follow TravisCI default
version, currently: xcode9.4.
2018-10-18 00:57:58 +08:00
Tom Piccirello
41462a39c7 Bump WebAPI version 2018-10-17 10:54:40 -04:00
Mike Tzou
1c3112e402 Merge pull request #9710 from Piccirello/webui-autotmm-context-bug
Fix WebUI Auto TMM context menu bug
2018-10-16 16:46:23 +08:00
Thomas Piccirello
bab18036aa Fix WebUI Auto TMM context menu bug
When multiple torrents are selected with different Auto TMM values, the Auto TMM context menu option is hidden. This option is never unhidden, requiring a refresh of the page.
2018-10-15 21:08:42 -04:00
Thomas Piccirello
ae374f6903 Catch invalid values 2018-10-15 04:31:29 -04:00
Eugene Shalygin
5ccd4b3611 Merge pull request #9691 from zeule/cmake
cmake: restore out-of-source build
2018-10-14 11:28:51 +02:00
Eugene Shalygin
e590fff2fe cmake: restore out-of-source build
Qt translations have to be compiled in a shared library or executable,
and since we use static libraries for the components, webui translation
files have to be compiled into the main executable.
2018-10-14 11:06:20 +02:00
Mike Tzou
18a64f109d Merge pull request #9683 from Chocobo1/win_fs
Add isNetworkFileSystem() detection on Windows
2018-10-14 01:29:22 +08:00
Vladimir Golovnev
7befc79081 Merge pull request #9600 from dzmat/averager
Rewrite averaging code and reduce horizontal graphs resolution
2018-10-13 16:52:58 +03:00
dzmat
23d924643f Reduce horizontal graphs resolution
Rewrite averaging code and reduce horizontal graphs resolution for
30 minutes and 6 hours graphs to decrease CPU usage.
2018-10-13 18:28:38 +07:00
Vladimir Golovnev
ff72be9c2d Merge pull request #9481 from mj-p/master
Don't recheck just checked torrent. Closes #8743, #9370
2018-10-13 09:34:27 +03:00
Vladimir Golovnev
5d2e35d14d Merge pull request #9026 from glassez/www-translate
Use independent translation for WebUI
2018-10-12 13:39:18 +03:00
Vladimir Golovnev
3e8f3d61fb Merge pull request #9586 from Piccirello/webui-categories
Add categories WebAPI
2018-10-12 10:27:13 +03:00
Vladimir Golovnev
72e148e0f1 Merge pull request #9590 from dzmat/disable_graphs_collection
Implement option for disabling speed graphs
2018-10-12 08:24:33 +03:00
Chocobo1
acdf5363b2 Simplify #if conditions 2018-10-12 00:04:08 +08:00
Chocobo1
cff5af2e76 Add isNetworkFileSystem() detection on Windows
This allows network mounts to be monitored correctly by polling timer.
2018-10-12 00:03:12 +08:00
Mike Tzou
fb8fad3fa1 Merge pull request #9673 from Chocobo1/fs_watch
Add SMB2 magic number
2018-10-11 23:11:06 +08:00
Vladimir Golovnev
305c1fc851 Merge pull request #8980 from silverqx/clear-on-esc
Clear LineEdit on ESC
2018-10-11 17:31:38 +03:00
Chocobo1
9b552c463f Add FileSystemWatcher log messages 2018-10-11 11:01:22 +08:00
Chocobo1
25a0147f61 Add SMB2 magic number
Closes #9671.
2018-10-10 10:36:26 +08:00
Vladimir Golovnev (Glassez)
c1a4ef1377 Use independent translation for WebUI 2018-10-09 11:10:08 +03:00
Vladimir Golovnev (Glassez)
becb002d87 Create WebUI translation update tool 2018-10-09 11:10:07 +03:00
Vladimir Golovnev
85d49e2540 Merge pull request #9595 from elFarto/master
Allow to disable downloading REPACK/PROPER matches
2018-10-09 08:20:48 +03:00
Stephen Dawkins
d8054f9cb3 Allow to disable downloading REPACK/PROPER matches 2018-10-09 08:14:12 +03:00
dzmat
2d0f0cb372 Allow to disable speed graphs 2018-10-08 23:51:02 +07:00
Thomas Piccirello
6d619e9491 Add categories WebAPI
Closes #5330.
2018-10-07 14:52:34 -04:00
silverqx
ea404445f6 Clear LineEdit on ESC 2018-10-04 20:01:12 +02:00
sledgehammer999
b09e32ebc0 Merge pull request #9635 from sledgehammer999/tune_alert_mask
Use a more detailed alert mask where possible
2018-10-02 19:36:27 +03:00
Mike Tzou
5aaa51881e Merge pull request #9614 from Piccirello/js-defects
Fix minor JavaScript defects
2018-10-02 10:19:47 +08:00
sledgehammer999
2f1a0ffe5c Use a more detailed alert mask where possible
Closes #9547
2018-10-02 02:42:06 +03:00
Vladimir Golovnev
1de7c385d5 Merge pull request #9585 from Piccirello/webui-translate-status
Translate WebUI torrents Status column
2018-10-01 18:23:51 +03:00
Vladimir Golovnev
3236f65533 Merge pull request #9606 from dzmat/patch-1
Update uncrustify.cfg
2018-10-01 18:21:04 +03:00
Thomas Piccirello
0b6ae68801 Add WebUI search API controller
Closes #2495.
2018-09-30 20:07:27 -04:00
dzmat
998545512a Update uncrustify.cfg
Suddenly uncrustify does not append spaces after comma in function's argument lists. I found only one option which looks fit for it.
2018-09-30 15:46:33 +07:00
Administrator account
f6ed605414 Don't recheck just checked torrent
Closes #8743.
Closes #9370.
2018-09-29 17:13:44 +03:00
Mike Tzou
649798c989 Merge pull request #9611 from Chocobo1/fixes
Fix minor defects
2018-09-28 02:42:03 +08:00
Thomas Piccirello
1e6942e967 Fix minor JavaScript defects 2018-09-26 23:10:51 -04:00
Chocobo1
43fbf8ab3b Remove default parameter in derived function
When derived function have different default value than base, it might cause
unnecessary confusion, see: https://stackoverflow.com/q/3533589
2018-09-27 00:43:24 +08:00
Chocobo1
b8d87f641f Avoid variable shadowing 2018-09-26 23:53:17 +08:00
Chocobo1
66ffb01629 Add include guard to headers 2018-09-26 23:49:33 +08:00
Mike Tzou
08df3277df Merge pull request #9575 from Chocobo1/python
Fix asking to install Python
2018-09-26 12:36:05 +08:00
Chocobo1
f26a5c3581 Update Python URLs 2018-09-25 11:46:40 +08:00
Chocobo1
7d808cfc99 Fix asking to install Python
The dialog asking users to install python is borked since the last refactor, this
commit fixes it.
2018-09-25 11:46:39 +08:00
Chocobo1
60ecc4fe8f Move python related functions
Also the functions are slightly changed to return full path of the found
python executable.
2018-09-25 11:46:39 +08:00
Thomas Piccirello
65934a4c69 Add locale to js file path
This reduces the likelihood of a cached file being used after the locale is changed.
2018-09-23 16:27:47 -04:00
Thomas Piccirello
7b85473d2b Translate WebUI torrents Status column
Closes #9554.
2018-09-22 18:13:47 -04:00
sledgehammer999
6c0af1b078 Merge pull request #9553 from sledgehammer999/misc_fixes
Misc fixes
2018-09-22 20:09:54 +03:00
sledgehammer999
76f186f395 Merge pull request #9564 from dzmat/littlfix
Replace magic number with system define.
2018-09-22 14:10:11 +03:00
sledgehammer999
06c8142826 Make strings actually translatable 2018-09-22 14:05:41 +03:00
sledgehammer999
e8213b2c6a Remove unused variable 2018-09-22 14:05:40 +03:00
dzmat
fc93f2eb78 Replace magic number with system define 2018-09-21 22:33:43 +07:00
Eugene Shalygin
9b7a884d2b Merge pull request #9330 from zeule/cmake
Reword the CMake warning message
2018-09-20 20:43:35 +02:00
Eugene Shalygin
c8a6fe9974 Reword the warning message 2018-09-20 18:27:10 +02:00
Mike Tzou
5a638e4d28 Merge pull request #9525 from Chocobo1/pep8
Reformat python code to be compliant with PEP8
2018-09-19 17:41:47 +08:00
sledgehammer999
de951d6637 Sync translations from Transifex and run lupdate 2018-09-18 22:31:50 +03:00
Chocobo1
bbe76231cf Reformat python code to be compliant with PEP8
The following command is used:
`pycodestyle --ignore=E265,E722 --max-line-length=100 <py files>`
2018-09-18 12:33:09 +08:00
Eugene Shalygin
141af072b9 cmake: use C++14 when available
Libtorrent does the same and we have to follow since
its ABI depends on the C++ standard version.

Partially closes #9485.
2018-09-16 18:29:15 +02:00
sledgehammer999
bdc788c824 Bump Web API version 2018-09-16 09:37:32 +03:00
Vladimir Golovnev
fe9fb03e38 Merge pull request #9482 from proninyaroslav/patch-1
Fix typo in variable name
2018-09-13 19:45:14 +03:00
Vladimir Golovnev
28a6ac3197 Merge pull request #9228 from Piccirello/addCategory
Add save path and category editing to WebUI
2018-09-13 19:43:28 +03:00
sledgehammer999
6660184091 Merge pull request #9483 from sledgehammer999/save_queued_state_change
Save state change from queued to paused
2018-09-12 11:29:27 +03:00
sledgehammer999
7d493f5367 Fix macOS builds in travis-ci 2018-09-11 22:05:34 +03:00
sledgehammer999
c520e657ce Save state change from queued to paused 2018-09-11 21:00:04 +03:00
Yaroslav Pronin
4e28033c9c Fix typo in variable name 2018-09-11 17:56:55 +00:00
sledgehammer999
bfb1210c43 Merge pull request #9406 from thalieht/preselecttext
Preselect name without extension when renaming files
2018-09-11 14:33:25 +03:00
Vladimir Golovnev
5e35335ad4 Merge pull request #9254 from thalieht/searchStuff
Add a shortcut to download selected torrents from search job
2018-09-10 07:19:02 +03:00
Vladimir Golovnev
d18de18128 Merge pull request #9461 from thalieht/tracker
Show "N/A" if there is no scrape response
2018-09-10 07:14:28 +03:00
sledgehammer999
01feae60ee Merge pull request #9449 from sledgehammer999/favicon_key
Save option about tracker favicons under correct key
2018-09-09 01:30:00 +03:00
sledgehammer999
118545d0f4 Merge pull request #9383 from sledgehammer999/huge_alert_queue
Decrease probability of missing important alerts
2018-09-09 01:29:28 +03:00
Mike Tzou
5cb41c3c2d Merge pull request #9387 from Piccirello/webui-pref-tweaks
Minor WebUI visual changes
2018-09-08 14:51:26 +08:00
thalieht
94613c2fa2 Fix some warnings 2018-09-07 19:40:08 +03:00
thalieht
e2b46f01bb Show "N/A" if there is no scrape
Disambiguates whether the tracker send a response of 0 peers/seeds/downloaded or didn't send one at all.
2018-09-07 19:39:53 +03:00
Mike Tzou
487ea36782 Merge pull request #9444 from Chocobo1/dpi
Fix GUI scaling issue on Linux
2018-09-06 16:04:44 +08:00
sledgehammer999
eb9f07bcc6 Save option about tracker favicons under correct key 2018-09-06 02:45:09 +03:00
sledgehammer999
9ce619eac8 Decrease probability of missing important alerts
During startup we can get above 1000 alerts at each pop even with only
30 torrents in the queue. This is because libtorrent will post
piece_finished_alert and file_completed_alert for each torrent. These
alerts push out of the way the ones we care about.
The alert queue will be grown to max only if needed. So we don't use
more memory. It will greatly depend on how many torrents a user has in
their session.

When getting fastresume_rejected_alert we need to act as fast as
possible in pausing it, otherwise there's a chance it will begin
downloading and writing to disk before we pause it.
2018-09-06 02:06:44 +03:00
thalieht
ffc2193df9 Preselect name without extension when renaming files
And preselect the whole string for everything else.
2018-09-05 16:55:42 +03:00
Thomas Piccirello
fef1ad6083 Allow WebUI sidebar filters to be hidden 2018-09-05 02:40:33 -04:00
Chocobo1
79dae55a61 Fix GUI scaling issue on Linux
It seems `QT_AUTO_SCREEN_SCALE_FACTOR` doesn't work as expected.
Closes #6935.
2018-09-05 12:17:30 +08:00
Mike Tzou
8544351754 Merge pull request #9436 from Piccirello/disable-dht
Don't disable DHT when using force proxy
2018-09-05 12:01:20 +08:00
Thomas Piccirello
c10d237f7a Don't disable DHT when using force proxy
Closes #9292
2018-09-02 19:48:03 -04:00
Thomas Piccirello
adad883eb6 Increase WebUI Options initial height 2018-08-31 11:38:17 -04:00
Thomas Piccirello
b05a443cad Adjust WebUI Options form alignment 2018-08-31 11:38:10 -04:00
Thomas Piccirello
63c53766b4 Add save path and editing to WebUI new category dialog 2018-08-31 11:27:05 -04:00
thalieht
ce3e68670d Refactor in searchjob to always color visited entries
Now it colors multiple entries, when visited at once, via the hotkey or
the Download button.
2018-08-31 15:57:07 +03:00
Mike Tzou
846d8993a9 Merge pull request #9410 from Chocobo1/clazy
Minor fixes
2018-08-30 12:07:34 +08:00
Chocobo1
371c7008e1 Update INSTALL file
Closes #9385.
2018-08-29 19:22:33 +08:00
sledgehammer999
6f04754a63 Merge pull request #9408 from FlingeR/patch-openbsd
Support the OpenBSD filesystem
2018-08-28 23:19:35 +03:00
Elias M. Mariani
33af699191 Support the OpenBSD filesystem 2018-08-28 13:58:09 -03:00
Chocobo1
718b3f0bf5 Reset button text to default
This is to avoid Qt auto-generating code like this:
  `buttonAdd->setText(QStringLiteral(""));`
Which makes no sense and triggers clazy warning (Wclazy-empty-qstringliteral).
2018-08-28 14:14:01 +08:00
Chocobo1
254782def6 Avoid copy-construct QString in for loop 2018-08-28 14:13:59 +08:00
sledgehammer999
be419d5ecf Fix TravisCI macOS builds 2018-08-27 22:00:58 +03:00
sledgehammer999
af6c5ae5bd Merge pull request #9390 from thalieht/fixprioritysaving
Save fastresumes when changing torrent priorities
2018-08-27 21:33:02 +03:00
thalieht
ec9120adf0 Save torrents priorities on torrent finished
Save fastresumes for all torrents that shifted in the queue when a torrent finished.
2018-08-25 22:02:14 +03:00
thalieht
95b02bbb2e Save fastresumes when changing torrent priorities 2018-08-25 22:02:14 +03:00
Vladimir Golovnev (Glassez)
386d0565fe Always save actual queue position 2018-08-25 22:02:14 +03:00
Vladimir Golovnev
9fa78c7b50 Merge pull request #9331 from thalieht/seqfirstlast
Allow setting seq & first/last from context menu without metadata
2018-08-22 17:16:44 +03:00
Vladimir Golovnev
93f9b3de8b Merge pull request #9314 from thalieht/searchregexfilter
Add option to use regexps in the search job's search filter's context menu
2018-08-22 17:15:37 +03:00
Mike Tzou
5f175e113a Merge pull request #9365 from Chocobo1/qchar
Fix WebUI unreachable issue
2018-08-21 11:52:39 +08:00
sledgehammer999
c83d89385a Merge pull request #9357 from Chocobo1/svg
Fix icon height/width ratio
2018-08-20 18:47:55 +03:00
Chocobo1
903a747dba Add config file for SVGO 2018-08-20 17:58:19 +08:00
Chocobo1
e9a8ac0544 Fix icon height/width ratio
It was causing misalignment in TransferListFiltersWidget text label.
2018-08-20 17:43:47 +08:00
Thomas Piccirello
a0e6007fc1 Include category save path in web api sync data 2018-08-18 22:04:21 -04:00
Thomas Piccirello
d89ef22d85 Require torrent category creation to be explicit 2018-08-18 22:04:21 -04:00
Chocobo1
262c3a75bd Fix WebUI unreachable issue
QVariant doesn't have constructor for plain char, by default it converts
a plain char into an integer, hence the WebUI issue.
Closes #9333.
2018-08-19 03:33:08 +08:00
Mike Tzou
ee57b68901 Merge pull request #9346 from Chocobo1/lastact
Fix values sorted wrong in "Last Activity" column
2018-08-17 11:07:09 +08:00
Chocobo1
d7aa0819d9 Fix values sorted wrong in "Last Activity" column
I suspect there could be other negative values.
Closes #9012.

Also apply the changes to TR_RATIO_LIMIT, avoiding similar problems.
2018-08-16 11:30:26 +08:00
sledgehammer999
2d94c4cb6e Merge pull request #9336 from sledgehammer999/fix_mingw_warnings
Fix mingw warning about unrecognized escape sequence
2018-08-15 16:01:52 +03:00
Mike Tzou
0c4a7ed9c8 Merge pull request #9284 from Chocobo1/svg
Migrate to SVG icons
2018-08-15 15:06:31 +08:00
sledgehammer999
14e5fc8e33 Fix mingw warning about unrecognized escape sequence
Warning introduced by commit 6203f23f06
2018-08-14 22:45:21 +03:00
thalieht
7ed0d13de2 Allow setting seq & first/last from context menu without metadata 2018-08-14 13:58:22 +03:00
thalieht
400eafce2b Rename 2 methods to eliminate ambiguity 2018-08-14 13:40:00 +03:00
thalieht
4dcb0b922e Add regex option in the search filter's context menu
In the search job widget.
2018-08-14 13:38:34 +03:00
Chocobo1
71dcc76a64 Replace png icons with svg 2018-08-14 17:03:14 +08:00
Chocobo1
866408151c Remove GuiIconProvider::generateDifferentSizes()
Let Qt do the scaling seems to be fine.
2018-08-14 16:48:58 +08:00
Mike Tzou
078325a3eb Merge pull request #9318 from eli-schwartz/fix-desktop-file
Fix regression that broke installing desktop file
2018-08-14 00:08:44 +08:00
Eli Schwartz
acdf9061fe Fix regression that broke installing desktop file
In commit 5d94db9c79 the desktop file was
moved from src/ to dist/ but the relative path from src/src.pro was
switched to an absolute path from the repository root. This broke
detection of the file from within qmake.

Fix by using the same $DIST_PATH used elsewhere for consistency, which
uses ../dist/.
2018-08-12 23:14:44 -04:00
sledgehammer999
ac1839fa6b Bump Web API version 2018-08-12 21:08:42 +03:00
sledgehammer999
239f98e450 Sync translations from Transifex and run lupdate 2018-08-12 21:07:08 +03:00
Mike Tzou
cced81ddf0 Merge pull request #9315 from Chocobo1/lupdate
Fix lupdate errors
2018-08-13 01:52:40 +08:00
Chocobo1
6f2b1823ad Fix lupdate errors
I suspect lupdate isn't smart enough to figure out what tr() is suppose
to do, so just make it a static function in class.
The error was: tr() cannot be called without context
2018-08-13 01:24:34 +08:00
Chocobo1
d9461f348f Generate i18n .ts files in the correct directory
Fixup 5b7c089dd2.
Closes #9313.
2018-08-13 00:11:28 +08:00
sledgehammer999
6c9a4df515 Merge pull request #8538 from thalieht/searchFilter
Add a name filter for search results
2018-08-12 16:44:53 +03:00
sledgehammer999
366239ca7b Merge pull request #9244 from Couchy/inhibit_sleep_options
Inhibit sleep for running downloads or uploads regardless of network activity
2018-08-12 16:31:01 +03:00
sledgehammer999
a3172590d0 Merge pull request #9255 from thalieht/filterRegex
Add option to use regexps in the transfer list's search filter's context menu
2018-08-12 16:22:00 +03:00
Mike Tzou
f44ff63361 Merge pull request #9278 from Couchy/torrent_file_error_handling
Improve error handling when loading torrent files
2018-08-12 00:21:56 +08:00
sledgehammer999
9dd1049f24 Merge pull request #9274 from sledgehammer999/tray_close_notification
Notify users on 1st time close/minimize to tray
2018-08-11 00:13:41 +03:00
Couchy
3808b5df16 Avoid allocating large memory when loading a .torrent file
`QIODevice::read(qint64 maxSize)` will allocate full `maxSize` of memory no matter
what the real file size was, this caused users to experience out-of-memory
exception on 32-bit qbt.
Also handle the OOM execption if it still fails.

Closes #9064, #9075, #9130, #9239, #9246, #9279.
2018-08-11 00:48:35 +08:00
Mike Tzou
5f61ffa184 Merge pull request #9303 from Chocobo1/fix
Fix I/O error after fetching magnet metadata
2018-08-11 00:14:06 +08:00
thalieht
2485525896 Add option for regexps in the transferlist search filter's context menu 2018-08-10 12:44:10 +03:00
Chocobo1
63991cb58e Fix I/O error after fetching magnet metadata
It is caused by an extra path seperator, so removing it fixes it.
Fixup 9612a75faa.
2018-08-10 12:48:04 +08:00
sledgehammer999
05d76e7282 Update AppVeyor config 2018-08-10 01:16:42 +03:00
sledgehammer999
fd30bf7423 Notify users on 1st time close/minimize to tray 2018-08-09 16:48:34 +03:00
sledgehammer999
2befd2927a Revert "Set "close to tray" to false as default"
This reverts commit dc9ec0e408.
2018-08-09 16:37:23 +03:00
Vladimir Golovnev
260b03de92 Merge pull request #9265 from glassez/dont-save-paused
Never save resume data for already paused torrents
2018-08-08 08:45:15 +03:00
Mike Tzou
879ba230af Merge pull request #9280 from Chocobo1/upgrade
Make ProgramUpdater upgrade to 64-bit qbt when running on 64-bit Windows
2018-08-08 01:12:25 +08:00
Chocobo1
8e1f3ac016 Make ProgramUpdater upgrade to 64-bit qbt when running on 64-bit Windows 2018-08-06 17:36:32 +08:00
Mike Tzou
89081d5365 Merge pull request #9268 from Chocobo1/clean
Put temporary files in qbt own temp folder and cleanups
2018-08-04 01:18:56 +08:00
Lukas Greib
48cd993c92 Inhibit sleep regardless of activity
"Active torrents" is a somewhat unintuitive concept as a basis for
preventing sleep, as torrents can become active or inactive on the
network at any time. This brings some predictability to the inhibit
sleep option, and will inhibit sleep as long as there are unpaused
downloads or uploads, regardless of network activity.

Closes #1696, #4592, #4655, #7019, #7159, #7452
2018-08-03 09:58:15 -04:00
Vladimir Golovnev
d106d908ef Merge pull request #9273 from thalieht/closetotray
Set "close to tray" to false as default
2018-08-03 11:16:50 +03:00
thalieht
dc9ec0e408 Set "close to tray" to false as default 2018-08-02 17:11:41 +03:00
Chocobo1
1c7abfdf46 Avoid regenerating .qm files unnecessarily
Translations included at top level is to avoid regenerating the .qm files every
time when src.pro is processed.
Partially revert 5b7c089dd2.
2018-08-02 17:44:06 +08:00
Chocobo1
9612a75faa Put temporary files in qbt own temp folder 2018-08-02 17:44:06 +08:00
Chocobo1
e1727c9a6a Refactor GuiIconProvider::generateDifferentSizes() 2018-08-02 17:44:06 +08:00
Vladimir Golovnev (Glassez)
2a6e38aa28 Never save resume data for already paused torrents 2018-08-01 21:29:32 +03:00
Vladimir Golovnev (Glassez)
7716a27d0d Reorder resume data saving conditionals
Having conditionals which can break saving of torrent resume data
in order from more likely to less likely is more effective.
2018-08-01 21:29:01 +03:00
Chocobo1
9df67b52b8 Add const to function signature 2018-08-01 01:40:50 +08:00
Mike Tzou
fea7a96e68 Merge pull request #9257 from Chocobo1/prio
Avoid potentially setting the wrong piece priorities
2018-08-01 00:07:22 +08:00
Mike Tzou
8dae7f4a87 Merge pull request #9229 from Piccirello/forceReannounce
Add WebUI Force Reannounce option
2018-07-31 00:19:34 +08:00
Chocobo1
73b5efbb23 Avoid potentially setting the wrong piece priorities
Updating file priorities is an async operation in libtorrent, when we
just updated it and immediately query it, we might get the
old/wrong values, so we rely on `updatedFilePrio` in this case.
2018-07-30 13:22:05 +08:00
Chocobo1
a68cdc5225 Refactor code
Make the code slightly easier to read.
2018-07-30 02:43:23 +08:00
thalieht
c55daeec38 Set "enter" as shortcut to download the selected torrents in search job 2018-07-29 21:42:21 +03:00
Chocobo1
9bd8587c68 Add const to function parameters 2018-07-30 02:23:51 +08:00
Mike Tzou
e59841d35c Merge pull request #9218 from Chocobo1/new
Code cleanup
2018-07-24 00:11:47 +08:00
Chocobo1
650f585bf3 Remove static keyword overuse 2018-07-23 13:40:25 +08:00
Chocobo1
a70219eea0 Move member variable initialization
Move the initialization from constructor body to member initializer
list.
Remove superfluous initializer.
2018-07-23 13:40:25 +08:00
Chocobo1
517fc39950 Remove unnecessary dynamic allocation
Also remove unneeded `if ()` conditional.
2018-07-23 13:40:25 +08:00
Chocobo1
56766dc08b Avoid binding constant reference to returned object
In such cases, it makes no sense doing so.
2018-07-23 13:40:25 +08:00
Mike Tzou
5d4da09093 Merge pull request #9217 from Chocobo1/char
Replace single-character string with character literal
2018-07-23 12:23:37 +08:00
Thomas Piccirello
13075e5099 Send all rechecks in one request 2018-07-22 20:33:39 -04:00
Thomas Piccirello
cdad0dc7d3 Add WebUI Force Reannounce option 2018-07-22 20:33:17 -04:00
Chocobo1
0217d5b4c0 Replace single-character string with character literal
Also remove unnecessary dynamic allocation.
2018-07-21 23:26:15 +08:00
sledgehammer999
17405dfc10 Merge pull request #9202 from sledgehammer999/toc_coding
Add a TOC in the coding guidelines
2018-07-21 11:09:34 +03:00
sledgehammer999
eb20b53af4 Remove trailing dot from headings 2018-07-20 23:01:57 +03:00
sledgehammer999
90dfdcc36d Add a TOC in the coding guidelines 2018-07-20 23:01:56 +03:00
Mike Tzou
7e3cf99bb9 Merge pull request #9210 from Chocobo1/options
Add options in AddNewTorrentDialog
2018-07-21 01:22:10 +08:00
Chocobo1
cb687ba3bd Add options in AddNewTorrentDialog
The new checkboxes are: "Download in sequential order", "Download first
and last pieces first".
2018-07-21 00:36:08 +08:00
Mike Tzou
aed971883d Merge pull request #9192 from Chocobo1/msg
Revise dialog messages
2018-07-18 00:08:00 +08:00
Chocobo1
1b406c97da Revise dialog messages
Using critical dialog is a bit too strong as qbt didn't actually run
into something that fails, so downgrade to warning dialog.
2018-07-17 00:06:16 +08:00
Mike Tzou
59d70c8a96 Merge pull request #9193 from Chocobo1/fix
Simplify code
2018-07-17 00:01:31 +08:00
Mike Tzou
837308deb6 Merge pull request #9185 from Chocobo1/cache
Cache more preference values in WebApplication
2018-07-16 23:53:58 +08:00
sledgehammer999
a87d1d43fc Merge pull request #9199 from zeule/cmake
Use proper include files in the QtSingleApplication find module.
2018-07-16 14:28:00 +03:00
Eugene Shalygin
af7b40ecc2 Use proper include files in the QtSingleApplication find module.
Look for qtsinglecoreapplication.h when Qt5Widgets module was not found,
and qtsingleapplication.h otherwise. Fixes #9196.

This also removes Qt4 support from the QtSingleApplication find module.
2018-07-16 11:22:42 +02:00
Chocobo1
42eac2ee3c Simplify code
This avoids "deferencing null pointer" warning from static analyzers.
2018-07-15 13:30:11 +08:00
Chocobo1
ec7dfee887 Fix typo 2018-07-15 10:19:24 +08:00
Vladimir Golovnev
c7f1f1494e Merge pull request #9187 from glassez/tracker-favicon
Download favicon using appropriate protocol
2018-07-14 12:01:58 +03:00
Vladimir Golovnev
11cd828e8a Merge pull request #9186 from glassez/fix-dm
Apply proxy settings on DownloadManager creation
2018-07-14 12:01:28 +03:00
Vladimir Golovnev
5d931ef9ab Merge pull request #9180 from glassez/resume-data
Save resume data on torrent change events. Closes #9174
2018-07-14 11:59:48 +03:00
Chocobo1
e04aae686f Cache more preference values
These values from Preference class are frequently used.
Also group related variables together.
2018-07-14 15:48:18 +08:00
thalieht
ae03ecea21 Add hotkey for toggling focus between the search LineEdits 2018-07-14 09:26:24 +03:00
thalieht
2e9c61c452 Limit the scope of find torrents hotkey in MainWindow
To TransferListWidget because it will interfere with the SearchWidget's focus hotkey
2018-07-14 09:26:24 +03:00
thalieht
df9aa6dc36 Add a name filter for search results
Closes #8226
2018-07-14 09:26:24 +03:00
Vladimir Golovnev (Glassez)
f7c252886f Apply proxy settings on DownloadManager creation 2018-07-13 13:18:57 +03:00
Vladimir Golovnev (Glassez)
088273a767 Download favicon using appropriate protocol
Some trackers use UDP protocol but we can't download its favicon
using UDP. Just try to download it using HTTP.
2018-07-13 13:13:53 +03:00
Vladimir Golovnev (Glassez)
cd44ab2fc6 Improve torrent initialization
Don't post "torrent resumed" event when torrent starts in "resumed"
state.
Fix confusing names. Now "resumed torrent" means "unpaused torrent"
only. When we load previously added torrent it is called "restored
torrent".
2018-07-12 21:03:36 +03:00
Thomas Piccirello
b2ffd6e03b Instantiate SearchPluginManager with other application components 2018-07-11 20:11:33 -04:00
Vladimir Golovnev (Glassez)
7ebd63a60f Save resume data on torrent change events
Closes #9174.
2018-07-10 17:45:09 +03:00
sledgehammer999
de8050701d Revert email address changes in copyright notices 2018-07-10 00:37:44 +03:00
Mike Tzou
c81756111c Merge pull request #9109 from tjjh89017/master
Add aio_threads option to AdvanceSetting Page
2018-07-10 01:01:50 +08:00
tjjh89017
670a8e27af Add async io threads option to AdvancedSettings 2018-07-08 22:58:35 +08:00
Mike Tzou
553bd8e22c Merge pull request #9161 from Chocobo1/save
Revise resume data save interval
2018-07-08 02:33:51 +08:00
Chocobo1
d61435e4bf Allow save resume interval to be disabled
Also raise the allowable upper limit
2018-07-05 13:22:20 +08:00
Chocobo1
6a16fc1ca2 Prolong resume data save interval 2018-07-05 13:22:13 +08:00
Chocobo1
a0348c46fc Remove unnecessary resources inclusion 2018-07-05 02:34:04 +08:00
Vladimir Golovnev
9d58a189d7 Merge pull request #9103 from thalieht/snaketocamel
Convert the names used in ui and c++ files from snake_case to camelCase
2018-07-04 21:16:02 +03:00
thalieht
456270bbb1 Delete several unused #include 2018-07-03 08:38:32 +03:00
thalieht
eb508d67ef Fix coding style 2018-07-03 08:38:32 +03:00
thalieht
6d4434ad66 Convert the names used in ui and c++ files from snake_case to camelCase 2018-07-03 08:38:32 +03:00
Mike Tzou
ca68b86550 Merge pull request #9141 from Chocobo1/delay
Omit removing python cache artifacts on qbt start
2018-07-03 13:07:31 +08:00
Mike Tzou
97b3761dbf Merge pull request #9094 from Chocobo1/recursive
Fix crash in Recursive Download dialog
2018-07-02 21:25:47 +08:00
Vladimir Golovnev
b0afa33e22 Merge pull request #9125 from glassez/downloader
Implement "Sequential downloading" feature. Closes #6835
2018-07-02 15:24:58 +03:00
Chocobo1
2528c6e39a Fix python version detection
Closes #9146.
2018-07-02 00:57:08 +08:00
Chocobo1
8c32302377 Clear python cache conditionally
Clear the cache artifacts on plugin install and plugin uninstall events.
2018-07-01 20:57:39 +08:00
Vladimir Golovnev (Glassez)
d78414307e Make TorrentInfo loading behavior uniform 2018-06-29 15:48:36 +03:00
Vladimir Golovnev (Glassez)
112a9bcfa2 Use new DownloadManager interface 2018-06-29 15:48:17 +03:00
Vladimir Golovnev (Glassez)
8d438e159c Implement "Sequential downloading" feature
Closes #6835.
2018-06-29 15:48:02 +03:00
Vladimir Golovnev (Glassez)
a9a6b74416 Implement DownloadRequest helper 2018-06-29 12:18:56 +03:00
Chocobo1
77b71e392e Refactor function
In SearchPluginManager::updateNova(), omit removing __pycache__ folder and pyc
files, those files will be recreated anyway.
Add const to variables
2018-06-28 17:21:13 +08:00
Chocobo1
f951bf678d Rename function 2018-06-28 16:13:52 +08:00
Chocobo1
5c50c5b24d Cache SearchPluginManager::engineLocation() result
Also the folder is only created on first usage.
2018-06-28 16:06:16 +08:00
Chocobo1
361afb401b Replace less-efficient QProcess::setEnvironment
Also small refactor
2018-06-28 15:56:39 +08:00
Chocobo1
ad5c88be3d Simplify function 2018-06-28 15:50:50 +08:00
Chocobo1
6bf3f1d0b8 Add checkbox for recursive download dialog
Also group similar options together.
2018-06-26 23:26:45 +08:00
Chocobo1
78d7cc0570 Work around crash when procesing recursive download
The messagebox is modal and exec() it makes it generates a new local
event loop, however the new local event loop will continue to process
libtorrent events (in Session::readAlerts()), at the time exec()
returns, the original libt::alert pointers are lost and resume
processing alerts will cause the crash.
One solution is to make the messagebox use show() and avoid exec().

Closes #9086.
2018-06-26 23:26:23 +08:00
Mike Tzou
1a7021156e Merge pull request #9113 from Chocobo1/python
Reduce queries to python version
2018-06-26 20:28:09 +08:00
Chocobo1
3e6c8a05dd Reduce queries to python version
Instead of doing at least 2 queries for python infos, now requires only
1 query (in ideal condition), and the result is cached.
2018-06-24 19:41:44 +08:00
Chocobo1
51e82762c5 Move related functions to Utils::Python 2018-06-24 06:21:15 +08:00
Mike Tzou
383a354700 Merge pull request #9069 from AltruisticCompany/mkpath
Create non-existing path in setLocationAction()
2018-06-21 15:45:33 +08:00
Goshik
1daadfc4ec Create non-existing path in setLocationAction()
When using qbittorrent-nox it is not always possible to manually create
the target path for torrent moving. This commit allows automatic path
creation. It also allows to display error messages in the
'Set location' window.
2018-06-19 14:10:11 +03:00
Mike Tzou
8da5ccee03 Merge pull request #9102 from Chocobo1/cfg
Turn on Control Flow Guard for MSVC builds
2018-06-19 18:33:48 +08:00
Mike Tzou
8f6e066332 Merge pull request #9092 from hannsen/patch-1
PEP 8 compliant version comments in search plugins
2018-06-18 00:56:28 +08:00
Mike Tzou
40f4223d02 Merge pull request #9083 from Chocobo1/qrc
Move files to where it belongs
2018-06-18 00:51:19 +08:00
Chocobo1
33bb3719d7 Move optimization flags
Those flags aren't strictly required when compiling but they are
recommended to be on.
2018-06-18 00:46:50 +08:00
Chocobo1
171bc77059 Turn on Control Flow Guard for MSVC builds
The performance impact should be negligible according to the
documentation on msdn.
Closes #9101.
2018-06-18 00:46:31 +08:00
Vladimir Golovnev
7d9cc04c88 Merge pull request #9090 from thalieht/renamefiles
Rename files and classes to match them
2018-06-16 13:08:38 +03:00
Mike Tzou
dc20fff6e4 Merge pull request #9059 from Piccirello/meta-key
Add WebUI support for Mac ⌘ (Command) key
2018-06-16 12:21:20 +08:00
thalieht
d34ddb2e3c Change file names and classes names to match them 2018-06-15 20:12:59 +03:00
hannsen
a162550d7f Properly normalize version string before parsing it
This allows python scripts to be formatted in PEP 8 style.
2018-06-14 13:00:31 +08:00
Vladimir Golovnev
0433d5f074 Merge pull request #9042 from thalieht/codingstyle
Fix coding style final
2018-06-13 12:41:56 +03:00
Mike Tzou
fd2fc65ba9 Merge pull request #9018 from Chocobo1/boostDef
Revise usage of BOOST_NO_CXX11_RVALUE_REFERENCES
2018-06-13 14:20:01 +08:00
Chocobo1
8be949fec3 Revise usage of BOOST_NO_CXX11_RVALUE_REFERENCES
Now the flag will be present when building with boost version <= 1.59.
Closes #8990.
2018-06-13 13:51:58 +08:00
Thomas Piccirello
232f0f4b0b Add WebUI support for Mac ⌘ (Command) key
The Command key will now be recognized for WebUI Table multi-selection, as Ctrl is.
2018-06-12 20:32:24 -04:00
Thomas Piccirello
091ad6103e Implement key functions in Class and refactor 2018-06-12 20:32:07 -04:00
Mike Tzou
c66738dc05 Merge pull request #9066 from AltruisticCompany/setlocation
Show current save path in 'Set location' window
2018-06-13 02:46:56 +08:00
Mike Tzou
4100282673 Merge pull request #9073 from Chocobo1/apple
Replace deprecated function on macOS
2018-06-12 12:19:54 +08:00
thalieht
4022799881 Fix coding style 2018-06-12 07:17:05 +03:00
Chocobo1
5b7c089dd2 Move qm_gen.pri 2018-06-11 21:02:45 +08:00
Chocobo1
5d94db9c79 Move .desktop file 2018-06-11 20:01:33 +08:00
Chocobo1
6203f23f06 Move .ico files into icons dir 2018-06-11 20:01:33 +08:00
Chocobo1
26a4703398 Move .qrc files into its own directory 2018-06-11 20:01:33 +08:00
Mike Tzou
c8c7ed4a2e Merge pull request #9053 from Chocobo1/optionWheel
Disable certain mouse wheel events in Options dialog
2018-06-10 13:06:04 +08:00
Chocobo1
0073f2c8ab Replace deprecated function on macOS
Closes #8993.
2018-06-09 13:49:20 +08:00
Mike Tzou
da87c2d9ae Merge pull request #9060 from Chocobo1/preinc
Replace post-increment with pre-increment
2018-06-09 12:40:30 +08:00
Goshik
682ef9e2a8 Show current save path in 'Set location' window
The feature is useful when the user needs to move their torrent to a
sub or parent folder. If more than one torrent is chosen, the path
of the first selected torrent is used. The window was made wider to
allow more convenient editing of long paths.
2018-06-08 18:34:14 +03:00
Chocobo1
5ddbf9bba9 Replace post-increment with pre-increment
And post-decrement with pre-decrement.
2018-06-08 08:44:06 +08:00
Eugene Shalygin
04aea413ba Merge pull request #9055 from zeule/cmake
Update CMake build scripts
2018-06-07 21:31:09 +02:00
Eugene Shalygin
0e655b4f9a Fix option name in winconf-xxx.cmake
The mistake was made by commit 7712d0ada0
2018-06-06 14:58:17 +02:00
Chocobo1
96819f3798 Disable certain mouse wheel events in Options dialog
The mouse wheel events for QComboBox & QSpinBox widgets in Options
dialog are filtered out.
2018-06-06 15:17:49 +08:00
Eugene Shalygin
fa770871e9 Refactor CMake build scripts
1. Use FeatureSummary module to show configuration results.

2. Invert option()/find_package() relationship: instead of
calling find_package(... REQUIRED) when option is set, rely on optional
find package call and PackageName_FOUND variable.

3. Refactor handling options that result in simple preprocessor defines
(actually copy the snippet from libtorrent) so that everything is done
in a single function call.

4. Populate target properties in order to get rid of
include_directories() calls.
2018-06-05 11:39:11 +02:00
Chocobo1
0b050e2a30 Remove duplicate private sections in class
And group related methods & variables together.
2018-06-05 12:22:32 +08:00
Mike Tzou
40330c4606 Merge pull request #9027 from Chocobo1/cache
Send Cache-Control header in WebUI responses
2018-06-05 01:04:42 +08:00
Mike Tzou
731865427e Merge pull request #9008 from Chocobo1/changelog
Add changelog URL link in updater
2018-06-04 20:51:18 +08:00
Chocobo1
eaa276b284 Fix WebUI cache behavior for css files
The style.css in public & private folders share the same URI, this
confuses the browser cache, so rename one of them.
2018-06-04 20:50:09 +08:00
Chocobo1
050b78f378 Send Cache-Control header in WebUI responses
Tune the caching time to be shorter, in case there is a program
update.
Change the cacheability to private, as WebUI resources are not intended
to be cached at proxy.
For uncacheable responses, send out "no-store" explicitly to halt
browser caching.
2018-06-04 20:50:08 +08:00
Mike Tzou
5f8feec1c1 Merge pull request #9013 from Piccirello/strengthen-csp
More restrictive Content Security Policy
2018-06-03 21:43:39 +08:00
Vladimir Golovnev
e61c882fee Merge pull request #9015 from thalieht/style
Fix coding style
2018-06-03 14:48:04 +03:00
Mike Tzou
c4e4e7432d Merge pull request #9009 from Chocobo1/login
Add logging messages in WebUI login action
2018-06-03 19:47:05 +08:00
Mike Tzou
658702dcbb Merge pull request #8992 from Chocobo1/regex
Replace QRegExp with QRegularExpression
2018-06-01 01:05:14 +08:00
thalieht
356d6a6589 Fix coding style 2018-05-31 19:45:09 +03:00
Chocobo1
09f759355f Replace QRegExp with QRegularExpression
Revise `static` keyword usage, static is added to frequently used
instances.
2018-05-31 22:56:49 +08:00
Chocobo1
c22e6b4502 Cleanup header include order
Add missing header.
Cleanup license.
2018-05-31 22:56:25 +08:00
Chocobo1
5c72a52ea2 Reset WebUI ban counter on login success 2018-05-31 22:55:54 +08:00
Chocobo1
d782d62b34 Add logging messages in WebUI login action 2018-05-31 22:55:54 +08:00
Thomas Piccirello
9b874b8941 Rename variables for clarity 2018-05-31 00:54:57 -04:00
Thomas Piccirello
43656aaa1e Add form-action to CSP
This option restricts all form submissions to the WebUI's origin.
qBittorrent only ever submits forms to the origin, so this is intended as a security measure.
2018-05-31 00:54:57 -04:00
Thomas Piccirello
8f98f87d12 Add upgrade-insecure-requests to CSP when HTTPS is enabled
This option automatically upgrades all http connections to https.
It ensures http urls cannot be accessed when in https mode, and is intended as a security measure.
2018-05-31 00:54:57 -04:00
Mike Tzou
6e96bbb2e9 Merge pull request #9001 from Chocobo1/csp
Improve WebUI security measures
2018-05-31 00:34:21 +08:00
Mike Tzou
93d4f2d595 Merge pull request #8984 from Chocobo1/magnetDialog
Refactor DownloadFromURLDialog
2018-05-30 13:55:42 +08:00
Chocobo1
68c6ddf05d Add changelog link in program updater
Closes #8997.
2018-05-30 13:54:15 +08:00
Vladimir Golovnev
15153a4446 Merge pull request #8976 from glassez/feed-uid
Don't use RSS feed URLs as base for file names. Closes #8399
2018-05-29 14:30:23 +03:00
Chocobo1
e8d378e167 Improve WebUI security measures
CSP was erroneously disabled in bad4d94f77
when clickjacking protection is off, now it is back.
Also added CSP 'frame-ancestors' directive when clickjacking
protection is enabled.
2018-05-29 13:40:52 +08:00
Chocobo1
ee202b721d Refactor function 2018-05-29 09:36:08 +08:00
Chocobo1
727800ef2c Improve DownloadFromURL behavior
URL should be considered case sensitive.
2018-05-29 09:36:08 +08:00
Chocobo1
34ed0cba08 Move DownloadFromURLDialog to its own file
Simplify code, no functionality changes.
Remove debug messages.
Capitalize dialog name.
Capitalize class name.
Update license text.
2018-05-29 09:36:03 +08:00
Chocobo1
817b7bb4f2 Add missing header include 2018-05-29 02:07:55 +08:00
Mike Tzou
1d25d95740 Merge pull request #8953 from Chocobo1/constexpr
Add constexpr to various classes
2018-05-29 00:21:52 +08:00
Mike Tzou
4a51f14328 Merge pull request #8967 from Chocobo1/protect
Add options to control WebUI security measures
2018-05-28 14:21:53 +08:00
sledgehammer999
2ef7adec89 Sync translations from Transifex and run lupdate 2018-05-27 21:01:16 +03:00
sledgehammer999
6ad8d730cc Bump Web API version 2018-05-27 19:23:25 +03:00
sledgehammer999
a1a6a7ef56 Merge pull request #8868 from Chocobo1/macos
Fix GUI scaling factor on macOS
2018-05-27 17:39:00 +03:00
Vladimir Golovnev (Glassez)
200f4d0f07 Don't use RSS feed URLs as base for file names
RSS feed URLs can be too long and exceed max path limit.
Add RSS feed UIDs and use UIDs as base for file names instead of URLs.
Closes #8399.
2018-05-26 10:37:32 +03:00
sledgehammer999
8a976d40be Merge pull request #8979 from sledgehammer999/comp_dbus
Fix compilation without D-Bus support
2018-05-25 18:23:45 +03:00
sledgehammer999
9f4e93df14 Merge pull request #8983 from Chocobo1/warning
Initialize variables properly
2018-05-25 18:21:33 +03:00
Chocobo1
4751b79f42 Initialize variables properly
The warnings are emitted when compiling on msys2, mingw

The warning was:
gui/torrentcontentmodel.cpp:135:33: warning: missing initializer for
member '_SHFILEINFOW::iIcon' [-Wmissing-field-initializers]

..\..\qBittorrent\src\app\stacktrace_win.h:141:30: warning: missing
initializer for member '_IMAGEHLP_LINE64::Key'
[-Wmissing-field-initializers]
2018-05-25 21:22:31 +08:00
sledgehammer999
80e93e23f9 Fix compilation without D-Bus support
Closes #8977
2018-05-24 17:40:23 +03:00
sledgehammer999
7c6a5afbff Merge pull request #8962 from sledgehammer999/suppress_errors
Suppress multiple I/O errors for the same torrent
2018-05-24 16:35:03 +03:00
sledgehammer999
51499c4bdd Merge pull request #8978 from airium/fix_pdb
Update conf.pri.windows from #8701
2018-05-24 16:34:14 +03:00
airium
868a65abd8 Update strace_win to stacktrace in conf.pri.windows
It is advised to update the stack trace statement since #8701, otherwise people may forget to change it, which results in that no pdb file is generated for Windows distribution package.
2018-05-24 00:55:39 +01:00
Vladimir Golovnev
935bb5bd1c Merge pull request #8966 from glassez/rss-date
Use RSS feed update time as a fallback. Closes #8959
2018-05-23 17:20:46 +03:00
Chocobo1
e099f6ad33 Add constexpr to IndexInterval class
Add const to IndexRange private members.
Remove redundant inline specifier.
Add missing parentheses.
2018-05-23 14:30:56 +08:00
Chocobo1
9631a9c2ad Add constexpr to TriStateBool class 2018-05-23 14:30:56 +08:00
Chocobo1
b38925413d Improve Utils::Version class
Add operator>=() and operator<=().
More methods are suitable to be constexpr.
Remove redundant boundary checking.
2018-05-23 13:47:41 +08:00
Mike Tzou
cd21071c69 Merge pull request #8954 from Chocobo1/firstlast
Relax behavior of "Download first and last piece first"
2018-05-23 13:26:02 +08:00
Mike Tzou
84df2794dc Merge pull request #8944 from Chocobo1/literal
Make use of QStringLiteral
2018-05-23 13:23:41 +08:00
sledgehammer999
1bcbe65819 Merge pull request #8908 from adem4ik/master
Update Windows icons
2018-05-22 22:42:41 +03:00
sledgehammer999
b9546ccd4c Suppress multiple I/O errors for the same torrent
When a file error happens libtorrent spews a ton of `file_error_alert`
which result in log floods and notification balloon floods. The later
might render the program inaccessible because the constant
notifications prevent the user from interacting with the tray icon.

Closes #8934
2018-05-22 21:29:50 +03:00
sledgehammer999
9df6ecafd0 Merge pull request #8961 from sledgehammer999/stats_dialog
Fix Stats dialog size
2018-05-22 20:24:50 +03:00
Chocobo1
9eeef0be97 Add option to control CSRF protection
Some users are using WebUI with simple port-forwarding from their router,
providing an option to control the protection will save them from setting up an
non-trival web proxy.
Closes #7274.
2018-05-22 12:57:03 +08:00
Vladimir Golovnev (Glassez)
4f8ed09183 Add missing 'return' statement 2018-05-21 21:24:02 +03:00
Chocobo1
bad4d94f77 Add option to control WebUI clickjacking protection
Some users actually want embedding WebUI into their custom build iframe.
Closes #7370.
2018-05-22 01:07:25 +08:00
Chocobo1
e8a69dd60c Update Options dialog layout in WebUI 2018-05-21 23:57:11 +08:00
Vladimir Golovnev (Glassez)
9b80c4f7eb Use RSS feed update time as a fallback
Some sites omit publication date in its RSS feed articles
that prevents "Ignore Subsequent Matches" to work properly.
Closes #8959.
2018-05-21 15:47:14 +03:00
Vladimir Golovnev
1b14706b08 Merge pull request #8955 from glassez/initial-rename
Rename torrent if content was initially renamed. Closes #8910
2018-05-21 08:04:43 +03:00
Vladimir Golovnev
0aee1cf7d0 Merge pull request #8945 from glassez/rss-rule
Improve code of  RSS auto-downloading rule. Closes #8933
2018-05-21 08:04:12 +03:00
Vladimir Golovnev
12e40ca865 Merge pull request #8948 from glassez/save-path
Add last used save path to the front of history. Fixes #8922
2018-05-21 08:03:29 +03:00
sledgehammer999
b4c1a949cc Fix Stats dialog size
Partially reverts e31ec20ec4.
Closes #8870.
2018-05-20 23:35:20 +03:00
Vladimir Golovnev (Glassez)
a54f57611c Rename torrent if content was initially renamed
Closes #8910.
2018-05-19 20:21:21 +03:00
Vladimir Golovnev (Glassez)
3be945a401 Add last used save path to the front of history 2018-05-19 19:43:01 +03:00
Chocobo1
95b19ec303 Relax behavior of "Download first and last piece first"
Now it applies the setting to all files in torrent, no matter whether
the file is previewable or not.

Torrent client shouldn't be smart by deciding which file this
option will be applied to, i.e. it should just follow the user's decision.
2018-05-19 21:48:13 +08:00
Chocobo1
da75a010c7 Refactor code
Add const to variables.
Add Logger message.
Simplify code logic.
2018-05-19 21:48:13 +08:00
Chocobo1
eb72b9ca7d Simplify the saving & loading of a setting
Remove excessive usage of constexpr.
2018-05-19 20:56:43 +08:00
Vladimir Golovnev
c29e5c76dc Merge pull request #8936 from surfernsk/master
Fix open destination folder with Nautilus > 3.28. Closes #8923
2018-05-19 15:06:03 +03:00
Vladimir Golovnev (Glassez)
53b9bcaaac Place "Use Smart Episode Filter" more correctly 2018-05-19 14:52:38 +03:00
Vladimir Golovnev (Glassez)
844f76c2ca Make "Ignoring days" to behave like other filters
This prevents confusing in GUI when it shows matched RSS
articles which be really ignored by the rule.
2018-05-19 14:52:24 +03:00
Evgeny Lensky
c7601d7a43 Fix open destination folder with Nautilus > 3.28
Closes #8923.
2018-05-19 18:45:26 +07:00
Mike Tzou
07c15127ba Merge pull request #8915 from Chocobo1/runext4
Improve "Run External Program" behavior
2018-05-19 14:58:45 +08:00
Vladimir Golovnev (Glassez)
256f6954c5 Improve code of RSS auto-downloading rule
Closes #8933.
2018-05-18 13:26:04 +03:00
Chocobo1
ceaf755ac6 Make use of QStringLiteral
Only changed instances that are initialized at program start.
2018-05-18 02:14:49 +08:00
Vladimir Golovnev
e157ca2430 Merge pull request #8932 from glassez/rss-settings
Properly set RSS settings via API. Closes #8925
2018-05-17 06:07:25 +03:00
Vladimir Golovnev
b857bb9652 Merge pull request #8939 from glassez/requestparser
Properly fill UploadedFile::filename field when parse HTTP request. Closes #8928
2018-05-17 06:06:56 +03:00
Chocobo1
fcbcf4039b Use smaller type 2018-05-17 10:57:12 +08:00
Vladimir Golovnev (Glassez)
90f09e7570 Properly fill UploadedFile::filename field
Closes #8928.
2018-05-16 20:13:55 +03:00
Mike Tzou
7bfe08d466 Merge pull request #8926 from Chocobo1/lint
Detect endianness at compile time
2018-05-16 20:07:03 +08:00
Vladimir Golovnev
e2da7928b1 Merge pull request #8922 from glassez/save-path
Add option to remember last used save path. Closes #7323
2018-05-15 19:30:09 +03:00
Vladimir Golovnev (Glassez)
98ca274169 Rename RSS properties to follow other names 2018-05-15 16:05:51 +03:00
Chocobo1
0a49f76c0a Detect endianness at compile time 2018-05-15 21:02:00 +08:00
Vladimir Golovnev (Glassez)
2a0b104e5e Properly set RSS settings via API
Closes #8925.
2018-05-15 15:59:28 +03:00
Vladimir Golovnev (Glassez)
71e5a40857 Add option to remember last used save path
Replace in "Add new torrent" dialog confusing "Set as default save path" option
with "Remember last used save path" option that affects only selected value in
"Save path" combo box.
Closes #7323.
2018-05-15 10:38:24 +03:00
Mike Tzou
3b1fa19ea8 Merge pull request #8895 from Chocobo1/locale
Apply locale changes immediately in WebUI
2018-05-15 00:29:45 +08:00
Mike Tzou
a0f200be0d Merge pull request #8894 from Chocobo1/tr
Make strings translatable
2018-05-14 12:53:40 +08:00
sledgehammer999
e3ce9b2645 Merge pull request #8903 from sledgehammer999/fix_upgrade_artifacts
Delete non-commited fastresume files
2018-05-13 17:24:47 +03:00
Vladimir Golovnev
7afbc346d5 Merge pull request #8906 from glassez/fix-webui
Fix WebUI bugs
2018-05-13 17:02:24 +03:00
sledgehammer999
35eee0b590 Don't migrate torrents that have newer fastresumes 2018-05-13 15:50:10 +03:00
sledgehammer999
7626ebe7a6 Delete non-commited fastresume files
Old v3.3.x format had a number at the end indicating the queue position.
The naming scheme was '<infohash>.fastresume.<queueposition>'.
However, QSaveFile, which uses QTemporaryFile internally, might leave
non-commited files behind eg after a crash. These files have the
naming scheme '<infohash>.fastresume.XXXXXX' where each X is a random
character. We try to detect the latter and remove it without "migrating"
the fastresume to the new saving system.
2018-05-13 15:50:10 +03:00
sledgehammer999
bde736c18a Merge pull request #8900 from sledgehammer999/fix_delete_logs
Fix deletion of old logs
2018-05-13 15:00:39 +03:00
Chocobo1
61e61a1fd5 Rename variables
Variable name should not start with underscore as C++ standard stated it
is reserved.
2018-05-13 19:24:59 +08:00
Vladimir Golovnev
8906c47798 Merge pull request #8782 from mj-p/filterByHashes
Filter torrent info endpoint by hashes
2018-05-13 13:20:00 +03:00
sledgehammer999
8a99e29122 Merge pull request #8716 from sledgehammer999/move_progress
Move and recheck progress
2018-05-13 13:02:03 +03:00
sledgehammer999
375b15727d Show rechecking progress
When having big torrents, the rechecking might take a while to
complete. Users need some sort of feedback that progress is being made.
Also, I changed the float to qreal since that's the return type.
2018-05-13 12:32:17 +03:00
sledgehammer999
7484889836 Fix deletion of old logs 2018-05-13 12:11:19 +03:00
Chocobo1
263524e856 Improve "Run External Program" behavior
This follows utorrent behavior: they don't append backslash character at
the end of path variables.
Closes #8836.
2018-05-13 15:21:27 +08:00
Chocobo1
5ae926a376 Refactor code
Add const to variables.
No functionality change.
2018-05-13 15:05:30 +08:00
Chocobo1
92a4e73a22 Apply locale changes immediately in WebUI 2018-05-13 15:05:29 +08:00
Mike Tzou
2230d96705 Merge pull request #8808 from Chocobo1/save
Improve SettingsStorage behavior
2018-05-13 14:24:14 +08:00
Mike Tzou
1000b1a6fc Merge pull request #8893 from Chocobo1/warning
Enable more compiler warnings on linux
2018-05-13 14:23:54 +08:00
sledgehammer999
e5c73cee4a Log successful torrent move 2018-05-12 20:49:33 +03:00
sledgehammer999
565ffa7d1e Add 'Moving' state for torrents being relocated/moved
This is another indication to the user that something is happening
behind the scenes.
Uses the same icon/color as "Checking" status.
Torrents in the `Moving` state are considered as "Active". This should
prevent accidental program exit from the user and inhibit system sleep.
2018-05-12 20:49:33 +03:00
adem
b3f98fc975 Update Windows icons 2018-05-12 11:34:53 +04:00
Vladimir Golovnev (Glassez)
88f2a66aac Fix params handling for some legacy API methods
Closes #8880.
2018-05-12 07:35:35 +03:00
Vladimir Golovnev (Glassez)
0fda49c060 Improve legacy API params handling 2018-05-12 07:35:31 +03:00
Vladimir Golovnev (Glassez)
afcf232bd8 Fix invalid API calls in WebUI
Closes #8899.
2018-05-12 07:35:27 +03:00
Vladimir Golovnev
29ec830e5c Merge pull request #8904 from glassez/fix-mingw
Fix compilation with MinGW
2018-05-12 07:34:22 +03:00
Vladimir Golovnev (Glassez)
32e2791f56 Fix compilation with MinGW 2018-05-12 06:24:05 +03:00
sledgehammer999
0d35527035 Merge pull request #8881 from thalieht/qt5signalslot
Use qt5 syntax for a few remaining SLOT()
2018-05-11 22:41:46 +03:00
Chocobo1
b1304057ec Fix i18n in WebUI
Closes #8844.
2018-05-11 20:20:51 +08:00
Chocobo1
c26ff40029 Make strings translatable
Closes #8866.
2018-05-11 19:29:02 +08:00
Chocobo1
4e42f97c8f Enable more compiler warnings on linux 2018-05-11 19:25:14 +08:00
thalieht
4cfa163bbd Use qt5 syntax for a few remaining SLOT() 2018-05-11 08:19:41 +03:00
Vladimir Golovnev
768262ae64 Merge pull request #8747 from thalieht/codingstyle
Fix coding style
2018-05-10 09:03:40 +03:00
thalieht
fb2bcb57bb Clarify guidelines and fix some typos 2018-05-09 17:06:22 +03:00
thalieht
20ca90800d Fix coding style 2018-05-09 17:06:22 +03:00
Vladimir Golovnev
6c6e23910d Merge pull request #8760 from thalieht/connectqt5
Use qt5 connect() syntax
2018-05-09 16:46:43 +03:00
thalieht
586e1a0830 Move some connect() from propertieswidget to their corresponding widget 2018-05-09 16:08:22 +03:00
thalieht
6b4455e13d Use qt5 connect() syntax 2018-05-09 16:08:22 +03:00
Chocobo1
4d04af4043 Replace raster qbt logo with vector version
Add helper function for svg icons.
2018-05-09 16:33:17 +08:00
Chocobo1
f934042a98 Fix GUI scaling factor on macOS
macOS seems have an unique way to handle widget size, that is, it doesn't require
application to resize widgets manually, Qt will handle the resize job
automatically.

Closes #8841.
2018-05-09 16:33:14 +08:00
Chocobo1
0b63f35a54 Use 32px icons for favicon
One less resource to manage and 16px size can be downsampled from 32px
on-the-fly anyway.
2018-05-09 15:53:34 +08:00
Mike Tzou
7af83ab704 Merge pull request #8807 from Chocobo1/tracker_msg
Fix displayed tracker message
2018-05-09 14:38:17 +08:00
Mike Tzou
0f8127a897 Merge pull request #8834 from Chocobo1/cmake
Improve cmake script
2018-05-09 14:36:06 +08:00
Mike Tzou
99a1343b9d Merge pull request #8862 from Chocobo1/cleanup
Code cleanups
2018-05-09 14:33:49 +08:00
Vladimir Golovnev
eab5dad32d Merge pull request #8860 from Kolcha/mac_warning
Add missing "override"
2018-05-08 17:14:21 +03:00
Vladimir Golovnev
3a0e5e51df Merge pull request #8761 from thalieht/nullptr
Replace the zeroing of pointers with nullptr
2018-05-08 17:10:37 +03:00
Nick Korotysh
0b8c620fd3 Add missing "override" 2018-05-08 08:33:07 +03:00
Chocobo1
c0df292567 Remove debug messages 2018-05-08 12:18:18 +08:00
Chocobo1
defba23d61 Refactor code
Remove forward declarations of Qt types.
Fix header include order.
2018-05-08 12:18:18 +08:00
Vladimir Golovnev
48bdd5fa86 Merge pull request #8855 from glassez/fix-prio-api
Fix wrong API method names. Closes #8828
2018-05-08 07:07:31 +03:00
Mike Tzou
7242d68c4b Merge pull request #8854 from Chocobo1/gcc8
Fix compile warnings on gcc 8
2018-05-08 11:57:49 +08:00
Vladimir Golovnev (Glassez)
85dd446198 Fix wrong API method names
Closes #8828.
2018-05-07 17:46:01 +03:00
Chocobo1
6d923f703a Fix displayed tracker messages
Before this change, we were displaying debug messages constructed by
libtorrent, now we show messages returned by trackers.

Closes #8739.
2018-05-07 21:49:31 +08:00
Chocobo1
90f42e6737 Refactor functions
Add const to variables
Remove debug messages
2018-05-07 21:49:31 +08:00
Chocobo1
58861c35b0 Fix compile warnings on gcc 8
The warning was:
warning: catching polymorphic type ‘class std::exception’ by value
[-Wcatch-value=]
2018-05-07 21:39:54 +08:00
Chocobo1
051ba4fa48 Comment out Werror flag in cmake script
Werror flag should be only enabled on developer's machine, not for
users using the product.
Also fix formatting.
2018-05-07 18:23:47 +08:00
Mike Tzou
7aa18dbb22 Merge pull request #8832 from Chocobo1/tr
Fix translations
2018-05-07 14:30:44 +08:00
Chocobo1
203bafc4c3 Revert commit
Apparently the translations were working in previous state, but affected by
lupdate issue:
https://github.com/qbittorrent/qBittorrent/issues/8220#issuecomment-385712673

The reverts commit fb698896c9.
Closes #8831.
2018-05-05 21:46:36 +08:00
Chocobo1
9f809114f0 Really fix translation in fspathedit
QT_TRANSLATE_NOOP3 is a macro, so we cannot use a runtime string for the context
argument.
Fix up 1d778676cd.
2018-05-05 21:09:47 +08:00
Chocobo1
d20f40184f Fix translation strings not found
The translation context doesn't exist, so the translations were not found, fixed
now.
Closes #8829.
2018-05-05 21:08:47 +08:00
Chocobo1
239352ad88 Print warning about cmake support status 2018-05-05 20:54:09 +08:00
Mike Tzou
d8c14ffe97 Merge pull request #8814 from Chocobo1/tr_fix
Fix tr() related issues
2018-05-05 13:48:09 +08:00
sledgehammer999
c5472edc6f Bump to v4.2.0alpha 2018-05-05 00:53:20 +03:00
Marcel Petersen
fc58e8a0c6 Filter torrent info endpoint by hashes
Added hashes parameter to info action.
Allows filtering seralized torrents by passing it into the TorrentFilter.
2018-05-02 10:07:48 +02:00
Chocobo1
e423314ac2 Work around false-positive warning from lupdate
In short, lupdate will get confused when seeing `template <class T>`,
see: QTBUG-55478
2018-05-01 23:28:34 +08:00
Chocobo1
9fabe59b80 Fix usage of Q_DECLARE_TR_FUNCTIONS()
The context parameter shouldn't be enclosed in double quotes.
2018-05-01 22:42:55 +08:00
Chocobo1
f6d74e3996 Retry saving settings when operation failed 2018-04-30 13:01:10 +08:00
Chocobo1
099314d17f Make settings file recovery more robust
We should not blindly remove the leftover settings file, as the following write()
operation could fail and the user would lost all settings.
We should try renaming it instead.
2018-04-30 13:01:10 +08:00
Chocobo1
708b5a6904 Refactor SettingsStorage class
Make use of (i.e. returning) QFile::rename operation status
Make log message more verbose
Add const
Remove empty lines
Inline typedef
2018-04-30 13:01:10 +08:00
thalieht
3e4099fe5b Replace the zeroing of pointers with nullptr 2018-04-15 13:06:31 +03:00
1002 changed files with 402816 additions and 215782 deletions

View File

@@ -45,13 +45,14 @@ before_build:
- CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
- SET PATH=%PATH%;c:\qbt\qt5_32\bin;%CACHE_DIR%\jom;
# setup project
- COPY /Y "%CACHE_DIR%\winconf.pri" "%REPO_DIR%"
- COPY /Y "%CACHE_DIR%\winconf-msvc.pri" "%REPO_DIR%"
- COPY /Y "%CACHE_DIR%\conf.pri" "%REPO_DIR%"
# workarounds
- MKLINK /J "c:\qbt\base" "%CACHE_DIR%\base"
build_script:
- cd "%REPO_DIR%"
# scan only as lupdate is prone to hang
- lupdate -extensions c,cpp,h,hpp,ui .
- qmake qbittorrent.pro && cd src && qmake src.pro
- jom -j2 -f Makefile.Release

View File

@@ -3,7 +3,7 @@
### qBittorrent version and Operating System
(type here)
### If on linux, libtorrent and Qt version
### If on linux, libtorrent-rasterbar and Qt version
(type here)
### What is the problem

9
.gitignore vendored
View File

@@ -4,6 +4,7 @@ src/qbittorrent
src/qbittorrent-nox
src/release
src/debug
CMakeLists.txt.user*
qbittorrent.pro.user*
conf.pri
Makefile*
@@ -22,6 +23,7 @@ qrc_*.cpp
ui_*.h
*.moc
src/lang/qbittorrent_*.qm
src/webui/www/translations/webui_*.qm
.DS_Store
.qmake.stash
src/qbittorrent.app
@@ -34,3 +36,10 @@ config.status
src/icons/qbt-theme/build-icons/node_modules/
src/icons/skin/build-icons/node_modules/
src/icons/skin/build-icons/icons/*.png
# CMake build directory
build/
# Web UI tools
node_modules
package-lock.json

File diff suppressed because it is too large Load Diff

View File

@@ -10,10 +10,18 @@ type = QT
minimum_perc = 23
mode = developer
[qbittorrent.qbittorrentdesktop_master]
source_file = src/icons/qBittorrent.desktop
source_file = dist/unix/org.qbittorrent.qBittorrent.desktop
source_lang = en
type = DESKTOP
minimum_perc = 23
mode = developer
[qbittorrent.qbittorrent_webui]
file_filter = src/webui/www/translations/webui_<lang>.ts
lang_map = pt: pt_PT
source_file = src/webui/www/translations/webui_en.ts
source_lang = en
type = QT
minimum_perc = 23
mode = developer

View File

@@ -1,5 +1,10 @@
cmake_minimum_required(VERSION 3.5)
cmake_policy(VERSION 3.5)
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
message(AUTHOR_WARNING "If the build fails, please try the autotools/qmake method.")
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
include(FunctionReadVersion)
@@ -25,32 +30,31 @@ add_definitions(-DQBT_VERSION_BUILD=${VER_BUILD})
add_definitions(-DQBT_VERSION="v${PROJECT_VERSION}")
add_definitions(-DQBT_VERSION_2="${PROJECT_VERSION}")
if (UNIX AND NOT APPLE)
include(GNUInstallDirs)
endif (UNIX AND NOT APPLE)
include(GNUInstallDirs)
include(FeatureSummary)
# version requirements
set(requiredBoostVersion 1.40)
set(requiredQtVersion 5.9.0)
set(requiredOpensslVersion 1.0)
set(requiredLibtorrentVersion 1.1.10)
if(WIN32)
include(winconf)
endif(WIN32)
# we need options here, because they are used not only in "src" subdir, but in the "dist" dir too
include(CMakeDependentOption)
option(SYSTEM_QTSINGLEAPPLICATION
"Use the system qtsingleapplication library or shipped one otherwise")
option(GUI "Allows to disable GUI for headless running. Disables QtDBus and the GeoIP Database" ON)
option(WEBUI "Allows to disable the WebUI." ON)
option(STACKTRACE "Enable stacktrace feature" ON)
if (UNIX)
cmake_dependent_option(SYSTEMD "Install the systemd service file (headless only)" OFF
"NOT GUI" OFF)
cmake_dependent_option(DBUS "Enable use of QtDBus (GUI only)" ON "GUI" OFF)
endif(UNIX)
# we need options here, at the top level, because they are used not only in "src" subdir, but in the "dist" dir too
include(CompileFeature)
optional_compile_definitions(COUNTRIES_RESOLUTION FEATURE DESCRIPTION "Enable resolving peers IP addresses to countries"
DEFAULT ON DISABLED DISABLE_COUNTRIES_RESOLUTION)
optional_compile_definitions(STACKTRACE FEATURE DESCRIPTION "Enable stacktraces"
DEFAULT ON ENABLED STACKTRACE)
optional_compile_definitions(WEBUI FEATURE DESCRIPTION "Enables built-in HTTP server for headless use"
DEFAULT ON DISABLED DISABLE_WEBUI)
add_subdirectory(src)
add_subdirectory(dist)
feature_summary(DESCRIPTION "\nConfiguration results:" WHAT ALL)

View File

@@ -6,6 +6,31 @@ For programming languages other than C++ (e.g. JavaScript) used in this reposito
**Note 2:** You can use the `uncrustify` program/tool to clean up any source file. Use it with the `uncrustify.cfg` configuration file found in the root folder.
**Note 3:** There is also a style for QtCreator but it doesn't cover all cases. In QtCreator `Tools->Options...->C++->Code Style->Import...` and choose the `codingStyleQtCreator.xml` file found in the root folder.
### Table Of Contents
* [1. New lines &amp; curly braces](#1-new-lines--curly-braces)
* [a. Function blocks, class/struct definitions, namespaces](#a-function-blocks-classstruct-definitions-namespaces)
* [b. Other code blocks](#b-other-code-blocks)
* [c. Blocks in switch's case labels](#c-blocks-in-switchs-case-labels)
* [d. If-else statements](#d-if-else-statements)
* [e. Single statement if blocks](#e-single-statement-if-blocks)
* [f. Acceptable conditions to omit braces](#f-acceptable-conditions-to-omit-braces)
* [g. Brace enclosed initializers](#g-brace-enclosed-initializers)
* [2. Indentation](#2-indentation)
* [3. File encoding and line endings](#3-file-encoding-and-line-endings)
* [4. Initialization lists](#4-initialization-lists)
* [5. Enums](#5-enums)
* [6. Names](#6-names)
* [a. Type names and namespaces](#a-type-names-and-namespaces)
* [b. Variable names](#b-variable-names)
* [c. Private member variable names](#c-private-member-variable-names)
* [7. Header inclusion order](#7-header-inclusion-order)
* [8. Include guard](#8-include-guard)
* [9. Misc](#9-misc)
* [10. Git commit message](#10-git-commit-message)
* [11. Not covered above](#11-not-covered-above)
---
### 1. New lines & curly braces ###
#### a. Function blocks, class/struct definitions, namespaces ####
@@ -165,11 +190,11 @@ QVariantMap map {{"key1", 5}, {"key2", 10}};
### 2. Indentation ###
4 spaces.
### 3. File encoding and line endings. ###
### 3. File encoding and line endings ###
UTF-8 and Unix-like line ending (LF). Unless some platform specific files need other encodings/line endings.
### 4. Initialization lists. ###
### 4. Initialization lists ###
Initialization lists should be vertical. This will allow for more easily readable diffs. The initialization colon should be indented and in its own line along with first argument. The rest of the arguments should be indented too and have the comma prepended.
```c++
myClass::myClass(int a, int b, int c, int d)
@@ -182,7 +207,7 @@ myClass::myClass(int a, int b, int c, int d)
}
```
### 5. Enums. ###
### 5. Enums ###
Enums should be vertical. This will allow for more easily readable diffs. The members should be indented.
```c++
enum Days
@@ -197,7 +222,7 @@ enum Days
};
```
### 6. Names. ###
### 6. Names ###
All names should be camelCased.
#### a. Type names and namespaces ####
@@ -231,7 +256,7 @@ class MyClass
}
```
### 7. Header inclusion order. ###
### 7. Header inclusion order ###
The headers should be placed in the following group order:
1. Module header (in .cpp)
2. C++ Standard Library headers
@@ -239,11 +264,11 @@ The headers should be placed in the following group order:
4. Boost library headers
5. Libtorrent headers
6. Qt headers
7. qBittorrent own headers, starting from *base* headers.
7. qBittorrent's own headers, starting from the *base* headers.
The headers should be ordered alphabetically within each group.
If there are conditionals for the same header group, then put them at the bottom of the respective group.
If there are conditionals for the different header groups, then put them above of the "qBittorrent own headers" group.
If there are conditionals that contain headers from several different header groups, then put them above the "qBittorrent's own headers" group.
One exception is the header containing the library version (for example, QtGlobal), this particular header isn't constrained by the aforementioned order.
@@ -281,23 +306,23 @@ Example:
#include <QString>
#include <QUrl>
#ifdef Q_OS_MAC // conditional
#ifdef Q_OS_MACOS // conditional
#include <QFont>
#endif
// conditional for the different header groups
// conditional that contains headers from several different header groups
#if LIBTORRENT_VERSION_NUM >= 10100
#include <memory>
#include <QElapsedTimer>
#endif
// qBittorrent own headers
// qBittorrent's own headers
#include "base/bittorrent/infohash.h"
#include "anothermodule.h"
#include "ui_examplewidget.h"
```
### 8. Include guard. ###
### 8. Include guard ###
`#pragma once` should be used instead of "include guard" in new code:
```c++
// examplewidget.h
@@ -313,7 +338,7 @@ class ExampleWidget : public QWidget
```
### 9. Misc. ###
### 9. Misc ###
* Line breaks for long lines with operation:

519
Changelog

File diff suppressed because it is too large Load Diff

65
INSTALL
View File

@@ -1,54 +1,43 @@
qBittorrent - A BitTorrent client in C++ / Qt4
qBittorrent - A BitTorrent client in C++ / Qt
------------------------------------------
1) Compile and install qBittorrent with Qt4 Graphical Interface
1) Install these dependencies:
- Boost >= 1.40
- libtorrent-rasterbar >= 1.1.10 (by Arvid Norberg)
* https://www.libtorrent.org/
* Be careful: another library (the one used by rTorrent) uses a similar name
- OpenSSL >= 1.0
- Qt >= 5.9.0
- zlib >= 1.2.5.2
- pkg-config (compile-time only)
- Python >= 3.3.0 (optional, runtime only)
* Required by the internal search engine
2a) Compile and install qBittorrent with Qt graphical interface
$ ./configure
$ make && make install
$ qbittorrent
will install and execute qBittorrent hopefully without any problems.
will install and execute qBittorrent.
Dependencies:
- Qt >= 4.6.0 (libqtgui, libqtcore, libqtnetwork, libqtxml, libqtdbus/optional)
- pkg-config executable
- libtorrent-rasterbar by Arvid Norberg (>= 1.0.6)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.
- libboost >= 1.35.x (libboost-system)
- python >= 2.3 (needed by search engine)
* Run time only dependency
- geoip-database (optional)
* If qBittorrent cannot find this database, it will try to resolve countries using the Internet but it will be a lot slower.
* Run time only dependency
2) Compile and install qBittorrent without Qt4 Graphical interface
2b) Compile and install qBittorrent without Qt graphical interface
$ ./configure --disable-gui
$ make && make install
$ qbittorrent
will install and execute qBittorrent hopefully without any problems.
Dependencies:
- Qt >= 4.4.0 (libqt-devel, libqtcore, libqtnetwork)
- pkg-config executable
- libtorrent-rasterbar by Arvid Norberg (>= v1.0.6)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.
- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization
$ qbittorrent-nox
will install and execute qBittorrent.
DOCUMENTATION:
Please note that there is a documentation with a "compiling howto" at http://wiki.qbittorrent.org.
Please note that there is a "Compilation" section at http://wiki.qbittorrent.org.
------------------------------------------
Christophe Dumez <chris@qbittorrent.org>
sledgehammer999 <sledgehammer999@qbittorrent.org>

View File

@@ -13,8 +13,7 @@ It aims to be a good alternative to all other bittorrent clients
out there. qBittorrent is fast, stable and provides unicode
support as well as many features.
This product includes GeoLite data created by MaxMind, available from
https://www.maxmind.com/
The free [IP to Country Lite database](https://db-ip.com/db/download/ip-to-country-lite) by [DB-IP](https://db-ip.com/) is used for resolving the countries of peers. The database is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).
### Installation:
For installation, follow the instructions from INSTALL file, but simple:

View File

@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -255,7 +255,8 @@ EOF
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
@@ -339,9 +340,9 @@ exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

966
build-aux/config.guess vendored

File diff suppressed because it is too large Load Diff

2770
build-aux/config.sub vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2013-12-25.23; # UTC
scriptversion=2018-03-11.20; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -271,15 +271,18 @@ do
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
# If destination is a directory, append the input filename.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0
else
dstdir=`dirname "$dst"`
@@ -288,6 +291,11 @@ do
fi
fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
@@ -324,34 +332,43 @@ do
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
# Note that $RANDOM variable is not portable (e.g. dash); Use it
# here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p' feature.
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac;;
@@ -427,8 +444,8 @@ do
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
dsttmp=${dstdirslash}_inst.$$_
rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
@@ -493,9 +510,9 @@ do
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

View File

@@ -1,9 +1,9 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
scriptversion=2013-10-28.13; # UTC
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -101,9 +101,9 @@ else
exit $st
fi
perl_URL=http://www.perl.org/
flex_URL=http://flex.sourceforge.net/
gnu_software_URL=http://www.gnu.org/software
perl_URL=https://www.perl.org/
flex_URL=https://github.com/westes/flex
gnu_software_URL=https://www.gnu.org/software
program_details ()
{
@@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

View File

@@ -0,0 +1,22 @@
# Helper function for coupling add_feature_info(), option(), and add_definitions()
function(optional_compile_definitions _name)
set(options FEATURE)
set(oneValueArgs DESCRIPTION DEFAULT)
set(multiValueArgs ENABLED DISABLED)
cmake_parse_arguments(OCD "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
option(${_name} "${OCD_DESCRIPTION}" ${OCD_DEFAULT})
if (${${_name}})
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY COMPILE_DEFINITIONS ${OCD_ENABLED})
else()
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY COMPILE_DEFINITIONS ${OCD_DISABLED})
endif()
if(${OCD_FEATURE})
add_feature_info(${_name} ${_name} "${OCD_DESCRIPTION}")
endif()
endfunction()
macro(feature_option _name _description _default)
option(${_name} "${_description}" ${_default})
add_feature_info(${_name} ${_name} "${_description}")
endmacro()

View File

@@ -38,8 +38,9 @@ else()
# libtorrent is very picky about those. Let's take a set of defaults and
# hope that they apply. If not, you the user are on your own.
set(LibtorrentRasterbar_DEFINITIONS
-DTORRENT_USE_LIBCRYPTO
# TODO: remove the following define as it is not used since OpenSSL >= 1.1
-DTORRENT_USE_OPENSSL
-DTORRENT_DISABLE_GEO_IP
-DBOOST_ASIO_ENABLE_CANCELIO
-DUNICODE -D_UNICODE -D_FILE_OFFSET_BITS=64)
endif()
@@ -47,7 +48,7 @@ else()
if(NOT LibtorrentRasterbar_USE_STATIC_LIBS)
list(APPEND LibtorrentRasterbar_DEFINITIONS
-DTORRENT_LINKING_SHARED
-DBOOST_SYSTEM_DYN_LINK -DBOOST_CHRONO_DYN_LINK)
-DBOOST_SYSTEM_DYN_LINK)
endif()
endif()
@@ -99,6 +100,7 @@ list(FIND LibtorrentRasterbar_DEFINITIONS -DTORRENT_USE_OPENSSL LibtorrentRaster
if(LibtorrentRasterbar_ENCRYPTION_INDEX GREATER -1)
find_package(OpenSSL REQUIRED)
set(LibtorrentRasterbar_LIBRARIES ${LibtorrentRasterbar_LIBRARIES} OpenSSL::SSL OpenSSL::Crypto)
list(APPEND LibtorrentRasterbar_INCLUDE_DIRS "${OPENSSL_INCLUDE_DIR}")
set(LibtorrentRasterbar_OPENSSL_ENABLED ON)
endif()
@@ -113,10 +115,10 @@ mark_as_advanced(LibtorrentRasterbar_INCLUDE_DIR LibtorrentRasterbar_LIBRARY
LibtorrentRasterbar_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES
LibtorrentRasterbar_ENCRYPTION_INDEX)
if (LibtorrentRasterbar_FOUND AND NOT TARGET LibtorrentRasterbar::LibTorrent)
add_library(LibtorrentRasterbar::LibTorrent UNKNOWN IMPORTED)
if (LibtorrentRasterbar_FOUND AND NOT TARGET LibtorrentRasterbar::torrent-rasterbar)
add_library(LibtorrentRasterbar::torrent-rasterbar UNKNOWN IMPORTED)
set_target_properties(LibtorrentRasterbar::LibTorrent PROPERTIES
set_target_properties(LibtorrentRasterbar::torrent-rasterbar PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${LibtorrentRasterbar_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LibtorrentRasterbar_INCLUDE_DIRS}"

View File

@@ -1,94 +0,0 @@
# - Try to find the QtSingleApplication includes and library
# which defines
#
# QTSINGLEAPPLICATION_FOUND - system has QtSingleApplication
# QTSINGLEAPPLICATION_INCLUDE_DIR - where to find header QtSingleApplication
# QTSINGLEAPPLICATION_LIBRARIES - the libraries to link against to use QtSingleApplication
# QTSINGLEAPPLICATION_LIBRARY - where to find the QtSingleApplication library (not for general use)
# copyright (c) 2013 TI_Eugene ti.eugene@gmail.com
#
# Redistribution and use is allowed according to the terms of the FreeBSD license.
SET(QTSINGLEAPPLICATION_FOUND FALSE)
IF(QT4_FOUND)
message(STATUS "Looking for Qt4 single application library")
FIND_PATH(QTSINGLEAPPLICATION_INCLUDE_DIR QtSingleApplication
# standard locations
/usr/include
/usr/include/QtSolutions
# qt4 location except mac's frameworks
"${QT_INCLUDE_DIR}/QtSolutions"
# mac's frameworks
${FRAMEWORK_INCLUDE_DIR}/QtSolutions
)
SET(QTSINGLEAPPLICATION_NAMES ${QTSINGLEAPPLICATION_NAMES}
QtSolutions_SingleApplication-2.6 libQtSolutions_SingleApplication-2.6)
FIND_LIBRARY(QTSINGLEAPPLICATION_LIBRARY
NAMES ${QTSINGLEAPPLICATION_NAMES}
PATHS ${QT_LIBRARY_DIR}
)
ELSEIF(Qt5Core_FOUND)
message(STATUS "Looking for Qt5 single application library")
FOREACH(TOP_INCLUDE_PATH in ${Qt5Core_INCLUDE_DIRS} ${FRAMEWORK_INCLUDE_DIR})
FIND_PATH(QTSINGLEAPPLICATION_INCLUDE_DIR QtSingleApplication ${TOP_INCLUDE_PATH}/QtSolutions)
IF(QTSINGLEAPPLICATION_INCLUDE_DIR)
BREAK()
ENDIF()
ENDFOREACH()
SET(QTSINGLEAPPLICATION_NAMES ${QTSINGLEAPPLICATION_NAMES}
Qt5Solutions_SingleApplication-2.6 libQt5Solutions_SingleApplication-2.6
QtSolutions_SingleApplication-2.6 libQtSolutions_SingleApplication-2.6)
GET_TARGET_PROPERTY(_QT5_CORELIBRARY Qt5::Core LOCATION)
GET_FILENAME_COMPONENT(_QT5_CORELIBRARYPATH ${_QT5_CORELIBRARY} PATH)
FIND_LIBRARY(QTSINGLEAPPLICATION_LIBRARY
NAMES ${QTSINGLEAPPLICATION_NAMES}
PATHS ${_QT5_CORELIBRARYPATH}
)
ENDIF()
IF (QTSINGLEAPPLICATION_LIBRARY AND QTSINGLEAPPLICATION_INCLUDE_DIR)
SET(QTSINGLEAPPLICATION_LIBRARIES ${QTSINGLEAPPLICATION_LIBRARY})
SET(QTSINGLEAPPLICATION_FOUND TRUE)
IF (CYGWIN)
IF(BUILD_SHARED_LIBS)
# No need to define QTSINGLEAPPLICATION_USE_DLL here, because it's default for Cygwin.
ELSE(BUILD_SHARED_LIBS)
SET (QTSINGLEAPPLICATION_DEFINITIONS -DQTSINGLEAPPLICATION_STATIC)
ENDIF(BUILD_SHARED_LIBS)
ENDIF (CYGWIN)
ENDIF (QTSINGLEAPPLICATION_LIBRARY AND QTSINGLEAPPLICATION_INCLUDE_DIR)
IF (QTSINGLEAPPLICATION_FOUND)
IF (NOT QtSingleApplication_FIND_QUIETLY)
MESSAGE(STATUS "Found QtSingleApplication: ${QTSINGLEAPPLICATION_LIBRARY}")
MESSAGE(STATUS " includes: ${QTSINGLEAPPLICATION_INCLUDE_DIR}")
ENDIF (NOT QtSingleApplication_FIND_QUIETLY)
ELSE (QTSINGLEAPPLICATION_FOUND)
IF (QtSingleApplication_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find QtSingleApplication library")
ENDIF (QtSingleApplication_FIND_REQUIRED)
ENDIF (QTSINGLEAPPLICATION_FOUND)
MARK_AS_ADVANCED(QTSINGLEAPPLICATION_INCLUDE_DIR QTSINGLEAPPLICATION_LIBRARY)
if(NOT TARGET QtSingleApplication::QtSingleApplication)
add_library(QtSingleApplication::QtSingleApplication UNKNOWN IMPORTED)
set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${QTSINGLEAPPLICATION_INCLUDE_DIR}"
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${QTSINGLEAPPLICATION_INCLUDE_DIR}"
)
if(EXISTS "${QTSINGLEAPPLICATION_LIBRARY}")
set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${QTSINGLEAPPLICATION_LIBRARY}")
endif()
endif(NOT TARGET QtSingleApplication::QtSingleApplication)

View File

@@ -1,38 +1,36 @@
macro(configure_msvc_runtime)
if(MSVC)
# Default to statically-linked runtime.
if("${MSVC_RUNTIME}" STREQUAL "")
set(MSVC_RUNTIME "static")
endif()
# Set compiler options.
set(variables
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO
# Default to statically-linked runtime.
if("${MSVC_RUNTIME}" STREQUAL "")
set(MSVC_RUNTIME "static")
endif()
# Set compiler options.
set(variables
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO
)
if(${MSVC_RUNTIME} STREQUAL "static")
message(STATUS
"MSVC -> forcing use of statically-linked runtime."
)
if(${MSVC_RUNTIME} STREQUAL "static")
message(STATUS
"MSVC -> forcing use of statically-linked runtime."
)
foreach(variable ${variables})
if(${variable} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}")
endif()
endforeach()
else()
message(STATUS
"MSVC -> forcing use of dynamically-linked runtime."
)
foreach(variable ${variables})
if(${variable} MATCHES "/MT")
string(REGEX REPLACE "/MT" "/MD" ${variable} "${${variable}}")
endif()
endforeach()
endif()
foreach(variable ${variables})
if(${variable} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}")
endif()
endforeach()
else()
message(STATUS
"MSVC -> forcing use of dynamically-linked runtime."
)
foreach(variable ${variables})
if(${variable} MATCHES "/MT")
string(REGEX REPLACE "/MT" "/MD" ${variable} "${${variable}}")
endif()
endforeach()
endif()
endmacro()

View File

@@ -1,49 +0,0 @@
###############################################################
#
# Copyright 2011 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You may
# obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
###############################################################
MACRO (GLIBC_DETECT _VERSION)
# there are multiple ways to detect glibc, but given nmi's
# cons'd up paths I will trust only gcc. I guess I could also use
# ldd --version to detect.
set(_GLIB_SOURCE_DETECT "
#include <limits.h>
#include <stdio.h>
int main()
{
printf(\"%d%d\",__GLIBC__, __GLIBC_MINOR__);
return 0;
}
")
file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/build/cmake/glibc.cpp "${_GLIB_SOURCE_DETECT}\n")
try_run(POST26_GLIBC_DETECTED
POST26_GLIBC_COMPILE
${CMAKE_CURRENT_BINARY_DIR}/build/cmake
${CMAKE_CURRENT_BINARY_DIR}/build/cmake/glibc.cpp
RUN_OUTPUT_VARIABLE GLIBC_VERSION )
if (GLIBC_VERSION AND POST26_GLIBC_COMPILE )
set(${_VERSION} ${GLIBC_VERSION})
else()
message(STATUS "NOTE: Could not detect GLIBC_VERSION from compiler")
endif()
ENDMACRO (GLIBC_DETECT)

View File

@@ -10,23 +10,22 @@ macro(qbt_set_compiler_options)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
#-Wshadow -Wconversion ?
set(_GCC_COMMON_C_AND_CXX_FLAGS "-Wall -Wextra"
"-Wfloat-equal -Wcast-qual -Wcast-align"
"-Wsign-conversion -Winvalid-pch -Werror=return-type -Wno-long-long"
# -fstack-protector-all
"-Werror -Wno-error=deprecated-declarations"
"-Wcast-qual -Wcast-align"
"-Winvalid-pch -Wno-long-long"
#"-fstack-protector-all"
#"-Werror -Wno-error=deprecated-declarations"
)
set (_GCC_COMMON_CXX_FLAGS "-fexceptions -frtti"
set(_GCC_COMMON_CXX_FLAGS "-fexceptions -frtti"
"-Woverloaded-virtual -Wold-style-cast"
"-Wnon-virtual-dtor -Wfloat-equal -Wcast-qual -Wcast-align"
"-Werror=overloaded-virtual"
# "-Weffc++"
"-Werror -Wno-error=cpp"
"-Wnon-virtual-dtor"
#"-Weffc++"
#"-Werror -Wno-error=cpp"
# we should modify code to make these ones obsolete
"-Wno-error=sign-conversion -Wno-error=float-equal"
#"-Wno-error=sign-conversion -Wno-error=float-equal"
)
# GCC 4.8 has problems with std::array and its initialization
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
# GCC 4.8 has problems with std::array and its initialization
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wno-error=missing-field-initializers")
endif()
@@ -40,29 +39,18 @@ macro(qbt_set_compiler_options)
endif (_PEDANTIC_IS_SUPPORTED)
if (CMAKE_SYSTEM_NAME MATCHES Linux)
# if Glibc version is 2.20 or higher, set -D_DEFAULT_SOURCE
include(MacroGlibcDetect)
message(STATUS "Detecting Glibc version...")
glibc_detect(GLIBC_VERSION)
if(${GLIBC_VERSION})
if(GLIBC_VERSION LESS "220")
message(STATUS "Glibc version is ${GLIBC_VERSION}")
else(GLIBC_VERSION LESS "220")
message(STATUS "Glibc version is ${GLIBC_VERSION}, adding -D_DEFAULT_SOURCE")
add_definitions(-D_DEFAULT_SOURCE)
endif(GLIBC_VERSION LESS "220")
endif(${GLIBC_VERSION})
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
add_definitions(-D_DEFAULT_SOURCE)
endif()
# Clang 5.0 still doesn't support -Wstrict-null-sentinel
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# Clang 5.0 still doesn't support -Wstrict-null-sentinel
check_cxx_compiler_flag(-Wstrict-null-sentinel _STRICT_NULL_SENTINEL_IS_SUPPORTED)
if (_STRICT_NULL_SENTINEL_IS_SUPPORTED)
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wstrict-null-sentinel")
endif (_STRICT_NULL_SENTINEL_IS_SUPPORTED)
# Code should be improved to render this not needed
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wno-error=unused-function -Wno-error=inconsistent-missing-override")
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wno-error=unused-function")
else ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# GCC supports it
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wstrict-null-sentinel")
@@ -73,31 +61,14 @@ macro(qbt_set_compiler_options)
string(APPEND CMAKE_C_FLAGS " ${_GCC_COMMON_C_AND_CXX_FLAGS_STRING}")
string(APPEND CMAKE_CXX_FLAGS " ${_GCC_COMMON_C_AND_CXX_FLAGS_STRING} ${_GCC_COMMON_CXX_FLAGS_STRING}")
set(QBT_ADDITONAL_FLAGS "${_GCC_COMMON_C_AND_CXX_FLAGS_STRING}" CACHE STRING
"Additional qBittorent compile flags" FORCE)
set(QBT_ADDITONAL_CXX_FLAGS "${_GCC_COMMON_CXX_FLAGS_STRING}" CACHE STRING
"Additional qBittorent C++ compile flags" FORCE)
# check whether we can enable -Og optimization for debug build
# also let's enable -march=native for debug builds
check_cxx_compiler_flag(-Og _DEBUG_OPTIMIZATION_LEVEL_IS_SUPPORTED)
if (_DEBUG_OPTIMIZATION_LEVEL_IS_SUPPORTED)
string(APPEND CMAKE_C_FLAGS_DEBUG " -Og -g3 -march=native -pipe" )
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -Og -g3 -march=native -pipe" )
else(_DEBUG_OPTIMIZATION_LEVEL_IS_SUPPORTED)
string(APPEND CMAKE_C_FLAGS_DEBUG " -O0 -g3 -march=native -pipe" )
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -O0 -g3 -march=native -pipe" )
endif (_DEBUG_OPTIMIZATION_LEVEL_IS_SUPPORTED)
endif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(QBT_ADDITONAL_FLAGS "-wd4290 -wd4275 -wd4251 /W4" CACHE STRING "Additional qBittorent compile flags")
string(APPEND CMAKE_C_FLAGS " ${QBT_ADDITONAL_FLAGS}")
string(APPEND CMAKE_CXX_FLAGS " ${QBT_ADDITONAL_FLAGS}")
set(QBT_ADDITONAL_FLAGS "/wd4251 /wd4275 /wd4290 /W4" CACHE STRING "Additional qBittorent compile flags")
endif ()
string(APPEND CMAKE_C_FLAGS " ${QBT_ADDITONAL_FLAGS}")
string(APPEND CMAKE_CXX_FLAGS " ${QBT_ADDITONAL_FLAGS}")
# endif (NOT QBT_ADDITONAL_FLAGS)
endmacro(qbt_set_compiler_options)

View File

@@ -1,16 +1,17 @@
# a helper function which appends source to the main qBt target
# sources file names are relative to the the ${qBittorrent_SOURCE_DIR}
# a helper function which appends source to the target
# sources file names are relative to the the target source dir
function (qbt_target_sources)
set (_sources_rel "")
foreach (_source IN ITEMS ${ARGN})
if (IS_ABSOLUTE "${_source}")
set(source_abs "${_source}")
function (qbt_target_sources _target _scope)
get_target_property(targetSourceDir ${_target} SOURCE_DIR)
set(sourcesRelative "")
foreach(source IN ITEMS ${ARGN})
if(IS_ABSOLUTE "${source}")
set(sourceAbsolutePath "${source}")
else()
get_filename_component(_source_abs "${_source}" ABSOLUTE)
get_filename_component(sourceAbsolutePath "${source}" ABSOLUTE)
endif()
file (RELATIVE_PATH _source_rel "${qbt_executable_SOURCE_DIR}" "${_source_abs}")
list (APPEND _sources_rel "${_source_rel}")
file(RELATIVE_PATH sourceRelativePath "${targetSourceDir}" "${sourceAbsolutePath}")
list(APPEND sourcesRelative "${sourceRelativePath}")
endforeach()
target_sources (qBittorrent PRIVATE "${_sources_rel}")
endfunction (qbt_target_sources)
target_sources(${_target} ${_scope} "${sourcesRelative}")
endfunction(qbt_target_sources)

View File

@@ -0,0 +1,48 @@
# macros to handle translation files
# qbt_add_translations(<target> QRC_FILE <filename> TS_FILES <filenames>)
# handles out of source builds for Qt resource files that include translations
# The function generates translations out of the supplied list of .ts files in the build directory,
# copies the .qrc file there, calls qt5_add_resources() adds its output to the target sources list.
function(qbt_add_translations _target)
set(oneValueArgs QRC_FILE)
set(multiValueArgs TS_FILES)
cmake_parse_arguments(QBT_TR "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
get_target_property(_binaryDir ${_target} BINARY_DIR)
if (NOT QBT_TR_QRC_FILE)
message(FATAL_ERROR "QRC file is empty")
endif()
if (NOT QBT_TR_TS_FILES)
message(FATAL_ERROR "TS_FILES files are empty")
endif()
if(IS_ABSOLUTE "${QBT_TR_QRC_FILE}")
file(RELATIVE_PATH _qrcToTs "${CMAKE_CURRENT_SOURCE_DIR}" "${QBT_TR_QRC_FILE}")
else()
set(_qrcToTs "${QBT_TR_QRC_FILE}")
endif()
get_filename_component(_qrcToTsDir "${_qrcToTs}" DIRECTORY)
get_filename_component(_qmFilesBinaryDir "${CMAKE_CURRENT_BINARY_DIR}/${_qrcToTsDir}" ABSOLUTE)
# to make qt5_add_translation() work as we need
set_source_files_properties(${QBT_TR_TS_FILES} PROPERTIES OUTPUT_LOCATION "${_qmFilesBinaryDir}")
qt5_add_translation(_qmFiles ${QBT_TR_TS_FILES})
set(_qrc_dest_dir "${_binaryDir}/${_qrcToTsDir}")
set(_qrc_dest_file "${_binaryDir}/${QBT_TR_QRC_FILE}")
message(STATUS "copying ${QBT_TR_QRC_FILE} to ${_qrc_dest_dir}")
file(COPY ${QBT_TR_QRC_FILE} DESTINATION ${_qrc_dest_dir})
set_source_files_properties("${_qrc_dest_file}" PROPERTIES
GENERATED True
OBJECT_DEPENDS "${_qmFiles}")
# With AUTORCC enabled rcc is ran by cmake before language files are generated,
# and thus we call rcc explicitly
qt5_add_resources(_resources "${_qrc_dest_file}")
target_sources(${_target} PRIVATE "${_resources}")
endfunction()

View File

@@ -1,14 +1,11 @@
if (STACKTRACE_WIN)
if ("${WINXXBITS}" NOT STREQUAL "Win64")
add_compile_options(-fno-omit-frame-pointer)
endif ("${WINXXBITS}" NOT STREQUAL "Win64")
link_libraries(libdbghelp -Wl,--export-all-symbols)
endif (STACKTRACE_WIN)
if (("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") OR ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"))
link_libraries(-Wl,--dynamicbase)
endif()
endif ()
list(APPEND LibtorrentRasterbar_CUSTOM_DEFINITIONS
-D_FILE_OFFSET_BITS=64
-D__USE_W32_SOCKETS)
# libraries from winconf.pri
link_libraries(advapi32 iphlpapi ole32 shell32 user32 wsock32 ws2_32)
# LIBS += libadvapi32 libshell32 libuser32
# LIBS += libcrypto.dll libssl.dll libwsock32 libws2_32 libz libiconv.dll
# LIBS += libpowrprof

View File

@@ -1,21 +1,7 @@
if (STACKTRACE_WIN)
if ("${WINXXBITS}" STREQUAL "Win64")
add_compile_options(-Zi)
else ("${WINXXBITS}" STREQUAL "Win64")
# i686 arch requires frame pointer preservation
add_compile_options(-Oy-)
endif ("${WINXXBITS}" STREQUAL "Win64")
link_libraries(dbghelp.lib)
endif (STACKTRACE_WIN)
# Enable Wide characters
add_definitions(-DTORRENT_USE_WPATH)
if (NOT QT5)
# Qt4 does not detect it itself
add_definitions(-DQ_COMPILER_INITIALIZER_LISTS)
endif (NOT QT5)
include(MacroConfigureMSVCRuntime)
set(MSVC_RUNTIME "dynamic")
configure_msvc_runtime()
# libraries from winconf.pri
link_libraries(advapi32 crypt32 Iphlpapi ole32 shell32 User32)

View File

@@ -2,33 +2,51 @@
list(APPEND CMAKE_LIBRARY_PATH "$ENV{LIB}")
# We want to link with static version of
# libtorrent
set(LibtorrentRasterbar_USE_STATIC_LIBS True)
set(LibtorrentRasterbar_CUSTOM_DEFINITIONS
-DBOOST_ALL_NO_LIB -DBOOST_ASIO_HASH_MAP_BUCKETS=1021
-DBOOST_ASIO_SEPARATE_COMPILATION
-DBOOST_ASIO_DISABLE_CONNECTEX
-DBOOST_EXCEPTION_DISABLE
-DBOOST_SYSTEM_STATIC_LINK=1
-DTORRENT_USE_LIBCRYPTO
# TODO: remove the following define as it is not used since OpenSSL >= 1.1
-DTORRENT_USE_OPENSSL
-D__USE_W32_SOCKETS
-D_FILE_OFFSET_BITS=64)
# TODO: remove the following define as it is not used since libtorrent >= 1.2
-DTORRENT_DISABLE_RESOLVE_COUNTRIES
)
add_definitions(-DUNICODE
set(LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES system)
# If you want to link with static version of libtorrent
#set(LibtorrentRasterbar_USE_STATIC_LIBS True)
#list(APPEND LibtorrentRasterbar_CUSTOM_DEFINITIONS
# -DBOOST_SYSTEM_STATIC_LINK=1)
# and boost
#set(Boost_USE_STATIC_LIBS True)
#set(Boost_USE_STATIC_RUNTIME True)
add_definitions(
-DNTDDI_VERSION=0x06010000
-D_WIN32_WINNT=0x0601
-D_WIN32_IE=0x0601
-DUNICODE
-D_UNICODE
-DWIN32
-D_WIN32
-DWIN32_LEAN_AND_MEAN
-DNTDDI_VERSION=0x05010000
-D_WIN32_WINNT=0x0501
-D_WIN32_IE=0x0501
-D_CRT_SECURE_NO_DEPRECATE
-D_SCL_SECURE_NO_DEPRECATE
-DNOMINMAX
-DBOOST_ALL_NO_LIB
)
# and boost
set(Boost_USE_STATIC_LIBS True)
# set(Boost_USE_STATIC_RUNTIME True)
# Enable if libtorrent was built with this flag defined
#list(APPEND LibtorrentRasterbar_CUSTOM_DEFINITIONS -DTORRENT_NO_DEPRECATE)
if (("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") OR ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"))
list(APPEND LibtorrentRasterbar_CUSTOM_DEFINITIONS
-DTORRENT_DEBUG)
else ()
add_definitions(-DNDEBUG)
endif ()
# Here we assume that all required libraries are installed into the same prefix
# with usual unix subdirectories (bin, lib, include)
@@ -38,17 +56,9 @@ set(COMMON_INSTALL_PREFIX "c:/usr" CACHE PATH "Prefix used to install all the re
list(APPEND CMAKE_SYSTEM_PREFIX_PATH "${COMMON_INSTALL_PREFIX}")
# If two version of Qt are installed, separate prefixes are needed most likely
set(QT4_INSTALL_PREFIX "${COMMON_INSTALL_PREFIX}/lib/qt4" CACHE PATH "Prefix where Qt4 is installed")
set(QT5_INSTALL_PREFIX "${COMMON_INSTALL_PREFIX}/lib/qt5" CACHE PATH "Prefix where Qt5 is installed")
# it is safe to set Qt dirs even if their files are directly in the prefix
# Qt4
if(NOT QT5)
# for qt 4 we need qmake, Qt5 provides cmake config files
LIST(APPEND CMAKE_PROGRAM_PATH "${QT4_INSTALL_PREFIX}/bin/")
endif(NOT QT5)
# Qt5
set(Qt5_DIR "${QT5_INSTALL_PREFIX}/lib/cmake/Qt5")
# And now we can set specific values for the Boost and libtorrent libraries.

View File

@@ -5,6 +5,8 @@ BINDIR = @EXPAND_BINDIR@
DATADIR = @EXPAND_DATADIR@
MANPREFIX = @EXPAND_MANDIR@
QMAKE_CC = @QBT_CC@
QMAKE_CXX = @QBT_CXX@
QMAKE_CXXFLAGS += @QBT_CONF_EXTRA_CFLAGS@
EXTERNAL_INCLUDES = @QBT_CONF_INCLUDES@

View File

@@ -35,27 +35,24 @@ LIBS += zlib.lib
#LIBS += libcrypto libssl
#LIBS += libz
DEFINES += NTDDI_VERSION=0x05010000
DEFINES += _WIN32_WINNT=0x0501
DEFINES += _WIN32_IE=0x0501
# Disable to use Boost auto-linking
DEFINES += BOOST_ALL_NO_LIB
# Use one of the following options
DEFINES += BOOST_SYSTEM_STATIC_LINK
#DEFINES += BOOST_SYSTEM_DYN_LINK
# Boost 1.60+ defaults to Vista+ support. The define below enables XP support again.
DEFINES += BOOST_USE_WINAPI_VERSION=0x0501
# Enable if building against libtorrent 1.0.x (RC_1_0) (static linking)
#DEFINES += BOOST_ASIO_SEPARATE_COMPILATION
# Enable if building against libtorrent 1.0.x (RC_1_0) (dynamic linking)
#DEFINES += BOOST_ASIO_DYN_LINK
# Enable if encountered build error with boost version <= 1.59
#DEFINES += BOOST_NO_CXX11_RVALUE_REFERENCES
# Enable if building against libtorrent 1.1.x (RC_1_1)
# built with this flag defined
# Enable if libtorrent was built with this flag defined
#DEFINES += TORRENT_NO_DEPRECATE
# Enable if linking dynamically against libtorrent
#DEFINES += TORRENT_LINKING_SHARED
# Enable stack trace support
CONFIG += strace_win
CONFIG += stacktrace
win32-msvc* {
QMAKE_CXXFLAGS += "/guard:cf"
QMAKE_LFLAGS += "/guard:cf"
QMAKE_LFLAGS_RELEASE += "/OPT:REF /OPT:ICF"
}

701
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
AC_INIT([qbittorrent], [v4.1.0alpha], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
AC_INIT([qbittorrent], [v4.2.5], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
@@ -8,16 +8,12 @@ AC_LANG(C++)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE
# use compiler from env variables if available
QBT_CC="$CC"
QBT_CXX="$CXX"
# Define --wth-* and --enable-* arguments
AC_ARG_WITH(qtsingleapplication,
[AS_HELP_STRING([--with-qtsingleapplication=@<:@system|shipped@:>@],
[Use the shipped qtsingleapplication library or the system one (default=shipped)])],
[],
[with_qtsingleapplication=shipped])
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug],
[Enable debug build])],
@@ -161,38 +157,72 @@ AS_CASE(["x$enable_qt_dbus"],
AC_MSG_ERROR([Unknown option "$enable_qt_dbus". Use either "yes" or "no".])])
AX_BOOST_BASE([1.35],
[AC_MSG_NOTICE([Boost CPPFLAGS: "$BOOST_CPPFLAGS"
Boost LDFLAGS: "$BOOST_LDFLAGS"])],
AX_BOOST_BASE([1.40],
[AC_MSG_NOTICE([Boost CXXFLAGS: "$BOOST_CPPFLAGS"])
AC_MSG_NOTICE([Boost LDFLAGS: "$BOOST_LDFLAGS"])],
[AC_MSG_ERROR([Could not find Boost])])
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
CXXFLAGS="$BOOST_CPPFLAGS $CXXFLAGS"
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
# add workaround for problematic boost version
# taken from ax_boost_base.m4
m4_define([DETECT_BOOST_VERSION_PROGRAM],
[AC_LANG_PROGRAM([[#include <boost/version.hpp>]],
[[(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))]));]])])
AC_COMPILE_IFELSE([DETECT_BOOST_VERSION_PROGRAM(106000)], [],
[QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES"])
AX_BOOST_SYSTEM()
AC_MSG_NOTICE([Boost.System LIB: "$BOOST_SYSTEM_LIB"])
LIBS="$BOOST_SYSTEM_LIB $LIBS"
AC_MSG_CHECKING([which qtsingleapplication to use])
AS_CASE(["x$with_qtsingleapplication"],
["xshipped"],
[AC_MSG_RESULT([shipped])
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG usesystemqtsingleapplication"],
["xsystem"],
[AC_MSG_RESULT([system])
QBT_ADD_CONFIG="$QBT_ADD_CONFIG usesystemqtsingleapplication"],
[AC_MSG_RESULT([$with_qtsingleapplication])
AC_MSG_ERROR([Unknown option "$with_qtsingleapplication". Use either "system" or "shipped".])])
PKG_CHECK_MODULES(libtorrent,
[libtorrent-rasterbar >= 1.0.6],
[CPPFLAGS="$libtorrent_CFLAGS $CPPFLAGS"
[libtorrent-rasterbar >= 1.1.10],
[CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS"
LIBS="$libtorrent_LIBS $LIBS"])
PKG_CHECK_MODULES(openssl,
[openssl >= 1.0],
[CXXFLAGS="$openssl_CFLAGS $CXXFLAGS"
LIBS="$openssl_LIBS $LIBS"])
PKG_CHECK_MODULES(zlib,
[zlib >= 1.2.5.2],
[CPPFLAGS="$zlib_CFLAGS $CPPFLAGS"
[CXXFLAGS="$zlib_CFLAGS $CXXFLAGS"
LIBS="$zlib_LIBS $LIBS"])
# Check if already in >= C++14 mode because of the flags returned by one of the above packages
TMP_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=""
AC_MSG_CHECKING([if compiler defaults to C++14 or later mode])
AC_COMPILE_IFELSE([DETECT_CPP14_PROGRAM()],
[AC_MSG_RESULT([yes])
QBT_CXX14_FOUND="yes"],
[AC_MSG_RESULT([no])
QBT_CXX14_FOUND="no"])
# In case of no, check if the compiler can support at least C++14
# and if yes, enable it leaving a warning to the user
AS_IF([test "x$QBT_CXX14_FOUND" = "xno"],
[AC_MSG_CHECKING([if compiler supports C++14])
CXXFLAGS="-std=c++14"
AC_COMPILE_IFELSE([DETECT_CPP14_PROGRAM()],
[AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if C++14 is disabled by the set compiler flags])
# prepend the flag so it won't override conflicting user defined flags
CXXFLAGS="-std=c++14 $TMP_CXXFLAGS"
AC_COMPILE_IFELSE([DETECT_CPP14_PROGRAM()],
[AC_MSG_RESULT([no])
QBT_ADD_CONFIG="$QBT_ADD_CONFIG c++14"
AC_MSG_WARN([C++14 mode is now force enabled. The C++ mode should match the mode that other libraries were built with, otherwise you'll likely get linking errors.])],
[AC_MSG_RESULT([yes])
AC_MSG_ERROR([The compiler supports C++14 but the user or a dependency has explicitly enabled a lower mode.])])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([A compiler supporting C++14 is required.])])
])
CXXFLAGS="$TMP_CXXFLAGS"
# These are required because autoconf doesn't expand these **particular**
# vars automatically. And qmake cannot autoexpand them.
AX_DEFINE_DIR([EXPAND_PREFIX], [prefix])
@@ -219,18 +249,20 @@ extract() {
for i in $string; do
case "$(echo "$i" | cut -c1)" in
'') ;;
D) QBT_CONF_DEFINES="$(echo $i | cut -c2-) $QBT_CONF_DEFINES";;
I) QBT_CONF_INCLUDES="$(echo $i | cut -c2-) $QBT_CONF_INCLUDES";;
*) QBT_CONF_EXTRA_CFLAGS="-$i $QBT_CONF_EXTRA_CFLAGS";;
D) QBT_CONF_DEFINES="$QBT_CONF_DEFINES $(echo $i | cut -c2-)";;
I) QBT_CONF_INCLUDES="$QBT_CONF_INCLUDES $(echo $i | cut -c2-)";;
*) QBT_CONF_EXTRA_CFLAGS="$QBT_CONF_EXTRA_CFLAGS -$i";;
esac
done
IFS=$SAVEIFS
}
extract "$CFLAGS $CPPFLAGS $CXXFLAGS"
extract "$CFLAGS $CXXFLAGS"
QBT_ADD_DEFINES="$QBT_ADD_DEFINES $QBT_CONF_DEFINES"
# Substitute the values of these vars in conf.pri.in
AC_SUBST(QBT_CC)
AC_SUBST(QBT_CXX)
AC_SUBST(QBT_CONF_INCLUDES)
AC_SUBST(QBT_CONF_EXTRA_CFLAGS)
AC_SUBST(QBT_ADD_CONFIG)
@@ -242,17 +274,14 @@ AC_OUTPUT(conf.pri)
AS_IF([test "x$enable_systemd" = "xyes"],
[AC_OUTPUT(dist/unix/systemd/qbittorrent-nox@.service)])
AC_MSG_NOTICE([Running qmake to generate the makefile...])
CONFDIR="$( cd "$( dirname "$0" )" && pwd )"
$QT_QMAKE -r [$CONFDIR]/qbittorrent.pro "QMAKE_LRELEASE=$QMAKE_LRELEASE"
ret="$?"
TOPDIR="$(cd "$(dirname "$0")" && pwd)"
$QT_QMAKE -r "$TOPDIR/qbittorrent.pro" "QMAKE_LRELEASE=$QMAKE_LRELEASE"
qmake_ret="$?"
AS_ECHO()
AS_IF([test "x$ret" = "x0"],
[AC_MSG_NOTICE([Good, your configure finished.])],
[AC_MSG_ERROR([Failed running $QT_QMAKE to generate the makefile])])
AS_IF([test "x$qmake_ret" != "x0"],
[AC_MSG_ERROR([$QT_QMAKE failed to generate the makefile])])
AC_MSG_NOTICE([Good, the configure finished.])
AS_ECHO()

2
dist/CMakeLists.txt vendored
View File

@@ -1,3 +1,5 @@
find_package(Qt5Widgets ${requiredQtVersion}) # to conditionally install desktop-related files
if (APPLE)
add_subdirectory(mac)
else (APPLE)

32
dist/mac/Info.plist vendored
View File

@@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>qBittorrent</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
@@ -21,6 +25,10 @@
<array>
<string>org.bittorrent.torrent</string>
</array>
<key>NSExportableTypes</key>
<array>
<string>org.bittorrent.torrent</string>
</array>
<key>LSIsAppleDefaultForType</key>
<true/>
</dict>
@@ -28,6 +36,8 @@
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleURLSchemes</key>
<array>
<string>magnet</string>
@@ -45,21 +55,19 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.1.0</string>
<key>CFBundleSignature</key>
<string>qBit</string>
<string>4.2.5</string>
<key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string>
<key>CFBundleIdentifier</key>
<string>org.qbittorrent</string>
<string>org.qbittorrent.qBittorrent</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}.0</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<string>True</string>
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2006-2018 The qBittorrent project</string>
<string>Copyright © 2006-2020 The qBittorrent project</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
@@ -76,17 +84,21 @@
<key>UTTypeIdentifier</key>
<string>org.bittorrent.torrent</string>
<key>UTTypeReferenceURL</key>
<string>http://www.bittorrent.org/beps/bep_0000.html</string>
<string>https://www.bittorrent.org/beps/bep_0000.html</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<string>TORR</string>
<array>
<string>TORR</string>
</array>
<key>public.filename-extension</key>
<array>
<string>torrent</string>
</array>
<key>public.mime-type</key>
<string>application/x-bittorrent</string>
<array>
<string>application/x-bittorrent</string>
</array>
</dict>
</dict>
</array>

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