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
Vladimir Golovnev (Glassez)
34295a78f2
Move ByteArray utils into Utils::ByteArray namespace
2018-03-02 17:23:21 +03:00
Mike Tzou
57163612ff
Merge pull request #8427 from Chocobo1/server2
...
Rewrite RequestParser
2018-03-02 16:07:12 +08:00
Tom Piccirello
1a9b009951
Enable Statistics window to be scrolled and resized
...
Text may go offscreen due to translations.
2018-03-02 02:18:42 -05:00
Vladimir Golovnev
9406b4b226
Merge pull request #8515 from glassez/webapi
...
Fix Legacy Web API to be fully available
2018-03-01 09:44:06 +03:00
Mike Tzou
38dc6ab8cf
Merge pull request #8441 from Chocobo1/runExt
...
Revert back to QLineEdit for "Run external program". Closes #7800 .
2018-03-01 13:23:42 +08:00
Mike Tzou
55c3db339b
Merge pull request #8455 from Chocobo1/large_torrent
...
Fix loading very large torrents. Closes #8449
2018-03-01 13:22:43 +08:00
Vladimir Golovnev (Glassez)
34456a7459
Fix Legacy Web API to be fully available
2018-02-28 18:25:48 +03:00
Vladimir Golovnev
b26eb3d146
Merge pull request #8373 from glassez/search
...
Improve Search handling
2018-02-28 10:46:33 +03:00
Vladimir Golovnev
7cb6100c9c
Merge pull request #8471 from luis-pereira/use-qstring-ref
...
Don't create temporary substrings
2018-02-28 10:44:59 +03:00
sledgehammer999
1c2d9c1fe4
Merge pull request #8510 from adem4ik/patch-2
...
Fix typo in filelogger.cpp message
2018-02-27 17:38:52 +02:00
Mike Tzou
6f7f7d87c6
Merge pull request #8218 from Piccirello/webui-selection-bug
...
Reselect webui torrents after full_update. Temporary fix for #8209 .
2018-02-27 13:33:39 +08:00
Andrei Stepanov
817aadd52d
Fix typo in filelogger.cpp message
2018-02-27 02:00:43 +04:00
Luís Pereira
0e421ae415
Don't create temporary substrings
...
Avoid temporary string allocations. They are only used to convert to
something else.
QString::xxxRef() returns a QStringRef. QStringRef avoids the memory
allocation and reference counting overhead of a standard QString by simply
referencing a part of the original string.
2018-02-26 11:39:36 +00:00
Thomas Piccirello
2227c3afc1
Reselect torrents in WebUI after full update
...
Temp fix for #8209 .
2018-02-25 01:09:06 -05:00
Mike Tzou
050af8a793
Merge pull request #7894 from Piccirello/auto-management
...
Disable options when Force Proxy is enabled
2018-02-25 01:44:58 +08:00
Vladimir Golovnev
6207855f3b
Merge pull request #8372 from thalieht/inactiverate
...
Expose the libtorrent fields for "dont_count_slow_torrents" to GUI.
Closes #5713 .
2018-02-24 14:13:39 +03:00
Vladimir Golovnev
a65a70ab48
Merge pull request #8479 from thalieht/ratioLimitsCrash
...
Fix possible crash when using both share limits
2018-02-24 14:11:09 +03:00
Thomas Piccirello
4110bb874f
Right align stat values
2018-02-23 14:54:31 -05:00
Thomas Piccirello
5c74f374af
Re-order and rename stats
2018-02-23 14:54:24 -05:00
Thomas Piccirello
a8420a43f9
Format Read cache hits as percentage
2018-02-23 14:46:47 -05:00
Vladimir Golovnev (Glassez)
279bce2014
Make SearchManager singleton
2018-02-23 20:26:32 +03:00
Vladimir Golovnev (Glassez)
f3d370870d
Improve Search handling
...
Legacy SearchEngine class really has three roles:
1. Manage search plugins,
2. Handle the search job, and
3. Handle the download of the torrent file using the search plugin.
Now it is splitted into 3 classes: SearchManager, SearchHandler and
SearchDownloadHandler.
Search GUI is also improved.
2018-02-23 20:15:25 +03:00
thalieht
0e30659c26
Fix possible crash when using both share limits
...
Avoid possible crash in "torrent->name()" when processing seeding time of the torrent that already reached the ratio limit.
2018-02-23 17:13:56 +02:00
Chocobo1
f34dfca5e6
Enable Http/1.1 persistence connection
...
This enables reusing existing TCP connection instead of opening a new connection
for every request
2018-02-23 14:46:22 +08:00
Chocobo1
cec68c3fd7
Rewrite RequestParser
...
* Add more checks and also more strict checks for invalid conditions
* Add http version field
* Raise max request size to 64 MB
* Add author in license
* Use Qt5 new connect syntax
2018-02-23 14:46:17 +08:00
Vladimir Golovnev
5c2f698cb4
Merge pull request #8325 from luis-pereira/prevent-c++11-range-loop-detach
...
Prevent possible c++11 range-loop container detach
2018-02-22 16:28:04 +03:00
Chocobo1
f5fc2d52b8
Fix loading very large torrents. Closes #8449 .
...
`torrent_info` constructor has default limits that can't be changed via
parameters, so we handle the loading process manually and explicitly
specifiy the limits to `bdecode()`.
The token_limit is also changed to 10000000.
2018-02-22 18:52:10 +08:00
Mike Tzou
edef85fa3e
Merge pull request #8456 from vit9696/patch-1
...
Fix compilation with Qt 5.11 on macOS
2018-02-21 23:00:55 +08:00
Mike Tzou
6244ad5fa8
Merge pull request #8458 from luis-pereira/qgetenv
...
Use qEnvironmentVariableIsEmpty
2018-02-21 23:00:30 +08:00
Chocobo1
aba23f67a0
Revert back to QLineEdit for "Run external program". Closes #7800
...
1. Using FileSystemPathEdit is not entirely correct, as it only always
shows false warnings when parameters are present.
2. FileSystemPathEdit::selectedPath() modifies the path to unix format,
in this specific case, we need to faithfully execute what user inputted.
3. Given the above it is reasonable to revert back to QLineEdit, as it
is just sufficient in functionality and doesn't modifiy the inputs.
2018-02-21 10:16:32 +08:00
Luís Pereira
1a913c502b
Prevent possible c++11 range-loop container detach
...
Explicit or implicit calls to begin() and end() cause a non-const
container to detach from shared data, ie. to perform a deep-copy to gain
a unique copy of the data.
That can be a expensive although unneeded operation.
In order to assist the developer a copyAsConst function is added.
copyAsConst returns a const copy of the object.
For lvalues just use qAsConst. It's only available on Qt 5.7.0. But we
added also for earlier versions. The developer can always use qAsConst.
Intended uses:
QString s = ...;
for (const auto &ch : qAsConst(s))
process(ch);
for (const auto &ch : copyAsConst(funcReturningQString()))
process(ch);
2018-02-20 19:28:51 +00:00
Vladimir Golovnev
078982ada6
Merge pull request #8424 from glassez/fix-rss
...
Disable Auto TMM when RSS rule has save path. Closes #8411
2018-02-20 11:13:15 +03:00
Vladimir Golovnev
3035184d25
Merge pull request #8445 from glassez/fix-webapi
...
Fix POST params handling. Closes #8443
2018-02-20 11:11:33 +03:00