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

Compare commits

...

2203 Commits

Author SHA1 Message Date
sledgehammer999
da0b276d5f Bump to 4.3.3 2021-01-19 00:47:04 +02:00
sledgehammer999
2d73bc9e7d Update Changelog 2021-01-19 00:46:29 +02:00
Chocobo1
fdd54fe568 Simplify code for checking free disk space
`QStorageInfo::bytesAvailable()` is guaranteed to return `-1` for an
invalid path.
https://doc.qt.io/qt-5/qstorageinfo.html#bytesAvailable
2021-01-19 00:45:13 +02:00
Chocobo1
e5ce24e55e Improve detection of file extension string 2021-01-19 00:45:06 +02:00
sledgehammer999
d90349709b Sync translations from Transifex and run lupdate 2021-01-17 23:24:02 +02:00
Vladimir Golovnev (Glassez)
adb0fe6582 WebUI: Correctly represent torrent content structure 2021-01-17 22:50:40 +02:00
Chocobo1
5ed81580c9 Add README.md to searchengine folder 2021-01-17 22:50:39 +02:00
Chocobo1
86d6fb86d7 Unify "github actions" artifacts naming scheme 2021-01-17 22:50:38 +02:00
Chocobo1
ddec247d4f Migrate away from deprecated Qt functions
`QString QDateTime::toString(Qt::DateFormat format = Qt::TextDate)` will
be removed in Qt6.
2021-01-17 22:50:37 +02:00
Chocobo1
d431ecbe00 Disable clang "range loop analysis" compiler warning
See: https://github.com/qbittorrent/qBittorrent/pull/13915#issuecomment-739449084
2021-01-17 22:50:36 +02:00
Chocobo1
be929ed88c Set source character sets to UTF-8
This suppress warning C4819.
https://docs.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=msvc-160
2021-01-17 22:50:35 +02:00
Chocobo1
2e1f9bf8be Add script for generating project tarball 2021-01-17 22:50:20 +02:00
lbilli
7fff393b0e On Linux use legacy 'data' directory only as a fallback 2021-01-17 22:47:13 +02:00
sledgehammer999
a669ec49ad Correct copyright attribution
These files were created and edited in their entirety in commit 8db4bde15d
As far as I can tell they were almost entirety rewritten from their original state.
The old copyright attribution is restored and the new author is added too.
2021-01-17 22:47:11 +02:00
Vladimir Golovnev (Glassez)
1880082017 Remove redundant suffix from TorrentHandle class
Originally, it was just a wrapper for libtorrent::torrent_handle class, so it mimicked its name.
It was then transformed into a more complex aggregate, but the name was retained (just by inertia).
Unlike libtorrent::torrent_handle class in whose name "handle" means the pattern used,
it does not matter for qBittorrent classes and just eats up space in the source code.
2021-01-17 22:47:00 +02:00
sledgehammer999
0cbd15890a Merge pull request #14170 from sledgehammer999/use_cxx1z
Use c++1z to enable c++17
2021-01-07 13:40:05 +02:00
sledgehammer999
7fe7c6c277 Use c++1z to enable c++17
It increases compatibility with older qt versions.
2021-01-06 21:54:46 +02:00
jagannatharjun
e4c177fec7 Correctly set items flags in TorrentContentModel
Only set editable flag on item's where editing is handled in the delegate

closes #13515
2021-01-06 21:36:40 +02:00
Chocobo1
77f4e6c2cf Generate version header when configuring project
The basic idea is we create a version header template at
"src/base/version.h.in" and the build systems are expected to replace
strings that are enclosed with @ symbols and generate
"src/base/version.h" for other source files to consume/include.
2021-01-06 21:36:39 +02:00
sledgehammer999
4563b11a2e Bump copyright year 2021-01-06 21:36:37 +02:00
Vladimir Golovnev (Glassez)
cb477f9a29 QMake: Raise minimal macOS target version 2021-01-06 21:36:35 +02:00
Vladimir Golovnev (Glassez)
58ac07667e Use single parameter to accept torrent source 2021-01-06 21:36:34 +02:00
Vladimir Golovnev (Glassez)
74bf3af41c Use std::optional<bool> instead of custom TriStateBool 2021-01-06 21:36:33 +02:00
Vladimir Golovnev (Glassez)
9317071122 Change parseBool() to return optional bool value 2021-01-06 21:36:31 +02:00
Vladimir Golovnev (Glassez)
dab32f2090 Use std::optional instead of boost::optional 2021-01-06 21:36:29 +02:00
Vladimir Golovnev (Glassez)
dc464d4d41 Use nested namespaces definition syntax 2021-01-06 21:36:28 +02:00
Chocobo1
e7e3f6a9db Don't use deprecated locale name 2021-01-06 21:36:27 +02:00
Chocobo1
5a1c4e79b3 Revise store/load state operations of Options Dialog 2021-01-06 21:36:26 +02:00
Chocobo1
c6d9ab6810 Remember dialog sizes
This applies to "About Dialog", "Ban List Options Dialog", "Download From URL Dialog", "IP Subnet
Whitelist Options Dialog", "Search Plugin Select Dialog", "Search Plugin Source Dialog",
"Statistics Dialog", "Speed Limit Dialog" and "Torrent Options Dialog".

Also unifies storing the dialog size under the key "Size".
2021-01-06 21:36:24 +02:00
Chocobo1
d7afad835e Revise SettingsStorage store/load value interface 2021-01-06 21:36:22 +02:00
Chocobo1
8608d7b9da Improve load data behavior of SettingsStorage class
Previously it only handle the case of failed lookup, now it discard
invalid values when deserializing the database from disk.
Also checks whether the data is convertible to the intended type.
2021-01-06 21:36:22 +02:00
Vladimir Golovnev (Glassez)
72970602af Reload "missing files" torrent instead of re-checking 2021-01-06 21:36:20 +02:00
Vladimir Golovnev (Glassez)
86579ca87d Extract torrent reloading logic into separate method 2021-01-06 21:36:19 +02:00
Vladimir Golovnev (Glassez)
e55582124c Drop notification about move storage failed 2021-01-06 21:36:17 +02:00
Vladimir Golovnev (Glassez)
bd8b06c607 Drop notification about move storage finished 2021-01-06 21:36:16 +02:00
Chocobo1
230fedf069 Move parsing of TriStateBool to a static class function 2021-01-06 21:36:14 +02:00
thalieht
7bea10f507 Update "Keep top-level folder" in WebUI options 2021-01-06 21:36:13 +02:00
Chocobo1
7cde969b90 Exclude configure script for "trailing newlines" checking 2021-01-06 21:36:12 +02:00
Chocobo1
a3b8f6880b Migrate away from deprecated AC_OUTPUT macro
The `AC_OUTPUT` has two versions, the deprecated one takes arguments and the other not. Check the
following link for equivalent replacement:
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.70/html_node/Obsolete-Macros.html#Obsolete-Macros

Also regenerate the configure script with the latest Autoconf 2.70.
2021-01-06 21:35:33 +02:00
Chocobo1
ad79fc8d43 Migrate away from deprecated std::iterator class 2021-01-06 21:31:51 +02:00
Chocobo1
fb4bf94a56 Use function-pointer based signal-slot connection 2021-01-06 21:31:50 +02:00
Chocobo1
1c184944fd Remove unused define 2021-01-06 21:31:49 +02:00
Chocobo1
ec420f6617 Bump project requirement to C++17 2021-01-06 21:31:47 +02:00
Chocobo1
d908227619 Add a thin layer around SettingsStorage class
This new layer would be handy for saving GUI widget states as they don't
need the value cached and they store/load rarely.
2021-01-06 21:31:45 +02:00
sledgehammer999
ac8167410b Add new languages
* Azerbaijani
* Estonian
2021-01-06 21:31:44 +02:00
Vladimir Golovnev (Glassez)
26ce187b30 Don't call non-existent elements
Fixed a regression where the script tries to access elements that no longer
exist on the page, because they were replaced with others by a previous change.
2021-01-06 21:31:43 +02:00
Vladimir Golovnev (Glassez)
2c4e04e537 Don't call non-existent elements
Fixed a regression where the script tries to access elements that no longer
exist on the page, because they were replaced with others by a previous change.
2021-01-06 21:31:42 +02:00
Vladimir Golovnev (Glassez)
b418f65c2f Improve content file/folder names handling
Move files/folders renaming functions to core classes.
Query file/folder for renaming by its current path.
Add ability to rename content folders from WebAPI/WebUI.
2021-01-06 21:31:41 +02:00
Vladimir Golovnev (Glassez)
dd3a8d5d56 Fix folder name extraction functions
It should return empty string if there is no parent folder.
2021-01-06 21:31:39 +02:00
Chocobo1
49e54a55df Capitalize locale names 2021-01-06 21:31:38 +02:00
thalieht
8cd0a7ae85 Group several torrent options into one dialog
Speed limits, share limits and the new options to disable DHT, PeX, LSD per torrent
2021-01-06 21:31:36 +02:00
thalieht
442f0df613 Save fastresume when setting torrent speed limits 2021-01-06 21:31:35 +02:00
thalieht
f9ee5bdb59 Increase maximum global speed limits from ~1 GiB/s to ~2 GiB/s
Closer to the INT_MAX limit of ~2 Billion when multiplied by 1024 for libtorrent
2021-01-06 21:31:33 +02:00
thalieht
b9602cc6ab Convert existing speed dialog to global + alt global limits only 2021-01-06 21:31:25 +02:00
sledgehammer999
abb854a1e6 Bump to 4.3.2 2020-12-27 13:42:41 +02:00
sledgehammer999
4ee17a73d0 Update Changelog 2020-12-27 13:42:40 +02:00
sledgehammer999
faf6e82274 Sync translations from Transifex and run lupdate 2020-12-26 21:18:40 +02:00
Vladimir Golovnev (Glassez)
c08ec1ac5e Allow to add root folder to torrent content 2020-12-26 20:27:34 +02:00
Vladimir Golovnev (Glassez)
cd0b6d9a43 Extract enum serialization/parsing functions 2020-12-26 20:27:33 +02:00
Vladimir Golovnev (Glassez)
b8f1142abe Improve torrent name handling 2020-12-26 20:27:31 +02:00
Chocobo1
78859415d6 Use a helper function to look up stat indexes 2020-12-26 20:27:29 +02:00
Chocobo1
ef92c17192 Don't use removed stat metric in libtorrent 2.0
For now, the metric is not entirely removed due to WebAPI still needs to
access it.
2020-12-26 20:27:28 +02:00
Chocobo1
22f3abc4b5 Initialize stat indices to -1
When the index is initialized it will be set to a number >= 0, so we use
-1 to denote its uninitialized status.
2020-12-26 20:27:27 +02:00
Chocobo1
a56e6294c1 Fix wrong JSON type returned
Fix up 78638a15be.
Closes #14041.
2020-12-26 20:27:26 +02:00
Chocobo1
77909e0093 Don't use default CFLAGS, CXXFLAGS from autotools
Before this commit, autotools will inject `-g -O2` to debug build
(`--enable-debug=yes`) and rendering the result binary useless. This
commit fixes it.
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.70/html_node/C_002b_002b-Compiler.html

Closes #14032.
2020-12-26 20:27:25 +02:00
Vladimir Golovnev (Glassez)
2c2bb14b2a Fix bug of "move storage job" can be performed multiple times 2020-12-26 20:27:16 +02:00
Chocobo1
73c8b77464 Migrate away from deprecated QVariant comparison operators
Fortunately, serializing to JSON limits the data types to a very small
subset and thus we are able to implement the comparison without much
hassle.

Fix up cba8d83b21.
2020-12-26 20:27:14 +02:00
Alessandro Simonelli
042238db87 NSIS: Fixed italian.nsi after 4.3.0.1 update
Merged my previous fixes (discussed in #13607) with the suggestions by @glassez (#13615).
2020-12-26 20:27:13 +02:00
FranciscoPombal
6e267f8e81 Update coding guidelines policy for include guards 2020-12-26 20:27:11 +02:00
FranciscoPombal
fdc64d9b38 Use #pragma once instead of include guards 2020-12-26 20:27:10 +02:00
Chocobo1
0b42425db5 Add support for allow_idna option
Upstream PR: https://github.com/arvidn/libtorrent/pull/5316
2020-12-26 20:27:08 +02:00
Chocobo1
e5d7738127 Update "HTTPS tracker validation" enablement conditional
https://github.com/arvidn/libtorrent/pull/5313
2020-12-26 20:27:06 +02:00
Chocobo1
422489e2a1 Revise Utils::Version comparison operators 2020-12-26 20:27:04 +02:00
Chocobo1
7de983b4e5 Add operator< for InfoHash class 2020-12-26 20:27:03 +02:00
Chocobo1
e4e55d2a80 Migrate away from deprecated QVariant comparison operators
Another idea would be manually define a custom comparison function for
QVariant. However, having the function would be excessive due to its
limited usage count, also note that we are already casting
various QVariant to its underlying type in existing code.
2020-12-26 20:27:01 +02:00
Vladimir Golovnev (Glassez)
926012ce71 Fix bug of torrents don't save "stopped" state 2020-12-26 20:27:00 +02:00
Chocobo1
487eb554c9 Fix coding style 2020-12-26 20:26:59 +02:00
Chocobo1
5a96e1fc7a Use Qt provided forward declaration header 2020-12-26 20:26:58 +02:00
FranciscoPombal
2fe698ee60 CMake: detect required header for STACKTRACE feature
musl does not provide execinfo.h, so our current stacktrace-related
code cannot be used with it.
2020-12-26 20:26:57 +02:00
Chocobo1
177ac32a5e Use the correct type when referring to info hash 2020-12-26 20:26:55 +02:00
Vladimir Golovnev (Glassez)
5f34d1555b Fix received metadata handling 2020-12-26 20:26:54 +02:00
FranciscoPombal
7cfe68f46c Bump dependency versions in CI
- Bump vcpkg version in GitHub Actions CI
- Bump libtorrent version in Travis CI

Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
2020-12-26 20:26:53 +02:00
Vladimir Golovnev
f94f4d2391 Drop support for building with libtorrent < 1.2.11
Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
2020-12-26 20:26:52 +02:00
FranciscoPombal
73b18d7ef3 Update minimum depedency versions 2020-12-26 20:26:51 +02:00
FranciscoPombal
817e9c4747 Fix method invocation on Qt < 5.10
Fixup 0c3fe54b0b
2020-12-26 20:26:48 +02:00
Vladimir Golovnev (Glassez)
28844eff44 Search for existing files in separate thread 2020-12-26 20:26:47 +02:00
Vladimir Golovnev (Glassez)
389664213b Don't rewrite TorrentInfo instance if it's valid 2020-12-26 20:26:46 +02:00
Vladimir Golovnev (Glassez)
953b6fd6f8 Properly handle "Append extension" option changing 2020-12-26 20:26:45 +02:00
Vladimir Golovnev (Glassez)
9b4f3fcbf8 Clean up metadata downloading code 2020-12-26 20:26:43 +02:00
Chocobo1
80743180be Remove unnecessary restriction on input length
Closes #13884.
2020-12-26 20:26:42 +02:00
Chocobo1
b2847b2381 Update URL to libtorrent settings 2020-12-26 20:26:41 +02:00
Chocobo1
eb657ec032 Move "embedded tracker" options to qbt section 2020-12-26 20:26:39 +02:00
Chocobo1
fc2be601df Add links to libtorrent documentation 2020-12-26 20:26:38 +02:00
Chocobo1
5786c7ff11 Lift upper limit of "Max concurrent HTTP announces" option
Closes #13800.
2020-12-26 20:26:37 +02:00
Jesse Chan
4a183dd968 WebAPI: bump version to 2.6.2 2020-12-26 20:26:36 +02:00
Jesse Chan
7c10dba10c WebAPI: allow to attach tags while adding torrents 2020-12-26 20:26:35 +02:00
sledgehammer999
894446d308 Don't try to remove folders for a torrent without metadata 2020-12-26 20:26:34 +02:00
sledgehammer999
47e9c5ac08 Fix status of torrents without metadata 2020-12-26 20:26:33 +02:00
Chocobo1
7f47ac11f1 Add libtorrent 2.0 to TravisCI script
Also bumping to ubuntu focal as libtorrent requires boost >= 1.66.
2020-12-26 20:26:32 +02:00
Chocobo1
67b17891fa Simplify the calculation of speed graph scale 2020-12-26 20:26:31 +02:00
Chocobo1
dd5b7ba05b Avoid potential rounding to integer issues 2020-12-26 20:26:30 +02:00
Chocobo1
61aa4d9f1c Fix coding style 2020-12-26 20:26:29 +02:00
Chocobo1
6e924b668e Fix availability value
Closes #13869.
Fix up 02f19bfbee.
2020-12-26 20:26:27 +02:00
FranciscoPombal
618ce33fa0 Detect .ts file issues with file health workflow
Also adjust newlines to improve output
2020-12-26 20:26:26 +02:00
Chocobo1
ac413c76b9 Update to use latest macOS image for TravisCI
The default version is so outdated that it needs to rebuild many
dependencies. Now we bump it to the latest version so that it can use
prebuilt packages.
2020-12-26 20:26:25 +02:00
Chocobo1
f266184514 Add ability to use 'shift+delete' to delete torrents in WebUI
Closes #13827.
2020-12-26 20:26:24 +02:00
Chocobo1
8c48bf4a70 Fix wrong data used for comparison
In torrent transfer list we should use underlying data for sorting, not
displayed values.

Closes #13818.
2020-12-26 20:26:23 +02:00
Andrei Stepanov
8bee69c9fc NSIS: Update Russian translation 2020-12-26 20:26:14 +02:00
sledgehammer999
5876886345 Bump to 4.3.1 2020-11-25 13:49:50 +02:00
sledgehammer999
0392bfce3c Update Changelog 2020-11-25 13:49:48 +02:00
sledgehammer999
c66cf43d6a Sync translations from Transifex and run lupdate 2020-11-24 17:04:07 +02:00
Chocobo1
7515afc058 Pin github actions scripts to major versions
> Using the specific major action version allows you to receive critical
> fixes and security patches while still maintaining compatibility. It
> also assures that your workflow should still work.
https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsuses
2020-11-24 16:14:16 +02:00
Thomas De Rocker
5fcfcc901e Fix confusion in date format description (#1)
* Update automatedrssdownloader.ui

* Update rssDownloader.html (#2)
2020-11-24 16:14:15 +02:00
Vladimir Golovnev (Glassez)
1728c16580 Improve coding style 2020-11-24 16:14:14 +02:00
Thomas De Rocker
d3f46452a9 Update dutch.nsi
As referenced in https://github.com/qbittorrent/qBittorrent/pull/13615
and suggested by @glassez 
- Use the word qBittorrent when it is mentioned for the first time within a string.
- If the string contains other references to qBittorrent, then use it (rather than repeating qBittorrent).

Line 24 is the updated Dutch translation for the recently updated English source string (may 2020)
2020-11-24 16:14:09 +02:00
sledgehammer999
7092a98c93 Add Latgalian translation
Closes #12415
2020-11-24 16:14:08 +02:00
sledgehammer999
8e19f66b4f Update .desktop file translations 2020-11-24 16:14:06 +02:00
Chocobo1
b6ab2abf3f Don't use deprecated torrent state "allocating"
Closes #13737.
2020-11-24 16:14:05 +02:00
Vladimir Golovnev (Glassez)
3edaaa30c9 Handle torrent "paused" state at application level 2020-11-24 16:14:04 +02:00
FranciscoPombal
38efff461e Add GitHub Actions file health workflow 2020-11-24 16:14:03 +02:00
FranciscoPombal
2179148b8d Make sure there are no empty files 2020-11-24 16:14:02 +02:00
FranciscoPombal
f92c4c0a40 Fix extra/missing trailing new lines in files 2020-11-24 16:14:00 +02:00
FranciscoPombal
1e7f792dbb Fix trailing whitespace in multiple files
Also fix formatting of CODING_GUIDELINES.md
2020-11-24 16:13:59 +02:00
FranciscoPombal
1d4af505c2 Encode files in UTF-8 without BOM 2020-11-24 16:13:57 +02:00
Chocobo1
baa609b713 Remove unused function 2020-11-24 16:13:55 +02:00
Chocobo1
bc20cf9ad7 Remove redundant semicolon 2020-11-24 16:13:53 +02:00
Chocobo1
7d3ecfa9a6 Allow adding torrents using "Paste" key sequence
Closes #13685.
2020-11-24 16:13:52 +02:00
NotTsunami
88a90ed7d4 Fix mingw64 build error
mingw64 defines interface, so revert back to previous naming scheme

Fixes: 87864531ab
Closes #13649
2020-11-24 16:13:51 +02:00
jagannatharjun
3e540b3f51 Align integer data to right in torrent content view 2020-11-24 16:13:50 +02:00
jagannatharjun
87e1661bd5 Rename TR_PROGRESS header in TransferList
Closes #13665
2020-11-24 16:13:49 +02:00
Chocobo1
f82a4051af Remove outdated information 2020-11-24 16:13:47 +02:00
Vladimir Golovnev (Glassez)
5730e917a1 Fix torrent state calculation 2020-11-24 16:13:46 +02:00
Vladimir Golovnev (Glassez)
5e7d7c2ef0 Don't resume "paused" torrents when checking by libtorrent 2020-11-24 16:13:45 +02:00
jagannatharjun
2b6e1953d7 Use ProgressbarDelegate for drawing progressbar in PropListDelegate
Also directly provide display data from model rather then generating it in delegate
2020-11-24 16:13:43 +02:00
jagannatharjun
6fc50f4169 Use ProgressBarDelegate for drawing progressbar in TransferListView 2020-11-24 16:13:42 +02:00
jagannatharjun
40d7a53695 Implement ProgressBarDelegate 2020-11-24 16:13:41 +02:00
Chocobo1
7e89893454 Add support for tracker scrape in libtorrent 2.0 2020-11-24 16:13:39 +02:00
Chocobo1
d83f09e731 Migrate away from deprecated functions in libtorrent 2.0 2020-11-24 16:13:38 +02:00
Chocobo1
36575b225d Improve compatibility with libtorrent 2.0
In libtorrent 2.0, the `connection_type` was changed to a flag type and
hence it cannot be used in a switch statement directly. Also our use of
`connection_type` is limited so that a single equality comparison
would cover all of our use cases.
2020-11-24 16:13:36 +02:00
jagannatharjun
fe0ea843e0 Fix crash when clicked outside the table of torrent content view
Closes #13645
2020-11-24 16:13:35 +02:00
FranciscoPombal
a8911f8136 Clarify protocol choice label 2020-11-24 16:13:34 +02:00
FranciscoPombal
c5ef1a0207 Update "GitHub Actions" CI actions versions 2020-11-24 16:13:32 +02:00
brvphoenix
102d628c0a Fix the issue that IPv6 address can't be banned
The ban action doesn't depend on ipfilter.
2020-11-24 16:13:31 +02:00
FranciscoPombal
6ea3acdaea Expose contentPath in WebAPI torrents/info
Bump WebAPI version to 2.6.1
2020-11-24 16:13:30 +02:00
Chocobo1
621578353d Remove redundant checking before remove 2020-11-24 16:13:29 +02:00
Chocobo1
ca776c3036 Fix class name 2020-11-24 16:13:28 +02:00
Chocobo1
9d27eb3b57 Move qHash helper for libtorrent types to its own file 2020-11-24 16:13:26 +02:00
Vladimir Golovnev (Glassez)
9171dffe97 Prevent resume data to be saved for removed torrent 2020-11-24 16:13:25 +02:00
thalieht
f919d4f5bf Fix toggling advanced option in WebUI
option "Disallow connection to peers on privileged ports"
2020-11-24 16:13:24 +02:00
Chocobo1
59afc7c520 Avoid settings being reset via WebAPI
Closes #13585.
2020-11-24 16:13:23 +02:00
Chocobo1
f02b65b866 Fix typos 2020-11-24 16:13:19 +02:00
Andrei Stepanov
891c471160 Fix typo in connection.cpp
limiation -> limitation
2020-11-24 16:13:17 +02:00
Sepro
f49f5ba9a1 Place WebUI RSS description in sandboxed iframe 2020-11-24 16:10:40 +02:00
NotTsunami
539b3b7c3e Remove branches block from Travis config
This block has no significance because these branches are stale and
builds will not be triggered on these branches.
2020-11-24 16:10:39 +02:00
NotTsunami
83ce285138 Disallow CMake build failures on Travis
Our CMake configuration has matured over time, thus require CMake
builds to require successful builds on Travis CI.
2020-11-24 16:10:30 +02:00
sledgehammer999
260e48b705 Correct the Changelog entry 2020-10-22 14:48:11 +03:00
sledgehammer999
f09ee1b398 Bump to 4.3.0.1 2020-10-22 09:29:00 +03:00
sledgehammer999
e3c2266611 Update Changelog 2020-10-22 09:22:54 +03:00
bovirus
53fb6220c5 NSIS: Update Italian translation 2020-10-22 09:21:00 +03:00
sledgehammer999
34e6b73374 Close parentheses in Changelog entry 2020-10-19 01:48:52 +03:00
sledgehammer999
b925cffddb Bump to 4.3.0 2020-10-18 22:41:04 +03:00
sledgehammer999
3595626eff Update Changelog 2020-10-18 22:41:03 +03:00
sledgehammer999
e757b4f8da Sync translations from Transifex and run lupdate 2020-10-18 21:18:33 +03:00
Mike Tzou
1c663adee7 Merge pull request #13465 from WillDaSilva/mid-click-close-tabs
Enable the use of middle-click to close tabs
2020-10-18 12:24:03 +08:00
Vladimir Golovnev
720c1c8216 Merge pull request #13395 from glassez/disk_io
Implement disk IO thread wrapper
2020-10-17 12:53:25 +03:00
Will Da Silva
6e0cf96726 Make middle-click close search tabs 2020-10-17 00:21:10 -04:00
Mike Tzou
152afa71fa Merge pull request #11644 from lbilli/nodata
Don't create 'data' subdirectory on Linux
2020-10-16 09:40:06 +08:00
lbilli
1c7bfcac46 Don't create 'data' subdirectory on Linux 2020-10-15 14:02:28 -04:00
Mike Tzou
5be7b256e9 Merge pull request #13499 from bershanskiy/hashing_threads
Add option for hashing_threads setting
2020-10-14 11:40:01 +08:00
Mike Tzou
84a96505e1 Merge pull request #13500 from Chocobo1/flags
Run svgcleaner on the country flags
2020-10-13 12:15:12 +08:00
Anton Bershanskiy
b4bfdd6f7a Add option for hashing_threads, use 10 asyc IO threads
Add option for setting lt::settings_pack::hashing_threads
introduced by libtorrent 2.0. It has no effect for earlier
libtorrent versions.
Use 10 async IO threads, as per #11461.
Closes #11461.
2020-10-13 00:58:13 +03:00
Mike Tzou
8276b6f468 Merge pull request #13495 from thalieht/peerlistZero
Fix regression of not hiding zero values in the peer list
2020-10-13 03:27:38 +08:00
Chocobo1
63ab911584 Run svgcleaner on the country flags
As a side effect, svgcleaner also fixes the corrupt flags reported in #13497.
Closes #13497.
2020-10-12 10:58:58 +08:00
Chocobo1
da5969d0a6 Sync country flags with upstream 2020-10-12 10:58:11 +08:00
Mike Tzou
726704a7ed Merge pull request #13487 from Chocobo1/creator
Add support for creating v2 torrents
2020-10-12 10:05:50 +08:00
thalieht
9d25405144 Check cheaper conditional first 2020-10-11 20:22:27 +03:00
thalieht
95b452a3e9 Fix regression of not hiding zero values in the peer list
Fixup 13aab6e04d
2020-10-11 20:17:01 +03:00
Chocobo1
19d77b0881 Add support for creating v2 torrents 2020-10-10 23:21:26 +08:00
Mike Tzou
4fa8862398 Merge pull request #13484 from Chocobo1/webui
Fix image not loading under proxy
2020-10-09 16:26:50 +08:00
Vladimir Golovnev
bad5e1f887 Merge pull request #12086 from FranciscoPombal/code-cleanup
Clean ups
2020-10-09 07:13:18 +03:00
Vladimir Golovnev
cf93fe124d Merge pull request #13439 from FranciscoPombal/clazy_fixes_2
Clazy fixes
2020-10-09 07:10:25 +03:00
Vladimir Golovnev
a95c70344d Merge pull request #13480 from FranciscoPombal/fix-ci
Fix packages installation on Ubuntu CI
2020-10-09 07:09:29 +03:00
Chocobo1
611f2de11f Fix wrong capitalization 2020-10-09 00:40:29 +08:00
Chocobo1
744b89c878 Fix image not loading under proxy
Closes #13483.
2020-10-09 00:37:32 +08:00
FranciscoPombal
7d01b6a29c Fix packages installation on Ubuntu CI 2020-10-08 13:55:58 +01:00
FranciscoPombal
2c10b3936b Change some types (uint -> int) in RSS subsystem 2020-10-07 23:26:13 +01:00
FranciscoPombal
deffdbe881 Change some types (uint -> int) in Session class 2020-10-07 23:26:13 +01:00
FranciscoPombal
87864531ab Clean up in Session class 2020-10-07 23:26:13 +01:00
FranciscoPombal
f502f60f7c Avoid unessary QString allocation 2020-10-07 15:34:26 +01:00
FranciscoPombal
776c1f1546 Always use multi-arg arg() overload when possible
Fixed clazy-qstring-arg Clazy warnings
2020-10-07 15:34:26 +01:00
Mike Tzou
bfef403411 Merge pull request #13463 from jagannatharjun/cmake-version
Fix CMake generated qBittorrent's version string
2020-10-05 11:36:14 +08:00
Mike Tzou
8df53e9370 Merge pull request #13468 from jagannatharjun/graph-full
Correctly fill whole width of graph
2020-10-05 11:09:19 +08:00
jagannatharjun
e2c0f00adb Correctly fill whole width of graph 2020-10-03 12:41:18 +05:30
jagannatharjun
8696988d53 Fix CMake generated qBittorrent's version string
${qBittorrent_VERSION} will expand to a string that ends with build number but version string from qMake doesn't end with build number
2020-10-02 23:57:03 +05:30
Mike Tzou
39e8eb0427 Merge pull request #13432 from FranciscoPombal/status_badge
Add workflow status badge for GitHub Actions CI
2020-09-29 10:34:06 +08:00
FranciscoPombal
e3d9fe7e4d Add workflow status badge for GitHub Actions CI 2020-09-28 09:43:19 +01:00
Vladimir Golovnev
eec6637cfa Merge pull request #13456 from glassez/cmake
Fix CMake project
2020-09-28 11:33:59 +03:00
Vladimir Golovnev (Glassez)
3d0543c444 Fix static build with Qt < 5.14 2020-09-28 07:10:49 +03:00
Mike Tzou
79b4fb70f5 Merge pull request #13445 from jagannatharjun/pieces-green
Use toned green color for downloading pieces in Pieces bar
2020-09-28 11:37:03 +08:00
Vladimir Golovnev (Glassez)
aef8f4f465 Set target property before it is used 2020-09-27 22:17:50 +03:00
Mike Tzou
0284721ba2 Merge pull request #13450 from jagannatharjun/cmake-fix
By default use dynamic runtime with MSVC on CMake
2020-09-27 11:28:20 +08:00
jagannatharjun
ebf9a60c69 By default use dynamic runtime with MSVC on CMake
This was default before CMake overhaul, and it doesn't
make sense to use static builds with daily developement.
Also static Qt builds are not readily available on Windows.
2020-09-27 00:03:02 +05:30
jagannatharjun
fbe484a615 Use toned green color for downloading pieces in Pieces bar 2020-09-26 14:53:46 +05:30
Mike Tzou
2bfaa8229a Merge pull request #13431 from Chocobo1/namespace
Fix code defects
2020-09-26 11:20:10 +08:00
Mike Tzou
f62639b70f Merge pull request #13288 from FranciscoPombal/gha-ci
Add GitHub Actions CI workflow
2020-09-25 19:57:27 +08:00
Mike Tzou
6de2435041 Merge pull request #13429 from Chocobo1/travisCI
Fix building in macOS on TravisCI
2020-09-25 19:29:43 +08:00
Chocobo1
ef9765cea1 Remove meaningless const on pointers
This only apply to signals.
2020-09-25 15:13:14 +08:00
Chocobo1
2e37ea608c Migrate away from obsoleted functions 2020-09-25 15:12:40 +08:00
Chocobo1
ac3ab2432a Remove redundant namespace prefix 2020-09-25 15:10:20 +08:00
Chocobo1
f487d32594 Fix initialization order 2020-09-25 12:25:09 +08:00
Chocobo1
e4ffe7aa32 Fix building in macOS on TravisCI 2020-09-25 12:25:09 +08:00
Mike Tzou
1a3091a980 Merge pull request #13419 from silverqx/patch-1
Fix fully-qualified-moc-types clazy warning
2020-09-22 22:34:52 +08:00
Silver Zachara
97df5667e7 Use fully-qualified type names
Fixed fully-qualified-moc-types clazy warnings
2020-09-21 18:30:02 +02:00
FranciscoPombal
eed50c4893 Add GitHub Actions CI workflow
- Ubuntu 18.04/20.04, GUI ON/OFF
- Windows 2019
- macOS 10.15 GUI ON/OFF
2020-09-21 17:13:33 +01:00
Mike Tzou
1b2fc63089 Merge pull request #13412 from Chocobo1/cmake
CMake improvements
2020-09-22 00:02:33 +08:00
Mike Tzou
c3b5668a07 Merge pull request #12577 from NotTsunami/peer
Allow users to configure no_connect_privileged_ports
2020-09-22 00:02:20 +08:00
Chocobo1
da2a26fa01 Use silent flag when invoking lrelease via cmake 2020-09-21 12:16:47 +08:00
Chocobo1
a675b9305b Add compile flags from conf.pri.windows file to cmake 2020-09-21 12:16:47 +08:00
NotTsunami
2eb3ff7f06 Allow users to configure no_connect_privileged_ports
Don't hardcode lt::settings_pack::no_connect_privileged_ports. We
support the peer alert for it already, so connections blocked by this
setting should be logged.
2020-09-20 22:46:28 -04:00
Vladimir Golovnev
04d345251e Merge pull request #13400 from glassez/sequential
Improve sequentialDownload/firstLastPiecePriority handling
2020-09-20 08:00:33 +03:00
Mike Tzou
63ff5e348c Merge pull request #13399 from Chocobo1/cmake
Improvements to cmake build system
2020-09-19 22:12:42 +08:00
Vladimir Golovnev
1333fc81f8 Merge pull request #13402 from FranciscoPombal/cmake_fix
CMake: fix linking against OpenSSL
2020-09-19 07:16:41 +03:00
Vladimir Golovnev
e41ae1457e Merge pull request #13390 from NotTsunami/ban
Prevent peers from being lost when banning
2020-09-19 07:14:50 +03:00
NotTsunami
8d64d38914 Prevent peers from being lost when banning
The selected rows aren't queried until after a user confirms they
would like to ban the selected peers. If a peer disconnects before
the confirmation is pressed, they will not be included in the
selection. This commit makes sure the selected rows are stored before
a selection is made to prevent the loss of any peers.

Closes #13385.
2020-09-18 15:33:17 -04:00
FranciscoPombal
2534909d3b CMake: fix linking against OpenSSL
This should have been there from the start,
but for some reason, the lack of it didn't cause any issued
for many systems.
2020-09-18 17:53:14 +01:00
Vladimir Golovnev (Glassez)
39d32063c1 Implement disk IO thread wrapper 2020-09-18 15:56:29 +03:00
Vladimir Golovnev (Glassez)
ff36356be0 Improve sequentialDownload/firstLastPiecePriority handling
Always store firstLastPiecePriority in resume data.
Don't recalculate firstLastPiecePriority value each time it is accessed.
Always store sequentialDownload in resume data as native libtorrent field.
2020-09-18 13:33:55 +03:00
Chocobo1
0539c816ae Set compression rate for rcc targets
This follows our current setting in src.pro.
2020-09-18 14:49:17 +08:00
Chocobo1
6880e03145 Remove compile requirement for boost::system
boost::system is not a dependency for our project.
2020-09-18 14:48:54 +08:00
Chocobo1
7fed0391ba Don't impose unnecessary compile options on users
This is unexpected for users that take single job compilation as the
default (which is always the case since forever). Users can change the
default if they wish to use multicore for compilation.
2020-09-18 13:58:45 +08:00
Mike Tzou
70d9ea8034 Merge pull request #13388 from Chocobo1/webui
Add missing semicolons in WebUI
2020-09-18 11:56:35 +08:00
Vladimir Golovnev
4099de73ed Merge pull request #13327 from FranciscoPombal/cmake_no_genexp
CMake: overhaul and improve scripts
2020-09-18 05:36:37 +03:00
FranciscoPombal
46123b9989 CMake: overhaul and improve scripts
- Bump minimum required version and
make use of more modern language features
- Rely more on target_...() commands to establish dependency
relationships between targets rather than directory property commands
- Improve libtorrent package discovery
- Enable and handle application features more explicitly
- Improve user-facing output
- Fix various compilation issues on Windows (MSVC and MinGW) and macOS
- Improve handling of translations
- Add explanatory comments where relevant
- Make CMake scripts fully independent of qmake files/details
- Remove old functions/macros
2020-09-17 13:13:26 +01:00
Chocobo1
ccdc3b201b Add missing semicolons
Also trim trailing whitespaces along the way.
2020-09-17 12:11:13 +08:00
Mike Tzou
79bc4f40e8 Merge pull request #13353 from FranciscoPombal/logger_fix
Fix peer blocked message
2020-09-17 11:32:30 +08:00
FranciscoPombal
e0c62827a8 Fix peer blocked message 2020-09-16 16:59:51 +01:00
Mike Tzou
ff82063520 Merge pull request #13366 from qbittorrent/linuxtrayhtml
Don't use HTML in Linux tray tooltip
2020-09-15 12:31:49 +08:00
Mike Tzou
49e55d5a5d Merge pull request #13268 from ngosang/feature/python35-
Update minimum Python version to 3.5.0
2020-09-14 12:03:20 +08:00
Mike Tzou
1e01147c31 Merge pull request #13369 from Chocobo1/msg
Avoid using libtorrent internal functions
2020-09-14 11:40:37 +08:00
thalieht
ede1bd0657 Don't use HTML in Linux tray tooltip
HTML is no longer allowed in Linux tray tooltip's title, only in its subtext.

Closes #13030
2020-09-13 12:43:55 +03:00
Chocobo1
8cfac795c6 Avoid using libtorrent internal functions
`char const* socket_type_name(socket_type_t);` is decided to be not
exported and thus it is internal:
https://github.com/arvidn/libtorrent/pull/4859/files#r452925563
2020-09-13 12:22:31 +08:00
Mike Tzou
8d57a6527b Merge pull request #13355 from Chocobo1/allocate
Enable faster disk space allocation by default
2020-09-12 23:39:49 +08:00
Mike Tzou
2d1855dc05 Merge pull request #13354 from Chocobo1/libt2
Disable deprecated settings in libtorrent 2.0
2020-09-12 11:02:12 +08:00
Chocobo1
01603c1f62 Enable faster disk space allocation by default
In libtorrent > 2.0, the setting is turned off by default, now we just
re-enable it to preserve the behavior as in earlier versions.
2020-09-10 22:12:35 +08:00
Chocobo1
79eb9a4990 Move signal connections to appropriate place 2020-09-10 21:17:46 +08:00
Chocobo1
0bf76723f1 Move enums into anonymous namespace 2020-09-10 21:17:46 +08:00
Chocobo1
2fd69a21b0 Initialize session with session_params class
The old way of initialization is deprecated in libtorrent 2.0.
2020-09-09 16:16:08 +08:00
Chocobo1
554eab50bb Disable deprecated libtorrent settings 2020-09-09 16:16:08 +08:00
Vladimir Golovnev
defdd5121c Merge pull request #13340 from glassez/fix-magnet
Improve adding torrent using Magnet URI
2020-09-09 10:06:39 +03:00
Mike Tzou
c967bf31ff Merge pull request #13336 from Chocobo1/webui
Minor WebUI improvements
2020-09-09 11:48:55 +08:00
Mike Tzou
6e971c47e7 Merge pull request #13319 from an0n666/tracker-queue
Expose libtorrent max_concurrent_http_announces in advanced settings
2020-09-09 11:48:25 +08:00
Vladimir Golovnev (Glassez)
5727fcb001 Store and use full magnet URI instead of hash 2020-09-08 14:57:45 +03:00
Vladimir Golovnev (Glassez)
20206ec92a Improve adding torrent using Magnet URI
Closes #13249.
2020-09-08 14:56:38 +03:00
Chocobo1
5677ce1cc9 Use proper uppercase "UTF-8" in charset field 2020-09-08 14:31:19 +08:00
Chocobo1
2f1016494b Specify UTF-8 charset when forming data from plain text
This suppresses a browser warning about unspecified character encoding
of an HTTP response.
2020-09-08 14:30:55 +08:00
Mike Tzou
8954b21784 Merge pull request #13337 from Chocobo1/libt2
Improve compatibility with libt 2.0
2020-09-08 14:23:47 +08:00
an0n666
73b39a8dec Expose libtorrent max_concurrent_http_announces in advanced settings 2020-09-08 06:05:45 +06:00
Chocobo1
79bb8227d0 Migrate away from deprecated address::to_string(error_code)
The other overload require users to handle exceptions themselves.
2020-09-07 14:48:13 +08:00
Chocobo1
25a47dadeb Migrate away from deprecated address::from_string() 2020-09-07 14:27:18 +08:00
Chocobo1
2a2ae2a566 Add helper function to convert to string from lt::socket_type_t type 2020-09-07 13:48:57 +08:00
Chocobo1
2c01ac4b75 Improve handling of empty iframe src
"about:blank" is suggested in https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
2020-09-07 12:14:11 +08:00
Mike Tzou
84be5ed664 Merge pull request #13328 from FranciscoPombal/fix_geodb
Fix GeoDB download in systems with non-C locales
2020-09-07 10:23:55 +08:00
FranciscoPombal
9b43d260a7 Fix GeoDB download in systems with non-C locales
Closes #13318.
2020-09-05 23:21:05 +01:00
Mike Tzou
1c87073990 Merge pull request #13305 from Chocobo1/openAction
Fix "Open containing folder" opened the wrong path for folder item
2020-09-01 09:38:18 +08:00
Chocobo1
ef6dfa9b54 Fix "Open containing folder" opened the wrong path for folder item
Previously that action is the same as "Open" action which is wrong
behavior, it should be opening the parent folder instead. The wrong
behavior is observed on nautilus 3.36.3 and nemo 4.6.5.
2020-08-30 20:38:35 +08:00
Mike Tzou
3c6e6ae872 Merge pull request #13294 from Chocobo1/openFile
Fix open path won't work correctly
2020-08-30 11:28:46 +08:00
Mike Tzou
cae5c5cea0 Merge pull request #13257 from Sophist-UK/patch-1
Expose LibTorrent peer_turnover settings
2020-08-30 11:28:28 +08:00
Mike Tzou
ffb6189108 Merge pull request #13285 from LoopsGod/command
Add CTRL + I keyboard shortcut to open statistics (command + I on Mac)
2020-08-30 11:27:03 +08:00
Chocobo1
eb1a3e2b29 Fix open path won't work correctly
Previously, if double click on the Size number in torrent content tab
the path would be an incorrect value and as such open path functionality
won't work, this commit fixes it.
2020-08-29 19:59:55 +08:00
Chocobo1
307ca61c86 Code clean up 2020-08-29 19:56:05 +08:00
LoopsGod
7efee615ad Add CTRL + I shortcut to actionStatistics
Mapped the CTRL + I shortcut to open statistics in GUI.
2020-08-26 09:57:44 +02:00
Mike Tzou
4539c679d9 Merge pull request #13256 from jagannatharjun/pieces-style
Use palette colors in pieces bars
2020-08-23 11:26:48 +08:00
jagannatharjun
d73757bf6e Use palette colors in pieces bars 2020-08-22 14:46:37 +05:30
Mike Tzou
e86cef449b Merge pull request #13269 from Chocobo1/webui
Fix seeding time checkbox placement in WebUI
2020-08-20 21:53:51 +08:00
Sophist
4c37c229d9 Expose LibTorrent peer_turnover settings
This PR exposes the LibTorrent Peer Turnover Settings in qBT Advanced Settings in order to allow users to adjust how frequently slow and uninteresting connections are closed to allow potentially better / faster connections to be made.

The default settings are to turnover peers when the number of connections is at least 90% of allowed global or per torrent connections, and to disconnect the least attractive 4% of these connections every 5 minutes.

See https://www.libtorrent.org/reference-Settings.html#peer_turnover
2020-08-19 20:11:58 +01:00
Chocobo1
8869dc543f Fix seeding time checkbox placement in WebUI 2020-08-19 15:55:16 +08:00
Chocobo1
ed2756b885 Convert to the proper type 2020-08-19 15:55:16 +08:00
Chocobo1
f7f0a27d76 Clean up coding style 2020-08-19 15:55:06 +08:00
Chocobo1
b2f951a269 Remove duplicate code 2020-08-19 15:12:55 +08:00
ngosang
71be4f03be Update minimum Python version to 3.5.0 2020-08-18 20:56:39 +02:00
Mike Tzou
207337682c Merge pull request #13265 from Chocobo1/pr_13259
Add a scroll area to torrent creator dialog
2020-08-18 13:10:40 +08:00
Ernesto Castellotti
5c4dfbec39 Add a scroll area to torrent creator dialog
As to prevent the dialog from going out-of-screen on a small monitor.
2020-08-17 20:00:43 +08:00
Mike Tzou
6416c224e3 Merge pull request #13258 from SeproDE/webRssRelativePath
Change api requests in RSS WebUI to relative paths
2020-08-17 07:40:00 +08:00
Sepro
e07c7d57d2 Change api requests in RSS WebUI to relative paths 2020-08-16 06:40:15 +02:00
Mike Tzou
eb32bdab34 Merge pull request #13252 from jagannatharjun/fix-rss-style
Fix incorrect foreground for read articles with custom theme
2020-08-16 12:04:47 +08:00
jagannatharjun
01849297ef Fix incorrect foreground for read articles with custom theme 2020-08-15 01:04:05 +05:30
Vladimir Golovnev
e1d097a92d Merge pull request #13234 from glassez/load-torrent
Improve torrent loading code
2020-08-13 18:58:36 +03:00
Mike Tzou
91b3ec8380 Merge pull request #13246 from jagannatharjun/rss-config
Allow changing RSS article list colors from custom UI theme
2020-08-12 12:34:54 +08:00
jagannatharjun
a63ca5f0c4 Allow changing RSS article list colors from custom UI theme
Use ArticleListWidget own palette to obtain default colors
2020-08-11 19:03:49 +05:30
Vladimir Golovnev (Glassez)
b77568839d Remove legacy/unused torrent property 2020-08-09 12:11:13 +03:00
Vladimir Golovnev (Glassez)
dc3d23c045 Improve torrent loading code 2020-08-09 12:11:07 +03:00
Vladimir Golovnev (Glassez)
eb99bfe20f Remove deprecated and unused code 2020-08-05 08:27:14 +03:00
Mike Tzou
4d1c5a8aea Merge pull request #13226 from jagannatharjun/rss-style
Use palette colors in RSS feeds
2020-08-04 10:47:05 +08:00
Mike Tzou
3a61042e40 Merge pull request #13206 from an0n666/revert-seed-mode-patch
Read piece for torrents added with skip hash only for older libtorrent
2020-08-03 19:56:37 +08:00
jagannatharjun
f1a07d6c43 Use palette colors in RSS feeds 2020-08-03 12:12:18 +05:30
Mike Tzou
8ff4374325 Merge pull request #13220 from jagannatharjun/fix-style
Fix style
2020-08-03 10:51:50 +08:00
an0n666
dc211f69ac Read piece for torrents added with skip hash only for older libtorrent 2020-08-02 16:33:55 +06:00
jagannatharjun
5b4a940842 Load custom theme before initializing main window
Improves debug build startup time with custom themes
2020-08-02 14:02:18 +05:30
jagannatharjun
b323c4e6be Set stylesheet of target widget rather then defining global stylesheet 2020-08-01 01:37:08 +05:30
Mike Tzou
fd200ac31d Merge pull request #13214 from Chocobo1/edit
Disable edit action
2020-07-31 11:29:44 +08:00
Chocobo1
b092fc9abb Disable edit action 2020-07-30 14:31:39 +08:00
Mike Tzou
a2a5c28c9f Merge pull request #13188 from jagannatharjun/fix-speed
Fix impossible speed in graph
2020-07-30 11:20:03 +08:00
jagannatharjun
f1edda2c81 Only enqueue session refresh request once previous request is completed
Fixes impossible speed in graph
2020-07-29 10:00:56 +05:30
Vladimir Golovnev
3a0ec8b283 Merge pull request #13193 from glassez/notify-move-storage
Notify user when torrent moving finished
2020-07-27 15:01:48 +03:00
Mike Tzou
dcef3a68f8 Merge pull request #13156 from jagannatharjun/search-style
Use default delegate for SearchModel
2020-07-26 20:20:40 +08:00
Mike Tzou
30bf14c85f Merge pull request #13157 from jagannatharjun/peer
Use default delegate for PeerListWidget
2020-07-26 20:20:16 +08:00
Vladimir Golovnev (Glassez)
bac7fbc68e Notify user when torrent moving finished 2020-07-26 14:31:58 +03:00
jagannatharjun
00413b0dd1 Use default delegate for SearchModel
Introduce and use data role - SearchFilterModel::UnderlyingDataRole as a filter role in SearchFilterModel

Removes the usage of QItemDelegate
2020-07-26 13:05:54 +05:30
jagannatharjun
13aab6e04d Use default delegate for PeerListWidget
Removes the usage of QItemDelegate
2020-07-26 12:57:57 +05:30
Vladimir Golovnev
2a638d16e0 Merge pull request #13175 from glassez/move-status
Update torrent status on move enqueued
2020-07-23 09:20:47 +03:00
Vladimir Golovnev (Glassez)
c3104e0210 Update torrent status on move enqueued 2020-07-22 15:22:29 +03:00
Vladimir Golovnev
dc7267b600 Merge pull request #13168 from glassez/save-checking
Always allow to save resume data in checking state
2020-07-22 10:14:55 +03:00
Mike Tzou
0defdacbfd Merge pull request #13153 from jagannatharjun/styledelegate-content
Use QStyledItemDelegate for content views
2020-07-22 10:57:42 +08:00
Vladimir Golovnev (Glassez)
d77c6321d3 Always allow to save resume data in checking state 2020-07-21 14:26:31 +03:00
Vladimir Golovnev (Glassez)
f35dbdfb8b Fix crash on exit when compiled using MinGW 2020-07-21 13:56:07 +03:00
Vladimir Golovnev
23eb117a05 Merge pull request #13151 from glassez/move-storage
Improve "move torrent storage" handling
2020-07-20 21:27:27 +03:00
Mike Tzou
9cf2321f02 Merge pull request #13158 from jagannatharjun/scanfolder
Use QStyledItemDelegate as base for ScanFoldersDelegate
2020-07-20 12:38:37 +08:00
Vladimir Golovnev (Glassez)
cdc2b8d79b Improve "move torrent storage" handling 2020-07-19 15:04:42 +03:00
jagannatharjun
8dd92fe612 Use QStyledItemDelegate as base for ScanFoldersDelegate 2020-07-19 00:54:12 +05:30
jagannatharjun
4733cb59e4 Use QStyledItemDelegate for content views 2020-07-18 13:30:26 +05:30
Mike Tzou
8eecfb1bee Merge pull request #13145 from jagannatharjun/cmake-speed
CMake improvements
2020-07-18 12:19:40 +08:00
jagannatharjun
d355491b85 Use default warning level with MSVC in CMake
Previously used warning level 4 creates a lot of noise that largely come from Qt headers
2020-07-17 14:41:48 +05:30
jagannatharjun
c7da78ff1d Fix invalid comparison for Boost version in CMake
This reduces compile time more then half when compiled against Boost
version greater than 1.60
2020-07-17 14:00:39 +05:30
Vladimir Golovnev
3cf8626317 Merge pull request #13110 from FranciscoPombal/countries-resolution
Remove DISABLE_COUNTRIES_RESOLUTION define
2020-07-09 08:30:12 +03:00
Vladimir Golovnev
fd74e83dd1 Merge pull request #13109 from FranciscoPombal/fix-encoding
Change Windows resource file encoding to UTF-8
2020-07-08 16:05:14 +03:00
FranciscoPombal
8f8f7ebd15 Remove DISABLE_COUNTRIES_RESOLUTION define 2020-07-08 01:07:50 +01:00
FranciscoPombal
b7dc1ef48d Change Windows resource file encoding to UTF-8 2020-07-06 11:41:47 +01:00
Mike Tzou
83f1028ff7 Merge pull request #13099 from jagannatharjun/fix-log
Use delegate provided rect for textRect in LogItemDelegate
2020-07-05 10:51:35 +08:00
Mike Tzou
291977a0e5 Merge pull request #13098 from jagannatharjun/fix-transfer-progress
Use global style options for drawing progress in TransferList
2020-07-05 10:51:00 +08:00
jagannatharjun
952dc26514 Use delegate provided rect for textRect in LogItemDelegate
Previously we get textRect from QStyle but on some OS this returns invalid rect
2020-07-04 15:49:21 +05:30
jagannatharjun
332dd027af Use global style options for drawing progress in TransferList 2020-07-04 10:36:54 +05:30
Mike Tzou
778f1f4b6f Merge pull request #13097 from brvphoenix/fix-webui-api
WebUI: fix the url for banPeers method
2020-07-04 12:04:10 +08:00
brvphoenix
4d9c6b9f02 WebUI: fix the url for banPeers method 2020-07-03 01:17:06 -07:00
Mike Tzou
ca8654d380 Merge pull request #13068 from Chocobo1/libt
Bump requirement to libtorrent 1.2
2020-06-27 12:52:13 +08:00
Chocobo1
8ebb6dc559 Initialize variable at better place 2020-06-26 17:17:29 +08:00
Chocobo1
40e432b127 Bump requirement to libtorrent 1.2
Closes #12258.
2020-06-26 17:17:29 +08:00
Vladimir Golovnev
06e1b07274 Merge pull request #13042 from FranciscoPombal/fix_request_parser
Fix truncation when parsing HTTP request query
2020-06-24 11:15:54 +03:00
Mike Tzou
929dc2e2b3 Merge pull request #13055 from brvphoenix/fix-cross-compile
Improve qmake configuration file for cross compilation
2020-06-23 18:47:26 +08:00
FranciscoPombal
a1809a43f8 Add QT_NO_CAST_FROM_BYTEARRAY to compile definitions
Prevents bugs like #13029, even if the ternary expression operands
have different types.
2020-06-23 11:45:38 +01:00
FranciscoPombal
0fa7fca31e Fix truncation when parsing HTTP request query
Closes #13029.

Fixes an issue with truncation of a QByteArray at the first '\0' byte
when parsing HTTP request query strings.

Previously, the operands of the ternary expression were of
different types. Most likely this was leading to a conversion
of the result to some kind of '\0'-terminated string type somewhere
along the way, in turn causing its truncation at the first '\0' byte
once converted back to QByteArray.

For some reason this bug was only present on Windows (MSVC).
2020-06-23 11:45:30 +01:00
brvphoenix
05bd0e5570 Improve qmake configuration file for cross compilation 2020-06-22 23:21:29 -07:00
Vladimir Golovnev
602e6b5263 Merge pull request #13040 from glassez/fix-rss
Fix RSS article is not marked as "read" when torrent is downloaded
2020-06-20 05:49:09 +03:00
Vladimir Golovnev (Glassez)
b4f65ca080 Don't modify source URL when wait for download status 2020-06-19 12:16:31 +03:00
Vladimir Golovnev (Glassez)
1e86c76e8a Emit signal when redirected to Magnet 2020-06-19 12:15:15 +03:00
Vladimir Golovnev
9dfeeb9e81 Merge pull request #12994 from glassez/custom-storage
Find complete files when moving torrent storage
2020-06-14 10:19:46 +03:00
Mike Tzou
59f365b343 Merge pull request #13006 from SeproDE/webui-rss-fixes
Fix issues regarding WebUI RSS implementation
2020-06-14 12:17:12 +08:00
Sepro
d1c084e3b0 Remove redundant empty value tags on inputs in WebUI 2020-06-13 00:40:47 +02:00
Sepro
04c8c4e846 Add newRule and removeRule buttons to RSS downloader WebUI
New buttons for the basic actions instead of only relying on the context menu.
2020-06-13 00:40:42 +02:00
Sepro
23a2675665 Fix input overlap off RSS downloader WebUI
The text input's in the RSS downloader window where not correctly inside their bounding box.
2020-06-12 13:23:53 +02:00
Sepro
65636e644f Remove maxlength limit from RSS feeds in WebUI
URL's and feed names including paths could be longer then 100 characters, so the limit was removed.
2020-06-12 13:20:50 +02:00
Vladimir Golovnev (Glassez)
b28436c871 Find complete files when moving torrent storage 2020-06-12 12:58:17 +03:00
Vladimir Golovnev
e7622d2e9b Merge pull request #12820 from glassez/drop-unwanted
Drop ".unwanted folder" feature
2020-06-12 12:17:35 +03:00
Vladimir Golovnev (Glassez)
6a0a78f3f7 Drop ".unwanted folder" feature 2020-06-10 11:35:09 +03:00
Mike Tzou
17205802ec Merge pull request #12557 from SeproDE/webui-rss
Implemented RSS reader and auto downloader in reference WebUI
2020-06-09 14:34:56 +08:00
Mike Tzou
5ebe4e4c70 Merge pull request #12956 from arvidn/storage-include
Correct libtorrent header include in torrentcreatorthread.cpp
2020-06-07 20:17:59 +08:00
Mike Tzou
96f9a657f1 Merge pull request #12978 from arvidn/plugin-lt2-compat
support changes to plugin API in libtorrent-2.0
2020-06-07 11:39:08 +08:00
arvidn
d2cc01f65c Support changes to plugin API in libtorrent-2.0
libtorrent-2.0 introduced a type-safe alternative to void* (lt::client_data_t)
for passing user-data into plugins. qBT doesn't use any user data in its
plugins, but the signatures have changed nevertheless, and qBT need to update to
be compatible with libtorrent-2.0.
2020-06-06 10:58:07 +02:00
Mike Tzou
7668d7947a Merge pull request #12969 from Chocobo1/qt5
Don't use functions deprecated in Qt 5.15
2020-06-06 12:52:23 +08:00
arvidn
af05990bc9 Fix libtorrent include to a more precise header
torrentcreatorthread.cpp does not need to include libtorrent/storage.hpp, but
just needs libtorrent/file_storage.hpp. The former header is for implementing a
custom storage. Change include to libtorrent/file_storage.hpp
2020-06-05 23:48:08 +02:00
Chocobo1
a1ea7a111e Don't use deprecated QProcess::startDetached() overload 2020-06-04 20:20:50 +08:00
Chocobo1
15b2811fa5 Don't use deprecated QUrl::topLevelDomain() 2020-06-04 20:20:50 +08:00
Chocobo1
547982c741 Don't use deprecated QButtonGroup::buttonClicked() 2020-06-04 20:20:50 +08:00
Chocobo1
2fd4381398 Don't use QWheelEvent deprecated functions 2020-06-04 20:20:50 +08:00
Chocobo1
4971cb9a27 Don't use deprecated QAbstractSocket::error() 2020-06-04 20:20:50 +08:00
Chocobo1
9c330812cc Don't use deprecated QSet::iterator::operator+(int) 2020-06-04 20:20:50 +08:00
Chocobo1
c239568658 Don't use deprecated QTextStreamFunctions::flush()
Qt doc states: "If QTextStream operates on a string, this function does
nothing". So remove it.
2020-06-04 15:29:32 +08:00
Mike Tzou
4a98341038 Merge pull request #12964 from thalieht/webuiwatchdefault
Preselect "Default save path" in WebUI watched folders
2020-06-03 09:22:24 +08:00
Mike Tzou
820ffcd238 Merge pull request #12963 from shaneallgeier/patch-1
Fix typo in systemd service file
2020-06-03 02:00:53 +08:00
thalieht
7076fc29e0 Preselect "Default save path" in WebUI watched folders 2020-06-02 16:45:25 +03:00
Shane Allgeier
5ff1653c8c Fix typo in systemd service file 2020-06-01 16:37:17 -05:00
Mike Tzou
9aad574e1a Merge pull request #12949 from jagannatharjun/fix-big
Fix large strings not visible in log widget
2020-06-01 19:59:43 +08:00
jagannatharjun
8267898655 Fix large strings not visible in log widget 2020-05-31 15:37:33 +05:30
Mike Tzou
788d2729db Merge pull request #12877 from an0n666/private-torrents
Address some issues regarding private torrents
2020-05-30 19:29:02 +08:00
Mike Tzou
6b6d2cab5b Merge pull request #12891 from jagannatharjun/cache-icons
Cache flag icons
2020-05-30 13:36:52 +08:00
Mike Tzou
f52fe121f8 Merge pull request #12941 from Chocobo1/flags
Sync flag icons with upstream
2020-05-30 12:36:49 +08:00
Mike Tzou
9d135441db Merge pull request #12942 from Chocobo1/cacheCountry
Cache country lookup result in PeerInfo class
2020-05-30 12:36:15 +08:00
jagannatharjun
bcf11cf1e8 Cache flag icons 2020-05-29 17:55:12 +05:30
Vladimir Golovnev
68d4dc34db Merge pull request #12944 from glassez/hotfix
Fix invalid assertion
2020-05-29 12:20:32 +03:00
Vladimir Golovnev (Glassez)
a6ad95278c Fix invalid assertion
Closes #12938.
2020-05-29 09:35:19 +03:00
Chocobo1
472dd96716 Cache country lookup result in PeerInfo class
The country lookup happens quite often when "Resolve peer countries"
option is enabled.
2020-05-29 13:49:52 +08:00
Chocobo1
5248a95055 Sync flag icons with upstream
Upstream commit: 5cf339a36cf64f65882702e1d40359d38485126c.
2020-05-29 13:29:23 +08:00
Vladimir Golovnev
c003a12f1f Merge pull request #12884 from glassez/custom-storage
Find complete files when checking torrent
2020-05-26 19:00:37 +03:00
Mike Tzou
446d308bf0 Merge pull request #12916 from mr-cn/master
WebUI: Fix wrong file renaming selection range
2020-05-26 22:15:28 +08:00
MR
af6cae0e09 WebUI: Fix wrong file renaming selection range 2020-05-26 16:38:54 +08:00
an0n666
6d85ae8f62 Address some issues regarding private torrents 2020-05-26 14:18:15 +06:00
Vladimir Golovnev (Glassez)
f4efa530dc Create header for common BitTorrent declarations 2020-05-25 20:32:35 +03:00
Vladimir Golovnev (Glassez)
4a1e3de06d Find complete files when checking torrent 2020-05-25 20:31:59 +03:00
Vladimir Golovnev
b44816305f Merge pull request #12418 from FranciscoPombal/improve_win_conf_pri
Improve Windows qmake build configuration files
2020-05-25 14:23:13 +03:00
Mike Tzou
9aba0cbcf3 Merge pull request #12894 from Chocobo1/thememanager
Improvements to UIThemeManager
2020-05-25 12:16:39 +08:00
Mike Tzou
1c1c82ce4f Merge pull request #12893 from Chocobo1/icon
Move qbittorrent32.png to WebUI images folder
2020-05-25 12:16:10 +08:00
Chocobo1
ba2db3f139 Avoid overuse of QStringLiteral
This code path doesn't look like frequently used.
2020-05-24 13:13:55 +08:00
Chocobo1
99a1802dbb Make class variable const 2020-05-24 13:13:55 +08:00
Chocobo1
00eb61543d Make the icon cache a class variable 2020-05-24 13:13:32 +08:00
Chocobo1
f98d2cb01b Ditch svgo config file
svgcleaner is a better tool for this job.
2020-05-23 20:54:02 +08:00
Chocobo1
2319bdd23b Move qbittorrent32.png to WebUI images folder 2020-05-23 20:53:32 +08:00
Mike Tzou
35a3265657 Merge pull request #12861 from jagannatharjun/style-icons
Allow changing GUI icons from theme bundles
2020-05-23 20:31:09 +08:00
Sepro
2b3c92a4a8 WebUI: Add RSS functionality
Implemented RSS Reader and AutoDownloader in reference WebUI.
2020-05-22 14:21:45 +02:00
jagannatharjun
3c733ddf0c Allow changing GUI icons from theme bundles 2020-05-22 11:06:22 +05:30
jagannatharjun
43319f2213 Always use UIThemeManager for obtaining icons in GUI 2020-05-22 11:06:10 +05:30
Vladimir Golovnev
a1faef0a3c Merge pull request #12874 from jagannatharjun/fix-compile
Fix compilation error with MSVC 16.6
2020-05-21 13:50:26 +03:00
Mike Tzou
de85b8b552 Merge pull request #12859 from Chocobo1/gif
Move WebUI icons to its own folder
2020-05-21 10:59:52 +08:00
jagannatharjun
971a21f306 Add missing header stdexcept in fspathedit
Fixes compilation error with MSVC 16.6
2020-05-20 23:25:19 +05:30
Mike Tzou
c85d2e547b Merge pull request #12835 from Piccirello/web-content-type
Specify Content-Type in Web API error responses
2020-05-20 14:05:20 +08:00
Thomas Piccirello
6e4f49fc57 Always specify Content-Type in Web API error responses 2020-05-19 01:08:06 -07:00
Chocobo1
e6f0c81355 Remove unused WebUI images 2020-05-19 15:09:44 +08:00
Chocobo1
02c25dbe2a Move WebUI icons to its own folder
After this change: "http://<server>/icons" will point to "src/icons"
folder and "http://<server>/images" points to the real "images" folder
in the relative path.
2020-05-19 14:58:49 +08:00
Vladimir Golovnev
dde7421f59 Merge pull request #12848 from jagannatharjun/move-icons
Move all icon resources in icons folder root
2020-05-19 07:39:55 +03:00
FranciscoPombal
c77f3ef8d3 Improve Windows qmake build configuration files 2020-05-18 18:21:29 +01:00
jagannatharjun
ab91d546e5 Move all icon resources to icon folder root 2020-05-18 20:30:51 +05:30
Mike Tzou
774c0276f0 Merge pull request #12847 from Chocobo1/deprecated
Don't use deprecated Qt function options
2020-05-18 11:41:11 +08:00
Chocobo1
328eb5b5cc Provide a proper default return statement for the function 2020-05-16 21:48:10 +08:00
Chocobo1
21e1c33d15 Don't use deprecated QPainter option
Warning from compiler:
speedplotview.cpp:342:63: warning: ‘QPainter::HighQualityAntialiasing’ is deprecated: Use Antialiasing instead [-Wdeprecated-declarations]
2020-05-16 21:23:45 +08:00
Chocobo1
7c8846fc53 Don't use deprecated QRegularExpression option
The following is the warning from compiler:
rss_item.cpp:70:79: warning: ‘QRegularExpression::OptimizeOnFirstUsageOption’ is deprecated: This option does not have any effect since Qt 5.12 [-Wdeprecated-declarations]
2020-05-16 21:05:15 +08:00
Vladimir Golovnev
306499f7a8 Merge pull request #12843 from glassez/fix-rename-rule
Fix renaming RSS autodownload rule
2020-05-15 21:40:23 +03:00
Vladimir Golovnev (Glassez)
1b5dd0aa2d Fix renaming RSS autodownload rule 2020-05-15 09:41:40 +03:00
Mike Tzou
5470ae8c1a Merge pull request #12837 from Piccirello/webui-textarea-enter
Fix Enter button behavior in web UI textarea
2020-05-14 22:11:31 +08:00
Mike Tzou
7f6279819d Merge pull request #12828 from thalieht/rootfolder
Disable "Keep top-level folder" checkbox if torrent doesn't have root folder
2020-05-14 22:10:39 +08:00
Tom Piccirello
ecc17018b7 Fix Enter button behavior in web UI textarea
Hitting the enter button inside the textarea would submit the form, rather than advancing to the next line.
2020-05-14 03:25:11 -07:00
thalieht
e2a8fe0dce Disable checkbox if torrent doesn't have root folder 2020-05-13 13:35:13 +03:00
Vladimir Golovnev
841536c9c5 Merge pull request #12805 from glassez/move-storage
Wait for storage to be moved when removing torrent
2020-05-12 07:34:45 +03:00
Mike Tzou
e015710ffd Merge pull request #12793 from Chocobo1/prebuilt_headers
Prebuild HTTP headers
2020-05-12 10:13:35 +08:00
Mike Tzou
1839e3d96a Merge pull request #12748 from Piccirello/webui_sidebar_trackers
Add Trackers section to Web UI sidebar
2020-05-12 10:13:06 +08:00
Chocobo1
be152f45c9 Define and use Http::HeaderMap type 2020-05-11 00:34:28 +08:00
Mike Tzou
e72fe83c36 Merge pull request #12750 from an0n666/nsis-install
NSIS: Change confusing un-installation question
2020-05-10 23:52:35 +08:00
Vladimir Golovnev (Glassez)
53fd0e1607 Wait for storage to be moved when removing torrent 2020-05-10 14:31:33 +03:00
an0n666
a87b72e0cb NSIS: Change the installers uninstallation question to clear confusion 2020-05-10 13:15:32 +06:00
Vladimir Golovnev
f0967be79d Merge pull request #12790 from FranciscoPombal/hotfix_include
Fix include
2020-05-10 08:19:45 +03:00
Chocobo1
d57b9be706 Rename function 2020-05-10 02:53:32 +08:00
Chocobo1
74a2168bc1 Define and use a proper HTTP header structure 2020-05-10 02:53:11 +08:00
Chocobo1
957d697aee Prebuild HTTP headers as much as possible
This avoids some branching when building a HTTP response.
2020-05-10 02:50:13 +08:00
FranciscoPombal
2192de5233 Fix include 2020-05-09 17:36:37 +01:00
Vladimir Golovnev (Glassez)
378a863611 Remove unwanted files after torrent removed 2020-05-09 19:19:13 +03:00
Vladimir Golovnev (Glassez)
e49c554044 Improve "move torrent storage" queue 2020-05-09 19:19:13 +03:00
Vladimir Golovnev (Glassez)
b6bf09fc0f Fix calculation of torrent current state
Some actions can be performed despite of other states
(e.g. "Errored" torrent can check its files currently)
so the states that relate to such actions should override
other (so-called "static") states.
2020-05-09 19:19:13 +03:00
Vladimir Golovnev
18b2511238 Merge pull request #12779 from glassez/cleanup
Clean up source files layout
2020-05-09 06:52:19 +03:00
Vladimir Golovnev (Glassez)
a8c333ff25 Drop "private" subfolders
"private" subfolders violate the structure of the project,
since the existence of all other subfolders is based on a
different principle.
In addition, there is no clear line between "private" and
"non private".
2020-05-08 14:59:18 +03:00
Thomas Piccirello
ad4d8d28ec Add Trackers section to Web UI sidebar
Closes #7601.
2020-05-07 19:10:55 -07:00
Mike Tzou
1917064bde Merge pull request #12755 from jagannatharjun/transferlist-colors
Read Transfer list's custom colors from config.json
2020-05-07 12:34:28 +08:00
jagannatharjun
77658be9a7 Read Transfer list's custom colors from config.json 2020-05-06 16:37:37 +05:30
Vladimir Golovnev
fb7774705d Merge pull request #12756 from jagannatharjun/log-colors
Allow changing log colors from config.json
2020-05-06 06:49:28 +03:00
jagannatharjun
cce8f178e4 Allow changing log colors from config.json 2020-05-05 18:53:31 +05:30
Mike Tzou
2c100feb35 Merge pull request #11618 from jagannatharjun/align
Align Properties Tabbar in center
2020-05-05 13:10:53 +08:00
Mike Tzou
5b36706a71 Merge pull request #12719 from jagannatharjun/json-colors
Allow setting application palette from config.json
2020-05-05 12:37:09 +08:00
Mike Tzou
991a064002 Merge pull request #12705 from Piccirello/webui_search_categories
Fix Web UI search categories only working in English
2020-05-05 12:35:20 +08:00
jagannatharjun
afbe55d004 Allow setting application palette from config.json 2020-05-04 18:37:58 +05:30
Thomas Piccirello
84a40c1665 Include trackers in /sync/maindata API endpoint 2020-05-04 00:11:45 -07:00
jagannatharjun
6f38a86d9a Align Properties Tabbar in center 2020-05-04 11:25:37 +05:30
Mike Tzou
ccb9cc632e Merge pull request #12736 from Piccirello/webui_small_screen
Shrink Web UI search bar on small screens
2020-05-04 13:36:15 +08:00
Vladimir Golovnev
2d1d1ba26a Merge pull request #12734 from glassez/project-cleanup
Cleanup project configuration
2020-05-03 16:37:36 +03:00
Thomas Piccirello
92ed5c76f3 Bump Web API version 2020-05-03 02:23:22 -07:00
Thomas Piccirello
8e8cd59d90 Fix Web UI search categories only working in English
Closes #10239.
2020-05-03 02:23:22 -07:00
Vladimir Golovnev (Glassez)
c40da7a5dd CMake: Fix header inclusion in autogenerated files 2020-05-03 10:27:24 +03:00
Mike Tzou
8999f1a8da Merge pull request #12735 from Kolcha/include
Clean up header inclusion
2020-05-03 12:08:48 +08:00
Thomas Piccirello
cb8a9518d1 Shrink Web UI search bar on small screens 2020-05-02 15:45:57 -07:00
Vladimir Golovnev (Glassez)
a22f921941 CMake: Fix optional features handling 2020-05-02 20:59:26 +03:00
Nick Korotysh
c97e4f105f Clean up header inclusion 2020-05-02 19:54:36 +03:00
Vladimir Golovnev (Glassez)
bc05f3f76b CMake: Fix typo 2020-05-02 17:56:21 +03:00
Vladimir Golovnev (Glassez)
eeae308c29 CMake: Don't use subprojects in GUI subfolders 2020-05-02 17:21:03 +03:00
Vladimir Golovnev (Glassez)
ace8a093d2 QMake: Include all GUI sources in "gui.pri" 2020-05-02 17:20:43 +03:00
Vladimir Golovnev
4e7ff88cf4 Merge pull request #12718 from glassez/improve-cmake
Improve CMake project
2020-05-02 08:54:25 +03:00
Vladimir Golovnev
1cd76cd8ba Merge pull request #12707 from FranciscoPombal/fix_travis
Use latest CMake on TravisCI
2020-05-02 08:53:00 +03:00
Mike Tzou
8110912e4e Merge pull request #12706 from Piccirello/webui_search_small_screen
Hide additional Web UI search filters on small screens
2020-05-02 11:53:08 +08:00
Mike Tzou
02c6afd769 Merge pull request #12711 from Kolcha/tooltip
Show tooltip for torrent name in transfer list
2020-05-02 11:51:16 +08:00
FranciscoPombal
22f16881fe Use latest CMake on TravisCI 2020-05-01 15:44:19 +01:00
Vladimir Golovnev (Glassez)
ad0ee0cd36 CMake: Enable/disable GUI application via option 2020-05-01 17:03:01 +03:00
Vladimir Golovnev (Glassez)
fb42434946 CMake: Put executable into top-level directory 2020-05-01 17:03:01 +03:00
Vladimir Golovnev (Glassez)
642bf7b8a6 CMake: Don't split GUI code into several libraries 2020-05-01 17:03:00 +03:00
Vladimir Golovnev (Glassez)
4a2d25b03b Clean up header inclusion 2020-05-01 17:02:49 +03:00
Nick Korotysh
1fd4ff5c2c Show tooltip for some properties in transfer list
Tooltip is added for next columns:
- name
- status
- category
- tags
- tracker
- save path

closes #12696
2020-05-01 13:08:09 +03:00
Mike Tzou
2aa80fe9ba Merge pull request #12689 from thalieht/subfolder
Rename "Create subfolder" option to "Keep subfolder"
2020-05-01 14:09:17 +08:00
Vladimir Golovnev
7ca0592694 Merge pull request #12684 from an0n666/requires-restart
Remove "requires restart" from network interface settings
2020-05-01 07:38:36 +03:00
Thomas Piccirello
d5b8399a01 Hide additional Web UI search filters on small screens
Closes #11386.
2020-04-30 17:14:47 -07:00
Mike Tzou
93e1e063b2 Merge pull request #12692 from Chocobo1/cleanup
Handle empty piece range properly
2020-04-30 21:15:10 +08:00
Chocobo1
5ca26516eb Handle empty piece range properly
Related: #12677.
2020-04-30 13:18:57 +08:00
Chocobo1
f6eb341b32 Clean up code 2020-04-30 13:18:24 +08:00
Mike Tzou
4f820163ff Merge pull request #12691 from Chocobo1/iterator
Support range-based iteration in IndexRange class
2020-04-30 13:10:13 +08:00
Mike Tzou
7061242681 Merge pull request #12176 from NotTsunami/ssl
Add HTTPS tracker certificate validation option
2020-04-30 13:09:31 +08:00
Vladimir Golovnev
5a78bcef99 Merge pull request #12480 from FranciscoPombal/cmake_force_cpp14
CMake: Enforce minimum C++ mode support
2020-04-30 07:42:40 +03:00
Chocobo1
ddb9dfe185 Disable copy construction of QObject subclasses 2020-04-29 21:40:50 +08:00
Chocobo1
6d167e9a28 Remove const from class variables
It prohibits copy construction, copy assignment and move semantics.
2020-04-29 21:32:34 +08:00
Chocobo1
21581141f6 Support range-based iteration in IndexRange class 2020-04-29 21:15:24 +08:00
an0n666
1d3bb705c8 Remove "requires restart" from network interface settings
Network interface changes are applied on the fly. A restart is not required.
2020-04-29 12:42:49 +06:00
Mike Tzou
35a4643824 Merge pull request #12637 from RockyTDR/master
NSIS: Updated Dutch translation
2020-04-29 12:42:25 +08:00
thalieht
1bdffe1729 Rename "Create subfolder" to "Keep top-level folder"
Closes #12673
2020-04-29 03:09:38 +03:00
Thomas De Rocker
e5be05584e NSIS: Update Dutch translation 2020-04-28 19:27:10 +03:00
sledgehammer999
02434129f6 Use latest cmake on TravisCI 2020-04-28 15:50:16 +01:00
FranciscoPombal
d593d6baa1 CMake: Enforce minimum C++ mode support 2020-04-28 15:50:16 +01:00
FranciscoPombal
f63e70b449 Bump minimum required CMake version to 3.16 2020-04-28 14:15:40 +01:00
sledgehammer999
1db90e1fb6 Merge pull request #12680 from sledgehammer999/travis-bionic
Switch TravisCI to bionic
2020-04-28 15:00:54 +03:00
sledgehammer999
d7d60ab78d Switch TravisCI to bionic 2020-04-28 14:07:57 +03:00
Mike Tzou
6dcb0665ca Merge pull request #12655 from Chocobo1/delete
Improve behavior of deleting torrents in transfer list
2020-04-28 11:14:49 +08:00
Mike Tzou
725c836a26 Merge pull request #12659 from adem4ik/patch-1
Fix typo in optionsdialog.cpp
2020-04-27 12:35:50 +08:00
Chocobo1
7ce83599b4 Improve behavior of deleting torrents in transfer list
Avoids accessing invalid pointers.
Closes #12584.
2020-04-27 02:03:19 +08:00
Andrei Stepanov
159f93e051 Fix typo in optionsdialog.cpp
qBittorent -> qBittorrent
2020-04-26 20:59:42 +04:00
Chocobo1
4e961845cf Clean up variable initialization order 2020-04-26 10:21:23 +08:00
sledgehammer999
e786481655 TravisCI: Update libtorrent RC_1_2 brew bottle
Is is built with deprecated functions disabled.
2020-04-25 05:41:19 +03:00
sledgehammer999
480e732694 Bump Web API version 2020-04-25 00:20:15 +03:00
sledgehammer999
13a96407b3 Sync translations from Transifex and run lupdate 2020-04-25 00:11:21 +03:00
Mike Tzou
7bc572afb9 Merge pull request #12602 from Chocobo1/metatype 2020-04-24 22:13:27 +08:00
Vladimir Golovnev
c10318b576 Merge pull request #12549 from SeproDE/rss-api
Expand RSS related WebAPI
2020-04-24 07:46:37 +03:00
Vladimir Golovnev
4b897e7702 Merge pull request #12603 from glassez/fix-crash
Fix crash when torrent is deleted on limit reached
2020-04-24 07:45:35 +03:00
Mike Tzou
708b9b9c1b Merge pull request #12579 from Chocobo1/headers
Add ability to send custom HTTP headers
2020-04-24 12:39:18 +08:00
Mike Tzou
78cc0752a8 Merge pull request #12598 from schnurlos/patch-7
NSIS: Update german translation
2020-04-24 12:38:48 +08:00
Vladimir Golovnev (Glassez)
22bda12d6c Fix crash when torrent is deleted on limit reached 2020-04-23 16:56:53 +03:00
Chocobo1
9efd5eaed3 Register datatype properly
Qt 5.9.5 doesn't seem to recognize it, this patch fixes it.
Fix up: d8401c76f5.
Related: #12601.
2020-04-23 21:42:51 +08:00
Chocobo1
2729c0cb6d Suppress misleading warning message
QString::split() was giving a non-empty QStringList, and
that caused Session::setBannedIPs() to emit misleading warning message.
2020-04-23 21:01:33 +08:00
schnurlos
a1766d25af NSIS: Update german translation 2020-04-23 13:18:14 +02:00
Chocobo1
bb80b378c1 Add ability to send custom HTTP headers 2020-04-23 12:13:01 +08:00
NotTsunami
cc1ebbf379 Add HTTPS tracker certificate validation option
This commit adds a new libtorrent setting to validate HTTPS tracker
certificates. When enabled, libtorrent will validate the certificate
of HTTPS trackers against the system's certificate store. This option
is only enabled on libtorrent versions >= 1.2.6 and on non-Windows
systems, as OpenSSL does not use the system's certificate store on
Windows.
2020-04-22 15:50:17 -04:00
Sepro
98bb63b390 WebAPI: Change delimiter from string to char in preferences API 2020-04-22 19:14:06 +02:00
Sepro
a3b58e59da 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-22 19:13:17 +02:00
sledgehammer999
f1d02c6aee Sync translations from Transifex and run lupdate 2020-04-22 18:44:30 +03:00
sledgehammer999
f758b24486 Merge pull request #12487 from an0n666/no-localhost-on-invalid
Use configured net interface even when it is missing
2020-04-22 17:49:08 +03:00
Mike Tzou
5cfec83385 Merge pull request #12568 from NotTsunami/upnp-fix
WebUI: Fix UPnP lease duration get/set
2020-04-22 02:01:08 +08:00
Mike Tzou
188f82d3be Merge pull request #12567 from Chocobo1/icon
Reduce ambiguity for selecting icons
2020-04-22 01:58:15 +08:00
an0n666
e3e5da7a71 Use configured net interface even when it is missing 2020-04-21 19:04:43 +06:00
NotTsunami
075633cc40 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-21 01:36:13 -04:00
Chocobo1
f915241bcb Reduce ambiguity for selecting icons
Related: #12554.
2020-04-21 12:35:08 +08:00
Mike Tzou
8ed63d69de Merge pull request #12528 from thalieht/proxycheckbox
Don't uncheck Authentication checkbox when changing proxy type
2020-04-21 01:28:21 +08:00
sledgehammer999
48c1ad8059 Merge pull request #12486 from MaddTheSane/patch-1
Update Info.plist
2020-04-20 01:12:29 +03:00
thalieht
5d16379941 Don't uncheck Authentication checkbox when changing proxy type
Closes #12525
2020-04-19 21:28:21 +03:00
Mike Tzou
e05ef12e68 Merge pull request #12544 from Chocobo1/final
Add final specifier to GUI classes
2020-04-20 00:33:47 +08:00
Mike Tzou
0d849339da Merge pull request #12545 from Chocobo1/padding
Reduce padding in class
2020-04-20 00:33:31 +08:00
Chocobo1
1b80890696 Reduce padding in class
TorrentHandleImpl size is reduced from 768 bytes to 736 bytes.
CreateTorrentParams size didn't change.
Size numbers are from x64.
2020-04-19 11:44:41 +08:00
Chocobo1
ac2d063add Move initialization default values to header 2020-04-19 11:42:49 +08:00
Chocobo1
16a76eee9f Add final specifier to GUI classes
Follow up d3d3f7dbb3.
2020-04-19 10:59:59 +08:00
Mike Tzou
30ce2dfdf3 Merge pull request #12530 from Chocobo1/logger
Reduce padding in structure
2020-04-19 10:17:18 +08:00
Mike Tzou
b06d44b242 Merge pull request #12526 from Chocobo1/pr_12162
Change default upload slot choking limits
2020-04-19 10:17:04 +08:00
Mike Tzou
349a07a443 Merge pull request #12531 from Chocobo1/final
Add final specifier to classes
2020-04-19 10:16:44 +08:00
Mike Tzou
f5ab14c2f0 Merge pull request #12538 from sledgehammer999/travis_deprecated_disabled
TravisCI: Use libtorrent with deprecated functions disabled for Linux builds
2020-04-19 10:03:13 +08:00
sledgehammer999
a17b1f2b78 Use static_cast for explicit type conversions 2020-04-18 18:22:40 +03:00
sledgehammer999
d69ce4f1cf TravisCI: Use libtorrent with deprecated functions disabled for Linux builds 2020-04-18 16:13:02 +03:00
Chocobo1
648d44d9b9 Reduce padding in structure
Log::Msg originally takes 32 bytes, now shrinks to 24 bytes.
Log::Peer originally takes 40 bytes, now shrinks to 32 bytes.
2020-04-18 18:33:46 +08:00
thalieht
f0549b4cb2 Make a few cosmetic changes in code 2020-04-17 19:51:26 +03:00
Chocobo1
d3d3f7dbb3 Add final specifier to classes
This allow compilers to generate more efficient code.
2020-04-17 13:18:40 +08:00
Vladimir Golovnev
2681093d27 Merge pull request #12513 from glassez/torrent-impl
Split TorrentHandle interface and implementation
2020-04-17 07:40:28 +03:00
Mike Tzou
a5fe96f793 Merge pull request #12458 from jagannatharjun/log
Convert the Log widget to use custom View/Model
2020-04-17 11:27:35 +08:00
Vladimir Golovnev (Glassez)
1132b84548 Split TorrentHandle interface and implementation 2020-04-16 20:22:26 +03:00
an0n666
ec6b249509 Change default upload slot choking limits 2020-04-16 23:46:48 +08:00
jagannatharjun
fd89717330 Convert the Log widget to use custom View/Model
Co-authored-by: sledgehammer999 <hammered999@gmail.com>
2020-04-15 22:18:00 +05:30
Mike Tzou
e030fc067b Merge pull request #12422 from an0n666/increase-timeout
Change default stop_tracker_timeout settings
2020-04-15 11:44:29 +08:00
an0n666
1168387df0 Change default stop_tracker_timeout settings 2020-04-13 16:05:36 +06:00
Mike Tzou
5d10724044 Merge pull request #12484 from rwasef1830/skip-setting-outgoing-interface-for-any-ip
Do not use 0.0.0.0 or [::] for outgoing interfaces
2020-04-13 11:52:27 +08:00
Raif Atef
1549b782e6 Do not use 0.0.0.0 or [::] for outgoing interfaces
Fixes #12443
2020-04-12 08:41:18 +02:00
C.W. Betts
d889f0975e Update Info.plist
Wrap the UTTypeTagSpecifications in arrays, as Xcode does.
2020-04-11 23:47:50 -06:00
Mike Tzou
c25b3e623c Merge pull request #12423 from an0n666/remove-strict-superseeding
Remove deprecated strict super seeding mode from advanced settings
2020-04-12 00:41:28 +08:00
Mike Tzou
0429ca3fb5 Merge pull request #12464 from Chocobo1/date
Fix date format for "Last seen complete"
2020-04-11 12:30:23 +08:00
Chocobo1
31648a4433 Fix date format for "Last seen complete"
Closes #12462.
2020-04-10 13:06:56 +08:00
Mike Tzou
d8356deefa Merge pull request #12449 from SeproDE/fix-addMultiplePeers
Fix add multiple peers from webui
2020-04-10 12:22:22 +08:00
Mike Tzou
43e5e242ff Merge pull request #12450 from Chocobo1/noBuffer
Avoid holding encoded resume data in memory
2020-04-09 13:21:32 +08:00
Sepro
2c8230f1ae Fix unable to add multiple peers in WebUI
Wrong delimiter was used.
2020-04-08 18:55:02 +02:00
Chocobo1
e7890fb727 Preallocate output buffer 2020-04-08 13:06:39 +08:00
Chocobo1
d476ae4f14 Fix header inclusion order 2020-04-08 11:58:12 +08:00
Vladimir Golovnev
eb0295197c Merge pull request #12301 from jozsefsallai/master
Better Python path detection on Windows
2020-04-07 22:29:26 +03:00
Chocobo1
f76d56e224 Suppress unused variable warning on macOS 2020-04-07 16:02:10 +08:00
Chocobo1
d8401c76f5 Avoid holding encoded resume data in memory
Now it the encoded resume data will be streamed to file instead of a
temporary buffer holding the whole of it.
2020-04-07 16:02:09 +08:00
Vladimir Golovnev
fe81633403 Merge pull request #12436 from glassez/fix-savepath
Save "resume data" when torrent storage is moved
2020-04-07 09:54:51 +03:00
an0n666
026aad2c04 Remove deprecated strict super seeding mode from advanced settings 2020-04-07 09:54:32 +06:00
Mike Tzou
f58f425175 Merge pull request #12430 from rwasef1830/add-outgoing-interfaces
Fix outgoing interfaces not getting assigned in case addr is not null.
2020-04-07 10:10:32 +08:00
Mike Tzou
342eec7f83 Merge pull request #12382 from adem4ik/master
Remove white outline around mascot.png
2020-04-07 09:39:13 +08:00
Raif Atef
bf1c9e34d7 Fix outgoing interface is not getting assigned
Assignment was missing in main branch of condition statement.
Closes https://github.com/qbittorrent/qBittorrent/issues/12421
2020-04-06 14:45:44 +02:00
Vladimir Golovnev (Glassez)
0a8c2f75af Save "resume data" when torrent storage is moved 2020-04-06 12:16:27 +03:00
Mike Tzou
26941a5b02 Merge pull request #12427 from Chocobo1/io
Avoid inefficient behavior
2020-04-06 12:13:30 +08:00
Mike Tzou
3021b99a50 Merge pull request #12420 from Chocobo1/locale
Sort locale language list
2020-04-06 12:12:50 +08:00
Mike Tzou
cc090c8e37 Merge pull request #12416 from NotTsunami/master
Set disk cache size for older libtorrent versions
2020-04-06 12:12:12 +08:00
Chocobo1
2fa6a7f6f5 Avoid inefficient behavior
Since the class needs to be copy-constructible, there may be many
copies of an instance. So instead of writing to the device on every
destructor call, only flush buffer on the last destructor call.
2020-04-06 01:04:12 +08:00
Chocobo1
5eaedb13e5 Sort locale language list 2020-04-05 19:21:37 +08:00
Mike Tzou
f647b5a97f Merge pull request #12404 from Chocobo1/pwr
Fix wrong logic that disables "prevent sleeping" timer
2020-04-05 12:30:48 +08:00
NotTsunami
e48612a703 Set disk cache size for older libtorrent versions
Libtorrent versions older than 1.2.6 have a bug when setting disk
cache size to auto.

See 6c880159c9.
2020-04-04 21:36:01 -04:00
Chocobo1
09545d4036 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-04 12:15:56 +08:00
Chocobo1
3752453522 Clean up coding style 2020-04-04 12:15:54 +08:00
Mike Tzou
a10cee0f2b Merge pull request #12364 from Chocobo1/fileOutIter
Avoid holding entire file in memory
2020-04-04 11:07:59 +08:00
adem
eddc82d8a5 Remove white outline around mascot.png 2020-04-03 23:26:45 +04:00
Vladimir Golovnev
df6d641cfb Merge pull request #12396 from glassez/fix-sorting
Fix sub-sorting of Transfer list
2020-04-03 21:08:28 +03:00
Vladimir Golovnev (Glassez)
b759a71c5d Fix sub-sorting of Transfer list
Closes #12330.
2020-04-03 19:09:41 +03:00
Chocobo1
9f281c2d25 Avoid holding entire file in memory
Previously we need a file buffer that is as large as the file size and
this could be a problem when user has less free memory available or
having very large data. Now with the help of `FileOutputIterator`,
we can have a much smaller, fixed size immediate file buffer and also
the code looks nice with `lt::bencode()`.
2020-04-03 18:27:13 +08:00
Mike Tzou
4b409700b0 Merge pull request #12372 from Chocobo1/webui
Fix mismatch ID
2020-04-03 13:02:15 +08:00
Mike Tzou
e7392de04c Merge pull request #12350 from Chocobo1/log
Improve logging for errors
2020-04-03 00:20:54 +08:00
Chocobo1
42d5d63867 Remove redundant type attribute
It already defaults to `text/css` if value is absent (in HTML5).
2020-04-03 00:15:04 +08:00
Chocobo1
e0c841d1e6 Fix mismatch ID 2020-04-03 00:00:32 +08:00
Chocobo1
17f608685d Improve logging for errors
This commit also allows the strings to be translated.
2020-04-02 11:20:09 +08:00
József Sallai
f9564564f8 Detect python3 executable on Windows 2020-04-02 00:31:41 +03:00
Vladimir Golovnev
96c5af7ae9 Merge pull request #12363 from glassez/fix-unexpected-resume
Fix unexpected torrent resume after app restart
2020-04-01 20:20:44 +03:00
Vladimir Golovnev (Glassez)
8bd9a97f6f Fix unexpected torrent resume after app restart
Closes #12322.
2020-04-01 18:01:18 +03:00
sledgehammer999
0dfa3a9c6f Sync translations from Transifex and run lupdate 2020-04-01 17:41:24 +03:00
Vladimir Golovnev
bc159121dc Merge pull request #12348 from glassez/fix-multi-inst
Prevent multiple instances for the same app config
2020-03-31 18:49:00 +03:00
sledgehammer999
bbe5465ba6 Merge pull request #12317 from sledgehammer999/fix_broken_save_path
Fix broken UNC paths in fastresumes on Windows
2020-03-31 18:34:31 +03:00
Vladimir Golovnev (Glassez)
4e6790dfbb Prevent multiple instances for the same app config 2020-03-31 17:16:47 +03:00
sledgehammer999
13af503003 Fix broken UNC paths in fastresumes on Windows
See #12245 and #12282
2020-03-30 15:21:15 +03:00
Mike Tzou
59f99bb984 Merge pull request #12282 from Tester798/fix-12245
Fix regression when fastresume contains network path
2020-03-30 12:53:17 +08:00
Mike Tzou
8a8607bf93 Merge pull request #12175 from NotTsunami/upnp
Add UPnP lease duration advanced option
2020-03-29 12:29:10 +08:00
Mike Tzou
4d99328b8f Merge pull request #12228 from LameLemon/alt-title
Added alt and title tags for WebUI footer
2020-03-29 12:28:35 +08:00
NotTsunami
6b4925d222 Add UPnP lease duration advanced option
This is a new setting added that is pending addition to
libtorrent 1.2.6. This setting is important because some routers do
not support expiration times on port-maps and do not return an error
either, silently failing. The previous default of permanent leases is
retained.
2020-03-28 00:32:32 -04:00
Mike Tzou
82c23e67a4 Merge pull request #12299 from Chocobo1/initialize
Initialize struct variables
2020-03-28 10:53:38 +08:00
Mike Tzou
c6e26f5dd0 Merge pull request #12232 from Chocobo1/warning
Add logging for SOCKS5 proxy errors
2020-03-27 22:22:13 +08:00
Vladimir Golovnev
776c136eb9 Merge pull request #12291 from adem4ik/patch-3
NSIS: Update Russian translation
2020-03-27 12:34:56 +03:00
Chocobo1
af430d6635 Initialize struct variables
clang static analyzer was emitting some warning about uninitialized
variable usage and this patch fixes it.
2020-03-27 16:01:01 +08:00
Mike Tzou
2408ce98e6 Merge pull request #12285 from Chocobo1/log
Save log file in UTF-8 encoding
2020-03-27 09:39:54 +08:00
Mike Tzou
6b5b5df90c Merge pull request #12283 from Chocobo1/qtTr
Include translation resources with file globbing
2020-03-27 09:38:46 +08:00
Andrei Stepanov
124fb60635 NSIS: Update Russian translation
Remake of my previous PR https://github.com/qbittorrent/qBittorrent/pull/12251
2020-03-26 23:49:21 +04:00
LameLemon
757274d315 Add alt and title tags for WebUI footer
Improves accessibility of the WebUI. Closes #12219.
2020-03-26 19:05:16 +00:00
sledgehammer999
0bf430ea4c Merge pull request #12244 from BouRock/patch-3
NSIS: Update Turkish translation
2020-03-26 19:28:03 +02:00
Burak Yavuz
ead2d95fdf NSIS: Update Turkish translation 2020-03-26 19:22:46 +02:00
sledgehammer999
03ae915b26 Merge pull request #12269 from maboroshin/master
NSIS: Update Japanese translation
2020-03-26 19:13:28 +02:00
sledgehammer999
b06f61ed20 Merge pull request #12265 from roope242/finnish_translation
NSIS: Update Finnish translation
2020-03-26 19:12:43 +02:00
Mike Tzou
c0b0c6dcfc Merge pull request #12259 from Chocobo1/dtor
Rely on Qt ownership to free resources
2020-03-27 01:06:39 +08:00
Mike Tzou
185d8c97c1 Merge pull request #12273 from Kolcha/hidpif
Don't round scaling factor
2020-03-27 01:06:08 +08:00
Tester798
1c6b4c0a79 Fix regression when fastresume contains network path
Closes #12245 after regression was introduced in #11785.
2020-03-26 18:54:13 +02:00
Chocobo1
54a685e953 Add logging for SOCKS5 proxy errors 2020-03-26 21:51:05 +08:00
Roope Jukkara
bd53254e28 NSIS: Update Finnish translation
Translated most of the finnish installer translation -file to finnish language.
2020-03-26 13:48:30 +02:00
Chocobo1
c52737e07c Avoid log file excessive flushing
Excessive flushing could happen when a lot of logging happens in a short
time interval.
2020-03-26 16:12:24 +08:00
Chocobo1
12396a7582 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-03-26 16:00:57 +08:00
Chocobo1
d179c6d5a1 Rename variable 2020-03-26 15:49:14 +08:00
Chocobo1
9630e7b689 Rely on Qt ownership to free resources
The m_reply has already changed parent in
DownloadHandlerImpl::assignNetworkReply() and thus we can rely on Qt
ownership to delete the object.
2020-03-26 14:39:18 +08:00
Chocobo1
1466c562e5 Include translation resources with file globbing
This will include all qtbase_*.qm files and only explicitly listed
qt_*.qm files will be included.
2020-03-26 14:10:20 +08:00
Mike Tzou
5049b76b40 Merge pull request #12260 from Chocobo1/latin1
Construct QString more efficiently
2020-03-26 12:09:40 +08:00
Nick Korotysh
a9b0d84df9 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-03-25 18:36:34 +03:00
maboroshin
66ffa9adc2 NSIS: Update Japanese translation 2020-03-25 21:55:05 +09:00
Chocobo1
7de8a4d6e0 Construct QString more efficiently 2020-03-25 12:00:11 +08:00
Chocobo1
2c23840947 Allow to translate error messages 2020-03-25 12:00:11 +08:00
sledgehammer999
fcc87b4e9b Sync translations from Transifex and run lupdate 2020-03-24 16:29:43 +02:00
sledgehammer999
fbf325c6d6 Merge pull request #12220 from kasper93/header
Add missing QPainterPath header include
2020-03-22 23:16:31 +02:00
Mike Tzou
18156bd676 Merge pull request #12154 from an0n666/remove-path-limit
NSIS: Add option to remove Windows path length limitation & Update manifest to support long path
2020-03-22 23:30:53 +08:00
an0n666
a711558ba0 NSIS: Add option to remove Windows path length limitation 2020-03-22 16:46:46 +02:00
Kacper Michajłow
e2c9ca5ee5 Add missing QPainterPath header include 2020-03-22 14:58:44 +01:00
Mike Tzou
ab30cfcdb0 Merge pull request #12207 from FranciscoPombal/fix-webapi
WebAPI: fix matching uncategorized torrents
2020-03-22 21:23:56 +08:00
FranciscoPombal
e496e664db WebAPI: Always allow whitespace in category names 2020-03-22 12:16:06 +00:00
FranciscoPombal
7d24e1c063 WebAPI: fix matching uncategorized torrents
Closes #11748.
2020-03-22 03:49:06 +00:00
Mike Tzou
f44f1ffc97 Merge pull request #12206 from thalieht/monitoredTMM
Disable Auto TMM when not using default savepath from monitored folder
2020-03-21 12:23:40 +08:00
thalieht
598c856c88 Disable Auto TMM when not using default savepath from monitored folder 2020-03-19 21:13:44 +02:00
Mike Tzou
4884f08e04 Merge pull request #12187 from NotTsunami/keypress
Allow other keypresses in LogListWidget
2020-03-19 13:36:41 +08:00
Mike Tzou
a9111b1357 Merge pull request #12180 from FranciscoPombal/fix_stats
Fix total connected peers count calculation
2020-03-19 12:07:20 +08:00
FranciscoPombal
a81789f4af Fix total connected peers count calculation
Also fix small typo in function name.
2020-03-17 18:01:57 +00:00
NotTsunami
c5aab39836 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-17 01:30:01 -04:00
Vladimir Golovnev
c323f64c96 Merge pull request #12188 from thalieht/queuemove
Append new move storage job to queue
2020-03-17 07:18:27 +03:00
Mike Tzou
0ffa0478bc Merge pull request #12168 from Chocobo1/version
Get library version strings at runtime
2020-03-17 11:52:52 +08:00
thalieht
18289f2395 Append new move storage job to queue
fixup e4ff206e3c
2020-03-16 22:39:31 +02:00
Chocobo1
b7e7d8019c Use helper function to construct QString
This is shorter and avoids the need of 2 constructors.
2020-03-16 21:27:42 +08:00
Chocobo1
6c307774f1 Get library version strings at runtime
We mostly use boost in header-only mode, so it is a non-trivial job to
get the version string at runtime.
2020-03-16 21:27:42 +08:00
Mike Tzou
8e553adc92 Merge pull request #12158 from Chocobo1/man
Add man page files in Markdown format
2020-03-14 00:19:32 +08:00
Vladimir Golovnev
5127156ba4 Merge pull request #12035 from glassez/move-storage
Move torrent storages one by one
2020-03-13 15:59:05 +03:00
Chocobo1
13ad1ee520 Add man page files in Markdown format
This allow us to edit man pages in a humane format.
2020-03-12 13:12:33 +08:00
Mike Tzou
f80b7affd9 Merge pull request #12138 from Chocobo1/dist
Update Qt translations
2020-03-10 01:29:08 +08:00
Vladimir Golovnev
a7b342edcb Merge pull request #12083 from glassez/app-instances
Allow single app instance per configuration
2020-03-09 07:40:48 +03:00
Chocobo1
a0e617260f Update supported python version
Fix up baa13c044a.
2020-03-09 09:48:17 +08:00
Chocobo1
7b25dd24d0 Update Qt translation files 2020-03-09 09:48:15 +08:00
Chocobo1
8cc082f966 Switch to https link 2020-03-08 01:47:36 +08:00
Mike Tzou
92cc2a4f31 Merge pull request #12124 from Chocobo1/rename
Fix crash when renaming torrent contents
2020-03-08 00:16:02 +08:00
Mike Tzou
dc4e9e3779 Merge pull request #11813 from Chocobo1/python
Drop python2 support
2020-03-07 10:18:45 +08:00
Chocobo1
62b0d25140 Capture pointer by value 2020-03-07 10:06:35 +08:00
Mike Tzou
095ef67e30 Merge pull request #12102 from Kolcha/hidpi
Delegate GUI scaling work to Qt
2020-03-07 10:05:21 +08:00
Nick Korotysh
d49d7c1d82 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-06 12:04:57 +03:00
Chocobo1
48e7191ef7 Initialize boolean variables 2020-03-06 15:50:55 +08:00
Chocobo1
9c6bc6c89a Fix crash when renaming torrent contents
Closes #10328.
2020-03-06 15:50:37 +08:00
Vladimir Golovnev (Glassez)
38e54206d5 Allow single app instance per configuration 2020-03-06 08:59:59 +03:00
Mike Tzou
73ee901c45 Merge pull request #12113 from Chocobo1/smart_ptr
Use helper functions to construct smart pointers
2020-03-06 13:12:41 +08:00
Mike Tzou
cc314ae85a Merge pull request #12121 from Chocobo1/idx_type
Use proper type for piece index
2020-03-06 13:12:25 +08:00
Chocobo1
290d198977 Use proper type for piece index 2020-03-06 01:47:28 +08:00
Chocobo1
2157e500ef Use helper functions to construct smart pointers 2020-03-05 19:32:28 +08:00
Mike Tzou
ca01b049a6 Merge pull request #12108 from Chocobo1/bits
Avoid unnecessary memory writes
2020-03-04 23:50:12 +08:00
Mike Tzou
949daf6c73 Merge pull request #12037 from an0n666/seed-mode-fix
Check if file exists in seed mode
2020-03-04 23:49:47 +08:00
an0n666
f7d2085b0a Check if file exists in seed mode 2020-03-04 17:38:00 +06:00
Chocobo1
24cd7c3611 Avoid unnecessary memory writes
Before this change, qbt spent ~1% in these two functions, now it
only spends about ~0.5% in my naive testing.
2020-03-04 03:18:39 +08:00
Mike Tzou
1ca303cb0a Merge pull request #12027 from NotTsunami/pr2
Improve the options tooltips
2020-03-03 17:47:23 +08:00
NotTsunami
f1788c76a9 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-02 23:55:08 -05:00
Vladimir Golovnev
b519ece18b Merge pull request #12095 from glassez/resume-torrent
Let libtorrent decide whether to resume a torrent
2020-03-01 19:54:16 +03:00
Vladimir Golovnev (Glassez)
74884d57ec Let libtorrent decide whether to resume a torrent 2020-03-01 08:08:01 +03:00
Mike Tzou
9649c2a163 Merge pull request #12043 from FranciscoPombal/fix-embedded-tracker
Fix embedded tracker
2020-02-27 21:06:58 +08:00
Vladimir Golovnev
4d2943a782 Merge pull request #12033 from glassez/save-torrent
Allow to save downloaded metadata as torrent file
2020-02-27 08:49:40 +03:00
Mike Tzou
89dec85b0f Merge pull request #12076 from maboroshin/master
NSIS: Update Japanese translation
2020-02-27 12:46:40 +08:00
Mike Tzou
5e567a2bff Merge pull request #12075 from Chocobo1/comment
Remove misleading translation comment
2020-02-27 12:44:38 +08:00
FranciscoPombal
966f891d91 Fix response to event=stopped
BEP-3 says all tracker responses to valid announce requests should be bencoded dictionaries with at least the "peers" and "interval" keys; the "peers" key can be empty.

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

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

Also clarify level of compliance with BEP-7.
2020-02-26 20:42:14 +00:00
FranciscoPombal
9f045500d1 Fix IPv6 endianness 2020-02-26 20:42:07 +00:00
maboroshin
6474ee046f NSIS: Update Japanese translation 2020-02-26 18:46:59 +09:00
Vladimir Golovnev (Glassez)
e4ff206e3c Move torrent storages one by one 2020-02-26 10:20:04 +03:00
Vladimir Golovnev (Glassez)
dd0cee44c1 Allow to save downloaded metadata as torrent file 2020-02-26 08:10:11 +03:00
Chocobo1
071ffd13de 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-02-26 13:04:18 +08:00
Chocobo1
f4febb96b4 Remove misleading translation comment
Also it was using the wrong field for translation comment.
2020-02-26 12:55:19 +08:00
Mike Tzou
a773b9ad84 Merge pull request #12057 from djt3/master
Change placeholder text in torrent list's filter
2020-02-25 13:29:09 +08:00
Mike Tzou
2ca0182e4b Merge pull request #12050 from schnurlos/patch-6
NSIS: Update German translation
2020-02-24 12:33:00 +08:00
schnurlos
46b6593a8a NSIS: Update German translation
German translation of "inst_requires_win7" added.
2020-02-23 19:29:13 +02:00
djt3
e6887fc950 Change placeholder text in torrent list's filter 2020-02-23 14:40:45 +00:00
Mike Tzou
68709c3112 Merge pull request #12044 from FranciscoPombal/fix-port
Revert using random port by default
2020-02-22 02:29:45 +08:00
FranciscoPombal
dc6a56afcb Revert using random port by default
Revert change introduced in https://github.com/qbittorrent/qBittorrent/pull/11637 and also revert the associated follow-up https://github.com/qbittorrent/qBittorrent/pull/12000.

Reason: https://github.com/arvidn/libtorrent/pull/4335
2020-02-21 14:47:37 +00:00
Mike Tzou
167127c668 Merge pull request #12034 from zywo/french.nsi
NSIS: Update French translation
2020-02-21 20:19:32 +08:00
zywo
bd5a685294 NSIS: Update French translation 2020-02-21 12:44:01 +01:00
Mike Tzou
0a7906d78b Merge pull request #12032 from slrslr/patch-1
NSIS: Improve Czech translation
2020-02-21 13:49:32 +08:00
slrslr
b5ccbb77ee NSIS: Improve Czech translation 2020-02-20 23:12:45 +02:00
sledgehammer999
06ceac4cda Merge pull request #11895 from FranciscoPombal/cmake-build
Git: Ignore "build" directory
2020-02-18 21:57:36 +02:00
sledgehammer999
193da7f2f9 Merge pull request #12014 from sledgehammer999/alt_IP_db_provider
Use IP geolocation database by DB-IP instead of MaxMind
2020-02-18 17:05:52 +02:00
sledgehammer999
ea1481beef Use IP geolocation database by DB-IP instead of MaxMind
Closes #11792
2020-02-18 16:11:28 +02:00
Francisco Pombal
65ecd92dd8 Git: Ignore "build" directory 2020-02-18 00:32:35 +00:00
Mike Tzou
bf6a88b3d2 Merge pull request #12021 from Chocobo1/trackerentry
Simplify TrackerEntry::status() logic
2020-02-18 02:22:05 +08:00
Chocobo1
e825473289 Simplify TrackerEntry::status() logic 2020-02-17 18:46:30 +08:00
sledgehammer999
322ae3e0bc Merge pull request #11825 from FranciscoPombal/stalled_filter
Add stalled filters to GUI and Web API/UI
2020-02-16 18:32:37 +02:00
Mike Tzou
04132f6266 Merge pull request #11999 from an0n666/fix-not-contacted-tracker
Do not list not contacted trackers as error
2020-02-16 20:27:41 +08:00
sledgehammer999
971d20a3c1 Merge pull request #11963 from an0n666/start-with-windows
Start qBittorrent on Windows start up option in installer
2020-02-16 11:55:33 +02:00
An0n
dd19f250ae Start qBittorrent on Windows start up 2020-02-16 05:25:59 +00:00
an0n666
8423f43209 Do not list not contacted trackers as error 2020-02-15 19:44:14 +00:00
sledgehammer999
385d7247b7 Merge pull request #12016 from Chocobo1/errMsg
Include resume folder path in exception message
2020-02-15 19:41:39 +02:00
Vladimir Golovnev
362305f339 Merge pull request #12013 from glassez/fix-rss
Don't access download handler after it's finished
2020-02-15 07:02:59 +03:00
Mike Tzou
dbea2d95f9 Merge pull request #12004 from Chocobo1/authCount
Add configurable ban options for WebUI
2020-02-15 09:43:16 +08:00
Mike Tzou
03087b72b0 Merge pull request #12011 from Chocobo1/webui
Close document properly after writing
2020-02-15 09:42:46 +08:00
Chocobo1
45c357dfe2 Include resume folder path in exception message
The message in RuntimeError exception will be displayed to the users and
users would be clueless if we don't show the path.
2020-02-15 02:48:55 +08:00
Chocobo1
6eb190c373 Expose WebUI ban duration to users 2020-02-14 16:23:30 +08:00
Chocobo1
ec61ef5145 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-02-14 16:23:03 +08:00
Chocobo1
4f7b799732 Use QDeadlineTimer for tracking WebUI banned duration
It simplifies our code and the new timer is monotonic.
2020-02-14 16:22:52 +08:00
Vladimir Golovnev (Glassez)
3762514662 Don't access download handler after it's finished 2020-02-14 08:24:49 +03:00
Chocobo1
45bd79ee74 Close document properly after writing
Closing document explicitly is recommended by MDN:
https://developer.mozilla.org/en-US/docs/Web/API/Document/write
2020-02-14 12:47:18 +08:00
Chocobo1
f88d6b2e55 Expose WebUI ban counter to users 2020-02-14 12:31:12 +08:00
Mike Tzou
d5a4ebe7c9 Merge pull request #11998 from Kolcha/filter-list
Inherit text color for filter list elements
2020-02-14 11:34:55 +08:00
Mike Tzou
195889a854 Merge pull request #11785 from Tester798/fix-portable-mode
Fix portable mode
2020-02-14 11:30:32 +08:00
Mike Tzou
882978c80a Merge pull request #12000 from an0n666/legacy-default-no-random-port
Keep legacy default for random port
2020-02-13 12:24:45 +08:00
Tester798
58711cbe7e Fix portable mode
Try to fix portable mode bug. Closes #11706, #11178, #7765.
2020-02-12 19:56:25 +02:00
Mike Tzou
316f34cbf5 Merge pull request #11994 from Chocobo1/profile
Unify singleton pattern in Profile class
2020-02-12 23:59:47 +08:00
an0n666
41d8585932 Keep legacy default for random port 2020-02-12 12:28:13 +00:00
Nick Korotysh
1e59dcdb6c 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-02-12 10:40:08 +03:00
Vladimir Golovnev
4a2fda7edc Merge pull request #11995 from glassez/fix-magnet-redirect
Handle HTTP redirections manually
2020-02-12 09:25:39 +03:00
Vladimir Golovnev
1e63dcb400 Merge pull request #11847 from glassez/legacy-defaults
Keep legacy defaults for existing users
2020-02-11 18:44:03 +03:00
Chocobo1
5de75eff05 Unify singleton pattern in Profile class
1. Use unified function names `initInstance()` and `freeInstance()` and
make them public.
2. Add `freeInstance()` to avoid noise from memory leak detectors.
3. Let `instance()`return a pointer directly to avoid unnecessary
indirections when invoking functions.
2020-02-11 15:30:59 +08:00
Vladimir Golovnev (Glassez)
0c6c65f6f8 Keep legacy defaults for existing users 2020-02-11 09:53:12 +03:00
Vladimir Golovnev (Glassez)
86c95db91d Perform settings upgrade for existing user only 2020-02-11 09:40:57 +03:00
Vladimir Golovnev (Glassez)
8bb34482ea Handle HTTP redirections manually
Qt doesn't support Magnet protocol so we need to handle all redirections
manually to allow redirections to Magnet URIs.
2020-02-11 09:31:42 +03:00
Mike Tzou
8b42bf5192 Merge pull request #11981 from Kolcha/favicon
Use SVG image for WebUI favicon
2020-02-11 12:32:42 +08:00
Nick Korotysh
536580ca6b 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-02-09 08:52:32 +03:00
Chocobo1
baa13c044a Drop python2 support
Closes #11811.
2020-02-08 12:36:45 +08:00
Mike Tzou
8b330e3ac0 Merge pull request #11977 from Chocobo1/init
Fix singleton class ownership
2020-02-08 12:10:27 +08:00
Chocobo1
a6cdba17f0 Fix singleton class ownership
We shouldn't allow Qt parent ownership in here.
2020-02-07 15:34:04 +08:00
Mike Tzou
fa43dab3a2 Merge pull request #11961 from NotTsunami/master
Remove redundant null checks
2020-02-07 13:53:57 +08:00
NotTsunami
6748e8d787 Remove redundant null checks
Attempting to delete a null pointer is a noop in C++.

Closes #2864.

[1] https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null
2020-02-03 16:38:51 -05:00
Mike Tzou
c78604c7d3 Merge pull request #11950 from Chocobo1/rdns
Improve ReverseResolution class
2020-01-31 21:25:52 +08:00
Chocobo1
b2ab6c1858 Let ReverseResolution always return/emit a result 2020-01-30 19:24:18 +08:00
Chocobo1
ff31bb86bc Speed up lookup time
By adding another variable we can get O(1) lookup time instead of O(n).
Fix up 5f415c292d.
2020-01-30 19:23:54 +08:00
Chocobo1
a2ebd77eac Manually abort lookup on class destruction
Some lookup might take longer so instead of waiting them, we abort them
manually.
2020-01-30 14:11:03 +08:00
Chocobo1
86e3d0d816 Improve ReverseResolution class
* Use QHostAddress type for IP
* Avoid double lookup
* Use larger cache size
2020-01-30 14:11:03 +08:00
Mike Tzou
11bea8d393 Merge pull request #11918 from thalieht/peerssameip
Show any multiple connections from the same IP in peer list
2020-01-30 12:59:17 +08:00
thalieht
5f415c292d Show any multiple connections from the same IP in peer list
The uniqueness of peers is now determined by their
IP, port and connection type (uTP etc.) instead of just their IP
2020-01-29 20:40:10 +02:00
Mike Tzou
4884788c0b Merge pull request #11933 from Chocobo1/qhash
Improve qHash functions
2020-01-29 02:07:27 +08:00
Chocobo1
5905c085c6 Use systematic approach to generate hash
The basic idea is to hash each class member and then mix them with xor
operation.
However the `seed` must be handled with care, it should only be
introduced once when mixing the hashes of each class member, otherwise
under some circumstances the `seed` might xor with itself and thus break
the intended effect.
2020-01-27 18:14:27 +08:00
Chocobo1
1740f968df Revise qHash function
Instead of xor and narrowing the integers ourselves, now we let qHash()
from Qt do the job properly.
2020-01-27 12:53:22 +08:00
Chocobo1
2b4490d8a7 Use faster hash function
qHash(QString) will need to hash/loop through all the data while the new
code will only need one memcpy() and a few bit manipulations.
2020-01-27 12:53:13 +08:00
Vladimir Golovnev
07c22f8c87 Merge pull request #11914 from glassez/fix-hide-zeroes
Fix hide zero values
2020-01-24 19:03:54 +03:00
Vladimir Golovnev (Glassez)
666e733a4a Track settings changed event in TransferListModel 2020-01-24 07:42:39 +03:00
Vladimir Golovnev (Glassez)
099943ea3c Fix hide zero values 2020-01-24 07:41:04 +03:00
Mike Tzou
c3ce1aaa3d Merge pull request #11903 from Sakib-Abrar/gui-improvement
Show "∞" instead of " -1" in Preferences
2020-01-22 11:56:26 +08:00
Vladimir Golovnev
89e72b38ea Merge pull request #11881 from glassez/extension
Simplify torrent startup handling
2020-01-22 06:11:33 +03:00
Sakib-Abrar
1768570bf9 Show "∞" instead of " -1" in Preferences 2020-01-22 00:06:19 +06:00
Vladimir Golovnev (Glassez)
f2285e1b63 Redesign torrent startup handling 2020-01-21 10:14:59 +03:00
Mike Tzou
01ad8a443c Merge pull request #11892 from NotTsunami/cmake
CMake: Further CMake improvements and fixes
2020-01-20 11:59:51 +08:00
Vladimir Golovnev
75ebd54ea3 Merge pull request #11088 from jagannatharjun/organize-style
Reorganize UI theme selection
2020-01-20 06:56:54 +03:00
NotTsunami
b21ed0063b 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-01-19 15:08:45 -05:00
NotTsunami
f066d8d786 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-01-19 15:08:37 -05:00
Prince Gupta
c9e162cf8a Reorganize UI theme selection 2020-01-18 23:12:33 +05:30
NotTsunami
b7f2122c06 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-01-18 09:36:56 -05:00
Mike Tzou
9f9868bd79 Merge pull request #11886 from Chocobo1/deprecate
Migrate away from deprecated settings
2020-01-17 16:27:11 +08:00
Chocobo1
3fce1db2eb Migrate away from deprecated settings
Libtorrent has deprecated `upnp_ignore_nonrouters` in
https://github.com/arvidn/libtorrent/pull/4251
2020-01-16 23:44:54 +08:00
Mike Tzou
b0844800b8 Merge pull request #11870 from NotTsunami/master
CMake: Remove additional debugging compiler flags
2020-01-15 12:45:53 +08:00
NotTsunami
451585b5de 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-01-14 10:18:59 -05:00
Mike Tzou
e27c9bd020 Merge pull request #11871 from NotTsunami/bitwise
WebUI: Use correct operators in logical expressions
2020-01-14 12:54:56 +08:00
Mike Tzou
146e8213a5 Merge pull request #11781 from FranciscoPombal/piece_extent_affinity
Add piece_extent_affinity to AdvancedSettings
2020-01-14 12:53:39 +08:00
Vladimir Golovnev
990e451765 Merge pull request #11865 from shemanaev/fix/webui-files-rename
WebUI: Fix first row renaming in files tab
2020-01-14 07:14:13 +03:00
FranciscoPombal
df2fbb1edc Bump Web API version 2020-01-13 11:41:59 +00:00
FranciscoPombal
f4742a98c5 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-01-13 11:41:37 +00:00
NotTsunami
82047104fc WebUI: Use correct operators in logical expressions
As suggested in https://github.com/qbittorrent/qBittorrent/pull/11825#discussion_r365557626
2020-01-13 01:35:38 -05:00
FranciscoPombal
ed96a07a75 Add piece_extent_affinity to AdvancedSettings
Expose option in WebUI settings and WebAPI.

Requires WebAPI version bump.

Closes #11436.
2020-01-13 00:11:29 +00:00
Denis
a7eb792372 WebUI: Fix first row renaming in files tab
Ids started from zero and first row converts to false.
Closes #11826.
2020-01-12 20:05:38 +03:00
Vladimir Golovnev
101ab3cf6c Merge pull request #11864 from glassez/fix-sorting
Fix Transfer list sorting
2020-01-12 11:05:20 +03:00
Mike Tzou
1592eb7be7 Merge pull request #11862 from Chocobo1/year
Bump copyright year and other fixes
2020-01-12 12:01:10 +08:00
Vladimir Golovnev (Glassez)
118debd6bf Fix Transfer list sorting 2020-01-11 18:19:48 +03:00
Chocobo1
396660b031 Fix missing string 2020-01-11 18:48:49 +08:00
Chocobo1
2e4584578b Bump python version for new installation 2020-01-11 18:48:01 +08:00
Chocobo1
029795bc19 Bump copyright year 2020-01-11 18:47:33 +08:00
Mike Tzou
a124decdc5 Merge pull request #11848 from an0n666/stop_tracker_timeout_placement
Change stop tracker timeout settings placement
2020-01-11 10:45:58 +08:00
An0n
bf32e90c40 Change placement of stop tracker timeout 2020-01-09 19:01:05 +00:00
Mike Tzou
057860584c Merge pull request #11834 from an0n666/an0n666-expose-stop-tracker-timeout
Expose stop tracker timeout in Advanced Settings (GUI + WebUI)
2020-01-08 17:30:21 +08:00
Mike Tzou
e2ac97a9e7 Merge pull request #11838 from Chocobo1/webui
Minor WebUI code cleanups
2020-01-08 16:50:31 +08:00
an0n666
3f223c3a45 Expose stop_tracker_timeout in advanced settings 2020-01-08 08:21:55 +00:00
sledgehammer999
45ed31fddc Merge pull request #11733 from sledgehammer999/tracker_error_count
Tracker is errored only if all local endpoints fail
2020-01-08 04:24:08 +02:00
Vladimir Golovnev
dc8f4b776c Merge pull request #11829 from thalieht/doubleclick
Allow double-click in preview dialog
2020-01-06 21:11:59 +03:00
Chocobo1
c556b20018 Remove unused variable 2020-01-07 02:08:08 +08:00
Chocobo1
c34883f9af Add explicit semicolon 2020-01-07 02:07:55 +08:00
Chocobo1
0577cf588c Remove duplicate line 2020-01-07 01:59:02 +08:00
sledgehammer999
02a027144b Tracker is errored only if all local endpoints fail
Closes #11691
2020-01-05 17:59:54 +02:00
thalieht
c5177eae9f Allow double-click in preview dialog 2020-01-05 11:28:04 +02:00
Vladimir Golovnev
7ceeea880e Merge pull request #11798 from glassez/fix-recheck-loop
Save resume data after recheck. Closes #11774
2020-01-02 17:21:25 +03:00
Vladimir Golovnev (Glassez)
f56f817c77 Save resume data after recheck
Closes #11774.
2020-01-01 14:29:58 +03:00
Mike Tzou
e906478a16 Merge pull request #11756 from FranciscoPombal/fix_webui_stats_race
WebUI: fix populating statistics window
2019-12-28 10:37:03 +08:00
Vladimir Golovnev
37d7323ac0 Merge pull request #11708 from glassez/transfer-list
Improve Transfer list architecture
2019-12-27 16:25:26 +03:00
FranciscoPombal
8be804b6ff WebUI: fix populating statistics window
Closes #11665
2019-12-27 12:10:12 +00:00
Vladimir Golovnev (Glassez)
15f2a3b564 Use QStyledItemDelegate instead of QItemDelegate 2019-12-26 22:10:28 +03:00
Vladimir Golovnev (Glassez)
766cfb67df 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).
2019-12-26 22:09:56 +03:00
Mike Tzou
5c3c1e07df Merge pull request #11739 from Chocobo1/qt5_14
Migrate away from deprecated API in Qt 5.14
2019-12-26 12:43:04 +08:00
Chocobo1
f5f3dc2ba1 Remove unused variable 2019-12-25 19:23:37 +08:00
Chocobo1
2422d81de1 Migrate away from deprecated API in Qt 5.14 2019-12-25 19:23:37 +08:00
Mike Tzou
e62b550bfe Merge pull request #11635 from FranciscoPombal/prevent_excessive_sync
WebUI: Prevent excessive requests to /api/v2/sync/maindata
2019-12-25 13:15:13 +08:00
Mike Tzou
07d4055de5 Merge pull request #11745 from FranciscoPombal/fixup_#11592
WebUI: remove unused/deprecated "Listen on IPv6 address" option
2019-12-25 13:07:24 +08:00
Mike Tzou
fea39fbcf2 Merge pull request #11726 from FranciscoPombal/fix_#11724
WebUI: Implement "Secure" flag for session cookie. Closes #11724
2019-12-25 13:06:40 +08:00
FranciscoPombal
0f6dfcf8a6 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).
2019-12-24 12:15:26 +00:00
Mike Tzou
c94417b589 Merge pull request #11637 from FranciscoPombal/new_defaults
Change some settings defaults for better behaviour out of the box
2019-12-24 12:27:11 +08:00
sledgehammer999
f672df1cf1 Merge pull request #11278 from Piccirello/country_region
Rename Country column to "Country / Region"
2019-12-23 21:54:30 +02:00
FranciscoPombal
e693fdeaf9 WebUI: remove unused/deprecated option
Fixup 8200ef6
Remove "Listen on IPv6 address" option.
2019-12-23 18:57:46 +00:00
FranciscoPombal
691d5e5d89 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.
2019-12-23 17:58:08 +00:00
sledgehammer999
3a70dd4438 Merge pull request #11672 from sledgehammer999/show_console
Option to show console when external program is run
2019-12-23 16:16:24 +02:00
sledgehammer999
1121316926 Delete unnecessary explicit return 2019-12-19 19:13:02 +02:00
sledgehammer999
8fa6e372a2 Option to show console when external program is run
Windows only.
Closes #9592
2019-12-19 19:13:01 +02:00
FranciscoPombal
30502de960 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.
2019-12-19 16:46:22 +00:00
sledgehammer999
18de63f743 Merge pull request #11433 from jagannatharjun/colors
Allow transfer list text color changes through QSS
2019-12-19 18:20:49 +02:00
sledgehammer999
52273ca18c Merge pull request #11696 from Medvedishce/Update-free-disk-space
Update free disk space label on Category change in Auto Mode
2019-12-19 18:16:08 +02:00
sledgehammer999
4ae8e176dc Use modern unique_ptr practices 2019-12-19 16:25:45 +02:00
Prince Gupta
d3aa45526a Allow transfer list text color changes through QSS 2019-12-19 12:45:26 +05:30
Mike Tzou
fab250f1e0 Merge pull request #11694 from Chocobo1/nullptr
Replace hard-coded numbers in TrackerFiltersList class
2019-12-19 10:13:44 +08:00
Medvedishce
48fff37143 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.
2019-12-18 13:49:43 +03:00
Chocobo1
723668ba46 Replace hard-coded numbers in TrackerFiltersList class 2019-12-18 16:33:37 +08:00
Chocobo1
bf264b983a Simplify null pointer check 2019-12-18 15:13:02 +08:00
Chocobo1
bb73fa5dbe Replace a series of if() by switch() 2019-12-18 15:05:42 +08:00
Mike Tzou
1e4c837d6c Merge pull request #11678 from an0n666/patch-1
Disable Torrent Queue by default
2019-12-18 13:47:04 +08:00
sledgehammer999
a25ed5f639 Sync translations from Transifex and run lupdate 2019-12-18 00:33:00 +02:00
sledgehammer999
1376e051df Bump Web API version 2019-12-18 00:20:27 +02:00
sledgehammer999
90308c2ae5 Merge pull request #11660 from sledgehammer999/fix_smart_delete
Don't unnecessarily delete folder customization
2019-12-17 20:38:25 +02:00
sledgehammer999
3d43f1c800 Merge pull request #11642 from sledgehammer999/fix_save_path
Use the incomplete folder where appropriate
2019-12-17 20:37:57 +02:00
Mike Tzou
99c002ae27 Merge pull request #11614 from Tester798/master
Enable portable mode if "profile" folder exists
2019-12-17 13:37:35 +08:00
Mike Tzou
5b7df3a6e7 Merge pull request #11675 from jagannatharjun/resize-align
Align Properties tab bar correctly on window resize
2019-12-17 10:44:13 +08:00
sledgehammer999
64e5d41a2c Don't unnecessarily delete OS files in folders 2019-12-16 22:10:13 +02:00
an0n666
e0d7876990 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.
2019-12-16 18:16:27 +06:00
Prince Gupta
6258c1e65b Align Properties tab bar correctly on window resize 2019-12-16 15:42:50 +05:30
Tester798
053ee48692 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-16 05:12:47 +02:00
sledgehammer999
564d845d87 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-13 20:31:38 +02:00
sledgehammer999
d09c5e529c Merge pull request #11592 from sledgehammer999/refactor_listeningAddr
Rework the listening IP/interface selection code
2019-12-12 20:24:45 +02:00
Mike Tzou
b6476f7585 Merge pull request #11633 from Chocobo1/lanlimit
Enable "Apply rate limit to peers on LAN" option by default
2019-12-12 11:15:10 +08:00
Chocobo1
796595ffb6 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-11 21:44:45 +08:00
sledgehammer999
8200ef6bd5 Rework the listening IP/interface selection code
Closes #11561
2019-12-11 09:56:45 +02:00
Mike Tzou
53183f3ab3 Merge pull request #11627 from nl6720/webui-magnet-warning-fix
Fix quoting of alert() in client.js
2019-12-10 20:00:35 +08:00
nl6720
5f5385d4dd Fix quoting of alert() in client.js
Fix alert() I broke in #11615 .
2019-12-10 12:45:55 +02:00
Mike Tzou
a652c39394 Merge pull request #11029 from Piccirello/webui-rename-file
Add ability to rename torrent files from the WebUI
2019-12-10 12:39:19 +08:00
Mike Tzou
5e83574de1 Merge pull request #11615 from nl6720/webui-magnet-warning
Mention HTTPS in WebUI magnet link warning
2019-12-10 12:36:45 +08:00
Thomas Piccirello
2bce9f6179 Add ability to rename torrent files from the WebUI
Renaming folders is not yet supported. Closes #8892.
2019-12-09 02:57:32 -08:00
Thomas Piccirello
9fecd18293 Fix incorrect function being used 2019-12-09 02:53:36 -08:00
nl6720
c1ef846c3d 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-08 11:41:30 +02:00
Mike Tzou
a7bd68a2c7 Merge pull request #11607 from luigino/ppc64
Remove -march=native optimisation
2019-12-08 13:39:18 +08:00
Luigi Baldoni
2f83587f2a Remove -march=native optimisation 2019-12-08 13:13:59 +08:00
Mike Tzou
7a657eb5d9 Merge pull request #11566 from Chocobo1/webui
Fixes for WebUI
2019-12-08 12:13:53 +08:00
sledgehammer999
0b91c4d890 Merge pull request #11557 from adem4ik/patch-1
Update russian.nsi
2019-12-07 16:51:41 +02:00
Mike Tzou
d051519eff Merge pull request #11568 from Chocobo1/icon
Fix inconsistent icon for deleting torrent
2019-12-06 11:44:28 +08:00
Chocobo1
c896982efb 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-04 18:25:14 +08:00
Chocobo1
5f165c4c00 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-04 18:25:14 +08:00
Thomas Piccirello
33a3624652 Rename Country column to "Country / Region"
Not all flags displayed strictly belong to countries.
2019-12-03 23:05:38 -08:00
Chocobo1
a92826d316 Fix inconsistent icon for deleting torrent
Closes #11565.
2019-12-04 12:59:29 +08:00
Chocobo1
04f270b9bc Fix missing translations in search plugins dialog
Closes #11551.
2019-12-04 12:20:11 +08:00
Andrei Stepanov
c89c51f871 Update russian.nsi 2019-12-04 01:45:11 +04:00
Mike Tzou
2e8b17e498 Merge pull request #11521 from Chocobo1/errorStatus
Fix stuck in wrong torrent state
2019-12-03 19:22:39 +08:00
Vladimir Golovnev
452b1d8ea2 Merge pull request #11543 from j1warren/content_tab_feature
Expand single-item folders in torrent content
2019-12-03 13:04:53 +03:00
sledgehammer999
ad0bc5d90d Bump to 4.3.0alpha1 2019-12-03 01:24:50 +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
warren
b37795d344 Expand single-item folders in torrent content 2019-12-02 21:56:44 +05: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
Chocobo1
b6050463f4 Show torrent error message in transfer list 2019-11-26 03:15:48 +08:00
Chocobo1
2ca70cf6cc 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-11-26 03:15:48 +08: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
1369 changed files with 505181 additions and 253250 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
@@ -17,4 +17,3 @@
### Extra info(if any)
(type here)

244
.github/workflows/ci.yaml vendored Normal file
View File

@@ -0,0 +1,244 @@
name: GitHub Actions CI
# Cache is used for all Windows and macOS dependencies (size approx. 1230 * 2 + 1850 = 4310 MiB)
# Cache is not used for Ubuntu builds, because it already has all dependencies except
# the appropriate libtorrent version, which only takes 3-5 minutes to build from source anyway
on:
push:
branches: [ master ]
pull_request:
types: [edited, opened, reopened, synchronize]
branches: [ master ]
env:
# Qt: 5.15.1
# libtorrent: RC_1_2 HEAD, 1.2.11
VCPKG_COMMIT: 133051b793486ef14e67e9d1f48c9cfe64dc127e
VCPKG_DEST_MACOS: /Users/runner/qbt_tools/vcpkg
VCPKG_DEST_WIN: C:\qbt_tools\vcpkg
LIBTORRENT_VERSION_TAG: v1.2.11
jobs:
ci_ubuntu:
name: Ubuntu
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-18.04]
qbt_gui: ["GUI=ON", "GUI=OFF"]
fail-fast: false
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: install all build dependencies except libtorrent from Ubuntu repos
run: |
sudo apt update
sudo apt install \
build-essential cmake git ninja-build pkg-config \
libssl-dev libgeoip-dev zlib1g-dev \
libboost-dev libboost-chrono-dev libboost-random-dev libboost-system-dev \
libqt5svg5-dev qtbase5-dev qttools5-dev
- name: install libtorrent from source
run: |
git clone https://github.com/arvidn/libtorrent && cd libtorrent
git checkout ${{ env.LIBTORRENT_VERSION_TAG }}
cmake -B cmake-build-dir -G "Ninja" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-Ddeprecated-functions=OFF \
--graphviz=cmake-build-dir/target_graph.dot
cmake --build cmake-build-dir
sudo cmake --install cmake-build-dir --prefix /usr/local
- name: build qBittorrent
run: |
cmake -B build -G "Ninja" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-D${{ matrix.qbt_gui }} \
-DVERBOSE_CONFIGURE=ON \
--graphviz=build/target_graph.dot
cmake --build build
- name: upload artifact as zip
uses: actions/upload-artifact@v2
with:
name: qBittorrent-CI_${{ matrix.os }}-x64_${{ matrix.qbt_gui }}
path: |
build/compile_commands.json
build/target_graph.dot
build/qbittorrent
build/qbittorrent-nox
libtorrent/cmake-build-dir/compile_commands.json
libtorrent/cmake-build-dir/target_graph.dot
ci_windows:
name: Windows + vcpkg
runs-on: windows-2019
defaults:
run:
shell: pwsh
steps:
- name: checkout repository
uses: actions/checkout@v2
# - ninja is needed for building qBittorrent (because it's preferrable, not a hard requirement)
- name: install additional required packages with chocolatey
run: |
choco install ninja
- name: setup vcpkg (cached, if possible)
uses: lukka/run-vcpkg@v4
with:
vcpkgDirectory: ${{ env.VCPKG_DEST_WIN }}
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
setupOnly: true
# Tell vcpkg to only build Release variants of the dependencies
- name: configure vcpkg triplet overlay for release builds only
run: |
New-Item -Path ${{ github.workspace }} -Name "triplets_overlay" -ItemType Directory
Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-windows-static.cmake `
${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake
Add-Content ${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake `
-Value "set(VCPKG_BUILD_TYPE release)"
# clear buildtrees after each package installation to reduce disk space requirements
- name: install dependencies via vcpkg
run: |
$packages = `
"boost-circular-buffer:x64-windows-static-release",
"libtorrent:x64-windows-static-release",
"qt5-base:x64-windows-static-release",
"qt5-svg:x64-windows-static-release",
"qt5-tools:x64-windows-static-release",
"qt5-winextras:x64-windows-static-release"
foreach($package in $packages)
{
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe install $package `
--overlay-triplets=${{ github.workspace }}/triplets_overlay `
--clean-after-build
}
# NOTE: this is necessary to correctly find and use cl.exe with the Ninja generator for now
- name: setup devcmd
uses: ilammy/msvc-dev-cmd@v1
- name: build qBittorrent
shell: cmd
run: |
cmake -B build -G "Ninja" ^
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ^
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_DEST_WIN }}\scripts\buildsystems\vcpkg.cmake ^
-DVCPKG_TARGET_TRIPLET=x64-windows-static-release ^
-DVERBOSE_CONFIGURE=ON ^
-DMSVC_RUNTIME_DYNAMIC=OFF ^
--graphviz=build\target_graph.dot
cmake --build build
- name: upload artifact as zip
uses: actions/upload-artifact@v2
with:
name: qBittorrent-CI_Windows-x64
path: |
build/compile_commands.json
build/target_graph.dot
build/qbittorrent.exe
build/qbittorrent.pdb
dist/windows/qt.conf
ci_macos:
name: macOS + vcpkg
strategy:
matrix:
qbt_gui: ["GUI=ON", "GUI=OFF"]
fail-fast: false
runs-on: macos-10.15
defaults:
run:
shell: pwsh
steps:
- name: checkout repository
uses: actions/checkout@v2
# - ninja is needed for building qBittorrent (because it's preferrable, not a hard requirement)
# - automake is needed for the installation the vcpkg installation of fontconfig, a dependency of qt5-base
- name: install additional required packages with homebrew
shell: bash
run: |
brew install automake ninja
- name: setup vcpkg (cached, if possible)
uses: lukka/run-vcpkg@v4
with:
vcpkgDirectory: ${{ env.VCPKG_DEST_MACOS }}
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
setupOnly: true
- name: configure vcpkg triplet overlay for release builds only
run: |
New-Item -Path ${{ github.workspace }} -Name "triplets_overlay" -ItemType Directory
Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-osx.cmake `
${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake
Add-Content ${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake `
-Value "set(VCPKG_BUILD_TYPE release)","set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15)"
# NOTE: Avoids a libtorrent ABI issue. See https://github.com/arvidn/libtorrent/issues/4965
- name: force AppleClang to compile libtorrent with C++17
run: |
(Get-Content -path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake).Replace( `
'${FEATURE_OPTIONS}', '${FEATURE_OPTIONS} -DCMAKE_CXX_STANDARD=17') `
| Set-Content -Path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake
- name: install dependencies via vcpkg
run: |
$packages = `
"boost-circular-buffer:x64-osx-release",
"libtorrent:x64-osx-release",
"qt5-base:x64-osx-release",
"qt5-svg:x64-osx-release",
"qt5-tools:x64-osx-release",
"qt5-macextras:x64-osx-release"
foreach($package in $packages)
{
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg install $package `
--overlay-triplets=${{ github.workspace }}/triplets_overlay `
--clean-after-build
}
- name: build qBittorrent
shell: bash
run: |
cmake -B build -G "Ninja" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_DEST_MACOS }}/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_TARGET_TRIPLET=x64-osx-release \
-D${{ matrix.qbt_gui }} \
-DVERBOSE_CONFIGURE=ON \
--graphviz=build/target_graph.dot
cmake --build build
- name: upload artifact as zip
uses: actions/upload-artifact@v2
with:
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}
path: |
build/compile_commands.json
build/target_graph.dot
build/qbittorrent.app
build/qbittorrent-nox.app

85
.github/workflows/file_health.sh vendored Executable file
View File

@@ -0,0 +1,85 @@
#!/usr/bin/env zsh
set -o nounset
# Assumption: file names don't contain `:` (for the `cut` invocation).
# Safe to assume, as such a character in a filename would cause trouble on Windows, a platform we support
# any regression turn this non-zero
regressions=0
# exclusions (these are just grep extended regular expressions to match against paths relative to the root of the repository)
exclusions_nonutf8='(.*(7z|gif|ic(ns|o)|png|qm|zip))'
exclusions_bom='src/base/unicodestrings.h'
exclusions_tw='(*.ts)|src/webui/www/private/scripts/lib/mootools-1.2-more.js'
exclusions_trailing_newline='configure'
exclusions_no_lf='(*.ts)|(.*svg)|compile_commands.json|src/webui/www/private/scripts/lib/mootools-1.2-(core-yc.js|more.js)'
echo -e "\n*** Detect files not encoded in UTF-8 ***\n"
find . -path ./build -prune -false -o -path ./.git -prune -false -o -type f -exec file --mime {} \; | sort \
| grep -v -e "charset=us-ascii" -e "charset=utf-8" | cut -d ":" -f 1 \
| grep -E -v -e "${exclusions_nonutf8}" \
| tee >(echo -e "--> Files not encoded in UTF-8: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
regressions=$((regressions+$?))
echo -e "\n*** Detect files encoded in UTF-8 with BOM ***\n"
grep --exclude-dir={.git,build} -rIl $'\xEF\xBB\xBF' | sort \
| grep -E -v -e "${exclusions_bom}" \
| tee >(echo -e "--> Files encoded in UTF-8 with BOM: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
regressions=$((regressions+$?))
echo -e "\n*** Detect usage of CR byte ***\n"
grep --exclude-dir={.git,build} -rIlU $'\x0D' | sort \
| tee >(echo -e "--> Usage of CR byte: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
regressions=$((regressions+$?))
echo -e "\n*** Detect trailing whitespace in lines ***\n"
grep --exclude-dir={.git,build} -rIl "[[:blank:]]$" | sort \
| grep -E -v -e "${exclusions_tw}" \
| tee >(echo -e "--> Trailing whitespace in lines: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0';
regressions=$((regressions+$?))
echo -e "\n*** Detect too many trailing newlines ***\n"
find . -path ./build -prune -false -o -path ./.git -prune -false -o -type f -exec file --mime {} \; | sort \
| grep -e "charset=us-ascii" -e "charset=utf-8" | cut -d ":" -f 1 \
| grep -E -v -e "${exclusions_trailing_newline}" \
| xargs -L1 -I my_input bash -c 'test "$(tail -q -c2 "my_input" | hexdump -C | grep "0a 0a")" && echo "my_input"' \
| tee >(echo -e "--> Too many trailing newlines: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
regressions=$((regressions+$?))
echo -e "\n*** Detect no trailing newline ***\n"
find . -path ./build -prune -false -o -path ./.git -prune -false -o -type f -exec file --mime {} \; | sort \
| grep -e "charset=us-ascii" -e "charset=utf-8" | cut -d ":" -f 1 \
| grep -E -v -e "${exclusions_no_lf}" \
| xargs -L1 -I my_input bash -c 'test "$(tail -q -c1 "my_input" | hexdump -C | grep "0a")" || echo "my_input"' \
| tee >(echo -e "--> No trailing newline: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
regressions=$((regressions+$?))
echo -e "\n*** Detect translation closing tag in new line ***\n"
grep --exclude-dir={.git,build} -nri "^</translation>" | sort \
| cut -d ":" -f 1,2 \
| tee >(echo -e "--> Translation closing tag in new line: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
regressions=$((regressions+$?))
if [ "$regressions" -ne 0 ]; then
regressions=1
echo "\nFile health regressions found. Please fix them (or add them as exclusions)."
else
echo "All OK, no file health regressions found."
fi
exit $regressions;

27
.github/workflows/file_health.yaml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: GitHub Actions file health check
on:
push:
branches: [ '**' ]
pull_request:
types: [edited, opened, reopened, synchronize]
branches: [ '**' ]
jobs:
check_file_health:
name: Check file health
runs-on: ubuntu-20.04
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: install zsh
run: |
sudo apt update
sudo apt install zsh
- name: run check file health script
run: |
./.github/workflows/file_health.sh

10
.gitignore vendored
View File

@@ -4,6 +4,8 @@ src/qbittorrent
src/qbittorrent-nox
src/release
src/debug
src/base/version.h
CMakeLists.txt.user*
qbittorrent.pro.user*
conf.pri
Makefile*
@@ -22,6 +24,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 +37,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

@@ -62,7 +62,7 @@ Images Authors:
copyright: Mateusz Tobola <tobejodok@qbittorrent.org>
license: GPLv2
* file: src/icons/skin/tabs.gif
* file: src/icons/tabs.gif
copyright: Greg Houston <gregory.houston@gmail.com>
license: MIT
@@ -87,7 +87,7 @@ Images Authors:
* file: src/icons/oxygen/checked.png
copyright: Victor Buinsky <allok.victor@gmail.com>
* file: src/icons/skin/ratio.png
copyright: Fatcow Web Hosting
license: Creative Commons Attribution 3.0 License

View File

@@ -1,56 +1,65 @@
cmake_minimum_required(VERSION 3.5)
cmake_policy(VERSION 3.5)
cmake_minimum_required(VERSION 3.16 FATAL_ERROR) # Policies <= CMP0097 default to NEW
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
include(FunctionReadVersion)
read_version("${CMAKE_CURRENT_SOURCE_DIR}/version.pri" VER_MAJOR VER_MINOR VER_BUGFIX VER_BUILD VER_STATUS)
# message(STATUS "Project version is: ${VER_MAJOR}.${VER_MINOR}.${VER_BUGFIX}.${VER_BUILD} (${VER_STATUS})")
project(qBittorrent
DESCRIPTION "The qBittorrent BitTorrent client"
HOMEPAGE_URL "https://www.qbittorrent.org/"
LANGUAGES CXX
)
project(qBittorrent VERSION ${VER_MAJOR}.${VER_MINOR}.${VER_BUGFIX}.${VER_BUILD})
# use CONFIG mode first in find_package
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
# version requirements - older vesions may work, but you are on your own
set(minBoostVersion 1.65)
set(minQtVersion 5.9.5)
set(minOpenSSLVersion 1.1.1)
set(minLibtorrentVersion 1.2.11)
set(minZlibVersion 1.2.11)
set(PROJECT_VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_BUGFIX}")
if (NOT VER_BUILD EQUAL 0)
set(PROJECT_VERSION "${PROJECT_VERSION}.${VER_BUILD}")
# features (some are platform-specific)
include(CheckCXXSourceCompiles) # TODO: migrate to CheckSourceCompiles in CMake >= 3.19
include(FeatureSummary)
include(FeatureOptionsSetup)
feature_option(STACKTRACE "Enable stacktraces" ON)
feature_option(GUI "Build GUI application" ON)
feature_option(WEBUI "Enables built-in HTTP server for headless use" ON)
feature_option(VERBOSE_CONFIGURE "Show information about PACKAGES_FOUND and PACKAGES_NOT_FOUND in the configure output (only useful for debugging the CMake build scripts)" OFF)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
feature_option_dependent(DBUS
"Enables support for notifications and power-management features on Linux via D-Bus"
ON "GUI" OFF
)
feature_option_dependent(SYSTEMD
"Install systemd service file to a directory manually overridable with Systemd_SERVICES_INSTALL_DIR"
OFF "NOT GUI" OFF
)
if (STACKTRACE)
check_cxx_source_compiles(
"#include <execinfo.h>
int main(){return 0;}"
QBITTORRENT_HAS_EXECINFO_H
)
if (NOT QBITTORRENT_HAS_EXECINFO_H)
message(FATAL_ERROR "execinfo.h header file not found.\n"
"Please either disable the STACKTRACE feature or use a libc that has this header file, such as glibc (GNU libc)."
)
endif()
endif()
elseif (MSVC)
feature_option(MSVC_RUNTIME_DYNAMIC "Use MSVC dynamic runtime library (-MD) instead of static (-MT)" ON)
endif()
set(PROJECT_VERSION "${PROJECT_VERSION}${VER_STATUS}")
add_definitions(-DQBT_VERSION_MAJOR=${VER_MAJOR})
add_definitions(-DQBT_VERSION_MINOR=${VER_MINOR})
add_definitions(-DQBT_VERSION_BUGFIX=${VER_BUGFIX})
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)
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)
include(GNUInstallDirs)
add_subdirectory(src)
add_subdirectory(dist)
if (VERBOSE_CONFIGURE)
feature_summary(WHAT ALL)
else()
feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES)
endif()
# Generate version header
file(READ "src/base/version.h.in" versionHeader)
file(WRITE "src/base/version.h" "${versionHeader}")

File diff suppressed because it is too large Load Diff

View File

@@ -138,7 +138,7 @@ These are unstable/unsupported platforms, and in all likelihood, whatever the is
* **For performance-related issues**, include as much profiling data as you can (resource usage graphs, etc).
* Paste the **qBittorrent log** (or put the contents of the log in a gist and provide a link to the gist). The log can be viewed in the GUI (View -> Log -> tick all boxes). If you can't do that, the file is at:
- Linux: `~/.local/share/data/qBittorrent/logs/qBittorrent.log`
- Linux: `~/.local/share/qBittorrent/logs/qBittorrent.log`
- Windows: `%LocalAppData%\qBittorrent\logs`
- macOS: `~/Library/Application Support/qBittorrent/qBittorrent.log`

533
Changelog

File diff suppressed because it is too large Load Diff

69
INSTALL
View File

@@ -1,54 +1,47 @@
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.65
- libtorrent-rasterbar >= 1.2.11 (by Arvid Norberg)
* https://www.libtorrent.org/
* Be careful: another library (the one used by rTorrent) uses a similar name
- OpenSSL >= 1.1.1
- Qt >= 5.9.5
- zlib >= 1.2.11
- pkg-config (compile-time only on *nix systems)
- Python >= 3.5.0 (optional, runtime only)
* Required by the internal search engine
Dependency version numbers are bumped every once in a while to keep the range of properly tested configurations manageable, even if not strictly required to build.
You may be able to build with older versions of (some of) the dependencies other than the minimum versions specified in the build scripts, but support for such builds is not provided - you are on your own.
Please ensure you are building with an officially supported configuration when reporting bugs.
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

@@ -3,6 +3,7 @@ qBittorrent - A BitTorrent client in Qt
[![TravisCI Status](https://travis-ci.org/qbittorrent/qBittorrent.svg?branch=master)](https://travis-ci.org/qbittorrent/qBittorrent)
[![AppVeyor Status](https://ci.appveyor.com/api/projects/status/github/qbittorrent/qBittorrent?branch=master&svg=true)](https://ci.appveyor.com/project/qbittorrent/qBittorrent)
[![GitHub Actions CI Status](https://github.com/qbittorrent/qBittorrent/workflows/GitHub%20Actions%20CI/badge.svg)](https://github.com/qbittorrent/qBittorrent/actions)
[![Coverity Status](https://scan.coverity.com/projects/5494/badge.svg)](https://scan.coverity.com/projects/5494)
********************************
### Description:
@@ -13,8 +14,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:

1
TODO
View File

@@ -1,2 +1 @@
See https://blueprints.launchpad.net/qbittorrent/

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:

19
build_dist.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
# get version numbers
versionSrc="src/base/version.h.in"
versionMajor="$(grep -Po '(?<=QBT_VERSION_MAJOR )\d+' "$versionSrc")"
versionMinor="$(grep -Po '(?<=QBT_VERSION_MINOR )\d+' "$versionSrc")"
versionBugfix="$(grep -Po '(?<=QBT_VERSION_BUGFIX )\d+' "$versionSrc")"
versionBuild="$(grep -Po '(?<=QBT_VERSION_BUILD )\d+' "$versionSrc")"
versionStatus="$(grep -Po '(?<=QBT_VERSION_STATUS ")\w+' "$versionSrc")"
if [ "$versionBuild" != "0" ]; then
projectVersion="$versionMajor.$versionMinor.$versionBugfix.$versionBuild$versionStatus"
else
projectVersion="$versionMajor.$versionMinor.$versionBugfix$versionStatus"
fi
# pack archives
git archive --format=tar --prefix="qbittorrent-$projectVersion/" HEAD | gzip -9 > "qbittorrent-$projectVersion.tar.gz"
git archive --format=tar --prefix="qbittorrent-$projectVersion/" HEAD | xz -9 > "qbittorrent-$projectVersion.tar.xz"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
# Helper functions for coupling add_feature_info() or CMAKE_DEPENDENT_OPTION() and option()
function(feature_option _name _description _default)
string(CONCAT _desc "${_description} (default: ${_default})")
option("${_name}" "${_desc}" "${_default}")
add_feature_info("${_name}" "${_name}" "${_desc}")
endfunction()
include(CMakeDependentOption)
function(feature_option_dependent _name _description _default_opt _dependency _default_dep_not_sat)
string(CONCAT _desc "${_description} (default: ${_default_opt}; depends on condition: ${_dependency})")
CMAKE_DEPENDENT_OPTION("${_name}" "${_desc}" "${_default_opt}" "${_dependency}" "${_default_dep_not_sat}")
add_feature_info("${_name}" "${_name}" "${_desc}")
endfunction()

View File

@@ -1,127 +0,0 @@
# - Try to find libtorrent-rasterbar
#
# If not using pkg-config, you can pre-set LibtorrentRasterbar_CUSTOM_DEFINITIONS
# for definitions unrelated to Boost's separate compilation (which are already
# decided by the LibtorrentRasterbar_USE_STATIC_LIBS variable).
#
# Once done this will define
# LibtorrentRasterbar_FOUND - System has libtorrent-rasterbar
# LibtorrentRasterbar_INCLUDE_DIRS - The libtorrent-rasterbar include directories
# LibtorrentRasterbar_LIBRARIES - The libraries needed to use libtorrent-rasterbar
# LibtorrentRasterbar_DEFINITIONS - Compiler switches required for using libtorrent-rasterbar
# LibtorrentRasterbar_OPENSSL_ENABLED - libtorrent-rasterbar uses and links against OpenSSL
find_package(Threads REQUIRED)
find_package(PkgConfig QUIET)
macro(_detect_boost_components _outComponets librariesList)
string(REGEX MATCHALL "boost_[a-z_]+[-a-z]*" _boost_libraries "${librariesList}")
string(REGEX REPLACE "boost_([a-z_]+)[-a-z]*" "\\1" ${_outComponets} "${_boost_libraries}")
endmacro()
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_LIBTORRENT_RASTERBAR QUIET libtorrent-rasterbar)
endif()
if(LibtorrentRasterbar_USE_STATIC_LIBS)
set(LibtorrentRasterbar_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
endif()
if(PC_LIBTORRENT_RASTERBAR_FOUND)
set(LibtorrentRasterbar_DEFINITIONS ${PC_LIBTORRENT_RASTERBAR_CFLAGS})
else()
if(LibtorrentRasterbar_CUSTOM_DEFINITIONS)
set(LibtorrentRasterbar_DEFINITIONS ${LibtorrentRasterbar_CUSTOM_DEFINITIONS})
else()
# Without pkg-config, we can't possibly figure out the correct build flags.
# 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_OPENSSL
-DTORRENT_DISABLE_GEO_IP
-DBOOST_ASIO_ENABLE_CANCELIO
-DUNICODE -D_UNICODE -D_FILE_OFFSET_BITS=64)
endif()
if(NOT LibtorrentRasterbar_USE_STATIC_LIBS)
list(APPEND LibtorrentRasterbar_DEFINITIONS
-DTORRENT_LINKING_SHARED
-DBOOST_SYSTEM_DYN_LINK -DBOOST_CHRONO_DYN_LINK)
endif()
endif()
message(STATUS "libtorrent definitions: ${LibtorrentRasterbar_DEFINITIONS}")
find_path(LibtorrentRasterbar_INCLUDE_DIR libtorrent
HINTS ${PC_LIBTORRENT_RASTERBAR_INCLUDEDIR} ${PC_LIBTORRENT_RASTERBAR_INCLUDE_DIRS}
PATH_SUFFIXES libtorrent-rasterbar)
find_library(LibtorrentRasterbar_LIBRARY NAMES torrent-rasterbar libtorrent
HINTS ${PC_LIBTORRENT_RASTERBAR_LIBDIR} ${PC_LIBTORRENT_RASTERBAR_LIBRARY_DIRS})
if(LibtorrentRasterbar_USE_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${LibtorrentRasterbar_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()
set(LibtorrentRasterbar_LIBRARIES ${LibtorrentRasterbar_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
set(LibtorrentRasterbar_INCLUDE_DIRS ${LibtorrentRasterbar_INCLUDE_DIR})
# Without pkg-config, we can't possibly figure out the correct boost dependencies
if (LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES)
set(_boost_components "${LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES}")
else(LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES)
if(PC_LIBTORRENT_RASTERBAR_FOUND)
_detect_boost_components(_boost_components "${PC_LIBTORRENT_RASTERBAR_LIBRARIES}")
else()
# all possible boost dependencies
set(_boost_components
date_time
system
chrono
random
thread
)
endif()
endif(LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES)
list(SORT _boost_components)
message(STATUS "Libtorrent Boost dependencies: ${_boost_components}")
find_package(Boost REQUIRED COMPONENTS ${_boost_components})
set(LibtorrentRasterbar_LIBRARIES ${LibtorrentRasterbar_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
foreach(_boost_cmpnt IN LISTS _boost_components)
list(APPEND LibtorrentRasterbar_LIBRARIES "Boost::${_boost_cmpnt}")
endforeach(_boost_cmpnt)
set(LibtorrentRasterbar_INCLUDE_DIRS ${LibtorrentRasterbar_INCLUDE_DIRS})
list(FIND LibtorrentRasterbar_DEFINITIONS -DTORRENT_USE_OPENSSL LibtorrentRasterbar_ENCRYPTION_INDEX)
if(LibtorrentRasterbar_ENCRYPTION_INDEX GREATER -1)
find_package(OpenSSL REQUIRED)
set(LibtorrentRasterbar_LIBRARIES ${LibtorrentRasterbar_LIBRARIES} OpenSSL::SSL OpenSSL::Crypto)
set(LibtorrentRasterbar_OPENSSL_ENABLED ON)
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LibtorrentRasterbar_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(LibtorrentRasterbar DEFAULT_MSG
LibtorrentRasterbar_LIBRARY
LibtorrentRasterbar_INCLUDE_DIR)
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)
set_target_properties(LibtorrentRasterbar::LibTorrent PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${LibtorrentRasterbar_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LibtorrentRasterbar_INCLUDE_DIRS}"
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${LibtorrentRasterbar_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${LibtorrentRasterbar_LIBRARIES}"
INTERFACE_COMPILE_OPTIONS "${LibtorrentRasterbar_DEFINITIONS}"
)
endif()

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

@@ -8,7 +8,7 @@ find_package(PkgConfig QUIET REQUIRED)
if (NOT SYSTEMD_FOUND)
pkg_check_modules(SYSTEMD "systemd")
endif(NOT SYSTEMD_FOUND)
endif()
if (SYSTEMD_FOUND AND "${SYSTEMD_SERVICES_INSTALL_DIR}" STREQUAL "")
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
@@ -23,4 +23,4 @@ endif()
if (SYSTEMD_FOUND)
message(STATUS "systemd services install dir: ${SYSTEMD_SERVICES_INSTALL_DIR}")
endif(SYSTEMD_FOUND)
endif()

View File

@@ -1,28 +0,0 @@
# function for parsing version variables that are set in version.pri file
# the version identifiers there are defined as follows:
# VER_MAJOR = 3
# VER_MINOR = 4
# VER_BUGFIX = 0
# VER_BUILD = 0
# VER_STATUS = alpha
function(read_version priFile outMajor outMinor outBugfix outBuild outStatus)
file(STRINGS ${priFile} _priFileContents REGEX "^VER_.+")
# message(STATUS "version.pri version contents: ${_priFileContents}")
# the _priFileContents variable contains something like the following:
# VER_MAJOR = 3;VER_MINOR = 4;VER_BUGFIX = 0;VER_BUILD = 0;VER_STATUS = alpha # Should be empty for stable releases!
set(_regex "VER_MAJOR += +([0-9]+);VER_MINOR += +([0-9]+);VER_BUGFIX += +([0-9]+);VER_BUILD += +([0-9]+);VER_STATUS += +([0-9A-Za-z]+)?")
# note quotes around _regex, they are needed because the variable contains semicolons
string(REGEX MATCH "${_regex}" _tmp "${_priFileContents}")
if (NOT _tmp)
message(FATAL_ERROR "Could not detect project version number from ${priFile}")
endif()
# message(STATUS "Matched version string: ${_tmp}")
set(${outMajor} ${CMAKE_MATCH_1} PARENT_SCOPE)
set(${outMinor} ${CMAKE_MATCH_2} PARENT_SCOPE)
set(${outBugfix} ${CMAKE_MATCH_3} PARENT_SCOPE)
set(${outBuild} ${CMAKE_MATCH_4} PARENT_SCOPE)
set(${outStatus} ${CMAKE_MATCH_5} PARENT_SCOPE)
endfunction()

View File

@@ -1,38 +0,0 @@
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
)
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()
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

@@ -1,28 +0,0 @@
# - macro similar to target_link_libraries, which links Qt components
# names of the components are passed in Qt4/Qt5 agnostic way (Core, DBus, Xml...)
# and the macro links Qt4 ones if QT4_FOUND is set or Qt5 ones if not
macro (target_link_qt_components target)
if (QT4_FOUND)
foreach(_cmp ${ARGN})
if ("${_cmp}" STREQUAL "PRIVATE" OR
"${_cmp}" STREQUAL "PUBLIC" OR
"${_cmp}" STREQUAL "INTERFACE")
list(APPEND _QT_CMPNTS "${_cmp}")
else()
list(APPEND _QT_CMPNTS "Qt4::Qt${_cmp}")
endif()
endforeach()
else (QT4_FOUND)
foreach(_cmp ${ARGN})
if ("${_cmp}" STREQUAL "PRIVATE" OR
"${_cmp}" STREQUAL "PUBLIC" OR
"${_cmp}" STREQUAL "INTERFACE")
list(APPEND _QT_CMPNTS "${_cmp}")
else()
list(APPEND _QT_CMPNTS "Qt5::${_cmp}")
endif()
endforeach()
endif (QT4_FOUND)
target_link_libraries(${target} ${_QT_CMPNTS})
endmacro()

View File

@@ -0,0 +1,91 @@
# Set common variables and create some interface-only library targets
# that some or all other targets will link to, either directly or transitively,
# to consume common compile options/definitions
macro(qbt_common_config)
# treat value specified by the CXX_STANDARD target property as a requirement by default
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_library(qbt_common_cfg INTERFACE)
# Full C++ 17 support is required
# See also https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html
# for a breakdown of the features that CMake recognizes for each C++ standard
target_compile_features(qbt_common_cfg INTERFACE
cxx_std_17
)
target_compile_definitions(qbt_common_cfg INTERFACE
QT_DEPRECATED_WARNINGS
QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_BYTEARRAY
QT_USE_QSTRINGBUILDER
QT_STRICT_ITERATORS
$<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG_OUTPUT>
)
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_compile_definitions(qbt_common_cfg INTERFACE
NTDDI_VERSION=0x06010000
_WIN32_WINNT=0x0601
_WIN32_IE=0x0601
WIN32_LEAN_AND_MEAN
NOMINMAX
UNICODE
_UNICODE
)
endif()
if ((CXX_COMPILER_ID STREQUAL "GNU") OR (CXX_COMPILER_ID STREQUAL "Clang") OR (CXX_COMPILER_ID STREQUAL "AppleClang"))
target_compile_options(qbt_common_cfg INTERFACE
-Wall
-Wextra
-Wcast-qual
-Wcast-align
-Winvalid-pch
-Woverloaded-virtual
-Wold-style-cast
-Wnon-virtual-dtor
-pedantic
-pedantic-errors
)
# Clang 11 still doesn't support -Wstrict-null-sentinel
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-Wstrict-null-sentinel SNS_SUPPORT)
if (SNS_SUPPORT)
target_compile_options(qbt_common_cfg INTERFACE -Wstrict-null-sentinel)
endif()
endif()
if ((CXX_COMPILER_ID STREQUAL "Clang") OR (CXX_COMPILER_ID STREQUAL "AppleClang"))
target_compile_options(qbt_common_cfg INTERFACE
-Wno-range-loop-analysis
)
endif()
if (MINGW)
target_link_options(qbt_common_cfg INTERFACE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:LINKER:--dynamicbase>)
endif()
if (MSVC_RUNTIME_DYNAMIC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
else()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
if (MSVC)
target_compile_options(qbt_common_cfg INTERFACE
/guard:cf
/utf-8
)
target_link_options(qbt_common_cfg INTERFACE
/guard:cf
$<$<NOT:$<CONFIG:Debug>>:/OPT:REF /OPT:ICF>
# suppress linking warning due to /INCREMENTAL and /OPT:ICF being both ON
$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL:NO>
)
endif()
endmacro(qbt_common_config)

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