Commit graph

8766 commits

Author SHA1 Message Date
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
sledgehammer999
6ca2e42bca
Merge pull request #8715 from glassez/max-ratio
Fix setting preferences via WebAPI. Closes #7335
2018-04-09 23:08:12 +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
Mike Tzou
3301e9cb69
Merge pull request #8690 from Chocobo1/options
Avoid showing an empty row in AdvancedSettings
2018-04-08 13:14:21 +08:00
Chocobo1
cf2c0bd47e
Apply formatting to Web UI files 2018-04-07 21:45:56 +08:00
Mike Tzou
df0c5c41c5
Merge pull request #8681 from dzmat/uncrutify_tinkering
Make uncrustify.cfg available to QtCreator IDE
2018-04-05 21:43:32 +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
dzmat
883d4d81d5 Make uncrustify.cfg available to Qt Creator IDE 2018-04-03 18:35:28 +07:00
Mike Tzou
041b86981f
Merge pull request #8665 from Chocobo1/iostream
Use lightweight printf instead of iostream
2018-04-02 20:17:12 +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
Mike Tzou
e90be67fec
Merge pull request #8640 from Chocobo1/guide2
Clarify braces usages in CODING_GUIDELINES
2018-04-01 18:16:04 +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
Mike Tzou
ccc91e2e52
Merge pull request #8629 from Chocobo1/guide
Extend Coding Guidelines to cover other languages
2018-03-30 14:31:55 +08:00
Chocobo1
d31954761f
Clarify braces usages in CODING_GUIDELINES
Merge "Curly braces" & "If blocks" sections into "New lines & curly braces" section.

Add note about the list is not exhaustive and style can be determine on code review.
2018-03-29 02:50:48 +08:00
Mike Tzou
aa122b062e
Merge pull request #8615 from Chocobo1/watcher
Improve FS watcher
2018-03-27 14:34:08 +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
Mike Tzou
f564e8a1c4
Merge pull request #8621 from Chocobo1/html5
Update WebUI to be more compliant with HTML5 standard
2018-03-24 22:41:31 +08:00
Chocobo1
315d9835b2
Extend Coding Guidelines to cover other languages 2018-03-23 15:21:50 +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
Mike Tzou
e1a14007f8
Merge pull request #8618 from Piccirello/remove-css
Remove unused CSS from WebUI login page
2018-03-23 00:02:12 +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