Commit graph

8579 commits

Author SHA1 Message Date
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 (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 (Glassez)
60ffa3030e
Don't use deprecated libtorrent features 2019-07-21 19:28:28 +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
Chocobo1
4a90716843
Add override keyword to functions 2019-07-19 11:58:56 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
silverqx
3e97793ef1
Focus behavior row in Options dialog 2019-06-13 17:31:54 +02: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
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
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
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 (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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Chocobo1
4bf4313862
Initialize class variable via constructor 2019-04-08 23:29:14 +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
Mike Tzou
e499317695
Merge pull request #10396 from Chocobo1/webui
Document current WebUI browser compatibility
2019-03-26 13:02:14 +08: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
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
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