You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-09 18:32:15 +02:00
Compare commits
269 Commits
release-4.
...
release-4.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d2f3d1ec2c | ||
![]() |
bc6e3ae40d | ||
![]() |
b02e239f7c | ||
![]() |
397cd4bf60 | ||
![]() |
409f972ad3 | ||
![]() |
267961ffca | ||
![]() |
dff753c452 | ||
![]() |
ce3bafd30d | ||
![]() |
e5538d9f25 | ||
![]() |
7a8a32b1c3 | ||
![]() |
cac5e0391b | ||
![]() |
726790fa93 | ||
![]() |
c9c7a5be53 | ||
![]() |
1495513cfc | ||
![]() |
085afaac14 | ||
![]() |
d58a54c758 | ||
![]() |
78d9bcb6a1 | ||
![]() |
1a43cd329d | ||
![]() |
2fe687eeca | ||
![]() |
107bd8a54f | ||
![]() |
865df3fcf1 | ||
![]() |
cbf9c52462 | ||
![]() |
171e25e962 | ||
![]() |
239d14fd10 | ||
![]() |
0b7a175156 | ||
![]() |
b37dbb60b5 | ||
![]() |
d5acd1f210 | ||
![]() |
65eda4a68e | ||
![]() |
7209881025 | ||
![]() |
a5d0a4b619 | ||
![]() |
79276a8786 | ||
![]() |
fa2b645a64 | ||
![]() |
4d5d6df734 | ||
![]() |
2c39b69c18 | ||
![]() |
13c0077e95 | ||
![]() |
9299e3f371 | ||
![]() |
b9ddc6ee86 | ||
![]() |
276856a614 | ||
![]() |
fbd6a8a0da | ||
![]() |
6fc18b4af6 | ||
![]() |
44d633fb68 | ||
![]() |
eb4bf6cc68 | ||
![]() |
6db6c850eb | ||
![]() |
02ae1e3734 | ||
![]() |
eb887139fd | ||
![]() |
84805f7fb8 | ||
![]() |
2719131ed2 | ||
![]() |
52401bd2b0 | ||
![]() |
4834703bc4 | ||
![]() |
3ed73244b1 | ||
![]() |
97cd430125 | ||
![]() |
d202b85d51 | ||
![]() |
c51b79e9fc | ||
![]() |
4449018207 | ||
![]() |
ced8e41473 | ||
![]() |
2c66ed6708 | ||
![]() |
c7d3d6ac90 | ||
![]() |
13210b3e9f | ||
![]() |
6e622fc23b | ||
![]() |
ae35111b59 | ||
![]() |
e1c3d419a7 | ||
![]() |
7396b8adba | ||
![]() |
c09001545d | ||
![]() |
f8d4315f7e | ||
![]() |
1fa2957d27 | ||
![]() |
ade50d2b53 | ||
![]() |
0fa1d35b87 | ||
![]() |
6486fc5f4d | ||
![]() |
1e059ab1a2 | ||
![]() |
15b137211b | ||
![]() |
6f8f1d7bad | ||
![]() |
a31f0c0a3d | ||
![]() |
f977d1293a | ||
![]() |
1399be50cb | ||
![]() |
52dcf32cc8 | ||
![]() |
52b2b807ab | ||
![]() |
5cf4f00824 | ||
![]() |
faa6fad025 | ||
![]() |
9f94bbce3a | ||
![]() |
5c49b2486c | ||
![]() |
4f6e7f97c6 | ||
![]() |
7751c5b75c | ||
![]() |
a1a9f3317b | ||
![]() |
fb20f59a96 | ||
![]() |
a15e3407b0 | ||
![]() |
e267c2d37a | ||
![]() |
ae32edeb26 | ||
![]() |
34d38ef466 | ||
![]() |
120ee6b836 | ||
![]() |
7d25b6fce2 | ||
![]() |
068eff9e9f | ||
![]() |
31a55f79f1 | ||
![]() |
bac032e01c | ||
![]() |
b809941f02 | ||
![]() |
77c3758090 | ||
![]() |
5758817189 | ||
![]() |
acc9f08a05 | ||
![]() |
f3b7f17a7c | ||
![]() |
dfc3f047e2 | ||
![]() |
223ab7de84 | ||
![]() |
d2a4027347 | ||
![]() |
4594895082 | ||
![]() |
e457223fcd | ||
![]() |
8fc25c4524 | ||
![]() |
410e133592 | ||
![]() |
e114bc7ef6 | ||
![]() |
6ac57cb24c | ||
![]() |
2b7893adc8 | ||
![]() |
84b8832d57 | ||
![]() |
0e738b534c | ||
![]() |
96ce8690b6 | ||
![]() |
a23698940c | ||
![]() |
50bb733293 | ||
![]() |
6420157b55 | ||
![]() |
86bdfbf88c | ||
![]() |
81e8f79164 | ||
![]() |
64a0ad33c1 | ||
![]() |
3cd0ffecaf | ||
![]() |
a2ddabaedb | ||
![]() |
1fec1978aa | ||
![]() |
8de67fd745 | ||
![]() |
3b51582416 | ||
![]() |
ffa2fdce9d | ||
![]() |
588f1c7592 | ||
![]() |
ab1ece2460 | ||
![]() |
7a935d8a87 | ||
![]() |
3926eba585 | ||
![]() |
74bf420610 | ||
![]() |
324f18a0b2 | ||
![]() |
c134e391e6 | ||
![]() |
24504951b0 | ||
![]() |
f7f02ab16a | ||
![]() |
fe810fcd37 | ||
![]() |
17167e79d2 | ||
![]() |
7bd86048a8 | ||
![]() |
d399f024a7 | ||
![]() |
21f06abef8 | ||
![]() |
fbe0e96fd5 | ||
![]() |
94e00dd38d | ||
![]() |
c3f5432877 | ||
![]() |
4dcc187a72 | ||
![]() |
97c99dfaaf | ||
![]() |
da83041a3f | ||
![]() |
d40a4f14dd | ||
![]() |
de7b0278f4 | ||
![]() |
17f5e10ffc | ||
![]() |
a0dbb6c97c | ||
![]() |
4d330a6110 | ||
![]() |
9fc2bf6353 | ||
![]() |
f9c7121847 | ||
![]() |
d3a0ac3b6e | ||
![]() |
a6c99844de | ||
![]() |
d51a957247 | ||
![]() |
a0c16cd461 | ||
![]() |
8fe11dff91 | ||
![]() |
efcdcf5898 | ||
![]() |
da543cdae2 | ||
![]() |
0374742e57 | ||
![]() |
408052d1ec | ||
![]() |
b0ebbc3596 | ||
![]() |
e45e1166b2 | ||
![]() |
de64d5c3bc | ||
![]() |
07130c4b26 | ||
![]() |
8482464ad0 | ||
![]() |
d7ce6e39d4 | ||
![]() |
97acbd5259 | ||
![]() |
60937a1871 | ||
![]() |
ed43bc377d | ||
![]() |
8d11929815 | ||
![]() |
0e6f8c15c5 | ||
![]() |
8107201a5b | ||
![]() |
395ea4d1d0 | ||
![]() |
7bf317929b | ||
![]() |
3cacf876c9 | ||
![]() |
d6247dd4ec | ||
![]() |
4f0c49f1c4 | ||
![]() |
30455e8b01 | ||
![]() |
60adb94463 | ||
![]() |
a02fd5b588 | ||
![]() |
39ce080318 | ||
![]() |
f53abd2f07 | ||
![]() |
5b0ae0271b | ||
![]() |
ec2efd8c62 | ||
![]() |
146daea513 | ||
![]() |
5ab67faacb | ||
![]() |
4213d37857 | ||
![]() |
0192922910 | ||
![]() |
d2b88e9f84 | ||
![]() |
a32c4aca92 | ||
![]() |
91d41336a7 | ||
![]() |
d73d790612 | ||
![]() |
af0fed6669 | ||
![]() |
a24c13b902 | ||
![]() |
c44c6a8d88 | ||
![]() |
5f62a68e71 | ||
![]() |
5af90fee46 | ||
![]() |
b17566f113 | ||
![]() |
29edea050b | ||
![]() |
7ceb646e90 | ||
![]() |
0ff39e4d10 | ||
![]() |
1e146c94bd | ||
![]() |
8a0da04807 | ||
![]() |
9e7a847cce | ||
![]() |
63d3f20e51 | ||
![]() |
817e3fbb05 | ||
![]() |
263e96aba2 | ||
![]() |
0379376fd8 | ||
![]() |
de7efb50c2 | ||
![]() |
400f8dc2d8 | ||
![]() |
b2b63be798 | ||
![]() |
c9aba893de | ||
![]() |
1ac4cdcf4d | ||
![]() |
08a0fef18a | ||
![]() |
6f54c170ab | ||
![]() |
d3b4c7bec4 | ||
![]() |
f8dfe1ea57 | ||
![]() |
ce5f8bab44 | ||
![]() |
59cf70f8f2 | ||
![]() |
561975f435 | ||
![]() |
eae6fea830 | ||
![]() |
2673c2b5b2 | ||
![]() |
3c17f3a836 | ||
![]() |
0890154e16 | ||
![]() |
0877824875 | ||
![]() |
60bd5999b0 | ||
![]() |
d0ec60fa01 | ||
![]() |
e7a70a4acc | ||
![]() |
85cb49e8e1 | ||
![]() |
3f00a6e5e3 | ||
![]() |
35e18a2e09 | ||
![]() |
8ae2ae3b5c | ||
![]() |
27c5f2aede | ||
![]() |
34a69aa0b2 | ||
![]() |
72fc903f4a | ||
![]() |
4f04992de8 | ||
![]() |
1b147494d4 | ||
![]() |
b535a0b44e | ||
![]() |
6c2271584c | ||
![]() |
1002b28c95 | ||
![]() |
dfded7bc9d | ||
![]() |
36fde9ede5 | ||
![]() |
6b4ac1b960 | ||
![]() |
cc141ba02f | ||
![]() |
8fc931a61b | ||
![]() |
0b6cf54508 | ||
![]() |
ff12163176 | ||
![]() |
6a8a0bbd6b | ||
![]() |
f8ebffac65 | ||
![]() |
e58f4c0bdf | ||
![]() |
f450ff278d | ||
![]() |
566fd893f4 | ||
![]() |
30ab46999c | ||
![]() |
0320f9d5b5 | ||
![]() |
ad7c9ed123 | ||
![]() |
25acdba344 | ||
![]() |
786059802b | ||
![]() |
0ae708114b | ||
![]() |
fbeaabb841 | ||
![]() |
98bef605a7 | ||
![]() |
37a0e48b46 | ||
![]() |
fea1a66aba | ||
![]() |
0ffdb51f95 | ||
![]() |
4e596629fd | ||
![]() |
61281dd226 | ||
![]() |
61d1f2180f | ||
![]() |
3bcf941205 | ||
![]() |
1746c9d331 | ||
![]() |
58c31c5353 | ||
![]() |
e872719ef1 |
@@ -45,7 +45,8 @@ before_build:
|
||||
- CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
|
||||
- SET PATH=%PATH%;c:\qbt\qt5_32\bin;%CACHE_DIR%\jom;
|
||||
# setup project
|
||||
- COPY /Y "%CACHE_DIR%\conf.pri" "%REPO_DIR%"
|
||||
- COPY /Y "%CACHE_DIR%\winconf.pri" "%REPO_DIR%"
|
||||
- COPY /Y "%CACHE_DIR%\winconf-msvc.pri" "%REPO_DIR%"
|
||||
# workarounds
|
||||
- MKLINK /J "c:\qbt\base" "%CACHE_DIR%\base"
|
||||
|
||||
|
@@ -134,13 +134,13 @@ install:
|
||||
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.1.7+git20180422.3ede0b9c20+patched-configure.el_capitan.bottle.tar.gz
|
||||
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar-1.1.6+git20180101.b45acf28a5+patched-configure.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.1.7+git20180422.3ede0b9c20+patched-configure.el_capitan.bottle.tar.gz" "$(brew --cache)"
|
||||
cp "$HOME/hombebrew_cache/libtorrent-rasterbar-1.1.6+git20180101.b45acf28a5+patched-configure.el_capitan.bottle.tar.gz" "$(brew --cache)"
|
||||
brew install "$HOME/hombebrew_cache/libtorrent-rasterbar.rb"
|
||||
|
||||
if [ "$build_system" = "cmake" ]; then
|
||||
@@ -166,10 +166,7 @@ script:
|
||||
if [ "$build_system" = "cmake" ]; then
|
||||
mkdir build
|
||||
cd build
|
||||
if [ "$gui" = "false" ]; then
|
||||
DISABLE_GUI_OPTION="-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=ON"
|
||||
fi
|
||||
cmake $DISABLE_GUI_OPTION -DCMAKE_INSTALL_PREFIX="$qbt_path" "$MY_CMAKE_OPENSSL_HINT" \
|
||||
cmake -DGUI=${gui} -DCMAKE_INSTALL_PREFIX="$qbt_path" "$MY_CMAKE_OPENSSL_HINT" \
|
||||
-G "Ninja" -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE ..
|
||||
BUILD_TOOL="ninja"
|
||||
fi
|
||||
|
@@ -12,7 +12,7 @@ mode = developer
|
||||
|
||||
|
||||
[qbittorrent.qbittorrentdesktop_master]
|
||||
source_file = dist/unix/qbittorrent.desktop
|
||||
source_file = src/icons/qBittorrent.desktop
|
||||
source_lang = en
|
||||
type = DESKTOP
|
||||
minimum_perc = 23
|
||||
|
@@ -1,6 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
message(WARNING "No official support for cmake build system. If it is broken, please submit patches!")
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_policy(VERSION 3.5)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
|
||||
include(FunctionReadVersion)
|
||||
@@ -26,29 +25,32 @@ add_definitions(-DQBT_VERSION_BUILD=${VER_BUILD})
|
||||
add_definitions(-DQBT_VERSION="v${PROJECT_VERSION}")
|
||||
add_definitions(-DQBT_VERSION_2="${PROJECT_VERSION}")
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(FeatureSummary)
|
||||
|
||||
# version requirements
|
||||
set(requiredBoostVersion 1.35)
|
||||
set(requiredQtVersion 5.5.1)
|
||||
if (UNIX AND NOT APPLE)
|
||||
include(GNUInstallDirs)
|
||||
endif (UNIX AND NOT APPLE)
|
||||
|
||||
if(WIN32)
|
||||
include(winconf)
|
||||
endif(WIN32)
|
||||
|
||||
# we need options here, because they are used not only in "src" subdir, but in the "dist" dir too
|
||||
include(CMakeDependentOption)
|
||||
|
||||
# we need options here, at the top level, because they are used not only in "src" subdir, but in the "dist" dir too
|
||||
include(CompileFeature)
|
||||
option(SYSTEM_QTSINGLEAPPLICATION
|
||||
"Use the system qtsingleapplication library or shipped one otherwise")
|
||||
|
||||
option(GUI "Allows to disable GUI for headless running. Disables QtDBus and the GeoIP Database" ON)
|
||||
|
||||
option(WEBUI "Allows to disable the WebUI." ON)
|
||||
|
||||
if (WIN32)
|
||||
option(STACKTRACE_WIN "")
|
||||
else (WIN32)
|
||||
cmake_dependent_option(SYSTEMD "Install the systemd service file (headless only)" OFF
|
||||
"NOT GUI" OFF)
|
||||
cmake_dependent_option(DBUS "Enable use of QtDBus (GUI only)" ON "GUI" OFF)
|
||||
endif(WIN32)
|
||||
|
||||
optional_compile_definitions(COUNTRIES_RESOLUTION FEATURE DESCRIPTION "Enable resolving peers IP addresses to countries"
|
||||
DEFAULT ON DISABLED DISABLE_COUNTRIES_RESOLUTION)
|
||||
optional_compile_definitions(STACKTRACE FEATURE DESCRIPTION "Enable stacktraces"
|
||||
DEFAULT ON ENABLED STACKTRACE)
|
||||
optional_compile_definitions(WEBUI FEATURE DESCRIPTION "Enables built-in HTTP server for headless use"
|
||||
DEFAULT ON DISABLED DISABLE_WEBUI)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(dist)
|
||||
|
||||
feature_summary(DESCRIPTION "\nConfiguration results:" WHAT ALL)
|
||||
|
File diff suppressed because it is too large
Load Diff
242
CONTRIBUTING.md
242
CONTRIBUTING.md
@@ -1,221 +1,35 @@
|
||||
# How to contribute to qBittorrent
|
||||
# Filing an issue
|
||||
|
||||
### Must read
|
||||
* If you aren't sure, you can ask on the [**forum**](http://forum.qbittorrent.org) or read our [**wiki**](http://wiki.qbittorrent.org) first.
|
||||
* Do a quick **search**. Others might already reported the issue.
|
||||
* Write in **English**!
|
||||
* Provide **version** information: (You can find version numbers at menu `Help -> About -> Libraries`)
|
||||
```
|
||||
qBittorrent:
|
||||
Qt:
|
||||
libtorrent:
|
||||
boost:
|
||||
OS version:
|
||||
```
|
||||
* Provide **steps** to reproduce the problem, it will be easier to pinpoint the fault.
|
||||
* **Screenshots**! A screenshot is worth a thousand words. just upload it. [(How?)](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests)
|
||||
|
||||
### Good to know
|
||||
* **Be patient**. The dev team is small and resource limited. Devs finding their free time, analyzing the problem and fixing the issue, it all takes time. :clock3:
|
||||
* If you can code, why not become a **contributor** by fixing the issue and open a pull request? :wink:
|
||||
* Harsh words or threats won't help your situation. What's worse, your complain will (very likely) to be **ignored**. :fearful:
|
||||
|
||||
There are three main ways to contribute to the project.
|
||||
Read the respective section to find out more.
|
||||
|
||||
### Table Of Contents
|
||||
|
||||
* **[Bug reporting etiquette](#bug-reporting-etiquette)**
|
||||
|
||||
|
||||
* **[Submitting an issue/bug report](#submitting-an-issuebug-report)**
|
||||
* [What is an actual bug report?](#what-is-an-actual-bug-report)
|
||||
* [Before submitting a bug report](#before-submitting-a-bug-report)
|
||||
* [Steps to ensure a good bug report](#steps-to-ensure-a-good-bug-report)
|
||||
|
||||
|
||||
* **[Suggesting enhancements/feature requests](#suggesting-enhancementsfeature-requests)**
|
||||
* [Before submitting an enhancement/feature request](#before-submitting-an-enhancementfeature-request)
|
||||
* [Steps to ensure a good enhancement/feature suggestion](#steps-to-ensure-a-good-enhancementfeature-suggestion)
|
||||
|
||||
|
||||
* **[Opening a pull request](#opening-a-pull-request)**
|
||||
* [Must read](#must-read)
|
||||
* [Good to know](#good-to-know)
|
||||
|
||||
# Bug reporting etiquette
|
||||
|
||||
* Issues, pull requests, and comments must always be in **English.**
|
||||
|
||||
* This project is supported by volunteers, do not expect "customer support"-style interaction.
|
||||
|
||||
* **Be patient.** The development team is small and resource limited. Developers and contributors take from their free time to analyze the problem and fix the issue. :clock3:
|
||||
|
||||
* Harsh words or threats won't help your situation. What's worse, your complain will (very likely) be **ignored.** :fearful:
|
||||
|
||||
# Submitting an issue/bug report
|
||||
|
||||
This section guides you through submitting an issue/bug report for qBittorrent.
|
||||
|
||||
Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.
|
||||
|
||||
Make sure to follow these rules carefully when submitting a bug report. Failure to do so will result in the issue being closed.
|
||||
|
||||
## What is an actual bug report?
|
||||
|
||||
Developers and contributors are not supposed to deal with issues for which little to no investigation to find the actual cause of a purported issue was made by the reporter.
|
||||
|
||||
Positive contributions are those which are reported with efforts to find the actual cause of an issue, or at the very least efforts were made to narrow it as much as possible.
|
||||
|
||||
Requiring people to investigate as much as possible before opening an issue will more than likely avoid burdening the project with invalid issues or issues unrelated to qBittorrent.
|
||||
|
||||
The following are _not_ bug reports. **Check the [wiki][wiki-url], [forum][forum-url] or other places for help and support for issues like these**:
|
||||
|
||||
- Explanation of qBittorrent options (see [wiki][wiki-url]).
|
||||
- Help with WebUI setup.
|
||||
- Help with embedded tracker setup.
|
||||
- Help about BitTorrent in general.
|
||||
- Issues with specific search plugins.
|
||||
- Asking for specific builds of qBittorrent other than the current one. You can install older releases at your own risk or for regression testing purposes. Previous Windows and macOS builds are available [here][builds-url].
|
||||
- If you want older Linux builds, you will have to compile them yourself from the corresponding commits, or ask someone on the [forum][forum-url] to do it for you.
|
||||
- Possibly others. Read on and use common sense.
|
||||
|
||||
The issue tracker is for provable issues only: You will have to make the case that the issue is really with qBittorrent and not something else on your side.
|
||||
|
||||
To make a case means to provide detailed steps so that anybody can reproduce the issue.
|
||||
Be sure to rule out that the issue is not caused by something specific on your side.
|
||||
|
||||
Issue reports for bugs that apparently aren't easily reproducible or that you can't figure out what triggers it even though you tried are OK.
|
||||
|
||||
Any issue opened without effort to provide the required details for developers, contributors or anybody else to reproduce the problem will be closed as invalid.
|
||||
For example:
|
||||
- Crash reports with just a stack trace.
|
||||
- Speculated performance issues that do not come with actual profiling data + analysis supporting the claim.
|
||||
|
||||
## Before submitting a bug report
|
||||
|
||||
- **Do some basic troubleshooting (examples)**:
|
||||
- Restart qBittorrent.
|
||||
- Restart your PC.
|
||||
- Update your OS (e.g. Windows updates).
|
||||
- Update your network card drivers.
|
||||
- Fully reinstall qBittorrent.
|
||||
- etc...
|
||||
- Make sure the problem is not caused by anti-virus or other program messing with your files.
|
||||
- Check if you can reproduce the problem in the latest version of qBittorrent.
|
||||
- **Check [forum][forum-url] and [wiki][wiki-url].** You might be able to find the cause of the problem and fix things yourself.
|
||||
- **Check if the issue exists already in the issue tracker.**
|
||||
- If it does and the issue is still open, add a comment to the existing issue instead of opening a new one.
|
||||
- If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
|
||||
- If the issue is with the search functionality:
|
||||
- **Make sure you have [`python`][python-url] installed correctly (remember the search functionality requires a working python installation).**
|
||||
- Make sure it is in fact a problem with the search functionality itself, and not a problem with the plugins. If something does not work properly with the search functionality, the first step is to rule out search plugin-related issues.
|
||||
- For search plugin issues, report on the respective search plugin support page, or at [qbittorrent/search-plugins][search-plugins-url].
|
||||
|
||||
## Steps to ensure a good bug report
|
||||
|
||||
**Follow these guidelines** in order to provide as much useful information as possible right away. Not all of them are applicable to all issues, but you are expected to follow most of these steps (use common sense).
|
||||
Otherwise, we've noticed that a lot of your time (and the developers') gets thrown away on exchanging back and forth to get this information.
|
||||
|
||||
* Use a **clear and descriptive title** for the issue to identify the problem.
|
||||
|
||||
* Post only **one specific issue per submission.**
|
||||
|
||||
* **Fill out the issue template properly.**
|
||||
|
||||
- **Make sure you are using qBittorrent on a supported platform.** Do not submit issues which can only be reproduced on beta/unsupported releases of supported operating systems (e.g. Windows 10 Insider, Ubuntu 12.04 LTS, etc).
|
||||
These are unstable/unsupported platforms, and in all likelihood, whatever the issue is, it is not related to qBittorrent.
|
||||
|
||||
* **Specify the OS you're using, its version and architecture.**
|
||||
* Examples: Windows 8.1 32-bit, Linux Mint 17.1 64-bit, Windows 10 Fall creators Update 64-bit, etc.
|
||||
|
||||
|
||||
* **Report only if you run into the issue with an official stable release, a beta release, or with the most recent upstream changes (in this last case specify the specific commit you are on).** (beta testing is encouraged :smile:). We do not provide support for bugs on unofficial Windows builds.
|
||||
|
||||
* **Specify the version of qBittorrent** you are using, as well as its **architecture** (x86 or x64) and its **libraries' versions** (Help -> About -> Libraries).
|
||||
|
||||
* Specify **how you installed**:
|
||||
- Linux: either from the PPA, your distribution's repositories, or compiled from source, or even possibly third-party repositories.
|
||||
- Windows: either from the installer, or compiled from source, or even possibly third-party repositories.
|
||||
- macOS: either from the installer, or compiled from source, or even possibly third-party repositories.
|
||||
|
||||
|
||||
* **Describe the exact steps which reproduce the problem in as many details as possible.**
|
||||
- For example, start by explaining how you started qBittorrent, e.g. was it via the terminal? Desktop icon? Did you start it as root or normal user?
|
||||
- **When listing steps, don't just say what you did, but explain how you did it.**
|
||||
- For example, if you added a torrent for download, did you do so via a `.torrent` file or via a magnet link? If it was with a torrent file did you do so by dragging the torrent file from the file manager to the transfer list, or did you use the "Add Torrent File" in the Top Bar?
|
||||
- Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior; this is what we'll be looking for after executing the steps.
|
||||
|
||||
|
||||
* **Explain which behavior you expected to see instead** and why.
|
||||
|
||||
* Use **screenshots/animated GIFs to help describe the issue** whenever appropriate [(How?)][attachments-howto-url].
|
||||
|
||||
* If the problem wasn't triggered by a specific action, describe what you were doing before the problem happened.
|
||||
|
||||
* **If you are reporting that qBittorrent crashes**, include the stack trace in the report; include it in a code block, a file attachment, or put it in a gist and provide link to that gist.
|
||||
|
||||
* **For performance-related issues**, include as much profiling data as you can (resource usage graphs, etc).
|
||||
|
||||
* Paste the **qBittorrent log** (or put the contents of the log in a gist and provide a link to the gist). The log can be viewed in the GUI (View -> Log -> tick all boxes). If you can't do that, the file is at:
|
||||
- Linux: `~/.local/share/data/qBittorrent/logs/qBittorrent.log`
|
||||
- Windows: `%LocalAppData%\qBittorrent\logs`
|
||||
- macOS: `~/Library/Application Support/qBittorrent/qBittorrent.log`
|
||||
|
||||
|
||||
* **Do NOT post comments like "+1" or "me too!"** without providing new relevant info on the issue. Using the built-in reactions is OK though. Remember that you can use the "subscribe" button to receive notifications of that report without having to comment first.
|
||||
|
||||
* If there seems to be an **issue with specific torrent files/magnet links**:
|
||||
- Don't post private `.torrent` files/magnet links, or ones that point to copyrighted content. If you are willing, offer to email a link or the `.torrent` file itself to whoever developer is debugging it and requests it.
|
||||
- Make sure you can't reproduce the problem with another client, to rule out the possibility that the issue is with the `.torrent` file/magnet link itself.
|
||||
|
||||
|
||||
* A screenshot, transcription or file upload of any of **qBittorrent's preferences that differ from the defaults.** Please include everything different from the defaults whether or not it seems relevant to your issue.
|
||||
|
||||
* **Attachment rules**:
|
||||
- Short logs and error messages can be pasted as quotes/code whenever small enough; otherwise make a gist with the contents and post the link to the gist.
|
||||
- Avoid linking/attaching impractical file formats such as PDFs/Word documents with images. If you want to post an image, just post the image.
|
||||
|
||||
### Provide more context by answering these questions (if applicable):
|
||||
|
||||
- Can you **reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens (e.g. only happens with extremely large torrents/only happens after qBittorrent is open for more than 2 days/etc...)
|
||||
|
||||
- Did the problem start happening recently (e.g. after updating to a new version of qBittorrent) or was this always a problem?
|
||||
|
||||
- If the problem started happening recently, can you reproduce the problem in an older version of qBittorrent?
|
||||
|
||||
- Are you saving files locally (in a disk in your machine), or are you saving them remotely (e.g. network drives)?
|
||||
|
||||
- Are you using qBittorrent with multiple monitors? If so, can you reproduce the problem when you use a single monitor?
|
||||
|
||||
Good read: [How to Report Bugs Effectively][howto-report-bugs-url]
|
||||
|
||||
# Suggesting enhancements/feature requests
|
||||
|
||||
This section guides you through submitting an enhancement suggestion for qBittorrent, including completely new features and minor improvements to existing functionality.
|
||||
|
||||
Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.
|
||||
|
||||
## Before submitting an enhancement/feature request
|
||||
|
||||
* Check the [wiki][wiki-url] and [forum][forum-url] for tips — you might discover that the enhancement is already available.
|
||||
* Most importantly, check if you're using the latest version of qBittorrent and if you can get the desired behavior by changing qBittorrent's settings.
|
||||
* Check in the [releases][releases-url] page or on the [forum][forum-url], see if there's already a alpha/beta version with that enhancement.
|
||||
* Perform a cursory search to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
||||
|
||||
## Steps to ensure a good enhancement/feature suggestion
|
||||
|
||||
- Specify which version of qBittorrent you're using.
|
||||
- Specify the name and version of the OS you're using.
|
||||
- Provide a step-by-step description of the suggested enhancement in as many details as possible.
|
||||
- Describe the current behavior and explain which behavior you expected to see instead and why.
|
||||
- Include screenshots and animated GIFs which help you demonstrate the steps or point out the part of qBittorrent which the suggestion is related to.
|
||||
- If this enhancement exists in other BitTorrent clients, list those clients.
|
||||
|
||||
# Opening a pull request
|
||||
|
||||
### Must read
|
||||
* Read our [**coding guidelines**][coding-guidelines-url]. There are some scripts to help you: [uncrustify script][uncrustify-script-url], [astyle script][astyle-script-url], [(related thread)][coding-guidelines-thread-url].
|
||||
* Keep the title **short** and provide a **clear** description about what your pull request does.
|
||||
* Provide **screenshots** for UI related changes.
|
||||
* Keep your git commit history **clean** and **precise.** Refer to the section about "Git commit messages" in the [**coding guidelines**][coding-guidelines-url].
|
||||
* If your commit fixes a reported issue (for example #4134), add the following message to the commit `Closes #4134.`. Example [here][commit-message-fix-issue-example-url].
|
||||
* Read our [**coding guidelines**](https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md). There are some scripts to help you: [uncrustify script](https://raw.githubusercontent.com/qbittorrent/qBittorrent/master/uncrustify.cfg), [astyle script](https://gist.github.com/Chocobo1/539cee860d1eef0acfa6), [(related thread)](https://github.com/qbittorrent/qBittorrent/issues/2192).
|
||||
* Keep the title **short** and provide a **clear** description about what your pull request does.
|
||||
* Provide **screenshots** for UI related changes.
|
||||
* Keep your git commit history **clean** and **precise**. Commits like `xxx fixup` should not appear.
|
||||
* If your commit fix a reported issue (for example #4134), add the following message to the commit `Closes #4134.`. Example [here](https://github.com/qbittorrent/qBittorrent/commit/a74bac20c4e8de9776bf9bb77fdc7526135d1988).
|
||||
|
||||
### Good to know
|
||||
* **Search** pull request history! Others might have already implemented your idea and it is waiting to be merged (or got rejected already). Save your precious time by doing a search first.
|
||||
* When resolving merge conflicts, do `git rebase <target_branch_name>`, don't do `git pull`. Then you can start fixing the conflicts. Here is a good explanation: [link][merging-vs-rebasing-url].
|
||||
|
||||
[astyle-script-url]: https://gist.github.com/Chocobo1/539cee860d1eef0acfa6
|
||||
[attachments-howto-url]: https://help.github.com/articles/file-attachments-on-issues-and-pull-requests
|
||||
[coding-guidelines-url]: https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md
|
||||
[coding-guidelines-thread-url]: https://github.com/qbittorrent/qBittorrent/issues/2192
|
||||
[commit-message-fix-issue-example-url]: https://github.com/qbittorrent/qBittorrent/commit/c07cd440cd46345297debb47cb260f8688975f50
|
||||
[forum-url]: http://forum.qbittorrent.org/
|
||||
[howto-report-bugs-url]: https://www.chiark.greenend.org.uk/~sgtatham/bugs.html
|
||||
[merging-vs-rebasing-url]: https://www.atlassian.com/git/tutorials/merging-vs-rebasing
|
||||
[python-url]: https://www.python.org/
|
||||
[releases-url]: https://github.com/qbittorrent/qBittorrent/releases
|
||||
[search-plugins-url]: https://github.com/qbittorrent/search-plugins
|
||||
[uncrustify-script-url]: https://raw.githubusercontent.com/qbittorrent/qBittorrent/master/uncrustify.cfg
|
||||
[wiki-url]: https://github.com/qbittorrent/qBittorrent/wiki
|
||||
[builds-url]: https://sourceforge.net/projects/qbittorrent/files/
|
||||
* **Search** pull request history! Others might already implemented your idea and is waiting to be merged (or got rejected already). Save your precious time by doing a search first.
|
||||
* When resolving merge conflicts, do `git rebase <target_branch_name>`, don't do `git pull`. Then you can start fixing the conflicts. Here is a good explanation: [link](https://www.atlassian.com/git/tutorials/merging-vs-rebasing).
|
||||
|
@@ -1,22 +0,0 @@
|
||||
# Helper function for coupling add_feature_info(), option(), and add_definitions()
|
||||
|
||||
function(optional_compile_definitions _name)
|
||||
set(options FEATURE)
|
||||
set(oneValueArgs DESCRIPTION DEFAULT)
|
||||
set(multiValueArgs ENABLED DISABLED)
|
||||
cmake_parse_arguments(OCD "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
option(${_name} "${OCD_DESCRIPTION}" ${OCD_DEFAULT})
|
||||
if (${${_name}})
|
||||
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY COMPILE_DEFINITIONS ${OCD_ENABLED})
|
||||
else()
|
||||
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY COMPILE_DEFINITIONS ${OCD_DISABLED})
|
||||
endif()
|
||||
if(${OCD_FEATURE})
|
||||
add_feature_info(${_name} ${_name} "${OCD_DESCRIPTION}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(feature_option _name _description _default)
|
||||
option(${_name} "${_description}" ${_default})
|
||||
add_feature_info(${_name} ${_name} "${_description}")
|
||||
endmacro()
|
@@ -99,7 +99,6 @@ list(FIND LibtorrentRasterbar_DEFINITIONS -DTORRENT_USE_OPENSSL LibtorrentRaster
|
||||
if(LibtorrentRasterbar_ENCRYPTION_INDEX GREATER -1)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
set(LibtorrentRasterbar_LIBRARIES ${LibtorrentRasterbar_LIBRARIES} OpenSSL::SSL OpenSSL::Crypto)
|
||||
list(APPEND LibtorrentRasterbar_INCLUDE_DIRS "${OPENSSL_INCLUDE_DIR}")
|
||||
set(LibtorrentRasterbar_OPENSSL_ENABLED ON)
|
||||
endif()
|
||||
|
||||
@@ -114,10 +113,10 @@ mark_as_advanced(LibtorrentRasterbar_INCLUDE_DIR LibtorrentRasterbar_LIBRARY
|
||||
LibtorrentRasterbar_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES
|
||||
LibtorrentRasterbar_ENCRYPTION_INDEX)
|
||||
|
||||
if (LibtorrentRasterbar_FOUND AND NOT TARGET LibtorrentRasterbar::torrent-rasterbar)
|
||||
add_library(LibtorrentRasterbar::torrent-rasterbar UNKNOWN IMPORTED)
|
||||
if (LibtorrentRasterbar_FOUND AND NOT TARGET LibtorrentRasterbar::LibTorrent)
|
||||
add_library(LibtorrentRasterbar::LibTorrent UNKNOWN IMPORTED)
|
||||
|
||||
set_target_properties(LibtorrentRasterbar::torrent-rasterbar PROPERTIES
|
||||
set_target_properties(LibtorrentRasterbar::LibTorrent PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${LibtorrentRasterbar_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LibtorrentRasterbar_INCLUDE_DIRS}"
|
||||
|
@@ -1,79 +1,94 @@
|
||||
# - Try to find the QtSingleApplication includes and library
|
||||
# which defines
|
||||
#
|
||||
# QtSingleApplication_FOUND - system has QtSingleApplication
|
||||
# QtSingleApplication_INCLUDE_DIR - where to find header QtSingleApplication
|
||||
# QtSingleApplication_LIBRARIES - the libraries to link against to use QtSingleApplication
|
||||
# QtSingleApplication_LIBRARY - where to find the QtSingleApplication library (not for general use)
|
||||
# QTSINGLEAPPLICATION_FOUND - system has QtSingleApplication
|
||||
# QTSINGLEAPPLICATION_INCLUDE_DIR - where to find header QtSingleApplication
|
||||
# QTSINGLEAPPLICATION_LIBRARIES - the libraries to link against to use QtSingleApplication
|
||||
# QTSINGLEAPPLICATION_LIBRARY - where to find the QtSingleApplication library (not for general use)
|
||||
|
||||
# copyright (c) 2013 TI_Eugene ti.eugene@gmail.com
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the FreeBSD license.
|
||||
|
||||
SET(QtSingleApplication_FOUND FALSE)
|
||||
SET(QTSINGLEAPPLICATION_FOUND FALSE)
|
||||
|
||||
if (Qt5Widgets_FOUND)
|
||||
set(_includeFileName qtsingleapplication.h)
|
||||
else()
|
||||
set(_includeFileName qtsinglecoreapplication.h)
|
||||
endif()
|
||||
IF(QT4_FOUND)
|
||||
message(STATUS "Looking for Qt4 single application library")
|
||||
FIND_PATH(QTSINGLEAPPLICATION_INCLUDE_DIR QtSingleApplication
|
||||
# standard locations
|
||||
/usr/include
|
||||
/usr/include/QtSolutions
|
||||
# qt4 location except mac's frameworks
|
||||
"${QT_INCLUDE_DIR}/QtSolutions"
|
||||
# mac's frameworks
|
||||
${FRAMEWORK_INCLUDE_DIR}/QtSolutions
|
||||
)
|
||||
|
||||
FOREACH(TOP_INCLUDE_PATH in ${Qt5Core_INCLUDE_DIRS} ${FRAMEWORK_INCLUDE_DIR})
|
||||
FIND_PATH(QtSingleApplication_INCLUDE_DIR ${_includeFileName} ${TOP_INCLUDE_PATH}/QtSolutions)
|
||||
SET(QTSINGLEAPPLICATION_NAMES ${QTSINGLEAPPLICATION_NAMES}
|
||||
QtSolutions_SingleApplication-2.6 libQtSolutions_SingleApplication-2.6)
|
||||
FIND_LIBRARY(QTSINGLEAPPLICATION_LIBRARY
|
||||
NAMES ${QTSINGLEAPPLICATION_NAMES}
|
||||
PATHS ${QT_LIBRARY_DIR}
|
||||
)
|
||||
ELSEIF(Qt5Core_FOUND)
|
||||
message(STATUS "Looking for Qt5 single application library")
|
||||
FOREACH(TOP_INCLUDE_PATH in ${Qt5Core_INCLUDE_DIRS} ${FRAMEWORK_INCLUDE_DIR})
|
||||
FIND_PATH(QTSINGLEAPPLICATION_INCLUDE_DIR QtSingleApplication ${TOP_INCLUDE_PATH}/QtSolutions)
|
||||
|
||||
IF(QtSingleApplication_INCLUDE_DIR)
|
||||
BREAK()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
IF(QTSINGLEAPPLICATION_INCLUDE_DIR)
|
||||
BREAK()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
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)
|
||||
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)
|
||||
|
||||
FIND_LIBRARY(QtSingleApplication_LIBRARY
|
||||
NAMES ${QtSingleApplication_NAMES}
|
||||
PATHS ${_QT5_CORELIBRARYPATH}
|
||||
)
|
||||
FIND_LIBRARY(QTSINGLEAPPLICATION_LIBRARY
|
||||
NAMES ${QTSINGLEAPPLICATION_NAMES}
|
||||
PATHS ${_QT5_CORELIBRARYPATH}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF (QtSingleApplication_LIBRARY AND QtSingleApplication_INCLUDE_DIR)
|
||||
IF (QTSINGLEAPPLICATION_LIBRARY AND QTSINGLEAPPLICATION_INCLUDE_DIR)
|
||||
|
||||
SET(QtSingleApplication_LIBRARIES ${QtSingleApplication_LIBRARY})
|
||||
SET(QtSingleApplication_FOUND TRUE)
|
||||
SET(QTSINGLEAPPLICATION_LIBRARIES ${QTSINGLEAPPLICATION_LIBRARY})
|
||||
SET(QTSINGLEAPPLICATION_FOUND TRUE)
|
||||
|
||||
IF (CYGWIN)
|
||||
IF(BUILD_SHARED_LIBS)
|
||||
# No need to define QtSingleApplication_USE_DLL here, because it's default for Cygwin.
|
||||
# No need to define QTSINGLEAPPLICATION_USE_DLL here, because it's default for Cygwin.
|
||||
ELSE(BUILD_SHARED_LIBS)
|
||||
SET (QtSingleApplication_DEFINITIONS -DQTSINGLEAPPLICATION_STATIC)
|
||||
SET (QTSINGLEAPPLICATION_DEFINITIONS -DQTSINGLEAPPLICATION_STATIC)
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
ENDIF (CYGWIN)
|
||||
|
||||
ENDIF (QtSingleApplication_LIBRARY AND QtSingleApplication_INCLUDE_DIR)
|
||||
ENDIF (QTSINGLEAPPLICATION_LIBRARY AND QTSINGLEAPPLICATION_INCLUDE_DIR)
|
||||
|
||||
IF (QtSingleApplication_FOUND)
|
||||
IF (NOT QtSingleApplication_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found QtSingleApplication: ${QtSingleApplication_LIBRARY}")
|
||||
MESSAGE(STATUS " includes: ${QtSingleApplication_INCLUDE_DIR}")
|
||||
ENDIF (NOT QtSingleApplication_FIND_QUIETLY)
|
||||
if(NOT TARGET QtSingleApplication::QtSingleApplication)
|
||||
add_library(QtSingleApplication::QtSingleApplication UNKNOWN IMPORTED)
|
||||
set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${QtSingleApplication_INCLUDE_DIR}"
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${QtSingleApplication_INCLUDE_DIR}"
|
||||
)
|
||||
if(EXISTS "${QtSingleApplication_LIBRARY}")
|
||||
set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${QtSingleApplication_LIBRARY}")
|
||||
endif()
|
||||
endif(NOT TARGET QtSingleApplication::QtSingleApplication)
|
||||
|
||||
ELSE (QtSingleApplication_FOUND)
|
||||
IF (QTSINGLEAPPLICATION_FOUND)
|
||||
IF (NOT QtSingleApplication_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found QtSingleApplication: ${QTSINGLEAPPLICATION_LIBRARY}")
|
||||
MESSAGE(STATUS " includes: ${QTSINGLEAPPLICATION_INCLUDE_DIR}")
|
||||
ENDIF (NOT QtSingleApplication_FIND_QUIETLY)
|
||||
ELSE (QTSINGLEAPPLICATION_FOUND)
|
||||
IF (QtSingleApplication_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find QtSingleApplication library")
|
||||
ENDIF (QtSingleApplication_FIND_REQUIRED)
|
||||
ENDIF (QtSingleApplication_FOUND)
|
||||
ENDIF (QTSINGLEAPPLICATION_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(QtSingleApplication_INCLUDE_DIR QtSingleApplication_LIBRARY)
|
||||
MARK_AS_ADVANCED(QTSINGLEAPPLICATION_INCLUDE_DIR QTSINGLEAPPLICATION_LIBRARY)
|
||||
|
||||
if(NOT TARGET QtSingleApplication::QtSingleApplication)
|
||||
add_library(QtSingleApplication::QtSingleApplication UNKNOWN IMPORTED)
|
||||
set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${QTSINGLEAPPLICATION_INCLUDE_DIR}"
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${QTSINGLEAPPLICATION_INCLUDE_DIR}"
|
||||
)
|
||||
if(EXISTS "${QTSINGLEAPPLICATION_LIBRARY}")
|
||||
set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${QTSINGLEAPPLICATION_LIBRARY}")
|
||||
endif()
|
||||
endif(NOT TARGET QtSingleApplication::QtSingleApplication)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
# - macro similar to target_link_libraries, which links Qt components
|
||||
# names of the components are passed in Qt4/Qt5 agnostic way (Core, DBus, Xml...)
|
||||
# names of the components are pased in Qt4/Qt5 agnostic way (Core, DBus, Xml...)
|
||||
# and the macro links Qt4 ones if QT4_FOUND is set or Qt5 ones if not
|
||||
|
||||
macro (target_link_qt_components target)
|
||||
|
@@ -11,17 +11,18 @@ macro(qbt_set_compiler_options)
|
||||
#-Wshadow -Wconversion ?
|
||||
set(_GCC_COMMON_C_AND_CXX_FLAGS "-Wall -Wextra"
|
||||
"-Wfloat-equal -Wcast-qual -Wcast-align"
|
||||
"-Wsign-conversion -Winvalid-pch -Wno-long-long"
|
||||
#"-fstack-protector-all"
|
||||
#"-Werror -Wno-error=deprecated-declarations"
|
||||
"-Wsign-conversion -Winvalid-pch -Werror=return-type -Wno-long-long"
|
||||
# -fstack-protector-all
|
||||
"-Werror -Wno-error=deprecated-declarations"
|
||||
)
|
||||
set(_GCC_COMMON_CXX_FLAGS "-fexceptions -frtti"
|
||||
"-Woverloaded-virtual -Wold-style-cast"
|
||||
set (_GCC_COMMON_CXX_FLAGS "-fexceptions -frtti"
|
||||
"-Woverloaded-virtual -Wold-style-cast -Wstrict-null-sentinel"
|
||||
"-Wnon-virtual-dtor -Wfloat-equal -Wcast-qual -Wcast-align"
|
||||
#"-Weffc++"
|
||||
#"-Werror -Wno-error=cpp"
|
||||
"-Werror=overloaded-virtual"
|
||||
# "-Weffc++"
|
||||
"-Werror -Wno-error=cpp"
|
||||
# we should modify code to make these ones obsolete
|
||||
#"-Wno-error=sign-conversion -Wno-error=float-equal"
|
||||
"-Wno-error=sign-conversion -Wno-error=float-equal"
|
||||
)
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
|
||||
@@ -53,20 +54,6 @@ macro(qbt_set_compiler_options)
|
||||
endif(${GLIBC_VERSION})
|
||||
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# Clang 5.0 still doesn't support -Wstrict-null-sentinel
|
||||
check_cxx_compiler_flag(-Wstrict-null-sentinel _STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
||||
if (_STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
||||
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wstrict-null-sentinel")
|
||||
endif (_STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
||||
|
||||
# Code should be improved to render this not needed
|
||||
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wno-error=unused-function -Wno-error=inconsistent-missing-override")
|
||||
else ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# GCC supports it
|
||||
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wstrict-null-sentinel")
|
||||
endif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
|
||||
string(REPLACE ";" " " _GCC_COMMON_C_AND_CXX_FLAGS_STRING "${_GCC_COMMON_C_AND_CXX_FLAGS}")
|
||||
string(REPLACE ";" " " _GCC_COMMON_CXX_FLAGS_STRING "${_GCC_COMMON_CXX_FLAGS}")
|
||||
|
||||
|
@@ -1,17 +1,16 @@
|
||||
# a helper function which appends source to the target
|
||||
# sources file names are relative to the the target source dir
|
||||
# a helper function which appends source to the main qBt target
|
||||
# sources file names are relative to the the ${qBittorrent_SOURCE_DIR}
|
||||
|
||||
function (qbt_target_sources _target _scope)
|
||||
get_target_property(targetSourceDir ${_target} SOURCE_DIR)
|
||||
set(sourcesRelative "")
|
||||
foreach(source IN ITEMS ${ARGN})
|
||||
if(IS_ABSOLUTE "${source}")
|
||||
set(sourceAbsolutePath "${source}")
|
||||
function (qbt_target_sources)
|
||||
set (_sources_rel "")
|
||||
foreach (_source IN ITEMS ${ARGN})
|
||||
if (IS_ABSOLUTE "${_source}")
|
||||
set(source_abs "${_source}")
|
||||
else()
|
||||
get_filename_component(sourceAbsolutePath "${source}" ABSOLUTE)
|
||||
get_filename_component(_source_abs "${_source}" ABSOLUTE)
|
||||
endif()
|
||||
file(RELATIVE_PATH sourceRelativePath "${targetSourceDir}" "${sourceAbsolutePath}")
|
||||
list(APPEND sourcesRelative "${sourceRelativePath}")
|
||||
file (RELATIVE_PATH _source_rel "${qbt_executable_SOURCE_DIR}" "${_source_abs}")
|
||||
list (APPEND _sources_rel "${_source_rel}")
|
||||
endforeach()
|
||||
target_sources(${_target} ${_scope} "${sourcesRelative}")
|
||||
endfunction(qbt_target_sources)
|
||||
target_sources (qBittorrent PRIVATE "${_sources_rel}")
|
||||
endfunction (qbt_target_sources)
|
||||
|
@@ -1,9 +1,9 @@
|
||||
if (STACKTRACE)
|
||||
if (STACKTRACE_WIN)
|
||||
if ("${WINXXBITS}" NOT STREQUAL "Win64")
|
||||
add_compile_options(-fno-omit-frame-pointer)
|
||||
endif ("${WINXXBITS}" NOT STREQUAL "Win64")
|
||||
link_libraries(libdbghelp -Wl,--export-all-symbols)
|
||||
endif (STACKTRACE)
|
||||
endif (STACKTRACE_WIN)
|
||||
|
||||
if (("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") OR ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"))
|
||||
link_libraries(-Wl,--dynamicbase)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
if (STACKTRACE)
|
||||
if (STACKTRACE_WIN)
|
||||
if ("${WINXXBITS}" STREQUAL "Win64")
|
||||
add_compile_options(-Zi)
|
||||
else ("${WINXXBITS}" STREQUAL "Win64")
|
||||
@@ -6,7 +6,7 @@ if (STACKTRACE)
|
||||
add_compile_options(-Oy-)
|
||||
endif ("${WINXXBITS}" STREQUAL "Win64")
|
||||
link_libraries(dbghelp.lib)
|
||||
endif (STACKTRACE)
|
||||
endif (STACKTRACE_WIN)
|
||||
|
||||
# Enable Wide characters
|
||||
add_definitions(-DTORRENT_USE_WPATH)
|
||||
|
@@ -50,8 +50,6 @@ DEFINES += BOOST_USE_WINAPI_VERSION=0x0501
|
||||
#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 encountered build error with boost version <= 1.59
|
||||
#DEFINES += BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
# Enable if building against libtorrent 1.1.x (RC_1_1)
|
||||
# built with this flag defined
|
||||
@@ -60,10 +58,4 @@ DEFINES += BOOST_USE_WINAPI_VERSION=0x0501
|
||||
#DEFINES += TORRENT_LINKING_SHARED
|
||||
|
||||
# Enable stack trace support
|
||||
CONFIG += stacktrace
|
||||
|
||||
win32-msvc* {
|
||||
QMAKE_CXXFLAGS += "/guard:cf"
|
||||
QMAKE_LFLAGS += "/guard:cf"
|
||||
QMAKE_LFLAGS_RELEASE += "/OPT:REF /OPT:ICF"
|
||||
}
|
||||
CONFIG += strace_win
|
||||
|
102
configure
vendored
102
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for qbittorrent v4.1.2.
|
||||
# Generated by GNU Autoconf 2.69 for qbittorrent v4.0.4.
|
||||
#
|
||||
# Report bugs to <bugs.qbittorrent.org>.
|
||||
#
|
||||
@@ -580,8 +580,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='qbittorrent'
|
||||
PACKAGE_TARNAME='qbittorrent'
|
||||
PACKAGE_VERSION='v4.1.2'
|
||||
PACKAGE_STRING='qbittorrent v4.1.2'
|
||||
PACKAGE_VERSION='v4.0.4'
|
||||
PACKAGE_STRING='qbittorrent v4.0.4'
|
||||
PACKAGE_BUGREPORT='bugs.qbittorrent.org'
|
||||
PACKAGE_URL='https://www.qbittorrent.org/'
|
||||
|
||||
@@ -717,7 +717,6 @@ enable_dependency_tracking
|
||||
enable_silent_rules
|
||||
with_qtsingleapplication
|
||||
enable_debug
|
||||
enable_stacktrace
|
||||
enable_gui
|
||||
enable_systemd
|
||||
enable_webui
|
||||
@@ -1297,7 +1296,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures qbittorrent v4.1.2 to adapt to many kinds of systems.
|
||||
\`configure' configures qbittorrent v4.0.4 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1368,7 +1367,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of qbittorrent v4.1.2:";;
|
||||
short | recursive ) echo "Configuration of qbittorrent v4.0.4:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1383,7 +1382,6 @@ Optional Features:
|
||||
--enable-silent-rules less verbose build output (undo: "make V=1")
|
||||
--disable-silent-rules verbose build output (undo: "make V=0")
|
||||
--enable-debug Enable debug build
|
||||
--enable-stacktrace Enable stacktrace feature (default=auto)
|
||||
--disable-gui Disable the GUI for headless running. Disables
|
||||
QtDBus and the GeoIP Database.
|
||||
--enable-systemd Install the systemd service file (headless only).
|
||||
@@ -1503,7 +1501,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
qbittorrent configure v4.1.2
|
||||
qbittorrent configure v4.0.4
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -1642,7 +1640,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by qbittorrent $as_me v4.1.2, which was
|
||||
It was created by qbittorrent $as_me v4.0.4, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3820,7 +3818,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='qbittorrent'
|
||||
VERSION='v4.1.2'
|
||||
VERSION='v4.0.4'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -4191,14 +4189,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-stacktrace was given.
|
||||
if test "${enable_stacktrace+set}" = set; then :
|
||||
enableval=$enable_stacktrace;
|
||||
else
|
||||
enable_stacktrace=auto
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-gui was given.
|
||||
if test "${enable_gui+set}" = set; then :
|
||||
enableval=$enable_gui;
|
||||
@@ -4399,39 +4389,6 @@ $as_echo "$enable_debug" >&6; }
|
||||
as_fn_error $? "Unknown option \"$enable_debug\". Use either \"yes\" or \"no\"." "$LINENO" 5 ;;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the stacktrace feature" >&5
|
||||
$as_echo_n "checking whether to enable the stacktrace feature... " >&6; }
|
||||
|
||||
case "x$enable_stacktrace" in #(
|
||||
"xno") :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG stacktrace" ;; #(
|
||||
"xyes") :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG stacktrace" ;; #(
|
||||
"xauto") :
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <execinfo.h>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG stacktrace"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG stacktrace"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; #(
|
||||
*) :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_stacktrace" >&5
|
||||
$as_echo "$enable_stacktrace" >&6; }
|
||||
as_fn_error $? "Unknown option \"$enable_stacktrace\". Use either \"yes\" or \"no\"." "$LINENO" 5 ;;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the GUI" >&5
|
||||
$as_echo_n "checking whether to enable the GUI... " >&6; }
|
||||
case "x$enable_gui" in #(
|
||||
@@ -4679,6 +4636,7 @@ esac
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-boost was given.
|
||||
if test "${with_boost+set}" = set; then :
|
||||
withval=$with_boost;
|
||||
@@ -5014,40 +4972,6 @@ fi
|
||||
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
|
||||
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
|
||||
|
||||
# add workaround for problematic boost version
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
# taken from ax_boost_base.m4
|
||||
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <boost/version.hpp>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < (106000))]));
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
|
||||
else
|
||||
QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-boost-system was given.
|
||||
@@ -6174,7 +6098,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by qbittorrent $as_me v4.1.2, which was
|
||||
This file was extended by qbittorrent $as_me v4.0.4, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -6232,7 +6156,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
qbittorrent config.status v4.1.2
|
||||
qbittorrent config.status v4.0.4
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
@@ -7489,7 +7413,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by qbittorrent $as_me v4.1.2, which was
|
||||
This file was extended by qbittorrent $as_me v4.0.4, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -7547,7 +7471,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
qbittorrent config.status v4.1.2
|
||||
qbittorrent config.status v4.0.4
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
36
configure.ac
36
configure.ac
@@ -1,4 +1,4 @@
|
||||
AC_INIT([qbittorrent], [v4.1.2], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
||||
AC_INIT([qbittorrent], [v4.0.4], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_PROG_CC
|
||||
@@ -24,12 +24,6 @@ AC_ARG_ENABLE(debug,
|
||||
[],
|
||||
[enable_debug=no])
|
||||
|
||||
AC_ARG_ENABLE(stacktrace,
|
||||
[AS_HELP_STRING([--enable-stacktrace],
|
||||
[Enable stacktrace feature (default=auto)])],
|
||||
[],
|
||||
[enable_stacktrace=auto])
|
||||
|
||||
AC_ARG_ENABLE(gui,
|
||||
[AS_HELP_STRING([--disable-gui],
|
||||
[Disable the GUI for headless running. Disables QtDBus and the GeoIP Database.])],
|
||||
@@ -86,23 +80,6 @@ AS_CASE(["x$enable_debug"],
|
||||
[AC_MSG_RESULT([$enable_debug])
|
||||
AC_MSG_ERROR([Unknown option "$enable_debug". Use either "yes" or "no".])])
|
||||
|
||||
AC_MSG_CHECKING([whether to enable the stacktrace feature])
|
||||
AS_CASE(["x$enable_stacktrace"],
|
||||
["xno"],
|
||||
[AC_MSG_RESULT([no])
|
||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG stacktrace"],
|
||||
["xyes"],
|
||||
[AC_MSG_RESULT([yes])
|
||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG stacktrace"],
|
||||
["xauto"],
|
||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <execinfo.h>]])],
|
||||
[AC_MSG_RESULT([yes])
|
||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG stacktrace"],
|
||||
[AC_MSG_RESULT([no])
|
||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG stacktrace"])],
|
||||
[AC_MSG_RESULT([$enable_stacktrace])
|
||||
AC_MSG_ERROR([Unknown option "$enable_stacktrace". Use either "yes" or "no".])])
|
||||
|
||||
AC_MSG_CHECKING([whether to enable the GUI])
|
||||
AS_CASE(["x$enable_gui"],
|
||||
["xyes"],
|
||||
@@ -168,17 +145,6 @@ AX_BOOST_BASE([1.35],
|
||||
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
|
||||
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
|
||||
|
||||
# add workaround for problematic boost version
|
||||
AC_LANG_PUSH(C++)
|
||||
# taken from ax_boost_base.m4
|
||||
m4_define([DETECT_BOOST_VERSION_PROGRAM],
|
||||
[AC_LANG_PROGRAM([[#include <boost/version.hpp>]],
|
||||
[[(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))]));]])])
|
||||
|
||||
AC_COMPILE_IFELSE([DETECT_BOOST_VERSION_PROGRAM(106000)], [],
|
||||
[QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES"])
|
||||
AC_LANG_POP([C++])
|
||||
|
||||
AX_BOOST_SYSTEM()
|
||||
AC_MSG_NOTICE([Boost.System LIB: "$BOOST_SYSTEM_LIB"])
|
||||
LIBS="$BOOST_SYSTEM_LIB $LIBS"
|
||||
|
2
dist/CMakeLists.txt
vendored
2
dist/CMakeLists.txt
vendored
@@ -1,5 +1,3 @@
|
||||
find_package(Qt5Widgets ${requiredQtVersion}) # to conditionally install desktop-related files
|
||||
|
||||
if (APPLE)
|
||||
add_subdirectory(mac)
|
||||
else (APPLE)
|
||||
|
2
dist/mac/Info.plist
vendored
2
dist/mac/Info.plist
vendored
@@ -45,7 +45,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.1.2</string>
|
||||
<string>4.0.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>qBit</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
|
30
dist/unix/CMakeLists.txt
vendored
30
dist/unix/CMakeLists.txt
vendored
@@ -1,37 +1,31 @@
|
||||
if (NOT Qt5Widgets_FOUND)
|
||||
feature_option(SYSTEMD "Install systemd service file (headless only)" OFF)
|
||||
if (SYSTEMD)
|
||||
if (NOT Systemd_SERVICES_INSTALL_DIR)
|
||||
find_package(Systemd)
|
||||
if (NOT Systemd_FOUND)
|
||||
message(FATAL_ERROR "Could not locate systemd services install dir."
|
||||
" Either pass -DSystemd_SERVICES_INSTALL_DIR=/path/to/systemd/services option or install systemd pkg-config")
|
||||
endif(NOT Systemd_FOUND)
|
||||
endif(NOT Systemd_SERVICES_INSTALL_DIR)
|
||||
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
|
||||
DESTINATION ${Systemd_SERVICES_INSTALL_DIR}
|
||||
DESTINATION ${SYSTEMD_SERVICES_INSTALL_DIR}
|
||||
COMPONENT data)
|
||||
endif(SYSTEMD)
|
||||
endif()
|
||||
endif(SYSTEMD_FOUND)
|
||||
endif(SYSTEMD)
|
||||
|
||||
if (Qt5Widgets_FOUND)
|
||||
|
||||
if (GUI)
|
||||
list(APPEND MAN_FILES ${qBittorrent_SOURCE_DIR}/doc/qbittorrent.1)
|
||||
else (Qt5Widgets_FOUND)
|
||||
else (GUI)
|
||||
list(APPEND MAN_FILES ${qBittorrent_SOURCE_DIR}/doc/qbittorrent-nox.1)
|
||||
endif (Qt5Widgets_FOUND)
|
||||
endif (GUI)
|
||||
|
||||
install(FILES ${MAN_FILES}
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
|
||||
COMPONENT doc)
|
||||
|
||||
if (Qt5Widgets_FOUND)
|
||||
if (GUI)
|
||||
install(DIRECTORY menuicons/
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor
|
||||
FILES_MATCHING PATTERN "*.png")
|
||||
|
||||
install(FILES qbittorrent.desktop
|
||||
install(FILES ${qBittorrent_SOURCE_DIR}/src/icons/qbittorrent.desktop
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/
|
||||
COMPONENT data)
|
||||
|
||||
|
2
dist/windows/options.nsi
vendored
2
dist/windows/options.nsi
vendored
@@ -27,7 +27,7 @@ XPStyle on
|
||||
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
|
||||
|
||||
; Program specific
|
||||
!define PROG_VERSION "4.1.2"
|
||||
!define PROG_VERSION "4.0.4"
|
||||
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
|
||||
|
@@ -3,6 +3,7 @@ TEMPLATE = subdirs
|
||||
SUBDIRS += src
|
||||
|
||||
include(version.pri)
|
||||
include(qm_gen.pri)
|
||||
|
||||
# Make target to create release tarball. Use 'make tarball'
|
||||
tarball.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}/ &&
|
||||
@@ -16,11 +17,3 @@ tarball.commands += xz -f $${PROJECT_NAME}-$${PROJECT_VERSION}.tar &&
|
||||
tarball.commands += rm -fR $${PROJECT_NAME}-$${PROJECT_VERSION}
|
||||
|
||||
QMAKE_EXTRA_TARGETS += tarball
|
||||
|
||||
# Translations included here (at top level) is to avoid regenerating the .qm files
|
||||
# every time when src.pro is processed
|
||||
include(src/lang/lang.pri)
|
||||
|
||||
# For Qt Creator beautifier
|
||||
DISTFILES += \
|
||||
uncrustify.cfg
|
||||
|
21
qm_gen.pri
Normal file
21
qm_gen.pri
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
|
||||
unix {
|
||||
equals(QT_MAJOR_VERSION, 5) {
|
||||
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt5 }
|
||||
}
|
||||
} else {
|
||||
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease }
|
||||
}
|
||||
}
|
||||
|
||||
message("Building translations")
|
||||
for(L,TS_IN_NOEXT) {
|
||||
message("Processing $${L}")
|
||||
system("$$QMAKE_LRELEASE -silent src/$${L}.ts -qm src/$${L}.qm")
|
||||
!exists("src/$${L}.qm"):error("Building translations failed, cannot continue")
|
||||
}
|
@@ -1,45 +1,40 @@
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
set(CMAKE_CXX_STANDARD "11")
|
||||
add_definitions(-DBOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
|
||||
include(MacroQbtCompilerSettings)
|
||||
qbt_set_compiler_options()
|
||||
|
||||
include(MacroLinkQtComponents)
|
||||
include(QbtTargetSources)
|
||||
|
||||
find_package(Boost ${requiredBoostVersion} REQUIRED)
|
||||
find_package(LibtorrentRasterbar REQUIRED)
|
||||
|
||||
if (Boost_VERSION VERSION_LESS 106000)
|
||||
add_definitions(-DBOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
endif()
|
||||
# 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)
|
||||
|
||||
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS Core Network Xml)
|
||||
find_package(Qt5Widgets ${requiredQtVersion})
|
||||
if (Qt5Widgets_FOUND)
|
||||
find_package(Qt5DBus ${requiredQtVersion})
|
||||
else()
|
||||
add_definitions(-DDISABLE_GUI)
|
||||
endif()
|
||||
|
||||
set_package_properties(Qt5Widgets PROPERTIES
|
||||
DESCRIPTION "Set of components for creating classic desktop-style UIs for the Qt5 framework"
|
||||
PURPOSE "Enables qBittorrent GUI. Unneeded for headless configuration."
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
|
||||
set_package_properties(Qt5DBus PROPERTIES
|
||||
DESCRIPTION "Qt5 module for inter-process communication over the D-Bus protocol"
|
||||
PURPOSE "Enables communication with other system components (e.g. notification service) via D-Bus. "
|
||||
TYPE RECOMMENDED
|
||||
)
|
||||
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 ()
|
||||
|
||||
set(CMAKE_AUTOMOC True)
|
||||
list(APPEND CMAKE_AUTORCC_OPTIONS -compress 9 -threshold 5)
|
||||
if (APPLE)
|
||||
# Workaround CMake bug (autogen does not pass required parameters to moc)
|
||||
# Relevant issue: https://gitlab.kitware.com/cmake/cmake/issues/18041
|
||||
list(APPEND CMAKE_AUTOMOC_MOC_OPTIONS -DQ_OS_MAC -DQ_OS_DARWIN)
|
||||
endif ()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
@@ -48,34 +43,56 @@ add_definitions(-DQT_NO_CAST_TO_ASCII)
|
||||
# Efficient construction for QString & QByteArray (Qt >= 4.8)
|
||||
add_definitions(-DQT_USE_QSTRINGBUILDER)
|
||||
|
||||
if (CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
if (NOT GUI)
|
||||
add_definitions(-DDISABLE_GUI -DDISABLE_COUNTRIES_RESOLUTION)
|
||||
endif (NOT GUI)
|
||||
|
||||
if (NOT WEBUI)
|
||||
add_definitions(-DDISABLE_WEBUI)
|
||||
endif (NOT WEBUI)
|
||||
|
||||
if (STACKTRACE_WIN)
|
||||
add_definitions(-DSTACKTRACE_WIN)
|
||||
endif(STACKTRACE_WIN)
|
||||
# nogui {
|
||||
# TARGET = qbittorrent-nox
|
||||
# } else {
|
||||
# CONFIG(static) {
|
||||
# DEFINES += QBT_STATIC_QT
|
||||
# QTPLUGIN += qico
|
||||
# }
|
||||
# TARGET = qbittorrent
|
||||
# }
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
add_compile_options(-Wformat -Wformat-security)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
message(STATUS "Project is built in DEBUG mode.")
|
||||
else()
|
||||
else (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
message(STATUS "Project is built in RELEASE mode.")
|
||||
message(STATUS "Disabling debug output.")
|
||||
add_definitions(-DQT_NO_DEBUG_OUTPUT)
|
||||
endif()
|
||||
endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
|
||||
set(QBT_USE_GUI ${GUI})
|
||||
set(QBT_USE_WEBUI ${WEBUI})
|
||||
|
||||
configure_file(config.h.cmakein ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
find_package(QtSingleApplication)
|
||||
set_package_properties(QtSingleApplication PROPERTIES
|
||||
URL "https://code.qt.io/cgit/qt-solutions/qt-solutions.git/"
|
||||
DESCRIPTION "Qt library to start applications only once per user"
|
||||
TYPE RECOMMENDED
|
||||
PURPOSE "Use the system qtsingleapplication library or shipped one otherwise"
|
||||
)
|
||||
|
||||
if (NOT QtSingleApplication_FOUND)
|
||||
if (SYSTEM_QTSINGLEAPPLICATION)
|
||||
find_package(QtSingleApplication REQUIRED)
|
||||
else (SYSTEM_QTSINGLEAPPLICATION)
|
||||
add_subdirectory(app/qtsingleapplication)
|
||||
endif ()
|
||||
endif (SYSTEM_QTSINGLEAPPLICATION)
|
||||
|
||||
add_subdirectory(app)
|
||||
add_subdirectory(base)
|
||||
|
||||
if (Qt5Widgets_FOUND)
|
||||
if (GUI)
|
||||
add_subdirectory(gui)
|
||||
endif ()
|
||||
endif (GUI)
|
||||
|
||||
if (WEBUI)
|
||||
add_subdirectory(webui)
|
||||
|
@@ -1,27 +1,19 @@
|
||||
add_executable(qBittorrent
|
||||
project(qbt_executable)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set(QBT_APP_HEADERS
|
||||
application.h
|
||||
cmdoptions.h
|
||||
filelogger.h
|
||||
upgrade.h
|
||||
)
|
||||
|
||||
set(QBT_APP_SOURCES
|
||||
application.cpp
|
||||
cmdoptions.cpp
|
||||
filelogger.cpp
|
||||
main.cpp
|
||||
)
|
||||
|
||||
target_include_directories(qBittorrent PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_link_libraries(qBittorrent
|
||||
PRIVATE
|
||||
qbt_base
|
||||
)
|
||||
|
||||
set_target_properties(qBittorrent
|
||||
PROPERTIES
|
||||
AUTOUIC True
|
||||
AUTORCC True
|
||||
MACOSX_BUNDLE True
|
||||
)
|
||||
|
||||
# translations
|
||||
file(GLOB QBT_TS_FILES ../lang/*.ts)
|
||||
get_filename_component(QBT_QM_FILES_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/../lang" ABSOLUTE)
|
||||
@@ -30,9 +22,9 @@ set_source_files_properties(${QBT_TS_FILES} PROPERTIES OUTPUT_LOCATION "${QBT_QM
|
||||
find_package(Qt5 COMPONENTS LinguistTools REQUIRED)
|
||||
qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES})
|
||||
|
||||
get_filename_component(_lang_qrc_src "${CMAKE_CURRENT_SOURCE_DIR}/../lang/lang.qrc" ABSOLUTE)
|
||||
get_filename_component(_lang_qrc_dst "${CMAKE_CURRENT_BINARY_DIR}/../lang/lang.qrc" ABSOLUTE)
|
||||
get_filename_component(_lang_qrc_dst_dir "${CMAKE_CURRENT_BINARY_DIR}/../lang" ABSOLUTE)
|
||||
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)
|
||||
get_filename_component(_lang_qrc_dst_dir "${CMAKE_CURRENT_BINARY_DIR}/../" ABSOLUTE)
|
||||
|
||||
message(STATUS "copying ${_lang_qrc_src} -> ${_lang_qrc_dst}")
|
||||
file(COPY ${_lang_qrc_src} DESTINATION ${_lang_qrc_dst_dir})
|
||||
@@ -43,8 +35,8 @@ foreach(qm_file ${QBT_QM_FILES})
|
||||
endforeach()
|
||||
|
||||
set(QBT_APP_RESOURCES
|
||||
../icons/icons.qrc
|
||||
../searchengine/searchengine.qrc
|
||||
../icons.qrc
|
||||
../searchengine.qrc
|
||||
"${_lang_qrc_dst}"
|
||||
)
|
||||
|
||||
@@ -54,41 +46,51 @@ qt5_add_resources(QBT_APP_RESOURCE_SOURCE ${QBT_APP_RESOURCES})
|
||||
|
||||
if (WIN32)
|
||||
if (MINGW)
|
||||
target_sources(qBittorrent PRIVATE ../qbittorrent_mingw.rc)
|
||||
list (APPEND QBT_APP_SOURCES ../qbittorrent_mingw.rc)
|
||||
else (MINGW)
|
||||
target_sources(qBittorrent PRIVATE ../qbittorrent.rc)
|
||||
list (APPEND QBT_APP_SOURCES ../qbittorrent.rc)
|
||||
endif (MINGW)
|
||||
target_sources(qBittorrent PRIVATE ../qbittorrent.exe.manifest)
|
||||
list(APPEND QBT_APP_SOURCES ../qbittorrent.exe.manifest)
|
||||
endif (WIN32)
|
||||
|
||||
if (STACKTRACE)
|
||||
if (UNIX)
|
||||
target_sources(qBittorrent PRIVATE stacktrace.h)
|
||||
else (UNIX)
|
||||
target_sources(qBittorrent PRIVATE stacktrace_win.h)
|
||||
if (Qt5Widgets_FOUND)
|
||||
target_sources(qBittorrent PRIVATE stacktracedialog.h)
|
||||
endif (Qt5Widgets_FOUND)
|
||||
endif (UNIX)
|
||||
endif (STACKTRACE)
|
||||
if (UNIX)
|
||||
list(APPEND QBT_APP_HEADERS stacktrace.h)
|
||||
endif (UNIX)
|
||||
|
||||
if (STACKTRACE_WIN)
|
||||
list(APPEND QBT_APP_HEADERS stacktrace_win.h)
|
||||
if (GUI)
|
||||
list(APPEND QBT_APP_HEADERS stacktrace_win_dlg.h)
|
||||
endif (GUI)
|
||||
endif (STACKTRACE_WIN)
|
||||
|
||||
if (Qt5Widgets_FOUND)
|
||||
target_link_libraries(qBittorrent PRIVATE qbt_searchengine qbt_gui)
|
||||
set_target_properties(qBittorrent
|
||||
PROPERTIES
|
||||
OUTPUT_NAME qbittorrent
|
||||
WIN32_EXECUTABLE True
|
||||
# usesystemqtsingleapplication {
|
||||
# nogui {
|
||||
# CONFIG += qtsinglecoreapplication
|
||||
# } else {
|
||||
# CONFIG += qtsingleapplication
|
||||
# }
|
||||
# } else {
|
||||
# nogui {
|
||||
# include(qtsingleapplication/qtsinglecoreapplication.pri)
|
||||
# } else {
|
||||
# include(qtsingleapplication/qtsingleapplication.pri)
|
||||
# }
|
||||
# }
|
||||
|
||||
# upgrade code
|
||||
list(APPEND QBT_APP_HEADERS upgrade.h)
|
||||
list(APPEND QBT_TARGET_LIBRARIES qbt_base)
|
||||
|
||||
if (GUI)
|
||||
list(APPEND QBT_TARGET_LIBRARIES qbt_searchengine qbt_gui)
|
||||
include_directories(../gui
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../gui
|
||||
)
|
||||
else(Qt5Widgets_FOUND)
|
||||
set_target_properties(qBittorrent
|
||||
PROPERTIES
|
||||
OUTPUT_NAME qbittorrent-nox
|
||||
)
|
||||
endif (Qt5Widgets_FOUND)
|
||||
endif (GUI)
|
||||
|
||||
if (WEBUI)
|
||||
target_link_libraries(qBittorrent PRIVATE qbt_webui)
|
||||
list(APPEND QBT_TARGET_LIBRARIES qbt_webui)
|
||||
endif (WEBUI)
|
||||
|
||||
# we have to include resources into the bundle
|
||||
@@ -140,11 +142,30 @@ if (APPLE)
|
||||
PROPERTIES MACOSX_PACKAGE_LOCATION translations)
|
||||
endif (APPLE)
|
||||
|
||||
target_sources(qBittorrent PRIVATE ${QBT_QM_FILES} ${QBT_APP_RESOURCE_SOURCE})
|
||||
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
|
||||
PROPERTIES
|
||||
AUTOUIC True
|
||||
AUTORCC True
|
||||
MACOSX_BUNDLE True
|
||||
)
|
||||
|
||||
get_target_property(QBT_EXECUTABLE_NAME qBittorrent OUTPUT_NAME)
|
||||
|
||||
target_link_libraries(qBittorrent PRIVATE ${QBT_TARGET_LIBRARIES} QtSingleApplication::QtSingleApplication)
|
||||
target_link_libraries(qBittorrent ${QBT_TARGET_LIBRARIES} QtSingleApplication::QtSingleApplication)
|
||||
|
||||
if (APPLE)
|
||||
set(qbt_BUNDLE_NAME ${QBT_EXECUTABLE_NAME})
|
||||
@@ -165,7 +186,6 @@ install(TARGETS qBittorrent
|
||||
BUNDLE DESTINATION .
|
||||
COMPONENT runtime)
|
||||
|
||||
if (Qt5Widgets_FOUND AND APPLE)
|
||||
find_package(Qt5Svg REQUIRED)
|
||||
if (GUI AND APPLE)
|
||||
include(bundle)
|
||||
endif (Qt5Widgets_FOUND AND APPLE)
|
||||
endif (GUI AND APPLE)
|
||||
|
@@ -25,16 +25,12 @@ SOURCES += \
|
||||
$$PWD/filelogger.cpp \
|
||||
$$PWD/main.cpp
|
||||
|
||||
stacktrace {
|
||||
unix {
|
||||
HEADERS += $$PWD/stacktrace.h
|
||||
}
|
||||
else {
|
||||
HEADERS += $$PWD/stacktrace_win.h
|
||||
!nogui {
|
||||
HEADERS += $$PWD/stacktracedialog.h
|
||||
FORMS += $$PWD/stacktracedialog.ui
|
||||
}
|
||||
unix: HEADERS += $$PWD/stacktrace.h
|
||||
strace_win {
|
||||
HEADERS += $$PWD/stacktrace_win.h
|
||||
!nogui {
|
||||
HEADERS += $$PWD/stacktrace_win_dlg.h
|
||||
FORMS += $$PWD/stacktrace_win_dlg.ui
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -40,13 +40,15 @@ typedef QtSingleApplication BaseApplication;
|
||||
class MainWindow;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QSessionManager;
|
||||
QT_END_NAMESPACE
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
#else
|
||||
#include "qtsinglecoreapplication.h"
|
||||
typedef QtSingleCoreApplication BaseApplication;
|
||||
#endif // DISABLE_GUI
|
||||
#endif
|
||||
|
||||
#include "base/utils/misc.h"
|
||||
#include "cmdoptions.h"
|
||||
@@ -108,9 +110,9 @@ public:
|
||||
protected:
|
||||
#ifndef DISABLE_GUI
|
||||
#ifdef Q_OS_MAC
|
||||
bool event(QEvent *) override;
|
||||
bool event(QEvent *);
|
||||
#endif
|
||||
bool notify(QObject *receiver, QEvent *event) override;
|
||||
bool notify(QObject* receiver, QEvent* event);
|
||||
#endif
|
||||
|
||||
private slots:
|
||||
@@ -144,7 +146,7 @@ private:
|
||||
|
||||
void initializeTranslation();
|
||||
void processParams(const QStringList ¶ms);
|
||||
void runExternalProgram(const BitTorrent::TorrentHandle *torrent) const;
|
||||
void runExternalProgram(BitTorrent::TorrentHandle *const torrent) const;
|
||||
void sendNotificationEmail(const BitTorrent::TorrentHandle *torrent);
|
||||
void validateCommandLineParameters();
|
||||
};
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* 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 <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
|
||||
@@ -26,11 +26,13 @@
|
||||
* 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 <cstdio>
|
||||
#include <iostream>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
@@ -98,7 +100,7 @@ namespace
|
||||
};
|
||||
|
||||
// Boolean option.
|
||||
class BoolOption : protected Option
|
||||
class BoolOption: protected Option
|
||||
{
|
||||
public:
|
||||
constexpr BoolOption(const char *name, char shortcut = 0)
|
||||
@@ -116,7 +118,7 @@ namespace
|
||||
{
|
||||
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")));
|
||||
return (val == QLatin1String("1") || val.toUpper() == QLatin1String("TRUE"));
|
||||
}
|
||||
|
||||
QString usage() const
|
||||
@@ -135,7 +137,7 @@ namespace
|
||||
}
|
||||
|
||||
// Option with string value. May not have a shortcut
|
||||
struct StringOption : protected Option
|
||||
struct StringOption: protected Option
|
||||
{
|
||||
public:
|
||||
constexpr StringOption(const char *name)
|
||||
@@ -182,7 +184,7 @@ namespace
|
||||
}
|
||||
|
||||
// Option with integer value. May not have a shortcut
|
||||
class IntOption : protected StringOption
|
||||
class IntOption: protected StringOption
|
||||
{
|
||||
public:
|
||||
constexpr IntOption(const char *name)
|
||||
@@ -214,7 +216,7 @@ namespace
|
||||
int res = val.toInt(&ok);
|
||||
if (!ok) {
|
||||
qDebug() << QObject::tr("Expected integer number in environment variable '%1', but got '%2'")
|
||||
.arg(envVarName(), val);
|
||||
.arg(envVarName()).arg(val);
|
||||
return defaultValue;
|
||||
}
|
||||
return res;
|
||||
@@ -228,7 +230,7 @@ namespace
|
||||
|
||||
// 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
|
||||
class TriStateBoolOption: protected Option
|
||||
{
|
||||
public:
|
||||
constexpr TriStateBoolOption(const char *name, bool defaultValue)
|
||||
@@ -258,10 +260,10 @@ namespace
|
||||
else if (parts.size() == 2) {
|
||||
QString val = parts[1];
|
||||
|
||||
if ((val.toUpper() == QLatin1String("TRUE")) || (val == QLatin1String("1"))) {
|
||||
if (val.toUpper() == QLatin1String("TRUE") || val == QLatin1String("1")) {
|
||||
return TriStateBool::True;
|
||||
}
|
||||
else if ((val.toUpper() == QLatin1String("FALSE")) || (val == QLatin1String("0"))) {
|
||||
else if (val.toUpper() == QLatin1String("FALSE") || val == QLatin1String("0")) {
|
||||
return TriStateBool::False;
|
||||
}
|
||||
}
|
||||
@@ -283,15 +285,15 @@ namespace
|
||||
else if (val == QLatin1String("-1")) {
|
||||
return TriStateBool::Undefined;
|
||||
}
|
||||
else if ((val.toUpper() == QLatin1String("TRUE")) || (val == QLatin1String("1"))) {
|
||||
else if (val.toUpper() == QLatin1String("TRUE") || val == QLatin1String("1")) {
|
||||
return TriStateBool::True;
|
||||
}
|
||||
else if ((val.toUpper() == QLatin1String("FALSE")) || (val == QLatin1String("0"))) {
|
||||
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"), envVarName(), val);
|
||||
.arg(QLatin1String("true|false")).arg(envVarName()).arg(val);
|
||||
return TriStateBool::Undefined;
|
||||
}
|
||||
}
|
||||
@@ -358,7 +360,7 @@ QStringList QBtCommandLineParameters::paramList() const
|
||||
// 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 list so that they will be processed before the list of
|
||||
// string listr so that they will be processed before the list of
|
||||
// torrent paths or URLs.
|
||||
|
||||
if (!savePath.isEmpty())
|
||||
@@ -402,9 +404,9 @@ QBtCommandLineParameters parseCommandLine(const QStringList &args)
|
||||
const QString &arg = args[i];
|
||||
|
||||
if ((arg.startsWith("--") && !arg.endsWith(".torrent"))
|
||||
|| (arg.startsWith('-') && (arg.size() == 2))) {
|
||||
|| (arg.startsWith("-") && (arg.size() == 2))) {
|
||||
// Parse known parameters
|
||||
if (arg == SHOW_HELP_OPTION) {
|
||||
if ((arg == SHOW_HELP_OPTION)) {
|
||||
result.showHelp = true;
|
||||
}
|
||||
#ifndef Q_OS_WIN
|
||||
@@ -499,7 +501,7 @@ QString wrapText(const QString &text, int initialIndentation = USAGE_TEXT_COLUMN
|
||||
|
||||
foreach (const QString &word, words.mid(1)) {
|
||||
if (lines.last().length() + word.length() + 1 < currentLineMaxLength) {
|
||||
lines.last().append(' ' + word);
|
||||
lines.last().append(" " + word);
|
||||
}
|
||||
else {
|
||||
lines.append(QString(initialIndentation, ' ') + word);
|
||||
@@ -507,7 +509,7 @@ QString wrapText(const QString &text, int initialIndentation = USAGE_TEXT_COLUMN
|
||||
}
|
||||
}
|
||||
|
||||
return lines.join('\n');
|
||||
return lines.join("\n");
|
||||
}
|
||||
|
||||
QString makeUsage(const QString &prgName)
|
||||
@@ -576,7 +578,7 @@ QString makeUsage(const QString &prgName)
|
||||
void displayUsage(const QString &prgName)
|
||||
{
|
||||
#ifndef Q_OS_WIN
|
||||
printf("%s\n", qUtf8Printable(makeUsage(prgName)));
|
||||
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
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* 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 <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
|
||||
@@ -26,6 +26,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 APP_OPTIONS_H
|
||||
@@ -60,11 +62,11 @@ struct QBtCommandLineParameters
|
||||
QStringList paramList() const;
|
||||
};
|
||||
|
||||
class CommandLineParameterError : public std::runtime_error
|
||||
class CommandLineParameterError: public std::runtime_error
|
||||
{
|
||||
public:
|
||||
CommandLineParameterError(const QString &messageForUser);
|
||||
const QString &messageForUser() const;
|
||||
const QString& messageForUser() const;
|
||||
|
||||
private:
|
||||
const QString m_messageForUser;
|
||||
|
@@ -26,13 +26,11 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#include "filelogger.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
#include "filelogger.h"
|
||||
#include "base/logger.h"
|
||||
#include "base/utils/fs.h"
|
||||
|
||||
@@ -43,17 +41,17 @@ FileLogger::FileLogger(const QString &path, const bool backup, const int maxSize
|
||||
{
|
||||
m_flusher.setInterval(0);
|
||||
m_flusher.setSingleShot(true);
|
||||
connect(&m_flusher, &QTimer::timeout, this, &FileLogger::flushLog);
|
||||
connect(&m_flusher, SIGNAL(timeout()), SLOT(flushLog()));
|
||||
|
||||
changePath(path);
|
||||
if (deleteOld)
|
||||
this->deleteOld(age, ageType);
|
||||
|
||||
const Logger *const logger = Logger::instance();
|
||||
foreach (const Log::Msg &msg, logger->getMessages())
|
||||
const Logger* const logger = Logger::instance();
|
||||
foreach (const Log::Msg& msg, logger->getMessages())
|
||||
addLogMessage(msg);
|
||||
|
||||
connect(logger, &Logger::newLogMessage, this, &FileLogger::addLogMessage);
|
||||
connect(logger, SIGNAL(newLogMessage(const Log::Msg &)), SLOT(addLogMessage(const Log::Msg &)));
|
||||
}
|
||||
|
||||
FileLogger::~FileLogger()
|
||||
@@ -63,7 +61,7 @@ FileLogger::~FileLogger()
|
||||
delete m_logFile;
|
||||
}
|
||||
|
||||
void FileLogger::changePath(const QString &newPath)
|
||||
void FileLogger::changePath(const QString& newPath)
|
||||
{
|
||||
QString tmpPath = Utils::Fs::fromNativePath(newPath);
|
||||
QDir dir(tmpPath);
|
||||
@@ -85,21 +83,21 @@ void FileLogger::changePath(const QString &newPath)
|
||||
void FileLogger::deleteOld(const int age, const FileLogAgeType ageType)
|
||||
{
|
||||
QDateTime date = QDateTime::currentDateTime();
|
||||
QDir dir(Utils::Fs::branchPath(m_path));
|
||||
QDir dir(m_path);
|
||||
|
||||
switch (ageType) {
|
||||
case DAYS:
|
||||
date = date.addDays(age);
|
||||
break;
|
||||
case MONTHS:
|
||||
date = date.addMonths(age);
|
||||
break;
|
||||
default:
|
||||
date = date.addYears(age);
|
||||
}
|
||||
|
||||
foreach (const QFileInfo file, dir.entryInfoList(QStringList("qbittorrent.log.bak*"), QDir::Files | QDir::Writable, QDir::Time | QDir::Reversed)) {
|
||||
QDateTime modificationDate = file.lastModified();
|
||||
switch (ageType) {
|
||||
case DAYS:
|
||||
modificationDate = modificationDate.addDays(age);
|
||||
break;
|
||||
case MONTHS:
|
||||
modificationDate = modificationDate.addMonths(age);
|
||||
break;
|
||||
default:
|
||||
modificationDate = modificationDate.addYears(age);
|
||||
}
|
||||
if (modificationDate > date)
|
||||
if (file.lastModified() < date)
|
||||
break;
|
||||
Utils::Fs::forceRemove(file.absoluteFilePath());
|
||||
}
|
||||
@@ -167,7 +165,7 @@ void FileLogger::openLogFile()
|
||||
|| !m_logFile->setPermissions(QFile::ReadOwner | QFile::WriteOwner)) {
|
||||
delete m_logFile;
|
||||
m_logFile = nullptr;
|
||||
Logger::instance()->addMessage(tr("An error occurred while trying to open the log file. Logging to file is disabled."), Log::CRITICAL);
|
||||
Logger::instance()->addMessage(tr("An error occured while trying to open the log file. Logging to file is disabled."), Log::CRITICAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user