Commit graph

8041 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
tjjh89017
670a8e27af
Add async io threads option to AdvancedSettings 2018-07-08 22:58:35 +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
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
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
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
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
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
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
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
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
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
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
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 (Glassez)
32e2791f56
Fix compilation with MinGW 2018-05-12 06:24:05 +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
thalieht
4cfa163bbd Use qt5 syntax for a few remaining SLOT() 2018-05-11 08:19:41 +03:00
thalieht
20ca90800d Fix coding style 2018-05-09 17:06:22 +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
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
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
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
Mike Tzou
d8c14ffe97
Merge pull request #8814 from Chocobo1/tr_fix
Fix tr() related issues
2018-05-05 13:48:09 +08:00
sledgehammer999
ea8c57be23
Sync translations from Transifex and run lupdate 2018-05-05 00:39:47 +03:00
sledgehammer999
90bb67c654
Add RSS/Log widgets to the QTabWidget on macOS
Fixes commit a468c84b30
2018-05-04 19:56:42 +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
sledgehammer999
8f7fda492c
Sync translations from Transifex and run lupdate
Closes #8220 #8169
2018-05-01 18:50:24 +03: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
sledgehammer999
f92d85c536
Merge pull request #8813 from Chocobo1/tr
Fix untranslated string
2018-05-01 17:59:49 +03: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
sledgehammer999
6e94b03c13
Fix compilation against libtorrent 1.0.x
Closes #8798
2018-05-01 10:39:53 +03:00
Chocobo1
c61f641613
Fix untranslated string
Closes #8809.
2018-05-01 11:49:10 +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
sledgehammer999
fb346e15e8
Sync translations from Transifex and run lupdate 2018-04-27 02:04:37 +03:00
Chocobo1
8b575484e6
Fix path separator in log messages 2018-04-24 01:02:54 +08:00
sledgehammer999
b78899cb9a
Merge pull request #8724 from Chocobo1/rand
Use RNG provided by OS
2018-04-22 22:33:16 +03:00
Mike Tzou
0dec7b9f4f
Merge pull request #8742 from tostercx/master
Add "Preserve file order" option to torrent creator. Closes #5652
2018-04-22 23:33:25 +08:00
Chocobo1
81a4f3ced0
Use RNG provided by OS
The general consensus is to use random facility provided by OS instead
of using other software random generators.
2018-04-20 23:34:46 +08:00
Chocobo1
970ad7cf28 Sort filenames when creating torrent
First all dir paths are retrieved, then filenames in each path
are retrieved and sorted, then concatenate the sorted filenames together.
2018-04-20 14:35:48 +03:00
toster
c4625f50a8 Pass isAlignmentOptimized flag to piece size calculation 2018-04-20 14:31:20 +03:00
Vladimir Golovnev (Glassez)
001bd38557
Fix pauseAll/resumeAll legacy API methods
Closes #8766.
2018-04-20 14:30:25 +03:00
Chocobo1
68c2d81072
Fix memory leak 2018-04-17 20:34:01 +08:00
Chocobo1
4dea03fc74
Remove unused constants 2018-04-17 20:29:43 +08:00
thalieht
3e4099fe5b Replace the zeroing of pointers with nullptr 2018-04-15 13:06:31 +03:00
Mike Tzou
a70942ed53
Merge pull request #8598 from Piccirello/limit-share-ratio
WebUI Add Limit Share Ratio context menu option
2018-04-15 00:39:27 +08:00
toster
e538eae726 Make alignment optimization optional
Disabling alignment optimization allows preserving file order in torrent
files and closes #5652
2018-04-14 06:46:41 +03:00
Chocobo1
898239a42e
Fix renaming completed files
Check whether the file is already downloaded before appending QB_EXT to
filename.

Closes #8039.
2018-04-12 14:13:59 +08:00
Mike Tzou
1055cc0f45
Merge pull request #8691 from Chocobo1/js
Partially revert "Remove unused JavaScript library"
2018-04-12 00:07:37 +08:00
Thomas Piccirello
9f36b54b04
WebUI Add Limit Share Ratio context menu option
Closes #6815, #7602.
2018-04-11 23:45:54 +08:00
Thomas Piccirello
1f42ab8c4f
Remove unused/superfluous variables 2018-04-11 23:45:54 +08:00
Thomas Piccirello
3f0fbc0810
WebUI rename property to match its definition 2018-04-11 23:45:54 +08:00
sledgehammer999
7e4b62c68d
Merge pull request #8701 from Kolcha/musl-support
Allow to disable Stacktrace support
2018-04-11 17:10:01 +03:00
sledgehammer999
ddba79ef3d
Fix wrong QString::arg() usage that leads to crash
We need to be careful when using the multi-arg version of
QString::arg() and passing as 2nd, 3rd etc parameter an int.
It doesn't do the same as passing multiple QStrings.
2018-04-11 17:01:43 +03:00
Nick Korotysh
7712d0ada0
Allow to disable Stacktrace support
Enable backtrace stuff only if GNU C library used, because current
backtrace implementation based  on  <execinfo.h> , which is not a
part of standard C library, it is a GNU extension.

This will be usefull when building  with  custom POSIX-compilant C
library (like musl) and no <execinfo.h> available.

Note: configure script will detect presence of  <execinfo.h>  and
enable/disable feature depending on it.

Feature is enabled by default.
2018-04-10 20:51:11 +03:00
Mike Tzou
38837db8de
Merge pull request #8699 from Chocobo1/linking
Add helper for loading Windows system functions
2018-04-11 00:13:55 +08:00
sledgehammer999
d997d887e5
Merge pull request #8650 from luis-pereira/fix-invalid-iterator-crash
Fix crashes due to invalid iterator use
2018-04-10 16:18:44 +03:00
sledgehammer999
341a971cd3
Merge pull request #8711 from sledgehammer999/recheck_paused
Avoid data corruption when rechecking paused torrents
2018-04-10 16:18:12 +03:00
Mike Tzou
fa380c8b2c
Merge pull request #8622 from Chocobo1/formatter
Unify coding style for WebUI files
2018-04-10 14:51:32 +08:00
Luís Pereira
758c70283f
Fix crashes due to invalid iterator use
Although the iterators are constant we are indirectly changing them.
Introduced by commit ac42ccb5e4.
Closes #8633
2018-04-09 23:40:08 +03:00
sledgehammer999
747c70a58e
Avoid data corruption when rechecking paused torrents
Libtorrent can recheck only unpaused torrents. We get around this by
unpausing the torrent, issuing the recheck and pausing again after we
get alerted by libtorrent that the recheck has finished. This alert is
asyncronous. There is a small time frame where the program might start
downloading and writing data to the file before we pause it. This can
lead to data corruption if the file on disk is totally different that
the one expected by the torrent AND the file on disk is a valid file on
its own. OR in case the user points the new torrent to the wrong
directory by mistake.
To get around this the torrent is placed in upload_mode and out of
automanagement.
2018-04-09 23:25:52 +03:00
Vladimir Golovnev (Glassez)
cb505a07fe
Fix setting preferences via WebAPI
Closes #7335.
2018-04-09 18:54:43 +03:00
Chocobo1
5819b6dd39
Use Unicode version of InitiateSystemShutdown 2018-04-09 21:18:07 +08:00
Chocobo1
644e7d0450
Use dynamic linking for SetSuspendState function 2018-04-09 21:18:07 +08:00
Chocobo1
b0e3d77975
Add helper for loading Windows system functions 2018-04-09 21:18:04 +08:00
Chocobo1
643a209812
Sort include headers
Also add anonymous namespace.
2018-04-09 21:16:00 +08:00
Mike Tzou
c3311e83a0
Merge pull request #8687 from Chocobo1/folder
Stop creating Download folder on start
2018-04-09 13:20:48 +08:00
Chocobo1
cf2c0bd47e
Apply formatting to Web UI files 2018-04-07 21:45:56 +08:00
Chocobo1
59e6757242
Avoid showing an empty row in AdvancedSettings
Fixup 543cbc6d1c.
2018-04-05 21:34:07 +08:00
Chocobo1
6bbcf9b3d6
Stop creating Download folder on start
The existence of this folder isn't required to run qbt and it can be
created when adding torrent.
Closes #8290.
2018-04-05 14:12:47 +08:00
Chocobo1
208d21ff73
Add js-beautify config
Try to standardize coding style for HTML & JavaScript via this tool
2018-04-05 12:19:54 +08:00
Chocobo1
2df71dbde5
Partially revert "Remove unused JavaScript library"
This reverts commit 470e993c2d.
2018-04-05 03:22:34 +08:00
Mike Tzou
9e4f246c89
Merge pull request #8672 from Chocobo1/js
Move JavaScript libraries to its own folder
2018-04-04 19:23:10 +08:00
Mike Tzou
e4fc8e4156
Merge pull request #8669 from Chocobo1/runext
Split args manually in runExternalProgram()
2018-04-03 22:19:29 +08:00
Chocobo1
470e993c2d
Remove unused JavaScript library 2018-04-02 01:34:49 +08:00
Chocobo1
cbf10ebb7f
Update clipboard.js to v2.0.0 2018-04-02 01:34:49 +08:00
Chocobo1
89f06274bb
Move JavaScript libraries to its own folder 2018-04-02 01:34:43 +08:00
Chocobo1
c07cd440cd
Split args manually in runExternalProgram()
Need to split arguments manually because QProcess::startDetached(QString)
will strip off empty parameters.
E.g. `python.exe "1" "" "3"` will become `python.exe "1" "3"`.
Closes #8454.
2018-04-01 18:42:42 +08:00
Chocobo1
37ea01bd44
Use lightweight printf instead of iostream
Using iostream usually adds a lot of other operators (<<, endl), whereas
*printf takes only 1 function call.

Also use qUtf8Printable whenever possible.
2018-03-31 03:21:53 +08:00
Chocobo1
65921eaf7b
Remove QPointer wrapper 2018-03-25 15:53:31 +08:00
Chocobo1
bfbd978d3f
Move helper function to Utils::Fs 2018-03-25 13:26:03 +08:00
Chocobo1
1876dbd523
Fix typo 2018-03-25 13:26:02 +08:00
Chocobo1
ea7eb7c0ec
Add delay before processing FS changes
This prevents file renaming errors in monitored folder on linux, for
example: ABC.torrent.part -> ABC.torrent
2018-03-25 13:26:02 +08:00
Chocobo1
19c733ce95
Use specific name for rejected files 2018-03-25 13:26:02 +08:00
Chocobo1
2ba5dd1344
Reduce debug messages 2018-03-25 13:26:02 +08:00
Chocobo1
61eddfce90
Refactor functions in FileSystemWatcher
Use c++11 range-loop
Add const
Better ifdef placement
Inline functions
2018-03-25 13:26:02 +08:00
Chocobo1
0840556f77
Do cleanups in FileSystemWatcher
Use Qt5 connect syntax
Sort headers
Add license
Add anonymous namespace
Replace macro defines with const variables
2018-03-25 13:25:28 +08:00
Chocobo1
ed03456999
Update WebUI to be more compliant with HTML5 standard
Use modern and shorter "charset" attribute.
Remove "type", "charset" attributes in script/style tags, these are redundant in HTML5.
2018-03-23 00:04:43 +08:00
Thomas Piccirello
a15cfae03a Fix spacing 2018-03-21 00:04:21 -04:00
Thomas Piccirello
c2a195360a Resolve JavaScript errors 2018-03-21 00:04:21 -04:00
Thomas Piccirello
a4f99995bb Consolidate CSS into style.css 2018-03-21 00:04:18 -04:00
Thomas Piccirello
16616f4e0e Remove unused CSS from WebUI login page 2018-03-20 15:25:04 -04:00
Vladimir Golovnev
a5294e1e08
Merge pull request #8558 from luis-pereira/containter-anti-pattern
Don't create temporary containers just to iterate over them
2018-03-19 13:06:01 +03:00
Vladimir Golovnev
a8dbff06a3
Merge pull request #8607 from glassez/rss
Process loaded RSS articles in case of parsing error
2018-03-19 09:35:30 +03:00
Vladimir Golovnev (Glassez)
d9cd5d4680
Resolve (X)HTML entities in RSS content
Many sites include various HTML entities in the content of RSS feeds.
The most of these entities are not declared in the underlying XML,
so the documents are considered by parser to be malformed.
This patch allows you to successfully parse such soft-malformed
RSS feeds.
Closes #8527.
Closes #8569.
2018-03-18 18:59:55 +03:00
Luís Pereira
ac42ccb5e4
Don't create temporary containers just to iterate over them
Stops temporary containers being created needlessly due to API misuse.
For example, it’s common for developers to assume QHash::values() and
QHash::keys() are free and abuse them, failing to realize their
implementation internally actually iterates the whole container, allocates
memory, and fills a new QList.

Added a removeIf generic algorithm, similar to std ones. We can't use std
algorithms with Qt dictionaries because Qt iterators have different
behavior from the std ones.

Found using clazy.
2018-03-18 16:22:12 +03:00
Mike Tzou
68ca95faf0
Merge pull request #8603 from Chocobo1/typo
Fix typo
2018-03-17 00:49:41 +08:00
Vladimir Golovnev (Glassez)
8d285c66aa
Process loaded RSS articles in case of error
For some reason, the RSS feed may contain malformed XML data and it may not be
successfully parsed by the XML parser. We are still trying to load as many articles
as possible until we encounter corrupted data. So we can have some articles even in
case of parsing error.
Closes #8527.
Closes #8569.
2018-03-16 18:29:38 +03:00
Mike Tzou
1f28122428
Merge pull request #8595 from Chocobo1/runExt
Add Tags parameter to "Run External Program"
2018-03-16 19:37:34 +08:00
Mike Tzou
6ec179e0f7
Merge pull request #8594 from Chocobo1/ui
Properly align text label
2018-03-15 13:41:23 +08:00
Chocobo1
423511765a
Fix typo 2018-03-14 23:37:08 +08:00
Thomas Piccirello
4863078744 Use correct API method URL in WebUI
Fix up 27d8dbf.
Closes #8596.
2018-03-14 03:08:46 -04:00
Chocobo1
88881de8c6
Add Tags parameter to "Run External Program"
Closes #8586.
Also sort headers.
2018-03-14 10:12:32 +08:00
Chocobo1
690c439ae6
Properly align text label 2018-03-14 00:35:20 +08:00
Mike Tzou
e78b5202bc
Merge pull request #8585 from Chocobo1/lint
Fix compiler/clazy warnings
2018-03-13 22:36:10 +08:00
Vladimir Golovnev
c9be1d0a19
Merge pull request #8494 from paolo-sz/master
Fix for "Content" panel messed up
2018-03-13 16:54:05 +03:00
Vladimir Golovnev
3348eef423
Merge pull request #8488 from thalieht/fix
Move suffix-labels inside the corresponding spinboxes
2018-03-12 16:58:05 +03:00
Vladimir Golovnev
931af6c97e
Merge pull request #8313 from Piccirello/search-categories
Calculate search categories based on selected plugin
2018-03-12 14:29:51 +03:00
Vladimir Golovnev
cea2948593
Merge pull request #8556 from Piccirello/compiler-warnings
Fix missing initializer warning during build
2018-03-12 14:28:38 +03:00
Chocobo1
a468c84b30
Fix warnings from unused variables 2018-03-12 14:36:28 +08:00
Thomas Piccirello
7278625f53 Calculate supported categories based on selected plugin 2018-03-12 01:33:45 -04:00
Thomas Piccirello
7b3e692f68 Fix missing initializer warning
This issue occurs when using gcc versions < 5.
2018-03-12 01:21:21 -04:00
Chocobo1
fdb0d97b28
Remove unused function 2018-03-11 23:27:04 +08:00
Chocobo1
08a2439f46
Check directly if container is empty or not 2018-03-11 23:12:16 +08:00
Chocobo1
6767487e40
Remove unused variable 2018-03-11 22:31:17 +08:00
Chocobo1
141a2d2856
Prevent detach from containers 2018-03-11 22:25:07 +08:00
thalieht
2eea57e609 Use spinbox suffix to display time unit 2018-03-11 12:08:00 +02:00
thalieht
0b185e347b Use spinbox suffix to display rate unit 2018-03-11 12:07:38 +02:00
thalieht
1e1db31ab5 Use unique layout names 2018-03-11 12:07:24 +02:00
Mike Tzou
7233274110
Merge pull request #8562 from Chocobo1/lint
Fix warnings from clazy
2018-03-11 12:41:58 +08:00
paolo-sz
d4e2b21534 Fix Content widget misbehavior
Starting from QT 5.10.1 Content widget is messed up and its settings are
lost while restarting.
Setting StretchLastSection property to false seems to solve the issue.
(Closes #8439).
2018-03-10 18:56:18 +01:00
Vladimir Golovnev
4f206f987a
Merge pull request #8561 from glassez/tracker
Properly reply to announce request
2018-03-10 17:08:29 +03:00
Vladimir Golovnev (Glassez)
dfddda57b9
Properly reply to announce request 2018-03-09 17:41:06 +03:00
Mike Tzou
0cacd71503
Merge pull request #8403 from Piccirello/webui-download-height
Make WebUI iframe windows scrollable on iOS. Closes #8401, #7932.
2018-03-09 19:46:29 +08:00
Chocobo1
fdf3ebbb6c
Remove usage of deprecated functions
Also use proper type for storing date/time data
2018-03-09 19:20:58 +08:00
Chocobo1
a3d9e457a0
Add context parameter in connect() 2018-03-09 13:44:17 +08:00
Chocobo1
ffb5c0635e
Remove unused slot declaration for function 2018-03-09 01:50:23 +08:00
Chocobo1
b4f23d8154
Use faster code path
From Qt doc: Using this function is faster than using QFileInfo(file).exists() for
file system access.
2018-03-09 01:34:35 +08:00
Chocobo1
ed310c2dac
Avoid temporary QString allocations
Fix up 0457fd260e
2018-03-09 01:34:35 +08:00
Chocobo1
50167d40d7
Allow ADL lookup for helper function 2018-03-09 01:34:19 +08:00
Mike Tzou
5261d4375f
Merge pull request #8551 from Chocobo1/override
Fix warnings from linters
2018-03-09 00:36:52 +08:00
Thomas Piccirello
0b56cd5fa0 Make WebUI iframe windows scrollable on iOS
Closes #8401, #7932.
2018-03-08 01:30:13 -05:00
Vladimir Golovnev
e22946ef61
Merge pull request #8525 from glassez/url-query
Parse URL query string at application level
2018-03-07 17:16:21 +03:00
Chocobo1
0457fd260e
Avoid temporary QString allocations
This fixes clazy warning: Use multi-arg instead [-Wclazy-qstring-arg]
2018-03-07 20:06:00 +08:00
Chocobo1
c60b7b213e
Add missing 'override' specifier
This fixes clang warning:
'notify' overrides a member function but is not marked 'override'
[-Winconsistent-missing-override]
2018-03-07 20:05:52 +08:00
Chocobo1
307736e263
Fix broken WebUI
Fix up c47e4efade.
Closes #8545.
2018-03-06 14:03:01 +08:00
Mike Tzou
7aa5bc4bc1
Merge pull request #8484 from Piccirello/improve-webui-stats
Improve WebUI stats dialog (addendum to #8349)
2018-03-06 00:49:49 +08:00
Thomas Piccirello
c47e4efade Save WebUI Statistics window size 2018-03-05 01:40:21 -05:00
Vladimir Golovnev (Glassez)
1aca3b0adc
Parse URL query string at application level 2018-03-04 17:08:48 +03:00
Chocobo1
20c4b0ee0c
Use original scheme when downloading favicons
Previously was always using http, now we only drop back to http when
scheme is absent
2018-03-03 12:53:27 +08:00
Chocobo1
3df4a7ac2e
Use https for documentation links 2018-03-03 12:43:59 +08:00