Compare commits

..

859 Commits

Author SHA1 Message Date
sledgehammer999
15e7726233 Bump to 3.3.13 2017-06-01 02:32:05 +03:00
sledgehammer999
9258a9ae78 Update Changelog. 2017-06-01 02:29:53 +03:00
Chocobo1
7c2437e5f2 [WebUI]: Implement CSRF defense
Bump API version
2017-06-01 02:28:07 +03:00
sledgehammer999
dc315c080b Revert "Remove workaround". Required since we also support Qt4 in this branch.
This reverts commit 2ba3104337.
2017-06-01 02:28:06 +03:00
sledgehammer999
971c340b53 Fix format-truncation warning. 2017-06-01 01:19:55 +03:00
Chocobo1
76b9b02177 Fix focusing on the previously opened dialog didn't work
Placing modeless dialog A on top of modeless dialog B, then open dialog B again,
the expected behavior is B on top of A.
2017-06-01 01:19:47 +03:00
sledgehammer999
375c2dfd0b Merge pull request #6876 from evsh/fix-cmake-qt4
cmake: fix compilation with Qt 4
2017-05-31 22:41:11 +03:00
Eugene Shalygin
6a3e7a12d8 cmake: fix compilation with Qt 4
In qmake we define QStringLiteral=QLatin1String, so define it in cmake
builds too.
2017-05-31 19:28:32 +02:00
sledgehammer999
d92ef3fa4d Fix Qt4 build. 2017-05-31 00:34:21 +03:00
Eugene Shalygin
89d4cb257f Fix crash in download piece bar
When torrent size is smaller than the image width, bytes per pixel was
set to zero and code was crashing. Set it to -1 instead, as we do when
image is empty. This will disable highliting, but our algorithm does not
work in this case anyway.
2017-05-31 00:34:21 +03:00
Chocobo1
47ebb0df58 Add new webUI API. Closes #6457.
Now getting piece information for a specific torrent is possible via:

* Returns an array of states (integers) of pieces in order. Defined as:
  "0=not downloaded", "1=downloading", "2=downloaded".
  GET /query/getPieceStates/<torrent_hash>

* Returns an array of hashes (strings) of pieces in order:
  GET /query/getPieceHashes/<torrent_hash>
2017-05-31 00:34:20 +03:00
Chocobo1
71169abaa6 [WebUI] Make cookie parsing robust
Previously cookie name such as "<any string>SID" will be mistakenly
accepted as "SID" session ID, this commit fixes it.

Use QString::isEmpty()
2017-05-31 00:34:19 +03:00
Chocobo1
83dd0ae86e Refactor out helper function Utils::String::unquote
Remove redundant include
2017-05-31 00:34:18 +03:00
Chocobo1
c9500d933b Fix renaming files is not case sensitive on Windows platform. Closes #5128. 2017-05-31 00:34:17 +03:00
Naikel Aparicio
b8787460a4 Fix slow filtering in WebUI. Fixup 7aadf644e0. 2017-05-31 00:34:17 +03:00
Naikel Aparicio
d031264d62 Cosmetic fixes for WebUI upload and download windows 2017-05-31 00:34:16 +03:00
KingLucius
63b408c743 remove ExtraTorrent plugin 2017-05-31 00:34:15 +03:00
Eugene Shalygin
1ac4458d13 cmake: fix FindSystemd.cmake
Apparently, recent version of CMake made PkgConfig stuff scooped and we
need to call find_package(PkgConfig) in FindSystemd.cmake too, the call
in FindLibtorrentRasterbar.cmake, that is always used first, is not
enough now.
2017-05-31 00:34:14 +03:00
Chocobo1
6b91510d71 Set icon height in html instead of js
Fixup of d302e4fb92
2017-05-31 00:34:14 +03:00
Chocobo1
f1a7e8921a [WebUI] Fix connection status icon too large. Closes #6804. 2017-05-31 00:34:13 +03:00
Eugene Shalygin
78c34b948e Fix build error. 2017-05-31 00:34:12 +03:00
Frédéric Brière
690db070c7 Properly sort categories case-insensitively in filter widget. Closes #6708. 2017-05-31 00:34:11 +03:00
Frédéric Brière
0979936266 Turn isSpecialItem() into a CategoryFilterModel static method. 2017-05-31 00:34:11 +03:00
Frédéric Brière
ba23b41616 Set "category" column as case-insensitive in TransferListSortModel.
(From what I can tell, it would appear that the sorting was already
case-insensitive by default.  This makes it explicit.)
2017-05-31 00:34:10 +03:00
Frédéric Brière
412584e9c3 Leave categories order intact in "Add new torrent" dialog.
The categories are already properly sorted in AddNewTorrentDialog; this
second case-sensitive sort undid all that.

This partially addresses #6708.
2017-05-31 00:34:09 +03:00
Thomas Piccirello
13aa3c3088 Use less permissive Content Security Policy
Adjust content order
2017-05-31 00:34:08 +03:00
thalieht
067c406c94 webUI: increase the number of digits after the decimal point 2017-05-31 00:34:08 +03:00
Eugene Shalygin
8536e79f2a cmake: include searchengine resources 2017-05-31 00:34:07 +03:00
Thomas Piccirello
70b98d903e Return status indicating if at least one torrent was successfully added 2017-05-31 00:34:06 +03:00
Chocobo1
1997a29769 Tweak CachedSettingValue
* Add another constructor to save a call to proxyFunc when its not needed
  note that this call is a virtual function call
* Pass in proxyFunc by const reference
* Move get methods together
2017-05-31 00:34:05 +03:00
Chocobo1
f6e4f48386 Fix double click on system tray icon causing program to open and
minimize immediately

Closes #5826.
Simply ignore DoubleClick event, as it always come after Trigger
event
2017-05-31 00:34:05 +03:00
Eugene Shalygin
10002984e6 Follow project coding style. Issue #2192. 2017-05-31 00:34:04 +03:00
Frédéric Brière
2fa2d36c3b findIncompleteFiles(): Replace dir listing with individual checks. Closes #6265.
Looking for incomplete files in a new torrent by using a pre-generated
directory listing presents several disadvantages:

  - It requires us to extract the top-level directory name (in case it
    was renamed).
  - It requires us to know whether the top-level directory was stripped.
  - In the latter case, it may result in recursively traversing the
    entire contents of all downloaded torrents.

Calling QFile::exists() individually for each file solves all these
issues.

In so doing, the handling of single-file and multiple-file torrents are
rendered pretty much identical, and can therefore be merged.
2017-05-31 00:34:03 +03:00
Eugene Shalygin
ceed9b468e Do not attempt to show detailed tooltips without torrent metadata. Closes #6768.
Computations for detailed tooltips are not protected against unavailable
metadata, that leads to asserts or crashes. But since those tooltips are
useless in this case, do not show them at all. Inform user that detailed
tooltip becomes available once torrent metadata are fetched.
2017-05-31 00:34:02 +03:00
sledgehammer999
f19854c054 [WebUI]Use the same layout in the Speed tab in preferences as the GUI. 2017-05-31 00:34:02 +03:00
sledgehammer999
989cbda29c Add missing unit sizes in misc.js 2017-05-31 00:34:01 +03:00
sledgehammer999
881f79b76d [WebUI]Use translatable strings in Statistics dialog. 2017-05-31 00:34:00 +03:00
sledgehammer999
51986f3ac8 [WebUI]Make the context obligatory for translatable strings. Also delete duplicate strings from extra translations. 2017-05-31 00:33:59 +03:00
Eugene Shalygin
943a837570 Fix release CMake build
write() is declared with __attribute__ ((__warn_unused_result__)) and as
such we shall check its return value. Took opportunity and adjusted
error reporting a bit: if writing to stderr fails, try to write to
stdout.
2017-05-31 00:33:59 +03:00
Chocobo1
a6cf386073 .gitignore: ignore moc_*.h 2017-05-31 00:33:58 +03:00
Vladimir Golovnev
b6e1b6e501 Revert "Guard the flag used for deferred session configure." (#6733)
This reverts commit 5cbc7b16c0.
2017-05-31 00:33:57 +03:00
Chocobo1
cee308a517 Fix stack overflow in Utils::Gzip::decompress
Anyway, use std::vector to allocate memory on the heap (in compress() too)
2017-05-31 00:33:56 +03:00
Brian Kendall
390d22bc66 Fixed macOS-specific bug in AddNewTorrentDialog
Because AddNewTorrentDialog is a sheet in macOS, repositioning it causes bad things to happen, particularly if the main dialog is on a secondary monitor.
2017-05-31 00:33:56 +03:00
Chocobo1
e4a5b8d352 Setup DPI at startup 2017-05-31 00:33:55 +03:00
Chocobo1
2ba3104337 Remove workaround
Upstream confirmed bug fixed in Qt 5.2
2017-05-31 00:33:54 +03:00
Chocobo1
d1dfdd1306 Refactor 2017-05-31 00:33:53 +03:00
Chocobo1
8a02a69924 Temporary revert to the old behavior. 2017-05-31 00:33:53 +03:00
sledgehammer999
8ffc72b626 TravisCI: Install latest zlib and switch to container-based infrastructure. 2017-05-31 00:33:52 +03:00
Chocobo1
e85479dfd7 Specify lib requirement: zlib >= 1.2.5.2 2017-05-31 00:33:51 +03:00
Chocobo1
104bed7cc8 Revise Utils::Gzip::decompress
Rename from uncompress to decompress
Change signature
Use proper casting
Use larger buffer for the output of inflate()
Reserve 1 MBytes for output buffer
Change function signature
2017-05-31 00:33:50 +03:00
Chocobo1
75f3dd6d1d Revise Utils::Gzip::compress code
Change signature
Add ZLIB_CONST define to make  z_stream.next_in const
Cast to zlib defined type Bytef*
Set memLevel to 9 in deflateInit2() for maximum performance
Revise compression loop
On returning false, free memory correctly by calling deflateEnd()
Reserve space by the estimation of deflateBound()
2017-05-31 00:33:50 +03:00
Chocobo1
751f64c98b Rewrite rules for gzipping http response content 2017-05-31 00:33:49 +03:00
Chocobo1
6353c2ca3c Implement robust acceptsGzipEncoding()
Adhere more to http/1.1 standard
2017-05-31 00:33:48 +03:00
Chocobo1
f51e467ce3 Fix "Content-Encoding" header is always created.
Was side effect of operator[]
2017-05-31 00:33:47 +03:00
Chocobo1
358d182c82 Cleanup Http::responseGenerator()
Add CRLF definition
Rewrite loop using iterator, slightly more efficient
Rename variables
2017-05-31 00:33:47 +03:00
Chocobo1
7d2802cf2c Demote to helper function
Rename function
2017-05-31 00:33:46 +03:00
Chocobo1
a739d86e3d Convert Qstring to char arrays
Cleanup header
Sort constants
2017-05-31 00:33:45 +03:00
Chocobo1
6ff614ebea Send Date http header
It's not strict required but often expected.
change class to namespace
cleanup header
2017-05-31 00:33:44 +03:00
Chocobo1
d9f4141221 Always send Content-Length header.
Because without it, HTTP/1.1 (with persistence connection) clients will
keep waiting for more data.
2017-05-31 00:33:44 +03:00
Chocobo1
415a805818 Implement http persistence connection
Max simultaneous connection limit set to 500
This also release allocated memory of Connection instances at runtime instead of at program shutdown.
2017-05-31 00:33:43 +03:00
Chocobo1
b8fff68230 WebUI: Fix checkbox hidden. Closes #6642. 2017-05-31 00:33:42 +03:00
Eugene Shalygin
44f81a2d2b cmake: set warning and error options
The set is far from perfect, but guards against common errors with GCC.
2017-05-31 00:33:41 +03:00
Eugene Shalygin
b98ef9905e cmake: use environment variable LIB on Windows
Append its value to CMAKE_LIBRARY_PATH to simplify life of on Windows.
2017-05-31 00:33:41 +03:00
Eugene Shalygin
e4f472e0f8 Replace variable length array with std::vector in print_stacktrace()
The function does memory allocation from heap anyway, so should not be
a problem to use STL container.
2017-05-31 00:33:40 +03:00
Vladimir Golovnev (Glassez)
91a38193f5 Remove torrent temp folder when torrent is deleted 2017-05-31 00:33:39 +03:00
Vladimir Golovnev (Glassez)
66b92f3bb4 Remove torrent temp folder if it becomes unneeded 2017-05-31 00:33:38 +03:00
Eugene Shalygin
a911dc57f3 Fix formatting in CONTRIBUTING.md (#6704)
Fix formatting in CONTRIBUTING.md
2017-05-31 00:33:38 +03:00
Chocobo1
c43c473105 Disable Qt embedding manifest automatically
Embedding manifest fails for me after upgrading to VS2017, this fixes it.
2017-05-31 00:33:37 +03:00
wevsty
d079b71f63 update chinese windows installer translation 2017-05-31 00:33:36 +03:00
ngosang
8b0b398a5f [Search engine] Add btdb plugin 2017-05-31 00:33:35 +03:00
ngosang
9400aac003 [Search engine] Update legittorrents plugin 2017-05-31 00:33:35 +03:00
ngosang
7856863b3e [Search engine] Remove mininova plugin 2017-05-31 00:33:34 +03:00
ngosang
b1f598a1d3 [Search engine] Update demonoid plugin 2017-05-31 00:33:33 +03:00
Eugene Shalygin
9c7ed80292 cmake: use import libraries for Boost and OpenSSL in Libtorrent find module 2017-05-31 00:33:32 +03:00
Eugene Shalygin
1835ec6086 cmake: fix typo in the manifest file name 2017-05-31 00:33:32 +03:00
Chocobo1
3d4cead200 Uncrustify 2017-05-31 00:33:31 +03:00
Chocobo1
112a24f9b6 Relax comparsion for floating point 2017-05-31 00:33:30 +03:00
Chocobo1
cdcafecb44 Cleanup & refactor 2017-05-31 00:33:29 +03:00
Chocobo1
4e173d34d3 Setup parent pointer
Rely on Qt to do the delete, since the parent ownership is setup
correctly.
2017-05-31 00:33:28 +03:00
Chocobo1
df5d31b52b Always draw background 2017-05-31 00:33:28 +03:00
Chocobo1
be745551e6 Fix downloaded/uploaded columns were not highlighted properly when selected.
Refactor
2017-05-31 00:33:27 +03:00
opengg
a3e4bcd1dd [WebUI] Add skip_checking and paused to /command/download and /command/upload 2017-05-31 00:33:26 +03:00
opengg
36cc6909f8 [WebUI] bugfix: RequestParser::splitMultipartData drop extra trailing newline. 2017-05-31 00:33:25 +03:00
Chocobo1
3987e677d5 Refactor: move methods under the same #if section. 2017-05-31 00:33:24 +03:00
Chocobo1
13f27c6d3b Refactor: move the validation of certificates & key functions under Server class
Rename method
Add log messages
2017-05-31 00:33:24 +03:00
Chocobo1
68f88f7907 Rename class variables 2017-05-31 00:33:23 +03:00
Chocobo1
6c2c08c6dd Refactor: group port forwarding code together
Unify log message
2017-05-31 00:33:22 +03:00
Eugene Shalygin
b8eee9e1b8 Start up torrents after UI was created. Fixes #6454.
Commit dd0537d changed torrents startup code adding alerts processing
into it. Therefore alerts were processed before UI code subscribed to
signals and therefore part of alerts was not reflected in the UI.

Thus here we do not start torrents in Session constructor, but do that
from Application::exec() after UI was constructed and is ready to process
signals.
2017-05-31 00:33:21 +03:00
Eugene Shalygin
ef08b4269d Rename .desktop and appdata files to match executable name. Fixes #6625. 2017-05-31 00:33:21 +03:00
schnurlos
b5a67aefdb Update of german.nsi
Translation of 64-bit text done.
2017-05-31 00:33:20 +03:00
Eugene Shalygin
a302c995f8 Create Ukrainian translation for the Windows installer. 2017-05-31 00:33:19 +03:00
ngosang
f2877cbec4 Update Spanish translation for the installer 2017-05-31 00:33:06 +03:00
sledgehammer999
4a95291fcc Merge pull request #6648 from evsh/v3_3_x
CMake 3.8 fixes for v3_3_x branch. Closes #6634.
2017-04-17 20:59:23 +03:00
Eugene Shalygin
6717e3d30c Remove generated include from headers. Closes #6634.
Not only fixes compilation with CMake 3.8 (without messing with include
paths) but makes sources cleaner.
2017-04-17 19:30:38 +02:00
Eugene Shalygin
778209ae49 cmake: fixes for cmake 3.8
AUTOUIC seems to became stricter.
2017-04-17 18:26:11 +02:00
sledgehammer999
258efe261d Bump to 3.3.12 2017-04-06 19:51:12 +03:00
sledgehammer999
59abbab9b9 Update Changelog. 2017-04-06 19:48:23 +03:00
Chocobo1
7cc32cbe97 Bump _WIN32_IE in cmake build 2017-04-06 19:47:21 +03:00
Chocobo1
5783f7bafe Fix NTDDI_VERSION define
Fixup of 5958585e3a
2017-04-06 19:47:08 +03:00
sledgehammer999
0e64e6887a Bump API_VERSION and API_VERSION_MIN to 13. 2017-04-06 02:04:31 +03:00
sledgehammer999
c25cb29e61 Sync translations of .desktop file from Transifex. 2017-04-06 02:04:29 +03:00
sledgehammer999
bca9b60db8 Revert "Refactor: initialize class variable directly"
This reverts commit b4bca7cfb7.
2017-04-06 00:43:03 +03:00
Chocobo1
1ec122c4ab Set cookie SID value to empty on logout
Set cookie SID expiration date to 1 day in the past on logout
2017-04-05 18:40:53 +03:00
Chocobo1
562dd41ab2 Fire up the timer to clean inactive sessions 2017-04-05 18:40:52 +03:00
Chocobo1
b4bca7cfb7 Refactor: initialize class variable directly 2017-04-05 18:40:51 +03:00
Chocobo1
b985bb43fa Refactor: reorder headers 2017-04-05 18:40:50 +03:00
Chocobo1
bf8a438a6f Set HttpOnly attribute to SID cookie 2017-04-05 18:40:48 +03:00
vlakoff
7cd9b6f750 Update French translation for the installer 2017-04-05 18:40:41 +03:00
sledgehammer999
d487c69dcc Fix running the uninstaller if the user chose a different path in the installer. Closes #6080. 2017-04-05 03:05:46 +03:00
sledgehammer999
444c2bdf19 Revert "Use Perl-compatible regexes for RSS rules. Closes #6367."
This reverts commit 8d11af94f2.
2017-04-04 03:25:27 +03:00
sledgehammer999
f86064e322 Revert "Cache rule regular expressions for performance"
This reverts commit bacef1ca24.
2017-04-04 03:25:24 +03:00
sledgehammer999
6675544c23 Revert "Change named of getter function."
This reverts commit 20b30dd4b5.
2017-04-04 03:25:14 +03:00
FranciscoPombal
10205ca67e fixed "remaining" column in WebUI
the key had the wrong name. In the js code, the expected key is "amount_left" and not "remaining".
2017-04-04 02:04:36 +03:00
sledgehammer999
2dfed3c41e Better 64-bit handling in the installer. 2017-04-04 02:04:35 +03:00
Eugene Shalygin
db29a61fbf cmake: fix OSX bundle creation 2017-04-04 02:04:33 +03:00
Chocobo1
3497c5307c Fix cancel "Set location" causes files move to installation dir.
Closes #6568.
2017-04-04 02:04:32 +03:00
Chocobo1
565f263ecb Add log message 2017-04-04 02:04:31 +03:00
Chocobo1
c94a61f434 code formatting 2017-04-04 02:04:30 +03:00
Chocobo1
d390d941eb Add NTDDI_VERSION define 2017-04-04 02:04:29 +03:00
Chocobo1
f1de249c9e NSIS: set exit code to 0 on install/uninstall success
Closes #6129.
2017-04-04 02:04:28 +03:00
Chocobo1
f85768412c NSIS: trim whitespaces 2017-04-04 02:04:26 +03:00
regs01
5a28e8c5e9 Update options.nsi
dpi-aware installer
2017-04-04 02:04:25 +03:00
epicgirl1998
5b72595547 Remove extra space
fixes https://github.com/qbittorrent/qBittorrent/issues/6523
2017-04-04 02:04:24 +03:00
sheeit
a363ed6d7c Fixed Markdown formatting for headers 2017-04-04 02:04:23 +03:00
sledgehammer999
077469d5a0 Indicate bitness in stackstrace and about dialog. Closes #6172. 2017-04-04 01:54:37 +03:00
sledgehammer999
66df7c47b2 Some improvements in travis.yml for macOS. Closes #6089. 2017-04-04 01:54:18 +03:00
sledgehammer999
20b30dd4b5 Change named of getter function. 2017-04-04 01:54:17 +03:00
Tim Delaney
bacef1ca24 Cache rule regular expressions for performance
--HG--
branch : magao-dev
2017-04-04 01:54:16 +03:00
Tim Delaney
8d11af94f2 Use Perl-compatible regexes for RSS rules. Closes #6367.
--HG--
branch : magao-dev
2017-04-04 01:52:02 +03:00
sledgehammer999
02c96fa5e2 Change the user-agent format in the session.cpp too. 2017-04-04 01:48:43 +03:00
Chocobo1
65b491fed0 Add comment 2017-04-04 01:48:41 +03:00
Chocobo1
f0eab3f085 Follow http user-agent format
Add version variable without the starting "v"
2017-04-04 01:48:27 +03:00
Chocobo1
21212fdfe5 Prepend QBT_ for preprocessor variables 2017-04-04 01:48:26 +03:00
FranciscoPombal
f39465c25a Implement statistics window in web UI 2017-04-04 01:48:25 +03:00
Vladimir Golovnev (Glassez)
a3eaee7e7e Remove exception-suppress macros
Remove SAFE_* macros from TorrentHandle class.
These macros using seems to be unneeded.
2017-04-04 01:48:03 +03:00
sledgehammer999
1e28bbb47e Revert "Set default locale". Closes #6436 and #6459.
This reverts commit 75ef6356d3.
2017-04-04 01:48:02 +03:00
sledgehammer999
c5b98339ae Update stuff in appdata.xml and run 'appstream-utl upgrade' on it. 2017-04-04 01:48:01 +03:00
sledgehammer999
edb1b727c6 Add keywords to the .desktop file. 2017-04-04 01:47:38 +03:00
Chocobo1
78aeb5eee7 Capitalize title strings
Remove DISCARDABLE keyword which is ignored on 32-bit windows
2017-04-04 01:47:37 +03:00
Chocobo1
9dd93c3d17 Embed manifest when compiling with MSVC
Update manifest
2017-04-04 01:47:25 +03:00
buinsky
2d64405eb8 Improve performance of updating 'progress' column 2017-03-05 18:47:50 +02:00
Chocobo1
dff560d8c2 Workaround thread_local not supported on OSX
Drop back to xcode7.3 on TravisCI
2017-03-05 18:47:49 +02:00
Chocobo1
b3c973612f Fix compile error: ‘escape’ is not a member of ‘Qt’ 2017-03-05 18:47:48 +02:00
Chocobo1
3480d3d10c Fix incomplete type compile error with Qt4 2017-03-05 18:47:47 +02:00
Chocobo1
f45d21d3a2 Enable thread_local support in TravisCI 2017-03-05 18:47:46 +02:00
Chocobo1
8dcb792ac0 Replace rand() by a true uniform distribution generator 2017-03-05 18:47:37 +02:00
sledgehammer999
cb5174bfa2 Bump to 3.3.11 2017-03-04 01:17:44 +02:00
sledgehammer999
9138156968 Update Changelog. 2017-03-04 01:17:43 +02:00
sledgehammer999
8a0b1fe0be Install qbittorrent-tray.png files. Fixes commit 8b805f4518. 2017-03-04 01:17:42 +02:00
sledgehammer999
3bbe304856 Bump API_VERSION to 12. 2017-03-04 01:17:41 +02:00
Chocobo1
0356172a1d Utilize escapeHtml 2017-03-04 01:17:40 +02:00
Chocobo1
80f3b19356 Add Utils::String::toHtmlEscaped 2017-03-04 01:17:39 +02:00
Chocobo1
39a569b438 Cleanup 2017-03-04 01:17:38 +02:00
Chocobo1
edaa7e85a7 [WebUI]: add X-XSS-Protection, X-Content-Type-Options, CSP header 2017-03-04 01:17:37 +02:00
ngosang
f9f7a8cbf2 [WebUI] Avoid clickjacking attacks 2017-03-04 01:17:35 +02:00
Chocobo1
7aef9828c9 [WebUI]: exclude insecure ciphers 2017-03-04 01:17:34 +02:00
Chocobo1
18ad972936 Code formatting
Remove extra private keyword
2017-03-04 01:17:33 +02:00
sledgehammer999
8b5c275934 Update copyright year. 2017-03-04 01:17:32 +02:00
sledgehammer999
59765954b8 Sync translations from Transifex and run lupdate. 2017-03-04 01:17:30 +02:00
ngosang
f5fff855bb [Search engine] Update Extratorrent plugin 2017-03-04 01:17:27 +02:00
sledgehammer999
26c713851e Use new create_torrent constructor were available. 2017-03-04 01:17:26 +02:00
Eugene Shalygin
f9b64c4e73 Disable proxy in WebUI HTTP server. Closes #6349.
Due to a bug in Qt 5.8 (QTBUG-58706) QTcpServer tries to use HTTP proxy
when it is set as default app proxy (for instance via "http_proxy"
environment variable) and this breaks the server. So we disable any proxy
in it.
2017-03-04 01:17:25 +02:00
thalieht
edf6c30cd8 Seperate seeds from peers for DHT, PeX and LSD 2017-03-04 01:17:17 +02:00
Chocobo1
83860afa60 Turn off port forwarding of WebUI by default for GUI users 2017-03-03 02:34:03 +02:00
murlakatamenka
4b7362aa6b Update mainwindow.h (remove duplicate declaration) 2017-03-03 02:34:02 +02:00
falco
dd0537d8d2 fix queue overload for add torrent at session start 2017-03-03 02:34:00 +02:00
Chocobo1
3c50cc1d2c Fix coverity issues
torrentcontentmodel: Use a variable to store filesCount
optionsdlg: add fallthrough comment to suppress warning
speedPlotview: initialize member
misc: fix wrong type used, add spaces
2017-03-03 02:33:59 +02:00
Chocobo1
78fdb68457 Use QString::toStdString()
Qt5 utilized the desired toUtf8() instead of toAscii().
2017-03-03 02:33:50 +02:00
Tim Delaney
bb1bd34ec0 Fix regex RSS matching. Closes #6337.
--HG--
branch : magao-dev
2017-03-03 02:33:49 +02:00
Tim Delaney
1841834c89 Bugfix RSS feed list and rules editor. Closes #3782, #6281.
--HG--
branch : magao-dev
2017-03-03 02:33:46 +02:00
sledgehammer999
30b70a99f1 Regenerate configure. 2017-03-03 02:32:57 +02:00
sledgehammer999
f0f2e93e4d Use @naikel's suggestions for previous commit. 2017-03-03 02:32:56 +02:00
Zach Bacon
5852c5e318 tests if qmake is in path properly 2017-03-03 02:32:55 +02:00
Zach Bacon
b38827bb8e fixes qmake pathing and also fixes a type in configure.ac 2017-03-03 02:32:54 +02:00
thalieht
240046f720 TransferListWidget: Some coding style 2017-03-03 02:32:52 +02:00
thalieht
78b1194da1 enable RSS, Search and Execution Log widgets before switching to them via hotkeys 2017-03-03 02:32:39 +02:00
thalieht
c1a66dad51 change all existing shortcuts to use Qt::Keys 2017-03-03 02:32:38 +02:00
thalieht
4a10d246c2 add hotkeys for Trackerlist Peerlist etc. 2017-03-03 02:32:37 +02:00
thalieht
125ab378a4 add hotkey for execution log tab 2017-03-03 02:32:36 +02:00
thalieht
4cd8a36b40 Transferlist: add hotkeys for double click and recheck selected torrents 2017-03-03 02:32:35 +02:00
thalieht
364df2e18c change torrentDoubleClicked() so it can be used in a hotkey 2017-03-03 02:32:33 +02:00
Eugene Shalygin
f8f2476aa5 cmake: read version numbers from the version.pri file. Closes #6350. 2017-03-03 02:32:32 +02:00
sledgehammer999
d685c9739b Remove unnecessary semicolon. 2017-03-03 02:32:31 +02:00
sledgehammer999
6fdfcf38f1 Use same casting method and fix code style. 2017-03-03 02:32:30 +02:00
sledgehammer999
7c85866881 Fix previous commit. 2017-03-03 02:32:29 +02:00
Vladimir Sinenko
37673cd86f Fixed sort order for datetime columns with empty values (closes #2988)
A small fix belonging to #2531.
During the sorting empty QDateTime values are shuffled around due to
unstable sort in QSortFilterProxyModel (see #2526 and #2158), causing
the transfer list items to constantly change order.

Fixed by using an already existing correct comparison (with a torrent
hash fallback).
2017-03-03 02:30:18 +02:00
Tim Delaney
a4a38d633c Improve UI responsiveness during RSS downloading. Closes #873, #1089, #1235, #5423.
--HG--
branch : magao-dev
2017-03-03 02:17:34 +02:00
sledgehammer999
93bdc81e3c Fix unused variable warning by gcc. 2017-03-03 02:17:33 +02:00
Vladimir Golovnev (Glassez)
827d5a22fb Save/load category filter widget state 2017-03-03 02:17:32 +02:00
dzmat
34e56eade8 reduce methods accessibility from public to private 2017-03-03 02:17:31 +02:00
Chocobo1
4a23e7da37 Use case-insensitive comparsion for torrent content window.
Closes #6327
2017-03-03 02:17:29 +02:00
sledgehammer999
f577a26fe2 Immediately update torrent_status after manipulating super seeding mode. Partially fixes #6072. 2017-03-03 02:14:35 +02:00
Tim Delaney
3f176d8265 Fix compilation error on Qt<5.4. Closes #6170.
--HG--
branch : magao-dev
2017-03-03 02:14:34 +02:00
Tim Delaney
cbc001e059 RSS allow infinite range to extend beyond current season. Closes #800, #3876, #6170.
--HG--
branch : magao-dev
2017-03-03 02:14:33 +02:00
Tim Delaney
a66ed05ecd RSS parse torrent episodes like 1x01 as well as S01E01. Closes #2749.
--HG--
branch : magao-dev
2017-03-03 02:14:32 +02:00
Tim Delaney
ec347d8dbe Allow episode zero (special) and leading zeroes in RSS episode filter.
--HG--
branch : magao-dev
2017-03-03 02:14:31 +02:00
Tim Delaney
f0acafb853 RSS use red text to indicate invalid filter. Closes #6165.
--HG--
branch : magao-dev
2017-03-03 02:14:30 +02:00
Tim Delaney
1a12e891ec Allow | in RSS must contain. Closes #6171.
--HG--
branch : magao-dev
2017-03-03 02:14:28 +02:00
Tim Delaney
88ba8e2ceb Save rule on enable/disable even if not selected. Closes #6163.
--HG--
branch : magao-dev
2017-03-03 02:14:27 +02:00
Tim Delaney
2e403277f3 RSS: allow resetting rule to no category. Closes #5539.
--HG--
branch : magao-dev
2017-03-03 02:14:26 +02:00
Tim Delaney
89349f60b0 RSS episode filter refactoring and logging (prep for later commits).
--HG--
branch : magao-dev
2017-03-03 02:14:25 +02:00
Chocobo1
0604d3729a Use case-insensitive sort for Name column in Search tab. Closes #407. 2017-03-03 02:14:09 +02:00
ngosang
cf16e3b8a1 [Web UI] Fix category in torrent upload. Closes #6260 2017-03-03 02:14:08 +02:00
Eugene Shalygin
dcb3496651 cmake: RSS target has to depend on qbt_base as it uses its includes 2017-03-03 02:14:07 +02:00
Eugene Shalygin
9d10da3ed2 cmake: fix boost components manipulations in FindLibtorrentRasterbar.cmake
The list of components which we pass to find_package() has to be semicolon
separated (i.e. to be the usual cmake list)
2017-03-03 02:14:06 +02:00
Eugene Shalygin
0524deb496 cmake: make some compile definitions global in Windows 2017-03-03 02:14:05 +02:00
Tim Delaney
787ae43d54 Move old RSS items to separate config file. Closes #6167.
--HG--
branch : magao-dev
2017-03-03 02:14:04 +02:00
Falco
67bb2cc150 fix index overflow for torrents with invalid meta data or empty progress 2017-03-03 02:14:02 +02:00
Tim Delaney
51995c80d1 Ctrl+F search filter. Closes #5797.
--HG--
branch : magao-dev
2017-03-03 02:14:01 +02:00
Tim Delaney
5f43741b09 Follow project coding style. Issue #2192.
--HG--
branch : magao-dev
2017-03-03 02:14:00 +02:00
ngosang
3328d8efd2 [Search engine] Update extratorrent plugin. Closes #6261 2017-03-03 02:13:59 +02:00
Eugene Shalygin
a54a9e5487 cmake: make LibtorrentRasterbar::LibTorrent public dependency of qbt_base
If libtorrent include directory not in the compiler search path, we have
to pass it to all qbt targets, because session.h includes
libtorrent/version.hpp
2017-03-03 02:13:58 +02:00
Eugene Shalygin
0181ca70f4 cmake: get and use only actual boost dependencies of libtorrent
With pkg-config we can get a list of Boost components from Libtorrent
dependencies and make qBittorrent depend only on these libraries in
turn. For Windows user may provide a custom list via
LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES variable or use generic
list which consists of date_time, system, chrono, random, thread. As a
note: in case of using fully C++11 build, the actual list contains only
boost system library.
2017-03-03 02:13:57 +02:00
buinsky
ff665af3f7 Avoid lags in firefox on resizing progress column 2017-03-03 02:13:35 +02:00
buinsky
9275cdc5bf Remove 300px limit of column width 2017-03-03 02:13:34 +02:00
buinsky
b7c3bdd443 Fix scrollbar covers menu item with long text 2017-03-03 02:13:33 +02:00
buinsky
5fd08f8664 Implement resizable progress bar in "Done" column 2017-03-03 02:13:32 +02:00
buinsky
84a4d323c7 Follow project coding style. Issue #2192. 2017-03-03 02:13:31 +02:00
buinsky
8efb13bfaf Add a vertical separator between columns 2017-03-03 02:13:29 +02:00
buinsky
0187b55610 Prevent text wrapping in menus 2017-03-03 02:13:07 +02:00
buinsky
2f606b2728 Make too tall menus scrollable 2017-03-03 02:13:06 +02:00
buinsky
025f75beca Add some missing columns to dynamic tables 2017-03-03 02:13:05 +02:00
buinsky
4711cafd20 Fix columns names 2017-03-03 02:13:04 +02:00
buinsky
8d12ca9477 Implement dynamic table columns hiding 2017-03-03 02:13:03 +02:00
buinsky
67b90bfb51 Implement dynamic table columns reordering 2017-03-03 02:12:49 +02:00
buinsky
ab05c0c326 Implement dynamic table columns resizing 2017-03-03 02:12:47 +02:00
buinsky
c5ea453438 Add tooltips to dynamic table header 2017-03-03 02:12:46 +02:00
buinsky
4f041c16e1 Make torrent peers table scrollable horizontally 2017-03-03 02:12:45 +02:00
buinsky
28cfee7bd3 Simplify dynamic table CSS styles 2017-03-03 02:12:41 +02:00
buinsky
6272287fbb Make torrents table scrollable horizontally 2017-03-03 02:12:04 +02:00
buinsky
e7a1542902 Rename variables in DynamicTable class 2017-03-03 02:12:03 +02:00
ngosang
5e371d8195 Display more information in tracker tab 2017-03-03 02:11:43 +02:00
thalieht
6bb189ea13 friendlyUnit: Properly replace spaces with non-breaking spaces 2017-03-03 02:11:42 +02:00
thalieht
8496f31e39 Increased number of digits after the decimal point for Gibibytes and above 2017-03-03 02:11:41 +02:00
sledgehammer999
08f634f748 Polish previous commit. 2017-03-03 02:11:40 +02:00
thalieht
2b5dc5c4a6 SearchTab: can now save sorting column changes 2017-03-03 02:11:39 +02:00
thalieht
0a2f0aefb3 PeerListDelegate: fix coding style in whole file 2017-03-03 02:11:38 +02:00
thalieht
66e137b8ee PeerList: allow to hide zero values for the "uploaded" and "downloaded" columns 2017-03-03 02:11:36 +02:00
thalieht
f9be39545b TransferListWidget: keep columns width even if they are hidden on qBittorrent startup (unless something goes wrong) 2017-03-03 02:11:35 +02:00
thalieht
789b8046a2 SearchTab: Allow to toggle columns in searchtab 2017-03-03 02:11:34 +02:00
thalieht
129bf497c8 SearchTab: use saveSettings() and loadSettings() to handle header state 2017-03-03 02:11:33 +02:00
thalieht
a6d7693d62 SearchTab: align text to the right in columns that handle numbers 2017-03-03 02:11:32 +02:00
thalieht
4e9fbc4da5 PeerList: align text to the right in columns that handle numbers 2017-03-03 02:11:31 +02:00
Eugene Shalygin
23f6ff4673 Fix cmake compilation 2017-03-03 02:11:30 +02:00
Vladimir Golovnev (Glassez)
3c0dfa6444 Implement category filter widget
Show categories in tree mode when subcategories are enabled.
2017-03-03 02:11:29 +02:00
Tim Delaney
694311b2bd Follow project coding style. Issue #2192.
--HG--
branch : magao-dev
2017-03-03 02:11:28 +02:00
Chocobo1
b77626897f Set default locale 2017-03-03 02:11:27 +02:00
Chocobo1
b8081feac1 Refactor
Move default value to preference class
Rename variable
Reorder headers
Remove extra parentheses
2017-03-03 02:11:25 +02:00
Bilal Elmoussaoui
8b805f4518 fixes default indicator name
copy icons instead of renaming them, create status folder

rename from *-indicator to *-tray
2017-03-03 02:11:24 +02:00
Chocobo1
8bb4f021f1 Remove trailing spaces 2017-03-03 02:11:23 +02:00
Chocobo1
97c79050dc Reset values to default, these are controled elsewhere. 2017-03-03 02:11:22 +02:00
Chocobo1
ac62a708de Speedlimitdlg: raise slider default value to 10000. Closes #6150.
Old value 1000 (KB/s) can be a bit small for modern internet.
2017-03-03 02:08:04 +02:00
Chocobo1
8d9789f51b Code rewrite, no behavior change 2017-03-03 02:08:03 +02:00
Hiro Asari
559d0228fd Allow some Mac jobs to fail
Put `allow_failures` in the correct place.
2017-03-03 02:08:02 +02:00
sledgehammer999
1296e7b891 Fix finding 'English' item in language dropdown menu when an unrecognized locale is requested. Closes #6109. 2017-03-03 02:08:01 +02:00
Chocobo1
0333e23710 After files relocate, don't remove the old folder even if it is empty. 2017-03-03 02:08:00 +02:00
Chocobo1
7320a80caa Refactor 2017-03-03 02:07:59 +02:00
Oke Atime
0579bfc069 Build qbittorrent-nox for macOS 2017-03-03 02:07:57 +02:00
Chocobo1
d20d04299e Use the numbers from tracker scrape response. Closes #5048, #6117.
Add comments
Thanks to Ian Kent for helping investigate
2017-03-03 02:07:56 +02:00
Chocobo1
50b2009e9c Fix webUI used the wrong value. Closes #6232. 2017-03-03 02:07:55 +02:00
dzmat
721d29edda DRY violation fixed 2017-03-03 02:07:54 +02:00
Chocobo1
bc9cae199b Put temp files in .qBittorrent directory. Closes #4462. 2017-03-03 02:07:53 +02:00
Chocobo1
c38b250667 Remove unused header 2017-03-03 02:07:52 +02:00
sledgehammer999
101b2f3ad2 Remove settings to exchange trackers. It wasn't used by non-libtorrent clients. Also it has a privacy risk and you might be DDoSing someone. DHT makes it obsolete anyway. 2017-03-03 02:07:51 +02:00
Eugene Shalygin
9c4f798d93 Print warning to the user if stacktrace contains no function names
Count matched function names, and if there are no, point out to the user
that the stacktrace is useless. If not all stactrace elements contain
function names, suggest user that installing debug packages may improve
the stacktrace usefulness.
2017-03-03 02:07:50 +02:00
Eugene Shalygin
249ff21738 Follow project coding style. Issue #2192. 2017-03-03 02:07:49 +02:00
dzmat
f1149097b6 Clarify options tab page objects names 2017-03-03 02:07:48 +02:00
Chocobo1
111b0df307 Fix warning: unused parameter ‘action’ [-Wunused-parameter] 2017-03-03 02:07:47 +02:00
Eugene Shalygin
8041af72cd Fetch torrent status when generating final fastresume data
This is done to get correct queue position, which has to be written into
the fastresume file. See discussion in #6154.
2017-03-03 02:07:46 +02:00
Eugene Shalygin
4be6d0b30f Add queue repair code
This is a bit adjusted code created by nxd4, who shared it in issue
disappearing).
2017-03-03 02:07:45 +02:00
Tim Delaney
8c757969f2 Fix tab order in RSS downloader. Closes #6164.
--HG--
branch : magao-dev
2017-03-03 02:07:43 +02:00
Oke Atime
ae6a82f814 Avoid unnecessary translation. Closes #6158 2017-03-03 02:07:42 +02:00
Oke Atime
eed3f0559a Webui proxy_type bug fix 2017-03-03 02:07:41 +02:00
Eugene Shalygin
c7884e7621 Do not resize SVG icons
An icon which is loaded from SVG file can be rendered in any size and
resolutions natively. We were generating 16x16, 24x24, and 32x32
pixmaps, and not appending but creating new icon. Therefore for SVG
icons we effectively were reducing their quality.

If icon already contains 7 (or more) sizes (16 to 256 px) we do not
resize it anymore.
2017-03-03 02:07:40 +02:00
Eugene Shalygin
2946ab7e7a Support fallback when selecting theme icons
Fallback icon theme are not supported everywhere. Hence we mimic
signature of QIcon::fromTheme().
2017-03-03 02:07:39 +02:00
Chocobo1
ddb8e4d21a For each cell setting ignore wheel events. Closes #866. 2017-03-03 01:46:57 +02:00
Eugene Shalygin
00d4f6141f Do not remove added files unconditionally. Closes #6248
If removing of added torrents is enabled and dialog for adding torrents
is disabled, file guard was assuming that torrent is added successfully.
And that can be not the case if a user trying to add a broken torrent
file (or not a torrent file at all). Then this file gets deleted always.

Fix this by checking result of addTorrent_impl().
2017-03-03 01:46:56 +02:00
sledgehammer999
7971a25c2a Fix Travis macOS builds. 2017-03-03 01:46:55 +02:00
Eugene Shalygin
ab2411930a Workaround problem with moc from Qt4 and #if
moc from Qt4 ignores Q_ENUMS when it is behind #if QT_VERSION check.
Therefore moc entries for enum in TorrentFileGuard were not generated
and the setting was not saving/loading. This closes #6103, #5451
2017-03-03 01:46:54 +02:00
sledgehammer999
93f972bfca Allow build failures for qt4 and osx for Travis. 2017-03-03 01:46:31 +02:00
sledgehammer999
db638844d0 Use custom qt5 bottle for homebrew (macOS) on Travis. 2017-03-03 01:46:30 +02:00
sledgehammer999
ba99eddc91 Add template for issues. 2017-03-03 01:46:29 +02:00
Eugene Shalygin
92428cee5d Set upper version limit for QTBUG-52633
The bug seems to be fixed in version 5.7.1.
2017-03-03 01:46:28 +02:00
sledgehammer999
2c7d836925 Don't use hardcoded numbers to refer to columns. 2017-03-03 01:46:27 +02:00
sledgehammer999
7703dcf626 Allow to change priority for unselected files through the combobox like it is done via the context menu. 2017-03-03 01:46:09 +02:00
sledgehammer999
157520c4fc Always show progress and remaining bytes for unselected files. 2017-03-03 01:46:08 +02:00
sledgehammer999
5bc728fa33 Use a disabled progressbar's palette for unselected files.
Thanks to evsh(Eugene Shalygin) for example code.
2017-03-03 01:46:07 +02:00
sledgehammer999
35fdc43b3f Update gpg key with new uid. 2017-03-03 01:46:05 +02:00
Eugene Shalygin
ae6ea29f2f cmake: make prefix variables cached
This allows user to override their default value via -D cmake switch
2017-03-03 01:46:04 +02:00
sledgehammer999
4eac2cab31 Bump to 3.3.10 2016-12-17 19:57:52 +02:00
sledgehammer999
87f4f57f8e Update Changelog. 2016-12-17 19:54:49 +02:00
sledgehammer999
a6e250fa43 WINDOWS: Make the updater to look for the x64 installer if running x64 version. 2016-12-17 19:48:46 +02:00
Oke Atime
b118079379 Make resume/pause menu items clickable. Closes #6040 2016-12-17 19:48:45 +02:00
Oke Atime
cb2d39f2a7 Case insensitive sort for client clumn. Closes #6054 2016-12-17 19:48:45 +02:00
sledgehammer999
4cf549ff25 Fix share ratio limiting. Broken by commit 259b5e51c4. Closes #6039 #6048. 2016-12-15 00:06:04 +02:00
sledgehammer999
b5c6342dca Bump to 3.3.9 2016-12-14 18:39:40 +02:00
sledgehammer999
46ec556921 Update Changelog. 2016-12-14 18:37:07 +02:00
sledgehammer999
33ae1a7bee Correctly migrate settings/rss/usage stats in macOS. Closes #6041. 2016-12-14 18:19:20 +02:00
sledgehammer999
87a3a67668 Fix GUI for proxy settings. Closes #6045. 2016-12-14 18:19:19 +02:00
sledgehammer999
055b1e0163 Fix slider for per torrent speed limits when no global speed limit has been set. Closes #6046. 2016-12-14 18:19:19 +02:00
sledgehammer999
2bd5ea2c68 Bump to 3.3.8 2016-12-14 02:13:13 +02:00
sledgehammer999
1479a74198 Update Changelog. 2016-12-14 02:10:00 +02:00
Eugene Shalygin
9a0d25284c Add a workaround for QTBUG-52633, qBt issue #5073
The QTBUG-52633 results in food of network interface changed events, libtorrent IP
rebind calls and flood in the qBt log. The work around is the check not only for
interface name, but for IP address on that interface before triggering the libtorrent rebind.
2016-12-14 02:04:12 +02:00
sledgehammer999
284e836992 New translations: Icelandic, Latvian, Malay, Occitan, Uzbek
Also re-run lupdate.
2016-12-13 02:11:45 +02:00
sledgehammer999
43f5b31843 Sync translations from Transifex and run lupdate. 2016-12-13 02:11:44 +02:00
sledgehammer999
cada6cfc88 Bump API_VERSION and API_VERSION_MIN to 11. 2016-12-13 02:11:43 +02:00
sledgehammer999
99f157927f Polish previous commit. 2016-12-12 21:17:18 +02:00
Yez Ezey
664664394c Change QSettings to IniFormat on macOS. Closes #5770 #5808
On macOS 10.12 Sierra, Apple changed the behaviour of CFPreferencesSetValue()
truncating data after a null character. https://bugreports.qt.io/browse/QTBUG-56344
Due to this, we have to move from native plist to IniFormat.
2016-12-12 21:17:17 +02:00
dzmat
a790901691 minimizing the number of warnings about deprecated auto_ptr 2016-12-12 21:17:17 +02:00
Chocobo1
fdc70eaa62 Change Utils::Fs::freeDiskSpaceOnPath() signature
refactor the function internals
2016-12-12 21:17:17 +02:00
Chocobo1
b05a23e1ab Remove unused variable 2016-12-12 21:17:16 +02:00
Chocobo1
9f6a0882e2 Simplify #if expression 2016-12-12 21:17:16 +02:00
Chocobo1
b351b21e55 Fix memory leak
call unicode version of the function directly
2016-12-12 21:17:16 +02:00
Chocobo1
ef22f06e92 Simplify function call 2016-12-12 21:17:16 +02:00
Chocobo1
8ea7426bc1 Replace deprecated classes 2016-12-12 21:17:15 +02:00
Chocobo1
79e7e1727f Fix unused variable warnings 2016-12-12 21:17:15 +02:00
Chocobo1
98c33dd77c Rename splitter names 2016-12-12 21:17:15 +02:00
Chocobo1
9c6504f6dd Use new key for storing RSS splitter_v value.
So that old value won't override the RSS layout.
2016-12-12 21:17:14 +02:00
Chocobo1
76c350bdcb Change RSS view layout to horizontal. Closes #5920.
Thanks Bhaalspawn for the idea.
2016-12-12 21:17:14 +02:00
sledgehammer999
106dcfd00e Decouple dependency between Session and BandwidthScheduler during Session init. Closes #6007. 2016-12-12 21:17:14 +02:00
sledgehammer999
668c8cb0e2 Fix travis osx build. 2016-12-12 21:17:14 +02:00
Chocobo1
3159bdf4dd Fix warning C4090.
different '__unaligned' qualifiers.
2016-12-12 21:17:13 +02:00
Chocobo1
97d2c0d187 Fix warning C4267.
conversion from 'size_t' to 'int', possible loss of data.
2016-12-12 21:17:13 +02:00
zywo
0041ee3636 Fix CMake compilation error. 2016-12-12 21:17:13 +02:00
Chocobo1
1ed523bec3 Shift + scroll = horizontal scroll, Closes #5980
Only for TransferListWidget, PeerListWidget
2016-12-12 21:16:39 +02:00
dzmat
b131a6e9df memleak fix 2016-12-12 21:16:39 +02:00
Chocobo1
56d9d370e9 Rename 2016-12-12 21:16:39 +02:00
Chocobo1
a6efc4d92d Fix URL 2016-12-12 21:16:38 +02:00
sledgehammer999
a77db6e822 Sync translations from Transifex and run lupdate. 2016-12-12 21:16:37 +02:00
Yez Ezey
95a558941e Fix downloadFromURL bug. Closes #5844 2016-12-12 21:16:37 +02:00
sledgehammer999
867d69d0f2 Travis: Use custom libtorrent formula and bottle for OSX.
Caches libtorrent 1.0.10 built with c++11 enabled.
2016-12-12 21:16:37 +02:00
sledgehammer999
a6d381da38 Option to disable tracker's favicon download. 2016-12-12 21:16:36 +02:00
sledgehammer999
f0eb708b07 Remove (mostly) useless log warnings about tracker's favicon. 2016-12-12 21:16:36 +02:00
Yez Ezey
1d70698bd0 add /usr/local/include due to Qt 5.7.0 bug on macOS 2016-12-12 21:16:36 +02:00
Chocobo1
79871c8e21 Update ax_boost_system.m4 to d48ec2210047bbf17702700811c3f16a5369e06c 2016-12-12 21:16:36 +02:00
Chocobo1
25d5524213 Remove redundant command 2016-12-12 21:16:35 +02:00
EdwardLinux
8d21b73434 Update portuguese.nsi 2016-12-12 21:16:35 +02:00
sledgehammer999
2ef01a314c Small travis update for OSX. 2016-12-12 21:16:35 +02:00
Yez Ezey
a8b4aca5e6 Set /usr/local/bin before default PATH on macOS. closes #5639 #5571
Since Apple made difficult for users to set PATH and /usr/bin/python
is almost unusable, I simply add /usr/local/bin before default PATH
to pick up Homebrew Python.
2016-12-12 21:16:35 +02:00
Anton Lashkov
67e7315eae Fix name of variable same as class member 2016-12-12 21:16:34 +02:00
Anton Lashkov
a25a15d1c6 Simplify if statement 2016-12-12 21:16:34 +02:00
Anton Lashkov
086588eeed Add missing else 2016-12-12 21:16:34 +02:00
Anton Lashkov
44fa308681 Fix mistake in getting value from model 2016-12-12 21:16:33 +02:00
Yez Ezey
6188287094 Add --disable-qt-dbus to configure if $host_os is macOS 2016-12-12 21:16:33 +02:00
Yez Ezey
17d10afd65 Sort torrent names case insensitively 2016-12-12 21:16:33 +02:00
Chocobo1
89bd0e4397 QJson: update to 5e3b9b84b225f4612e09ef05aa6d8c23379e4e71 2016-12-12 21:16:33 +02:00
Yez Ezey
1c1917f885 Fix extratorrent searchengine. Closes #5773
They changed to magnet link.
2016-12-12 21:16:32 +02:00
thalieht
642377bd65 Log: set embedded Tracker [OFF] msg type as info 2016-12-12 21:16:32 +02:00
Chocobo1
bb4668c071 Fix potential crash. Closes #5873. 2016-12-12 21:16:32 +02:00
Chocobo1
689316db09 Refactor 2016-12-12 21:16:32 +02:00
borouhin
ad0c008a3e Don't request client SSL certificate (closes issue #3883) 2016-12-12 21:15:51 +02:00
sledgehammer999
09e3698b37 Don't ever stop seeding forced torrents. Closes #5784. 2016-12-12 21:15:51 +02:00
sledgehammer999
6450ebfc6c Don't revert save path value in the Dialog when metadata are received. Closes #5482. 2016-12-12 21:15:51 +02:00
sledgehammer999
e9f38ebcfd Some more compiler warnings fixed. 2016-12-12 21:15:50 +02:00
sledgehammer999
4dba31f534 Fix warning due to stupid typo. 2016-12-12 21:15:50 +02:00
sledgehammer999
04c1aad0dd Delete old rss favicon before assigning new one. 2016-12-12 21:15:50 +02:00
sledgehammer999
6763f3ac33 WINDOWS: Fix python auto install, deletion of installer and use 3.5.x series for Vista+. Closes #5871. 2016-12-12 21:15:50 +02:00
sledgehammer999
afca704db0 WEBUI: Changed meaning of the value of the 'dl_limit', 'up_limit', 'alt_dl_limit' and 'alt_up_limit' tokens.
The value is expressed in bytes and not in KiB.
2016-12-12 21:15:49 +02:00
sledgehammer999
eaec8fcddd Fix setting a speed limit. 2016-12-12 21:15:49 +02:00
sledgehammer999
f86fd52d6f Add libtorrent's DHT bootstrap node to our bootstrap list. 2016-12-12 21:15:49 +02:00
sledgehammer999
f3f175570c Use the new API to add DHT bootstrap nodes for libtorrent 1.1.x and simplify the code a bit. 2016-12-12 21:15:49 +02:00
sledgehammer999
729c80f910 Use new libtorrent 1.1.2+ utility function to generate client ID instead. 2016-12-12 21:15:48 +02:00
sledgehammer999
fcaca558a0 Make sure that paths are loaded/saved using slashes as dir separators. 2016-12-12 21:15:48 +02:00
sledgehammer999
983df9113e Display message about libtorrent plugins for the correct case. 2016-12-12 21:15:48 +02:00
sledgehammer999
acf9874252 Migrate last setting related to interfaces to the new system. 2016-12-12 21:15:48 +02:00
sledgehammer999
d7cf6bb11b Fix save/load of interface address setting. 2016-12-12 21:15:47 +02:00
sledgehammer999
558ea53cc2 Use better variable names for tracker announce IP setting. 2016-12-12 21:15:47 +02:00
sledgehammer999
87a6478430 Fix values for unsetting speed limits. 2016-12-12 21:15:47 +02:00
sledgehammer999
cea673b267 Unify and simplify setting to use proxy for torrents only. 2016-12-12 21:15:46 +02:00
sledgehammer999
4a5ab93c62 Guard the flag used for deferred session configure. 2016-12-12 21:15:46 +02:00
sledgehammer999
4c86fc8973 Misc fixes. 2016-12-12 21:15:46 +02:00
sledgehammer999
1c485ffb07 Fix setting limits to unlimited. 2016-12-12 21:15:46 +02:00
sledgehammer999
f283734f13 Rename IP filtering functions and settings names. 2016-12-12 21:15:45 +02:00
sledgehammer999
dca4ff0649 Export torrents added only after the setting was enabled. 2016-12-12 21:15:45 +02:00
Vladimir Golovnev (Glassez)
1975f2269e Use new libtorrent-1.1 settings API 2016-12-12 21:15:42 +02:00
Vladimir Golovnev (Glassez)
6fac9b42da Don't use Preferences in BitTorrent::Session 2016-12-12 21:12:01 +02:00
DaRKSoM
dabae4c914 Update portugueseBR.nsi 2016-12-12 21:11:20 +02:00
Burak Yavuz
b1e9b4493d Turkish translation 2016-12-12 21:11:19 +02:00
Chocobo1
2fa207e728 The intended action is set the bit to 1, not flipping it. 2016-12-12 21:11:19 +02:00
Chocobo1
7adcd909e7 Fix crash when restoring from tray. Closes #5854. 2016-12-12 21:11:19 +02:00
ngosang
50805fc2b5 [Search engine] Remove TorrentReactor plugin 2016-12-12 21:11:19 +02:00
ngosang
3a1b7b6159 [Search engine] Update Demonoid plugin 2016-12-12 21:11:18 +02:00
sledgehammer999
498b7c2436 Properly fix the handling of default save path store/load. Bug introduced in dd34663224 2016-12-12 21:11:18 +02:00
erikssm
4f17364305 fix default save path bug 2016-12-12 21:11:18 +02:00
Yez Ezey
9ebc115719 Fix Mac OS X Build (Closes #5763)
Deleted offending code
    setUnifiedTitleAndToolBarOnMac(false);
which was a workaround to avoid bug https://bugreports.qt.io/browse/QTBUG-7305
The bug was fixed at Qt 4.6.2 https://github.com/Blizzard/qt4/blob/master/dist/changes-4.6.2
2016-12-12 21:11:17 +02:00
Yez Ezey
a6fa8c3a8e Fixed extratorrent search not working Closes #5736 #5753
The original code accumulates all the <td> texts between the description
link and the number of seeders into self.current_item["size"]:
    <td>248.72</td><td>&nbsp;MB<td> => "248.72 MB".
ExtraTorrents changed the table design, added the Added column and joined
the number and its unit:
    <td>8d</td><td>248.72&nbsp;MB</td> => "8d 248.72 MB"
This commit stores only the last <td> text in self.current_item["size"].
2016-12-12 21:11:17 +02:00
sledgehammer999
8187366c89 Use a subdomain to redirect to the actual URL for search plugins.
Will allow to move around the plugins in the git repo with the 3.4.0 release.
2016-12-12 21:11:16 +02:00
thalieht
366ad01120 fix webui port overflow 2016-12-12 21:11:16 +02:00
sledgehammer999
4da05e5914 Update UAC nsis plugin to 0.2.4c. Building the installer with nsis 3.0 (final) is possible now. Closes #5556. 2016-09-12 17:31:42 +03:00
sledgehammer999
3fb19b6a28 Fix travis again.
I wish the homebrew guys didn't break it so often and the travis guys updated their images more frequently.
2016-09-12 02:46:48 +03:00
sledgehammer999
88f59070a4 Bump to 3.3.7 2016-09-11 22:20:55 +03:00
sledgehammer999
476ffbe68a Update Changelog. 2016-09-11 22:18:31 +03:00
sledgehammer999
8a1846cb26 Sync translations from Transifex and run lupdate. 2016-09-11 22:08:44 +03:00
ngosang
1cafde2afe Fix warning in geoipdatabase.cpp 2016-09-09 02:02:14 +03:00
Brian Kendall
bdf7312f5d Better error handling with smtp communication.
Adds log messages for a number of situations where sending an email will silently fail, in particular when attempting to create an unencrypted connection to an SMTP server that requires SSL
2016-09-09 02:02:14 +03:00
Brian Kendall
a848d3d2d8 Hiding SSL / SMTP option when building without SSL support
The SMTP server always uses unencrypted connections in this case so showing the check box is misleading
2016-09-09 02:02:14 +03:00
SagePtr
4a328843e4 Update geoipdatabase.cpp
Updated MaxMind database limit from 10MB to 64MB. I hope it will be enough
for few years. Fix for issue #5609
2016-09-09 02:02:13 +03:00
ngosang
edeb2342be [Search engine] Update Torrentz2 search engine 2016-09-09 02:02:13 +03:00
Chocobo1
0639a06809 Call system msiexec.exe directly 2016-09-09 02:02:13 +03:00
Chocobo1
7590d0fdad Add function windowsSystemPath() 2016-09-09 02:02:12 +03:00
sledgehammer999
fe54da80cd Fix deletion via the context menu. Broken by #5616. 2016-09-09 02:02:12 +03:00
ngosang
e4ac654795 [Search engine] Update Torrentz search engine 2016-09-09 02:02:12 +03:00
ngosang
1848180faa [Search engine] Remove BTDigg search engine 2016-09-09 02:02:11 +03:00
ngosang
4e9b71078f [Search engine] Remove KickassTorrents search engine 2016-09-09 02:02:11 +03:00
Chocobo1
fe1b388347 Use "Standard Shortcuts" defined by Qt whenever possible. 2016-09-09 02:02:10 +03:00
pieniacy
23b4e62834 Add torrent and files deletion with Shift+Delete hotkey 2016-09-09 02:02:10 +03:00
Chocobo1
7fb96431b9 Avoid spawning a new explorer.exe process when selecting "Open containing
folder". Closes #5564.
2016-09-09 02:02:10 +03:00
Chocobo1
5213f35ec0 Refactor 2016-09-09 02:02:09 +03:00
Chocobo1
8e2297510d Uncrustify misc.cpp 2016-09-09 02:02:09 +03:00
Daniel Segesdi
18505e2517 Fix 6-hour speedplot point push rate. Close #5545 2016-09-09 02:02:09 +03:00
sledgehammer999
10908a6ece Upgrade pkg-config travis-ci for OS X.
Fixes 'zlib not found` errors.
Details: https://github.com/Homebrew/brew/issues/563
2016-09-09 02:02:08 +03:00
sledgehammer999
c1ee91cd2a Bump to 3.3.6 2016-07-20 01:38:11 +03:00
sledgehammer999
036b4e1a85 Update Changelog. 2016-07-20 01:35:20 +03:00
sledgehammer999
3a4dc08304 Update qt-translations and related installer files. 2016-07-20 01:35:14 +03:00
sledgehammer999
e805e6806a Sync translations from Transifex and run lupdate. 2016-07-20 00:49:07 +03:00
Chocobo1
f2163f6c3d Fix icons are missing when using RTL languages in Options dialog. Closes #5398. 2016-07-20 00:41:39 +03:00
Chocobo1
6288cb4fd3 [TravisCI] lock-on to libtorrent-rasterbar 1.0.9 version 2016-07-20 00:41:31 +03:00
Chocobo1
409e877f8a Workaround space issues in file path
References:
https://github.com/qbittorrent/qBittorrent/issues/5439#issuecomment-228616817
https://github.com/qbittorrent/qBittorrent/issues/5439#issuecomment-232214712
2016-07-20 00:41:22 +03:00
Chocobo1
f2d5ba2907 Invoke system's cmd.exe directly. 2016-07-20 00:41:14 +03:00
Chocobo1
b33d0f0a59 Fix upper-bound limit of command line for "Run External Program" in Windows. Closes #5399. 2016-07-20 00:41:05 +03:00
Vladimir Golovnev (Glassez)
63245de69b Do not create save folder in advance
Closes #5422.
2016-07-20 00:40:58 +03:00
Vladimir Golovnev (Glassez)
b9fd9f1d8d Show type name in btjson.cpp@processMap assert
This may help to solve #5381
2016-07-20 00:40:49 +03:00
sledgehammer999
c6fe1d3620 Bump to 3.3.5 2016-06-20 04:22:46 +03:00
sledgehammer999
73f08dd6e1 Update Changelog. 2016-06-20 04:19:41 +03:00
sledgehammer999
22dc71f365 Fix build. 2016-06-20 04:13:44 +03:00
ngosang
455cc29dad [search engine] Remove filters from Demonoid 2016-06-20 02:40:47 +03:00
ngosang
9d39a2cddc [search engine] Remove filters from Torrentreactor and BTDigg 2016-06-20 02:40:46 +03:00
sledgehammer999
efeb46571b Sync translations from Transifex and run lupdate. 2016-06-20 02:36:16 +03:00
sledgehammer999
a7b564bb2e Fix parsing of eMule .DAT filters. Closes #5281. 2016-06-20 02:25:12 +03:00
sledgehammer999
10df509bce Fix API_VERSION and API_VERSION_MIN numbers. 2016-06-20 02:18:19 +03:00
sledgehammer999
7b394d6e99 Don't use QCollator for sorting on Windows. Closes #5238 and #5240. 2016-06-20 02:04:37 +03:00
Chocobo1
f1968de2c9 Improve usability of "Run External Program"
Users can write (platform dependent) shell scripts now.
2016-06-20 02:04:37 +03:00
Chocobo1
b5db0eeec1 Add log messages 2016-06-20 02:04:37 +03:00
Chocobo1
3ed803f59b Fix widget name collision.
Small cleanup on Downloads page.
2016-06-20 02:04:36 +03:00
Chocobo1
ff10702bfd Let user able to specifiy a filter when choosing an IP filter file 2016-06-20 02:04:36 +03:00
Chocobo1
73d3664f92 Fix reload button size is not the same size as "..." button.
Rename Connection tab page
2016-06-20 02:04:36 +03:00
Chocobo1
aa6025aa87 Rename "options.ui" to "optionsdlg.ui"
Rename class name "options_imp" to "OptionsDialog"
Rename "options_imp.cpp" to "optionsdlg.h"
2016-06-20 02:04:35 +03:00
Chocobo1
a344886ef6 Move options ui as a pointer member variable 2016-06-20 02:04:35 +03:00
Chocobo1
c181019f40 Follow header inclusion rule 2016-06-20 02:04:21 +03:00
Chocobo1
5962efde23 Cleanup Connection page in Option dialog.
Add vertical spacer, closes #845.
2016-06-20 02:04:21 +03:00
Eugene Shalygin
d43466d466 Fix empty tooltips showed at the progress bar borders
If tooltip text contains an empty HTML body, Qt still shows it as an
empty rectangle. Thus, output HTML tags only if we are within the
image region, and return true empty string if we are at the borders.
2016-06-20 02:04:21 +03:00
Eugene Shalygin
29fb8e8085 Replace TorrentHandle::fileExtremityPieces() with TorrentInfo::filePieces() 2016-06-20 02:04:20 +03:00
Eugene Shalygin
b076ff68ac Show files in tooltips for pieces progress bars
In addition to the current tooltip, which shows color legend, if user
holds the Shift key during hovering we show another tooltip which
contains a table of contents for the piece under the moue cursor. The
table lists file sizes and names. If the cursor points to a part of a
file which spans several pieces, those pieces are highlighted.
2016-06-20 02:04:20 +03:00
Eugene Shalygin
5f2da3a529 Follow project coding style. Issue #2192. 2016-06-20 02:04:20 +03:00
ngosang
576fbe5dc1 Update Python version requirements 2016-06-20 02:04:19 +03:00
Eugene Shalygin
8fc7f3fdc0 uncrustify: replace "add" with "force" for sp_ parameters
This will make uncrustify able to remove excessive spaces
2016-06-20 02:04:19 +03:00
Chocobo1
becd67ac84 Delete all mainwindow child widgets. Closes #4871, #5049.
Some of the `delete` can be handled by the findChild loop
2016-06-20 02:04:19 +03:00
Chocobo1
7761a2604a Use QAtomicInt to guarantee cleanup() is only executed once 2016-06-20 02:04:18 +03:00
ngosang
c6546db138 Minor changes in Search UI 2016-06-20 02:04:18 +03:00
ngosang
f0dd4d5673 [Search engine] Update Torrentz 2016-06-20 02:04:18 +03:00
ngosang
7f245b63d7 [Search engine] Update PirateBay 2016-06-20 02:04:17 +03:00
ngosang
af17f4df9e Minor fix: typo and two warnings 2016-06-20 02:04:17 +03:00
sledgehammer999
3ec2f94b27 Fixup previous commits and allow IPv6 interface addresses too. 2016-06-20 02:04:17 +03:00
Sjoerd van der Berg
d7f1beb7f1 Use a combo box to select the IP address you want to listen on for a specific interface 2016-06-20 02:04:16 +03:00
Sjoerd van der Berg
8c7a4ab86c Fix variable name 2016-06-20 02:04:16 +03:00
Sjoerd van der Berg
ce2d42a264 Change back to the original names for the announce address
Only allow ip's through that match the currenrly selected network interface and address
2016-06-20 02:04:16 +03:00
Sjoerd van der Berg
dc011a5599 Add option to bind directly to an IP instead of using a network Interface 2016-06-20 02:04:16 +03:00
Eugene Shalygin
3c6b79805c Use QPalette::LinkVisited color for downloaded items in search results 2016-06-20 02:04:15 +03:00
sledgehammer999
7e7055f2ff Sync translations from Transifex and run lupdate. 2016-06-20 02:04:12 +03:00
sledgehammer999
18c9a65340 Rename ASM to TMM and related stuff. 2016-06-20 02:03:08 +03:00
sledgehammer999
f5ce39a36a Add tooltip to the saving mode checkbox. 2016-06-20 02:03:08 +03:00
sledgehammer999
58e4f9d38e Slim down 'Downloads' page of options window. 2016-06-20 02:03:08 +03:00
botmtl
5bd7dce396 default RSSRefreshInterval to 30 mins
closes issue #5235 (https://github.com/qbittorrent/qBittorrent/issues/5235)
2016-06-20 02:03:07 +03:00
sledgehammer999
d9d49b6d0b Fix gcc 6 compilation with qmake. See #5237. 2016-06-20 02:03:07 +03:00
Chocobo1
cc48ca1fdc Use QString::localeAwareCompare for comparsion 2016-06-20 02:03:07 +03:00
Chocobo1
2dc6002064 Use boost:circular_buffer instead of QList.
QList has to store an additional pointer for each element which leads to bad space efficiency.
2016-06-20 02:03:06 +03:00
ngosang
1478b21e8d [WebUI] Expose Add trackers feature 2016-06-20 02:03:06 +03:00
Gabriele
726c2fd56d WebUI: Add command to get the logs
Add /query/getLog and /query/getPeerLog to respectively retrieve
the main log and the peer log.

GET /query/getLog
Params:
 - normal (bool): include normal messages (default true)
 - info (bool): include info messages (default true)
 - warning (bool): include warning messages (default true)
 - critical (bool): include critical messages (default true)
 - last_known_id (int): exclude messages with id <= 'last_known_id'

GET /query/getPeerLog
Params:
 - last_known_id (int): exclude messages with id <= 'last_known_id'
2016-06-20 02:02:49 +03:00
SeigneurSerpent
df86d66702 Improve stack trace for windows by including source filenames and line numbers 2016-06-20 02:02:48 +03:00
Eugene Shalygin
223415fb69 update uncrustify config 2016-06-20 02:02:48 +03:00
thalieht
a4c9b667a7 resize column to contents only when they're visible
refactor updatePeerCountryResolutionState
deprecate m_resolveCountries var
2016-06-20 02:02:48 +03:00
Chocobo1
5f8e05ba50 Cleanup headers
Code formatting
2016-06-20 02:02:47 +03:00
Chocobo1
ed2689de15 Add lookup function to get PathType display names 2016-06-20 02:02:47 +03:00
Chocobo1
9e124527e1 Improve error messages for "Auto download torrents" 2016-06-20 02:02:47 +03:00
Vladimir Golovnev (Glassez)
59971aa577 Use new alert dispathing API 2016-06-20 02:02:47 +03:00
Ibrahim Tachijian
164ca0289a Add 'Added on' column in Webui. Closes #5145,#1092,#738 2016-06-20 02:02:46 +03:00
Chocobo1
c0aa50d74b Change ambiguous text "Copy selected" to "Copy IP:port" 2016-06-20 02:02:46 +03:00
Chocobo1
66d7dc751c Change "Auto download torrent" default save path to "default location". 2016-06-20 02:02:46 +03:00
Chocobo1
c1738f97f1 Improve wordings in "Auto download torrent" section 2016-06-20 02:02:45 +03:00
Eugene Shalygin
105874613a Fix crash when adding torrent via a magnet url
The file guard object has to be initialised in this case too because it
is accessed when dialog gets accepted or cancelled. Initialise it with
empty path.
2016-06-20 02:02:45 +03:00
Eugene Shalygin
d6829b253b Fix a typo in TorrentFileGuard 2016-06-20 02:02:45 +03:00
Eugene Shalygin
c1291539bf uncrustify: add constructor initialization list options 2016-06-20 02:02:45 +03:00
Eugene Shalygin
3060c979f4 Add option to automatically remove .torrent files upon adding
Some browsers do not download files, intended for immediate opening,
into a temporary directory, and thus a regular download directories
accumulate those unneeded files.

The option allows qBittorrent to clean after itself and delete those
files whether they were succesfully added or not (user-selectable
policy).
2016-06-20 02:02:41 +03:00
sledgehammer999
d71a18b945 Update definition of QBT_USES_QT5 to be true for qt >= 5.2.0 2016-06-20 02:01:34 +03:00
Chocobo1
4078fc5e2d Add case-sensitive & case-insensitive natural sort helper function
Fix helper function not being thread-safe
Use QBT_USES_QT5 define
2016-06-20 02:01:34 +03:00
Chocobo1
b7cb53a251 Cleanup headers
Move `class NaturalCompare` to .cpp file
2016-06-20 02:01:33 +03:00
Chocobo1
275a775769 Minor code formatting 2016-06-20 02:01:33 +03:00
Chocobo1
1c49ff1df6 Sort labels with naturalCompare(). Closes #3919. 2016-06-20 02:01:18 +03:00
Chocobo1
fc77fdbcb5 Replace naturalSort() with naturalCompare(). 2016-06-20 02:01:18 +03:00
Chocobo1
e0e757b610 Use qmake built-in test function files to locate translation files 2016-06-20 02:01:18 +03:00
Chocobo1
33fe9b6d87 Use POSIX shell 2016-06-20 02:01:17 +03:00
Chocobo1
fca78d1a3f Re-enable cache for linux builds
Enable cache for OSX builds
2016-06-20 02:01:17 +03:00
Chocobo1
92794a786f Suppress warning on OSX builds 2016-06-20 02:01:17 +03:00
zywo
08d9ad7f80 Set about tab font-size to default 2016-06-20 02:01:16 +03:00
Chocobo1
6023093329 Fix "IP Filtering - Apply to trackers" wasn't being applied. Closes #5217. 2016-06-20 02:01:16 +03:00
Eugene Shalygin
c070193c30 uncrustify: honour pointer and reference symbols alignment rules
Stick the '*' and '&' symbols to the variable name if there is one.
Also fix empty function bodies collapse option: replace it with the
eat_blanks_before_close_brace setting.
2016-06-20 02:01:16 +03:00
Eugene Shalygin
633fb7a7de refactor SettingsStorage class
1. Extract "transaction" support for QSettings into separate class
TransactionalSettings.
2. Define macrto with explicit name for the case when this "transaction"
support is needed.
3. A bit optimize QHash <-> QSettings copying: replace assign with
insert() and remove repetitive key lookups.
4. In save() check dirty status before getting the lock too.

The changes from items 1 and 2 make text more structured and the logic
of the SettingsStorage class gets separated from the implementation level
task of guarding the settings serialization. The changes in 3 and 4 do not
make the app much faster, but neither make any harm to the code readability.
2016-06-20 02:01:15 +03:00
Eugene Shalygin
14a37e8d45 cmake: add Qt::DBus library dependency for base module
This is needed for powermanagement and was mistakenly forgotten
2016-06-20 02:01:15 +03:00
Eugene Shalygin
d03a71899e cmake: mark libtorrent and qtsingleapplication include dirs as system 2016-06-20 02:01:15 +03:00
sledgehammer999
283338f5f3 Don't show added torrent notification during startup. 2016-06-20 02:01:15 +03:00
sledgehammer999
b600253313 Display notifications when a torrent is added. Closes #334 and #915. 2016-06-20 02:01:14 +03:00
Vladimir Golovnev (Glassez)
c97b5ab617 Fix .!qB extension is added when disabled 2016-06-20 02:01:14 +03:00
Vladimir Golovnev (Glassez)
9016b698c9 Use truncated torrent hash in temp path 2016-06-20 02:01:14 +03:00
Vladimir Golovnev (Glassez)
eb7a7b9c04 Use unique temp directories
Save torrent in temp_path/<torrent_hash> directory.
Closes #5154.
2016-06-20 02:01:13 +03:00
Eugene Shalygin
9e0a3ee692 cmake: reflect qmake project changes 2016-06-20 02:00:51 +03:00
ngosang
c899ed5b50 Fix duplicate network interfaces. Closes #5131 2016-06-20 02:00:50 +03:00
Vladimir Golovnev (Glassez)
a6c50aff95 Delete Import Torrent Dialog 2016-06-20 02:00:50 +03:00
Vladimir Golovnev (Glassez)
ab4a608342 Fix rechecking after torrent is finished 2016-06-20 02:00:50 +03:00
Vladimir Golovnev (Glassez)
e7cfd7a31d Try to find incomplete files for new torrent 2016-06-20 02:00:49 +03:00
Vladimir Golovnev (Glassez)
c4ea13b284 Fix torrent adding with existing data 2016-06-20 02:00:49 +03:00
Chocobo1
5d09639109 Fix mutually exclusive radio buttons can be unselected. 2016-06-20 02:00:49 +03:00
Chocobo1
885f5b4bee Enable word wrap for "Run external program" help text 2016-06-20 02:00:49 +03:00
Chocobo1
3cd06c457a Fix toolbar resizing when m_searchFilter appears/disappears. Closes #5120. 2016-06-20 01:53:08 +03:00
Chocobo1
373e22660d Disable comboHideZero when checkHideZero is unchecked.
Disable `checkLimituTPConnections` when `checkuTP` is unchecked.
Minor code formatting
2016-06-20 01:53:08 +03:00
Chocobo1
92f58a40e7 Morph QToolButton to QPushButton 2016-06-20 01:53:07 +03:00
Chocobo1
dbf5a264bd Fix path to resource 2016-06-20 01:52:54 +03:00
ngosang
145dcf9efe [Search engine] Fix LegitTorrents plugin 2016-06-20 01:52:54 +03:00
ngosang
f05e25c750 [Search engine] Fix Mininova plugin 2016-06-20 01:52:54 +03:00
ngosang
fc02377171 [Search engine] Fix Torrentz plugin for Python2 2016-06-20 01:52:53 +03:00
Eugene Shalygin
3816052b0a Add "slots" to WORDS keyword.
Uncrustify inserts line break between an access specifier and "slots".
However, it keeps these words combinations if "Q_SLOTS" is used.
Its built-in parser classifies "Q_SLOTS" as WORD token, thus let's add
"slots" to that class.
2016-06-20 01:52:53 +03:00
ngosang
fae583e0da Fix Add tracker dialog URL download 2016-06-20 01:52:53 +03:00
ngosang
1114c198ca Fix Add tracker dialog empty trackers 2016-06-20 01:52:52 +03:00
Eugene Shalygin
c5f9567c0b cmake: raise minimal cmake version to 3.5 and use its features 2016-06-20 01:52:52 +03:00
Eugene Shalygin
e9a5768e4f cmake: drop explicit Boost dependency
We get it implicitly from libtorrent
2016-06-20 01:52:52 +03:00
Eugene Shalygin
858e5f8db8 cmake: add imported target for Libtorrent 2016-06-20 01:52:51 +03:00
Vladimir Golovnev (Glassez)
0afa83dbfa Add coding style rule for header inclusion order 2016-06-20 01:52:51 +03:00
ngosang
fc95ce310e Fix Update all button height in RSS tab 2016-06-20 01:52:51 +03:00
ngosang
e2c9e7b877 Minor change in Stats dialog 2016-06-20 01:52:51 +03:00
sledgehammer999
b1e62ca006 Display the filepath when a torrent fails to load. Closes #100 and #805. 2016-06-20 01:52:50 +03:00
Jerome Leclanche
a063ebd396 LICENSE: Fix mixed indenting 2016-06-20 01:52:50 +03:00
Jerome Leclanche
728dd744bb LICENSE: Remove copy/paste error 2016-06-20 01:52:49 +03:00
Chocobo1
a0c1ee76a2 Fix qBittorrent doesn't exit immediately when "all donwloads are done -> exit" option enabled.
This fix is provided by glassez.
2016-06-20 01:52:49 +03:00
Chocobo1
c7b15b9cc5 Enable access to shutdown functions when configured with --disable-gui option 2016-06-20 01:52:29 +03:00
Chocobo1
0770fe8b09 Fix Coverity Scan 143909.
Also, the setting "Confirmation on auto-exit when downloads finish" wasn't working before.
2016-06-20 01:52:28 +03:00
sledgehammer999
cf98220c40 Fix log menu item position broken by 1760beed17. 2016-06-20 01:52:28 +03:00
sledgehammer999
2eb393ae9a Bump API_VERSION to 11. 2016-06-20 01:52:26 +03:00
buinsky
d65d11d64c WebUI: Select category on right click 2016-06-20 01:50:55 +03:00
buinsky
f4fdb80cc9 WebUI: Don't show several context menus at the same time 2016-06-20 01:50:54 +03:00
buinsky
50a0ce1da2 WebUI: Adjust context menu position 2016-06-20 01:50:54 +03:00
buinsky
2e9370481d WebUI: Implement delete torrents by category 2016-06-20 01:50:54 +03:00
buinsky
c60c58b092 WebUI: Implement pause torrents by category 2016-06-20 01:50:53 +03:00
buinsky
ba5dded076 WebUI: Implement start torrents by category 2016-06-20 01:50:53 +03:00
buinsky
eb36949e87 WebUI: Implement removing unused categories 2016-06-20 01:50:53 +03:00
buinsky
b7358a3039 WebUI: Implement removing categories 2016-06-20 01:50:52 +03:00
buinsky
d0f082e238 WebUI: Implement adding categories 2016-06-20 01:50:52 +03:00
buinsky
b301444f5e WebUI: Add empty context menu to categories filter 2016-06-20 01:50:52 +03:00
buinsky
900a80adc1 WebUI: Rename function updateCategoryFN to setCategoryFN 2016-06-20 01:50:51 +03:00
buinsky
d4887ee736 WebUI: Refactor ContextMenu class 2016-06-20 01:50:37 +03:00
Chocobo1
e23566cde1 Rename files:
confirmshutdowndlg.ui => shutdownconfirmdlg.ui
shutdownconfirm.cpp => shutdownconfirmdlg.cpp
2016-06-20 01:50:36 +03:00
Chocobo1
b5f30a6efb Enlarge dialog size. Closes #5091.
This avoids text clipping when using Qt4 lib.
2016-06-20 01:50:36 +03:00
Chocobo1
deb1d54999 Rename enum
Change identifier from ShutdownAction to ShutdownDialogAction
Change enum value from None to Exit
2016-06-20 01:50:36 +03:00
Chocobo1
7779efbc30 Refactor
Add helper function to initialize shutdown message.
Group similar functions together.
Merge shutdown() function into its only caller.
Add override keyword
2016-06-20 01:50:35 +03:00
Chocobo1
acd65e3185 Cleanup header include
Code formatting
2016-06-20 01:50:35 +03:00
Chocobo1
f2dd050ade Fix Coverity Scan cid 143911.
`filesCount()` could return a negative value.
2016-06-20 01:50:35 +03:00
Chocobo1
9c28a48f2e Fix class member initialize order 2016-06-20 01:50:35 +03:00
Chocobo1
3e8af95d30 Fix warnings in mainwindow.ui. Closes #5117.
gui/mainwindow.ui: Warning: The name 'actionExecutionLogs' (QAction) is already in use, defaulting to 'actionExecutionLogs1'.
gui/mainwindow.ui: Warning: action `actionSearch_engine' not declared
gui/mainwindow.ui: Warning: action `actionRSS_Reader' not declared
2016-06-20 01:50:19 +03:00
Eugene Shalygin
cba9d222de cmake: add imported target for QtSingleApplication
This simplifies cmake code a bit: we remove if's and just generate
different target (imported or alias) with the same name and use it
unconditionally.
2016-06-20 01:50:18 +03:00
Eugene Shalygin
b137eb01ed cmake: fix Qt resources linkage. Closes #5080
Qt resource is innitialized by a static object constructor (see
https://wiki.qt.io/QtResources). When we put resources into a static
library, the linker removes that static objects and thus the resources
themselves. To correct that we append resources to the main executable
sources list. This is done via custom function qbt_target_sources which
knows where to read the executable' name.
2016-06-20 01:50:18 +03:00
Vladimir Golovnev (Glassez)
fd156580a0 Fix coding style rules
Closes #5075
2016-06-20 01:50:18 +03:00
Chocobo1
21c17f2a81 Move m_searchPattern widget from code to .ui file 2016-06-20 01:50:18 +03:00
Chocobo1
5f19cd2c0e [Search] Add seperator for categories & plugins
Sort categories & plugins entries
Rename & reorder entries
Use full name for plugins
2016-06-20 01:50:17 +03:00
Chocobo1
9279fedd49 [Search] match combobox height to button height 2016-06-20 01:50:17 +03:00
Chocobo1
2361d6f12d [Search] minor cleanups 2016-06-20 01:50:00 +03:00
Vladimir Golovnev (Glassez)
78bfbc5669 Use nova2dl.py script instead of DownloadManager
Closes #5026
2016-06-20 01:49:59 +03:00
sledgehammer999
6101f11673 Sync translations from Transifex and run lupdate. 2016-06-20 01:49:56 +03:00
sledgehammer999
15361a6c16 Follow project coding style. Issue #2192. 2016-06-20 01:36:35 +03:00
Anton Lashkov
835a999464 SpeedPlotView: code correction 2016-06-20 01:36:34 +03:00
Anton Lashkov
b9b0739efd SpeedPlotView: Simplify code using PointData struct 2016-06-20 01:36:21 +03:00
Anton Lashkov
a34c072b7a SpeedPlotView: Use separate buffers for periods with reduce number of points. Fix coding style. 2016-06-20 01:36:20 +03:00
Anton Lashkov
72e88ba7ec SpeedPlotView: Save int's instead of double's 2016-06-20 01:36:20 +03:00
Anton Lashkov
afb143cad1 SpeedPlotView: Replace QQueue by boost::circular_buffer, reduce number of points to draw, increase legend background size 2016-06-20 01:36:20 +03:00
Chocobo1
1ca5d10abb Fix resizing bug in "add torrent dialog". Closes #5036.
1. Place all widgets in "Torrent information" into the same grid layout
instead of different layouts.
2. Tweak tab order.
2016-06-20 01:36:01 +03:00
Chocobo1
67675b6cdc Fix long text clipping. Closes #5091. 2016-06-20 01:36:00 +03:00
Eugene Shalygin
ef47983d8d Remove duplicated code from search tab and widget
Both download handlers (in the tab and widget classes) convert model
index into an URL, set row color, and call download function.
Make the download button handler (in the SearchWidget class) call the
slot of the SearchTab class.
2016-06-20 01:36:00 +03:00
Eugene Shalygin
cf47517ee3 cmake: reflect qmake project changes 2016-06-20 01:36:00 +03:00
sledgehammer999
33199bbd74 Fix qt5 bundle on OSX. Closes #4014. 2016-06-20 01:35:59 +03:00
sledgehammer999
4fb735c6d1 Change gpg signing key.
I forgot the passphrase to the old one.
2016-06-20 01:35:59 +03:00
Vladimir Golovnev (Glassez)
99ca42bf48 Fix MainWindow coding style (Issue #2192) 2016-06-20 01:35:59 +03:00
Vladimir Golovnev (Glassez)
f6b4b5f6f0 Fix macro define cross over access specifiers 2016-06-20 01:35:59 +03:00
Vladimir Golovnev (Glassez)
6f73c32fcc Delete old RSS cookies dialog 2016-06-20 01:35:42 +03:00
Vladimir Golovnev (Glassez)
c1611988b4 Create basic cookies management dialog 2016-06-20 01:35:42 +03:00
Vladimir Golovnev (Glassez)
fbe1d2d78a Implement basic cookies model 2016-06-20 01:35:41 +03:00
Chocobo1
34fec15ceb Improve TransferListDelegate::sizeHint 2016-06-20 01:35:41 +03:00
ngosang
1977e4f24d Fix uic warnings. Closes #5056 2016-06-20 01:35:41 +03:00
Chocobo1
5774d27c7b Follow project coding style. Issue #2192. 2016-06-20 01:35:17 +03:00
Chocobo1
3a6a857371 Let windows handle all widgets scaling.
Declare ourselves as a Non DPI–aware app.
Tested with Qt 5.6.
2016-06-20 01:02:07 +03:00
Eugene Shalygin
e2f88feaf9 Optimize widgets inside of the search tab
Since we already have searchtab.ui, let's set up all the widgets there.
Additionally, save a bit of vertical space by putting results label in
a row with the filter widgets.
2016-06-20 01:02:07 +03:00
Eugene Shalygin
16fec04b6a Implement search filters in the proxy model. Partially closes #972 2016-06-20 01:02:06 +03:00
sledgehammer999
fbac4afa2d Fix indentation. 2016-06-20 01:02:06 +03:00
Eugene Shalygin
d6e9736af1 update uncrustify config 2016-06-20 01:02:06 +03:00
sledgehammer999
76b3c72c86 Fix memory leak. 2016-06-20 01:02:05 +03:00
sledgehammer999
ef954fea55 Use SettingsStorage instead. 2016-06-20 01:00:18 +03:00
Chocobo1
11d085712e Minor refactor 2016-06-20 01:00:10 +03:00
Vladimir Golovnev (Glassez)
e4bc7852e5 Fix save path bugs 2016-06-20 00:59:57 +03:00
Vladimir Golovnev (Glassez)
3d107e0588 Implement Advanced Saving Management subsystem
Closes #4696
2016-06-20 00:59:37 +03:00
Vladimir Golovnev (Glassez)
8e5c31ae82 Move Preferences backend code into SettingsStorage class
Closes #4764
2016-06-20 00:52:50 +03:00
Vladimir Golovnev (Glassez)
3c03ccc14a Make AddNewTorrentDialog behavior uniform 2016-06-20 00:52:44 +03:00
sledgehammer999
0795320086 Bump to 3.3.4 2016-03-29 23:21:35 +03:00
sledgehammer999
bd6877a0bd Update Changelog. 2016-03-29 23:19:29 +03:00
sledgehammer999
b47292c39f Bump API_VERSION and API_VERSION_MIN. 2016-03-29 23:17:30 +03:00
sledgehammer999
3d2b1b876b Fix public key commit again. 2016-03-28 22:20:15 +03:00
sledgehammer999
843472e663 Fix newlines in previous commit. 2016-03-28 22:20:15 +03:00
sledgehammer999
e952e3167e Add public key used for signing source tarballs and binaries. 2016-03-28 22:20:14 +03:00
sledgehammer999
67f05edf71 Sync translations from Transifex and run lupdate. 2016-03-28 22:19:37 +03:00
Eugene Shalygin
3ab76cb985 cmake: make it compile on OS X 2016-03-28 21:30:14 +03:00
Eugene Shalygin
509d97b0ad cmake: fix compilation 2016-03-28 21:30:13 +03:00
Chocobo1
67ae08df3c Minor cleanups in RSS 2016-03-28 21:30:13 +03:00
Chocobo1
38de6b1e41 Remove border around execution log 2016-03-28 21:30:13 +03:00
ngosang
72b179805d [Search engine] Added TorLock search engine. Fix #5012 2016-03-28 21:30:13 +03:00
ngosang
beeda5e0b2 Potential fix for crash. Closes #4990, #4905, #4864, #4855, #4818, #4726, #4648 2016-03-28 00:14:55 +03:00
sledgehammer999
356db2f2f7 Fix periodic latency spikes on Windows with WiFi connections. Closes #4209. 2016-03-27 23:57:29 +03:00
Chocobo1
19acbf587f Beautify messages
And some refactor
2016-03-27 23:57:23 +03:00
Chocobo1
5eee3f7357 confirmshutdowndlg.ui cleanup
shutdownconfirm.cpp cleanup
2016-03-27 23:57:18 +03:00
sledgehammer999
8f990d5d7e Fix previous commit. 2016-03-27 23:57:12 +03:00
d3fault
f0ec94c31c Add 'never show again' checkbox/pref to auto-exit confirm dialog 2016-03-27 23:57:06 +03:00
sledgehammer999
e37dfa96f9 Fix commit about Esperanto. Closes #4999 again. 2016-03-27 23:57:01 +03:00
Chocobo1
4b48db3273 Fix "caja" file manager opens the file instead of opens the directory. Closes #5003.
Now it opens the directory correctly.
2016-03-27 23:56:56 +03:00
ngosang
545002a809 [Search engine] Added TorLock search engine 2016-03-27 23:56:50 +03:00
ngosang
e2e9470e10 [Search engine] Change URL getting mechanism in BTDigg 2016-03-27 23:56:45 +03:00
ngosang
0bf1abba6a [Search engine] Fix Python 2 encoding problems 2016-03-27 23:56:39 +03:00
Vladimir Golovnev (Glassez)
24165856e9 Add new Coding Style rules for some c++11 features 2016-03-27 23:56:34 +03:00
sledgehammer999
657f0640b9 Fix selection of Esperanto locale. Closes #4999. 2016-03-27 23:56:28 +03:00
sledgehammer999
faffefc4ff Implement file logger. 2016-03-27 23:56:23 +03:00
sledgehammer999
0619aacf1f Add ability to filter log messages by type. 2016-03-27 23:56:17 +03:00
sledgehammer999
9edbbb6473 Minor log widget code optimizations. 2016-03-27 23:56:12 +03:00
sledgehammer999
87ee720c0c Follow project coding style. Issue #2192. 2016-03-27 23:56:06 +03:00
ngosang
b7ca036bc3 [WebUI] Add missing string 2016-03-27 23:56:01 +03:00
Eugene Shalygin
c4442c98b9 update uncrustify config 2016-03-27 23:55:55 +03:00
Chocobo1
fee8036a7a TravisCI: switch to Trusty image. Closes #4953.
Drop workaround for gcc-4.8
2016-03-27 23:55:50 +03:00
sledgehammer999
94bd4308c7 Fix selection of Portuguese translation files.
Qt returns "Brazil" as country of QLocale("pt") instead of "Portugal". This conflicts with QLocale("pt_BR").
Rename the pt.ts to pt_PT and put a language mapping in tx's config for that locale.
Closes #4776.
2016-03-27 23:55:45 +03:00
sledgehammer999
5e5785435a Potential fix for crash. Closes #4607. 2016-03-27 23:55:39 +03:00
sledgehammer999
d7f02a7ee7 Don't display warning when folder named stayed the same.
Copy some code from AddNewTorrent dialog and beautify a bit.
Closes #4970.
2016-03-27 23:55:34 +03:00
sledgehammer999
e6480f9dff Correctly hide useless columns in AddNewTorrent file treeview. Closes #4955. 2016-03-27 23:55:28 +03:00
buinsky
e9f6cfc2e8 WebUI: Change the order of the values of speed labels 2016-03-27 23:55:23 +03:00
buinsky
4f68d263d4 GUI: Change the order of the values of speed labels 2016-03-27 23:55:17 +03:00
buinsky
6a672472a2 Refactoring of StatusBar::refreshStatusBar function 2016-03-27 23:55:12 +03:00
buinsky
3590ac2997 Follow project coding style. Issue #2192. 2016-03-27 23:55:06 +03:00
Chocobo1
98fe5e11dd Add appveyor support 2016-03-27 23:55:01 +03:00
sledgehammer999
9df5c0292b Sync translations from Transifex and run lupdate. 2016-03-27 23:54:55 +03:00
funkydude
1f2d25a1ff Move some URLs overs to https 2016-03-27 23:54:50 +03:00
sledgehammer999
f1dd7a091c Always delete partfile (libtorrent 1.1.x). 2016-03-27 23:54:44 +03:00
Eugene Shalygin
5457bde8d0 Use correct piece size while calling torrent_info::map_block()
This should fix crashes. Issue #4597
2016-03-27 23:54:39 +03:00
Eugene Shalygin
2e325d9506 Revert "Temporarily revert PR #2885 (filename column in peers view)."
This reverts commit 69d52a06d7.
2016-03-27 23:54:34 +03:00
sledgehammer999
0264a7bf58 Don't display Country option in PeerListWidget header menu when country resolution is disabled. 2016-03-27 23:54:29 +03:00
thalieht
32fe930b88 add toggle columns for peerlist 2016-03-27 23:54:23 +03:00
Chocobo1
72883ffb73 Fix additional space in comment label 2016-03-27 23:54:13 +03:00
Chocobo1
f2c24dd8c3 Fix tab icons messed up in Ubuntu 16. Closes #4929.
Fixup of 1c25603686.
The following settings default are different between DEs, so they must set explicitly:
movement, flow, isWarpping, resizeMode, viewMode
2016-03-27 23:19:35 +03:00
Eugene Shalygin
8904139c6d cmake: fix library namaes for Qt5 version of QtSingleApplication
At least on Gentoo they start with 'Qt5', not 'Qt'
2016-03-27 23:16:27 +03:00
Eugene Shalygin
571f46886f cmake: copy qt version requirements from autotools
Set versions 4.8.0 and 5.2.0 as minimal required for Qt4 and Qt5.
2016-03-27 23:16:15 +03:00
Eugene Shalygin
0cd691e167 cmake: fix man installation
Fix copy-n-paste error: for non-GUI build we have to install
qbittorrent-nox.1, but not qbittorrent.1.
2016-03-27 23:15:51 +03:00
UnDifferential
4f65e2d468 Support SSL certificate bundles. Issue #4896. 2016-03-27 23:15:31 +03:00
Eugene Shalygin
35981f6ef5 cmake: fix systemd unit install path 2016-03-27 23:15:14 +03:00
sledgehammer999
dc493880f3 Fix commit 83e931766f (wrong conflict resolution). 2016-03-05 19:50:12 +02:00
Ben Lau
872e78ca21 add a remaining column to the torrent content model 2016-03-05 19:46:21 +02:00
Eugene Shalygin
7b601796d7 fix cmake build 2016-03-05 19:46:13 +02:00
Chocobo1
09ef552aea Add tip about adding quotation marks around parameter 2016-03-05 19:46:07 +02:00
Chocobo1
b4c9cae0d1 Save "Run external program" input as is. Closes #4830. 2016-03-05 19:43:31 +02:00
Eugene Shalygin
6d2a0ae83b add basic cmake support 2016-03-05 19:43:22 +02:00
Chocobo1
238a925000 Put comment_lbl in QScrollArea. Closes #4881. 2016-03-05 19:43:14 +02:00
Eugene Shalygin
cce01cfb8e Fix typos in speed label text
Qt's tr() ate 'true' parameter, which was supposed to be for
friendlyUnit()
2016-03-05 19:43:07 +02:00
Chocobo1
b2db1972f3 Create helper function to get libtorrent version 2016-03-05 19:42:59 +02:00
Chocobo1
8b851fe2b9 Create helper function to get boost version 2016-03-05 19:42:51 +02:00
Chocobo1
e3c9488fb0 Create helper function to get OS name 2016-03-05 19:42:43 +02:00
Chocobo1
c27fb110f8 Comment out "List of linked Modules" section in windows crash report.
It is bloating the crash report with unhelpful messages.
2016-03-05 19:42:34 +02:00
Dan Seminara
ec61f24099 Do not try to parse request message when content-length is 0 2016-03-05 19:42:27 +02:00
Boris Nagaev
130ee5a71e configure: pass variable QMAKE_LRELEASE to qmake 2016-03-05 19:42:20 +02:00
Boris Nagaev
cb3e7e6bd6 winconf-mingw.pri: clean library names
* remove versions from libraries,
  * remove *.dll from libraries
    (actual name of library files can be "libfoo.a")
2016-03-05 19:42:12 +02:00
Boris Nagaev
7fd65d5428 winconf.pri: change example library path for build
Path with "<", ">" causes errors when building in MXE.
http://mxe.cc/

Removing or commenting out these hardcoded paths is not
desirable, as they serve as a guide (on what to edit) for
the newcomers that want to build on windows.

See https://github.com/qbittorrent/qBittorrent/pull/4824#issuecomment-186936960
2016-03-05 19:42:05 +02:00
Boris Nagaev
442f521bf5 winconf.pri: use mask "win32-g++*"
Mask "win32-g++" doesn't match MXE.
Mask "win32-g++*" match MXE.
See http://stackoverflow.com/a/14523545
See http://mxe.cc
2016-03-05 19:41:57 +02:00
Douman
016052aea1 Align search engine url getting mechanism. Closes #4778
1. Switch to retrieve_url instead of low-level HTTPConnection module usage
2016-03-05 19:41:48 +02:00
Chocobo1
411982e2b0 Follow project coding style. Issue #2192. 2016-03-05 19:41:20 +02:00
Chocobo1
4b93ccd4e4 Simplify statement 2016-03-05 19:41:20 +02:00
Chocobo1
6603a8947a Fix malformed date header in email. Closes #4828. 2016-03-05 19:41:20 +02:00
sledgehammer999
031e354577 Partially revert decfae7b8a. Newer libtorrent RC_1_1 has added back the missing variables. 2016-03-05 19:41:19 +02:00
Chocobo1
ec7fb331e0 Remove additional vertical spacer.
Fixup of 843f7ed.
2016-03-05 19:41:19 +02:00
Chocobo1
a232b77104 Simplify resize actions for AddNewTorrentDialog 2016-03-05 19:41:19 +02:00
Chocobo1
8c11245469 Disable cell selection in advanced options. Fixup of a8b39475. 2016-03-05 19:41:18 +02:00
Chocobo1
60857d3b8e Put links into table 2016-03-05 19:41:18 +02:00
Chocobo1
2fe6b76968 Set icon directly in .ui file 2016-03-05 19:41:18 +02:00
Chocobo1
6c7350fce0 Make authors email clickable & selectable 2016-03-05 19:41:17 +02:00
Chocobo1
c770f4d0bc about_imp.h: Use larger qbt icon
Shrink title size
2016-03-05 19:41:17 +02:00
Chocobo1
876e96911f Fix weird left panel icon layout
Remove Advanced page border
2016-03-05 19:41:17 +02:00
Chocobo1
5620fd120e Let OS handle DPI scaling for now. Should let Qt do the work when it's more mature.
Opt-in to the high DPI pixmap support
Closes #2963.
2016-03-05 19:41:17 +02:00
Chocobo1
ea7f6046b4 Follow project coding style. Issue #2192. 2016-03-05 19:41:16 +02:00
Chocobo1
fddac5d679 Move statusbar styelsheet to where it belongs 2016-03-05 19:41:16 +02:00
Chocobo1
2c4bc68af1 Use short date in addnewtorrentdialog
Correction "Free disk space" to "Free space on disk"
2016-03-05 19:41:16 +02:00
Chocobo1
7676f49612 Cleanup addnewtorrentdialog.ui
Reorder Torrent info column
Rename "Save as" to "Save at"
2016-03-05 19:41:15 +02:00
Chocobo1
e879279019 Cleanup about.ui
Shorten text in "Libraries" tab, to avoid About dialog being too wide
Make QLabels in Libraries tab selectable
Use QGroupBox in "Author" tabs
Rename "Thanks to" to "Special Thanks"
Rename "Translation" to "Translators"
Remove borders in "Thanks to", "Translation", "License" tabs
2016-03-05 19:41:15 +02:00
Chocobo1
84b7680718 Cleanup about_imp.h
Fix dialog too narrow on highDPI screens
Remove IRC link
Rewrite about text to support RTL languages better
Follow project coding style. Issue #2192.
2016-03-05 19:41:15 +02:00
sledgehammer999
be180140a3 Don't merge trackers for private torrents. Closes #2928. 2016-03-05 19:41:14 +02:00
Chocobo1
c051c279d4 Set "Show splash screen on start up" option default to off 2016-03-05 19:41:14 +02:00
Chocobo1
964dcc4d8a Fix potential race condition. Closes #4742. 2016-03-05 19:41:14 +02:00
Vladimir Golovnev (Glassez)
64cf93b889 Fix crash caused by AdvancedSettings::addRow() 2016-03-05 19:41:13 +02:00
Vladimir Golovnev (Glassez)
365737afe1 Save resume data using QSaveFile (Qt5 only) 2016-03-05 19:41:13 +02:00
Vladimir Golovnev (qlassez)
2cf14f0120 Optimize Session::startupTorrents()
Reduce queue size by starting up initial items (torrents) when they are detected
2016-03-05 19:41:13 +02:00
Vladimir Golovnev (qlassez)
46bb25ba9f Switch to using previous fastresume file names 2016-03-05 19:41:12 +02:00
Vladimir Golovnev (qlassez)
ee5a72c570 Perform fastresume data saving in separate thread
Closes #4315
2016-03-05 19:41:12 +02:00
Chocobo1
18b56f4d0a Add "Paused torrents only" option for "Hide zero and infinity values" 2016-03-05 19:41:12 +02:00
Chocobo1
f626276218 Fix total values for "Seeds" & "Peers" 2016-03-05 19:41:11 +02:00
Chocobo1
e28554f85c Simplify common paint actions 2016-03-05 19:41:11 +02:00
Chocobo1
a0a3447b2e Remove unused destructor
move get state text to its own function
2016-03-05 19:41:11 +02:00
Chocobo1
4049ca7308 Follow project coding style. Issue #2192. 2016-03-05 19:41:11 +02:00
Chocobo1
c28151ba92 Add "Hide zero values" option. Closes #3543. 2016-03-05 19:41:10 +02:00
buinsky
81e1a050a2 WebAPI: Add "Added on" and "Completion on" fields to query/torrents query response 2016-03-05 19:41:10 +02:00
Vladimir Golovnev (Glassez)
34d5824c4a Manage save path in one place 2016-03-05 19:41:10 +02:00
Vladimir Golovnev (Glassez)
bb875df400 Create MagnetUri object from BC link or HASH string 2016-03-05 19:41:09 +02:00
ngosang
61f47d366a [Web UI] Minor changes in CSS styles 2016-03-05 19:41:09 +02:00
ngosang
8347eb157d Check WebUI username and password length. Closes #4191 2016-03-05 19:41:09 +02:00
Vladimir Golovnev (Glassez)
dd22c9b138 Fix upgrade corrupted fastresume file 2016-03-05 19:41:08 +02:00
thalieht
7f6ad55042 Unlock first column in peerlist too
I just copy pasted from trackerlist (tested ofc). No idea if it can be
done differently.
2016-03-05 19:41:08 +02:00
Vladimir Golovnev (Glassez)
55b06ab9ba Add libtorrent v1.1 basic support 2016-03-05 19:41:08 +02:00
Vladimir Golovnev (Glassez)
21f0a5eb76 Prepare for libtorrent v1.1 support 2016-03-05 19:41:07 +02:00
Vladimir Golovnev (Glassez)
16ed11623f Don't use wide strings in libtorrent 2016-03-05 19:41:07 +02:00
buinsky
c184cf8d7d WebUI: Submit the label in the new label dialog on pressing enter key 2016-03-05 19:41:07 +02:00
buinsky
6a90214eb2 WebUI: Repair translation 2016-03-05 19:41:06 +02:00
buinsky
226ec0610a WebUI: Fix JavaScript exception on WebUI load 2016-03-05 19:41:06 +02:00
ngosang
694bd7cb95 Download more pieces in "Download first and last pieces first" feature 2016-03-05 19:41:06 +02:00
ngosang
9e807e7151 [search engine] Update PirateBay plugin. 2016-03-05 19:41:06 +02:00
ngosang
78fe7fcf9d [Web UI] Fix max_ratio precision. Closes #4707 2016-03-05 19:41:05 +02:00
Chocobo1
c2465f931e Add #include guard 2016-03-05 19:41:05 +02:00
Chocobo1
8d50325961 Try to concat most of the string at compile time
The lesser unsafe code in signal handler the better
Add license
2016-03-05 19:41:05 +02:00
Chocobo1
570a651a59 Simplify signal handler
Try to use signal-safe functions as much as possible
Closes #3995
Define sys_signame[] ourselves on linux
2016-03-05 19:41:04 +02:00
sledgehammer999
0eaa2aeef2 Fix loading *.magnet files from watched folders. Closes #4701. 2016-03-05 19:41:04 +02:00
Chocobo1
2c7e309493 Add header to differentiate settings 2016-03-05 19:41:04 +02:00
Chocobo1
ded3cf5798 Rename setRow() to addRow()
Use template to avoid code duplication
2016-03-05 19:41:03 +02:00
Chocobo1
4edac3e974 Set parent object for advancedsettings
Remove borders
Resize column size correctly
2016-03-05 19:41:03 +02:00
Chocobo1
53885fb5e4 Move code from advancedsettings.h to its own cpp file 2016-03-05 19:41:03 +02:00
Chocobo1
3942c095f6 Add license in advancedsettings.h 2016-03-05 19:41:02 +02:00
Jesse Connop
94be3b930d Always update native session's announce_ip setting 2016-03-05 19:41:02 +02:00
Artem S. Tashkinov
09bc14cc57 Let's check if the torrent file can actually be opened before passing it to libtorrent
If we don't have enough permissions, libtorrent will spew a pretty useless, irrelevant and almost wrong message: "Failed to load the torrent: torrent file is not a dictionary"
2016-03-05 19:41:02 +02:00
sledgehammer999
51b93b4284 Fix splash screen staying on top of all windows. Closes #1391. 2016-03-05 19:41:01 +02:00
sledgehammer999
9c50ea14cb Bump to 3.3.3 2016-01-21 00:49:39 +02:00
sledgehammer999
42a74ea78e Update Changelog. 2016-01-21 00:47:28 +02:00
sledgehammer999
1ac68a9192 Temporarily revert PR #2885 (filename column in peers view).
There's a bug that causes frequent crashes.
Issue #4597.
2016-01-21 00:44:14 +02:00
buinsky
29b5d460ea WebUI: Fix unnecessary updates of torrent peers table 2016-01-21 00:44:14 +02:00
buinsky
a441bca4de WebUI: Move style of dynamic table header to CSS 2016-01-21 00:44:14 +02:00
sledgehammer999
e2da3f2ebd Bump to 3.3.2 2016-01-19 01:45:05 +02:00
sledgehammer999
f235d412f8 Bump Copyright year. 2016-01-19 01:44:03 +02:00
sledgehammer999
60b103b062 Update Changelog. 2016-01-19 01:34:08 +02:00
sledgehammer999
0fdb23098b Bump WebUI API_VERSION and API_VERSION_MIN. 2016-01-19 01:32:32 +02:00
sledgehammer999
51c296ac69 Sync translations from Transifex and run lupdate. 2016-01-19 00:50:48 +02:00
Vladimir Golovnev (Glassez)
a120842ba2 Fix unchecked dynamic_cast
Replace some unnecessary (and slow) dynamic_cast with static_cast.
2016-01-18 19:45:45 +02:00
Vladimir Golovnev (Glassez)
8911de9349 Fix unitialized pointer field 2016-01-18 19:45:45 +02:00
Vladimir Golovnev (Glassez)
013a1b8403 Fix unitialized scalar field bugs 2016-01-18 19:45:45 +02:00
Vladimir Golovnev (Glassez)
1492a24391 Simplify Log::Msg and Log::Peer
Also fixes some unitialized scalar field bugs.
2016-01-18 19:45:44 +02:00
buinsky
bf1559320b WebUI: Remember last opened tab 2016-01-18 19:45:44 +02:00
Vladimir Golovnev (Glassez)
d5648a67ae Fix loading corrupted .fastresume file 2016-01-18 19:45:44 +02:00
Vladimir Golovnev (Glassez)
a6ec82682d Delete unused include 2016-01-18 19:45:43 +02:00
Vladimir Golovnev (Glassez)
bd359ad498 Allow GeoIP in NoGUI builds 2016-01-18 19:45:43 +02:00
Vladimir Golovnev (Glassez)
458f48b290 Fix unitialized scalar fields 2016-01-18 19:45:43 +02:00
Vladimir Golovnev (Glassez)
a0ae21148a Fix NetworkCookieJar::deleteCookie() behavior to match Qt5 one 2016-01-18 19:45:42 +02:00
Vladimir Golovnev (Glassez)
5dc9b5c2dd Fix reconfigure additional trackers
Replace wrong QList::empty() call with QList::clear()
2016-01-18 19:45:42 +02:00
buinsky
48175bbb85 WebUI: Repair translation 2016-01-18 19:45:42 +02:00
Gabriele
3b03bb286e WebUI: Allow to remove the label assigned to a torrent
Empty strings are not valid label names, but they are used to remove
torrent labels, so allow them.
2016-01-18 19:45:41 +02:00
Chocobo1
23fdf3a0bc Update uncrustify script link. 2016-01-18 19:45:41 +02:00
Dmitry Victorov
4cf7618c52 Set qBittorrent as default torrent app in Mac OS 2016-01-18 19:45:41 +02:00
sledgehammer999
6fd9413dae Sync translations from Transifex and run lupdate. 2016-01-18 19:45:39 +02:00
sledgehammer999
120d073a04 Various updates on the Windows configuration file. 2016-01-18 19:45:39 +02:00
filipporig8
8fa2adb6fc Update webui run program parameters 2016-01-18 19:45:38 +02:00
buinsky
70105d5834 WebUI: Fix torrent table context menu
Don't show "Limit download speed" menu item for downloaded torrents.
2016-01-18 19:45:38 +02:00
buinsky
05961faf42 WebUI: Fix deleting torrents
Fix possible showing "qBittorrent client is not reachable" message on
deleting torrents.
2016-01-18 19:45:38 +02:00
vlakoff
386706f05b Complete French translation for installer 2016-01-18 19:45:37 +02:00
vlakoff
1813e96a42 Fixes in French translation for installer 2016-01-18 19:45:37 +02:00
buinsky
eaf6e47391 Edit speed limits and upload ratio icons 2016-01-18 19:45:37 +02:00
Chocobo1
8ba82064cd Replace names with camelCase style 2016-01-18 19:45:36 +02:00
Chocobo1
5d5a0de694 Use C++11 initializer list 2016-01-18 19:45:36 +02:00
Chocobo1
145180c2a1 Follow project coding style. Issue #2192. 2016-01-18 19:45:35 +02:00
Chocobo1
50881b9972 Rename column header 2016-01-18 19:45:35 +02:00
sledgehammer999
a115932bc1 Fix newlines in wiki rendering. 2016-01-18 19:45:35 +02:00
sledgehammer999
c7fd0fbe45 Add info and files for coding style. Issue #2192. 2016-01-18 19:45:34 +02:00
Boris Nagaev
d513d002cc convert includes like <Windows.h> to lowercase
There is header file windows.h, not Windows.h.
MinGW on Linux build machine is filename case-sensitive.
2016-01-18 19:45:34 +02:00
ngosang
a570bd5e2c [search engine] Update PirateBay URL. Closes #4470 2016-01-18 19:45:34 +02:00
ngosang
bdacfd540c [search engine] Fix PirateBay plugin implementation for Python 3 2016-01-18 19:45:33 +02:00
buinsky
c89b9edf27 Move some styles into css 2016-01-18 19:45:33 +02:00
schnurlos
0fdf788624 Update german.nsi
Translated the "A previous installation was detected ..." text.
2016-01-18 19:45:33 +02:00
ngosang
f0ae30070b Update installer translations in Spanish language 2016-01-18 19:45:32 +02:00
sledgehammer999
8fb8f4b467 Don't require GUI libs for qt4 nox build. Closes #4404. 2016-01-18 19:45:32 +02:00
dzmat
c3a2e50191 Update russian.nsi
Translated new string/
2016-01-18 19:45:31 +02:00
Vladimir Golovnev (Glassez)
b045b5ebf7 Improve RSS parsing logic. 2016-01-18 19:45:31 +02:00
Vladimir Golovnev (Glassez)
6436152c75 Redesign RSS base classes. 2016-01-18 19:45:31 +02:00
Vladimir Golovnev (Glassez)
9c3ae53330 Move base RSS names to Rss namespace. 2016-01-18 19:45:30 +02:00
Vladimir Golovnev (Glassez)
acd5fcfb00 Fix coding style (Issue #2192). 2016-01-18 19:45:30 +02:00
Vladimir Golovnev (Glassez)
9a6f8ab402 Move base RSS code to Core. 2016-01-18 19:45:29 +02:00
Vladimir Golovnev (qlassez)
0f854014af Use DownloadManager by DNSUpdater 2016-01-18 19:45:29 +02:00
Vladimir Golovnev (qlassez)
a11175afba Use DownloadManager by ProgramUpdater
Closes #2023
2016-01-18 19:45:28 +02:00
Vladimir Golovnev (qlassez)
c5776c3bf1 Save RSS cookies to common cookie storage
Closes #4305
2016-01-18 19:45:28 +02:00
Vladimir Golovnev (qlassez)
19d566253f Make DownloadManager to save/load cookies 2016-01-18 19:45:27 +02:00
Naikel Aparicio
0d59d6a03e Implemented WebUI interface for the new Watched Folders feature 2016-01-18 19:45:27 +02:00
sledgehammer999
c7b2ee367f Remove watch folders permanently only if the user accepts the Preferences dialog. 2016-01-18 19:45:27 +02:00
sledgehammer999
510ec029ea Make it scroll horizontally when necessary. 2016-01-18 19:45:26 +02:00
sledgehammer999
1f2daed9d6 Fix translated string. 2016-01-18 19:45:26 +02:00
sledgehammer999
08b854ce74 Method to update the watch path parameters. 2016-01-18 19:45:25 +02:00
sledgehammer999
6b34803c59 Don't add the watch folder before the user closes the Preferences window. 2016-01-18 19:45:25 +02:00
sledgehammer999
fca224b9d0 Support loading multiple magnets/hashes/urls per .magnet file in the watched folder(one per line). Closes #217. 2016-01-18 19:45:25 +02:00
Vladimir Golovnev (qlassez)
4f5009351f Fix setting custom download location for watched folder 2016-01-18 19:45:24 +02:00
sledgehammer999
c1f77d45ab Improve the "Watch folders" UI. Closes #4300. 2016-01-18 19:45:24 +02:00
sledgehammer999
60f0447603 Indicate to the user that he's going to download the new version.
Indicate from the installer that the old version was detected and no settings will be deleted.
Closes #4320.
2016-01-18 19:45:23 +02:00
sledgehammer999
6ae208a661 Move the 'qBittorrent-resume' file even when no magnets were recovered. Also make sure to rename it with a unique name. Closes #4334. 2016-01-18 19:45:23 +02:00
Eugene Shalygin
781c8034a5 Add column with list of currently downloading files
Add a new column to peers list that shows list of files which are
downloaded right now from a peer. The column is empty if we do not
download anything from the given peer.
2016-01-18 19:45:22 +02:00
Eugene Shalygin
4cf8359257 functions for retrieving list of currently downloading files 2016-01-18 19:45:22 +02:00
Eugene Shalygin
3ed4de3043 Revert "Remove unused parameter."
This reverts commit 87347cf0e5.
2016-01-18 19:45:22 +02:00
sledgehammer999
a374b99ba2 Update native names for Chinese locales. Closes #4381. 2016-01-18 19:45:21 +02:00
Naikel Aparicio
601734a59b Fixed bug when uploading several files and only the last one was considered. 2016-01-18 19:45:21 +02:00
Chocobo1
69cc97c3dd Turn off warning on OSX builds: unused-local-typedefs
Reorder option list, sort by lt_branch then qt then gui
2016-01-18 19:45:20 +02:00
buinsky
226f74a866 Fix paused, active and inactive filters 2016-01-18 19:45:20 +02:00
buinsky
cf35392cd2 WebUI: Show filtered torrents number 2016-01-18 19:45:20 +02:00
Chocobo1
27319e9e64 Fix typo 2016-01-18 19:45:19 +02:00
Chocobo1
69b8544e26 Simplify statement 2016-01-18 19:45:19 +02:00
Chocobo1
41e5dc8911 Add check for null. Fix provided by glassez.
Closes #4280.
2016-01-18 19:45:18 +02:00
Vladimir Golovnev (qlassez)
ba1ffa4e54 Fix moving torrents to Temp after app restart
Closes #4434
2016-01-18 19:45:18 +02:00
Vladimir Golovnev (Glassez)
4edc073373 Fix coding style (Issue #2192). 2016-01-18 19:45:18 +02:00
Vladimir Golovnev (Glassez)
1f00d2e5d7 Move basic search-related code into Core.
Also use qBittorrent torrent file download routines instead of
nova2dl.py script.
2016-01-18 19:45:17 +02:00
Vladimir Golovnev (Glassez)
d87e42ba00 Move Search-related files into Gui. 2016-01-18 19:45:17 +02:00
Vladimir Golovnev (Glassez)
975b1d5257 Fix search-related file/class names. 2016-01-18 19:43:28 +02:00
Fabio Alessandro Locati
5f84363afb Fix lrelease version due to the default Qt5 build
As title
2016-01-18 19:43:28 +02:00
Chocobo1
545c526e2f Update ISO 3166 country codes. Closes #3942. 2016-01-18 19:43:27 +02:00
sledgehammer999
06fcc57619 Fix linux build. 2016-01-18 19:43:27 +02:00
sledgehammer999
06c6a444c9 Don't apply some settings again if they weren't changed. Closes #4278. 2016-01-18 19:43:26 +02:00
sledgehammer999
8474d0d199 Don't recheck twice after 'Force Recheck' with 'Recheck torrents on completion' enabled. Closes #4274. 2016-01-18 19:43:26 +02:00
sledgehammer999
0f4610c127 Fix resolution of peer host names. Closes #4307. 2016-01-18 19:43:26 +02:00
sledgehammer999
d753988729 Bump to v3.3.1 2015-12-08 00:45:15 +02:00
sledgehammer999
a6b948077a Update Changelog. 2015-12-08 00:42:19 +02:00
sledgehammer999
3276cc4987 Sync translations from Transifex and run lupdate. 2015-12-08 00:28:20 +02:00
sledgehammer999
71557fe784 Fix possible deadlock during application exit. 2015-12-08 00:28:20 +02:00
sledgehammer999
29fc5bc80d Bump WebUI API_VERSION. 2015-12-08 00:28:19 +02:00
sledgehammer999
db07551e4c Change update URL to FossHub. Closes #4188. 2015-12-08 00:28:19 +02:00
sledgehammer999
8f6eb795e3 Follow project coding style. Issue #2192. 2015-12-08 00:28:19 +02:00
sledgehammer999
0a37799e6e Remove unused parameter. 2015-12-08 00:28:18 +02:00
buinsky
76d6d9a4f9 Implement torrent peers table in WebUI 2015-12-08 00:28:18 +02:00
buinsky
0c8abd0abb Implement sync/torrent_peers request 2015-12-08 00:28:18 +02:00
buinsky
ddc8420810 Follow project coding style. Issue #2192. 2015-12-08 00:28:17 +02:00
buinsky
a4ff039abc Rename 'context_menu' variable to 'torrents_table_context_menu' 2015-12-08 00:28:17 +02:00
buinsky
c8be062e19 Rename 'myTable' variable to 'torrentsTable' 2015-12-08 00:28:17 +02:00
buinsky
29443a2c10 Split the DynamicTable class into 2 classes 2015-12-08 00:28:16 +02:00
buinsky
e402556e91 Add seeds tab to WebUI 2015-12-08 00:28:16 +02:00
Vladimir Golovnev (Glassez)
4ed4ebcdb7 Rename Core to Base (Closes #3733). 2015-12-08 00:28:16 +02:00
Vladimir Golovnev (Glassez)
a280467270 Fix RSS isn't automarking articles as read
Closes: #4260, #4233, #4221, #4133
2015-12-08 00:28:15 +02:00
sledgehammer999
9b1090332b Use simpler DEFINE for detecting Qt5 so moc will work too. 2015-12-08 00:28:12 +02:00
Vladimir Golovnev (Glassez)
18a520c9f9 Remove unused LineEdit slot. Fix compiler warning. 2015-12-08 00:27:33 +02:00
Vladimir Golovnev (Glassez)
af871ef8af Fix wrong encoding for listen failed error message. 2015-12-08 00:24:21 +02:00
sledgehammer999
3af7eb8e03 Add clarifying comment. 2015-12-08 00:24:21 +02:00
sledgehammer999
3439300cda Partially revert b4c9c7cde. 2015-12-08 00:24:20 +02:00
Vladimir Golovnev (Glassez)
a8027565c9 Improve upgrade to v3.3. Fixes #4195. 2015-12-08 00:24:20 +02:00
Vladimir Golovnev (Glassez)
3d4e1a8127 Improve torrent export feature. Closes #4205. 2015-12-08 00:24:20 +02:00
Vladimir Golovnev (Glassez)
7b6a1a1955 Fix scan dirs settings saving. Closes #4254, #4239, #4187. 2015-12-08 00:24:19 +02:00
Chocobo1
3f8dc60680 Add CONTRIBUTING.md 2015-12-08 00:24:19 +02:00
vlakoff
9be449dd7f Support wildcards for filtering torrent list and torrent content 2015-12-08 00:24:19 +02:00
Chocobo1
c46f2ba097 Change text description for half-open connection 2015-12-08 00:24:19 +02:00
Chocobo1
c2c441ed08 Fix -1 is displayed instead of C_INFINITY symbol 2015-12-08 00:24:18 +02:00
Chocobo1
c1e52fa1cd Use QLineEdit built-in ClearButton (Qt5 only) 2015-12-08 00:24:18 +02:00
Chocobo1
fbed5dc606 Reduce mainwindow border width 2015-12-08 00:24:18 +02:00
Chocobo1
97978068c6 Cleanup "Content" page layout
Limit lineEdit maximum size
2015-12-08 00:24:17 +02:00
Chocobo1
006e34880a Cleanup "Peers" page layout
Cleanup "HTTP Sources" page layout
Cleanup "Speed" page layout
2015-12-08 00:24:17 +02:00
Chocobo1
1fd5c5d8b5 Cleanup "Trackers" page layout 2015-12-08 00:24:17 +02:00
takiz
68ac9fda2d "Set as default label" option 2015-12-08 00:24:16 +02:00
Naikel Aparicio
c5d807ef65 Cookies support on WebUI when downloading torrent from a URL. Modified download and upload windows to allow autocompletion of browsers.
Fixed the spinner in the WebUI upload page. Modified height of the WebUI download page.

Fixed all the JavaScript functions for download and upload pages.
2015-12-08 00:24:16 +02:00
sledgehammer999
e17f10ae6b Delete from the repo the qt4 translations used in the Windows installer. 2015-11-30 00:17:25 +02:00
sledgehammer999
78c5d1c12f Bump to v3.3.0 2015-11-29 21:57:06 +02:00
sledgehammer999
26fb54299b Update Transifex config file. 2015-11-29 21:54:06 +02:00
1282 changed files with 146302 additions and 192800 deletions

View File

@@ -3,11 +3,7 @@ version: '{branch}-{build}'
# Do not build on tags (GitHub only)
skip_tags: true
image: Visual Studio 2017
branches:
except: # blacklist
- coverity_scan
os: Visual Studio 2015
environment:
REPO_DIR: &REPO_DIR c:\qbittorrent
@@ -24,8 +20,6 @@ clone_folder: *REPO_DIR
cache:
- *CACHE_DIR
clone_depth: 50
install:
# check if library needs update
- appveyor DownloadFile "%QBT_VER_URL%" -FileName "c:\version_new" && SET /P newVersion=<"c:\version_new"
@@ -42,7 +36,7 @@ install:
before_build:
# setup env
- CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
- CALL "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
- SET PATH=%PATH%;c:\qbt\qt5_32\bin;%CACHE_DIR%\jom;
# setup project
- COPY /Y "%CACHE_DIR%\winconf.pri" "%REPO_DIR%"

View File

@@ -1,12 +0,0 @@
# EditorConfig is awesome: http://EditorConfig.org
root = true
[*]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
[**.yml]
indent_size = 2

View File

@@ -1,20 +1,14 @@
**Please provide the following information**
### qBittorrent version and Operating System
(type here)
### qBittorrent version and Operating System:
### If on linux, libtorrent and Qt version
(type here)
### If on linux, libtorrent and Qt version:
### What is the problem
(type here)
### What is the problem:
### What is the expected behavior
(type here)
### What is the expected behavior:
### Steps to reproduce
(type here)
### Steps to reproduce:
### Extra info(if any)
(type here)
### Extra info(if any):

3
.gitignore vendored
View File

@@ -31,6 +31,3 @@ src/qbittorrent.app
aclocal.m4
autom4te.cache/*
config.status
src/icons/qbt-theme/build-icons/node_modules/
src/icons/skin/build-icons/node_modules/
src/icons/skin/build-icons/icons/*.png

View File

@@ -10,18 +10,19 @@ env:
# Uncomment when Travis upgraded "Ubuntu 12.04 LTS" to a newer version whose repo will have a more up-to-date libtorrent package
#- lt_branch=dist gui=true
#- lt_branch=dist gui=false
- lt_branch=RC_1_0 gui=true build_system=cmake
- lt_branch=RC_1_0 gui=false build_system=cmake
- lt_branch=RC_1_0 gui=true build_system=qmake
- lt_branch=RC_1_0 gui=false build_system=qmake
- lt_branch=RC_1_0 qt=5 gui=true
- lt_branch=RC_1_0 qt=5 gui=false
- lt_branch=RC_1_0 qt=4 gui=true
- lt_branch=RC_1_0 qt=4 gui=false
global:
- secure: "OI9CUjj4lTb0HwwIZU5PbECU3hLlAL6KC8KsbwohG8/O3j5fLcnmDsK4Ad9us5cC39sS11Jcd1kDP2qRcCuST/glVNhLkcjKkiQerOfd5nQ/qL4JYfz/1mfP5mdpz9jHKzpLUIG+TXkbSTjP6VVmsb5KPT+3pKEdRFZB+Pu9+J8="
- coverity_branch: coverity_scan
matrix:
allow_failures:
- env: lt_branch=RC_1_0 gui=true build_system=cmake
- env: lt_branch=RC_1_0 gui=false build_system=cmake
- os: osx
env: lt_branch=RC_1_0 qt=4 gui=true
- os: osx
env: lt_branch=RC_1_0 qt=4 gui=false
branches:
except:
@@ -55,24 +56,29 @@ addons:
apt:
sources:
# sources list: https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
- ubuntu-toolchain-r-test
#- ubuntu-toolchain-r-test
#- boost-latest
- sourceline: 'ppa:qbittorrent-team/qbittorrent-stable'
- sourceline: 'ppa:beineri/opt-qt551-trusty'
- sourceline: 'ppa:adrozdoff/cmake'
packages:
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
- [autoconf, automake, colormake]
- [cmake, ninja-build]
- autoconf
- automake
- colormake
- libssl-dev
- [libboost-dev, libboost-system-dev]
- libboost-dev
- libboost-system-dev
- libtorrent-rasterbar-dev
- [qt55base, qt55svg, qt55tools]
- [gcc-6, g++-6]
# Qt 5.5.1
- qt55base
- qt55tools
# Qt 4.8
- qt4-default
- libqt4-dev
before_install:
# only allow specific build for coverity scan, others will stop
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ] && ! [ "$TRAVIS_OS_NAME" = "linux" -a "$lt_branch" = "RC_1_0" -a "$gui" = true -a "$build_system" = "qmake" ]; then exit ; fi
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ] && ! [ "$TRAVIS_OS_NAME" = "linux" -a "$lt_branch" = "RC_1_0" -a "$gui" = true ]; then exit ; fi
- shopt -s expand_aliases
- alias make="colormake -j3" # Using nprocs/2 sometimes may fail (gcc is killed by system)
@@ -82,6 +88,7 @@ before_install:
- qbtconf="$qbtconf --prefix="$qbt_path" PKG_CONFIG_PATH="$libt_path/lib/pkgconfig":/opt/qt55/lib/pkgconfig:$PKG_CONFIG_PATH"
# options for specific branches
- if [ "$qt" = 4 ]; then qbtconf="$qbtconf --with-qt4" ; fi
- if [ "$gui" = false ]; then qbtconf="$qbtconf --disable-gui" ; fi
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
@@ -90,17 +97,11 @@ before_install:
# Qt 5
PATH=/opt/qt55/bin:${PATH}
if [ "$build_system" = "cmake" ]; then
COMPILER_VERSION=6
export CXX="${CXX}-${COMPILER_VERSION}" CC="${CC}-${COMPILER_VERSION}"
fi
fi
# print settings
- echo $lt_branch
- echo $gui
- echo $build_system
- echo $ltconf
- echo $qbtconf
@@ -109,46 +110,49 @@ install:
#if [ "$TRAVIS_OS_NAME" = "linux" ]; then
# build libtorrent from source
#if [ "$lt_branch" != "dist" ]; then
#cd "$HOME" && pwd && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch
#cd libtorrent && ./autotool.sh && ./configure $ltconf && make install
#fi
#cd "$HOME" && pwd && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch ;
#cd libtorrent && ./autotool.sh && ./configure $ltconf && make install ;
#fi ;
#fi
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
# dependencies
brew update > /dev/null
brew outdated "pkg-config" || brew upgrade "pkg-config"
brew install colormake ccache zlib qt
brew install colormake ccache zlib
PATH="/usr/local/opt/ccache/libexec:$PATH"
brew link --force zlib qt
brew link --force zlib
brew outdated "pkg-config" || brew upgrade "pkg-config"
wget https://builds.shiki.hu/homebrew/version
wget https://builds.shiki.hu/homebrew/version ;
if ! cmp --quiet "version" "$HOME/hombebrew_cache/version" ; then
echo "Cached files are different from server. Downloading new ones."
echo "Cached files are different from server. Downloading new ones." ;
# First delete old files
rm -r "$HOME/hombebrew_cache"
mkdir "$HOME/hombebrew_cache"
cp "version" $HOME/hombebrew_cache
cd "$HOME/hombebrew_cache"
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar.rb
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar-1.0.11+git20170910.6d5625e0ea.el_capitan.bottle.tar.gz
rm -r "$HOME/hombebrew_cache" ;
mkdir "$HOME/hombebrew_cache";
cp "version" $HOME/hombebrew_cache ;
cd "$HOME/hombebrew_cache" ;
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar.rb ;
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar-1.0.10.el_capitan.bottle.tar.gz ;
wget https://builds.shiki.hu/homebrew/qt5.rb ;
wget https://builds.shiki.hu/homebrew/qt5-5.7.1_1.el_capitan.bottle.tar.gz ;
fi
# Copy custom libtorrent bottle to homebrew's cache so it can find and install it
# Also install our custom libtorrent formula by passing the local path to it
# These 2 files are restored from Travis' cache.
cp "$HOME/hombebrew_cache/libtorrent-rasterbar-1.0.11+git20170910.6d5625e0ea.el_capitan.bottle.tar.gz" "$(brew --cache)"
brew install "$HOME/hombebrew_cache/libtorrent-rasterbar.rb"
cp "$HOME/hombebrew_cache/libtorrent-rasterbar-1.0.10.el_capitan.bottle.tar.gz" "$(brew --cache)" ;
brew install "$HOME/hombebrew_cache/libtorrent-rasterbar.rb" ;
if [ "$build_system" = "cmake" ]; then
brew outdated cmake || brew upgrade cmake
brew install ninja
ln -s /usr/local/opt/qt/mkspecs /usr/local/mkspecs
ln -s /usr/local/opt/qt/plugins /usr/local/plugins
# Qt
if [ "$qt" = 4 ]; then brew install qt && ln -s /usr/local/Cellar/qt/4.8.7_2/plugins /usr/local ; fi ;
if [ "$qt" = 5 ]; then
# Copy custom qt5 bottle to homebrew's cache so it can find and install it
# Also install our custom qt5 formula by passing the local path to it
# These 2 files are restored from Travis' cache.
cp "$HOME/hombebrew_cache/qt5-5.7.1_1.el_capitan.bottle.tar.gz" "$(brew --cache)" ;
brew install "$HOME/hombebrew_cache/qt5.rb" ;
brew link --force qt5 ;
fi
MY_CMAKE_OPENSSL_HINT="-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/"
fi
- |
if [ "$TRAVIS_BRANCH" != "$coverity_branch" ]; then
@@ -158,37 +162,22 @@ install:
script:
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ]; then exit ; fi # skip usual build when running coverity scan
- cd "$TRAVIS_BUILD_DIR" && ./bootstrap.sh && ./configure $qbtconf
- |
cd "$TRAVIS_BUILD_DIR"
if [ "$build_system" = "cmake" ]; then
mkdir build
cd build
cmake -DGUI=${gui} -DCMAKE_INSTALL_PREFIX="$qbt_path" "$MY_CMAKE_OPENSSL_HINT" \
-G "Ninja" -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE ..
BUILD_TOOL="ninja"
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
sed -i "" -e "s/^\(CC.*&&\).*$/\1 $CC/" src/Makefile ; # workaround for Qt & ccache: https://bugreports.qt.io/browse/QTBUG-31034
sed -i "" -e "s/^\(CXX.*&&\).*$/\1 $CXX/" src/Makefile ;
sed -i "" -e 's/^\(CXXFLAGS.*\)$/\1 -Wno-unused-local-typedefs -Wno-inconsistent-missing-override/' src/Makefile ;
fi
if [ "$build_system" = "qmake" ]; then
./bootstrap.sh && ./configure $qbtconf
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
sed -i "" -e "s/^\(CC.*&&\).*$/\1 $CC/" src/Makefile # workaround for Qt & ccache: https://bugreports.qt.io/browse/QTBUG-31034
sed -i "" -e "s/^\(CXX.*&&\).*$/\1 $CXX/" src/Makefile
sed -i "" -e 's/^\(CXXFLAGS.*\)$/\1 -Wno-unused-local-typedefs -Wno-inconsistent-missing-override/' src/Makefile
fi
BUILD_TOOL="make"
fi
- $BUILD_TOOL && $BUILD_TOOL install
- make && make install
after_success:
- if [ "$gui" = true ]; then qbt_exe="qbittorrent" ; else qbt_exe="qbittorrent-nox" ; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd "$qbt_path/bin" ; fi
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
if [ "$build_system" = "qmake" ]; then
macdeployqt "$TRAVIS_BUILD_DIR/src/$qbt_exe.app"
cd "$TRAVIS_BUILD_DIR/src/$qbt_exe.app/Contents/MacOS"
else
cd "$qbt_path/$qbt_exe.app/Contents/MacOS"
fi
macdeployqt "$TRAVIS_BUILD_DIR/src/$qbt_exe.app" ;
cd "$TRAVIS_BUILD_DIR/src/$qbt_exe.app/Contents/MacOS" ;
fi
- ./$qbt_exe --version

View File

@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com
[qbittorrent.qbittorrent_master]
[qbittorrent.qbittorrent_v3_3_x]
file_filter = src/lang/qbittorrent_<lang>.ts
lang_map = pt: pt_PT
source_file = src/lang/qbittorrent_en.ts

16
AUTHORS
View File

@@ -34,14 +34,6 @@ Code from other projects:
license: GPLv2/3
Images Authors:
* files: src/icons/skin/qbittorrent-tray.svg (and related pngs)
copyright: Provided by HVS <hvs linuxmail org> (raster first proposal) and Atif Afzal(@atfzl github) <atif5801@gmail.com> (vectorized and modified)
license: GPLv2+
* files: src/qbittorrent_file.ico src/icons/fileicon.svg
copyright: 'uknown.svg' (LGPLv3+) from Oxygen Icon Theme was used as base which was slightly modified and 'qbittorrent-tray.svg' (GPLv2+) was overlayed above it.
license: GPLv3+
* files: src/icons/*.png
copyright: Gnome Icon Theme
license: GPLv2
@@ -52,10 +44,10 @@ Images Authors:
license: LGPL
url: http://www.oxygen-icons.org
* files: src/icons/flags/*.svg
copyright: lipis/flag-icon-css
license: MIT
url: https://github.com/lipis/flag-icon-css/
* files: src/icons/flags/*.png
copyright: Mark James <mjames@gmail.com>
license: Public Domain
url: http://www.famfamfam.com
* files: src/icons/skin/*.png
files: src/menuicons/YYxYY/*.png

View File

@@ -22,8 +22,13 @@ add_definitions(-DQBT_VERSION_MINOR=${VER_MINOR})
add_definitions(-DQBT_VERSION_BUGFIX=${VER_BUGFIX})
add_definitions(-DQBT_VERSION_BUILD=${VER_BUILD})
# os2 {
# DEFINES += DQBT_VERSION=\'\"v$${PROJECT_VERSION}\"\'
# DEFINES += DQBT_VERSION_2=\'\"$${PROJECT_VERSION}\"\'
# } else {
add_definitions(-DQBT_VERSION="v${PROJECT_VERSION}")
add_definitions(-DQBT_VERSION_2="${PROJECT_VERSION}")
# }
if (UNIX AND NOT APPLE)
include(GNUInstallDirs)
@@ -36,8 +41,11 @@ endif(WIN32)
# we need options here, because they are used not only in "src" subdir, but in the "dist" dir too
include(CMakeDependentOption)
option(QT5 "Compile using Qt5" ON)
option(SYSTEM_QTSINGLEAPPLICATION
"Use the system qtsingleapplication library or shipped one otherwise")
cmake_dependent_option(SYSTEM_QJSON
"Use the shipped qjson library or the system one (Qt4 only)" OFF "NOT QT5" OFF)
option(GUI "Allows to disable GUI for headless running. Disables QtDBus and the GeoIP Database" ON)

View File

@@ -9,7 +9,7 @@ If you make changes in a file that still uses another coding style, make sure th
```c++
int myFunction(int a)
{
// code
//code
}
void myFunction() {} // empty body
@@ -17,29 +17,29 @@ void myFunction() {} // empty body
MyClass::MyClass(int *parent)
: m_parent(parent)
{
// initialize
//initialize
}
int MyClass::myMethod(int a)
{
// code
//code
}
class MyOtherClass
{
public:
// code
//code
protected:
// code
//code
private:
// code
//code
};
namespace Name
{
// code
//code
}
// Lambdas
@@ -54,20 +54,20 @@ namespace Name
#### b. Other code blocks ####
```c++
if (condition) {
// code
//code
}
for (int a = 0; a < b; ++b) {
// code
//code
}
switch (a) {
case 1:
// blah
//blah
case 2:
// blah
//blah
default:
// blah
//blah
}
```
@@ -75,17 +75,17 @@ default:
```c++
switch (var) {
case 1: {
// declare local variables
// code
//declare local variables
//code
}
break;
case 2: {
// declare local variables
// code
//declare local variables
//code
}
break;
default:
// code
//code
}
```
@@ -103,13 +103,13 @@ QVariantMap map {{"key1", 5}, {"key2", 10}};
#### a. Multiple tests ####
```c++
if (condition) {
// code
//code
}
else if (condition) {
// code
//code
}
else {
// code
//code
}
```
The `else if`/`else` must be on their own lines.
@@ -154,7 +154,7 @@ myClass::myClass(int a, int b, int c, int d)
, m_c(c)
, m_d(d)
{
// code
//code
}
```
@@ -231,8 +231,8 @@ Example:
#include <libtorrent/version.hpp>
#include "base/bittorrent/infohash.h"
#include "base/bittorrent/session.h"
#include "base/bittorrent/infohash.h"
#include "base/utils/fs.h"
#include "base/utils/misc.h"
#include "base/utils/string.h"
@@ -282,32 +282,20 @@ auto spinBox = static_cast<QSpinBox*>(sender());
// we know the variable type based on the right-hand expression
```
* Notice the spaces in the following specific situations:
* Space around operations eg `a = b + c` or `a=b+c`:
Before and after the assignment and other binary (and ternary) operators there should be a space.<br/>
There should not be a space between increment/decrement and its operand.<br/>
Some valid use cases:
```c++
// Before and after the assignment and other binary (and ternary) operators there should be a space
// There should not be a space between increment/decrement and its operand
a += 20;
a = (b <= MAX_B ? b : MAX_B);
++a;
--b;
b--;
for (int a = 0; a < b; ++b) {
// code
}
// Range-based for loop, spaces before and after the colon
for (auto i : container) {
}
// Derived class, spaces before and after the colon
class Derived : public Base
{
};
```
* Prefer pre-increment, pre-decrement operators
```c++
++i, --j; // Yes
i++, j--; // No
```
* private/public/protected must not be indented

674
Changelog
View File

@@ -1,115 +1,3 @@
* Wed Nov 22 2017 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.0.1
- BUGFIX: Fix crash on opening torrent/magnet (uninitialized pointer). Closes #7739 #7723. (sledgehammer999)
- BUGFIX: Enable preferences Apply button when ip banlist is modified (Thomas Piccirello)
- BUGFIX: Allow drag-n-drop magnet links to mainwindow. Closes #7742. (Chocobo1)
- BUGFIX: Fix crash when aborting a torrent creation process. Closes #7783. (Chocobo1)
- BUGFIX: Correctly check if torrent passed during application start already exists. (sledgehammer999)
- WEBUI: Add ip subnet whitelist for bypassing webui auth (Thomas Piccirello)
- WEBUI: Fix logo missing in login page (Chocobo1)
- COSMETIC: Fix english typo. (sledgehammer999)
- OTHER: cmake: qtsingleapplication should always be built statically (luigino)
* Mon Nov 20 2017 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.0.0
- FEATURE: Change qbittorrent logo. Issue #6467. (HVS, Atif Afzal, sledgehammer999)
- FEATURE: New icon theme with SVG source, so we can scale it appropriately in the future. (Bert Verhelst)
- FEATURE: Drop Qt 4 support. Raise minimum Qt version to 5.5.1 (evsh)
- FEATURE: UI for managing locally banned IP list (dzmat)
- FEATURE: Support for specifying where to save/load config files. Support for portable mode. (evsh)
- FEATURE: It is now possible to pass options via ENV variables instead of cmd options. (evsh)
- FEATURE: Allow to strip subfolder in multifile torrents. (glassez, sledgehammer999)
- FEATURE: Allow cmd args to specify options when adding torrents. (Brian Kendall)
- FEATURE: Widget for showing filesystem paths while typing. Used in the Add New Torrent and Options dialogs. (evsh)
- FEATURE: Trackerlist: Allow to toggle columns (thalieht)
- FEATURE: Add availability column to torrent content model and torrent properties window (evsh)
- FEATURE: Implemented share limit by seeding time (naikel)
- FEATURE: Revamp Torrent creator (Chocobo1)
- FEATURE: Enable drag n drop to create torrent on mainwindow (Chocobo1)
- FEATURE: Add show/hide statusbar option (takiz)
- FEATURE: Show number of pieces. Closes #6774. (Chocobo1)
- FEATURE: Allow to select & delete multiple entries in "Manage Cookies" dialog (Chocobo1)
- FEATURE: Fetch Favicons via google as a final fallback (KingLucius)
- FEATURE: Add a Tags (multi-label) feature to the GUI. Closes #13. (tgregerson)
- FEATURE: Use the system icons for each file type in the Content tab (evsh)
- FEATURE: Use SVG files for monochrome tray icons. Closes #6085. (evsh)
- FEATURE: Prefill torrent name when creating a new torrent. Closes #7229. (Chocobo1)
- FEATURE: Expose more libtorrent options in advanced settings (Chocobo1)
- FEATURE: Add comboBox for selecting BitTorrent protocol. Closes #6316. (Chocobo1)
- FEATURE: Allow SMTP sender to be set. Closes #7575. (Chocobo1)
- FEATURE: Allow to specify if announcing to all tiers is desired. (sledgehammer999)
- FEATURE: Configurable number of history of paths in Add New Torrent dialog. (evsh)
- BUGFIX: Adjust icons names to better fit FDO scheme (evsh)
- BUGFIX: Optimized IP filter parsing, making blazingly fast (sledgehammer999, evsh)
- BUGFIX: Fix dialogs didn't position on the correct screen which qBittorrent window is on. Closes #1690, #2474, #3538. (Chocobo1)
- BUGFIX: Refactor and improve StatusBar (glassez)
- BUGFIX: Set expiration date for newly added cookie to +2 years from now, instead of +99 years. (Chocobo1)
- BUGFIX: Don't create subfolder inside temp folder (glassez)
- BUGFIX: Don't replace existing files when relocating torrent (glassez)
- BUGFIX: Fix explicit Torrent Management Mode in Add New Torrent dialog. Closes #5602. (sledgehammer999)
- BUGFIX: Fix calculation of 'Average time in queue' stat under libtorrent 1.1.x (sledgehammer999)
- BUGFIX: Don't disable bandwidth scheduler when manually switching speed limits. Closes #7306. (glassez)
- BUGFIX: Fix dereferencing freed pointer. Closes #7420. (Chocobo1)
- BUGFIX: Change the default cache size to 64MiB. (Chocobo1)
- BUGFIX: The previous "Disk write cache size" is not accurate since it is also being used for read cache, so rename it to "Disk cache". (Chocobo1)
- BUGFIX: Replace dialog ok-cancel buttons with QDialogButtonBox, which follows the platform specific button order. (Chocobo1)
- BUGFIX: Better reporting of success/failure of torrent and file deletion. (sledgehammer999)
- BUGFIX: Fix last activity calculation. Closes #7461. (Chocobo1)
- BUGFIX: Save state of options windows on cancel too. (silverqx)
- BUGFIX: Persist size and treeview header state in preview dialog. (silverqx)
- BUGFIX: Show torrent name in "add new torrent" dialog on merging trackers (Chocobo1)
- BUGFIX: Properly pre-select the selected torrent's current ratio limiting options in UpDownRatioDlg dialogs. Fixes #7352 (thalieht)
- BUGFIX: Optimize code for SpeedWidget. (dzmat)
- BUGFIX: Disable processing events when adding torrents(prevents crashes). Closes #7436. (Chocobo1)
- BUGFIX: Open links in browser. Closes #7651. (Chocobo1)
- BUGFIX: Change default settings for tracker/tier announces to mimick μTorrent behavior. (sledgehammer999)
- BUGFIX: Explicitly set UPnP state on start-up. Closes #7338. (Chocobo1)
- BUGFIX: Include/print caught signal in stackdump (Chocobo1)
- COSMETIC: Trackerlist: Set text alignment of columns with numbers to the right (thalieht)
- COSMETIC: Enable alternatingRowColors for "Manage Cookie" dialog (Chocobo1)
- COSMETIC: Remove indentation for category/tag filter widgets in all platforms (thalieht)
- COSMETIC: Add space between widgets in left side panel. Closes #7224. (Chocobo1, glassez)
- COSMETIC: Unify preference window borders across the tabs (vit9696)
- COSMETIC: Center Options dialog when showed. (silverqx)
- COSMETIC: Show delete accelerator key in menu. closes #7508 (Nick Korotysh)
- COSMETIC: Set QTextOption::NoWrap property in "Download from URLs" dialog (Chocobo1)
- COSMETIC: Use SVG icons for the country flags. Closes #6223. (sledgehammer999)
- WEBUI: Allow to load/use ECDSA certificate in webUI. (Chocobo1)
- WEBUI: Add copy options to webui context menu (addresses #6815) (#7036) (Tom Piccirello)
- WEBUI: Set torrent location from webui context menu (addresses #6815) (#7062) (Tom Piccirello)
- WEBUI: Add option to rename torrent from WebUI (Thomas Piccirello)
- WEBUI: Add auto torrent management to webui context menu (addresses #6815) (Thomas Piccirello)
- WEBUI: Option for "Create subfolder" when adding new torrent. (thalieht)
- WEBUI: Fix addPaused wrong default behavior. (Chocobo1)
- WEBUI: Reposition "Priority" menu option in WebUI to match gui. Closes #7072. (Thomas Piccirello)
- WEBUI: Report TCPServer errorString() if webui fails to listen to port. (Matthew Fioravante)
- WEBUI: Exit gracefully when failed to initialize web server with qbt-nox (Chocobo1)
- WEBUI: Add file-to-piece-index mappings in /query/propertiesFiles command (Chocobo1)
- WEBUI: Add optional parameters for /command/download & /command/upload (Chocobo1)
- WEBUI: Print error messages upon receiving invalid header fields. (Chocobo1)
- WEBUI: Add WebUi\Address config option. (Matthew Fioravante)
- WEBUI: Reinitialize webUI server when "IP address" setting changed. An app restart won't be necessary from now on. (Chocobo1)
- WEBUI: Improve log and error messages (Chocobo1)
- SEARCH: Use explicit class for search plugin versions (evsh)
- SEARCH: Remove all search plugins from repo. There is another repo named 'search-plugins'. (sledgehammer999)
- SEARCH: Update the backend when a new plugin favicon is downloaded. (sledgehammer999)
- SEARCH: Allow search plugins sorting. Closes #7526. (Nick Korotysh)
- RSS: Redesigned RSS subsystem (glassez)
- RSS: Do not use hardcoded colors in RSS feed view (evsh)
- RSS: Improve RSS events logging (glassez)
- WINDOWS: Use dpiawareness=1 on Windows. Closes #5393. (sledgehammer999)
- WINDOWS: Reformat Windows build configuration files. (glassez)
- LINUX: Allow custom tray icons when system icon theme is used. Closes #7403. (evsh)
- MACOS: Various macOS UI improvements (vit9696)
- MACOS: Fix main menu item location on macOS (vit9696)
- MACOS: Fix macOS window restoration after using hide icon (vit9696)
- MACOS: Fix notification display on macOS (vit9696)
- OTHER: Use new classes/methods from libtorrent and stop using deprecate ones. (glassez)
- OTHER: Various string fixes (Allan Nordhøy, sledgehammer999)
- OTHER: cmake: do not use Qt5Widgets when locating QtSingleApplication. Closes #7551. (evsh)
- OTHER: Update BOOST m4 macros and simplify AX_BOOST_BASE usage (Chocobo1)
- OTHER: Drop OS/2 support. (sledgehammer999)
- OTHER: Optimize file size of PNG and SVG files. (sledgehammer999)
- OTHER: Add new translators in the About page.
* Thu Jun 01 2017 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.13
- BUGFIX: Fixed UI glitch about torrent numbers in the sidepanel. Fixes #6454. (evsh)
- BUGFIX: Fix downloaded/uploaded columns were not highlighted properly when selected. (Chocobo1)
@@ -392,6 +280,7 @@
- OTHER: Use new alert dispathing API for libtorrent 1.1.x (glassez)
- OTHER: Fix gcc 6 compilation with qmake. See #5237. (sledgehammer999)
* Tue Mar 29 2016 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.4
- FEATURE: Download more pieces in "Download first and last pieces first" feature (ngosang)
- FEATURE: Unlock first column in peerlist too (thalieht)
@@ -523,6 +412,7 @@
- COSMETIC: Use QLineEdit built-in ClearButton (Qt5 only) (Chocobo1)
- COSMETIC: Change text description for half-open connection (Chocobo1)
- OTHER: Change update URL to FossHub. Closes #4188. (sledgehammer999)
* Sun Nov 29 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.0
- FEATURE: Huge core code refactoring. Problems with labels, temp folders etc should be eliminated. Smoother UI should be observed too. (glassez)
@@ -576,166 +466,6 @@
- OTHER: Reduce max value of "Disk cache size" to 1536MB for 32bit. Closes to #4028. (Chocobo1)
- OTHER: Make "Download in sequential order" and "Download first and last piece first" options independent. (glassez)
* Sat Oct 31 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.5
- BUGFIX: Fix difficult to reproduce crash. (glassez)
- OTHER: Fix Windows' Qt5 build. (Gelmir)
* Sat Oct 10 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.4
- FEATURE: Select the file of single file torrents when opening destination folder (pmzqla)
- BUGFIX: Fix crash with invalid favicon. Closes #3632. (glassez)
- BUGFIX: Try to download favicon.png when the download of favicon.ico fails (pmzqla)
- BUGFIX: Try to avoid loading a corrupted configuration file. Also log errors encountered while saving/loading the configuration. Closes #3503. (sledgehammer999)
- BUGFIX: Allow adding torrent link from Torcache (jsayol)
- BUGFIX: Don't limit the number of torrents that can be announced to the tracker/dht/lsd. Closes #3473. (sledgehammer999)
- BUGFIX: Fix potential crash when memory allocation failed. Closes #3877. (Chocobo1)
- COSMETIC: Change Queue buttons order in the Toolbar (GUI & Web UI) (ngosang)
- COSMETIC: Move option "Ignore transfer limits on local network" to Speed page (Chocobo1)
- COSMETIC: Move option "Confirm torrent deletion" to Behavior page (Chocobo1)
- COSMETIC: Fix typos. Make `μTP` untranslatable. Use American variation of words. Closes #3654. (sledgehammer999)
- COSMETIC: Optimize text color for dark themes. Closes #3633 and #3815. (sledgehammer999)
- COSMETIC: Show current label in the torrent context menu. Closes #3776. (sledgehammer999)
- WEBUI: Add save_path to /query/torrents (Casey Bodley)
- WEBUI: Bump API_VERSION to 5
- SEARCH: Fix python detection when the 'Anaconda' software is installed. Closes #3731. (sledgehammer999)
- RSS: Handle magnet links as torrents instead of news URLs. Closes #3560 (ngosang)
- RSS: Trim elements text in RSS articles (ngosang)
- RSS: Fix contextual menu in RSS torrents list (ngosang)
- RSS: Improve error handling when a RSS feed doesn't contain torrents (ngosang)
- RSS: More precise message and code simplification in RSS feeds deletion (ngosang)
- RSS: Don't hide the elements in Unread list when clicked (ngosang)
- RSS: Allow multiple selection in RSS torrents list (ngosang)
- RSS: Simplify string translation (ngosang)
- RSS: Handle more types of RSS feeds (ngosang)
- RSS: Fix RSS panel position not saved (ngosang)
- RSS: Fix forgetting label changes to first item in RSS rule list. (Gelmir)
- RSS: Add label to UI when a new one is creating during rule addition. (Gelmir)
- RSS: Removes refresh message when adding a new feed (ngosang)
- RSS: Fix RSS crash when deleting RSS feeds. Closes #997, #2152, #2461, #3718, #3747, #3766, #3806, #3814, #3829 and #3846. (ngosang)
- RSS: Sort labels in RSS Downloader dialog, closes #3140. (Chocobo1)
- WINDOWS: Correctly show german letters in the installer. Closes #3574, #3566. (sledgehammer999)
- WINDOWS: Fix file selection on Explorer when the filename contains weird characters. Closes #3185. (sledgehammer999)
- WINDOWS: Fix wrong default download directory in Windows. Closes #2625. (Chocobo1)
- WINDOWS: Fix German translation of the installer. (netswap)
- LINUX: Fix broken .desktop file icon for some locales. See #3905. (sledgehammer999)
- OTHER: Fix ppc64le detection during configure (sledgehammer999)
- OTHER: Don't use sed in configure. Closes #3169. (pmzqla)
- OTHER: Fix broken donation link. Closes #3771. (sledgehammer999)
- OTHER: Add forum link in README. Closes #3853. (sledgehammer999)
- OTHER: New translation: Esperanto
- OTHER: Fix Qt5 nox build on non-Windows. (sledgehammer999)
* Sun Aug 02 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.3
- BUGFIX: Fix crash when closing a search tab while search is running (pmzqla)
- SEARCH: Other minor search fixes and improvements (pmzqla)
* Sat Aug 01 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.2
- FEATURE: Allow to force reannounce DHT too (Chocobo1)
- FEATURE: Implement an option to disable confirmation of torrent recheck (blaxspirit)
- FEATURE: Allow to copy all the trackers with a keyboard shortcut (pmzqla)
- BUGFIX: Fix torrent renaming. Closes #3398 (ngosang)
- BUGFIX: Fix localhost address (::ffff:127.0.0.1) is not recognized when connecting to WebUI (Chocobo1)
- BUGFIX: Fix '&' character in label name becomes accelerator key, closes #3454. (Chocobo1)
- BUGFIX: Fix HTTP header parsing when torrent filename contains a semicolon. Closes #3511.
- BUGFIX: Fix installing search plugin from local file. (sledgehammer999)
- BUGFIX: Fix installing search plugin by drag-n-dropping file. (sledgehammer999)
- COSMETIC: Update color scheme of completed.png icon. (sledgehammer999)
- COSMETIC: Fix printing of the copyright symbol in the About dialog. (sledgehammer999)
- COSMETIC: Minor changes in Preview File dialog (ngosang)
- COSMETIC: Add Force Resume icon (ngosang)
- COSMETIC: Add count of unread items to RSS tab label (pmzqla)
- WEBUI: Ports between 1 and 65535 as in the GUI. Closes #1602 (ngosang)
- WEBUI: Fix an error in Content tab when the torrent doesn't have metadata (ngosang)
- WEBUI: New option Web UI port UPNP. Closes #3358 (ngosang)
- WEBUI: Fix API Content Types. Closes #3393 (ngosang)
- WEBUI: Fix empty trackers addition (ngosang)
- WEBUI: Torrent download from hash. Closes #1173 (ngosang)
- WEBUI: Fix sort by queue number (ngosang)
- WEBUI: Open external links in a new window/tab (ngosang)
- WEBUI: Massive increase in performance. (ngosang)
- SEARCH: Search status per tab (DoumanAsh)
- SEARCH: Remove the word 'torrent' in ExtraTorrent results (ngosang)
- SEARCH: Prefer python3 over python2 on Linux and OS X (pmzqla)
- SEARCH: Show notification if Python is not found and a search is started (pmzqla)
- SEARCH: Update link to the Windows Python installer (pmzqla)
- SEARCH: Improve checks for python. Print python version and path to log. (sledgehammer999)
- SEARCH: Improve Python detection (ngosang)
- OTHER: Improvements on the build system (Chocobo1)
- OTHER: Bump minimum libtorrent version required to 1.0.6/0.16.19. (sledgehammer999)
- OTHER: New translation: Slovenian
* Sat Jul 11 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.1
- FEATURE: Change default preferences (ngosang)
- FEATURE: Add "Add link to torrent" menu in TrayIconMenu. Closes #2918. (Chocobo1)
- FEATURE: Allow to Open files from the properties pane by pressing "Enter" (pmzqla)
- FEATURE: Add checkbox option for IpFilterTrackers. (Chocobo1)
- FEATURE: Download-from-URL textbox change focus on tab key (Mayank Asthana)
- FEATURE: Increase priority value of "High" (pmzqla)
- FEATURE: Add 16 KiB, 8 MiB and 16 MiB piece sizes in Torrent Creator (ngosang)
- BUGFIX: Disable Auto piece size when creating a new torrent (ngosang)
- BUGFIX: Set default focus to cancel button in delete confirm dlg, closes #3085 (Chocobo1)
- BUGFIX: Set default focus to ok button in add new torrent dlg (Chocobo1)
- BUGFIX: Set default focus to no button in exit confirm box (Chocobo1)
- BUGFIX: Fix Start Minimized checkbox in Options (ngosang)
- BUGFIX: Remove limits on alternative speeds setting (LazyBui)
- BUGFIX: Fix sorting torrents by ETA (pmzqla)
- BUGFIX: Improve ratio calculation formula. Closes #3096. (Chocobo1)
- BUGFIX: Clear missing files flag when resuming or force rechecking. Fixes issues in #2750. (sledgehammer999)
- BUGFIX: Delete tempfile when downloading favicon.ico. Closes #3257. (sledgehammer999)
- BUGFIX: Don't close downloadFromURL dialog when showing empty url warning (Chocobo1)
- BUGFIX: Minimize to tray only if the relevant option is enabled. (sledgehammer999)
- BUGFIX: Update disk space label after changing partition, closes #3309. (Chocobo1)
- BUGFIX: Don't use a default upload limit. Closes #3275. (sledgehammer999)
- BUGFIX: Fix Properties bar size when started minimized to tray. Closes #3206. (sledgehammer999)
- COSMETIC: Change option text "Confirmation on exit when torrents are active" (Chocobo1)
- COSMETIC: Enable to choose dark/light tray icons on all platforms. (Chocobo1)
- COSMETIC: Use AllUppercase for label text (Chocobo1)
- COSMETIC: changes in typography (ngosang)
- COSMETIC: Menu revamp (Chocobo1)
- COSMETIC: Revamp general tab info (Chocobo1)
- COSMETIC: Better update message for users (Chocobo1)
- COSMETIC: Fix ugly 'C++' wrapping in About dialog. (glassez)
- WEBUI: Fix login and logout relative URLs (ngosang)
- WEBUI: Fix resumeAll and pauseAll. Closes #3016 (ngosang)
- WEBUI: Changes in title bar (ngosang)
- WEBUI: Complete translatable strings (ngosang)
- WEBUI: Minor changes in style (ngosang)
- WEBUI: Fix Max connections and Time active in transfer information (ngosang)
- WEBUI: New config - Global maximum number of upload slots (ngosang)
- WEBUI: Display wasted data with friendly units. Closes #2994 (ngosang)
- WEBUI: add delay in shutdown command in order to send out response msg (Chocobo1)
- WEBUI: Option to hide Top Toolbar (ngosang)
- WEBUI: Reorder the tabs/groups in Options window (ngosang)
- WEBUI: Add new options (ngosang)
- WEBUI: Increase API_VERSION due to changes in #3279, #3197, #3226 and #3040 (ngosang)
- WEBUI: Add Web Seeds (HTTP Sources) tab (ngosang)
- WEBUI: Don't update the tabs if tab's panel is collapsed (ngosang)
- WEBUI: Fix alternative global rate limits. (ngosang)
- SEARCH: Fix thepiratebay. Closes #3012 (ngosang)
- SEARCH: Improve torrentz engine to return more results (ngosang)
- SEARCH: Change width of columns in search tab. Closes #764 (ngosang)
- SEARCH: Make strings translatable in seach engine (ngosang)
- SEARCH: Aborting search engine process during closure. Close #2671 (DoumanAsh)
- SEARCH: Perform searches in parallel (DoumanAsh)
- SEARCH: Add Demonoid search engine (ngosang)
- SEARCH: Minor fixes in search engines (ngosang)
- SEARCH: Show the version of search engines (ngosang)
- SEARCH: Update Legit Torrent to remove sgmllib (DoumanAsh)
- SEARCH: Update KickassTorrents (ngosang)
- SEARCH: Update BTDigg (ngosang)
- SEARCH: Update Torrentz (ngosang)
- SEARCH: Update ExtraTorrent (ngosang)
- SEARCH: Update TorrentReactor (ngosang)
- SEARCH: Fix Python 2 implementation of Torrentz (ngosang)
- SEARCH: Cosmetic changes in search engine (ngosang)
- SEARCH: Fix column sort in search engine. Closes #2621 (ngosang)
- RSS: Update matching RSS articles while editing rules (pmzqla)
- WINDOWS: Fix python detection from registry when multiple versions are installed (sledgehammer999)
- LINUX: Fixes Linux issue for when the theme doesn't have a corresponding icon. (sledgehammer999)
- OTHER: Correctly detect FreeBSD when configuring. (sledgehammer999, yurivict)
- OTHER: Add translator to credits.
- OTHER: New translation: Indonesian.
- OTHER: Split Chinese locales into Chinese Simplified, Chinese Traditional(Taiwan), Chinese Traditional(Hong Kong). (sledgehammer999)
* Sun May 10 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.0
- FEATURE: Show actual protocol for listen success/failure in the log. Needs libtorrent v1.0.0 (Gelmir)
- FEATURE: Support per tracker re-announce. Needs libtorrent v1.0.0 (Gelmir)
@@ -826,208 +556,6 @@
- OTHER: Backtrace generation now works on MinGW. (Gelmir)
- OTHER: New translation: Hindi(India).
* Wed Feb 22 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.12
- OSX: Fix build to work with older machines. (sledgehammer999, Noctem)
- WINDOWS: Fix automatic Python download. (sledgehammer999)
- WINDOWS: Fix crashes due to memory corruption and improve Python registry searching. (glassez)
* Wed Oct 22 2014 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.11
- FEATURE: Allow relative torrent paths when qBittorrent is already running (pmzqla)
- FEATURE: Make Windows icons suitable for high dpi screens (pmzqla)
- FEATURE: Increase maximum size of system icons (pmzqla)
- BUGFIX: Fix crash in the "Content" widget when user would right click in it without a torrent selected (Ivan Sorokin)
- BUGFIX: Don't show multiple unlock UI dialogs. Closes #2040. (sledgehammer999)
- SEARCH: Fix bug where python would falsely be detected and nothing worked (paolo-sz)
- SEARCH: Fix TorrentReactor search plugin (Bruno Barbieri)
- SEARCH: Fix search engine encoding issues with python3 on Windows (Bruno Barbieri)
- SEARCH: Pirate bay search engine update (DoumanAsh)
- SEARCH: Internal improvements in the python code (Bruno Barbieri)
- WINDOWS: Fix magnet link association. Closes #1952. (sledgehammer999)
- WINDOWS and OSX: Fix again the program updater. The url was changed by sourceforge.net. Closes #1954. (sledgehammer999)
- OSX: Fix compilation (sledgehammer999)
- WEBUI: Set correct HTTP Content-Type in case of forbidden access. (pmzqla)
- COSMETIC: Remove unneeded tooltip (pmzqla)
- COSMETIC: Don't stretch the last section in the transfer list (pmzqla)
- COSMETIC: Set minimum width of the left panel in the preferences (pmzqla)
- OTHER: Optimize sorting of rows. This should have less CPU impact when many torrents are present. (Ivan Sorokin)
- OTHER: Use the correct character encoding for exceptions coming from libtorrent. (sledgehammer999)
- OTHER: Use boost:bind() as the docs show. Allows compilation with older gcc versions. (sledgehammer999)
* Sun Sep 21 2014 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.10
- FEATURE: Allow disabling of OS cache. This will prevent RAM increases on Windows when seeding many files. Closes #1699. (sledgehammer999)
- FEATURE: Add 'Completed' column. Closes #1241. (sledgehammer999)
- FEATURE: Added 'Ratio Limit' column. Closes #936. (sledgehammer999)
- FEATURE: Add 'Open' and 'Open Containing Folder' entries in the content's right-click menu. Closes #1143. (sledgehammer999)
- FEATURE: Don't listen on IPv6 address by default. Prevents network connectivity problems. Closes #1880. (sledgehammer999)
- FEATURE: Added 'Shutdown now' button in shutdown confirmation dialog. Closes #969. (sledgehammer999)
- FEATURE: Add peer port column to PeerListWidget. Closes #1650. (Ivanov Juriy)
- COSMETIC: Fix weird ratio values when torrent was imported or downloaded history was lost due to crash. (sledgehammer999)
- COSMETIC: Use 'μTP' instead of 'uTP'. (sledgehammer999)
- COSMETIC: Show the loaded torrents in the transferlist when qBT is launched with a torrent/magnet and the AddNewTorrentDialog is showing. Closes #1564. (sledgehammer999)
- COSMETIC: Don't mix finished/unifinished torrents when sorting by ETA. Closes #1688. (sledgehammer999)
- COSMETIC: Sort finished torrents by completed date when sorting by queue number. (sledgehammer999)
- COSMETIC: Right align numerical values in the transfer list. Partially revert 51a9a9aab. Closes #1903. (sledgehammer999)
- COSMETIC: Don't display the Search Engine tab by default. (sledgehammer999)
- WINDOWS: Correctly associate torrents and magnet links with qBittorrent under non-admin accounts. Closes #291 #527 #579 #614 #964. (glassez, sledgehammer999)
- WINDOWS: Check for python before creating the search engine tab. Prevents the creation of python specific files in the user's PC if no python is found. Closes #1370. (sledgehammer999)
- WINDOWS: Don't create keys in the registry if python isn't found. Closes #1370. (sledgehammer999)
- WINDOWS: Can now correctly detect 64bit and 32bit python installations on 64bit Windows. Closes #1148 #445 #795 #1708. (sledgehammer999)
- WINDOWS: Search first in PATH for python. Closes #956. (sledgehammer999)
- OSX: Enable system tray in MACOSX (Nick Korotysh).
- OSX: Fix headless (nox) build. (sledgehammer999)
- WEBUI: Correctly save/load settings and other improvements (glassez)
- WEBUI: Removed broken 'Report a bug' iframe. Closes #1343 (Benjamin Hutchins)
- WEBUI: Removed broken 'Documentation'. Improves fix for #1343 (Benjamin Hutchins)
- WEBUI: Removed essentially useless 'Visit website' iframe and changed it to a regular link. Improves fix for #1343 (Benjamin Hutchins)
- BUGFIX: Fix RSS feed icon. The tmp file gets deleted in the feed destructor. Closes #1639 (sledgehammer999)
- BUGFIX: fix issue #1674: AddNewTorrentDialog is shown again and again even if checkbox "dont ask me again" is set (Ivan Sorokin)
- BUGFIX: Don't show availability bar for magnet links (Ivan Sorokin)
- BUGFIX: Fix crash when the selected torrent disappears from the transfer list. Closes #1661 (sledgehammer999)
- BUGFIX: Fix tracker announcing problem(hit-and-run) when many torrents are being active. Closes #1571 (sledgehammer999)
- BUGFIX: Count magnet links in the 'downloading' filter and make them prevent system inhibition. Closes #1558 (sledgehammer999)
- BUGFIX: Pick up updated plugins. Closes #1745. (sledgehammer999)
- BUGFIX: Bring mainwindow in front when notification is clicked and other windows are in front. (sledgehammer999)
- BUGFIX: Speedup torrent moving (Ivan Sorokin)
- BUGFIX: Fix bug when moving a torrent before the previous move is completed (Ivan Sorokin)
- BUGFIX: Add option to hibernate computer in Auto-Shutdown menu (Bruno Barbieri)
- BUGFIX: Fix column resizing issues (Bryan Roscoe)
- BUGFIX: Fix possible crashes. Closes #1814. (sledgehammer999)
- BUGFIX: Limit max cache to 1800MiB for 32bits compiled binaries and to 4GiB for other. Closes #1698. (sledgehammer999)
- BUGFIX: Don't localize double numbers in the webui. Closes #1525. (sledgehammer999)
- BUGFIX: Don't shrink transferlist rows when scrolling horizontally. Closes #1613. (sledgehammer999)
- BUGFIX: When qBT is launched with a magnet don't show it in the transferlist while the metadata are being loaded in the background. (sledgehammer999)
- BUGFIX: Show disk space while retrieving metadata. Closes #1693. (sledgehammer999)
- BUGFIX: Don't disable DHT/LSD/UPnP in the GUI when anonymous mode is enabled. (sledgehammer999)
- BUGFIX: Possible fix for crash in RSS code. Closes #1901. (sledgehammer999)
- BUGFIX: Fixed SMTP emailing code (Ivanov Juriy, sledgehammer999)
- BUGFIX: Don't display the context menu in 'Content' and 'HTTP Sources' buttons when no torrent is selected. It prevents crashes. Closes #1906, #1900. (sledgehammer999)
- BUGFIX: Don't translate file extensions. Closes #1907. (sledgehammer999)
- BUGFIX: Fix available disk space label on single file torrents. (sledgehammer999)
- BUGFIX: Show stalled downloads that are uploading under the 'Active' filter. Closes #1654." (sledgehammer999)
- BUGFIX: fix import torrent with "Keep incomplete torrents in:" enabled (lojack5)
- BUGFIX: Send a spoofed user agent for the search engines(fixes some of them) (Martin Janco)
- BUGFIX: Support URLs that redirect to magnet links (Gelmir)
- BUGFIX: Consider queued items before deciding to 'auto-shutdown on downloads completion'. Closes #1942. (sledgehammer999)
* Tue Apr 29 2014 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.9.2
- OTHER: The v3.1.9.1 Windows build was broken
* Mon Apr 28 2014 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.9.1
- OTHER: This is an excuse to produce new builds with an OpenSSL version that isn't affected by the heartbleed bug for Windows and Mac. This bug should only affect the WebUI and only if HTTPS/SSL authentication was enabled.
* Sat Mar 01 2014 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.9
- BUGFIX: Fix nox build. Closes #1368 (bob23450)
- BUGFIX: Fix build with libtorrent 0.15.x (sledgehammer999)
- BUGFIX: Fix missing percentage signs. Closes #1392. (sledgehammer999)
- BUGFIX: Fix queue sorting order. (alfrix)
- BUGFIX: Fix build using qt < 4.7 Closes #1385. (Evgeny Lensky)
- BUGFIX: Fix autoupdater. Send our user-agent to sourceforge.net (sledgehammer999)
- FEATURE: Add button for links in toolbar (alfrix)
* Sun Feb 02 2014 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.8
- BUGFIX: Really fix build of v3.1.6
* Sun Feb 02 2014 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.7
- BUGFIX: Fix build of v3.1.6
* Sun Feb 02 2014 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.6
- BUGFIX: Fix 'preview file' regression. Closes #1285. (sledgehammer999)
- BUGFIX: Fix peers and seeds sorting in transfer list. (Angel Alonso)
- BUGFIX: Fix btdigg search engine. (BTDigg research team)
- BUGFIX: Save statistics every 15min and only if there was new traffic. Fixes #1288 and partially #1272. (sledgehammer999)
- BUGFIX: Fix share ratio text in the 'general' tab. (sledgehammer999)
- BUGFIX: Output a more generic message when blocking IPs and don't use italics in the log. (sledgehammer999)
- BUGFIX: Allow 2 decimals when setting the share ratio. Closes #1303. (sledgehammer999)
- BUGFIX: Fix extratorrents search plugin. (sledgehammer999)
- BUGFIX: Use shorter names for amount columns in main UI (Gelmir)
- BUGFIX: Fix overstretched options dialog. Closes #1293. (sledgehammer999)
- BUGFIX: Don't show a popup menu when no torrent is selected. (sledgehammer999)
- BUGFIX: Launch external programs async and don't block. Closes #1252. (sledgehammer999)
- BUGFIX: Don't re-announce to trackers when torrent is paused. Closes #1310. (sledgehammer999)
- BUGFIX: Bring dialog boxes in the front when qbt doesn't have focus. (sledgehammer999)
- BUGFIX: Correctly resize 'name' column of the content tab. Closes #1360. (sledgehammer999)
- BUGFIX: Correctly restore 'name' column width when loading magnet links in the 'Add new torrent dialog'. Closes #1334. (sledgehammer999)
- WEBUI: Fix sorting by size in WebUI when non-default locale used. (Vladimir Golovnev)
- UI: Reposition statistics menu item. (sledgehammer999)
- UI: Convert more accurately decimal numbers to text. (sledgehammer999)
- WINDOWS/OSX: Improvements on the behavior of the program updater(closes #1282) (sledgehammer999)
- LINUX: Explicitle tell that we don't support freedesktop's startup notify standard. Fixes GNOME issues. Closes #1217. (sledgehammer999)
- LINUX: Add our WM_CLASS in the .desktop file so window managers know how to group our windows. (sledgehammer999)
- OTHER: Sync translations from Transifex.
* Thu 16 Jan 2014 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.5
- BUGFIX: Fix compilation with Qt 4.7. Closes #1215. (sledgehammer999)
- BUGFIX: Third attempt at fixing saving settings on OS shutdown. (sledgehammer999)
- BUGFIX: Preview now correctly uses the selected file. Closes #1222 #1182. (sledgehammer999)
- BUGFIX: Allow to resize the columns in Add New Torrent dialog. Closes #1207 #676 (sledgehammer999)
- BUGFIX: Ensure that at least one column in the tranferlist is always visible. Closes #1165. (sledgehammer999)
- BUGFIX: Ensure that the options window will always be placed onscreen. Closes #1226. (sledgehammer999)
- BUGFIX: Delete temporary files after they aren't needed. Closes #1188. (sledgehammer999)
- BUGFIX: Correctly detect libtorrent version. (sledgehammer999)
- BUGFIX: Various code cppcheck fixes (Konstantin Goncharik)
- BUGFIX: Remove isohunt search engine and update thepiratebay url (sledgehammer999)
- BUGFIX: Fix rss settings corruption when checking regexp and going to other rule. (Gelmir)
- BUGFIX: Don't count paused torrents for the autoshutdown. Closes #1280. (sledgehammer999)
- LINUX: Fix notifications with xfce4-notifyd.
- OSX: Added basic retina support. Closes #1251. (Sébastien Lavoie)
- OTHER: Sync translations from Transifex.
* Sun 29 Dec 2013 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.4
- FEATURE: Statistics dialog (Gelmir)
- FEATURE: Tooltips explaining each peer's connection flags (sledgehammer999)
- FEATURE: Win/Mac Check for program updates every 15min and allow the user to manually check for updates through the help menu. (sledgehammer999)
- BUGFIX: Better dialog message for torrent delete confirmation (sledgehammer999)
- BUGFIX: Fix resizing grip location. Closes #1146. (sledgehammer999)
- BUGFIX: Lock toolbar in place. Closes #1144. (sledgehammer999)
- BUGFIX: Second attempt at fixing saving settings on shutdown. (sledgehammer999)
- BUGFIX: Sort labels in 'Add new torrent' dialog. Closes #1150 #411. (sledgehammer999)
- LINUX: Fix build under Ubuntu 13.10 (sledgehammer999)
- LINUX: Make sleep and shutdown functions work on systemd's logind (Faheem Pervez)
* Mon Nov 20 2013 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.3
- FEATURE: Add a key shortcut to "Add link to torrent..." (Angel Alonso)
- BUGFIX: Make all columns and headers use the same text alignment in the transferlist. (sledgehammer999)
- BUGFIX: Fix build system for Unix/Linux. (sledgehammer999)
- BUGFIX: Case insensitive sort in Peers list. Closes #1066. (sledgehammer999)
- BUGFIX: Small optimization of WebUI responses when there isn't a data payload. (sledgehammer999)
- BUGFIX: Hide empty folders after filtering. Closes #74. (sledgehammer999)
- BUGFIX: Expand folders when filtering files. Closes #1076. (sledgehammer999)
- BUGFIX: Updated search plugin's URL (Zach Thibeau)
- BUGFIX: Strip some png to fix incorrect sRGB profiles. (Angel Alonso)
- BUGFIX: Fixed font issues on OSX Mavericks (Zach Thibeau)
- BUGFIX: Improve text in the About dialog (Artem S. Tashkinov)
- BUGFIX: Always show a peer IP address as a tool tip (Artem S. Tashkinov)
- BUGFIX: Fix inhibit system functionality. Closes #766. (sledgehammer999)
- BUGFIX: WebUI: Don't gzip too small payloads. (sledgehammer999)
- BUGFIX: Correctly detect if the browser supports gzip compression. (sledgehammer999)
- BUGFIX: Fix WebUI link to 'Anonymous mode' explanation. Closes #1093. (sledgehammer999)
- BUGFIX: Correctly update tracker tier number in the trackers tab. Closes #1075. (sledgehammer999)
- BUGFIX: Speed improvements.(sledgehammer999)
- OTHER: Updated translations.
* Tue Nov 05 2013 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.2
- BUGFIX: Fix WebUI gzip compression. Closes #1037. (sledgehammer999)
- BUGFIX: Fix compilation with qt < 4.8.0. Closes #1043. (sledgehammer999)
- OTHER: Updated translations.
* Mon Oct 28 2013 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.1
- FEATURE: Show external IP in the log. Closes #968. (sledgehammer999)
- FEATURE: Enable gzip compression in the webui. It should be faster now. (sledgehammer999)
- FEATURE: Torrents show more states(queued for checking, downloading metadata, allocating, checking resume). (sledgehammer999)
- FEATURE: Reenable "force reannounce" to all trackers. (sledgehammer999)
- FEATURE: Allow to clear the UI lock password. Closes #973. (sledgehammer999)
- FEATURE: New translations: English(Australia) and English(United Kingdom)
- BUGFIX: Expose all available translation in the WebUI. Closes #976. (sledgehammer999)
- BUGFIX: Copy IP copied wrong data. Closes #970 (sledgehammer999)
- BUGFIX: "Preview file..." didn't work on single file torrents. (sledgehammer999)
- BUGFIX: Fix and improve the scheduler (Gelmir and sledgehammer999)
- BUGFIX: RSS fixes. Closes #960, #998 (Gelmir)
- BUGFIX: Fix 'append label to save path' with magnet links. (sledgehammer999)
- BUGFIX: Can download up to 10MB .torrent file when a link is provided. Closes #879 (sledgehammer999)
- OTHER: Updated translations.
- LINUX: Fix missing conf.pri error (leigh123linux)
- WINDOWS: Don't remove file associations if they aren't our own. (sledgehammer999)
* Sat Oct 12 2013 - Christophe Dumez <chris@qbittorrent.org> and sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.0
- FEATURE: Add command line option to daemonize qbittorrent-nox (ngaro)
- FEATURE: Add "Shutdown qBittorrent" button to Web UI (ngaro)
@@ -1066,118 +594,6 @@
- PERFORMANCE: Impove drawing speed of tranferlist when there are many torrents(>100)
- PERFORMANCE: Impove drawing speed of peers list when there are many peers
* Mon Jul 29 2013 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.0.11
- FEATURE: Allow more fine tuning of upload slots. It should improve speed (sledgehammer999)
- FEATURE: Enable edit/rename via F2 or double click in various places (Gelmir)
- BUGFIX: Fix Spanish and Basque translations being messed up on Windows (sledgehammer999)
- BUGFIX: Don't allow newlines in rename dialog (Gelmir)
- BUGFIX: Treat unfinished dates as the newest ones when sorting (sledgehammer999)
- BUGFIX: Fix text size problem on Windows with custom DPI (sledgehammer999)
- BUGFIX: Respect UI lock when clicking on tray notification (sledgehammer999)
- BUGFIX: Fix kickass torrents search plugin (Gelmir)
- BUGFIX: Use system language as default language. Closes #780 (sledgehammer999)
- BUGFIX: Move completed files to .unwanted folder when they are unselected by the user (constantined)
- BUGFIX: Show delete action when multiple feeds are selected (Gelmir)
- BUGFIX: Use Unicode for libtorrent alert messages (Gelmir)
- OTHER: Update translations
- WINDOWS: Shave off ~4MB from the binary size (sledgehammer999)
- WINDOWS: Remove wrong dependency on msvc2008 runtime (sledgehammer999)
- WINDOWS: Disable stacktrace when building with mingw (Gelmir)
- WINDOWS: Updated NSIS script to include/delete .pdb file. (sledgehammer999)
* Tue Jul 9 2013 - Christophe Dumez <chris@qbittorrent.org> and sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.0.10
- BUGFIX: Fix LegitTorrents search plugin
- BUGFIX: Improve peer host name resolution (closes #360)
- BUGFIX: Context menu fix in the Web UI
- BUGFIX: Respect 'don't show' torrent dialog in Search (sledgehammer999)
- BUGFIX: Torrent creator can now use files/folders from disk root (Gelmir)
- BUGFIX: Update free disk space when changing drives in the add new torrent dialog (sledgehammer999)
- BUGFIX: Various fixes relating to RSS drag and drop (Gelmir)
- BUGFIX: Properly rename torrent which changes position in filter model (Gelmir)
- BUGFIX: Actually show tray notifications when a torrent finishes downloading (sledgehammer999)
- BUGFIX: Don't download RSS items based on rules still being edited (Gelmir)
- COSMETIC: Native look for the search boxes (Hyperz)
- IMPROVEMENT: Use natural sorting where possible (Gelmir and sledgehammer999)
- LINUX: Drop Boost.Thread dependency from configure script
- OTHER: Update translations.
- OTHER: Drop obsolete Boost.Thread dependency from configure script on linux (Dumez)
- LIBTORRENT: SOCKS5 fixes (0.16.10)
- LIBTORRENT: Fix hanging issue on Windows when closing files (0.16.10)
- LIBTORRENT: Cache can now be returned to the OS (0.16.10)
- PERFORMANCE: Impove drawing speed of tranferlist when there are many torrents(>100) (sledgehammer999)
- PERFORMANCE: Impove drawing speed of peers list when there are many peers (sledgehammer999)
* Sat Mar 16 2013 - Christophe Dumez <chris@qbittorrent.org> - v3.0.9
- BUGFIX: Raise qBittorrent windows when another instance is launched
- BUGFIX: Show human readable names for network interfaces in preferences (Windows)
- BUGFIX: Fix torrent creator bug when saving non-latin path (Windows)
- BUGFIX: Enable 'copy magnet uri' for torrents without metadata too
- BUGFIX: Fix a few JSON parser issues (Gelmir)
- BUGFIX: Add support for gzipped encoded HTTP responses (daimor)
- BUGFIX: Fix possibly missing "Add torrent" icon (Driim)
- OTHER: Add search plugin for Legit Torrents
* Sun Jan 20 2013 - Christophe Dumez <chris@qbittorrent.org> - v3.0.8
- BUGFIX: Fix support for --no-splash command line argument
- BUGFIX: Fix compilation error with libtorrent v0.15
- BUGFIX: Fix search issues with Python3
- BUGFIX: Fix dead link about certificates in program preferences
* Sat Jan 19 2013 - Christophe Dumez <chris@qbittorrent.org> - v3.0.7
- BUGFIX: Update max write cache size to 2048MB and set it to automatic by default (closes #148)
- BUGFIX: Add m4v to the list of previewable file extensions (closes #216)
- BUGFIX: Fix "Couldn't set environment variable..." message on start up (closes #245)
- BUGFIX: Use right path separator in torrent addition dialog on Windows
- BUGFIX: Fix "Set as default save path" setting (closes #254)
- BUGFIX: Reenable disk cache on Windows since the memory issue seems to be gone
- BUGFIX: Fixed several search engine plugins and removed the dead ones
- BUGFIX: Use https links in search plugins when possible
- BUGFIX: Bump Mootools to v1.4.5 (Web UI)
- BUGFIX: Require password to exit qBittorrent from tray icon when locked (closes #311)
- BUGFIX: Fix possible crash in loadPeers() (closes #222)
* Sun Oct 7 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.6
- BUGFIX: Fix unicode support for command-line arguments on Windows (closes #139)
- BUGFIX: Do not store created torrent in memory before writing it to a file (closes #133)
- BUGFIX: No longer fallback to ANY interface if the user-selected interface cannot be found (closes #143)
- BUGFIX: Fix timezone parsing in RSS (closes #136)
- BUGFIX: Fix cookie support for RSS feeds (closes #119)
* Sun Sep 30 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.5
- BUGFIX: Disabling systray icon no longer disables file association settings (closes #114)
- BUGFIX: Import new trackers from magnet link in case of duplicate torrent (closes #111)
- BUGFIX: Fix "Skip hash check" feature in torrent import dialog (closes #128)
- BUGFIX: Several Web UI connection fixes
- BUGFIX: Add Basque locale to Web UI
* Tue Sep 18 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.4
- BUGFIX: Fix issue with downloads starting from scratch on startup if temporary
directory setting is enabled.
* Sun Sep 16 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.3
- BUGFIX: Fix issue with temporary directory not being taken into consideration (closes #94)
- BUGFIX: Address encoding issues when using search engine on Windows (closes #29)
- BUGFIX: Bypass cache when uploading a torrent file in Web UI (closes #68)
- BUGFIX: "Completed On" column is not updated until restart (closes #84)
- BUGFIX: Fix possible build error on some systems
- I18N: Add hebrew translation
* Sat Sep 1 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.2
- FEATURE: Add "clear" functionality to search field (closes #59)
- BUGFIX: Attempt to use qBittorrent icon from theme if available (closes #49)
- BUGFIX: Fix crash when a fastresume file is empty (closes #52)
- BUGFIX: Fix encoding problem for detected XDG Download folder (closes #53)
- BUGFIX: Improve performance when showing torrent content panel (Improves #24)
- BUGFIX: Fix label-based filtering of torrents whose label contains special characters
- BUGFIX: Fix possible crash due to labels (closes #64)
* Tue Aug 21 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.1
- BUGFIX: Fix possible crash when adding a tracker to a magnet torrent without metadata (Closes #1034254)
- BUGFIX: Remember queue position for torrents without metadata (closes #17)
- BUGFIX: Fix crash when using unauthorized characters in label names (closes #19)
- BUGFIX: Fix search plugins updating (closes #25)
- BUGFIX: Make uTP connections rate limited by default
* Thu Aug 09 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.0
- FEATURE: Brand new torrent addition dialog
- FEATURE: Add the ability to choose the save path when using magnet links (mutoso)
@@ -1189,92 +605,6 @@
- OTHER: Drop support for libtorrent v0.14.x
- OTHER: Drop support for Qt 4.5
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.9.12
- BUGFIX: Fix issue when "Minimize to tray" and "Start minimized" are both enabled
* Sun Jul 1 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.11
- BUGFIX: Fix unreversible "Minimize to tray" on some window managers
- BUGFIX: Fix torrent availability computation (closes #988869)
- BUGFIX: Bring window to front after restoring from systray
- BUGFIX: Fix keyboard focus problems on main window (closes #1019563)
- BUGFIX: Fix ThePirateBay search plugin
* Sun Jun 24 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.10
- BUGFIX: Fix possible crash when showing torrent content (closes #1002586)
- BUGFIX: Add support for RSS feeds using magnet links (closes #1016379)
- BUGFIX: Remove 100kb limit for torrent file size in Web UI
- BUGFIX: Fix ratio limiting bug (closes #835217)
- BUGFIX: Do not display .!qB file extensions in Web UI
- BUGFIX: Stop using absolute URLs in Web UI ajax requests (closes #1011226)
- BUGFIX: Fix torrent association and loading on Mac OS X (closes #1011229)
- BUGFIX: Fix unreversible "Minimize to tray" on some window managers (closes #917825)
* Sun May 20 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.9
- BUGFIX: More reliable RSS feed parsing (closes #1001777)
- BUGFIX: Better support for cookies in RSS
- BUGFIX: Make sure show/hide text in tray icon menu is correct
- COSMETIC: Improve style of left panel
- COSMETIC: Never disable properties panel
- COSMETIC: Make sure first tab is initially selected in options dialog
- COSMETIC: Fix a few focus issues on Mac OS X
* Sat May 5 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.8
- BUGFIX: Various UI style fixes
- BUGFIX: Fix compilation with gcc 4.7
- BUGFIX: Fix possible compilation error with msvc (Windows)
- BUGFIX: Fix compilation on OS/2
- I18N: Update Italian translation
* Sun Mar 18 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.7
- BUGFIX: Fix important HTTP request parsing bug (Web UI)
* Sat Mar 17 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.6
- BUGFIX: Fix download first/last pieces state reporting
- BUGFIX: Fix name of progress column in torrent content panel
- BUGFIX: Disable system tray icon on Mac OS X
- BUGFIX: RSS downloader should not ignore "Do not start automatically" rule (closes #946910)
- BUGFIX: Fix DHT port setting in Web UI (Closes #952182)
- BUGFIX: Fix possible Web UI authentication problem when using SSL (closes #941343)
- BUGFIX: Fix possible issues with folder removal when removing a torrent
- I18N: Add Basque translation
* Sat Feb 18 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.5
- BUGFIX: Fix crash when disabling then reenabling RSS
- BUGFIX: Fix duplicate torrent detection when adding a magnet link
- BUGFIX: Fix import of new trackers when adding a torrent with same hash (Closes #747000)
- BUGFIX: Fix possible redownload of torrents marked as read (Closes #927495)
- BUGFIX: Properly remove RSS feed settings/history upon feed removal
* Sat Feb 18 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.4
- BUGFIX: qBittorrent does not handle redirection to relative URLs correctly (Closes #919905)
- BUGFIX: Cmd+M minimizes main window on Mac OS X (Closes #928216)
- BUGFIX: Cmd+Del removes torrents on Mac OS X (Closes #928852)
- BUGFIX: Fix potential bug when moving single file torrents to tmp folder (closes #932861)
- BUGFIX: Fix torrent import dialog layout (Closes #930932)
- BUGFIX: Prevent log window buffer from filling up (Closes #929673)
- I18N: Add Belarusian translation
* Thu Dec 29 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.9.3
- BUGFIX: Fix btdigg plugin (Python3 support + torrent name in magnet links)
- BUGFIX: Fix banning of IPv6 peers (Closes #885021)
- BUGFIX: Fix torrent addition dialog layout problem (Closes #84650522)
- BUGFIX: Do not report any progress for disabled files (Closes #56731485)
- BUGFIX: Make torrent sorting case insensitive (Closes #857154)
- BUGFIX: Improve Web UI usability of small devices
- BUGFIX: Program updater: More reliable version detection / comparison
- I18N: Add Georgian translation
* Sat Oct 29 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.9.2
- BUGFIX: Fix mimimum dimensions for torrent addition dialog
- BUGFIX: Remove dependency on boost-datetime
- BUGFIX: Remove dependency on boost-filesystem (libtorrent v0.16.x)
* Sun Oct 23 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.9.1
- BUGFIX: Add support for speed limits scheduling (Web UI)
- BUGFIX: Fix ratio calculation for purely seeded torrents
- I18N: Update Russian translation
- COSMETIC: Torrent addition dialog layout fixes
* Sat Oct 08 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.9.0
- FEATURE: Add file association settings to program preferences (Windows)
- FEATURE: Add setting to ignore slow torrents in queueing system

74
README.os2 Normal file
View File

@@ -0,0 +1,74 @@
qBittorrent - A BitTorrent client in Qt4
------------------------------------------
This is the eComStation (OS/2) qBittorrent part of the readme. See also README for more general information.
Building qBittorrent
********************
Requirements
============
- gcc based build env (recommended gcc v4.4.2 or greater)
- Qt4 for eCS (OS/2) dev package (see http://svn.netlabs.org/qt4 for more information)
- libtorrent-rasterbar for eCS (OS/2) port (see http://svn.netlabs.org/ports for more information)
- boost for eCS (OS/2) port (see http://svn.netlabs.org/ports for more information)
How to build
============
First you need to create the conf.pri file in the same dir as this readme.os2 is.
the conf.pri file has the following content:
##### conf.pri content begin #####
BINDIR = ./bin
INCDIR = ./include
LIBDIR = ./lib
DATADIR = ./share
CONFIG += staticlib
INCLUDEPATH += x:/trees/libtorrent/trunk/include
LIBS += -Lx:/trees/libtorrent/trunk/src/.libs \
-Lx:/trees/boost/trunk/stage/lib \
-Lx:/trees/openssl \
-Lx:/extras/lib
##### conf.pri content end #####
Of course all the above path references have to be adjusted to your build env.
Now you can either do a normal build or a shadow build. A shadow build has the
advantage that no created files are in the same dir as the sources are.
For a normal build do the following:
Simply type:
$ qmake
Followed by:
$ make
For a shadow build do the following:
given your sources are in x:\trees\qbittorrent\trunk create a
x:\trees\qbittorrent\build directory
Now switch to the created directory and type:
$ qmake ..\trunk
Followed by:
$ make
If all works fine you should get a working qbittorrent executable.
If you have any question regarding the eCS (OS/2) port of qBittorrent you can meet me (_diver) on IRC:
#netlabs on irc.freenode.net
------------------------------------------
Silvan Scherrer <silvan.scherrer@aroa.ch>

View File

@@ -1,355 +0,0 @@
# Borrowed from Avogadro project (https://github.com/OpenChemistry/avogadroapp)
#.rst:
# DeployQt5
# ---------
#
# Functions to help assemble a standalone Qt5 executable.
#
# A collection of CMake utility functions useful for deploying Qt5
# executables.
#
# The following functions are provided by this module:
#
# ::
#
# write_qt5_conf
# resolve_qt5_paths
# fixup_qt5_executable
# install_qt5_plugin_path
# install_qt5_plugin
# install_qt5_executable
#
# Requires CMake 2.8.9 or greater because Qt 5 does.
# Also depends on BundleUtilities.cmake.
#
# ::
#
# WRITE_QT5_CONF(<qt_conf_dir> <qt_conf_contents>)
#
# Writes a qt.conf file with the <qt_conf_contents> into <qt_conf_dir>.
#
# ::
#
# RESOLVE_QT5_PATHS(<paths_var> [<executable_path>])
#
# Loop through <paths_var> list and if any don't exist resolve them
# relative to the <executable_path> (if supplied) or the
# CMAKE_INSTALL_PREFIX.
#
# ::
#
# FIXUP_QT5_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>])
#
# Copies Qt plugins, writes a Qt configuration file (if needed) and
# fixes up a Qt5 executable using BundleUtilities so it is standalone
# and can be drag-and-drop copied to another machine as long as all of
# the system libraries are compatible.
#
# <executable> should point to the executable to be fixed-up.
#
# <qtplugins> should contain a list of the names or paths of any Qt
# plugins to be installed.
#
# <libs> will be passed to BundleUtilities and should be a list of any
# already installed plugins, libraries or executables to also be
# fixed-up.
#
# <dirs> will be passed to BundleUtilities and should contain and
# directories to be searched to find library dependencies.
#
# <plugins_dir> allows an custom plugins directory to be used.
#
# <request_qt_conf> will force a qt.conf file to be written even if not
# needed.
#
# ::
#
# INSTALL_QT5_PLUGIN_PATH(plugin executable copy installed_plugin_path_var <plugins_dir> <component> <configurations>)
#
# Install (or copy) a resolved <plugin> to the default plugins directory
# (or <plugins_dir>) relative to <executable> and store the result in
# <installed_plugin_path_var>.
#
# If <copy> is set to TRUE then the plugins will be copied rather than
# installed. This is to allow this module to be used at CMake time
# rather than install time.
#
# If <component> is set then anything installed will use this COMPONENT.
#
# ::
#
# INSTALL_QT5_PLUGIN(plugin executable copy installed_plugin_path_var <plugins_dir> <component>)
#
# Install (or copy) an unresolved <plugin> to the default plugins
# directory (or <plugins_dir>) relative to <executable> and store the
# result in <installed_plugin_path_var>. See documentation of
# INSTALL_QT5_PLUGIN_PATH.
#
# ::
#
# INSTALL_QT5_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>])
#
# Installs Qt plugins, writes a Qt configuration file (if needed) and
# fixes up a Qt5 executable using BundleUtilities so it is standalone
# and can be drag-and-drop copied to another machine as long as all of
# the system libraries are compatible. The executable will be fixed-up
# at install time. <component> is the COMPONENT used for bundle fixup
# and plugin installation. See documentation of FIXUP_QT5_BUNDLE.
#=============================================================================
# Copyright 2011 Mike McQuaid <mike@mikemcquaid.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# The functions defined in this file depend on the fixup_bundle function
# (and others) found in BundleUtilities.cmake
include(BundleUtilities)
set(DeployQt5_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
set(DeployQt5_apple_plugins_dir "PlugIns")
function(write_qt5_conf qt_conf_dir qt_conf_contents)
set(qt_conf_path "${qt_conf_dir}/qt.conf")
message(STATUS "Writing ${qt_conf_path}")
file(WRITE "${qt_conf_path}" "${qt_conf_contents}")
endfunction()
function(resolve_qt5_paths paths_var)
set(executable_path ${ARGV1})
set(paths_resolved)
foreach(path ${${paths_var}})
if(EXISTS "${path}")
list(APPEND paths_resolved "${path}")
else()
if(${executable_path})
list(APPEND paths_resolved "${executable_path}/${path}")
else()
list(APPEND paths_resolved "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${path}")
endif()
endif()
endforeach()
set(${paths_var} ${paths_resolved} PARENT_SCOPE)
endfunction()
function(fixup_qt5_executable executable)
set(qtplugins ${ARGV1})
set(libs ${ARGV2})
set(dirs ${ARGV3})
set(plugins_dir ${ARGV4})
set(request_qt_conf ${ARGV5})
message(STATUS "fixup_qt5_executable")
message(STATUS " executable='${executable}'")
message(STATUS " qtplugins='${qtplugins}'")
message(STATUS " libs='${libs}'")
message(STATUS " dirs='${dirs}'")
message(STATUS " plugins_dir='${plugins_dir}'")
message(STATUS " request_qt_conf='${request_qt_conf}'")
if(QT_LIBRARY_DIR)
list(APPEND dirs "${QT_LIBRARY_DIR}")
endif()
if(QT_BINARY_DIR)
list(APPEND dirs "${QT_BINARY_DIR}")
endif()
if(APPLE)
set(qt_conf_dir "${executable}/Contents/Resources")
set(executable_path "${executable}")
set(write_qt_conf TRUE)
if(NOT plugins_dir)
set(plugins_dir "${DeployQt5_apple_plugins_dir}")
endif()
else()
get_filename_component(executable_path "${executable}" PATH)
if(NOT executable_path)
set(executable_path ".")
endif()
set(qt_conf_dir "${executable_path}")
set(write_qt_conf ${request_qt_conf})
endif()
foreach(plugin ${qtplugins})
set(installed_plugin_path "")
install_qt5_plugin("${plugin}" "${executable}" 1 installed_plugin_path)
list(APPEND libs ${installed_plugin_path})
endforeach()
foreach(lib ${libs})
if(NOT EXISTS "${lib}")
message(FATAL_ERROR "Library does not exist: ${lib}")
endif()
endforeach()
resolve_qt5_paths(libs "${executable_path}")
if(write_qt_conf)
set(qt_conf_contents "[Paths]\nPlugins = ${plugins_dir}")
write_qt5_conf("${qt_conf_dir}" "${qt_conf_contents}")
endif()
fixup_bundle("${executable}" "${libs}" "${dirs}")
endfunction()
function(install_qt5_plugin_path plugin executable copy installed_plugin_path_var)
set(plugins_dir ${ARGV4})
set(component ${ARGV5})
set(configurations ${ARGV6})
if(EXISTS "${plugin}")
if(APPLE)
if(NOT plugins_dir)
set(plugins_dir "${DeployQt5_apple_plugins_dir}")
endif()
set(plugins_path "${executable}/Contents/${plugins_dir}")
else()
get_filename_component(plugins_path "${executable}" PATH)
if(NOT plugins_path)
set(plugins_path ".")
endif()
if(plugins_dir)
set(plugins_path "${plugins_path}/${plugins_dir}")
endif()
endif()
set(plugin_group "")
get_filename_component(plugin_path "${plugin}" PATH)
get_filename_component(plugin_parent_path "${plugin_path}" PATH)
get_filename_component(plugin_parent_dir_name "${plugin_parent_path}" NAME)
get_filename_component(plugin_name "${plugin}" NAME)
string(TOLOWER "${plugin_parent_dir_name}" plugin_parent_dir_name)
if("${plugin_parent_dir_name}" STREQUAL "plugins")
get_filename_component(plugin_group "${plugin_path}" NAME)
set(${plugin_group_var} "${plugin_group}")
endif()
set(plugins_path "${plugins_path}/${plugin_group}")
if(${copy})
file(MAKE_DIRECTORY "${plugins_path}")
file(COPY "${plugin}" DESTINATION "${plugins_path}")
else()
if(configurations AND (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE))
set(configurations CONFIGURATIONS ${configurations})
else()
unset(configurations)
endif()
install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component})
endif()
set(${installed_plugin_path_var} "${plugins_path}/${plugin_name}" PARENT_SCOPE)
endif()
endfunction()
function(install_qt5_plugin plugin executable copy installed_plugin_path_var)
set(plugins_dir ${ARGV4})
set(component ${ARGV5})
if(EXISTS "${plugin}")
install_qt5_plugin_path("${plugin}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}")
else()
string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var)
set(plugin_release_var "${plugin_var}_RELEASE")
set(plugin_debug_var "${plugin_var}_DEBUG")
set(plugin_release "${${plugin_release_var}}")
set(plugin_debug "${${plugin_debug_var}}")
if(DEFINED "${plugin_release_var}" AND DEFINED "${plugin_debug_var}" AND NOT EXISTS "${plugin_release}" AND NOT EXISTS "${plugin_debug}")
message(WARNING "Qt plugin \"${plugin}\" not recognized or found.")
endif()
if(NOT EXISTS "${${plugin_debug_var}}")
set(plugin_debug "${plugin_release}")
endif()
if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
install_qt5_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}_release" "${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel")
install_qt5_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}_debug" "${plugins_dir}" "${component}" "Debug")
if(CMAKE_BUILD_TYPE MATCHES "^Debug$")
set(${installed_plugin_path_var} ${${installed_plugin_path_var}_debug})
else()
set(${installed_plugin_path_var} ${${installed_plugin_path_var}_release})
endif()
else()
install_qt5_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}")
endif()
endif()
set(${installed_plugin_path_var} ${${installed_plugin_path_var}} PARENT_SCOPE)
endfunction()
function(install_qt5_executable executable)
set(qtplugins ${ARGV1})
set(libs ${ARGV2})
set(dirs ${ARGV3})
set(plugins_dir ${ARGV4})
set(request_qt_conf ${ARGV5})
set(component ${ARGV6})
if(QT_LIBRARY_DIR)
list(APPEND dirs "${QT_LIBRARY_DIR}")
endif()
if(QT_BINARY_DIR)
list(APPEND dirs "${QT_BINARY_DIR}")
endif()
if(TARGET Qt5::Core)
get_property(_locCore TARGET Qt5::Core PROPERTY LOCATION_RELEASE)
get_filename_component(_loc ${_locCore} DIRECTORY)
message(STATUS "Adding Qt 5 directory: ${_loc}")
list(APPEND dirs "${_loc}")
else()
message(FATAL_ERROR "No Qt5::Core target found, ensure it is available")
endif()
if(component)
set(component COMPONENT ${component})
else()
unset(component)
endif()
get_filename_component(executable_absolute "${executable}" ABSOLUTE)
if(EXISTS "${QT_QTCORE_LIBRARY_RELEASE}")
gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_RELEASE}" qtcore_type)
elseif(EXISTS "${QT_QTCORE_LIBRARY_DEBUG}")
gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_DEBUG}" qtcore_type)
endif()
if(qtcore_type STREQUAL "system")
set(qt_plugins_dir "")
endif()
if(QT_IS_STATIC)
message(WARNING "Qt built statically: not installing plugins.")
else()
if(APPLE)
get_property(loc TARGET Qt5::QCocoaIntegrationPlugin
PROPERTY LOCATION_RELEASE)
install_qt5_plugin("${loc}" "${executable}" 0 installed_plugin_paths
"PlugIns" "${component}")
list(APPEND libs ${installed_plugin_paths})
elseif(WIN32)
get_property(loc TARGET Qt5::QWindowsIntegrationPlugin
PROPERTY LOCATION_RELEASE)
install_qt5_plugin("${loc}" "${executable}" 0 installed_plugin_paths
"" "${component}")
list(APPEND libs ${installed_plugin_paths})
endif()
foreach(plugin ${qtplugins})
set(installed_plugin_paths "")
install_qt5_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}")
list(APPEND libs ${installed_plugin_paths})
endforeach()
endif()
resolve_qt5_paths(libs "")
install(CODE
"include(\"${DeployQt5_cmake_dir}/DeployQt5.cmake\")
set(BU_CHMOD_BUNDLE_ITEMS TRUE)
fixup_qt5_executable(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")"
${component}
)
endfunction()

View File

@@ -30,9 +30,9 @@ IF(QT4_FOUND)
NAMES ${QTSINGLEAPPLICATION_NAMES}
PATHS ${QT_LIBRARY_DIR}
)
ELSEIF(Qt5Core_FOUND)
ELSEIF(Qt5Widgets_FOUND)
message(STATUS "Looking for Qt5 single application library")
FOREACH(TOP_INCLUDE_PATH in ${Qt5Core_INCLUDE_DIRS} ${FRAMEWORK_INCLUDE_DIR})
FOREACH(TOP_INCLUDE_PATH in ${Qt5Widgets_INCLUDE_DIRS} ${FRAMEWORK_INCLUDE_DIR})
FIND_PATH(QTSINGLEAPPLICATION_INCLUDE_DIR QtSingleApplication ${TOP_INCLUDE_PATH}/QtSolutions)
IF(QTSINGLEAPPLICATION_INCLUDE_DIR)
@@ -43,12 +43,12 @@ ELSEIF(Qt5Core_FOUND)
SET(QTSINGLEAPPLICATION_NAMES ${QTSINGLEAPPLICATION_NAMES}
Qt5Solutions_SingleApplication-2.6 libQt5Solutions_SingleApplication-2.6
QtSolutions_SingleApplication-2.6 libQtSolutions_SingleApplication-2.6)
GET_TARGET_PROPERTY(_QT5_CORELIBRARY Qt5::Core LOCATION)
GET_FILENAME_COMPONENT(_QT5_CORELIBRARYPATH ${_QT5_CORELIBRARY} PATH)
GET_TARGET_PROPERTY(QT5_WIDGETSLIBRARY Qt5::Widgets LOCATION)
GET_FILENAME_COMPONENT(QT5_WIDGETSLIBRARYPATH ${QT5_WIDGETSLIBRARY} PATH)
FIND_LIBRARY(QTSINGLEAPPLICATION_LIBRARY
NAMES ${QTSINGLEAPPLICATION_NAMES}
PATHS ${_QT5_CORELIBRARYPATH}
PATHS ${QT5_WIDGETSLIBRARYPATH}
)
ENDIF()

View File

@@ -22,7 +22,7 @@ macro(qbt_set_compiler_options)
# "-Weffc++"
"-Werror -Wno-error=cpp"
# we should modify code to make these ones obsolete
"-Wno-error=sign-conversion -Wno-error=float-equal"
"-Wno-error=old-style-cast -Wno-error=sign-conversion -Wno-error=float-equal"
)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)

View File

@@ -1,5 +1,6 @@
# a helper function which appends source to the main qBt target
# sources file names are relative to the the ${qBittorrent_SOURCE_DIR}
# the target name is read from QBT_TARGET_NAME variable
# sources file names are relative to the the ${qbt_executable_SOURCE_DIR}
function (qbt_target_sources)
set (_sources_rel "")
@@ -12,5 +13,5 @@ function (qbt_target_sources)
file (RELATIVE_PATH _source_rel "${qbt_executable_SOURCE_DIR}" "${_source_abs}")
list (APPEND _sources_rel "${_source_rel}")
endforeach()
target_sources (qBittorrent PRIVATE "${_sources_rel}")
target_sources (${QBT_TARGET_NAME} PRIVATE "${_sources_rel}")
endfunction (qbt_target_sources)

View File

@@ -1,21 +0,0 @@
set(BU_CHMOD_BUNDLE_ITEMS ON)
include(DeployQt5)
set(plugins "")
get_property(svgIconPluginLocation TARGET Qt5::QSvgIconPlugin
PROPERTY LOCATION_RELEASE)
list(APPEND plugins "${svgIconPluginLocation}")
get_property(svgPluginLocation TARGET Qt5::QSvgPlugin
PROPERTY LOCATION_RELEASE)
list(APPEND plugins "${svgPluginLocation}")
set(sfx "")
if(APPLE)
set(sfx ".app")
elseif(WIN32)
set(sfx "${CMAKE_EXECUTABLE_SUFFIX}")
endif()
get_target_property(exe qBittorrent OUTPUT_NAME)
install_qt5_executable("${exe}${sfx}" "${plugins}" "" "" "")

View File

@@ -24,7 +24,6 @@ add_definitions(-DUNICODE
-D_WIN32_IE=0x0501
-D_CRT_SECURE_NO_DEPRECATE
-D_SCL_SECURE_NO_DEPRECATE
-DNOMINMAX
)
# and boost
set(Boost_USE_STATIC_LIBS True)

View File

@@ -1,61 +0,0 @@
# Adapt these paths
# Point these to the include folders
INCLUDEPATH += $$quote(C:/qBittorrent/boost)
INCLUDEPATH += $$quote(C:/qBittorrent/libtorrent/include)
INCLUDEPATH += $$quote(C:/qBittorrent/zlib/include)
INCLUDEPATH += $$quote(C:/qBittorrent/openssl/include)
# Point these to the lib folders
LIBS += $$quote(-LC:/qBittorrent/boost/stage/lib)
LIBS += $$quote(-LC:/qBittorrent/libtorrent/lib)
LIBS += $$quote(-LC:/qBittorrent/zlib/lib)
LIBS += $$quote(-LC:/qBittorrent/openssl/lib)
# Adapt the lib names/versions accordingly
# If you want to use Boost auto-linking then disable
# BOOST_ALL_NO_LIB below and omit Boost libraries here
CONFIG(debug, debug|release) {
LIBS += libtorrentd.lib \
libboost_system-vc140-mt-sgd-1_64.lib
}
else {
LIBS += libtorrent.lib \
libboost_system-vc140-mt-s-1_64.lib
}
LIBS += libeay32.lib ssleay32.lib
LIBS += zlib.lib
# ...or if you use MinGW
#CONFIG(debug, debug|release) {
# LIBS += libtorrent-rasterbar \
# libboost_system-mt
#}
#else {
# LIBS += libtorrent-rasterbar \
# libboost_system-mt
#}
#LIBS += libcrypto libssl
#LIBS += libz
DEFINES += NTDDI_VERSION=0x05010000
DEFINES += _WIN32_WINNT=0x0501
DEFINES += _WIN32_IE=0x0501
# Disable to use Boost auto-linking
DEFINES += BOOST_ALL_NO_LIB
# Use one of the following options
DEFINES += BOOST_SYSTEM_STATIC_LINK
#DEFINES += BOOST_SYSTEM_DYN_LINK
# Boost 1.60+ defaults to Vista+ support. The define below enables XP support again.
DEFINES += BOOST_USE_WINAPI_VERSION=0x0501
# Enable if building against libtorrent 1.0.x (RC_1_0) (static linking)
#DEFINES += BOOST_ASIO_SEPARATE_COMPILATION
# Enable if building against libtorrent 1.0.x (RC_1_0) (dynamic linking)
#DEFINES += BOOST_ASIO_DYN_LINK
# Enable if building against libtorrent 1.1.x (RC_1_1)
# built with this flag defined
#DEFINES += TORRENT_NO_DEPRECATE
# Enable if linking dynamically against libtorrent
#DEFINES += TORRENT_LINKING_SHARED
# Enable stack trace support
CONFIG += strace_win

666
configure vendored
View File

@@ -603,11 +603,11 @@ zlib_LIBS
zlib_CFLAGS
libtorrent_LIBS
libtorrent_CFLAGS
qjson_LIBS
qjson_CFLAGS
BOOST_SYSTEM_LIB
BOOST_LDFLAGS
BOOST_CPPFLAGS
Qt5Svg_LIBS
Qt5Svg_CFLAGS
QT_QMAKE
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
@@ -715,7 +715,9 @@ ac_user_opts='
enable_option_checking
enable_dependency_tracking
enable_silent_rules
with_qt4
with_qtsingleapplication
with_qjson
enable_debug
enable_gui
enable_systemd
@@ -740,8 +742,8 @@ PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
QT_QMAKE
Qt5Svg_CFLAGS
Qt5Svg_LIBS
qjson_CFLAGS
qjson_LIBS
libtorrent_CFLAGS
libtorrent_LIBS
zlib_CFLAGS
@@ -1391,9 +1393,13 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-qt4 Compile using Qt4 (default=no)
--with-qtsingleapplication=[system|shipped]
Use the shipped qtsingleapplication library or the
system one (default=shipped)
--with-qjson=[system|shipped]
Use the shipped qjson library or the system one
(default=shipped) (Qt4 only)
--with-boost[=ARG] use Boost library from a standard location
(ARG=yes), from the specified location (ARG=<path>),
or disable it (ARG=no) [ARG=yes]
@@ -1423,10 +1429,10 @@ Some influential environment variables:
directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path
QT_QMAKE value of host_bins for Qt5Core >= 5.5.1, overriding pkg-config
Qt5Svg_CFLAGS
C compiler flags for Qt5Svg, overriding pkg-config
Qt5Svg_LIBS linker flags for Qt5Svg, overriding pkg-config
QT_QMAKE value of host_bins for Qt5Core >= 5.2.0, overriding pkg-config
qjson_CFLAGS
C compiler flags for qjson, overriding pkg-config
qjson_LIBS linker flags for qjson, overriding pkg-config
libtorrent_CFLAGS
C compiler flags for libtorrent, overriding pkg-config
libtorrent_LIBS
@@ -4173,6 +4179,15 @@ fi
# Define --wth-* and --enable-* arguments
# Check whether --with-qt4 was given.
if test "${with_qt4+set}" = set; then :
withval=$with_qt4;
else
with_qt4=no
fi
# Check whether --with-qtsingleapplication was given.
if test "${with_qtsingleapplication+set}" = set; then :
withval=$with_qtsingleapplication;
@@ -4181,6 +4196,15 @@ else
fi
# Check whether --with-qjson was given.
if test "${with_qjson+set}" = set; then :
withval=$with_qjson;
else
with_qjson=shipped
fi
# Check whether --enable-debug was given.
if test "${enable_debug+set}" = set; then :
enableval=$enable_debug;
@@ -4442,9 +4466,15 @@ $as_echo "$enable_webui" >&6; }
as_fn_error $? "Unknown option \"$enable_webui\". Use either \"yes\" or \"no\"." "$LINENO" 5 ;;
esac
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.5.1\""; } >&5
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.5.1") 2>&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Qt4 should be enabled" >&5
$as_echo_n "checking whether Qt4 should be enabled... " >&6; }
case "x$with_qt4" in #(
"xno") :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.2.0\""; } >&5
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.2.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
@@ -4453,12 +4483,12 @@ if test -n "$QT_QMAKE"; then
pkg_cv_QT_QMAKE="$QT_QMAKE"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.5.1\""; } >&5
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.5.1") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5.2.0\""; } >&5
($PKG_CONFIG --exists --print-errors "Qt5Core >= 5.2.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_QT_QMAKE=`$PKG_CONFIG --variable="host_bins" "Qt5Core >= 5.5.1" 2>/dev/null`
pkg_cv_QT_QMAKE=`$PKG_CONFIG --variable="host_bins" "Qt5Core >= 5.2.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -4485,8 +4515,8 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt5 qmake >= 5.5.1" >&5
$as_echo_n "checking for Qt5 qmake >= 5.5.1... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt5 qmake >= 5.2.0" >&5
$as_echo_n "checking for Qt5 qmake >= 5.2.0... " >&6; }
if test "x$QT_QMAKE" != "x"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $QT_QMAKE" >&5
$as_echo "$QT_QMAKE" >&6; }
@@ -4495,116 +4525,110 @@ else
$as_echo "not found" >&6; }
fi
;; #(
"xyes") :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtCore >= 4.8.0\""; } >&5
($PKG_CONFIG --exists --print-errors "QtCore >= 4.8.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
if test -n "$QT_QMAKE"; then
pkg_cv_QT_QMAKE="$QT_QMAKE"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtCore >= 4.8.0\""; } >&5
($PKG_CONFIG --exists --print-errors "QtCore >= 4.8.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_QT_QMAKE=`$PKG_CONFIG --variable="moc_location" "QtCore >= 4.8.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
QT_QMAKE=$pkg_cv_QT_QMAKE
if test "x$QT_QMAKE" = x""; then :
else
QT_QMAKE=`$as_dirname -- "$QT_QMAKE" ||
$as_expr X"$QT_QMAKE" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$QT_QMAKE" : 'X\(//\)[^/]' \| \
X"$QT_QMAKE" : 'X\(//\)$' \| \
X"$QT_QMAKE" : 'X\(/\)' \| . 2>/dev/null ||
$as_echo X"$QT_QMAKE" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
fi
fi
if test -f "$QT_QMAKE/qmake"; then :
QT_QMAKE="$QT_QMAKE/qmake"
else
if test -f "$QT_QMAKE/qmake-qt4"; then :
QT_QMAKE="$QT_QMAKE/qmake-qt4"
else
QT_QMAKE=""
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt4 qmake >= 4.8.0" >&5
$as_echo_n "checking for Qt4 qmake >= 4.8.0... " >&6; }
if test "x$QT_QMAKE" != "x"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $QT_QMAKE" >&5
$as_echo "$QT_QMAKE" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
fi
;; #(
*) :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_qt4" >&5
$as_echo "$with_qt4" >&6; }
as_fn_error $? "Unknown option \"$with_qt4\". Use either \"yes\" or \"no\"." "$LINENO" 5 ;;
esac
if test "x$QT_QMAKE" = "x"; then :
as_fn_error $? "Could not find qmake" "$LINENO" 5
fi
if test "x$enable_gui" = "xyes"; then :
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt5Svg" >&5
$as_echo_n "checking for Qt5Svg... " >&6; }
if test -n "$Qt5Svg_CFLAGS"; then
pkg_cv_Qt5Svg_CFLAGS="$Qt5Svg_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.5.1\""; } >&5
($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.5.1") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_Qt5Svg_CFLAGS=`$PKG_CONFIG --cflags "Qt5Svg >= 5.5.1" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$Qt5Svg_LIBS"; then
pkg_cv_Qt5Svg_LIBS="$Qt5Svg_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.5.1\""; } >&5
($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.5.1") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_Qt5Svg_LIBS=`$PKG_CONFIG --libs "Qt5Svg >= 5.5.1" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Qt5Svg >= 5.5.1" 2>&1`
else
Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Qt5Svg >= 5.5.1" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$Qt5Svg_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (Qt5Svg >= 5.5.1) were not met:
$Qt5Svg_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables Qt5Svg_CFLAGS
and Qt5Svg_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables Qt5Svg_CFLAGS
and Qt5Svg_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else
Qt5Svg_CFLAGS=$pkg_cv_Qt5Svg_CFLAGS
Qt5Svg_LIBS=$pkg_cv_Qt5Svg_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether QtDBus should be enabled" >&5
$as_echo_n "checking whether QtDBus should be enabled... " >&6; }
case "x$enable_qt_dbus" in #(
"xyes") :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt5DBus >= 5.5.1" >&5
$as_echo_n "checking for Qt5DBus >= 5.5.1... " >&6; }
if test "x$with_qt4" = "xno"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt5DBus >= 5.2.0" >&5
$as_echo_n "checking for Qt5DBus >= 5.2.0... " >&6; }
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5DBus >= 5.5.1\""; } >&5
($PKG_CONFIG --exists --print-errors "Qt5DBus >= 5.5.1") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5DBus >= 5.2.0\""; } >&5
($PKG_CONFIG --exists --print-errors "Qt5DBus >= 5.2.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
@@ -4615,6 +4639,26 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
HAVE_QTDBUS=false
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for QtDBus >= 4.8.0" >&5
$as_echo_n "checking for QtDBus >= 4.8.0... " >&6; }
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtDBus >= 4.8.0\""; } >&5
($PKG_CONFIG --exists --print-errors "QtDBus >= 4.8.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
$as_echo "found" >&6; }
HAVE_QTDBUS=true
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
HAVE_QTDBUS=false
fi
fi
if test "x$HAVE_QTDBUS" = "xfalse"; then :
@@ -4640,14 +4684,15 @@ esac
# Check whether --with-boost was given.
if test "${with_boost+set}" = set; then :
withval=$with_boost;
case $withval in #(
no) :
want_boost="no";_AX_BOOST_BASE_boost_path="" ;; #(
yes) :
want_boost="yes";_AX_BOOST_BASE_boost_path="" ;; #(
*) :
want_boost="yes";_AX_BOOST_BASE_boost_path="$withval" ;;
esac
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
else
want_boost="yes"
@@ -4659,122 +4704,78 @@ fi
# Check whether --with-boost-libdir was given.
if test "${with_boost_libdir+set}" = set; then :
withval=$with_boost_libdir;
if test -d "$withval"; then :
_AX_BOOST_BASE_boost_lib_path="$withval"
else
as_fn_error $? "--with-boost-libdir expected directory name" "$LINENO" 5
fi
if test -d "$withval"
then
ac_boost_lib_path="$withval"
else
as_fn_error $? "--with-boost-libdir expected directory name" "$LINENO" 5
fi
else
_AX_BOOST_BASE_boost_lib_path=""
ac_boost_lib_path=""
fi
BOOST_LDFLAGS=""
BOOST_CPPFLAGS=""
if test "x$want_boost" = "xyes"; then :
if test "x1.35" = "x"; then :
_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"
else
_AX_BOOST_BASE_TONUMERICVERSION_req="1.35"
fi
_AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([0-9]*\.[0-9]*\)'`
_AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([0-9]*\)'`
if test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"; then :
as_fn_error $? "You should at least specify libboost major version" "$LINENO" 5
fi
_AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[0-9]*\.\([0-9]*\)'`
if test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"; then :
_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"
fi
_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
if test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"; then :
_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"
fi
_AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor`
WANT_BOOST_VERSION=$_AX_BOOST_BASE_TONUMERICVERSION_RET
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=1.35
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([0-9]*\.[0-9]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([0-9]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[0-9]*\.\([0-9]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= $boost_lib_version_req" >&5
$as_echo_n "checking for boostlib >= $boost_lib_version_req... " >&6; }
succeeded=no
libsubdirs="lib"
ax_arch=`uname -m`
case $ax_arch in
x86_64)
libsubdirs="lib64 libx32 lib lib64"
;;
ppc64|s390x|sparc64|aarch64|ppc64le)
libsubdirs="lib64 lib lib64 ppc64le"
;;
esac
case ${host_cpu} in #(
x86_64) :
libsubdirs="lib64 libx32 lib lib64" ;; #(
ppc64|s390x|sparc64|aarch64|ppc64le) :
libsubdirs="lib64 lib lib64" ;; #(
libsubdirs="lib") :
;; #(
*) :
;;
esac
libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
case ${host_cpu} in #(
i?86) :
multiarch_libsubdir="lib/i386-${host_os}" ;; #(
*) :
multiarch_libsubdir="lib/${host_cpu}-${host_os}"
;;
esac
case ${host_cpu} in
i?86)
libsubdirs="lib/i386-${host_os} $libsubdirs"
;;
esac
if test "x$_AX_BOOST_BASE_boost_path" != "x"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.35 ($WANT_BOOST_VERSION) includes in \"$_AX_BOOST_BASE_boost_path/include\"" >&5
$as_echo_n "checking for boostlib >= 1.35 ($WANT_BOOST_VERSION) includes in \"$_AX_BOOST_BASE_boost_path/include\"... " >&6; }
if test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include"
for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.35 ($WANT_BOOST_VERSION) lib path in \"$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp\"" >&5
$as_echo_n "checking for boostlib >= 1.35 ($WANT_BOOST_VERSION) lib path in \"$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp\"... " >&6; }
if test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp";
break;
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
done
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
else
if test X"$cross_compiling" = Xyes; then
search_libsubdirs=$multiarch_libsubdir
else
search_libsubdirs="$multiarch_libsubdir $libsubdirs"
fi
for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then
for libsubdir in $search_libsubdirs ; do
if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
if test "$ac_boost_path" != ""; then
BOOST_CPPFLAGS="-I$ac_boost_path/include"
for ac_boost_path_tmp in $libsubdirs; do
if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then
BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp"
break
fi
done
elif test "$cross_compiling" != yes; then
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
for libsubdir in $libsubdirs ; do
if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir"
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
fi
if test "$ac_boost_lib_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_lib_path"
fi
if test "x$_AX_BOOST_BASE_boost_lib_path" != "x"; then :
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.35 ($WANT_BOOST_VERSION)" >&5
$as_echo_n "checking for boostlib >= 1.35 ($WANT_BOOST_VERSION)... " >&6; }
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
@@ -4793,13 +4794,17 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <boost/version.hpp>
#include <boost/version.hpp>
int
main ()
{
(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($WANT_BOOST_VERSION))]));
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
;
return 0;
@@ -4823,47 +4828,39 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test "x$succeeded" != "xyes" ; then
if test "x$succeeded" != "xyes"; then
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
BOOST_CPPFLAGS=
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
BOOST_LDFLAGS=
fi
BOOST_LDFLAGS=
_version=0
if test -n "$_AX_BOOST_BASE_boost_path" ; then
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
if test "$ac_boost_path" != ""; then
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "x$V_CHECK" = "x1" ; then
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE"
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
if test -z "$BOOST_CPPFLAGS"; then
if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
if test -d "$ac_boost_path/boost" && test -r "$ac_boost_path/boost"; then
BOOST_CPPFLAGS="-I$ac_boost_path"
fi
fi
if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then
for libsubdir in $libsubdirs ; do
if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir"
fi
fi
else
if test "x$cross_compiling" != "xyes" ; then
for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local ; do
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then
for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
if test "$cross_compiling" != yes; then
for ac_boost_path in /usr /usr/local /opt /opt/local ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "x$V_CHECK" = "x1" ; then
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$_AX_BOOST_BASE_boost_path
best_path=$ac_boost_path
fi
done
fi
@@ -4871,7 +4868,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
if test "$ac_boost_lib_path" = ""; then
for libsubdir in $libsubdirs ; do
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
@@ -4879,7 +4876,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
fi
fi
if test -n "$BOOST_ROOT" ; then
if test "x$BOOST_ROOT" != "x"; then
for libsubdir in $libsubdirs ; do
if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
@@ -4888,7 +4885,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([0-9]*\.[0-9]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: We will use a staged boost library from $BOOST_ROOT" >&5
$as_echo "$as_me: We will use a staged boost library from $BOOST_ROOT" >&6;}
BOOST_CPPFLAGS="-I$BOOST_ROOT"
@@ -4912,13 +4909,17 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <boost/version.hpp>
#include <boost/version.hpp>
int
main ()
{
(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($WANT_BOOST_VERSION))]));
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
;
return 0;
@@ -4941,37 +4942,41 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
fi
if test "x$succeeded" != "xyes" ; then
if test "x$_version" = "x0" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version 1.35 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&5
$as_echo "$as_me: We could not detect the boost libraries (version 1.35 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&6;}
if test "$succeeded" != "yes" ; then
if test "$_version" = "0" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&5
$as_echo "$as_me: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&6;}
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: Your boost libraries seems to old (version $_version)." >&5
$as_echo "$as_me: Your boost libraries seems to old (version $_version)." >&6;}
fi
# execute ACTION-IF-NOT-FOUND (if present):
as_fn_error $? "Could not find Boost" "$LINENO" 5
:
else
$as_echo "#define HAVE_BOOST /**/" >>confdefs.h
# execute ACTION-IF-FOUND (if present):
{ $as_echo "$as_me:${as_lineno-$LINENO}: Boost CPPFLAGS: \"$BOOST_CPPFLAGS\"
Boost LDFLAGS: \"$BOOST_LDFLAGS\"" >&5
$as_echo "$as_me: Boost CPPFLAGS: \"$BOOST_CPPFLAGS\"
Boost LDFLAGS: \"$BOOST_LDFLAGS\"" >&6;}
:
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
# HAVE_BOOST is set to an empty value when Boost is found. I don't know
# how to test for a set vs unset variable.
if test "x$BOOST_CPPFLAGS" = "x"; then :
as_fn_error $? "Could not find Boost" "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: Boost CPPFLAGS: $BOOST_CPPFLAGS" >&5
$as_echo "$as_me: Boost CPPFLAGS: $BOOST_CPPFLAGS" >&6;}
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
fi
@@ -5215,9 +5220,15 @@ fi
LDFLAGS="$LDFLAGS_SAVED"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: Boost.System LIB: \"$BOOST_SYSTEM_LIB\"" >&5
$as_echo "$as_me: Boost.System LIB: \"$BOOST_SYSTEM_LIB\"" >&6;}
LIBS="$BOOST_SYSTEM_LIB $LIBS"
# HAVE_BOOST_SYSTEM is set to an empty value when Boost.System is found.
# I don't know how to test for a set vs unset variable.
if test "x$BOOST_SYSTEM_LIB" = "x"; then :
as_fn_error $? "Could not find Boost.System" "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: Boost.System LIB: $BOOST_SYSTEM_LIB" >&5
$as_echo "$as_me: Boost.System LIB: $BOOST_SYSTEM_LIB" >&6;}
LIBS="$BOOST_SYSTEM_LIB $LIBS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which qtsingleapplication to use" >&5
$as_echo_n "checking which qtsingleapplication to use... " >&6; }
@@ -5236,6 +5247,118 @@ $as_echo "$with_qtsingleapplication" >&6; }
as_fn_error $? "Unknown option \"$with_qtsingleapplication\". Use either \"system\" or \"shipped\"." "$LINENO" 5 ;;
esac
if test "x$with_qt4" = "xyes"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which qjson to use" >&5
$as_echo_n "checking which qjson to use... " >&6; }
case "x$with_qjson" in #(
"xshipped") :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shipped" >&5
$as_echo "shipped" >&6; }
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG usesystemqjson" ;; #(
"xsystem") :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
$as_echo "system" >&6; }
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for qjson" >&5
$as_echo_n "checking for qjson... " >&6; }
if test -n "$qjson_CFLAGS"; then
pkg_cv_qjson_CFLAGS="$qjson_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QJson >= 0.8.1\""; } >&5
($PKG_CONFIG --exists --print-errors "QJson >= 0.8.1") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_qjson_CFLAGS=`$PKG_CONFIG --cflags "QJson >= 0.8.1" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$qjson_LIBS"; then
pkg_cv_qjson_LIBS="$qjson_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QJson >= 0.8.1\""; } >&5
($PKG_CONFIG --exists --print-errors "QJson >= 0.8.1") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_qjson_LIBS=`$PKG_CONFIG --libs "QJson >= 0.8.1" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
qjson_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "QJson >= 0.8.1" 2>&1`
else
qjson_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "QJson >= 0.8.1" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$qjson_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (QJson >= 0.8.1) were not met:
$qjson_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables qjson_CFLAGS
and qjson_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables qjson_CFLAGS
and qjson_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else
qjson_CFLAGS=$pkg_cv_qjson_CFLAGS
qjson_LIBS=$pkg_cv_qjson_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
CPPFLAGS="$qjson_CFLAGS $CPPFLAGS"
LIBS="$qjson_LIBS $LIBS"
fi
QBT_ADD_CONFIG="$QBT_ADD_CONFIG usesystemqjson" ;; #(
*) :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_qjson" >&5
$as_echo "$with_qjson" >&6; }
as_fn_error $? "Unknown option \"$with_qjson\". Use either \"system\" or \"shipped\"." "$LINENO" 5 ;;
esac
fi
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libtorrent" >&5
@@ -6839,7 +6962,7 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
if test "x$enable_systemd" = "xyes"; then :
ac_config_files="$ac_config_files dist/unix/systemd/qbittorrent-nox@.service"
ac_config_files="$ac_config_files dist/unix/systemd/qbittorrent-nox.service"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -7593,7 +7716,7 @@ do
case $ac_config_target in
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"conf.pri") CONFIG_FILES="$CONFIG_FILES conf.pri" ;;
"dist/unix/systemd/qbittorrent-nox@.service") CONFIG_FILES="$CONFIG_FILES dist/unix/systemd/qbittorrent-nox@.service" ;;
"dist/unix/systemd/qbittorrent-nox.service") CONFIG_FILES="$CONFIG_FILES dist/unix/systemd/qbittorrent-nox.service" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -8174,3 +8297,4 @@ else
as_fn_error $? "Failed running $QT_QMAKE to generate the makefile" "$LINENO" 5
fi
$as_echo

View File

@@ -12,12 +12,24 @@ AM_INIT_AUTOMAKE
# Define --wth-* and --enable-* arguments
AC_ARG_WITH(qt4,
[AS_HELP_STRING([--with-qt4],
[Compile using Qt4 (default=no)])],
[],
[with_qt4=no])
AC_ARG_WITH(qtsingleapplication,
[AS_HELP_STRING([--with-qtsingleapplication=@<:@system|shipped@:>@],
[Use the shipped qtsingleapplication library or the system one (default=shipped)])],
[],
[with_qtsingleapplication=shipped])
AC_ARG_WITH(qjson,
[AS_HELP_STRING([--with-qjson=@<:@system|shipped@:>@],
[Use the shipped qjson library or the system one (default=shipped) (Qt4 only)])],
[],
[with_qjson=shipped])
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug],
[Enable debug build])],
@@ -115,13 +127,20 @@ AS_CASE(["x$enable_webui"],
[AC_MSG_RESULT([$enable_webui])
AC_MSG_ERROR([Unknown option "$enable_webui". Use either "yes" or "no".])])
FIND_QT5()
AC_MSG_CHECKING([whether Qt4 should be enabled])
AS_CASE(["x$with_qt4"],
["xno"],
[AC_MSG_RESULT([no])
FIND_QT5()],
["xyes"],
[AC_MSG_RESULT([yes])
FIND_QT4()],
[AC_MSG_RESULT([$with_qt4])
AC_MSG_ERROR([Unknown option "$with_qt4". Use either "yes" or "no".])])
AS_IF([test "x$QT_QMAKE" = "x"],
[AC_MSG_ERROR([Could not find qmake])
])
AS_IF([test "x$enable_gui" = "xyes"],
[PKG_CHECK_MODULES(Qt5Svg, [Qt5Svg >= 5.5.1])
])
AC_MSG_CHECKING([whether QtDBus should be enabled])
AS_CASE(["x$enable_qt_dbus"],
["xyes"],
@@ -138,16 +157,22 @@ AS_CASE(["x$enable_qt_dbus"],
AC_MSG_ERROR([Unknown option "$enable_qt_dbus". Use either "yes" or "no".])])
AX_BOOST_BASE([1.35],
[AC_MSG_NOTICE([Boost CPPFLAGS: "$BOOST_CPPFLAGS"
Boost LDFLAGS: "$BOOST_LDFLAGS"])],
[AC_MSG_ERROR([Could not find Boost])])
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
AX_BOOST_BASE([1.35])
# HAVE_BOOST is set to an empty value when Boost is found. I don't know
# how to test for a set vs unset variable.
AS_IF([test "x$BOOST_CPPFLAGS" = "x"],
[AC_MSG_ERROR([Could not find Boost])],
[AC_MSG_NOTICE([Boost CPPFLAGS: $BOOST_CPPFLAGS])
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"])
AX_BOOST_SYSTEM()
AC_MSG_NOTICE([Boost.System LIB: "$BOOST_SYSTEM_LIB"])
LIBS="$BOOST_SYSTEM_LIB $LIBS"
# HAVE_BOOST_SYSTEM is set to an empty value when Boost.System is found.
# I don't know how to test for a set vs unset variable.
AS_IF([test "x$BOOST_SYSTEM_LIB" = "x"],
[AC_MSG_ERROR([Could not find Boost.System])],
[AC_MSG_NOTICE([Boost.System LIB: $BOOST_SYSTEM_LIB])
LIBS="$BOOST_SYSTEM_LIB $LIBS"])
AC_MSG_CHECKING([which qtsingleapplication to use])
AS_CASE(["x$with_qtsingleapplication"],
@@ -160,6 +185,23 @@ AS_CASE(["x$with_qtsingleapplication"],
[AC_MSG_RESULT([$with_qtsingleapplication])
AC_MSG_ERROR([Unknown option "$with_qtsingleapplication". Use either "system" or "shipped".])])
AS_IF([test "x$with_qt4" = "xyes"],
[AC_MSG_CHECKING([which qjson to use])
AS_CASE(["x$with_qjson"],
["xshipped"],
[AC_MSG_RESULT([shipped])
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG usesystemqjson"],
["xsystem"],
[AC_MSG_RESULT([system])
PKG_CHECK_MODULES(qjson,
[QJson >= 0.8.1],
[CPPFLAGS="$qjson_CFLAGS $CPPFLAGS"
LIBS="$qjson_LIBS $LIBS"])
QBT_ADD_CONFIG="$QBT_ADD_CONFIG usesystemqjson"],
[AC_MSG_RESULT([$with_qjson])
AC_MSG_ERROR([Unknown option "$with_qjson". Use either "system" or "shipped".])])
])
PKG_CHECK_MODULES(libtorrent,
[libtorrent-rasterbar >= 1.0.6],
[CPPFLAGS="$libtorrent_CFLAGS $CPPFLAGS"
@@ -218,7 +260,7 @@ AC_SUBST(QBT_REMOVE_DEFINES)
AC_OUTPUT(conf.pri)
AS_IF([test "x$enable_systemd" = "xyes"],
[AC_OUTPUT(dist/unix/systemd/qbittorrent-nox@.service)])
[AC_OUTPUT(dist/unix/systemd/qbittorrent-nox.service)])
@@ -234,3 +276,4 @@ AS_IF([test "x$ret" = "x0"],
[AC_MSG_NOTICE([Good, your configure finished.])],
[AC_MSG_ERROR([Failed running $QT_QMAKE to generate the makefile])])
AS_ECHO()

2
dist/mac/Info.plist vendored
View File

@@ -45,7 +45,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.0.1</string>
<string>3.3.13</string>
<key>CFBundleSignature</key>
<string>qBit</string>
<key>CFBundleExecutable</key>

3
dist/mac/bundle.cmake vendored Normal file
View File

@@ -0,0 +1,3 @@
set(BU_CHMOD_BUNDLE_ITEMS ON)
include(BundleUtilities)
fixup_bundle("$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/qbittorrent.app" "" "")

Binary file not shown.

Binary file not shown.

View File

@@ -2,8 +2,8 @@ if (SYSTEMD)
find_package(Systemd)
if (SYSTEMD_FOUND)
set(EXPAND_BINDIR ${CMAKE_INSTALL_FULL_BINDIR})
configure_file(systemd/qbittorrent-nox@.service.in ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service
configure_file(systemd/qbittorrent-nox.service.in ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox.service @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox.service
DESTINATION ${SYSTEMD_SERVICES_INSTALL_DIR}
COMPONENT data)
endif(SYSTEMD_FOUND)
@@ -25,6 +25,10 @@ if (GUI)
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor
FILES_MATCHING PATTERN "*.png")
install(FILES ${qBittorrent_SOURCE_DIR}/src/icons/qbittorrent.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps/
COMPONENT data)
install(FILES ${qBittorrent_SOURCE_DIR}/src/icons/qbittorrent.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/
COMPONENT data)
@@ -32,11 +36,4 @@ if (GUI)
install(FILES qbittorrent.appdata.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/appdata/
COMPONENT data)
install(FILES
${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray.svg
${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray-dark.svg
${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray-light.svg
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status
COMPONENT data)
endif()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 986 B

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 986 B

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -11,7 +11,7 @@
Aiming to be a good alternative to all other bittorrent clients out
there, qBittorrent is fast, stable and provides unicode support as well
as many other features. Additionally, qBittorrent runs and provides those
same features on all major platforms (Linux, Mac OS X, Windows, FreeBSD).
same features on all major platforms (Linux, Mac OS X, Windows, OS/2, FreeBSD).
</p>
<p>
It is programmed in C++ / Qt and uses libtorrent (sometimes called

View File

@@ -0,0 +1,11 @@
[Unit]
Description=qBittorrent Daemon Service
After=network.target
[Service]
Type=forking
User=1000
ExecStart=@EXPAND_BINDIR@/qbittorrent-nox -d
[Install]
WantedBy=multi-user.target

View File

@@ -1,14 +0,0 @@
[Unit]
Description=qBittorrenti-nox service for user %I
Documentation=man:qbittorrent-nox(1)
After=network.target
[Service]
Type=simple
PrivateTmp=false
User=%i
ExecStart=@EXPAND_BINDIR@/qbittorrent-nox
[Install]
WantedBy=multi-user.target

View File

@@ -17,13 +17,13 @@ LangString inst_firewallinfo ${LANG_ARABIC} "جاري اضافة القاعدة
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
LangString inst_warning ${LANG_ARABIC} "البرنامج يعمل. يرجى اغلاقه قبل البدء في التنصيب"
;LangString inst_uninstall_question ${LANG_ENGLISH} "A previous installation was detected. It will be uninstalled without deleting user settings."
LangString inst_uninstall_question ${LANG_ARABIC} "يوجد نسخة سابقة من البرنامج. سيتم إزالتها دون حذف إعدادات المستخدم"
LangString inst_uninstall_question ${LANG_ARABIC} "A previous installation was detected. It will be uninstalled without deleting user settings."
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
LangString inst_unist ${LANG_ARABIC} "جاري ازالة النسخة السابقة من البرنامج"
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
LangString launch_qbt ${LANG_ARABIC} "تشغيل البرنامج"
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_ARABIC} "هذا المثبت يعمل فقط في نسخ ويندوز 64 بت"
LangString inst_requires_64bit ${LANG_ARABIC} "This installer works only in 64-bit Windows versions."
;------------------------------------

View File

@@ -1,53 +1,53 @@
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_DANISH} "qBittorrent (påkrævet)"
LangString inst_qbt_req ${LANG_DANISH} "qBittorrent (required)"
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
LangString inst_dekstop ${LANG_DANISH} "Opret skrivebordsgenvej"
LangString inst_dekstop ${LANG_DANISH} "Create Desktop Shortcut"
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
LangString inst_startmenu ${LANG_DANISH} "Opret genvej i menuen Start"
LangString inst_startmenu ${LANG_DANISH} "Create Start Menu Shortcut"
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
LangString inst_torrent ${LANG_DANISH} "Åbn .torrent-filer med qBittorrent"
LangString inst_torrent ${LANG_DANISH} "Open .torrent files with qBittorrent"
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
LangString inst_magnet ${LANG_DANISH} "Åbn magnet-links med qBittorrent"
LangString inst_magnet ${LANG_DANISH} "Open magnet links with qBittorrent"
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
LangString inst_firewall ${LANG_DANISH} "Tilføj Windows Firewall-regel"
LangString inst_firewall ${LANG_DANISH} "Add Windows Firewall rule"
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
LangString inst_firewallinfo ${LANG_DANISH} "Tilføjer Windows Firewall-regel"
LangString inst_firewallinfo ${LANG_DANISH} "Adding Windows Firewall rule"
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
LangString inst_warning ${LANG_DANISH} "qBittorrent kører. Luk venligst programmet inden installation."
LangString inst_warning ${LANG_DANISH} "qBittorrent is running. Please close the application before installing."
;LangString inst_uninstall_question ${LANG_ENGLISH} "A previous installation was detected. It will be uninstalled without deleting user settings."
LangString inst_uninstall_question ${LANG_DANISH} "En tidligere installation blev registreret. Den vil blive afinstalleret uden at brugerindstillingerne slettes."
LangString inst_uninstall_question ${LANG_DANISH} "A previous installation was detected. It will be uninstalled without deleting user settings."
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
LangString inst_unist ${LANG_DANISH} "Afinstallerer tidligere version."
LangString inst_unist ${LANG_DANISH} "Uninstalling previous version."
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
LangString launch_qbt ${LANG_DANISH} "Start qBittorrent."
LangString launch_qbt ${LANG_DANISH} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_DANISH} "Dette installationsprogram virker kun i 64-bit Windows versioner."
LangString inst_requires_64bit ${LANG_DANISH} "This installer works only in 64-bit Windows versions."
;------------------------------------
;Uninstaller strings
;LangString remove_files ${LANG_ENGLISH} "Remove files"
LangString remove_files ${LANG_DANISH} "Fjern filer"
LangString remove_files ${LANG_DANISH} "Remove files"
;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts"
LangString remove_shortcuts ${LANG_DANISH} "Fjern genveje"
LangString remove_shortcuts ${LANG_DANISH} "Remove shortcuts"
;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
LangString remove_associations ${LANG_DANISH} "Fjern filtilknytninger"
LangString remove_associations ${LANG_DANISH} "Remove file associations"
;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
LangString remove_registry ${LANG_DANISH} "Fjern registreringsnøgler"
LangString remove_registry ${LANG_DANISH} "Remove registry keys"
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
LangString remove_conf ${LANG_DANISH} "Fjern konfigurationsfiler"
LangString remove_conf ${LANG_DANISH} "Remove configuration files"
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
LangString remove_firewall ${LANG_DANISH} "Fjern Windows Firewall-regel"
LangString remove_firewall ${LANG_DANISH} "Remove Windows Firewall rule"
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
LangString remove_firewallinfo ${LANG_DANISH} "Fjerner Windows Firewall-regel"
LangString remove_firewallinfo ${LANG_DANISH} "Removing Windows Firewall rule"
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
LangString remove_cache ${LANG_DANISH} "Fjern torrents og mellemlagret data"
LangString remove_cache ${LANG_DANISH} "Remove torrents and cached data"
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
LangString uninst_warning ${LANG_DANISH} "qBittorrent kører. Luk venligst programmet inden afinstallation."
LangString uninst_warning ${LANG_DANISH} "qBittorrent is running. Please close the application before uninstalling."
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
LangString uninst_tor_warn ${LANG_DANISH} "Fjerner ikke .torrent-tilknytning. Det er tilknyttet:"
LangString uninst_tor_warn ${LANG_DANISH} "Not removing .torrent association. It is associated with:"
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
LangString uninst_mag_warn ${LANG_DANISH} "Fjerner ikke magnet-tilknytning. Det er tilknyttet:"
LangString uninst_mag_warn ${LANG_DANISH} "Not removing magnet association. It is associated with:"

View File

@@ -1,53 +1,53 @@
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_GREEK} "qBittorrent (απαιτείται)"
LangString inst_qbt_req ${LANG_GREEK} "qBittorrent (required)"
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
LangString inst_dekstop ${LANG_GREEK} "Δημιουργία συντόμευσης στην Επιφάνεια Εργασίας"
LangString inst_dekstop ${LANG_GREEK} "Create Desktop Shortcut"
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
LangString inst_startmenu ${LANG_GREEK} "Δημιουργία συντόμευσης στο Μενού Έναρξης"
LangString inst_startmenu ${LANG_GREEK} "Create Start Menu Shortcut"
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
LangString inst_torrent ${LANG_GREEK} "Άνοιγμα των αρχείων .torrent με το qBittorrent"
LangString inst_torrent ${LANG_GREEK} "Open .torrent files with qBittorrent"
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
LangString inst_magnet ${LANG_GREEK} "Άνοιγμα των μαγνητικών συνδέσμων με το qBittorrent"
LangString inst_magnet ${LANG_GREEK} "Open magnet links with qBittorrent"
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
LangString inst_firewall ${LANG_GREEK} "Προσθήκη κανόνα εξαίρεσης στο Τείχος Προστασίας των Windows"
LangString inst_firewall ${LANG_GREEK} "Add Windows Firewall rule"
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
LangString inst_firewallinfo ${LANG_GREEK} "Προστίθεται κανόνας εξαίρεσης στο Τείχος Προστασίας των Windows"
LangString inst_firewallinfo ${LANG_GREEK} "Adding Windows Firewall rule"
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
LangString inst_warning ${LANG_GREEK} "Το qBittorrent βρίσκεται σε εκτέλεση. Παρακαλούμε κλείστε την εφαρμογή πριν την εγκατάσταση."
LangString inst_warning ${LANG_GREEK} "qBittorrent is running. Please close the application before installing."
;LangString inst_uninstall_question ${LANG_ENGLISH} "A previous installation was detected. It will be uninstalled without deleting user settings."
LangString inst_uninstall_question ${LANG_GREEK} "Ανιχνεύθηκε προηγούμενη εγκατάσταση. Θα απεγκατασταθεί χωρίς να διαγραφούν οι ρυθμίσεις του χρήστη."
LangString inst_uninstall_question ${LANG_GREEK} "A previous installation was detected. It will be uninstalled without deleting user settings."
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
LangString inst_unist ${LANG_GREEK} "Γίνεται απεγκατάσταση της προηγούμενης έκδοσης."
LangString inst_unist ${LANG_GREEK} "Uninstalling previous version."
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
LangString launch_qbt ${LANG_GREEK} "Εκκίνηση του qBittorrent."
LangString launch_qbt ${LANG_GREEK} "Launch qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_GREEK} "Αυτό το αρχείο εγκατάστασης λειτουργεί μόνο σε 64-bit εκδόσεις των Windows."
LangString inst_requires_64bit ${LANG_GREEK} "This installer works only in 64-bit Windows versions."
;------------------------------------
;Uninstaller strings
;LangString remove_files ${LANG_ENGLISH} "Remove files"
LangString remove_files ${LANG_GREEK} "Να διαγραφούν τα αρχεία"
LangString remove_files ${LANG_GREEK} "Remove files"
;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts"
LangString remove_shortcuts ${LANG_GREEK} "Να διαγραφούν οι συντομεύσεις"
LangString remove_shortcuts ${LANG_GREEK} "Remove shortcuts"
;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
LangString remove_associations ${LANG_GREEK} "Να καταργηθούν οι συσχετίσεις αρχείων"
LangString remove_associations ${LANG_GREEK} "Remove file associations"
;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
LangString remove_registry ${LANG_GREEK} "Να διαγραφούν τα κλειδιά μητρώου"
LangString remove_registry ${LANG_GREEK} "Remove registry keys"
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
LangString remove_conf ${LANG_GREEK} "Να διαγραφούν τα αρχεία ρυθμίσεων"
LangString remove_conf ${LANG_GREEK} "Remove configuration files"
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
LangString remove_firewall ${LANG_GREEK} "Να διαγραφεί ο κανόνας εξαίρεσης στο Τείχος Προστασίας των Windows"
LangString remove_firewall ${LANG_GREEK} "Remove Windows Firewall rule"
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
LangString remove_firewallinfo ${LANG_GREEK} "Γίνεται διαγραφή του κανόνα εξαίρεσης στο Τείχος Προστασίας των Windows"
LangString remove_firewallinfo ${LANG_GREEK} "Removing Windows Firewall rule"
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
LangString remove_cache ${LANG_GREEK} "Να διαγραφούν τα torrents και τα δεδομένα προσωρινής αποθήκευσης"
LangString remove_cache ${LANG_GREEK} "Remove torrents and cached data"
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
LangString uninst_warning ${LANG_GREEK} "Το qBittorrent βρίσκεται σε εκτέλεση. Παρακαλούμε κλείστε την εφαρμογή πριν την απεγκατάσταση."
LangString uninst_warning ${LANG_GREEK} "qBittorrent is running. Please close the application before uninstalling."
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
LangString uninst_tor_warn ${LANG_GREEK} "Δεν θα καταργηθεί η συσχέτιση με τα αρχεία .torrent. Είναι συσχετισμένα με το:"
LangString uninst_tor_warn ${LANG_GREEK} "Not removing .torrent association. It is associated with:"
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
LangString uninst_mag_warn ${LANG_GREEK} "Δεν θα καταργηθεί η συσχέτιση με τους μαγνητικούς συνδέσμους. Είναι συσχετισμένοι με το:"
LangString uninst_mag_warn ${LANG_GREEK} "Not removing magnet association. It is associated with:"

View File

@@ -7,9 +7,9 @@ LangString inst_dekstop ${LANG_RUSSIAN} "Создать ярлык на рабо
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
LangString inst_startmenu ${LANG_RUSSIAN} "Создать ярлык в меню Пуск"
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
LangString inst_torrent ${LANG_RUSSIAN} "Открывать торрент-файлы с помощью qBittorrent"
LangString inst_torrent ${LANG_RUSSIAN} "Открывать торрент файлы с помощью qBittorrent"
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
LangString inst_magnet ${LANG_RUSSIAN} "Открывать magnet-ссылки с помощью qBittorrent"
LangString inst_magnet ${LANG_RUSSIAN} "Открывать magnet ссылки с помощью qBittorrent"
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
LangString inst_firewall ${LANG_RUSSIAN} "Добавить в список исключений брандмауера"
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
@@ -23,7 +23,7 @@ LangString inst_unist ${LANG_RUSSIAN} "Деинсталлируем старую
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
LangString launch_qbt ${LANG_RUSSIAN} "Запустить qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_RUSSIAN} "Этот установщик работает только на 64-битных версиях Windows."
LangString inst_requires_64bit ${LANG_RUSSIAN} "This installer works only in 64-bit Windows versions."
;------------------------------------
@@ -44,10 +44,10 @@ LangString remove_firewall ${LANG_RUSSIAN} "Удалить из списка и
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
LangString remove_firewallinfo ${LANG_RUSSIAN} "Удаление из списка исключений брандмауера"
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
LangString remove_cache ${LANG_RUSSIAN} "Удалить сохранённые торрент-файлы"
LangString remove_cache ${LANG_RUSSIAN} "Удалить сохраненные торрент файлы"
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
LangString uninst_warning ${LANG_RUSSIAN} "qBittorrent запущен. Пожалуйста, закройте qBittorrent и перезапустите программу удаления."
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
LangString uninst_tor_warn ${LANG_RUSSIAN} "Ассоциации торрент-файлов не сброшены. Уже ассоциированы с:"
LangString uninst_tor_warn ${LANG_RUSSIAN} "Ассоциации торрент файлов не сброшены. Уже ассоциированы с:"
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
LangString uninst_mag_warn ${LANG_RUSSIAN} "Ассоциации magnet-ссылок не сброшены. Уже ассоциированы с:"
LangString uninst_mag_warn ${LANG_RUSSIAN} "Ассоциации magnet ссылок не сброшены. Уже ассоциированы с:"

View File

@@ -23,7 +23,7 @@ LangString inst_unist ${LANG_TURKISH} "Önceki sürüm kaldırılıyor."
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
LangString launch_qbt ${LANG_TURKISH} "qBittorrent'i çalıştır."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_TURKISH} "Bu yükleyici sadece 64-bit Windows sürümlerinde çalışır."
LangString inst_requires_64bit ${LANG_TURKISH} "This installer works only in 64-bit Windows versions."
;------------------------------------

Binary file not shown.

Binary file not shown.

View File

@@ -27,7 +27,7 @@ XPStyle on
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
; Program specific
!define PROG_VERSION "4.0.1"
!define PROG_VERSION "3.3.13"
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun

View File

@@ -2,4 +2,4 @@
Translations = translations
[Platforms]
WindowsArguments = dpiawareness=1
WindowsArguments = dpiawareness=0

187
install.os2 Normal file
View File

@@ -0,0 +1,187 @@
QBittorrent installation
0. CONTENTS OF THIS FILE
========================
1. INTRODUCTION
2. REQUIREMENTS
3. INSTALLATION
4. BUGREPORTS
5. CREDITS
6. SUPPORT AND DONATIONS
7. HISTORY
1. INTRODUCTION
===============
Welcome to QBittorrent port for OS/2 and eComStation.
2. REQUIREMENTS
===============
The following requirements can be installed either by rpm or by zip files.
RPM Installation:
klibc
-----
1. yum install libc
openssl 1.0
-----------
1. yum install openssl
pthread
-------
1. yum install pthread
GCC4Core
--------
1. yum install libgcc
2. yum install gcc-stack-protector
3. yum install gcc-stdc++-shared-library
4. yum install gcc-supc++-shared-library
Qt4 dll
-------
1. yum install libqt4
ZIP Installation:
klibc
-----
1. Download klibc 0.6.5 or better (see http://svn.netlabs.org/libc for more information)
2. Install the files to your libpath eg x:\ecs\dll
openssl 1.0
-----------
1. Download the zip file from http://rpm.netlabs.org/release/00/zip
2. Install the files to your libpath eg. x:\ecs\dll
pthread
-------
1. Download pthread 2012-03-13 or better from http://rpm.netlabs.org/release/00/zip
2. Install the files to your libpath eg. x:\ecs\dll
GCC4Core
--------
1. Download GCC4Core 1.2.1 or better from http://ftp.netlabs.org/pub/gcc
2. Install the files to your libpath eg. x:\ecs\dll
Qt4 dll
-------
1. Download Qt4 4.7.3 or better (see http://svn.netlabs.org/qt4 for more information)
2. Install the files according to the readme
3. INSTALLATION
===============
To install QBittorrent, do the following:
1. Create a directory for QBittorrent.
2. Extract the QBittorrent package to the new directory.
3. Create a WPS object for QBittorrent.exe.
4. Start QBittorrent
5. Happy torrenting
4. BUGREPORTS
=============
Please create bugreports at http://svn.netlabs.org/qtapps
Only bug reports with a reproducible bug are accepted. :-)
5. CREDITS
==========
The port was done by:
Silvan Scherrer aka _diver
Thanks go to:
* Dmitry A. Kuminov
They either helped me when I had some nasty questions or did some testing for
me.
6. SUPPORT AND DONATIONS
========================
QBittorrent port is based on volunteer work. If you would like to support further
development, you can do so in one of the following ways:
* Donate to the Qt4 project: see qt.netlabs.org for more information
* Contribute to the project: Besides actual development, this also includes
maintaining the documentation and the project web site as well as help
for users.
7. HISTORY
==========
2012-09-19
* updated to 3.0.4 code level of QBittorrent
* updated libtorrent to 0.16.3 level
2012-09-06
* updated to 3.0.2 code level of QBittorrent
2012-05-14
* updated to 2.9.8 code level of QBittorrent
2012-03-15
* updated to 2.9.5 code level of QBittorrent
2011-09-26
* updated to 2.8.5 code level of QBittorrent
* updated to Qt 4.7.3
2011-06-20
* updated to 2.7.3 code level of QBittorrent
* updated libtorrent to 0.15.6 level
2010-12-23
* updated to 2.5.2 code level of QBittorrent
2010-11-22
* updated to 2.4.11 code level of QBittorrent
2010-xx-xx
* initial port

View File

@@ -1,5 +1,5 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_boost_base.html
# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html
# ===========================================================================
#
# SYNOPSIS
@@ -33,15 +33,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 42
# example boost program (need to pass version)
m4_define([_AX_BOOST_BASE_PROGRAM],
[AC_LANG_PROGRAM([[
#include <boost/version.hpp>
]],[[
(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))]));
]])])
#serial 26
AC_DEFUN([AX_BOOST_BASE],
[
@@ -52,121 +44,104 @@ AC_ARG_WITH([boost],
or disable it (ARG=no)
@<:@ARG=yes@:>@ ])],
[
AS_CASE([$withval],
[no],[want_boost="no";_AX_BOOST_BASE_boost_path=""],
[yes],[want_boost="yes";_AX_BOOST_BASE_boost_path=""],
[want_boost="yes";_AX_BOOST_BASE_boost_path="$withval"])
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
],
[want_boost="yes"])
AC_ARG_WITH([boost-libdir],
[AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
[Force given directory for boost libraries.
Note that this will override library path detection,
so use this parameter only if default library detection fails
and you know exactly where your boost libraries are located.])],
[
AS_IF([test -d "$withval"],
[_AX_BOOST_BASE_boost_lib_path="$withval"],
[AC_MSG_ERROR([--with-boost-libdir expected directory name])])
],
[_AX_BOOST_BASE_boost_lib_path=""])
AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
[Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]),
[
if test -d "$withval"
then
ac_boost_lib_path="$withval"
else
AC_MSG_ERROR(--with-boost-libdir expected directory name)
fi
],
[ac_boost_lib_path=""]
)
BOOST_LDFLAGS=""
BOOST_CPPFLAGS=""
AS_IF([test "x$want_boost" = "xyes"],
[_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])])
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
])
# convert a version string in $2 to numeric and affect to polymorphic var $1
AC_DEFUN([_AX_BOOST_BASE_TONUMERICVERSION],[
AS_IF([test "x$2" = "x"],[_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"],[_AX_BOOST_BASE_TONUMERICVERSION_req="$2"])
_AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\.[[0-9]]*\)'`
_AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\)'`
AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"],
[AC_MSG_ERROR([You should at least specify libboost major version])])
_AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.\([[0-9]]*\)'`
AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"],
[_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"])
_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
AS_IF([test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"],
[_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"])
_AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor`
AS_VAR_SET($1,$_AX_BOOST_BASE_TONUMERICVERSION_RET)
])
dnl Run the detection of boost should be run only if $want_boost
AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
_AX_BOOST_BASE_TONUMERICVERSION(WANT_BOOST_VERSION,[$1])
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
succeeded=no
AC_REQUIRE([AC_CANONICAL_HOST])
dnl On 64-bit systems check for system libraries in both lib64 and lib.
dnl The former is specified by FHS, but e.g. Debian does not adhere to
dnl this (as it rises problems for generic multi-arch support).
dnl The last entry in the list is chosen by default when no libraries
dnl are found, e.g. when only header-only libraries are installed!
AS_CASE([${host_cpu}],
[x86_64],[libsubdirs="lib64 libx32 lib lib64"],
[ppc64|s390x|sparc64|aarch64|ppc64le],[libsubdirs="lib64 lib lib64"],
[libsubdirs="lib"],
)
libsubdirs="lib"
ax_arch=`uname -m`
case $ax_arch in
x86_64)
libsubdirs="lib64 libx32 lib lib64"
;;
ppc64|s390x|sparc64|aarch64|ppc64le)
libsubdirs="lib64 lib lib64 ppc64le"
;;
esac
dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
dnl them priority over the other paths since, if libs are found there, they
dnl are almost assuredly the ones desired.
AS_CASE([${host_cpu}],
[i?86],[multiarch_libsubdir="lib/i386-${host_os}"],
[multiarch_libsubdir="lib/${host_cpu}-${host_os}"]
)
AC_REQUIRE([AC_CANONICAL_HOST])
libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
case ${host_cpu} in
i?86)
libsubdirs="lib/i386-${host_os} $libsubdirs"
;;
esac
dnl first we check the system location for boost libraries
dnl this location ist chosen if boost libraries are installed with the --layout=system option
dnl or if you install boost with RPM
AS_IF([test "x$_AX_BOOST_BASE_boost_path" != "x"],[
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) includes in "$_AX_BOOST_BASE_boost_path/include"])
AS_IF([test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"],[
AC_MSG_RESULT([yes])
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include"
for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"])
AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[
AC_MSG_RESULT([yes])
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp";
break;
],
[AC_MSG_RESULT([no])])
done],[
AC_MSG_RESULT([no])])
],[
if test X"$cross_compiling" = Xyes; then
search_libsubdirs=$multiarch_libsubdir
else
search_libsubdirs="$multiarch_libsubdir $libsubdirs"
fi
for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then
for libsubdir in $search_libsubdirs ; do
if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
if test "$ac_boost_path" != ""; then
BOOST_CPPFLAGS="-I$ac_boost_path/include"
for ac_boost_path_tmp in $libsubdirs; do
if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then
BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp"
break
fi
done
elif test "$cross_compiling" != yes; then
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
for libsubdir in $libsubdirs ; do
if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir"
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
])
fi
dnl overwrite ld flags if we have required special directory with
dnl --with-boost-libdir parameter
AS_IF([test "x$_AX_BOOST_BASE_boost_lib_path" != "x"],
[BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"])
if test "$ac_boost_lib_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_lib_path"
fi
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION)])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
@@ -177,7 +152,15 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
AC_REQUIRE([AC_PROG_CXX])
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
@@ -189,50 +172,40 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes" ; then
if test "x$succeeded" != "xyes"; then
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
BOOST_CPPFLAGS=
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
BOOST_LDFLAGS=
fi
BOOST_LDFLAGS=
_version=0
if test -n "$_AX_BOOST_BASE_boost_path" ; then
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
if test "$ac_boost_path" != ""; then
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "x$V_CHECK" = "x1" ; then
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE"
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
dnl if nothing found search for layout used in Windows distributions
if test -z "$BOOST_CPPFLAGS"; then
if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
if test -d "$ac_boost_path/boost" && test -r "$ac_boost_path/boost"; then
BOOST_CPPFLAGS="-I$ac_boost_path"
fi
fi
dnl if we found something and BOOST_LDFLAGS was unset before
dnl (because "$_AX_BOOST_BASE_boost_lib_path" = ""), set it here.
if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then
for libsubdir in $libsubdirs ; do
if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir"
fi
fi
else
if test "x$cross_compiling" != "xyes" ; then
for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local ; do
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then
for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
if test "$cross_compiling" != yes; then
for ac_boost_path in /usr /usr/local /opt /opt/local ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "x$V_CHECK" = "x1" ; then
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$_AX_BOOST_BASE_boost_path
best_path=$ac_boost_path
fi
done
fi
@@ -240,7 +213,7 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
if test "$ac_boost_lib_path" = ""; then
for libsubdir in $libsubdirs ; do
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
@@ -248,7 +221,7 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
fi
fi
if test -n "$BOOST_ROOT" ; then
if test "x$BOOST_ROOT" != "x"; then
for libsubdir in $libsubdirs ; do
if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
@@ -257,7 +230,7 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
@@ -272,7 +245,15 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
@@ -281,15 +262,17 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
AC_LANG_POP([C++])
fi
if test "x$succeeded" != "xyes" ; then
if test "x$_version" = "x0" ; then
AC_MSG_NOTICE([[We could not detect the boost libraries (version $1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
if test "$succeeded" != "yes" ; then
if test "$_version" = "0" ; then
AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
else
AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
fi
# execute ACTION-IF-NOT-FOUND (if present):
ifelse([$3], , :, [$3])
else
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
# execute ACTION-IF-FOUND (if present):
ifelse([$2], , :, [$2])
@@ -297,5 +280,6 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])

View File

@@ -1,5 +1,5 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_boost_system.html
# http://www.gnu.org/software/autoconf-archive/ax_boost_system.html
# ===========================================================================
#
# SYNOPSIS
@@ -31,7 +31,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 19
#serial 18
AC_DEFUN([AX_BOOST_SYSTEM],
[

View File

@@ -1,13 +1,38 @@
# Checking for pkg-config. If found, check for QtCore and query pkg-config
# for its exec-prefix variable.
# FIND_QT4()
# Sets the QT_QMAKE variable to the path of Qt4 qmake if found.
# --------------------------------------
AC_DEFUN([FIND_QT4],
[PKG_CHECK_EXISTS([QtCore >= 4.8.0],
[PKG_CHECK_VAR(QT_QMAKE,
[QtCore >= 4.8.0],
[moc_location],
[QT_QMAKE=`AS_DIRNAME(["$QT_QMAKE"])`])
])
AS_IF([test -f "$QT_QMAKE/qmake"],
[QT_QMAKE="$QT_QMAKE/qmake"],
[AS_IF([test -f "$QT_QMAKE/qmake-qt4"],
[QT_QMAKE="$QT_QMAKE/qmake-qt4"],
[QT_QMAKE=""])
])
AC_MSG_CHECKING([for Qt4 qmake >= 4.8.0])
AS_IF([test "x$QT_QMAKE" != "x"],
[AC_MSG_RESULT([$QT_QMAKE])],
[AC_MSG_RESULT([not found])]
)
])
# FIND_QT5()
# Sets the QT_QMAKE variable to the path of Qt5 qmake if found.
# --------------------------------------
AC_DEFUN([FIND_QT5],
[PKG_CHECK_EXISTS([Qt5Core >= 5.5.1],
[PKG_CHECK_EXISTS([Qt5Core >= 5.2.0],
[PKG_CHECK_VAR(QT_QMAKE,
[Qt5Core >= 5.5.1],
[Qt5Core >= 5.2.0],
[host_bins])
])
@@ -18,7 +43,7 @@ AS_IF([test -f "$QT_QMAKE/qmake"],
[QT_QMAKE=""])
])
AC_MSG_CHECKING([for Qt5 qmake >= 5.5.1])
AC_MSG_CHECKING([for Qt5 qmake >= 5.2.0])
AS_IF([test "x$QT_QMAKE" != "x"],
[AC_MSG_RESULT([$QT_QMAKE])],
[AC_MSG_RESULT([not found])]
@@ -29,10 +54,19 @@ AS_IF([test "x$QT_QMAKE" != "x"],
# Sets the HAVE_QTDBUS variable to true or false.
# --------------------------------------
AC_DEFUN([FIND_QTDBUS],
[AC_MSG_CHECKING([for Qt5DBus >= 5.5.1])
PKG_CHECK_EXISTS([Qt5DBus >= 5.5.1],
[AS_IF([test "x$with_qt4" = "xno"],
[AC_MSG_CHECKING([for Qt5DBus >= 5.2.0])
PKG_CHECK_EXISTS([Qt5DBus >= 5.2.0],
[AC_MSG_RESULT([found])
HAVE_QTDBUS=[true]],
[AC_MSG_RESULT([not found])
HAVE_QTDBUS=[false]])
],
[AC_MSG_CHECKING([for QtDBus >= 4.8.0])
PKG_CHECK_EXISTS([QtDBus >= 4.8.0],
[AC_MSG_RESULT([found])
HAVE_QTDBUS=[true]],
[AC_MSG_RESULT([not found])
HAVE_QTDBUS=[false]])
])
])

View File

@@ -9,7 +9,10 @@ exists($$OUT_PWD/../conf.pri) {
include(conf.pri)
}
LIBS += -framework Carbon -framework IOKit -framework AppKit
LIBS += -framework Carbon -framework IOKit
# C++11 support
lessThan(QT_MAJOR_VERSION, 5): QMAKE_CXXFLAGS += -std=c++11
QT_LANG_PATH = ../dist/qt-translations
DIST_PATH = ../dist/mac

19
os2conf.pri Normal file
View File

@@ -0,0 +1,19 @@
# C++11 support
lessThan(QT_MAJOR_VERSION, 5): QMAKE_CXXFLAGS += -std=c++11
exists(conf.pri) {
# to the conf.pri goes all system dependent stuff
include(conf.pri)
}
LIBS += \
-ltorrent-rasterbar \
-lboost_thread \
-lboost_system \
-lboost_filesystem \
-lssl -lcrypto -lidn -lpthread -lz
RC_FILE = qbittorrent_os2.rc
# LIBTORRENT DEFINES
DEFINES += BOOST_ASIO_DYN_LINK

View File

@@ -1,10 +1,13 @@
TS_IN = $$fromfile(src/src.pro,TRANSLATIONS)
TS_IN_NOEXT = $$replace(TS_IN,".ts","")
isEmpty(QMAKE_LRELEASE) {
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
unix {
equals(QT_MAJOR_VERSION, 4) {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt4 }
}
equals(QT_MAJOR_VERSION, 5) {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt5 }
}

View File

@@ -11,27 +11,28 @@ include(QbtTargetSources)
find_package(LibtorrentRasterbar REQUIRED)
# Qt
list(APPEND QBT_QT_COMPONENTS Core Network Xml)
if (GUI)
list (APPEND QBT_QT_COMPONENTS Gui Svg Widgets)
if (WIN32)
list (APPEND QBT_QT_COMPONENTS WinExtras)
endif(WIN32)
if (APPLE)
list (APPEND QBT_GUI_OPTIONAL_LINK_LIBRARIES objc)
list (APPEND QBT_QT_COMPONENTS MacExtras)
endif (APPLE)
endif (GUI)
if (DBUS)
list (APPEND QBT_QT_COMPONENTS DBus)
endif (DBUS)
find_package(Qt5 5.5.1 COMPONENTS ${QBT_QT_COMPONENTS} REQUIRED)
if (GUI AND APPLE)
# Fix MOC inability to detect macOS. This seems to only affect cmake.
# Relevant issue: https://bugreports.qt.io/browse/QTBUG-58325
set(CMAKE_AUTOMOC_MOC_OPTIONS ${CMAKE_AUTOMOC_MOC_OPTIONS} -DQ_OS_MAC)
endif ()
if (QT5)
add_definitions(-DQBT_USES_QT5)
list(APPEND QBT_QT_COMPONENTS Core Network Xml)
if (GUI)
list (APPEND QBT_QT_COMPONENTS Concurrent Gui Widgets)
endif (GUI)
if (DBUS)
list (APPEND QBT_QT_COMPONENTS DBus)
endif (DBUS)
find_package(Qt5 5.2.0 COMPONENTS ${QBT_QT_COMPONENTS} REQUIRED)
else (QT5)
list(APPEND QBT_QT_COMPONENTS QtCore QtNetwork QtXml)
if (GUI)
list (APPEND QBT_QT_COMPONENTS QtGui)
endif (GUI)
if (DBUS)
list (APPEND QBT_QT_COMPONENTS QtDBus)
endif (DBUS)
find_package(Qt4 4.8.0 COMPONENTS ${QBT_QT_COMPONENTS} REQUIRED)
include(${QT_USE_FILE})
add_definitions(-DQStringLiteral=QLatin1String)
endif (QT5)
set(CMAKE_AUTOMOC True)
list(APPEND CMAKE_AUTORCC_OPTIONS -compress 9 -threshold 5)
@@ -40,8 +41,11 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# defines
add_definitions(-DQT_NO_CAST_TO_ASCII)
# Efficient construction for QString & QByteArray (Qt >= 4.8)
add_definitions(-DQT_USE_QSTRINGBUILDER)
# Fast concatenation (Qt >= 4.6)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
if (WIN32)
add_definitions(-DNOMINMAX)
endif (WIN32)
if (NOT GUI)
add_definitions(-DDISABLE_GUI -DDISABLE_COUNTRIES_RESOLUTION)
@@ -78,9 +82,17 @@ endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(QBT_USE_GUI ${GUI})
set(QBT_USE_WEBUI ${WEBUI})
set(QBT_USES_QT5 ${QT5})
configure_file(config.h.cmakein ${CMAKE_CURRENT_BINARY_DIR}/config.h)
if (GUI)
set(QBT_TARGET_NAME qbittorrent)
else (GUI)
set(QBT_TARGET_NAME qbittorrent-nox)
endif (GUI)
if (SYSTEM_QTSINGLEAPPLICATION)
find_package(QtSingleApplication REQUIRED)
else (SYSTEM_QTSINGLEAPPLICATION)

View File

@@ -3,13 +3,11 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
set(QBT_APP_HEADERS
application.h
cmdoptions.h
filelogger.h
)
set(QBT_APP_SOURCES
application.cpp
cmdoptions.cpp
filelogger.cpp
main.cpp
)
@@ -19,8 +17,12 @@ file(GLOB QBT_TS_FILES ../lang/*.ts)
get_filename_component(QBT_QM_FILES_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/../lang" ABSOLUTE)
set_source_files_properties(${QBT_TS_FILES} PROPERTIES OUTPUT_LOCATION "${QBT_QM_FILES_BINARY_DIR}")
find_package(Qt5 COMPONENTS LinguistTools REQUIRED)
qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES})
if (QT5)
find_package(Qt5 COMPONENTS LinguistTools REQUIRED)
qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES})
else (QT5)
qt4_add_translation(QBT_QM_FILES ${QBT_TS_FILES})
endif (QT5)
get_filename_component(_lang_qrc_src "${CMAKE_CURRENT_SOURCE_DIR}/../lang.qrc" ABSOLUTE)
get_filename_component(_lang_qrc_dst "${CMAKE_CURRENT_BINARY_DIR}/../lang.qrc" ABSOLUTE)
@@ -42,7 +44,11 @@ set(QBT_APP_RESOURCES
# With AUTORCC rcc is ran by cmake before language files are generated,
# and thus we call rcc explicitly
qt5_add_resources(QBT_APP_RESOURCE_SOURCE ${QBT_APP_RESOURCES})
if (QT5)
qt5_add_resources(QBT_APP_RESOURCE_SOURCE ${QBT_APP_RESOURCES})
else (QT5)
qt4_add_resources(QBT_APP_RESOURCE_SOURCE ${QBT_APP_RESOURCES})
endif (QT5)
if (WIN32)
if (MINGW)
@@ -142,50 +148,39 @@ if (APPLE)
PROPERTIES MACOSX_PACKAGE_LOCATION translations)
endif (APPLE)
add_executable(qBittorrent ${QBT_APP_HEADERS} ${QBT_APP_SOURCES} ${QBT_QM_FILES} ${QBT_APP_RESOURCE_SOURCE})
if (GUI)
set_target_properties(qBittorrent
PROPERTIES
OUTPUT_NAME qbittorrent
WIN32_EXECUTABLE True
)
else (GUI)
set_target_properties(qBittorrent
PROPERTIES
OUTPUT_NAME qbittorrent-nox
)
endif (GUI)
set_target_properties(qBittorrent
add_executable(${QBT_TARGET_NAME} ${QBT_APP_HEADERS} ${QBT_APP_SOURCES} ${QBT_QM_FILES} ${QBT_APP_RESOURCE_SOURCE})
set_target_properties(${QBT_TARGET_NAME}
PROPERTIES
AUTOUIC True
AUTORCC True
MACOSX_BUNDLE True
)
get_target_property(QBT_EXECUTABLE_NAME qBittorrent OUTPUT_NAME)
if (GUI AND WIN32)
set_target_properties(${QBT_TARGET_NAME} PROPERTIES WIN32_EXECUTABLE True)
endif (GUI AND WIN32)
target_link_libraries(qBittorrent ${QBT_TARGET_LIBRARIES} QtSingleApplication::QtSingleApplication)
target_link_libraries(${QBT_TARGET_NAME} ${QBT_TARGET_LIBRARIES} QtSingleApplication::QtSingleApplication)
if (APPLE)
set(qbt_BUNDLE_NAME ${QBT_EXECUTABLE_NAME})
set(qbt_BUNDLE_NAME "${QBT_TARGET_NAME}")
# substitute @EXECUTABLE@ in dist/mac/Info.plist
set(EXECUTABLE ${qbt_BUNDLE_NAME})
configure_file(${qBittorrent_SOURCE_DIR}/dist/mac/Info.plist ${qBittorrent_BINARY_DIR}/dist/mac/Info.plist @ONLY)
set_target_properties(qBittorrent PROPERTIES
set_target_properties(${QBT_TARGET_NAME} PROPERTIES
MACOSX_BUNDLE_BUNDLE_NAME "${qbt_BUNDLE_NAME}"
MACOSX_BUNDLE_INFO_PLIST ${qBittorrent_BINARY_DIR}/dist/mac/Info.plist
)
endif (APPLE)
# installation
install(TARGETS qBittorrent
install(TARGETS ${QBT_TARGET_NAME}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
BUNDLE DESTINATION .
COMPONENT runtime)
if (GUI AND APPLE)
include(bundle)
endif (GUI AND APPLE)
if (APPLE AND GUI)
install(SCRIPT ${OSX_RES_SRC_DIR}/bundle.cmake)
endif (APPLE AND GUI)

View File

@@ -16,12 +16,10 @@ usesystemqtsingleapplication {
HEADERS += \
$$PWD/application.h \
$$PWD/cmdoptions.h \
$$PWD/filelogger.h
SOURCES += \
$$PWD/application.cpp \
$$PWD/cmdoptions.cpp \
$$PWD/filelogger.cpp \
$$PWD/main.cpp

View File

@@ -63,7 +63,6 @@
#include "base/logger.h"
#include "base/preferences.h"
#include "base/settingsstorage.h"
#include "base/profile.h"
#include "base/utils/fs.h"
#include "base/utils/misc.h"
#include "base/iconprovider.h"
@@ -74,8 +73,6 @@
#include "base/net/proxyconfigurationmanager.h"
#include "base/bittorrent/session.h"
#include "base/bittorrent/torrenthandle.h"
#include "base/rss/rss_autodownloader.h"
#include "base/rss/rss_session.h"
namespace
{
@@ -96,41 +93,32 @@ namespace
const QString LOG_FOLDER("logs");
const char PARAMS_SEPARATOR[] = "|";
const QString DEFAULT_PORTABLE_MODE_PROFILE_DIR = QLatin1String("profile");
}
Application::Application(const QString &id, int &argc, char **argv)
: BaseApplication(id, argc, argv)
, m_running(false)
, m_shutdownAct(ShutdownDialogAction::Exit)
, m_commandLineArgs(parseCommandLine(this->arguments()))
, m_webui(nullptr)
{
qRegisterMetaType<Log::Msg>("Log::Msg");
setApplicationName("qBittorrent");
validateCommandLineParameters();
QString profileDir = m_commandLineArgs.portableMode
? QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(DEFAULT_PORTABLE_MODE_PROFILE_DIR)
: m_commandLineArgs.profileDir;
Profile::initialize(profileDir, m_commandLineArgs.configurationName,
m_commandLineArgs.relativeFastresumePaths || m_commandLineArgs.portableMode);
Logger::initInstance();
SettingsStorage::initInstance();
Preferences::initInstance();
if (m_commandLineArgs.webUiPort > 0) // it will be -1 when user did not set any value
Preferences::instance()->setWebUiPort(m_commandLineArgs.webUiPort);
#if defined(Q_OS_MACX) && !defined(DISABLE_GUI)
if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_8) {
// fix Mac OS X 10.9 (mavericks) font issue
// https://bugreports.qt-project.org/browse/QTBUG-32789
QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande");
}
#endif
setApplicationName("qBittorrent");
initializeTranslation();
#if !defined(DISABLE_GUI)
#ifdef QBT_USES_QT5
setAttribute(Qt::AA_UseHighDpiPixmaps, true); // opt-in to the high DPI pixmap support
#endif // QBT_USES_QT5
setQuitOnLastWindowClosed(false);
#endif
@@ -147,13 +135,6 @@ Application::Application(const QString &id, int &argc, char **argv)
Logger::instance()->addMessage(tr("qBittorrent %1 started", "qBittorrent v3.2.0alpha started").arg(QBT_VERSION));
}
Application::~Application()
{
// we still need to call cleanup()
// in case the App failed to start
cleanup();
}
#ifndef DISABLE_GUI
QPointer<MainWindow> Application::mainWindow()
{
@@ -161,11 +142,6 @@ QPointer<MainWindow> Application::mainWindow()
}
#endif
const QBtCommandLineParameters &Application::commandLineArgs() const
{
return m_commandLineArgs;
}
bool Application::isFileLoggerEnabled() const
{
return settings()->loadValue(KEY_FILELOGGER_ENABLED, true).toBool();
@@ -182,15 +158,14 @@ void Application::setFileLoggerEnabled(bool value)
QString Application::fileLoggerPath() const
{
return settings()->loadValue(KEY_FILELOGGER_PATH,
QVariant(specialFolderLocation(SpecialFolder::Data) + LOG_FOLDER)).toString();
return settings()->loadValue(KEY_FILELOGGER_PATH, QVariant(Utils::Fs::QDesktopServicesDataLocation() + LOG_FOLDER)).toString();
}
void Application::setFileLoggerPath(const QString &path)
void Application::setFileLoggerPath(const QString &value)
{
if (m_fileLogger)
m_fileLogger->changePath(path);
settings()->storeValue(KEY_FILELOGGER_PATH, path);
m_fileLogger->changePath(value);
settings()->storeValue(KEY_FILELOGGER_PATH, value);
}
bool Application::isFileLoggerBackup() const
@@ -315,22 +290,22 @@ void Application::runExternalProgram(BitTorrent::TorrentHandle *const torrent) c
#endif
}
void Application::sendNotificationEmail(const BitTorrent::TorrentHandle *torrent)
void Application::sendNotificationEmail(BitTorrent::TorrentHandle *const torrent)
{
// Prepare mail content
const QString content = tr("Torrent name: %1").arg(torrent->name()) + "\n"
+ tr("Torrent size: %1").arg(Utils::Misc::friendlyUnit(torrent->wantedSize())) + "\n"
+ tr("Save path: %1").arg(torrent->savePath()) + "\n\n"
+ tr("The torrent was downloaded in %1.", "The torrent was downloaded in 1 hour and 20 seconds")
.arg(Utils::Misc::userFriendlyDuration(torrent->activeTime())) + "\n\n\n"
+ tr("Thank you for using qBittorrent.") + "\n";
QString content = QObject::tr("Torrent name: %1").arg(torrent->name()) + "\n";
content += QObject::tr("Torrent size: %1").arg(Utils::Misc::friendlyUnit(torrent->wantedSize())) + "\n";
content += QObject::tr("Save path: %1").arg(torrent->savePath()) + "\n\n";
content += QObject::tr("The torrent was downloaded in %1.",
"The torrent was downloaded in 1 hour and 20 seconds")
.arg(Utils::Misc::userFriendlyDuration(torrent->activeTime())) + "\n\n\n";
content += QObject::tr("Thank you for using qBittorrent.") + "\n";
// Send the notification email
const Preferences *pref = Preferences::instance();
Net::Smtp *smtp = new Net::Smtp(this);
smtp->sendMail(pref->getMailNotificationSender(),
pref->getMailNotificationEmail(),
tr("[qBittorrent] '%1' has finished downloading").arg(torrent->name()),
Net::Smtp *sender = new Net::Smtp;
sender->sendMail("notification@qbittorrent.org",
Preferences::instance()->getMailNotificationEmail(),
QObject::tr("[qBittorrent] '%1' has finished downloading").arg(torrent->name()),
content);
}
@@ -374,7 +349,7 @@ void Application::allTorrentsFinished()
// do nothing & skip confirm
}
else {
if (!ShutdownConfirmDlg::askForConfirmation(m_window, action)) return;
if (!ShutdownConfirmDlg::askForConfirmation(action)) return;
}
#endif // DISABLE_GUI
@@ -410,63 +385,15 @@ void Application::processParams(const QStringList &params)
return;
}
#endif
BitTorrent::AddTorrentParams torrentParams;
TriStateBool skipTorrentDialog;
foreach (QString param, params) {
param = param.trimmed();
// Process strings indicating options specified by the user.
if (param.startsWith(QLatin1String("@savePath="))) {
torrentParams.savePath = param.mid(10);
continue;
}
if (param.startsWith(QLatin1String("@addPaused="))) {
torrentParams.addPaused = param.mid(11).toInt() ? TriStateBool::True : TriStateBool::False;
continue;
}
if (param == QLatin1String("@skipChecking")) {
torrentParams.skipChecking = true;
continue;
}
if (param.startsWith(QLatin1String("@category="))) {
torrentParams.category = param.mid(10);
continue;
}
if (param == QLatin1String("@sequential")) {
torrentParams.sequential = true;
continue;
}
if (param == QLatin1String("@firstLastPiecePriority")) {
torrentParams.firstLastPiecePriority = true;
continue;
}
if (param.startsWith(QLatin1String("@skipDialog="))) {
skipTorrentDialog = param.mid(12).toInt() ? TriStateBool::True : TriStateBool::False;
continue;
}
#ifndef DISABLE_GUI
// There are two circumstances in which we want to show the torrent
// dialog. One is when the application settings specify that it should
// be shown and skipTorrentDialog is undefined. The other is when
// skipTorrentDialog is false, meaning that the application setting
// should be overridden.
const bool showDialogForThisTorrent =
((AddNewTorrentDialog::isEnabled() && skipTorrentDialog == TriStateBool::Undefined)
|| skipTorrentDialog == TriStateBool::False);
if (showDialogForThisTorrent)
AddNewTorrentDialog::show(param, torrentParams, m_window);
if (AddNewTorrentDialog::isEnabled())
AddNewTorrentDialog::show(param, m_window);
else
#endif
BitTorrent::Session::instance()->addTorrent(param, torrentParams);
BitTorrent::Session::instance()->addTorrent(param);
}
}
@@ -491,15 +418,7 @@ int Application::exec(const QStringList &params)
#ifndef DISABLE_WEBUI
m_webui = new WebUI;
#ifdef DISABLE_GUI
if (m_webui->isErrored())
return 1;
connect(m_webui, &WebUI::fatalError, this, []() { QCoreApplication::exit(1); });
#endif // DISABLE_GUI
#endif // DISABLE_WEBUI
new RSS::Session; // create RSS::Session singleton
new RSS::AutoDownloader; // create RSS::AutoDownloader singleton
#endif
#ifdef DISABLE_GUI
#ifndef DISABLE_WEBUI
@@ -519,15 +438,15 @@ int Application::exec(const QStringList &params)
#endif // DISABLE_GUI
m_running = true;
// Now UI is ready to process signals from Session
BitTorrent::Session::instance()->startUpTorrents();
m_paramsQueue = params + m_paramsQueue;
if (!m_paramsQueue.isEmpty()) {
processParams(m_paramsQueue);
m_paramsQueue.clear();
}
// Now UI is ready to process signals from Session
BitTorrent::Session::instance()->startUpTorrents();
return BaseApplication::exec();
}
@@ -567,7 +486,7 @@ bool Application::event(QEvent *ev)
if (path.isEmpty())
// Get the url instead
path = static_cast<QFileOpenEvent *>(ev)->url().toString();
qDebug("Received a mac file open event: %s", qUtf8Printable(path));
qDebug("Received a mac file open event: %s", qPrintable(path));
if (m_running)
processParams(QStringList(path));
else
@@ -600,18 +519,20 @@ void Application::initializeTranslation()
// Load translation
QString localeStr = pref->getLocale();
if (m_qtTranslator.load(QLatin1String("qtbase_") + localeStr, QLibraryInfo::location(QLibraryInfo::TranslationsPath)) ||
m_qtTranslator.load(QLatin1String("qt_") + localeStr, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
qDebug("Qt %s locale recognized, using translation.", qUtf8Printable(localeStr));
if (
#ifdef QBT_USES_QT5
m_qtTranslator.load(QString::fromUtf8("qtbase_") + localeStr, QLibraryInfo::location(QLibraryInfo::TranslationsPath)) ||
#endif
m_qtTranslator.load(QString::fromUtf8("qt_") + localeStr, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
qDebug("Qt %s locale recognized, using translation.", qPrintable(localeStr));
else
qDebug("Qt %s locale unrecognized, using default (en).", qUtf8Printable(localeStr));
qDebug("Qt %s locale unrecognized, using default (en).", qPrintable(localeStr));
installTranslator(&m_qtTranslator);
if (m_translator.load(QLatin1String(":/lang/qbittorrent_") + localeStr))
qDebug("%s locale recognized, using translation.", qUtf8Printable(localeStr));
if (m_translator.load(QString::fromUtf8(":/lang/qbittorrent_") + localeStr))
qDebug("%s locale recognized, using translation.", qPrintable(localeStr));
else
qDebug("%s locale unrecognized, using default (en).", qUtf8Printable(localeStr));
qDebug("%s locale unrecognized, using default (en).", qPrintable(localeStr));
installTranslator(&m_translator);
#ifndef DISABLE_GUI
@@ -655,45 +576,43 @@ void Application::shutdownCleanup(QSessionManager &manager)
void Application::cleanup()
{
#ifndef DISABLE_GUI
#ifdef Q_OS_WIN
// cleanup() can be called multiple times during shutdown. We only need it once.
static QAtomicInt alreadyDone;
if (!alreadyDone.testAndSetAcquire(0, 1))
return;
#ifndef DISABLE_GUI
if (m_window) {
// Hide the window and not leave it on screen as
// unresponsive. Also for Windows take the WinId
// after it's hidden, because hide() may cause a
// WinId change.
m_window->hide();
#ifdef Q_OS_WIN
typedef BOOL (WINAPI *PSHUTDOWNBRCREATE)(HWND, LPCWSTR);
PSHUTDOWNBRCREATE shutdownBRCreate = (PSHUTDOWNBRCREATE)::GetProcAddress(::GetModuleHandleW(L"User32.dll"), "ShutdownBlockReasonCreate");
// Only available on Vista+
if (shutdownBRCreate)
shutdownBRCreate((HWND)m_window->effectiveWinId(), tr("Saving torrent progress...").toStdWString().c_str());
#endif // Q_OS_WIN
// Do manual cleanup in MainWindow to force widgets
// to save their Preferences, stop all timers and
// delete as many widgets as possible to leave only
// a 'shell' MainWindow.
// We need a valid window handle for Windows Vista+
// otherwise the system shutdown will continue even
// though we created a ShutdownBlockReason
m_window->cleanup();
}
// Hide the window and not leave it on screen as
// unresponsive. Also for Windows take the WinId
// after it's hidden, because hide() may cause a
// WinId change.
m_window->hide();
#ifdef Q_OS_WIN
typedef BOOL (WINAPI *PSHUTDOWNBRCREATE)(HWND, LPCWSTR);
PSHUTDOWNBRCREATE shutdownBRCreate = (PSHUTDOWNBRCREATE)::GetProcAddress(::GetModuleHandleW(L"User32.dll"), "ShutdownBlockReasonCreate");
// Only available on Vista+
if (shutdownBRCreate)
shutdownBRCreate((HWND)m_window->effectiveWinId(), tr("Saving torrent progress...").toStdWString().c_str());
#endif // Q_OS_WIN
// Do manual cleanup in MainWindow to force widgets
// to save their Preferences, stop all timers and
// delete as many widgets as possible to leave only
// a 'shell' MainWindow.
// We need a valid window handle for Windows Vista+
// otherwise the system shutdown will continue even
// though we created a ShutdownBlockReason
m_window->cleanup();
#endif // DISABLE_GUI
#ifndef DISABLE_WEBUI
delete m_webui;
#endif
delete RSS::AutoDownloader::instance();
delete RSS::Session::instance();
ScanFoldersModel::freeInstance();
BitTorrent::Session::freeInstance();
#ifndef DISABLE_COUNTRIES_RESOLUTION
@@ -709,16 +628,14 @@ void Application::cleanup()
Utils::Fs::removeDirRecursive(Utils::Fs::tempPath());
#ifndef DISABLE_GUI
if (m_window) {
#ifdef Q_OS_WIN
typedef BOOL (WINAPI *PSHUTDOWNBRDESTROY)(HWND);
PSHUTDOWNBRDESTROY shutdownBRDestroy = (PSHUTDOWNBRDESTROY)::GetProcAddress(::GetModuleHandleW(L"User32.dll"), "ShutdownBlockReasonDestroy");
// Only available on Vista+
if (shutdownBRDestroy)
shutdownBRDestroy((HWND)m_window->effectiveWinId());
typedef BOOL (WINAPI *PSHUTDOWNBRDESTROY)(HWND);
PSHUTDOWNBRDESTROY shutdownBRDestroy = (PSHUTDOWNBRDESTROY)::GetProcAddress(::GetModuleHandleW(L"User32.dll"), "ShutdownBlockReasonDestroy");
// Only available on Vista+
if (shutdownBRDestroy)
shutdownBRDestroy((HWND)m_window->effectiveWinId());
#endif // Q_OS_WIN
delete m_window;
}
delete m_window;
#endif // DISABLE_GUI
if (m_shutdownAct != ShutdownDialogAction::Exit) {
@@ -726,12 +643,3 @@ void Application::cleanup()
Utils::Misc::shutdownComputer(m_shutdownAct);
}
}
void Application::validateCommandLineParameters()
{
if (m_commandLineArgs.portableMode && !m_commandLineArgs.profileDir.isEmpty())
throw CommandLineParameterError(tr("Portable mode and explicit profile directory options are mutually exclusive"));
if (m_commandLineArgs.portableMode && m_commandLineArgs.relativeFastresumePaths)
Logger::instance()->addMessage(tr("Portable mode implies relative fastresume"), Log::WARNING);
}

View File

@@ -51,7 +51,6 @@ typedef QtSingleCoreApplication BaseApplication;
#endif
#include "base/utils/misc.h"
#include "cmdoptions.h"
#ifndef DISABLE_WEBUI
class WebUI;
@@ -64,20 +63,12 @@ namespace BitTorrent
class TorrentHandle;
}
namespace RSS
{
class Session;
class AutoDownloader;
}
class Application : public BaseApplication
{
Q_OBJECT
Q_DISABLE_COPY(Application)
public:
Application(const QString &id, int &argc, char **argv);
~Application() override;
#if (defined(Q_OS_WIN) && !defined(DISABLE_GUI))
bool isRunning();
@@ -89,8 +80,6 @@ public:
QPointer<MainWindow> mainWindow();
#endif
const QBtCommandLineParameters &commandLineArgs() const;
// FileLogger properties
bool isFileLoggerEnabled() const;
void setFileLoggerEnabled(bool value);
@@ -127,14 +116,13 @@ private slots:
private:
bool m_running;
ShutdownDialogAction m_shutdownAct;
QBtCommandLineParameters m_commandLineArgs;
#ifndef DISABLE_GUI
QPointer<MainWindow> m_window;
#endif
#ifndef DISABLE_WEBUI
WebUI *m_webui;
QPointer<WebUI> m_webui;
#endif
// FileLog
@@ -147,8 +135,7 @@ private:
void initializeTranslation();
void processParams(const QStringList &params);
void runExternalProgram(BitTorrent::TorrentHandle *const torrent) const;
void sendNotificationEmail(const BitTorrent::TorrentHandle *torrent);
void validateCommandLineParameters();
void sendNotificationEmail(BitTorrent::TorrentHandle *const torrent);
};
#endif // APPLICATION_H

View File

@@ -1,588 +0,0 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2016 Eugene Shalygin <eugene.shalygin@gmail.com>
* Copyright (C) 2014 Vladimir Golovnev <glassez@yandex.ru>
* Copyright (C) 2006 Christophe Dumez
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give permission to
* link this program with the OpenSSL project's "OpenSSL" library (or with
* modified versions of it that use the same license as the "OpenSSL" library),
* and distribute the linked executables. You must obey the GNU General Public
* License in all respects for all of the code used other than "OpenSSL". If you
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*
* Contact : chris@qbittorrent.org
*/
#include "cmdoptions.h"
#include <iostream>
#include <QDebug>
#include <QFileInfo>
#include <QProcessEnvironment>
#include <QTextStream>
#ifdef Q_OS_WIN
#include <QMessageBox>
#endif
#include "base/utils/misc.h"
#include "base/utils/string.h"
namespace
{
const int USAGE_INDENTATION = 4;
const int USAGE_TEXT_COLUMN = 31;
const int WRAP_AT_COLUMN = 80;
// Base option class. Encapsulates name operations.
class Option
{
protected:
constexpr Option(const char *name, char shortcut = 0)
: m_name {name}
, m_shortcut {shortcut}
{
}
QString fullParameter() const
{
return QLatin1String("--") + QLatin1String(m_name);
}
QString shortcutParameter() const
{
return QLatin1String("-") + QLatin1Char(m_shortcut);
}
bool hasShortcut() const
{
return m_shortcut != 0;
}
QString envVarName() const
{
return QLatin1String("QBT_")
+ QString(QLatin1String(m_name)).toUpper().replace(QLatin1Char('-'), QLatin1Char('_'));
}
public:
static QString padUsageText(const QString &usage)
{
QString res = QString(USAGE_INDENTATION, ' ') + usage;
if ((USAGE_TEXT_COLUMN - usage.length() - 4) > 0)
return res + QString(USAGE_TEXT_COLUMN - usage.length() - 4, ' ');
else
return res;
}
private:
const char *m_name;
const char m_shortcut;
};
// Boolean option.
class BoolOption: protected Option
{
public:
constexpr BoolOption(const char *name, char shortcut = 0)
: Option {name, shortcut}
{
}
bool operator==(const QString &arg) const
{
return (hasShortcut() && ((arg.size() == 2) && (arg == shortcutParameter())))
|| (arg == fullParameter());
}
bool value(const QProcessEnvironment &env) const
{
QString val = env.value(envVarName());
// we accept "1" and "true" (upper or lower cased) as boolean 'true' values
return (val == QLatin1String("1") || val.toUpper() == QLatin1String("TRUE"));
}
QString usage() const
{
QString res;
if (hasShortcut())
res += shortcutParameter() + QLatin1String(" | ");
res += fullParameter();
return padUsageText(res);
}
};
bool operator==(const QString &s, const BoolOption &o)
{
return o == s;
}
// Option with string value. May not have a shortcut
struct StringOption: protected Option
{
public:
constexpr StringOption(const char *name)
: Option {name, 0}
{
}
bool operator==(const QString &arg) const
{
return arg.startsWith(parameterAssignment());
}
QString value(const QString &arg) const
{
QStringList parts = arg.split(QLatin1Char('='));
if (parts.size() == 2)
return Utils::String::unquote(parts[1], QLatin1String("'\""));
throw CommandLineParameterError(QObject::tr("Parameter '%1' must follow syntax '%1=%2'",
"e.g. Parameter '--webui-port' must follow syntax '--webui-port=value'")
.arg(fullParameter()).arg(QLatin1String("<value>")));
}
QString value(const QProcessEnvironment &env, const QString &defaultValue = QString()) const
{
QString val = env.value(envVarName());
return val.isEmpty() ? defaultValue : Utils::String::unquote(val, QLatin1String("'\""));
}
QString usage(const QString &valueName) const
{
return padUsageText(parameterAssignment() + QLatin1Char('<') + valueName + QLatin1Char('>'));
}
private:
QString parameterAssignment() const
{
return fullParameter() + QLatin1Char('=');
}
};
bool operator==(const QString &s, const StringOption &o)
{
return o == s;
}
// Option with integer value. May not have a shortcut
class IntOption: protected StringOption
{
public:
constexpr IntOption(const char *name)
: StringOption {name}
{
}
using StringOption::operator==;
using StringOption::usage;
int value(const QString &arg) const
{
QString val = StringOption::value(arg);
bool ok = false;
int res = val.toInt(&ok);
if (!ok)
throw CommandLineParameterError(QObject::tr("Parameter '%1' must follow syntax '%1=%2'",
"e.g. Parameter '--webui-port' must follow syntax '--webui-port=<value>'")
.arg(fullParameter()).arg(QLatin1String("<integer value>")));
return res;
}
int value(const QProcessEnvironment &env, int defaultValue) const
{
QString val = env.value(envVarName());
if (val.isEmpty()) return defaultValue;
bool ok;
int res = val.toInt(&ok);
if (!ok) {
qDebug() << QObject::tr("Expected integer number in environment variable '%1', but got '%2'")
.arg(envVarName()).arg(val);
return defaultValue;
}
return res;
}
};
bool operator==(const QString &s, const IntOption &o)
{
return o == s;
}
// Option that is explicitly set to true or false, and whose value is undefined when unspecified.
// May not have a shortcut.
class TriStateBoolOption: protected Option
{
public:
constexpr TriStateBoolOption(const char *name, bool defaultValue)
: Option {name, 0}
, m_defaultValue(defaultValue)
{
}
bool operator==(const QString &arg) const
{
QStringList parts = arg.split(QLatin1Char('='));
return parts[0] == fullParameter();
}
QString usage() const
{
return padUsageText(fullParameter() + QLatin1String("=<true|false>"));
}
TriStateBool value(const QString &arg) const
{
QStringList parts = arg.split(QLatin1Char('='));
if (parts.size() == 1) {
return TriStateBool(m_defaultValue);
}
else if (parts.size() == 2) {
QString val = parts[1];
if (val.toUpper() == QLatin1String("TRUE") || val == QLatin1String("1")) {
return TriStateBool::True;
}
else if (val.toUpper() == QLatin1String("FALSE") || val == QLatin1String("0")) {
return TriStateBool::False;
}
}
throw CommandLineParameterError(QObject::tr("Parameter '%1' must follow syntax '%1=%2'",
"e.g. Parameter '--add-paused' must follow syntax "
"'--add-paused=<true|false>'")
.arg(fullParameter())
.arg(QLatin1String("<true|false>")));
}
TriStateBool value(const QProcessEnvironment &env) const
{
QString val = env.value(envVarName(), "-1");
if (val.isEmpty()) {
return TriStateBool(m_defaultValue);
}
else if (val == QLatin1String("-1")) {
return TriStateBool::Undefined;
}
else if (val.toUpper() == QLatin1String("TRUE") || val == QLatin1String("1")) {
return TriStateBool::True;
}
else if (val.toUpper() == QLatin1String("FALSE") || val == QLatin1String("0")) {
return TriStateBool::False;
}
else {
qDebug() << QObject::tr("Expected %1 in environment variable '%2', but got '%3'")
.arg(QLatin1String("true|false")).arg(envVarName()).arg(val);
return TriStateBool::Undefined;
}
}
bool m_defaultValue;
};
bool operator==(const QString &s, const TriStateBoolOption &o)
{
return o == s;
}
constexpr const BoolOption SHOW_HELP_OPTION = {"help", 'h'};
constexpr const BoolOption SHOW_VERSION_OPTION = {"version", 'v'};
#ifdef DISABLE_GUI
constexpr const BoolOption DAEMON_OPTION = {"daemon", 'd'};
#else
constexpr const BoolOption NO_SPLASH_OPTION = {"no-splash"};
#endif
constexpr const IntOption WEBUI_PORT_OPTION = {"webui-port"};
constexpr const StringOption PROFILE_OPTION = {"profile"};
constexpr const StringOption CONFIGURATION_OPTION = {"configuration"};
constexpr const BoolOption PORTABLE_OPTION = {"portable"};
constexpr const BoolOption RELATIVE_FASTRESUME = {"relative-fastresume"};
constexpr const StringOption SAVE_PATH_OPTION = {"save-path"};
constexpr const TriStateBoolOption PAUSED_OPTION = {"add-paused", true};
constexpr const BoolOption SKIP_HASH_CHECK_OPTION = {"skip-hash-check"};
constexpr const StringOption CATEGORY_OPTION = {"category"};
constexpr const BoolOption SEQUENTIAL_OPTION = {"sequential"};
constexpr const BoolOption FIRST_AND_LAST_OPTION = {"first-and-last"};
constexpr const TriStateBoolOption SKIP_DIALOG_OPTION = {"skip-dialog", true};
}
QBtCommandLineParameters::QBtCommandLineParameters(const QProcessEnvironment &env)
: showHelp(false)
, relativeFastresumePaths(RELATIVE_FASTRESUME.value(env))
, portableMode(PORTABLE_OPTION.value(env))
, skipChecking(SKIP_HASH_CHECK_OPTION.value(env))
, sequential(SEQUENTIAL_OPTION.value(env))
, firstLastPiecePriority(FIRST_AND_LAST_OPTION.value(env))
#ifndef Q_OS_WIN
, showVersion(false)
#endif
#ifndef DISABLE_GUI
, noSplash(NO_SPLASH_OPTION.value(env))
#else
, shouldDaemonize(DAEMON_OPTION.value(env))
#endif
, webUiPort(WEBUI_PORT_OPTION.value(env, -1))
, addPaused(PAUSED_OPTION.value(env))
, skipDialog(SKIP_DIALOG_OPTION.value(env))
, profileDir(PROFILE_OPTION.value(env))
, configurationName(CONFIGURATION_OPTION.value(env))
, savePath(SAVE_PATH_OPTION.value(env))
, category(CATEGORY_OPTION.value(env))
{
}
QStringList QBtCommandLineParameters::paramList() const
{
QStringList result;
// Because we're passing a string list to the currently running
// qBittorrent process, we need some way of passing along the options
// the user has specified. Here we place special strings that are
// almost certainly not going to collide with a file path or URL
// specified by the user, and placing them at the beginning of the
// string listr so that they will be processed before the list of
// torrent paths or URLs.
if (!savePath.isEmpty())
result.append(QString("@savePath=%1").arg(savePath));
if (addPaused == TriStateBool::True) {
result.append(QLatin1String("@addPaused=1"));
}
else if (addPaused == TriStateBool::False) {
result.append(QLatin1String("@addPaused=0"));
}
if (skipChecking)
result.append(QLatin1String("@skipChecking"));
if (!category.isEmpty())
result.append(QString("@category=%1").arg(category));
if (sequential)
result.append(QLatin1String("@sequential"));
if (firstLastPiecePriority)
result.append(QLatin1String("@firstLastPiecePriority"));
if (skipDialog == TriStateBool::True) {
result.append(QLatin1String("@skipDialog=1"));
}
else if (skipDialog == TriStateBool::False) {
result.append(QLatin1String("@skipDialog=0"));
}
result += torrents;
return result;
}
QBtCommandLineParameters parseCommandLine(const QStringList &args)
{
QBtCommandLineParameters result {QProcessEnvironment::systemEnvironment()};
for (int i = 1; i < args.count(); ++i) {
const QString &arg = args[i];
if ((arg.startsWith("--") && !arg.endsWith(".torrent"))
|| (arg.startsWith("-") && (arg.size() == 2))) {
// Parse known parameters
if ((arg == SHOW_HELP_OPTION)) {
result.showHelp = true;
}
#ifndef Q_OS_WIN
else if (arg == SHOW_VERSION_OPTION) {
result.showVersion = true;
}
#endif
else if (arg == WEBUI_PORT_OPTION) {
result.webUiPort = WEBUI_PORT_OPTION.value(arg);
if ((result.webUiPort < 1) || (result.webUiPort > 65535))
throw CommandLineParameterError(QObject::tr("%1 must specify a valid port (1 to 65535).")
.arg(QLatin1String("--webui-port")));
}
#ifndef DISABLE_GUI
else if (arg == NO_SPLASH_OPTION) {
result.noSplash = true;
}
#else
else if (arg == DAEMON_OPTION) {
result.shouldDaemonize = true;
}
#endif
else if (arg == PROFILE_OPTION) {
result.profileDir = PROFILE_OPTION.value(arg);
}
else if (arg == RELATIVE_FASTRESUME) {
result.relativeFastresumePaths = true;
}
else if (arg == PORTABLE_OPTION) {
result.portableMode = true;
}
else if (arg == CONFIGURATION_OPTION) {
result.configurationName = CONFIGURATION_OPTION.value(arg);
}
else if (arg == SAVE_PATH_OPTION) {
result.savePath = SAVE_PATH_OPTION.value(arg);
}
else if (arg == PAUSED_OPTION) {
result.addPaused = PAUSED_OPTION.value(arg);
}
else if (arg == SKIP_HASH_CHECK_OPTION) {
result.skipChecking = true;
}
else if (arg == CATEGORY_OPTION) {
result.category = CATEGORY_OPTION.value(arg);
}
else if (arg == SEQUENTIAL_OPTION) {
result.sequential = true;
}
else if (arg == FIRST_AND_LAST_OPTION) {
result.firstLastPiecePriority = true;
}
else if (arg == SKIP_DIALOG_OPTION) {
result.skipDialog = SKIP_DIALOG_OPTION.value(arg);
}
else {
// Unknown argument
result.unknownParameter = arg;
break;
}
}
else {
QFileInfo torrentPath;
torrentPath.setFile(arg);
if (torrentPath.exists())
result.torrents += torrentPath.absoluteFilePath();
else
result.torrents += arg;
}
}
return result;
}
CommandLineParameterError::CommandLineParameterError(const QString &messageForUser)
: std::runtime_error(messageForUser.toLocal8Bit().data())
, m_messageForUser(messageForUser)
{
}
const QString& CommandLineParameterError::messageForUser() const
{
return m_messageForUser;
}
QString wrapText(const QString &text, int initialIndentation = USAGE_TEXT_COLUMN, int wrapAtColumn = WRAP_AT_COLUMN)
{
QStringList words = text.split(' ');
QStringList lines = {words.first()};
int currentLineMaxLength = wrapAtColumn - initialIndentation;
foreach (const QString &word, words.mid(1)) {
if (lines.last().length() + word.length() + 1 < currentLineMaxLength) {
lines.last().append(" " + word);
}
else {
lines.append(QString(initialIndentation, ' ') + word);
currentLineMaxLength = wrapAtColumn;
}
}
return lines.join("\n");
}
QString makeUsage(const QString &prgName)
{
QString text;
QTextStream stream(&text, QIODevice::WriteOnly);
QString indentation = QString(USAGE_INDENTATION, ' ');
stream << QObject::tr("Usage:") << '\n';
stream << indentation << prgName << QLatin1String(" [options] [(<filename> | <url>)...]") << '\n';
stream << QObject::tr("Options:") << '\n';
#ifndef Q_OS_WIN
stream << SHOW_VERSION_OPTION.usage() << wrapText(QObject::tr("Display program version and exit")) << '\n';
#endif
stream << SHOW_HELP_OPTION.usage() << wrapText(QObject::tr("Display this help message and exit")) << '\n';
stream << WEBUI_PORT_OPTION.usage(QObject::tr("port"))
<< wrapText(QObject::tr("Change the Web UI port"))
<< '\n';
#ifndef DISABLE_GUI
stream << NO_SPLASH_OPTION.usage() << wrapText(QObject::tr("Disable splash screen")) << '\n';
#else
stream << DAEMON_OPTION.usage() << wrapText(QObject::tr("Run in daemon-mode (background)")) << '\n';
#endif
//: Use appropriate short form or abbreviation of "directory"
stream << PROFILE_OPTION.usage(QObject::tr("dir"))
<< wrapText(QObject::tr("Store configuration files in <dir>")) << '\n';
stream << CONFIGURATION_OPTION.usage(QObject::tr("name"))
<< wrapText(QObject::tr("Store configuration files in directories qBittorrent_<name>")) << '\n';
stream << RELATIVE_FASTRESUME.usage()
<< wrapText(QObject::tr("Hack into libtorrent fastresume files and make file paths relative "
"to the profile directory")) << '\n';
stream << PORTABLE_OPTION.usage()
<< wrapText(QObject::tr("Shortcut for %1", "Shortcut for --profile=<exe dir>/profile --relative-fastresume")
.arg(QLatin1String("--profile=<exe dir>/profile --relative-fastresume"))) << '\n';
stream << Option::padUsageText(QObject::tr("files or URLs"))
<< wrapText(QObject::tr("Download the torrents passed by the user")) << '\n'
<< '\n';
stream << wrapText(QObject::tr("Options when adding new torrents:"), 0) << '\n';
stream << SAVE_PATH_OPTION.usage(QObject::tr("path")) << wrapText(QObject::tr("Torrent save path")) << '\n';
stream << PAUSED_OPTION.usage() << wrapText(QObject::tr("Add torrents as started or paused")) << '\n';
stream << SKIP_HASH_CHECK_OPTION.usage() << wrapText(QObject::tr("Skip hash check")) << '\n';
stream << CATEGORY_OPTION.usage(QObject::tr("name"))
<< wrapText(QObject::tr("Assign torrents to category. If the category doesn't exist, it will be "
"created.")) << '\n';
stream << SEQUENTIAL_OPTION.usage() << wrapText(QObject::tr("Download files in sequential order")) << '\n';
stream << FIRST_AND_LAST_OPTION.usage()
<< wrapText(QObject::tr("Download first and last pieces first")) << '\n';
stream << SKIP_DIALOG_OPTION.usage()
<< wrapText(QObject::tr("Specify whether the \"Add New Torrent\" dialog opens when adding a "
"torrent.")) << '\n';
stream << '\n';
stream << wrapText(QObject::tr("Option values may be supplied via environment variables. For option named "
"'parameter-name', environment variable name is 'QBT_PARAMETER_NAME' (in upper "
"case, '-' replaced with '_'). To pass flag values, set the variable to '1' or "
"'TRUE'. For example, to disable the splash screen: "), 0) << "\n"
<< QLatin1String("QBT_NO_SPLASH=1 ") << prgName << '\n'
<< wrapText(QObject::tr("Command line parameters take precedence over environment variables"), 0) << '\n';
stream << flush;
return text;
}
void displayUsage(const QString &prgName)
{
#ifndef Q_OS_WIN
std::cout << qPrintable(makeUsage(prgName)) << std::endl;
#else
QMessageBox msgBox(QMessageBox::Information, QObject::tr("Help"), makeUsage(prgName), QMessageBox::Ok);
msgBox.show(); // Need to be shown or to moveToCenter does not work
msgBox.move(Utils::Misc::screenCenter(&msgBox));
msgBox.exec();
#endif
}

View File

@@ -31,7 +31,6 @@
#include <QDebug>
#include <QScopedPointer>
#include <QThread>
#ifndef DISABLE_GUI
// GUI-only includes
@@ -44,7 +43,11 @@
#ifdef QBT_STATIC_QT
#include <QtPlugin>
#ifdef QBT_USES_QT5
Q_IMPORT_PLUGIN(QICOPlugin)
#else
Q_IMPORT_PLUGIN(qico)
#endif
#endif // QBT_STATIC_QT
#else
@@ -69,12 +72,9 @@ Q_IMPORT_PLUGIN(QICOPlugin)
#include <cstdlib>
#include <iostream>
#include "application.h"
#include "base/profile.h"
#include "base/utils/misc.h"
#include "base/preferences.h"
#include "cmdoptions.h"
#include "upgrade.h"
@@ -84,27 +84,52 @@ void sigNormalHandler(int signum);
void sigAbnormalHandler(int signum);
// sys_signame[] is only defined in BSD
const char *sysSigName[] = {
#if defined(Q_OS_WIN)
"", "", "SIGINT", "", "SIGILL", "", "SIGABRT_COMPAT", "", "SIGFPE", "",
"", "SIGSEGV", "", "", "", "SIGTERM", "", "", "", "",
"", "SIGBREAK", "SIGABRT", "", "", "", "", "", "", "",
"", ""
#else
"", "SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGTRAP", "SIGABRT", "SIGBUS", "SIGFPE", "SIGKILL",
"SIGUSR1", "SIGSEGV", "SIGUSR2", "SIGPIPE", "SIGALRM", "SIGTERM", "SIGSTKFLT", "SIGCHLD", "SIGCONT", "SIGSTOP",
"SIGTSTP", "SIGTTIN", "SIGTTOU", "SIGURG", "SIGXCPU", "SIGXFSZ", "SIGVTALRM", "SIGPROF", "SIGWINCH", "SIGIO",
"SIGPWR", "SIGUNUSED"
#endif
};
#endif
struct QBtCommandLineParameters
{
bool showHelp;
#ifndef Q_OS_WIN
bool showVersion;
#endif
#ifndef DISABLE_GUI
bool noSplash;
#else
bool shouldDaemonize;
#endif
int webUiPort;
QStringList torrents;
QString unknownParameter;
QBtCommandLineParameters()
: showHelp(false)
#ifndef Q_OS_WIN
, showVersion(false)
#endif
#ifndef DISABLE_GUI
, noSplash(Preferences::instance()->isSplashScreenDisabled())
#else
, shouldDaemonize(false)
#endif
, webUiPort(Preferences::instance()->getWebUiPort())
{
}
};
#if !defined Q_OS_WIN && !defined Q_OS_HAIKU
void reportToUser(const char* str);
#endif
void displayVersion();
void displayUsage(const QString &prg_name);
bool userAgreesWithLegalNotice();
void displayBadArgMessage(const QString &message);
QBtCommandLineParameters parseCommandLine();
#if !defined(DISABLE_GUI)
void showSplashScreen();
@@ -130,142 +155,206 @@ int main(int argc, char *argv[])
setupDpi();
#endif
try {
// Create Application
QString appId = QLatin1String("qBittorrent-") + Utils::Misc::getUserIDString();
QScopedPointer<Application> app(new Application(appId, argc, argv));
#ifndef DISABLE_GUI
// after the application object creation because we need a profile to be set already
// for the migration
migrateRSS();
migrateRSS();
#endif
const QBtCommandLineParameters params = app->commandLineArgs();
// Create Application
QString appId = QLatin1String("qBittorrent-") + Utils::Misc::getUserIDString();
QScopedPointer<Application> app(new Application(appId, argc, argv));
const QBtCommandLineParameters params = parseCommandLine();
if (!params.unknownParameter.isEmpty()) {
displayBadArgMessage(QObject::tr("%1 is an unknown command line parameter.", "--random-parameter is an unknown command line parameter.")
.arg(params.unknownParameter));
return EXIT_FAILURE;
}
if (!params.unknownParameter.isEmpty()) {
throw CommandLineParameterError(QObject::tr("%1 is an unknown command line parameter.",
"--random-parameter is an unknown command line parameter.")
.arg(params.unknownParameter));
}
#ifndef Q_OS_WIN
if (params.showVersion) {
if (isOneArg) {
displayVersion();
return EXIT_SUCCESS;
}
throw CommandLineParameterError(QObject::tr("%1 must be the single command line parameter.")
.arg(QLatin1String("-v (or --version)")));
if (params.showVersion) {
if (isOneArg) {
displayVersion();
return EXIT_SUCCESS;
}
else {
displayBadArgMessage(QObject::tr("%1 must be the single command line parameter.")
.arg(QLatin1String("-v (or --version)")));
return EXIT_FAILURE;
}
}
#endif
if (params.showHelp) {
if (isOneArg) {
displayUsage(argv[0]);
return EXIT_SUCCESS;
}
throw CommandLineParameterError(QObject::tr("%1 must be the single command line parameter.")
.arg(QLatin1String("-h (or --help)")));
}
// Set environment variable
if (!qputenv("QBITTORRENT", QBT_VERSION))
std::cerr << "Couldn't set environment variable...\n";
if (params.showHelp) {
if (isOneArg) {
displayUsage(argv[0]);
return EXIT_SUCCESS;
}
else {
displayBadArgMessage(QObject::tr("%1 must be the single command line parameter.")
.arg(QLatin1String("-h (or --help)")));
return EXIT_FAILURE;
}
}
if ((params.webUiPort > 0) && (params.webUiPort <= 65535)) {
Preferences::instance()->setWebUiPort(params.webUiPort);
}
else {
displayBadArgMessage(QObject::tr("%1 must specify the correct port (1 to 65535).")
.arg(QLatin1String("--webui-port")));
return EXIT_FAILURE;
}
// Set environment variable
if (!qputenv("QBITTORRENT", QBT_VERSION))
std::cerr << "Couldn't set environment variable...\n";
#ifndef DISABLE_GUI
if (!userAgreesWithLegalNotice())
return EXIT_SUCCESS;
if (!userAgreesWithLegalNotice())
return EXIT_SUCCESS;
#else
if (!params.shouldDaemonize
&& isatty(fileno(stdin))
&& isatty(fileno(stdout))
&& !userAgreesWithLegalNotice())
return EXIT_SUCCESS;
if (!params.shouldDaemonize
&& isatty(fileno(stdin))
&& isatty(fileno(stdout))
&& !userAgreesWithLegalNotice())
return EXIT_SUCCESS;
#endif
// Check if qBittorrent is already running for this user
if (app->isRunning()) {
// Check if qBittorrent is already running for this user
if (app->isRunning()) {
#ifdef DISABLE_GUI
if (params.shouldDaemonize) {
throw CommandLineParameterError(QObject::tr("You cannot use %1: qBittorrent is already running for this user.")
.arg(QLatin1String("-d (or --daemon)")));
}
else
#endif
qDebug("qBittorrent is already running for this user.");
QThread::msleep(300);
app->sendParams(params.paramList());
return EXIT_SUCCESS;
if (params.shouldDaemonize) {
displayBadArgMessage(QObject::tr("You cannot use %1: qBittorrent is already running for this user.")
.arg(QLatin1String("-d (or --daemon)")));
return EXIT_FAILURE;
}
else
#endif
qDebug("qBittorrent is already running for this user.");
#if defined(Q_OS_WIN)
// This affects only Windows apparently and Qt5.
// When QNetworkAccessManager is instantiated it regularly starts polling
// the network interfaces to see what's available and their status.
// This polling creates jitter and high ping with wifi interfaces.
// So here we disable it for lack of better measure.
// It will also spew this message in the console: QObject::startTimer: Timers cannot have negative intervals
// For more info see:
// 1. https://github.com/qbittorrent/qBittorrent/issues/4209
// 2. https://bugreports.qt.io/browse/QTBUG-40332
// 3. https://bugreports.qt.io/browse/QTBUG-46015
Utils::Misc::msleep(300);
app->sendParams(params.torrents);
qputenv("QT_BEARER_POLL_TIMEOUT", QByteArray::number(-1));
return EXIT_SUCCESS;
}
#if defined(Q_OS_WIN) && defined(QBT_USES_QT5)
// This affects only Windows apparently and Qt5.
// When QNetworkAccessManager is instantiated it regularly starts polling
// the network interfaces to see what's available and their status.
// This polling creates jitter and high ping with wifi interfaces.
// So here we disable it for lack of better measure.
// It will also spew this message in the console: QObject::startTimer: Timers cannot have negative intervals
// For more info see:
// 1. https://github.com/qbittorrent/qBittorrent/issues/4209
// 2. https://bugreports.qt.io/browse/QTBUG-40332
// 3. https://bugreports.qt.io/browse/QTBUG-46015
qputenv("QT_BEARER_POLL_TIMEOUT", QByteArray::number(-1));
#endif
#if defined(Q_OS_MAC)
// Since Apple made difficult for users to set PATH, we set here for convenience.
// Users are supposed to install Homebrew Python for search function.
// For more info see issue #5571.
QByteArray path = "/usr/local/bin:";
path += qgetenv("PATH");
qputenv("PATH", path.constData());
// On OS X the standard is to not show icons in the menus
app->setAttribute(Qt::AA_DontShowIconsInMenus);
{
// Since Apple made difficult for users to set PATH, we set here for convenience.
// Users are supposed to install Homebrew Python for search function.
// For more info see issue #5571.
QByteArray path = "/usr/local/bin:";
path += qgetenv("PATH");
qputenv("PATH", path.constData());
}
#endif
#ifndef DISABLE_GUI
if (!upgrade()) return EXIT_FAILURE;
if (!upgrade()) return EXIT_FAILURE;
#else
if (!upgrade(!params.shouldDaemonize
&& isatty(fileno(stdin))
&& isatty(fileno(stdout)))) return EXIT_FAILURE;
if (!upgrade(!params.shouldDaemonize
&& isatty(fileno(stdin))
&& isatty(fileno(stdout)))) return EXIT_FAILURE;
#endif
#ifdef DISABLE_GUI
if (params.shouldDaemonize) {
app.reset(); // Destroy current application
if ((daemon(1, 0) == 0)) {
app.reset(new Application(appId, argc, argv));
if (app->isRunning()) {
// Another instance had time to start.
return EXIT_FAILURE;
}
}
else {
qCritical("Something went wrong while daemonizing, exiting...");
if (params.shouldDaemonize) {
app.reset(); // Destroy current application
if ((daemon(1, 0) == 0)) {
app.reset(new Application(appId, argc, argv));
if (app->isRunning()) {
// Another instance had time to start.
return EXIT_FAILURE;
}
}
else {
qCritical("Something went wrong while daemonizing, exiting...");
return EXIT_FAILURE;
}
}
#else
if (!(params.noSplash || Preferences::instance()->isSplashScreenDisabled()))
showSplashScreen();
if (!params.noSplash)
showSplashScreen();
#endif
#if defined(Q_OS_UNIX) || defined(STACKTRACE_WIN)
signal(SIGINT, sigNormalHandler);
signal(SIGTERM, sigNormalHandler);
signal(SIGABRT, sigAbnormalHandler);
signal(SIGSEGV, sigAbnormalHandler);
signal(SIGINT, sigNormalHandler);
signal(SIGTERM, sigNormalHandler);
signal(SIGABRT, sigAbnormalHandler);
signal(SIGSEGV, sigAbnormalHandler);
#endif
return app->exec(params.paramList());
}
catch (CommandLineParameterError &er) {
displayBadArgMessage(er.messageForUser());
return EXIT_FAILURE;
return app->exec(params.torrents);
}
QBtCommandLineParameters parseCommandLine()
{
QBtCommandLineParameters result;
QStringList appArguments = qApp->arguments();
for (int i = 1; i < appArguments.size(); ++i) {
const QString& arg = appArguments[i];
if ((arg.startsWith("--") && !arg.endsWith(".torrent")) ||
(arg.startsWith("-") && arg.size() == 2)) {
//Parse known parameters
if ((arg == QLatin1String("-h")) || (arg == QLatin1String("--help"))) {
result.showHelp = true;
}
#ifndef Q_OS_WIN
else if ((arg == QLatin1String("-v")) || (arg == QLatin1String("--version"))) {
result.showVersion = true;
}
#endif
else if (arg.startsWith(QLatin1String("--webui-port="))) {
QStringList parts = arg.split(QLatin1Char('='));
if (parts.size() == 2)
result.webUiPort = parts.last().toInt();
}
#ifndef DISABLE_GUI
else if (arg == QLatin1String("--no-splash")) {
result.noSplash = true;
}
#else
else if ((arg == QLatin1String("-d")) || (arg == QLatin1String("--daemon"))) {
result.shouldDaemonize = true;
}
#endif
else {
//Unknown argument
result.unknownParameter = arg;
break;
}
}
else {
QFileInfo torrentPath;
torrentPath.setFile(arg);
if (torrentPath.exists())
result.torrents += torrentPath.absoluteFilePath();
else
result.torrents += arg;
}
}
return result;
}
#if !defined Q_OS_WIN && !defined Q_OS_HAIKU
@@ -283,11 +372,12 @@ void reportToUser(const char* str)
void sigNormalHandler(int signum)
{
#if !defined Q_OS_WIN && !defined Q_OS_HAIKU
const char msg1[] = "Catching signal: ";
const char msg2[] = "\nExiting cleanly\n";
reportToUser(msg1);
reportToUser(sysSigName[signum]);
reportToUser(msg2);
const char str1[] = "Catching signal: ";
const char *sigName = sysSigName[signum];
const char str2[] = "\nExiting cleanly\n";
reportToUser(str1);
reportToUser(sigName);
reportToUser(str2);
#endif // !defined Q_OS_WIN && !defined Q_OS_HAIKU
signal(signum, SIG_DFL);
qApp->exit(); // unsafe, but exit anyway
@@ -295,20 +385,19 @@ void sigNormalHandler(int signum)
void sigAbnormalHandler(int signum)
{
const char *sigName = sysSigName[signum];
#if !defined Q_OS_WIN && !defined Q_OS_HAIKU
const char msg[] = "\n\n*************************************************************\n"
"Please file a bug report at http://bug.qbittorrent.org and provide the following information:\n\n"
"qBittorrent version: " QBT_VERSION "\n\n"
"Caught signal: ";
reportToUser(msg);
const char str1[] = "\n\n*************************************************************\nCatching signal: ";
const char *sigName = sysSigName[signum];
const char str2[] = "\nPlease file a bug report at http://bug.qbittorrent.org and provide the following information:\n\n"
"qBittorrent version: " QBT_VERSION "\n";
reportToUser(str1);
reportToUser(sigName);
reportToUser("\n");
reportToUser(str2);
print_stacktrace(); // unsafe
#endif // !defined Q_OS_WIN && !defined Q_OS_HAIKU
#ifdef STACKTRACE_WIN
StraceDlg dlg; // unsafe
dlg.setStacktraceString(QLatin1String(sigName), straceWin::getBacktrace());
dlg.setStacktraceString(straceWin::getBacktrace());
dlg.exec();
#endif // STACKTRACE_WIN
signal(signum, SIG_DFL);
@@ -345,6 +434,53 @@ void displayVersion()
std::cout << qPrintable(qApp->applicationName()) << " " << QBT_VERSION << std::endl;
}
QString makeUsage(const QString &prg_name)
{
QString text;
text += QObject::tr("Usage:") + QLatin1Char('\n');
#ifndef Q_OS_WIN
text += QLatin1Char('\t') + prg_name + QLatin1String(" (-v | --version)") + QLatin1Char('\n');
#endif
text += QLatin1Char('\t') + prg_name + QLatin1String(" (-h | --help)") + QLatin1Char('\n');
text += QLatin1Char('\t') + prg_name
+ QLatin1String(" [--webui-port=<port>]")
#ifndef DISABLE_GUI
+ QLatin1String(" [--no-splash]")
#else
+ QLatin1String(" [-d | --daemon]")
#endif
+ QLatin1String("[(<filename> | <url>)...]") + QLatin1Char('\n');
text += QObject::tr("Options:") + QLatin1Char('\n');
#ifndef Q_OS_WIN
text += QLatin1String("\t-v | --version\t\t") + QObject::tr("Displays program version") + QLatin1Char('\n');
#endif
text += QLatin1String("\t-h | --help\t\t") + QObject::tr("Displays this help message") + QLatin1Char('\n');
text += QLatin1String("\t--webui-port=<port>\t")
+ QObject::tr("Changes the Web UI port (current: %1)").arg(QString::number(Preferences::instance()->getWebUiPort()))
+ QLatin1Char('\n');
#ifndef DISABLE_GUI
text += QLatin1String("\t--no-splash\t\t") + QObject::tr("Disable splash screen") + QLatin1Char('\n');
#else
text += QLatin1String("\t-d | --daemon\t\t") + QObject::tr("Run in daemon-mode (background)") + QLatin1Char('\n');
#endif
text += QLatin1String("\tfiles or urls\t\t") + QObject::tr("Downloads the torrents passed by the user");
return text;
}
void displayUsage(const QString& prg_name)
{
#ifndef Q_OS_WIN
std::cout << qPrintable(makeUsage(prg_name)) << std::endl;
#else
QMessageBox msgBox(QMessageBox::Information, QObject::tr("Help"), makeUsage(prg_name), QMessageBox::Ok);
msgBox.show(); // Need to be shown or to moveToCenter does not work
msgBox.move(Utils::Misc::screenCenter(&msgBox));
msgBox.exec();
#endif
}
void displayBadArgMessage(const QString& message)
{
QString help = QObject::tr("Run application with -h option to read about command line parameters.");

View File

@@ -16,16 +16,21 @@ else (GUI)
list(APPEND QBT_QTSINGLEAPPLICATION_SOURCES qtsinglecoreapplication.cpp)
endif (GUI)
add_library(qtsingleapplication STATIC ${QBT_QTSINGLEAPPLICATION_HEADERS} ${QBT_QTSINGLEAPPLICATION_SOURCES})
add_library(qtsingleapplication ${QBT_QTSINGLEAPPLICATION_HEADERS} ${QBT_QTSINGLEAPPLICATION_SOURCES})
target_include_directories(qtsingleapplication INTERFACE "${qtsingleapplication_SOURCE_DIR}")
target_link_qt_components(qtsingleapplication Network)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
target_compile_options(qtsingleapplication PRIVATE "-w") # disable warning for 3rdparty code
endif()
if (QT4_FOUND)
target_link_libraries(qtsingleapplication Qt4::QtNetwork)
else (QT4_FOUND)
target_link_libraries(qtsingleapplication Qt5::Network)
endif (QT4_FOUND)
if (GUI)
target_link_qt_components(qtsingleapplication Widgets)
if (QT4_FOUND)
target_link_libraries(qtsingleapplication Qt4::QtGui)
else (QT4_FOUND)
target_link_libraries(qtsingleapplication Qt5::Widgets)
endif(QT4_FOUND)
endif (GUI)
add_library(QtSingleApplication::QtSingleApplication ALIAS qtsingleapplication)

View File

@@ -176,17 +176,8 @@ void QtLocalPeer::receiveConnection()
if (!socket)
return;
while (true) {
if (socket->state() == QLocalSocket::UnconnectedState) {
qWarning("QtLocalPeer: Peer disconnected");
delete socket;
return;
}
if (socket->bytesAvailable() >= qint64(sizeof(quint32)))
break;
while (socket->bytesAvailable() < (int)sizeof(quint32))
socket->waitForReadyRead();
}
QDataStream ds(socket);
QByteArray uMsg;
quint32 remaining;

View File

@@ -14,7 +14,7 @@
/** Print a demangled stack backtrace of the caller function to FILE* out. */
static inline void print_stacktrace(FILE *out = stderr, unsigned int max_frames = 63)
{
fprintf(out, "Stack trace:\n");
fprintf(out, "stack trace:\n");
// storage array for stack trace address data
std::vector<void *> addrlist(max_frames + 1);
@@ -33,7 +33,7 @@ static inline void print_stacktrace(FILE *out = stderr, unsigned int max_frames
// allocate string which will be filled with the demangled function name
size_t funcnamesize = 256;
char *funcname = static_cast<char *>(malloc(funcnamesize));
char *funcname = (char *)malloc(funcnamesize);
int functionNamesFound = 0;
// iterate over the returned symbol lines. skip the first, it is the

View File

@@ -40,13 +40,13 @@ class StraceDlg : public QDialog, private Ui::errorDialog
Q_OBJECT
public:
StraceDlg(QWidget *parent = nullptr)
StraceDlg(QWidget* parent = 0)
: QDialog(parent)
{
setupUi(this);
}
void setStacktraceString(const QString &sigName, const QString &trace)
void setStacktraceString(const QString& trace)
{
// try to call Qt function as less as possible
QString htmlStr = QString(
@@ -68,16 +68,14 @@ public:
"Libtorrent version: %1<br/>"
"Qt version: " QT_VERSION_STR "<br/>"
"Boost version: %2<br/>"
"OS version: %3<br/><br/>"
"Caught signal: %4"
"</font></p>"
"<pre><code>%5</code></pre>"
"OS version: %3"
"</font></p><br/>"
"<pre><code>%4</code></pre>"
"<br/><hr><br/><br/>")
.arg(Utils::Misc::libtorrentVersionString())
.arg(Utils::Misc::boostVersionString())
.arg(Utils::Misc::osName())
.arg(sigName)
.arg(trace);
.arg(Utils::Misc::libtorrentVersionString())
.arg(Utils::Misc::boostVersionString())
.arg(Utils::Misc::osName())
.arg(trace);
errorText->setHtml(htmlStr);
}

View File

@@ -47,16 +47,13 @@
#endif
#include <QRegExp>
#include <QString>
#ifdef Q_OS_MAC
#include <QSettings>
#endif
#include "base/logger.h"
#include "base/profile.h"
#include "base/utils/fs.h"
#include "base/utils/misc.h"
#include "base/utils/string.h"
#include "base/preferences.h"
#include "base/qinisettings.h"
bool userAcceptsUpgrade()
{
@@ -122,7 +119,7 @@ bool upgradeResumeFile(const QString &filepath, const QVariantHash &oldTorrent =
}
else {
queuePosition = fastOld.dict_find_int_value("qBt-queuePosition", 0);
fastNew["qBt-name"] = oldTorrent.value("name").toString().toStdString();
fastNew["qBt-name"] = Utils::String::toStdString(oldTorrent.value("name").toString());
fastNew["qBt-tempPathDisabled"] = false;
}
@@ -148,7 +145,7 @@ bool upgrade(bool ask = true)
// Upgrade preferences
Preferences::instance()->upgrade();
QString backupFolderPath = Utils::Fs::expandPathAbs(specialFolderLocation(SpecialFolder::Data) + "BT_backup");
QString backupFolderPath = Utils::Fs::expandPathAbs(Utils::Fs::QDesktopServicesDataLocation() + "BT_backup");
QDir backupFolderDir(backupFolderPath);
// ****************************************************************************************
@@ -159,10 +156,15 @@ bool upgrade(bool ask = true)
upgradeResumeFile(backupFolderDir.absoluteFilePath(backupFile));
// ****************************************************************************************
SettingsPtr oldResumeSettings = Profile::instance().applicationSettings(QLatin1String("qBittorrent-resume"));
#ifdef Q_OS_MAC
// native .plist
QSettings *oldResumeSettings = new QSettings("qBittorrent", "qBittorrent-resume");
#else
QIniSettings *oldResumeSettings = new QIniSettings("qBittorrent", "qBittorrent-resume");
#endif
QString oldResumeFilename = oldResumeSettings->fileName();
QVariantHash oldResumeData = oldResumeSettings->value("torrents").toHash();
oldResumeSettings.reset();
delete oldResumeSettings;
if (oldResumeData.isEmpty()) {
Utils::Fs::forceRemove(oldResumeFilename);
@@ -190,14 +192,14 @@ bool upgrade(bool ask = true)
QVariantHash oldTorrent = oldResumeData[hash].toHash();
if (oldTorrent.value("is_magnet", false).toBool()) {
libtorrent::entry resumeData;
resumeData["qBt-magnetUri"] = oldTorrent.value("magnet_uri").toString().toStdString();
resumeData["qBt-magnetUri"] = Utils::String::toStdString(oldTorrent.value("magnet_uri").toString());
resumeData["qBt-paused"] = false;
resumeData["qBt-forced"] = false;
resumeData["qBt-savePath"] = oldTorrent.value("save_path").toString().toStdString();
resumeData["qBt-ratioLimit"] = static_cast<int>(oldTorrent.value("max_ratio", -2).toReal() * 1000);
resumeData["qBt-label"] = oldTorrent.value("label").toString().toStdString();
resumeData["qBt-name"] = oldTorrent.value("name").toString().toStdString();
resumeData["qBt-savePath"] = Utils::String::toStdString(oldTorrent.value("save_path").toString());
resumeData["qBt-ratioLimit"] = Utils::String::toStdString(QString::number(oldTorrent.value("max_ratio", -2).toReal()));
resumeData["qBt-label"] = Utils::String::toStdString(oldTorrent.value("label").toString());
resumeData["qBt-name"] = Utils::String::toStdString(oldTorrent.value("name").toString());
resumeData["qBt-seedStatus"] = oldTorrent.value("seed").toBool();
resumeData["qBt-tempPathDisabled"] = false;
@@ -229,7 +231,7 @@ bool upgrade(bool ask = true)
#ifdef Q_OS_MAC
void migratePlistToIni(const QString &application)
{
QSettings iniFile(QSettings::IniFormat, QSettings::UserScope, "qBittorrent", application);
QIniSettings iniFile("qBittorrent", application);
if (!iniFile.allKeys().isEmpty()) return; // We copy the contents of plist, only if inifile does not exist(is empty).
QSettings *plistFile = new QSettings("qBittorrent", application);
@@ -258,16 +260,16 @@ void macMigratePlists()
void migrateRSS()
{
// Copy old feed items to new file if needed
SettingsPtr qBTRSS = Profile::instance().applicationSettings(QLatin1String("qBittorrent-rss-feeds"));
if (!qBTRSS->allKeys().isEmpty()) return; // We move the contents of RSS old_items only if inifile does not exist (is empty).
QIniSettings qBTRSS("qBittorrent", "qBittorrent-rss-feeds");
if (!qBTRSS.allKeys().isEmpty()) return; // We move the contents of RSS old_items only if inifile does not exist (is empty).
SettingsPtr qBTRSSLegacy = Profile::instance().applicationSettings(QLatin1String("qBittorrent-rss"));
QHash<QString, QVariant> allOldItems = qBTRSSLegacy->value("old_items", QHash<QString, QVariant>()).toHash();
QIniSettings qBTRSSLegacy("qBittorrent", "qBittorrent-rss");
QHash<QString, QVariant> allOldItems = qBTRSSLegacy.value("old_items", QHash<QString, QVariant>()).toHash();
if (!allOldItems.empty()) {
qDebug("Moving %d old items for feeds to qBittorrent-rss-feeds", allOldItems.size());
qBTRSS->setValue("old_items", allOldItems);
qBTRSSLegacy->remove("old_items");
qBTRSS.setValue("old_items", allOldItems);
qBTRSSLegacy.remove("old_items");
}
}
#endif

View File

@@ -1,7 +1,6 @@
find_package(ZLIB 1.2.5.2 REQUIRED)
set(QBT_BASE_HEADERS
bittorrent/addtorrentparams.h
bittorrent/cachestatus.h
bittorrent/infohash.h
bittorrent/magneturi.h
@@ -34,30 +33,25 @@ net/private/geoipdatabase.h
net/proxyconfigurationmanager.h
net/reverseresolution.h
net/smtp.h
private/profile_p.h
rss/private/rss_parser.h
rss/rss_article.h
rss/rss_autodownloader.h
rss/rss_autodownloadrule.h
rss/rss_feed.h
rss/rss_folder.h
rss/rss_item.h
rss/rss_session.h
rss/private/rssparser.h
rss/rssarticle.h
rss/rssdownloadrule.h
rss/rssdownloadrulelist.h
rss/rssfeed.h
rss/rssfile.h
rss/rssfolder.h
rss/rssmanager.h
utils/fs.h
utils/gzip.h
utils/misc.h
utils/net.h
utils/random.h
utils/string.h
utils/version.h
asyncfilestorage.h
filesystemwatcher.h
global.h
iconprovider.h
indexrange.h
logger.h
preferences.h
profile.h
qinisettings.h
scanfoldersmodel.h
searchengine.h
settingsstorage.h
@@ -69,6 +63,7 @@ unicodestrings.h
)
set(QBT_BASE_SOURCES
bittorrent/cachestatus.cpp
bittorrent/infohash.cpp
bittorrent/magneturi.cpp
bittorrent/peerinfo.cpp
@@ -78,6 +73,7 @@ bittorrent/private/resumedatasavingmanager.cpp
bittorrent/private/speedmonitor.cpp
bittorrent/private/statistics.cpp
bittorrent/session.cpp
bittorrent/sessionstatus.cpp
bittorrent/torrentcreatorthread.cpp
bittorrent/torrenthandle.cpp
bittorrent/torrentinfo.cpp
@@ -97,27 +93,23 @@ net/private/geoipdatabase.cpp
net/proxyconfigurationmanager.cpp
net/reverseresolution.cpp
net/smtp.cpp
private/profile_p.cpp
rss/private/rss_parser.cpp
rss/rss_article.cpp
rss/rss_autodownloader.cpp
rss/rss_autodownloadrule.cpp
rss/rss_feed.cpp
rss/rss_folder.cpp
rss/rss_item.cpp
rss/rss_session.cpp
rss/private/rssparser.cpp
rss/rssarticle.cpp
rss/rssdownloadrule.cpp
rss/rssdownloadrulelist.cpp
rss/rssfeed.cpp
rss/rssfile.cpp
rss/rssfolder.cpp
rss/rssmanager.cpp
utils/fs.cpp
utils/gzip.cpp
utils/misc.cpp
utils/net.cpp
utils/random.cpp
utils/string.cpp
asyncfilestorage.cpp
filesystemwatcher.cpp
iconprovider.cpp
logger.cpp
preferences.cpp
profile.cpp
scanfoldersmodel.cpp
searchengine.cpp
settingsstorage.cpp
@@ -129,10 +121,15 @@ tristatebool.cpp
add_library(qbt_base STATIC ${QBT_BASE_HEADERS} ${QBT_BASE_SOURCES})
target_link_libraries(qbt_base PRIVATE ZLIB::ZLIB PUBLIC LibtorrentRasterbar::LibTorrent)
target_link_qt_components(qbt_base PUBLIC Core Network Xml)
if (GUI)
target_link_libraries(qbt_base PUBLIC Qt5::Gui Qt5::Widgets)
endif (GUI)
if (QT4_FOUND)
if (GUI)
target_link_libraries(qbt_base PUBLIC Qt4::QtGui)
endif (GUI)
else (QT4_FOUND)
if (GUI)
target_link_libraries(qbt_base PUBLIC Qt5::Gui Qt5::Widgets)
endif (GUI)
endif (QT4_FOUND)
if (DBUS)
target_link_qt_components(qbt_base PRIVATE DBus)
@@ -141,6 +138,5 @@ endif ()
if (APPLE)
find_library(IOKit_LIBRARY IOKit)
find_library(Carbon_LIBRARY Carbon)
find_library(AppKit_LIBRARY AppKit)
target_link_libraries(qbt_base PRIVATE ${Carbon_LIBRARY} ${IOKit_LIBRARY} ${AppKit_LIBRARY})
target_link_libraries(qbt_base PRIVATE ${Carbon_LIBRARY} ${IOKit_LIBRARY})
endif (APPLE)

View File

@@ -1,88 +0,0 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2017 Vladimir Golovnev <glassez@yandex.ru>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give permission to
* link this program with the OpenSSL project's "OpenSSL" library (or with
* modified versions of it that use the same license as the "OpenSSL" library),
* and distribute the linked executables. You must obey the GNU General Public
* License in all respects for all of the code used other than "OpenSSL". If you
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*/
#include "asyncfilestorage.h"
#include <QDebug>
#include <QMetaObject>
#include <QSaveFile>
AsyncFileStorage::AsyncFileStorage(const QString &storageFolderPath, QObject *parent)
: QObject(parent)
, m_storageDir(storageFolderPath)
, m_lockFile(m_storageDir.absoluteFilePath(QStringLiteral("storage.lock")))
{
if (!m_storageDir.mkpath(m_storageDir.absolutePath()))
throw AsyncFileStorageError(
QString("Could not create directory '%1'.").arg(m_storageDir.absolutePath()));
// TODO: This folder locking approach does not work for UNIX systems. Implement it.
if (!m_lockFile.open(QFile::WriteOnly))
throw AsyncFileStorageError(m_lockFile.errorString());
}
AsyncFileStorage::~AsyncFileStorage()
{
m_lockFile.close();
m_lockFile.remove();
}
void AsyncFileStorage::store(const QString &fileName, const QByteArray &data)
{
QMetaObject::invokeMethod(this, "store_impl", Qt::QueuedConnection
, Q_ARG(QString, fileName), Q_ARG(QByteArray, data));
}
QDir AsyncFileStorage::storageDir() const
{
return m_storageDir;
}
void AsyncFileStorage::store_impl(const QString &fileName, const QByteArray &data)
{
const QString filePath = m_storageDir.absoluteFilePath(fileName);
QSaveFile file(filePath);
qDebug() << "AsyncFileStorage: Saving data to" << filePath;
if (file.open(QIODevice::WriteOnly)) {
file.write(data);
if (!file.commit()) {
qDebug() << "AsyncFileStorage: Failed to save data";
emit failed(filePath, file.errorString());
}
}
}
AsyncFileStorageError::AsyncFileStorageError(const QString &message)
: std::runtime_error(message.toUtf8().data())
{
}
QString AsyncFileStorageError::message() const
{
return what();
}

View File

@@ -1,8 +1,8 @@
HEADERS += \
$$PWD/asyncfilestorage.h \
$$PWD/types.h \
$$PWD/tristatebool.h \
$$PWD/filesystemwatcher.h \
$$PWD/qinisettings.h \
$$PWD/logger.h \
$$PWD/settingsstorage.h \
$$PWD/settingvalue.h \
@@ -25,7 +25,6 @@ HEADERS += \
$$PWD/net/reverseresolution.h \
$$PWD/net/smtp.h \
$$PWD/net/private/geoipdatabase.h \
$$PWD/bittorrent/addtorrentparams.h \
$$PWD/bittorrent/infohash.h \
$$PWD/bittorrent/session.h \
$$PWD/bittorrent/sessionstatus.h \
@@ -42,32 +41,26 @@ HEADERS += \
$$PWD/bittorrent/private/filterparserthread.h \
$$PWD/bittorrent/private/statistics.h \
$$PWD/bittorrent/private/resumedatasavingmanager.h \
$$PWD/rss/rss_article.h \
$$PWD/rss/rss_item.h \
$$PWD/rss/rss_feed.h \
$$PWD/rss/rss_folder.h \
$$PWD/rss/rss_session.h \
$$PWD/rss/rss_autodownloader.h \
$$PWD/rss/rss_autodownloadrule.h \
$$PWD/rss/private/rss_parser.h \
$$PWD/rss/rssmanager.h \
$$PWD/rss/rssfeed.h \
$$PWD/rss/rssfolder.h \
$$PWD/rss/rssfile.h \
$$PWD/rss/rssarticle.h \
$$PWD/rss/rssdownloadrule.h \
$$PWD/rss/rssdownloadrulelist.h \
$$PWD/rss/private/rssparser.h \
$$PWD/utils/fs.h \
$$PWD/utils/gzip.h \
$$PWD/utils/misc.h \
$$PWD/utils/net.h \
$$PWD/utils/random.h \
$$PWD/utils/string.h \
$$PWD/utils/version.h \
$$PWD/profile.h \
$$PWD/private/profile_p.h \
$$PWD/unicodestrings.h \
$$PWD/torrentfileguard.h \
$$PWD/torrentfilter.h \
$$PWD/scanfoldersmodel.h \
$$PWD/searchengine.h \
$$PWD/global.h
$$PWD/searchengine.h
SOURCES += \
$$PWD/asyncfilestorage.cpp \
$$PWD/tristatebool.cpp \
$$PWD/filesystemwatcher.cpp \
$$PWD/logger.cpp \
@@ -90,6 +83,8 @@ SOURCES += \
$$PWD/net/private/geoipdatabase.cpp \
$$PWD/bittorrent/infohash.cpp \
$$PWD/bittorrent/session.cpp \
$$PWD/bittorrent/sessionstatus.cpp \
$$PWD/bittorrent/cachestatus.cpp \
$$PWD/bittorrent/magneturi.cpp \
$$PWD/bittorrent/torrentinfo.cpp \
$$PWD/bittorrent/torrenthandle.cpp \
@@ -102,22 +97,19 @@ SOURCES += \
$$PWD/bittorrent/private/filterparserthread.cpp \
$$PWD/bittorrent/private/statistics.cpp \
$$PWD/bittorrent/private/resumedatasavingmanager.cpp \
$$PWD/rss/rss_article.cpp \
$$PWD/rss/rss_item.cpp \
$$PWD/rss/rss_feed.cpp \
$$PWD/rss/rss_folder.cpp \
$$PWD/rss/rss_session.cpp \
$$PWD/rss/rss_autodownloader.cpp \
$$PWD/rss/rss_autodownloadrule.cpp \
$$PWD/rss/private/rss_parser.cpp \
$$PWD/rss/rssmanager.cpp \
$$PWD/rss/rssfeed.cpp \
$$PWD/rss/rssfolder.cpp \
$$PWD/rss/rssarticle.cpp \
$$PWD/rss/rssdownloadrule.cpp \
$$PWD/rss/rssdownloadrulelist.cpp \
$$PWD/rss/rssfile.cpp \
$$PWD/rss/private/rssparser.cpp \
$$PWD/utils/fs.cpp \
$$PWD/utils/gzip.cpp \
$$PWD/utils/misc.cpp \
$$PWD/utils/net.cpp \
$$PWD/utils/random.cpp \
$$PWD/utils/string.cpp \
$$PWD/profile.cpp \
$$PWD/private/profile_p.cpp \
$$PWD/torrentfileguard.cpp \
$$PWD/torrentfilter.cpp \
$$PWD/scanfoldersmodel.cpp \

View File

@@ -26,33 +26,44 @@
* exception statement from your version.
*/
#pragma once
#include <libtorrent/version.hpp>
#include "cachestatus.h"
#include <QSet>
#include <QString>
#include <QVector>
using namespace BitTorrent;
#include "../tristatebool.h"
namespace BitTorrent
CacheStatus::CacheStatus(const libtorrent::cache_status &nativeStatus)
: m_nativeStatus(nativeStatus)
{
struct AddTorrentParams
{
QString name;
QString category;
QSet<QString> tags;
QString savePath;
bool disableTempPath = false; // e.g. for imported torrents
bool sequential = false;
bool firstLastPiecePriority = false;
TriStateBool addForced;
TriStateBool addPaused;
QVector<int> filePriorities; // used if TorrentInfo is set
bool ignoreShareLimits = false;
bool skipChecking = false;
TriStateBool createSubfolder;
TriStateBool useAutoTMM;
int uploadLimit = -1;
int downloadLimit = -1;
};
}
int CacheStatus::totalUsedBuffers() const
{
return m_nativeStatus.total_used_buffers;
}
qreal CacheStatus::readRatio() const
{
if (m_nativeStatus.blocks_read > 0)
return (static_cast<qreal>(m_nativeStatus.blocks_read_hit) / m_nativeStatus.blocks_read);
else
return -1;
}
int CacheStatus::jobQueueLength() const
{
#if LIBTORRENT_VERSION_NUM < 10100
return m_nativeStatus.job_queue_length;
#else
return m_nativeStatus.queued_jobs;
#endif
}
int CacheStatus::averageJobTime() const
{
return m_nativeStatus.average_job_time;
}
qlonglong CacheStatus::queuedBytes() const
{
return m_nativeStatus.queued_bytes;
}

View File

@@ -1,6 +1,6 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2015, 2017 Vladimir Golovnev <glassez@yandex.ru>
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -30,16 +30,23 @@
#define BITTORRENT_CACHESTATUS_H
#include <QtGlobal>
#include <libtorrent/disk_io_thread.hpp>
namespace BitTorrent
{
struct CacheStatus
class CacheStatus
{
quint64 totalUsedBuffers = 0;
quint64 jobQueueLength = 0;
quint64 averageJobTime = 0;
quint64 queuedBytes = 0;
qreal readRatio = 0.0;
public:
CacheStatus(const libtorrent::cache_status &nativeStatus);
int totalUsedBuffers() const;
qreal readRatio() const;
int jobQueueLength() const;
int averageJobTime() const;
qlonglong queuedBytes() const;
private:
libtorrent::cache_status m_nativeStatus;
};
}

View File

@@ -41,7 +41,7 @@ InfoHash::InfoHash(const libtorrent::sha1_hash &nativeHash)
, m_nativeHash(nativeHash)
{
char out[(libtorrent::sha1_hash::size * 2) + 1];
libtorrent::to_hex(reinterpret_cast<const char*>(&m_nativeHash[0]), libtorrent::sha1_hash::size, out);
libtorrent::to_hex((char const*)&m_nativeHash[0], libtorrent::sha1_hash::size, out);
m_hashString = QString(out);
}
@@ -51,7 +51,7 @@ InfoHash::InfoHash(const QString &hashString)
{
QByteArray raw = m_hashString.toLatin1();
if (raw.size() == 40)
m_valid = libtorrent::from_hex(raw.constData(), 40, reinterpret_cast<char*>(&m_nativeHash[0]));
m_valid = libtorrent::from_hex(raw.constData(), 40, (char*)&m_nativeHash[0]);
}

View File

@@ -29,8 +29,8 @@
#ifndef BITTORRENT_INFOHASH_H
#define BITTORRENT_INFOHASH_H
#include <QString>
#include <libtorrent/sha1_hash.hpp>
#include <QString>
namespace BitTorrent
{

View File

@@ -80,10 +80,10 @@ MagnetUri::MagnetUri(const QString &source)
m_valid = true;
m_hash = m_addTorrentParams.info_hash;
m_name = QString::fromStdString(m_addTorrentParams.name);
m_name = Utils::String::fromStdString(m_addTorrentParams.name);
foreach (const std::string &tracker, m_addTorrentParams.trackers)
m_trackers.append(QString::fromStdString(tracker));
m_trackers.append(Utils::String::fromStdString(tracker));
foreach (const std::string &urlSeed, m_addTorrentParams.url_seeds)
m_urlSeeds.append(QUrl(urlSeed.c_str()));

View File

@@ -29,8 +29,8 @@
#ifndef BITTORRENT_MAGNETURI_H
#define BITTORRENT_MAGNETURI_H
#include <QList>
#include <QString>
#include <QList>
#include <QUrl>
#include <libtorrent/add_torrent_params.hpp>

View File

@@ -26,12 +26,11 @@
* exception statement from your version.
*/
#include "peerinfo.h"
#include "base/bittorrent/torrenthandle.h"
#include "base/net/geoipmanager.h"
#include "base/unicodestrings.h"
#include "base/utils/string.h"
#include "base/unicodestrings.h"
#include "base/bittorrent/torrenthandle.h"
#include "peerinfo.h"
namespace libt = libtorrent;
using namespace BitTorrent;
@@ -100,6 +99,7 @@ bool PeerInfo::isRemoteChocked() const
return (m_nativeInfo.flags & libt::peer_info::remote_choked);
}
bool PeerInfo::isSupportsExtensions() const
{
return (m_nativeInfo.flags & libt::peer_info::supports_extensions);
@@ -115,11 +115,18 @@ bool PeerInfo::isHandshake() const
return (m_nativeInfo.flags & libt::peer_info::handshake);
}
bool PeerInfo::isConnecting() const
{
return (m_nativeInfo.flags & libt::peer_info::connecting);
}
bool PeerInfo::isQueued() const
{
return (m_nativeInfo.flags & libt::peer_info::queued);
}
bool PeerInfo::isOnParole() const
{
return (m_nativeInfo.flags & libt::peer_info::on_parole);
@@ -135,6 +142,7 @@ bool PeerInfo::optimisticUnchoke() const
return (m_nativeInfo.flags & libt::peer_info::optimistic_unchoke);
}
bool PeerInfo::isSnubbed() const
{
return (m_nativeInfo.flags & libt::peer_info::snubbed);
@@ -150,6 +158,7 @@ bool PeerInfo::isEndgameMode() const
return (m_nativeInfo.flags & libt::peer_info::endgame_mode);
}
bool PeerInfo::isHolepunched() const
{
return (m_nativeInfo.flags & libt::peer_info::holepunched);
@@ -180,6 +189,7 @@ bool PeerInfo::isPlaintextEncrypted() const
return (m_nativeInfo.flags & libt::peer_info::plaintext_encrypted);
}
PeerAddress PeerInfo::address() const
{
return PeerAddress(QHostAddress(QString::fromStdString(m_nativeInfo.ip.address().to_string())),
@@ -188,9 +198,10 @@ PeerAddress PeerInfo::address() const
QString PeerInfo::client() const
{
return QString::fromStdString(m_nativeInfo.client);
return Utils::String::fromStdString(m_nativeInfo.client);
}
qreal PeerInfo::progress() const
{
return m_nativeInfo.progress;
@@ -201,6 +212,7 @@ int PeerInfo::payloadUpSpeed() const
return m_nativeInfo.payload_up_speed;
}
int PeerInfo::payloadDownSpeed() const
{
return m_nativeInfo.payload_down_speed;
@@ -211,6 +223,7 @@ qlonglong PeerInfo::totalUpload() const
return m_nativeInfo.total_upload;
}
qlonglong PeerInfo::totalDownload() const
{
return m_nativeInfo.total_download;
@@ -232,7 +245,7 @@ QString PeerInfo::connectionType() const
return QString::fromUtf8(C_UTP);
QString connection;
switch (m_nativeInfo.connection_type) {
switch(m_nativeInfo.connection_type) {
case libt::peer_info::http_seed:
case libt::peer_info::web_seed:
connection = "Web";
@@ -274,14 +287,14 @@ qreal PeerInfo::relevance() const
void PeerInfo::determineFlags()
{
if (isInteresting()) {
// d = Your client wants to download, but peer doesn't want to send (interested and choked)
//d = Your client wants to download, but peer doesn't want to send (interested and choked)
if (isRemoteChocked()) {
m_flags += "d ";
m_flagsDescription += tr("interested(local) and choked(peer)");
m_flagsDescription += ", ";
}
else {
// D = Currently downloading (interested and not choked)
//D = Currently downloading (interested and not choked)
m_flags += "D ";
m_flagsDescription += tr("interested(local) and unchoked(peer)");
m_flagsDescription += ", ";
@@ -289,91 +302,92 @@ void PeerInfo::determineFlags()
}
if (isRemoteInterested()) {
// u = Peer wants your client to upload, but your client doesn't want to (interested and choked)
//u = Peer wants your client to upload, but your client doesn't want to (interested and choked)
if (isChocked()) {
m_flags += "u ";
m_flagsDescription += tr("interested(peer) and choked(local)");
m_flagsDescription += ", ";
}
else {
// U = Currently uploading (interested and not choked)
//U = Currently uploading (interested and not choked)
m_flags += "U ";
m_flagsDescription += tr("interested(peer) and unchoked(local)");
m_flagsDescription += ", ";
}
}
// O = Optimistic unchoke
//O = Optimistic unchoke
if (optimisticUnchoke()) {
m_flags += "O ";
m_flagsDescription += tr("optimistic unchoke");
m_flagsDescription += ", ";
}
// S = Peer is snubbed
//S = Peer is snubbed
if (isSnubbed()) {
m_flags += "S ";
m_flagsDescription += tr("peer snubbed");
m_flagsDescription += ", ";
}
// I = Peer is an incoming connection
//I = Peer is an incoming connection
if (!isLocalConnection()) {
m_flags += "I ";
m_flagsDescription += tr("incoming connection");
m_flagsDescription += ", ";
}
// K = Peer is unchoking your client, but your client is not interested
//K = Peer is unchoking your client, but your client is not interested
if (!isRemoteChocked() && !isInteresting()) {
m_flags += "K ";
m_flagsDescription += tr("not interested(local) and unchoked(peer)");
m_flagsDescription += ", ";
}
// ? = Your client unchoked the peer but the peer is not interested
//? = Your client unchoked the peer but the peer is not interested
if (!isChocked() && !isRemoteInterested()) {
m_flags += "? ";
m_flagsDescription += tr("not interested(peer) and unchoked(local)");
m_flagsDescription += ", ";
}
// X = Peer was included in peerlists obtained through Peer Exchange (PEX)
//X = Peer was included in peerlists obtained through Peer Exchange (PEX)
if (fromPeX()) {
m_flags += "X ";
m_flagsDescription += tr("peer from PEX");
m_flagsDescription += ", ";
}
// H = Peer was obtained through DHT
//H = Peer was obtained through DHT
if (fromDHT()) {
m_flags += "H ";
m_flagsDescription += tr("peer from DHT");
m_flagsDescription += ", ";
}
// E = Peer is using Protocol Encryption (all traffic)
//E = Peer is using Protocol Encryption (all traffic)
if (isRC4Encrypted()) {
m_flags += "E ";
m_flagsDescription += tr("encrypted traffic");
m_flagsDescription += ", ";
}
// e = Peer is using Protocol Encryption (handshake)
//e = Peer is using Protocol Encryption (handshake)
if (isPlaintextEncrypted()) {
m_flags += "e ";
m_flagsDescription += tr("encrypted handshake");
m_flagsDescription += ", ";
}
// P = Peer is using uTorrent uTP
//P = Peer is using uTorrent uTP
if (useUTPSocket()) {
m_flags += "P ";
m_flagsDescription += QString::fromUtf8(C_UTP);
m_flagsDescription += ", ";
}
// L = Peer is local
//L = Peer is local
if (fromLSD()) {
m_flags += "L";
m_flagsDescription += tr("peer from LSD");

View File

@@ -29,11 +29,11 @@
#ifndef BITTORRENT_PEERINFO_H
#define BITTORRENT_PEERINFO_H
#include <libtorrent/peer_info.hpp>
#include <QHostAddress>
#include <QBitArray>
#include <QCoreApplication>
#include <QHostAddress>
#include <libtorrent/peer_info.hpp>
namespace BitTorrent
{
@@ -68,6 +68,7 @@ namespace BitTorrent
bool isHandshake() const;
bool isConnecting() const;
bool isQueued() const;
bool isOnParole() const;
bool isSeed() const;

View File

@@ -1,7 +1,6 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2017 Vladimir Golovnev <glassez@yandex.ru>
* Copyright (C) 2010 Christophe Dumez <chris@qbittorrent.org>
* Copyright (C) 2010 Christophe Dumez
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -25,78 +24,72 @@
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*
* Contact : chris@qbittorrent.org
*/
#include <QTime>
#include <QDateTime>
#include "base/bittorrent/session.h"
#include "base/preferences.h"
#include "bandwidthscheduler.h"
#include <utility>
#include <QDate>
#include <QTime>
#include "base/preferences.h"
BandwidthScheduler::BandwidthScheduler(QObject *parent)
: QObject(parent)
, m_lastAlternative(false)
: QTimer(parent)
{
connect(&m_timer, &QTimer::timeout, this, &BandwidthScheduler::onTimeout);
// Single shot, we call start() again manually
setSingleShot(true);
// Connect Signals/Slots
connect(this, SIGNAL(timeout()), this, SLOT(start()));
}
void BandwidthScheduler::start()
{
m_lastAlternative = isTimeForAlternative();
emit bandwidthLimitRequested(m_lastAlternative);
// Timeout regularly to accommodate for external system clock changes
// eg from the user or from a timesync utility
m_timer.start(30000);
}
bool BandwidthScheduler::isTimeForAlternative() const
{
const Preferences* const pref = Preferences::instance();
bool alt_bw_enabled = BitTorrent::Session::instance()->isAltGlobalSpeedLimitEnabled();
QTime start = pref->getSchedulerStartTime();
QTime end = pref->getSchedulerEndTime();
const QTime now = QTime::currentTime();
const int schedulerDays = pref->getSchedulerDays();
const int day = QDate::currentDate().dayOfWeek();
bool alternative = false;
QTime now = QTime::currentTime();
int sched_days = pref->getSchedulerDays();
int day = QDateTime::currentDateTime().toLocalTime().date().dayOfWeek();
bool new_mode = false;
bool reverse = false;
if (start > end) {
std::swap(start, end);
alternative = true;
QTime temp = start;
start = end;
end = temp;
reverse = true;
}
if ((start <= now) && (end >= now)) {
switch (schedulerDays) {
switch(sched_days) {
case EVERY_DAY:
alternative = !alternative;
new_mode = true;
break;
case WEEK_ENDS:
if ((day == 6) || (day == 7))
alternative = !alternative;
new_mode = true;
break;
case WEEK_DAYS:
if ((day != 6) && (day != 7))
alternative = !alternative;
new_mode = true;
break;
default:
if (day == (schedulerDays - 2))
alternative = !alternative;
if (day == (sched_days - 2))
new_mode = true;
}
}
return alternative;
}
if (reverse)
new_mode = !new_mode;
void BandwidthScheduler::onTimeout()
{
bool alternative = isTimeForAlternative();
if (new_mode != alt_bw_enabled)
emit switchToAlternativeMode(new_mode);
if (alternative != m_lastAlternative) {
m_lastAlternative = alternative;
emit bandwidthLimitRequested(alternative);
}
// Timeout regularly to accommodate for external system clock changes
// eg from the user or from a timesync utility
QTimer::start(1500);
}

View File

@@ -1,7 +1,6 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2017 Vladimir Golovnev <glassez@yandex.ru>
* Copyright (C) 2010 Christophe Dumez <chris@qbittorrent.org>
* Copyright (C) 2010 Christophe Dumez
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -25,32 +24,27 @@
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*
* Contact : chris@qbittorrent.org
*/
#ifndef BANDWIDTHSCHEDULER_H
#define BANDWIDTHSCHEDULER_H
#include <QObject>
#include <QTimer>
class BandwidthScheduler: public QObject
class BandwidthScheduler : public QTimer
{
Q_OBJECT
Q_DISABLE_COPY(BandwidthScheduler)
public:
explicit BandwidthScheduler(QObject *parent = nullptr);
BandwidthScheduler(QObject *parent = 0);
public slots:
void start();
signals:
void bandwidthLimitRequested(bool alternative);
private:
bool isTimeForAlternative() const;
void onTimeout();
QTimer m_timer;
bool m_lastAlternative;
void switchToAlternativeMode(bool alternative);
};
#endif // BANDWIDTHSCHEDULER_H

View File

@@ -1,6 +1,6 @@
/*
* Bittorrent Client using Qt and libt.
* Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
* Copyright (C) 2006 Christophe Dumez
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -24,88 +24,26 @@
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*
* Contact : chris@qbittorrent.org
*/
#include "filterparserthread.h"
#include <cctype>
#include <QDataStream>
#include <QFile>
#include <QHostAddress>
#include <QDataStream>
#include <QStringList>
#include <libtorrent/session.hpp>
#include <libtorrent/ip_filter.hpp>
#include "base/logger.h"
#include "filterparserthread.h"
namespace libt = libtorrent;
namespace
{
class IPv4Parser
{
public:
bool tryParse(const char *str)
{
unsigned char octetIndex = 0;
const char *octetStart = str;
char *endptr;
for (; *str; ++str) {
if (*str == '.') {
long int extractedNum = strtol(octetStart, &endptr, 10);
if ((extractedNum >= 0L) && (extractedNum <= 255L))
m_buf[octetIndex++] = static_cast<unsigned char>(extractedNum);
else
return false;
if (endptr != str)
return false;
if (octetIndex == 4)
return true;
octetStart = str + 1;
}
}
if (str != octetStart) {
long int extractedNum = strtol(octetStart, &endptr, 10);
if ((extractedNum >= 0L) && (extractedNum <= 255L))
m_buf[octetIndex] = static_cast<unsigned char>(strtol(octetStart, &endptr, 10));
else
return false;
if ((endptr == str) && (octetIndex == 3))
return true;
}
return false;
}
libt::address_v4::bytes_type parsed() const
{
return m_buf;
}
private:
libt::address_v4::bytes_type m_buf;
};
bool parseIPAddress(const char *data, libt::address &address)
{
IPv4Parser parser;
boost::system::error_code ec;
if (parser.tryParse(data))
address = libt::address_v4(parser.parsed());
else
address = libt::address_v6::from_string(data, ec);
return !ec;
}
const int BUFFER_SIZE = 2 * 1024 * 1024; // 2 MiB
}
FilterParserThread::FilterParserThread(QObject *parent)
FilterParserThread::FilterParserThread(libt::session *s, QObject *parent)
: QThread(parent)
, m_session(s)
, m_abort(false)
{
}
@@ -117,260 +55,181 @@ FilterParserThread::~FilterParserThread()
}
// Parser for eMule ip filter in DAT format
int FilterParserThread::parseDATFilterFile()
int FilterParserThread::parseDATFilterFile(QString filePath, libt::ip_filter &filter)
{
int ruleCount = 0;
QFile file(m_filePath);
QFile file(filePath);
if (!file.exists()) return ruleCount;
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
LogMsg(tr("I/O Error: Could not open IP filter file in read mode."), Log::CRITICAL);
Logger::instance()->addMessage(tr("I/O Error: Could not open ip filter file in read mode."), Log::CRITICAL);
return ruleCount;
}
std::vector<char> buffer(BUFFER_SIZE, 0); // seems a bit faster than QVector
qint64 bytesRead = 0;
int offset = 0;
int start = 0;
int endOfLine = -1;
int nbLine = 0;
unsigned int nbLine = 0;
while (!file.atEnd() && !m_abort) {
++nbLine;
QByteArray line = file.readLine();
// Ignoring empty lines
line = line.trimmed();
if (line.isEmpty()) continue;
// Ignoring commented lines
if (line.startsWith('#') || line.startsWith("//")) continue;
while (true) {
bytesRead = file.read(buffer.data() + offset, BUFFER_SIZE - offset - 1);
if (bytesRead < 0)
break;
int dataSize = bytesRead + offset;
if (bytesRead == 0 && dataSize == 0)
break;
// Line should be split by commas
QList<QByteArray> partsList = line.split(',');
const uint nbElem = partsList.size();
for (start = 0; start < dataSize; ++start) {
endOfLine = -1;
// The file might have ended without the last line having a newline
if (!(bytesRead == 0 && dataSize > 0)) {
for (int i = start; i < dataSize; ++i) {
if (buffer[i] == '\n') {
endOfLine = i;
// We need to NULL the newline in case the line has only an IP range.
// In that case the parser won't work for the end IP, because it ends
// with the newline and not with a number.
buffer[i] = '\0';
break;
}
}
}
else {
endOfLine = dataSize;
buffer[dataSize] = '\0';
}
if (endOfLine == -1) {
// read the next chunk from file
// but first move(copy) the leftover data to the front of the buffer
offset = dataSize - start;
memmove(buffer.data(), buffer.data() + start, offset);
break;
}
else {
++nbLine;
}
if ((buffer[start] == '#')
|| ((buffer[start] == '/') && ((start + 1 < dataSize) && (buffer[start + 1] == '/')))) {
start = endOfLine;
continue;
}
// Each line should follow this format:
// 001.009.096.105 - 001.009.096.105 , 000 , Some organization
// The 3rd entry is access level and if above 127 the IP range isn't blocked.
int firstComma = findAndNullDelimiter(buffer.data(), ',', start, endOfLine);
if (firstComma != -1)
findAndNullDelimiter(buffer.data(), ',', firstComma + 1, endOfLine);
// Check if there is an access value (apparently not mandatory)
if (firstComma != -1) {
// There is possibly one
const long int nbAccess = strtol(buffer.data() + firstComma + 1, nullptr, 10);
// Ignoring this rule because access value is too high
if (nbAccess > 127L) {
start = endOfLine;
continue;
}
}
// IP Range should be split by a dash
int endOfIPRange = ((firstComma == -1) ? (endOfLine - 1) : (firstComma - 1));
int delimIP = findAndNullDelimiter(buffer.data(), '-', start, endOfIPRange);
if (delimIP == -1) {
LogMsg(tr("IP filter line %1 is malformed.").arg(nbLine), Log::CRITICAL);
start = endOfLine;
continue;
}
libt::address startAddr;
int newStart = trim(buffer.data(), start, delimIP - 1);
if (!parseIPAddress(buffer.data() + newStart, startAddr)) {
LogMsg(tr("IP filter line %1 is malformed. Start IP of the range is malformed.").arg(nbLine), Log::CRITICAL);
start = endOfLine;
continue;
}
libt::address endAddr;
newStart = trim(buffer.data(), delimIP + 1, endOfIPRange);
if (!parseIPAddress(buffer.data() + newStart, endAddr)) {
LogMsg(tr("IP filter line %1 is malformed. End IP of the range is malformed.").arg(nbLine), Log::CRITICAL);
start = endOfLine;
continue;
}
if ((startAddr.is_v4() != endAddr.is_v4())
|| (startAddr.is_v6() != endAddr.is_v6())) {
LogMsg(tr("IP filter line %1 is malformed. One IP is IPv4 and the other is IPv6!").arg(nbLine), Log::CRITICAL);
start = endOfLine;
continue;
}
start = endOfLine;
// Now Add to the filter
try {
m_filter.add_rule(startAddr, endAddr, libt::ip_filter::blocked);
++ruleCount;
}
catch (std::exception &e) {
LogMsg(tr("IP filter exception thrown for line %1. Exception is: %2").arg(nbLine)
.arg(QString::fromLocal8Bit(e.what())), Log::CRITICAL);
}
// IP Range should be split by a dash
QList<QByteArray> IPs = partsList.first().split('-');
if (IPs.size() != 2) {
qDebug("Ipfilter.dat: line %d is malformed.", nbLine);
qDebug("Line was %s", line.constData());
continue;
}
if (start >= dataSize)
offset = 0;
boost::system::error_code ec;
const QString strStartIP = cleanupIPAddress(IPs.at(0));
if (strStartIP.isEmpty()) {
qDebug("Ipfilter.dat: line %d is malformed.", nbLine);
qDebug("Start IP of the range is malformated: %s", qPrintable(strStartIP));
continue;
}
libt::address startAddr = libt::address::from_string(qPrintable(strStartIP), ec);
if (ec) {
qDebug("Ipfilter.dat: line %d is malformed.", nbLine);
qDebug("Start IP of the range is malformated: %s", qPrintable(strStartIP));
continue;
}
const QString strEndIP = cleanupIPAddress(IPs.at(1));
if (strEndIP.isEmpty()) {
qDebug("Ipfilter.dat: line %d is malformed.", nbLine);
qDebug("End IP of the range is malformated: %s", qPrintable(strEndIP));
continue;
}
libt::address endAddr = libt::address::from_string(qPrintable(strEndIP), ec);
if (ec) {
qDebug("Ipfilter.dat: line %d is malformed.", nbLine);
qDebug("End IP of the range is malformated: %s", qPrintable(strEndIP));
continue;
}
if (startAddr.is_v4() != endAddr.is_v4()) {
qDebug("Ipfilter.dat: line %d is malformed.", nbLine);
qDebug("One IP is IPv4 and the other is IPv6!");
continue;
}
// Check if there is an access value (apparently not mandatory)
int nbAccess = 0;
if (nbElem > 1) {
// There is possibly one
nbAccess = partsList.at(1).trimmed().toInt();
}
if (nbAccess > 127) {
// Ignoring this rule because access value is too high
continue;
}
// Now Add to the filter
try {
filter.add_rule(startAddr, endAddr, libt::ip_filter::blocked);
++ruleCount;
}
catch(std::exception &) {
qDebug("Bad line in filter file, avoided crash...");
}
}
file.close();
return ruleCount;
}
// Parser for PeerGuardian ip filter in p2p format
int FilterParserThread::parseP2PFilterFile()
int FilterParserThread::parseP2PFilterFile(QString filePath, libt::ip_filter &filter)
{
int ruleCount = 0;
QFile file(m_filePath);
QFile file(filePath);
if (!file.exists()) return ruleCount;
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
LogMsg(tr("I/O Error: Could not open IP filter file in read mode."), Log::CRITICAL);
Logger::instance()->addMessage(tr("I/O Error: Could not open ip filter file in read mode."), Log::CRITICAL);
return ruleCount;
}
std::vector<char> buffer(BUFFER_SIZE, 0); // seems a bit faster than QVector
qint64 bytesRead = 0;
int offset = 0;
int start = 0;
int endOfLine = -1;
int nbLine = 0;
unsigned int nbLine = 0;
while (!file.atEnd() && !m_abort) {
++nbLine;
QByteArray line = file.readLine().trimmed();
if (line.isEmpty()) continue;
// Ignoring commented lines
if (line.startsWith('#') || line.startsWith("//")) continue;
while (true) {
bytesRead = file.read(buffer.data() + offset, BUFFER_SIZE - offset - 1);
if (bytesRead < 0)
break;
int dataSize = bytesRead + offset;
if (bytesRead == 0 && dataSize == 0)
break;
for (start = 0; start < dataSize; ++start) {
endOfLine = -1;
// The file might have ended without the last line having a newline
if (!(bytesRead == 0 && dataSize > 0)) {
for (int i = start; i < dataSize; ++i) {
if (buffer[i] == '\n') {
endOfLine = i;
// We need to NULL the newline in case the line has only an IP range.
// In that case the parser won't work for the end IP, because it ends
// with the newline and not with a number.
buffer[i] = '\0';
break;
}
}
}
else {
endOfLine = dataSize;
buffer[dataSize] = '\0';
}
if (endOfLine == -1) {
// read the next chunk from file
// but first move(copy) the leftover data to the front of the buffer
offset = dataSize - start;
memmove(buffer.data(), buffer.data() + start, offset);
break;
}
else {
++nbLine;
}
if ((buffer[start] == '#')
|| ((buffer[start] == '/') && ((start + 1 < dataSize) && (buffer[start + 1] == '/')))) {
start = endOfLine;
continue;
}
// Each line should follow this format:
// Some organization:1.0.0.0-1.255.255.255
// The "Some organization" part might contain a ':' char itself so we find the last occurrence
int partsDelimiter = findAndNullDelimiter(buffer.data(), ':', start, endOfLine, true);
if (partsDelimiter == -1) {
LogMsg(tr("IP filter line %1 is malformed.").arg(nbLine), Log::CRITICAL);
start = endOfLine;
continue;
}
// IP Range should be split by a dash
int delimIP = findAndNullDelimiter(buffer.data(), '-', partsDelimiter + 1, endOfLine);
if (delimIP == -1) {
LogMsg(tr("IP filter line %1 is malformed.").arg(nbLine), Log::CRITICAL);
start = endOfLine;
continue;
}
libt::address startAddr;
int newStart = trim(buffer.data(), partsDelimiter + 1, delimIP - 1);
if (!parseIPAddress(buffer.data() + newStart, startAddr)) {
LogMsg(tr("IP filter line %1 is malformed. Start IP of the range is malformed.").arg(nbLine), Log::CRITICAL);
start = endOfLine;
continue;
}
libt::address endAddr;
newStart = trim(buffer.data(), delimIP + 1, endOfLine);
if (!parseIPAddress(buffer.data() + newStart, endAddr)) {
LogMsg(tr("IP filter line %1 is malformed. End IP of the range is malformed.").arg(nbLine), Log::CRITICAL);
start = endOfLine;
continue;
}
if ((startAddr.is_v4() != endAddr.is_v4())
|| (startAddr.is_v6() != endAddr.is_v6())) {
LogMsg(tr("IP filter line %1 is malformed. One IP is IPv4 and the other is IPv6!").arg(nbLine), Log::CRITICAL);
start = endOfLine;
continue;
}
start = endOfLine;
try {
m_filter.add_rule(startAddr, endAddr, libt::ip_filter::blocked);
++ruleCount;
}
catch (std::exception &e) {
LogMsg(tr("IP filter exception thrown for line %1. Exception is: %2").arg(nbLine)
.arg(QString::fromLocal8Bit(e.what())), Log::CRITICAL);
}
// Line is split by :
QList<QByteArray> partsList = line.split(':');
if (partsList.size() < 2) {
qDebug("p2p file: line %d is malformed.", nbLine);
continue;
}
if (start >= dataSize)
offset = 0;
// Get IP range
QList<QByteArray> IPs = partsList.last().split('-');
if (IPs.size() != 2) {
qDebug("p2p file: line %d is malformed.", nbLine);
qDebug("line was: %s", line.constData());
continue;
}
boost::system::error_code ec;
QString strStartIP = cleanupIPAddress(IPs.at(0));
if (strStartIP.isEmpty()) {
qDebug("p2p file: line %d is malformed.", nbLine);
qDebug("Start IP is invalid: %s", qPrintable(strStartIP));
continue;
}
libt::address startAddr = libt::address::from_string(qPrintable(strStartIP), ec);
if (ec) {
qDebug("p2p file: line %d is malformed.", nbLine);
qDebug("Start IP is invalid: %s", qPrintable(strStartIP));
continue;
}
QString strEndIP = cleanupIPAddress(IPs.at(1));
if (strEndIP.isEmpty()) {
qDebug("p2p file: line %d is malformed.", nbLine);
qDebug("End IP is invalid: %s", qPrintable(strStartIP));
continue;
}
libt::address endAddr = libt::address::from_string(qPrintable(strEndIP), ec);
if (ec) {
qDebug("p2p file: line %d is malformed.", nbLine);
qDebug("End IP is invalid: %s", qPrintable(strStartIP));
continue;
}
if (startAddr.is_v4() != endAddr.is_v4()) {
qDebug("p2p file: line %d is malformed.", nbLine);
qDebug("Line was: %s", line.constData());
continue;
}
try {
filter.add_rule(startAddr, endAddr, libt::ip_filter::blocked);
++ruleCount;
}
catch(std::exception &) {
qDebug("p2p file: line %d is malformed.", nbLine);
qDebug("Line was: %s", line.constData());
continue;
}
}
file.close();
return ruleCount;
}
@@ -398,14 +257,14 @@ int FilterParserThread::getlineInStream(QDataStream &stream, std::string &name,
}
// Parser for PeerGuardian ip filter in p2p format
int FilterParserThread::parseP2BFilterFile()
int FilterParserThread::parseP2BFilterFile(QString filePath, libt::ip_filter &filter)
{
int ruleCount = 0;
QFile file(m_filePath);
QFile file(filePath);
if (!file.exists()) return ruleCount;
if (!file.open(QIODevice::ReadOnly)) {
LogMsg(tr("I/O Error: Could not open IP filter file in read mode."), Log::CRITICAL);
Logger::instance()->addMessage(tr("I/O Error: Could not open ip filter file in read mode."), Log::CRITICAL);
return ruleCount;
}
@@ -415,8 +274,8 @@ int FilterParserThread::parseP2BFilterFile()
unsigned char version;
if (!stream.readRawData(buf, sizeof(buf))
|| memcmp(buf, "\xFF\xFF\xFF\xFFP2B", 7)
|| !stream.readRawData(reinterpret_cast<char*>(&version), sizeof(version))) {
LogMsg(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
|| !stream.readRawData((char*)&version, sizeof(version))) {
Logger::instance()->addMessage(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
return ruleCount;
}
@@ -426,9 +285,9 @@ int FilterParserThread::parseP2BFilterFile()
std::string name;
while(getlineInStream(stream, name, '\0') && !m_abort) {
if (!stream.readRawData(reinterpret_cast<char*>(&start), sizeof(start))
|| !stream.readRawData(reinterpret_cast<char*>(&end), sizeof(end))) {
LogMsg(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
if (!stream.readRawData((char*)&start, sizeof(start))
|| !stream.readRawData((char*)&end, sizeof(end))) {
Logger::instance()->addMessage(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
return ruleCount;
}
@@ -439,17 +298,17 @@ int FilterParserThread::parseP2BFilterFile()
libt::address_v4 last(ntohl(end));
// Apply to bittorrent session
try {
m_filter.add_rule(first, last, libt::ip_filter::blocked);
filter.add_rule(first, last, libt::ip_filter::blocked);
++ruleCount;
}
catch (std::exception &) {}
catch(std::exception &) {}
}
}
else if (version == 3) {
qDebug ("p2b version 3");
unsigned int namecount;
if (!stream.readRawData(reinterpret_cast<char*>(&namecount), sizeof(namecount))) {
LogMsg(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
if (!stream.readRawData((char*)&namecount, sizeof(namecount))) {
Logger::instance()->addMessage(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
return ruleCount;
}
@@ -458,7 +317,7 @@ int FilterParserThread::parseP2BFilterFile()
for (unsigned int i = 0; i < namecount; ++i) {
std::string name;
if (!getlineInStream(stream, name, '\0')) {
LogMsg(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
Logger::instance()->addMessage(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
return ruleCount;
}
@@ -467,18 +326,18 @@ int FilterParserThread::parseP2BFilterFile()
// Reading the ranges
unsigned int rangecount;
if (!stream.readRawData(reinterpret_cast<char*>(&rangecount), sizeof(rangecount))) {
LogMsg(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
if (!stream.readRawData((char*)&rangecount, sizeof(rangecount))) {
Logger::instance()->addMessage(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
return ruleCount;
}
rangecount = ntohl(rangecount);
unsigned int name, start, end;
for (unsigned int i = 0; i < rangecount; ++i) {
if (!stream.readRawData(reinterpret_cast<char*>(&name), sizeof(name))
|| !stream.readRawData(reinterpret_cast<char*>(&start), sizeof(start))
|| !stream.readRawData(reinterpret_cast<char*>(&end), sizeof(end))) {
LogMsg(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
if (!stream.readRawData((char*)&name, sizeof(name))
|| !stream.readRawData((char*)&start, sizeof(start))
|| !stream.readRawData((char*)&end, sizeof(end))) {
Logger::instance()->addMessage(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
return ruleCount;
}
@@ -489,18 +348,19 @@ int FilterParserThread::parseP2BFilterFile()
libt::address_v4 last(ntohl(end));
// Apply to bittorrent session
try {
m_filter.add_rule(first, last, libt::ip_filter::blocked);
filter.add_rule(first, last, libt::ip_filter::blocked);
++ruleCount;
}
catch (std::exception &) {}
catch(std::exception &) {}
if (m_abort) return ruleCount;
}
}
else {
LogMsg(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
Logger::instance()->addMessage(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
}
file.close();
return ruleCount;
}
@@ -509,7 +369,7 @@ int FilterParserThread::parseP2BFilterFile()
// * eMule IP list (DAT): http://wiki.phoenixlabs.org/wiki/DAT_Format
// * PeerGuardian Text (P2P): http://wiki.phoenixlabs.org/wiki/P2P_Format
// * PeerGuardian Binary (P2B): http://wiki.phoenixlabs.org/wiki/P2B_Format
void FilterParserThread::processFilterFile(const QString &filePath)
void FilterParserThread::processFilterFile(QString filePath)
{
if (isRunning()) {
// Already parsing a filter, m_abort first
@@ -519,88 +379,68 @@ void FilterParserThread::processFilterFile(const QString &filePath)
m_abort = false;
m_filePath = filePath;
m_filter = libt::ip_filter();
// Run it
start();
}
libt::ip_filter FilterParserThread::IPfilter()
QString FilterParserThread::cleanupIPAddress(QString _ip)
{
return m_filter;
_ip = _ip.trimmed();
// Emule .DAT files contain leading zeroes in IPv4 addresses
// eg 001.009.106.186
// We need to remove them because both QHostAddress and Boost.Asio fail to parse them.
QStringList octets = _ip.split('.', QString::SkipEmptyParts);
if (octets.size() == 4) {
QString octet; // it is faster to not recreate this object in the loop
for (int i = 0; i < 4; i++) {
octet = octets[i];
if ((octet[0] == QChar('0')) && (octet.count() > 1)) {
if ((octet[1] == QChar('0')) && (octet.count() > 2))
octet.remove(0, 2);
else
octet.remove(0, 1);
octets[i] = octet;
}
}
_ip = octets.join(".");
}
QHostAddress ip(_ip);
if (ip.isNull()) return QString();
return ip.toString();
}
void FilterParserThread::run()
{
qDebug("Processing filter file");
libt::ip_filter filter = m_session->get_ip_filter();
int ruleCount = 0;
if (m_filePath.endsWith(".p2p", Qt::CaseInsensitive)) {
// PeerGuardian p2p file
ruleCount = parseP2PFilterFile();
ruleCount = parseP2PFilterFile(m_filePath, filter);
}
else if (m_filePath.endsWith(".p2b", Qt::CaseInsensitive)) {
// PeerGuardian p2b file
ruleCount = parseP2BFilterFile();
ruleCount = parseP2BFilterFile(m_filePath, filter);
}
else if (m_filePath.endsWith(".dat", Qt::CaseInsensitive)) {
// eMule DAT format
ruleCount = parseDATFilterFile();
ruleCount = parseDATFilterFile(m_filePath, filter);
}
if (m_abort) return;
try {
m_session->set_ip_filter(filter);
emit IPFilterParsed(ruleCount);
}
catch (std::exception &) {
catch(std::exception &) {
emit IPFilterError();
}
qDebug("IP Filter thread: finished parsing, filter applied");
}
int FilterParserThread::findAndNullDelimiter(char *const data, char delimiter, int start, int end, bool reverse)
{
if (!reverse) {
for (int i = start; i <= end; ++i) {
if (data[i] == delimiter) {
data[i] = '\0';
return i;
}
}
}
else {
for (int i = end; i >= start; --i) {
if (data[i] == delimiter) {
data[i] = '\0';
return i;
}
}
}
return -1;
}
int FilterParserThread::trim(char* const data, int start, int end)
{
if (start >= end) return start;
int newStart = start;
for (int i = start; i <= end; ++i) {
if (isspace(data[i]) != 0) {
data[i] = '\0';
}
else {
newStart = i;
break;
}
}
for (int i = end; i >= start; --i) {
if (isspace(data[i]) != 0)
data[i] = '\0';
else
break;
}
return newStart;
}

View File

@@ -1,6 +1,6 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
* Copyright (C) 2006 Christophe Dumez
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -24,6 +24,8 @@
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*
* Contact : chris@qbittorrent.org
*/
#ifndef FILTERPARSERTHREAD_H
@@ -31,38 +33,41 @@
#include <QThread>
#include <libtorrent/ip_filter.hpp>
class QDataStream;
class QStringList;
namespace libtorrent
{
class session;
struct ip_filter;
}
class FilterParserThread : public QThread
{
Q_OBJECT
public:
FilterParserThread(QObject *parent = nullptr);
FilterParserThread(libtorrent::session *s, QObject *parent = 0);
~FilterParserThread();
void processFilterFile(const QString &filePath);
libtorrent::ip_filter IPfilter();
void processFilterFile(QString filePath);
signals:
void IPFilterParsed(int ruleCount);
void IPFilterError();
protected:
QString cleanupIPAddress(QString _ip);
void run();
private:
int findAndNullDelimiter(char *const data, char delimiter, int start, int end, bool reverse = false);
int trim(char *const data, int start, int end);
int parseDATFilterFile();
int parseP2PFilterFile();
int parseDATFilterFile(QString filePath, libtorrent::ip_filter &filter);
int parseP2PFilterFile(QString filePath, libtorrent::ip_filter &filter);
int getlineInStream(QDataStream &stream, std::string &name, char delim);
int parseP2BFilterFile();
int parseP2BFilterFile(QString filePath, libtorrent::ip_filter &filter);
libtorrent::session *m_session;
bool m_abort;
QString m_filePath;
libtorrent::ip_filter m_filter;
};
#endif // BITTORRENT_FILTERPARSERTHREAD_H

View File

@@ -27,7 +27,11 @@
*/
#include <QDebug>
#ifdef QBT_USES_QT5
#include <QSaveFile>
#else
#include <QFile>
#endif
#include "base/logger.h"
#include "base/utils/fs.h"
@@ -44,12 +48,18 @@ void ResumeDataSavingManager::saveResumeData(QString infoHash, QByteArray data)
QString filepath = m_resumeDataDir.absoluteFilePath(filename);
qDebug() << "Saving resume data in" << filepath;
#ifdef QBT_USES_QT5
QSaveFile resumeFile(filepath);
#else
QFile resumeFile(filepath);
#endif
if (resumeFile.open(QIODevice::WriteOnly)) {
resumeFile.write(data);
#ifdef QBT_USES_QT5
if (!resumeFile.commit()) {
Logger::instance()->addMessage(QString("Couldn't save resume data in %1. Error: %2")
.arg(filepath).arg(resumeFile.errorString()), Log::WARNING);
}
#endif
}
}

View File

@@ -29,11 +29,11 @@
#ifndef RESUMEDATASAVINGMANAGER_H
#define RESUMEDATASAVINGMANAGER_H
#include <QObject>
#include <QByteArray>
#include <QDir>
#include <QObject>
class ResumeDataSavingManager : public QObject
class ResumeDataSavingManager: public QObject
{
Q_OBJECT

View File

@@ -1,12 +1,11 @@
#include "statistics.h"
#include <QDateTime>
#include <libtorrent/session.hpp>
#include "base/bittorrent/session.h"
#include "base/qinisettings.h"
#include "base/bittorrent/sessionstatus.h"
#include "base/profile.h"
#include "base/bittorrent/session.h"
#include "statistics.h"
static const qint64 SAVE_INTERVAL = 15 * 60 * 1000;
@@ -45,13 +44,13 @@ quint64 Statistics::getAlltimeUL() const
void Statistics::gather()
{
const SessionStatus &ss = m_session->status();
if (ss.totalDownload > m_sessionDL) {
m_sessionDL = ss.totalDownload;
SessionStatus ss = m_session->status();
if (ss.totalDownload() > m_sessionDL) {
m_sessionDL = ss.totalDownload();
m_dirty = true;
}
if (ss.totalUpload > m_sessionUL) {
m_sessionUL = ss.totalUpload;
if (ss.totalUpload() > m_sessionUL) {
m_sessionUL = ss.totalUpload();
m_dirty = true;
}
@@ -65,19 +64,19 @@ void Statistics::save() const
if (!m_dirty || ((now - m_lastWrite) < SAVE_INTERVAL))
return;
SettingsPtr s = Profile::instance().applicationSettings(QLatin1String("qBittorrent-data"));
QIniSettings s("qBittorrent", "qBittorrent-data");
QVariantHash v;
v.insert("AlltimeDL", m_alltimeDL + m_sessionDL);
v.insert("AlltimeUL", m_alltimeUL + m_sessionUL);
s->setValue("Stats/AllStats", v);
s.setValue("Stats/AllStats", v);
m_dirty = false;
m_lastWrite = now;
}
void Statistics::load()
{
SettingsPtr s = Profile::instance().applicationSettings(QLatin1String("qBittorrent-data"));
QVariantHash v = s->value("Stats/AllStats").toHash();
QIniSettings s("qBittorrent", "qBittorrent-data");
QVariantHash v = s.value("Stats/AllStats").toHash();
m_alltimeDL = v["AlltimeDL"].toULongLong();
m_alltimeUL = v["AlltimeUL"].toULongLong();

View File

@@ -4,10 +4,7 @@
#include <QObject>
#include <QTimer>
namespace BitTorrent
{
class Session;
}
namespace BitTorrent { class Session; }
class Statistics : QObject
{
@@ -33,8 +30,8 @@ private:
// Will overflow at 15.9 EiB
quint64 m_alltimeUL;
quint64 m_alltimeDL;
quint64 m_sessionUL;
quint64 m_sessionDL;
qint64 m_sessionUL;
qint64 m_sessionDL;
mutable qint64 m_lastWrite;
mutable bool m_dirty;

File diff suppressed because it is too large Load Diff

View File

@@ -33,9 +33,6 @@
#include <vector>
#include <libtorrent/version.hpp>
#if LIBTORRENT_VERSION_NUM >= 10100
#include <QElapsedTimer>
#endif
#include <QFile>
#include <QHash>
#include <QMap>
@@ -44,7 +41,6 @@
#endif
#include <QNetworkConfigurationManager>
#include <QPointer>
#include <QSet>
#include <QStringList>
#include <QVector>
#include <QWaitCondition>
@@ -52,9 +48,6 @@
#include "base/settingvalue.h"
#include "base/tristatebool.h"
#include "base/types.h"
#include "addtorrentparams.h"
#include "cachestatus.h"
#include "sessionstatus.h"
#include "torrentinfo.h"
namespace libtorrent
@@ -62,12 +55,14 @@ namespace libtorrent
class session;
struct torrent_handle;
class entry;
struct ip_filter;
struct add_torrent_params;
struct pe_settings;
#if LIBTORRENT_VERSION_NUM < 10100
struct session_settings;
#else
struct settings_pack;
#endif
struct session_status;
class alert;
struct torrent_alert;
@@ -101,9 +96,6 @@ namespace libtorrent
struct listen_succeeded_alert;
struct listen_failed_alert;
struct external_ip_alert;
#if LIBTORRENT_VERSION_NUM >= 10100
struct session_stats_alert;
#endif
}
class QThread;
@@ -133,12 +125,28 @@ enum TorrentExportFolder
namespace BitTorrent
{
class InfoHash;
class CacheStatus;
class SessionStatus;
class TorrentHandle;
class Tracker;
class MagnetUri;
class TrackerEntry;
struct AddTorrentData;
struct AddTorrentParams
{
QString name;
QString category;
QString savePath;
bool disableTempPath = false; // e.g. for imported torrents
bool sequential = false;
TriStateBool addForced;
TriStateBool addPaused;
QVector<int> filePriorities; // used if TorrentInfo is set
bool ignoreShareRatio = false;
bool skipChecking = false;
};
struct TorrentStatusReport
{
uint nbDownloading = 0;
@@ -151,93 +159,6 @@ namespace BitTorrent
uint nbErrored = 0;
};
class SessionSettingsEnums
{
Q_GADGET
public:
// TODO: remove `SessionSettingsEnums` wrapper when we can use `Q_ENUM_NS` directly (QT >= 5.8 only)
enum class ChokingAlgorithm : int
{
FixedSlots = 0,
RateBased = 1
};
Q_ENUM(ChokingAlgorithm)
enum class SeedChokingAlgorithm : int
{
RoundRobin = 0,
FastestUpload = 1,
AntiLeech = 2
};
Q_ENUM(SeedChokingAlgorithm)
enum class MixedModeAlgorithm : int
{
TCP = 0,
Proportional = 1
};
Q_ENUM(MixedModeAlgorithm)
enum class BTProtocol : int
{
Both = 0,
TCP = 1,
UTP = 2
};
Q_ENUM(BTProtocol)
};
using ChokingAlgorithm = SessionSettingsEnums::ChokingAlgorithm;
using SeedChokingAlgorithm = SessionSettingsEnums::SeedChokingAlgorithm;
using MixedModeAlgorithm = SessionSettingsEnums::MixedModeAlgorithm;
using BTProtocol = SessionSettingsEnums::BTProtocol;
#if LIBTORRENT_VERSION_NUM >= 10100
struct SessionMetricIndices
{
struct
{
int hasIncomingConnections = 0;
int sentPayloadBytes = 0;
int recvPayloadBytes = 0;
int sentBytes = 0;
int recvBytes = 0;
int sentIPOverheadBytes = 0;
int recvIPOverheadBytes = 0;
int sentTrackerBytes = 0;
int recvTrackerBytes = 0;
int recvRedundantBytes = 0;
int recvFailedBytes = 0;
} net;
struct
{
int numPeersConnected = 0;
int numPeersUpDisk = 0;
int numPeersDownDisk = 0;
} peer;
struct
{
int dhtBytesIn = 0;
int dhtBytesOut = 0;
int dhtNodes = 0;
} dht;
struct
{
int diskBlocksInUse = 0;
int numBlocksRead = 0;
int numBlocksCacheHits = 0;
int writeJobs = 0;
int readJobs = 0;
int hashJobs = 0;
int queuedDiskJobs = 0;
int diskJobTime = 0;
} disk;
};
#endif
class Session : public QObject
{
Q_OBJECT
@@ -254,13 +175,13 @@ namespace BitTorrent
void setTempPath(QString path);
bool isTempPathEnabled() const;
void setTempPathEnabled(bool enabled);
QString torrentTempPath(const TorrentInfo &torrentInfo) const;
QString torrentTempPath(const InfoHash &hash) const;
static bool isValidCategoryName(const QString &name);
// returns category itself and all top level categories
static QStringList expandCategory(const QString &category);
const QStringMap &categories() const;
QStringList categories() const;
QString categorySavePath(const QString &categoryName) const;
bool addCategory(const QString &name, const QString &savePath = "");
bool editCategory(const QString &name, const QString &savePath);
@@ -268,12 +189,6 @@ namespace BitTorrent
bool isSubcategoriesEnabled() const;
void setSubcategoriesEnabled(bool value);
static bool isValidTag(const QString &tag);
QSet<QString> tags() const;
bool hasTag(const QString &tag) const;
bool addTag(const QString &tag);
bool removeTag(const QString &tag);
// Torrent Management Mode subsystem (TMM)
//
// Each torrent can be either in Manual mode or in Automatic mode
@@ -296,8 +211,6 @@ namespace BitTorrent
qreal globalMaxRatio() const;
void setGlobalMaxRatio(qreal ratio);
int globalMaxSeedingMinutes() const;
void setGlobalMaxSeedingMinutes(int minutes);
bool isDHTEnabled() const;
void setDHTEnabled(bool enabled);
bool isLSDEnabled() const;
@@ -306,8 +219,6 @@ namespace BitTorrent
void setPeXEnabled(bool enabled);
bool isAddTorrentPaused() const;
void setAddTorrentPaused(bool value);
bool isCreateTorrentSubfolder() const;
void setCreateTorrentSubfolder(bool value);
bool isTrackerEnabled() const;
void setTrackerEnabled(bool enabled);
bool isAppendExtensionEnabled() const;
@@ -358,10 +269,6 @@ namespace BitTorrent
void setForceProxyEnabled(bool enabled);
bool isProxyPeerConnectionsEnabled() const;
void setProxyPeerConnectionsEnabled(bool enabled);
ChokingAlgorithm chokingAlgorithm() const;
void setChokingAlgorithm(ChokingAlgorithm mode);
SeedChokingAlgorithm seedChokingAlgorithm() const;
void setSeedChokingAlgorithm(SeedChokingAlgorithm mode);
bool isAddTrackersEnabled() const;
void setAddTrackersEnabled(bool enabled);
QString additionalTrackers() const;
@@ -372,34 +279,22 @@ namespace BitTorrent
void setIPFilterFile(QString path);
bool announceToAllTrackers() const;
void setAnnounceToAllTrackers(bool val);
bool announceToAllTiers() const;
void setAnnounceToAllTiers(bool val);
int diskCacheSize() const;
void setDiskCacheSize(int size);
int diskCacheTTL() const;
void setDiskCacheTTL(int ttl);
uint diskCacheSize() const;
void setDiskCacheSize(uint size);
uint diskCacheTTL() const;
void setDiskCacheTTL(uint ttl);
bool useOSCache() const;
void setUseOSCache(bool use);
bool isGuidedReadCacheEnabled() const;
void setGuidedReadCacheEnabled(bool enabled);
bool isSuggestModeEnabled() const;
void setSuggestMode(bool mode);
int sendBufferWatermark() const;
void setSendBufferWatermark(int value);
int sendBufferLowWatermark() const;
void setSendBufferLowWatermark(int value);
int sendBufferWatermarkFactor() const;
void setSendBufferWatermarkFactor(int value);
bool isAnonymousModeEnabled() const;
void setAnonymousModeEnabled(bool enabled);
bool isQueueingSystemEnabled() const;
void setQueueingSystemEnabled(bool enabled);
bool ignoreSlowTorrentsForQueueing() const;
void setIgnoreSlowTorrentsForQueueing(bool ignore);
int outgoingPortsMin() const;
void setOutgoingPortsMin(int min);
int outgoingPortsMax() const;
void setOutgoingPortsMax(int max);
uint outgoingPortsMin() const;
void setOutgoingPortsMin(uint min);
uint outgoingPortsMax() const;
void setOutgoingPortsMax(uint max);
bool ignoreLimitsOnLAN() const;
void setIgnoreLimitsOnLAN(bool ignore);
bool includeOverheadInLimits() const;
@@ -424,18 +319,12 @@ namespace BitTorrent
void setMaxActiveUploads(int max);
int maxActiveTorrents() const;
void setMaxActiveTorrents(int max);
BTProtocol btProtocol() const;
void setBTProtocol(BTProtocol protocol);
bool isUTPEnabled() const;
void setUTPEnabled(bool enabled);
bool isUTPRateLimited() const;
void setUTPRateLimited(bool limited);
MixedModeAlgorithm utpMixedMode() const;
void setUtpMixedMode(MixedModeAlgorithm mode);
bool multiConnectionsPerIpEnabled() const;
void setMultiConnectionsPerIpEnabled(bool enabled);
bool isTrackerFilteringEnabled() const;
void setTrackerFilteringEnabled(bool enabled);
QStringList bannedIPs() const;
void setBannedIPs(const QStringList &newList);
void startUpTorrents();
TorrentHandle *findTorrent(const InfoHash &hash) const;
@@ -443,8 +332,8 @@ namespace BitTorrent
TorrentStatusReport torrentStatusReport() const;
bool hasActiveTorrents() const;
bool hasUnfinishedTorrents() const;
const SessionStatus &status() const;
const CacheStatus &cacheStatus() const;
SessionStatus status() const;
CacheStatus cacheStatus() const;
quint64 getAlltimeDL() const;
quint64 getAlltimeUL() const;
bool isListening() const;
@@ -468,11 +357,9 @@ namespace BitTorrent
void bottomTorrentsPriority(const QStringList &hashes);
// TorrentHandle interface
void handleTorrentShareLimitChanged(TorrentHandle *const torrent);
void handleTorrentRatioLimitChanged(TorrentHandle *const torrent);
void handleTorrentSavePathChanged(TorrentHandle *const torrent);
void handleTorrentCategoryChanged(TorrentHandle *const torrent, const QString &oldCategory);
void handleTorrentTagAdded(TorrentHandle *const torrent, const QString &tag);
void handleTorrentTagRemoved(TorrentHandle *const torrent, const QString &tag);
void handleTorrentSavingModeChanged(TorrentHandle *const torrent);
void handleTorrentMetadataReceived(TorrentHandle *const torrent);
void handleTorrentPaused(TorrentHandle *const torrent);
@@ -492,7 +379,6 @@ namespace BitTorrent
void handleTorrentTrackerAuthenticationRequired(TorrentHandle *const torrent, const QString &trackerUrl);
signals:
void statsUpdated();
void torrentsUpdated();
void addTorrentFailed(const QString &error);
void torrentAdded(BitTorrent::TorrentHandle *const torrent);
@@ -504,8 +390,6 @@ namespace BitTorrent
void torrentFinishedChecking(BitTorrent::TorrentHandle *const torrent);
void torrentSavePathChanged(BitTorrent::TorrentHandle *const torrent);
void torrentCategoryChanged(BitTorrent::TorrentHandle *const torrent, const QString &oldCategory);
void torrentTagAdded(TorrentHandle *const torrent, const QString &tag);
void torrentTagRemoved(TorrentHandle *const torrent, const QString &tag);
void torrentSavingModeChanged(BitTorrent::TorrentHandle *const torrent);
void allTorrentsFinished();
void metadataLoaded(const BitTorrent::TorrentInfo &info);
@@ -527,38 +411,29 @@ namespace BitTorrent
void categoryAdded(const QString &categoryName);
void categoryRemoved(const QString &categoryName);
void subcategoriesSupportChanged();
void tagAdded(const QString &tag);
void tagRemoved(const QString &tag);
private slots:
void configureDeferred();
void readAlerts();
void refresh();
void processShareLimits();
void processBigRatios();
void generateResumeData(bool final = false);
void handleIPFilterParsed(int ruleCount);
void handleIPFilterError();
void handleDownloadFinished(const QString &url, const QString &filePath);
void handleDownloadFailed(const QString &url, const QString &reason);
void handleRedirectedToMagnet(const QString &url, const QString &magnetUri);
void switchToAlternativeMode(bool alternative);
// Session reconfiguration triggers
void networkOnlineStateChanged(const bool online);
void networkConfigurationChange(const QNetworkConfiguration&);
private:
struct RemovingTorrentData
{
QString name;
QString savePathToRemove;
bool requestedFileDeletion;
};
explicit Session(QObject *parent = 0);
~Session();
bool hasPerTorrentRatioLimit() const;
bool hasPerTorrentSeedingTimeLimit() const;
void initResumeFolder();
@@ -567,19 +442,15 @@ namespace BitTorrent
#if LIBTORRENT_VERSION_NUM < 10100
void configure(libtorrent::session_settings &sessionSettings);
void adjustLimits(libtorrent::session_settings &sessionSettings);
void applyBandwidthLimits(libtorrent::session_settings &sessionSettings);
#else
void configure(libtorrent::settings_pack &settingsPack);
void configurePeerClasses();
void adjustLimits(libtorrent::settings_pack &settingsPack);
void applyBandwidthLimits(libtorrent::settings_pack &settingsPack);
void initMetrics();
#endif
void adjustLimits();
void applyBandwidthLimits();
void processBannedIPs(libtorrent::ip_filter &filter);
void processBannedIPs();
const QStringList getListeningIPs();
void configureListeningInterface();
void changeSpeedLimitMode_impl(bool alternative);
void enableTracker(bool enable);
void enableBandwidthScheduler();
void populateAdditionalTrackers();
@@ -591,7 +462,7 @@ namespace BitTorrent
const QByteArray &fastresumeData = QByteArray());
bool findIncompleteFiles(TorrentInfo &torrentInfo, QString &savePath) const;
void updateSeedingLimitTimer();
void updateRatioTimer();
void exportTorrentFile(TorrentHandle *const torrent, TorrentExportFolder folder = TorrentExportFolder::Regular);
void saveTorrentResumeData(TorrentHandle *const torrent, bool finalSave = false);
@@ -612,9 +483,6 @@ namespace BitTorrent
void handleListenSucceededAlert(libtorrent::listen_succeeded_alert *p);
void handleListenFailedAlert(libtorrent::listen_failed_alert *p);
void handleExternalIPAlert(libtorrent::external_ip_alert *p);
#if LIBTORRENT_VERSION_NUM >= 10100
void handleSessionStatsAlert(libtorrent::session_stats_alert *p);
#endif
void createTorrentHandle(const libtorrent::torrent_handle &nativeHandle);
@@ -622,7 +490,6 @@ namespace BitTorrent
#if LIBTORRENT_VERSION_NUM < 10100
void dispatchAlerts(libtorrent::alert *alertPtr);
void updateStats();
#endif
void getPendingAlerts(std::vector<libtorrent::alert *> &out, ulong time = 0);
@@ -641,23 +508,17 @@ namespace BitTorrent
CachedSettingValue<bool> m_isTrackerFilteringEnabled;
CachedSettingValue<QString> m_IPFilterFile;
CachedSettingValue<bool> m_announceToAllTrackers;
CachedSettingValue<bool> m_announceToAllTiers;
CachedSettingValue<int> m_diskCacheSize;
CachedSettingValue<int> m_diskCacheTTL;
CachedSettingValue<uint> m_diskCacheSize;
CachedSettingValue<uint> m_diskCacheTTL;
CachedSettingValue<bool> m_useOSCache;
CachedSettingValue<bool> m_guidedReadCacheEnabled;
CachedSettingValue<bool> m_isSuggestMode;
CachedSettingValue<int> m_sendBufferWatermark;
CachedSettingValue<int> m_sendBufferLowWatermark;
CachedSettingValue<int> m_sendBufferWatermarkFactor;
CachedSettingValue<bool> m_isAnonymousModeEnabled;
CachedSettingValue<bool> m_isQueueingEnabled;
CachedSettingValue<int> m_maxActiveDownloads;
CachedSettingValue<int> m_maxActiveUploads;
CachedSettingValue<int> m_maxActiveTorrents;
CachedSettingValue<bool> m_ignoreSlowTorrentsForQueueing;
CachedSettingValue<int> m_outgoingPortsMin;
CachedSettingValue<int> m_outgoingPortsMax;
CachedSettingValue<uint> m_outgoingPortsMin;
CachedSettingValue<uint> m_outgoingPortsMax;
CachedSettingValue<bool> m_ignoreLimitsOnLAN;
CachedSettingValue<bool> m_includeOverheadInLimits;
CachedSettingValue<QString> m_announceIP;
@@ -667,16 +528,12 @@ namespace BitTorrent
CachedSettingValue<int> m_maxUploads;
CachedSettingValue<int> m_maxConnectionsPerTorrent;
CachedSettingValue<int> m_maxUploadsPerTorrent;
CachedSettingValue<BTProtocol> m_btProtocol;
CachedSettingValue<bool> m_isUTPEnabled;
CachedSettingValue<bool> m_isUTPRateLimited;
CachedSettingValue<MixedModeAlgorithm> m_utpMixedMode;
CachedSettingValue<bool> m_multiConnectionsPerIpEnabled;
CachedSettingValue<bool> m_isAddTrackersEnabled;
CachedSettingValue<QString> m_additionalTrackers;
CachedSettingValue<qreal> m_globalMaxRatio;
CachedSettingValue<int> m_globalMaxSeedingMinutes;
CachedSettingValue<bool> m_isAddTorrentPaused;
CachedSettingValue<bool> m_isCreateTorrentSubfolder;
CachedSettingValue<bool> m_isAppendExtensionEnabled;
CachedSettingValue<uint> m_refreshInterval;
CachedSettingValue<bool> m_isPreallocationEnabled;
@@ -698,10 +555,7 @@ namespace BitTorrent
CachedSettingValue<int> m_encryption;
CachedSettingValue<bool> m_isForceProxyEnabled;
CachedSettingValue<bool> m_isProxyPeerConnectionsEnabled;
CachedSettingValue<ChokingAlgorithm> m_chokingAlgorithm;
CachedSettingValue<SeedChokingAlgorithm> m_seedChokingAlgorithm;
CachedSettingValue<QVariantMap> m_storedCategories;
CachedSettingValue<QStringList> m_storedTags;
CachedSettingValue<int> m_maxRatioAction;
CachedSettingValue<QString> m_defaultSavePath;
CachedSettingValue<QString> m_tempPath;
@@ -724,10 +578,11 @@ namespace BitTorrent
QList<BitTorrent::TrackerEntry> m_additionalTrackerList;
QString m_resumeFolderPath;
QFile m_resumeFolderLock;
QHash<InfoHash, QString> m_savePathsToRemove;
bool m_useProxy;
QTimer *m_refreshTimer;
QTimer *m_seedingLimitTimer;
QTimer *m_bigRatioTimer;
QTimer *m_resumeDataTimer;
Statistics *m_statistics;
// IP filtering
@@ -743,23 +598,15 @@ namespace BitTorrent
QHash<InfoHash, TorrentHandle *> m_torrents;
QHash<InfoHash, AddTorrentData> m_addingTorrents;
QHash<QString, AddTorrentParams> m_downloadedTorrents;
QHash<InfoHash, RemovingTorrentData> m_removingTorrents;
TorrentStatusReport m_torrentStatusReport;
QStringMap m_categories;
QSet<QString> m_tags;
#if LIBTORRENT_VERSION_NUM < 10100
QMutex m_alertsMutex;
QWaitCondition m_alertsWaitCondition;
std::vector<libtorrent::alert *> m_alerts;
#else
SessionMetricIndices m_metricIndices;
QElapsedTimer m_statsUpdateTimer;
#endif
SessionStatus m_status;
CacheStatus m_cacheStatus;
QNetworkConfigurationManager m_networkManager;
static Session *m_instance;

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