You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-19 05:12:18 +02:00
Compare commits
54 Commits
release-4.
...
release-4.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
abb854a1e6 | ||
![]() |
4ee17a73d0 | ||
![]() |
faf6e82274 | ||
![]() |
c08ec1ac5e | ||
![]() |
cd0b6d9a43 | ||
![]() |
b8f1142abe | ||
![]() |
78859415d6 | ||
![]() |
ef92c17192 | ||
![]() |
22f3abc4b5 | ||
![]() |
a56e6294c1 | ||
![]() |
77909e0093 | ||
![]() |
2c2bb14b2a | ||
![]() |
73c8b77464 | ||
![]() |
042238db87 | ||
![]() |
6e267f8e81 | ||
![]() |
fdc64d9b38 | ||
![]() |
0b42425db5 | ||
![]() |
e5d7738127 | ||
![]() |
422489e2a1 | ||
![]() |
7de983b4e5 | ||
![]() |
e4e55d2a80 | ||
![]() |
926012ce71 | ||
![]() |
487eb554c9 | ||
![]() |
5a96e1fc7a | ||
![]() |
2fe698ee60 | ||
![]() |
177ac32a5e | ||
![]() |
5f34d1555b | ||
![]() |
7cfe68f46c | ||
![]() |
f94f4d2391 | ||
![]() |
73b18d7ef3 | ||
![]() |
817e9c4747 | ||
![]() |
28844eff44 | ||
![]() |
389664213b | ||
![]() |
953b6fd6f8 | ||
![]() |
9b4f3fcbf8 | ||
![]() |
80743180be | ||
![]() |
b2847b2381 | ||
![]() |
eb657ec032 | ||
![]() |
fc2be601df | ||
![]() |
5786c7ff11 | ||
![]() |
4a183dd968 | ||
![]() |
7c10dba10c | ||
![]() |
894446d308 | ||
![]() |
47e9c5ac08 | ||
![]() |
7f47ac11f1 | ||
![]() |
67b17891fa | ||
![]() |
dd5b7ba05b | ||
![]() |
61aa4d9f1c | ||
![]() |
6e924b668e | ||
![]() |
618ce33fa0 | ||
![]() |
ac413c76b9 | ||
![]() |
f266184514 | ||
![]() |
8c48bf4a70 | ||
![]() |
8bee69c9fc |
14
.github/workflows/ci.yaml
vendored
14
.github/workflows/ci.yaml
vendored
@@ -12,12 +12,12 @@ on:
|
||||
branches: [ master ]
|
||||
|
||||
env:
|
||||
# Qt: 5.15.0
|
||||
# libtorrent: RC_1_2 HEAD, 1.2.10
|
||||
VCPKG_COMMIT: 32eccc18191fbb57b159784a1724d2d00613ae82
|
||||
# Qt: 5.15.1
|
||||
# libtorrent: RC_1_2 HEAD, 1.2.11
|
||||
VCPKG_COMMIT: 133051b793486ef14e67e9d1f48c9cfe64dc127e
|
||||
VCPKG_DEST_MACOS: /Users/runner/qbt_tools/vcpkg
|
||||
VCPKG_DEST_WIN: C:\qbt_tools\vcpkg
|
||||
LIBTORRENT_VERSION_TAG: libtorrent-1.2.10
|
||||
LIBTORRENT_VERSION_TAG: v1.2.11
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -178,11 +178,11 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# - ninja is needed for building qBittorrent (because it's preferrable, not a hard requirement)
|
||||
# - pkg-config is needed for some vcpkg installations
|
||||
# - automake is needed for the installation the vcpkg installation of fontconfig, a dependency of qt5-base
|
||||
- name: install additional required packages with homebrew
|
||||
shell: bash
|
||||
run: |
|
||||
brew install ninja pkg-config
|
||||
brew install automake ninja
|
||||
|
||||
- name: setup vcpkg (cached, if possible)
|
||||
uses: lukka/run-vcpkg@v4
|
||||
@@ -197,7 +197,7 @@ jobs:
|
||||
Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-osx.cmake `
|
||||
${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake
|
||||
Add-Content ${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake `
|
||||
-Value "set(VCPKG_BUILD_TYPE release)"
|
||||
-Value "set(VCPKG_BUILD_TYPE release)","set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15)"
|
||||
|
||||
# NOTE: Avoids a libtorrent ABI issue. See https://github.com/arvidn/libtorrent/issues/4965
|
||||
- name: force AppleClang to compile libtorrent with C++14
|
||||
|
34
.github/workflows/file_health.sh
vendored
34
.github/workflows/file_health.sh
vendored
@@ -14,60 +14,68 @@ exclusions_bom='src/base/unicodestrings.h'
|
||||
exclusions_tw='(*.ts)|src/webui/www/private/scripts/lib/mootools-1.2-more.js'
|
||||
exclusions_no_lf='(*.ts)|(.*svg)|compile_commands.json|src/webui/www/private/scripts/lib/mootools-1.2-(core-yc.js|more.js)'
|
||||
|
||||
echo -e "*** Detect files not encoded in UTF-8 ***\n"
|
||||
echo -e "\n*** Detect files not encoded in UTF-8 ***\n"
|
||||
|
||||
find . -path ./build -prune -false -o -path ./.git -prune -false -o -type f -exec file --mime {} \; | sort \
|
||||
| grep -v -e "charset=us-ascii" -e "charset=utf-8" | cut -d ":" -f 1 \
|
||||
| grep -E -v -e "${exclusions_nonutf8}" \
|
||||
| tee >(echo -e "\n--> Files not encoded in UTF-8: found" "$(wc -l < /dev/stdin)" "regression(s)") \
|
||||
| tee >(echo -e "--> Files not encoded in UTF-8: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
|
||||
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
|
||||
regressions=$((regressions+$?))
|
||||
|
||||
echo -e "*** Detect files encoded in UTF-8 with BOM ***\n"
|
||||
echo -e "\n*** Detect files encoded in UTF-8 with BOM ***\n"
|
||||
|
||||
grep --exclude-dir={.git,build} -rIl $'\xEF\xBB\xBF' | sort \
|
||||
| grep -E -v -e "${exclusions_bom}" \
|
||||
| tee >(echo -e "\n--> Files encoded in UTF-8 with BOM: found" "$(wc -l < /dev/stdin)" "regression(s)") \
|
||||
| tee >(echo -e "--> Files encoded in UTF-8 with BOM: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
|
||||
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
|
||||
regressions=$((regressions+$?))
|
||||
|
||||
echo -e "*** Detect usage of CR byte ***\n"
|
||||
echo -e "\n*** Detect usage of CR byte ***\n"
|
||||
|
||||
grep --exclude-dir={.git,build} -rIlU $'\x0D' | sort \
|
||||
| tee >(echo -e "\n--> Usage of CR byte: found" "$(wc -l < /dev/stdin)" "regression(s)") \
|
||||
| tee >(echo -e "--> Usage of CR byte: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
|
||||
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
|
||||
regressions=$((regressions+$?))
|
||||
|
||||
echo -e "*** Detect trailing whitespace in lines ***\n"
|
||||
echo -e "\n*** Detect trailing whitespace in lines ***\n"
|
||||
|
||||
grep --exclude-dir={.git,build} -rIl "[[:blank:]]$" | sort \
|
||||
| grep -E -v -e "${exclusions_tw}" \
|
||||
| tee >(echo -e "\n--> Trailing whitespace in lines: found" "$(wc -l < /dev/stdin)" "regression(s)") \
|
||||
| tee >(echo -e "--> Trailing whitespace in lines: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
|
||||
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0';
|
||||
regressions=$((regressions+$?))
|
||||
|
||||
echo -e "*** Detect too many trailing newlines ***\n"
|
||||
echo -e "\n*** Detect too many trailing newlines ***\n"
|
||||
|
||||
find . -path ./build -prune -false -o -path ./.git -prune -false -o -type f -exec file --mime {} \; | sort \
|
||||
| grep -e "charset=us-ascii" -e "charset=utf-8" | cut -d ":" -f 1 \
|
||||
| xargs -L1 -I my_input bash -c 'test "$(tail -q -c2 "my_input" | hexdump -C | grep "0a 0a")" && echo "my_input"' \
|
||||
| tee >(echo -e "\n--> Too many trailing newlines: found" "$(wc -l < /dev/stdin)" "regression(s)") \
|
||||
| tee >(echo -e "--> Too many trailing newlines: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
|
||||
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
|
||||
regressions=$((regressions+$?))
|
||||
|
||||
echo -e "*** Detect no trailing newline ***\n"
|
||||
echo -e "\n*** Detect no trailing newline ***\n"
|
||||
|
||||
find . -path ./build -prune -false -o -path ./.git -prune -false -o -type f -exec file --mime {} \; | sort \
|
||||
| grep -e "charset=us-ascii" -e "charset=utf-8" | cut -d ":" -f 1 \
|
||||
| grep -E -v -e "${exclusions_no_lf}" \
|
||||
| xargs -L1 -I my_input bash -c 'test "$(tail -q -c1 "my_input" | hexdump -C | grep "0a")" || echo "my_input"' \
|
||||
| tee >(echo -e "\n--> No trailing newline: found" "$(wc -l < /dev/stdin)" "regression(s)") \
|
||||
| tee >(echo -e "--> No trailing newline: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
|
||||
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
|
||||
regressions=$((regressions+$?))
|
||||
|
||||
echo -e "\n*** Detect translation closing tag in new line ***\n"
|
||||
|
||||
grep --exclude-dir={.git,build} -nri "^</translation>" | sort \
|
||||
| cut -d ":" -f 1,2 \
|
||||
| tee >(echo -e "--> Translation closing tag in new line: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
|
||||
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
|
||||
regressions=$((regressions+$?))
|
||||
|
||||
if [ "$regressions" -ne 0 ]; then
|
||||
regressions=1
|
||||
echo "File health regressions found. Please fix them (or add them as exclusions)."
|
||||
echo "\nFile health regressions found. Please fix them (or add them as exclusions)."
|
||||
else
|
||||
echo "All OK, no file health regressions found."
|
||||
fi
|
||||
|
2
.github/workflows/file_health.yaml
vendored
2
.github/workflows/file_health.yaml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
check_file_health:
|
||||
name: Check file health
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: checkout repository
|
||||
|
47
.travis.yml
47
.travis.yml
@@ -4,7 +4,8 @@ os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
dist: bionic
|
||||
dist: focal
|
||||
osx_image: xcode12.2
|
||||
|
||||
env:
|
||||
matrix:
|
||||
@@ -16,6 +17,11 @@ env:
|
||||
- secure: "OI9CUjj4lTb0HwwIZU5PbECU3hLlAL6KC8KsbwohG8/O3j5fLcnmDsK4Ad9us5cC39sS11Jcd1kDP2qRcCuST/glVNhLkcjKkiQerOfd5nQ/qL4JYfz/1mfP5mdpz9jHKzpLUIG+TXkbSTjP6VVmsb5KPT+3pKEdRFZB+Pu9+J8="
|
||||
- coverity_branch: coverity_scan
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- env: libt_branch=RC_2_0 gui=true build_system=qmake
|
||||
os: linux
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: change
|
||||
@@ -39,8 +45,7 @@ addons:
|
||||
apt:
|
||||
sources:
|
||||
# sources list: https://github.com/travis-ci/apt-source-safelist/blob/master/ubuntu.json
|
||||
- sourceline: 'ppa:qbittorrent-team/qbt-libtorrent-travisci'
|
||||
- sourceline: 'deb https://apt.kitware.com/ubuntu/ bionic main'
|
||||
- sourceline: 'deb https://apt.kitware.com/ubuntu/ focal main'
|
||||
key_url: 'https://apt.kitware.com/keys/kitware-archive-latest.asc'
|
||||
packages:
|
||||
# packages list: https://github.com/travis-ci/apt-package-safelist/blob/master/ubuntu-trusty
|
||||
@@ -69,6 +74,8 @@ before_install:
|
||||
# TravisCI installs its own cmake to another location which ovverides other installations
|
||||
# if they don't call the new binary directly
|
||||
alias cmake="/usr/bin/cmake"
|
||||
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
|
||||
fi
|
||||
- |
|
||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
@@ -114,20 +121,34 @@ install:
|
||||
ccache -V && ccache --show-stats && ccache --zero-stats
|
||||
fi
|
||||
- |
|
||||
if [ "$libt_branch" = "RC_1_2" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
# Will install latest 1.2.x daily build from the PPA
|
||||
sudo apt-get -y install libtorrent-rasterbar-dev
|
||||
fi
|
||||
- |
|
||||
if [ "$libt_branch" = "RC_1_2" ] && [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
# building libtorrent manually should be faster than using the official bottle
|
||||
# because the bottle will also pull in a lot of updated dependencies and prolong the overall time
|
||||
if [ "$libt_branch" = "RC_1_2" ]; then
|
||||
pushd "$HOME"
|
||||
git clone --single-branch --branch RC_1_2 https://github.com/arvidn/libtorrent.git
|
||||
cd libtorrent
|
||||
git checkout tags/v1.2.10
|
||||
git checkout tags/v1.2.11
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14 -Ddeprecated-functions=OFF -DOPENSSL_ROOT_DIR="$openssl_root_path" ./
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_STANDARD=14 \
|
||||
-Ddeprecated-functions=OFF \
|
||||
-DOPENSSL_ROOT_DIR="$openssl_root_path" \
|
||||
./
|
||||
make
|
||||
sudo make install
|
||||
popd
|
||||
elif [ "$libt_branch" = "RC_2_0" ]; then
|
||||
pushd "$HOME"
|
||||
git clone --single-branch --branch RC_2_0 https://github.com/arvidn/libtorrent.git
|
||||
cd libtorrent
|
||||
git checkout tags/v2.0.1
|
||||
git submodule update --init --recursive
|
||||
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_STANDARD=14 \
|
||||
-Ddeprecated-functions=ON \
|
||||
-DOPENSSL_ROOT_DIR="$openssl_root_path" \
|
||||
./
|
||||
make
|
||||
sudo make install
|
||||
popd
|
||||
|
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR) # Policies <= CMP0097 default t
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
|
||||
|
||||
project(qBittorrent
|
||||
VERSION 4.3.1.0
|
||||
VERSION 4.3.2.0
|
||||
DESCRIPTION "The qBittorrent BitTorrent client"
|
||||
HOMEPAGE_URL "https://www.qbittorrent.org/"
|
||||
LANGUAGES CXX
|
||||
@@ -11,14 +11,15 @@ project(qBittorrent
|
||||
|
||||
# use CONFIG mode first in find_package
|
||||
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
|
||||
# version requirements
|
||||
set(requiredBoostVersion 1.40)
|
||||
set(requiredQtVersion 5.9.0)
|
||||
set(requiredOpenSSLVersion 1.0)
|
||||
set(requiredLibtorrentVersion 1.2.0)
|
||||
set(requiredZlibVersion 1.2.5.2)
|
||||
# version requirements - older vesions may work, but you are on your own
|
||||
set(minBoostVersion 1.65)
|
||||
set(minQtVersion 5.9.5)
|
||||
set(minOpenSSLVersion 1.1.1)
|
||||
set(minLibtorrentVersion 1.2.11)
|
||||
set(minZlibVersion 1.2.11)
|
||||
|
||||
# features (some are platform-specific)
|
||||
include(CheckCXXSourceCompiles) # TODO: migrate to CheckSourceCompiles in CMake >= 3.19
|
||||
include(FeatureSummary)
|
||||
include(FeatureOptionsSetup)
|
||||
feature_option(STACKTRACE "Enable stacktraces" ON)
|
||||
@@ -34,6 +35,18 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
"Install systemd service file to a directory manually overridable with Systemd_SERVICES_INSTALL_DIR"
|
||||
OFF "NOT GUI" OFF
|
||||
)
|
||||
if (STACKTRACE)
|
||||
check_cxx_source_compiles(
|
||||
"#include <execinfo.h>
|
||||
int main(){return 0;}"
|
||||
QBITTORRENT_HAS_EXECINFO_H
|
||||
)
|
||||
if (NOT QBITTORRENT_HAS_EXECINFO_H)
|
||||
message(FATAL_ERROR "execinfo.h header file not found.\n"
|
||||
"Please either disable the STACKTRACE feature or use a libc that has this header file, such as glibc (GNU libc)."
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
elseif (MSVC)
|
||||
feature_option(MSVC_RUNTIME_DYNAMIC "Use MSVC dynamic runtime library (-MD) instead of static (-MT)" ON)
|
||||
endif()
|
||||
|
@@ -372,7 +372,7 @@ Example:
|
||||
|
||||
## 8. Include guard
|
||||
|
||||
`#pragma once` should be used instead of "include guard" in new code:
|
||||
`#pragma once` must be used instead of a "classic include guard":
|
||||
|
||||
```c++
|
||||
// examplewidget.h
|
||||
|
22
Changelog
22
Changelog
@@ -1,3 +1,25 @@
|
||||
Sun Dec 27 2020 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.3.2
|
||||
- FEATURE: Allow to add root folder to torrent content (glassez)
|
||||
- FEATURE: "HTTPS tracker validation" option is available on all platforms with latest libtorrent (Chocobo1)
|
||||
- FEATURE: Option for supporting internationalized domain names (IDNs) (Chocobo1)
|
||||
- BUGFIX: Fix broken sorting on some columns (Chocobo1)
|
||||
- BUGFIX: Fix availability per file value (Chocobo1)
|
||||
- BUGFIX: Fix status of torrents without metadata (sledgehammer999)
|
||||
- BUGFIX: Don't try to remove folders for a torrent without metadata (sledgehammer999)
|
||||
- BUGFIX: Lift upper limit of "Max concurrent HTTP announces" option (Chocobo1)
|
||||
- BUGFIX: Add links to libtorrent documentation (Chocobo1)
|
||||
- BUGFIX: Move "embedded tracker" options to qbt section (Chocobo1)
|
||||
- BUGFIX: Properly handle "Append extension" option changing (glassez)
|
||||
- BUGFIX: Correctly save paused torrent state (glassez)
|
||||
- BUGFIX: Fix bug of "move storage job" can be performed multiple times (glassez)
|
||||
- WEBUI: Add ability to use 'shift+delete' to delete torrents (Chocobo1)
|
||||
- WEBUI: Allow to attach tags while adding torrents (Jesse Chan)
|
||||
- WEBUI: Bump version to 2.6.2 (Jesse Chan)
|
||||
- WEBUI: Remove unnecessary restriction on input length (Chocobo1)
|
||||
- WINDOWS: NSIS: Update Russian translation (Andrei Stepanov)
|
||||
- WINDOWS: NSIS: Update Italian translation (Alessandro Simonelli)
|
||||
- OTHER: Drop support for building with libtorrent < 1.2.11 (Vladimir Golovnev)
|
||||
|
||||
Wed Nov 25 2020 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.3.1
|
||||
- FEATURE: Allow progress bar styling from custom themes (jagannatharjun)
|
||||
- FEATURE: Allow adding torrents using "Paste" key sequence (Chocobo1)
|
||||
|
16
INSTALL
16
INSTALL
@@ -3,23 +3,27 @@ qBittorrent - A BitTorrent client in C++ / Qt
|
||||
|
||||
1) Install these dependencies:
|
||||
|
||||
- Boost >= 1.40
|
||||
- Boost >= 1.65
|
||||
|
||||
- libtorrent-rasterbar >= 1.2 (by Arvid Norberg)
|
||||
- libtorrent-rasterbar >= 1.2.11 (by Arvid Norberg)
|
||||
* https://www.libtorrent.org/
|
||||
* Be careful: another library (the one used by rTorrent) uses a similar name
|
||||
|
||||
- OpenSSL >= 1.0
|
||||
- OpenSSL >= 1.1.1
|
||||
|
||||
- Qt >= 5.9.0
|
||||
- Qt >= 5.9.5
|
||||
|
||||
- zlib >= 1.2.5.2
|
||||
- zlib >= 1.2.11
|
||||
|
||||
- pkg-config (compile-time only)
|
||||
- pkg-config (compile-time only on *nix systems)
|
||||
|
||||
- Python >= 3.5.0 (optional, runtime only)
|
||||
* Required by the internal search engine
|
||||
|
||||
Dependency version numbers are bumped every once in a while to keep the range of properly tested configurations manageable, even if not strictly required to build.
|
||||
You may be able to build with older versions of (some of) the dependencies other than the minimum versions specified in the build scripts, but support for such builds is not provided - you are on your own.
|
||||
Please ensure you are building with an officially supported configuration when reporting bugs.
|
||||
|
||||
2a) Compile and install qBittorrent with Qt graphical interface
|
||||
|
||||
$ ./configure
|
||||
|
12
configure.ac
12
configure.ac
@@ -1,6 +1,8 @@
|
||||
AC_INIT([qbittorrent], [v4.3.1], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
||||
AC_INIT([qbittorrent], [v4.3.2], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
: ${CFLAGS=""}
|
||||
: ${CXXFLAGS=""}
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_SED
|
||||
@@ -157,7 +159,7 @@ AS_CASE(["x$enable_qt_dbus"],
|
||||
AC_MSG_ERROR([Unknown option "$enable_qt_dbus". Use either "yes" or "no".])])
|
||||
|
||||
|
||||
AX_BOOST_BASE([1.40],
|
||||
AX_BOOST_BASE([1.65],
|
||||
[AC_MSG_NOTICE([Boost CXXFLAGS: "$BOOST_CPPFLAGS"])
|
||||
AC_MSG_NOTICE([Boost LDFLAGS: "$BOOST_LDFLAGS"])],
|
||||
[AC_MSG_ERROR([Could not find Boost])])
|
||||
@@ -178,17 +180,17 @@ AC_MSG_NOTICE([Boost.System LIB: "$BOOST_SYSTEM_LIB"])
|
||||
LIBS="$BOOST_SYSTEM_LIB $LIBS"
|
||||
|
||||
PKG_CHECK_MODULES(libtorrent,
|
||||
[libtorrent-rasterbar >= 1.2],
|
||||
[libtorrent-rasterbar >= 1.2.11],
|
||||
[CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS"
|
||||
LIBS="$libtorrent_LIBS $LIBS"])
|
||||
|
||||
PKG_CHECK_MODULES(openssl,
|
||||
[openssl >= 1.0],
|
||||
[openssl >= 1.1.1],
|
||||
[CXXFLAGS="$openssl_CFLAGS $CXXFLAGS"
|
||||
LIBS="$openssl_LIBS $LIBS"])
|
||||
|
||||
PKG_CHECK_MODULES(zlib,
|
||||
[zlib >= 1.2.5.2],
|
||||
[zlib >= 1.2.11],
|
||||
[CXXFLAGS="$zlib_CFLAGS $CXXFLAGS"
|
||||
LIBS="$zlib_LIBS $LIBS"])
|
||||
|
||||
|
2
dist/mac/Info.plist
vendored
2
dist/mac/Info.plist
vendored
@@ -55,7 +55,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.3.0</string>
|
||||
<string>4.3.2</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
@@ -74,6 +74,6 @@
|
||||
<url type="translate">https://github.com/qbittorrent/qBittorrent/wiki/How-to-translate-qBittorrent</url>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<releases>
|
||||
<release version="4.3.1" date="2020-11-25"/>
|
||||
<release version="4.3.2" date="2020-12-27"/>
|
||||
</releases>
|
||||
</component>
|
||||
|
17
dist/unix/org.qbittorrent.qBittorrent.desktop
vendored
17
dist/unix/org.qbittorrent.qBittorrent.desktop
vendored
@@ -11,6 +11,8 @@ Type=Application
|
||||
StartupNotify=false
|
||||
StartupWMClass=qbittorrent
|
||||
Keywords=bittorrent;torrent;magnet;download;p2p;
|
||||
|
||||
# Translations
|
||||
Comment[oc]=Telecargar e partejar de fichièrs amb BitTorrent
|
||||
GenericName[oc]=Client BitTorrent
|
||||
Name[oc]=qBittorrent
|
||||
@@ -53,6 +55,9 @@ Name[en_GB]=qBittorrent
|
||||
Comment[es]=Descargue y comparta archivos por BitTorrent
|
||||
GenericName[es]=Cliente BitTorrent
|
||||
Name[es]=qBittorrent
|
||||
Comment[et]=Lae alla ja jaga faile üle BitTorrenti
|
||||
GenericName[et]=BitTorrent klient
|
||||
Name[et]=qBittorrent
|
||||
Comment[eu]=Jeitsi eta elkarbanatu agiriak BitTorrent bidez
|
||||
GenericName[eu]=BitTorrent bezeroa
|
||||
Name[eu]=qBittorrent
|
||||
@@ -86,7 +91,7 @@ Name[id]=qBittorrent
|
||||
Comment[is]=Sækja og deila skrám yfir BitTorrent
|
||||
GenericName[is]=BitTorrent biðlarar
|
||||
Name[is]=qBittorrent
|
||||
Comment[it]=Client BitTorrent per il download di file via internet
|
||||
Comment[it]=Scarica e condividi file tramite BitTorrent
|
||||
GenericName[it]=Client BitTorrent
|
||||
Name[it]=qBittorrent
|
||||
Comment[ja]=BitTorrent でファイルをダウンロードおよび共有します
|
||||
@@ -137,6 +142,7 @@ Name[sk]=qBittorrent
|
||||
Comment[sl]=Prenesite in delite datoteke preko BitTorrenta
|
||||
GenericName[sl]=BitTorrent odjemalec
|
||||
Name[sl]=qBittorrent
|
||||
Comment[sr]=Преузимајте и делите фајлове преко BitTorrent протокола
|
||||
GenericName[sr]=BitTorrent-клијент
|
||||
Comment[sr@latin]=Preuzimanje i deljenje fajlova preko BitTorrent-a
|
||||
GenericName[sr@latin]=BitTorrent klijent
|
||||
@@ -150,8 +156,8 @@ Name[uz@Latn]=qBittorrent
|
||||
Comment[ltg]=Atsasyuteit i daleit failus ar BitTorrent
|
||||
GenericName[ltg]=BitTorrent klients
|
||||
Name[ltg]=qBittorrent
|
||||
Comment[hi_IN]= अपनी फाइलें BitTorrent के माध्यम से डाउनलोड आैर साॅझा करें
|
||||
GenericName[hi_IN]=BitTorrent उपभोक्ता
|
||||
Comment[hi_IN]=BitTorrent द्वारा फाइल डाउनलोड व सहभाजन
|
||||
GenericName[hi_IN]=BitTorrent साधन
|
||||
Name[hi_IN]=qBittorrent
|
||||
Comment[tr]=Dosyaları BitTorrent üzerinden indirin ve paylaşın
|
||||
GenericName[tr]=BitTorrent istemcisi
|
||||
@@ -165,6 +171,9 @@ Name[uk]=qBittorrent
|
||||
Comment[vi]=Tải về và chia sẻ các tập tin thông qua BitTorrent
|
||||
GenericName[vi]=Máy trạm dạng BitTorrent
|
||||
Name[vi]=qBittorrent
|
||||
Comment[az@latin]=Faylları BitTorrent vasitəsilə göndərin və paylaşın
|
||||
GenericName[az@latin]=BitTorrent client
|
||||
Name[az@latin]=qBittorrent
|
||||
Comment[zh_HK]=經由BitTorrent下載並分享檔案
|
||||
GenericName[zh_HK]=BitTorrent用戶端
|
||||
Name[zh_HK]=qBittorrent
|
||||
@@ -195,6 +204,6 @@ Name[te]=క్యు బిట్ టొరెంట్
|
||||
Comment[en_AU]=Download and share files over BitTorrent
|
||||
GenericName[en_AU]=BitTorrent client
|
||||
Name[en_AU]=qBittorrent
|
||||
Comment[th]=ดาว์นโหลดและแชร์ไฟล์ด้วยบิททอเร้น
|
||||
Comment[th]=ดาวน์โหลดและแชร์ไฟล์ด้วยบิททอเร้น
|
||||
GenericName[th]=โปรแกรมบิททอเร้น
|
||||
Name[th]=qBittorrent
|
||||
|
20
dist/windows/installer-translations/italian.nsi
vendored
20
dist/windows/installer-translations/italian.nsi
vendored
@@ -3,9 +3,9 @@
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_ITALIAN} "qBittorrent (necessario)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_ITALIAN} "Crea icone sul desktop"
|
||||
LangString inst_dekstop ${LANG_ITALIAN} "Crea collegamento sul Desktop"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_ITALIAN} "Crea gruppo programmi"
|
||||
LangString inst_startmenu ${LANG_ITALIAN} "Aggiungi al menu Start"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
LangString inst_startup ${LANG_ITALIAN} "Esegui qBittorrent all'avvio di Windows"
|
||||
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
|
||||
@@ -15,19 +15,19 @@ LangString inst_magnet ${LANG_ITALIAN} "Apri collegamenti magnet con qBittorrent
|
||||
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_ITALIAN} "Aggiungi regola al firewall di Windows"
|
||||
;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
|
||||
LangString inst_pathlimit ${LANG_ITALIAN} "Disabilita limite percorso Windows (limite MAX_PATH max 260 caratterin, richiede Windows 10 versione 1607 o successive)"
|
||||
LangString inst_pathlimit ${LANG_ITALIAN} "Disabilita limite lunghezza percorsi Windows (limite MAX_PATH di 260 caratteri, richiede Windows 10 versione 1607 o successive)"
|
||||
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_ITALIAN} "Aggiunta regola al firewall di Windows"
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_ITALIAN} "qBittorrent è in esecuzione.%n%nChiudi l'applicazione qBittorrent prima della nuova installazione."
|
||||
LangString inst_warning ${LANG_ITALIAN} "qBittorrent è in esecuzione. Chiudilo prima di procedere con l'installazione."
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
|
||||
LangString inst_uninstall_question ${LANG_ITALIAN} "L'attuale versione di qBittorrent verrà disinstallata.%n%nLe impostazioni utente e i torrent rimanno invariati."
|
||||
LangString inst_uninstall_question ${LANG_ITALIAN} "La versione attuale verrà disinstallata. Le impostazioni utente e i torrent rimarranno invariati."
|
||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_ITALIAN} "Disinstallazione versione precedente di qBittorrent."
|
||||
LangString inst_unist ${LANG_ITALIAN} "Disinstallazione versione precedente."
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_ITALIAN} "Esegui qBittorrent"
|
||||
LangString launch_qbt ${LANG_ITALIAN} "Esegui qBittorrent."
|
||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_ITALIAN} "Questo installer di qBittorrent funziona solo con Windows a 64bit."
|
||||
LangString inst_requires_64bit ${LANG_ITALIAN} "Questo installer funziona solo con versioni di Windows a 64bit."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_ITALIAN} "Questa versione di qBittorrent richiede Windows 7 o versioni successive."
|
||||
|
||||
@@ -42,7 +42,7 @@ LangString remove_shortcuts ${LANG_ITALIAN} "Rimuovi collegamenti"
|
||||
;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
|
||||
LangString remove_associations ${LANG_ITALIAN} "Rimuovi associazione file"
|
||||
;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
|
||||
LangString remove_registry ${LANG_ITALIAN} "Rimuovi chiavi registro"
|
||||
LangString remove_registry ${LANG_ITALIAN} "Rimuovi chiavi di registro"
|
||||
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
|
||||
LangString remove_conf ${LANG_ITALIAN} "Rimuovi file di configurazione"
|
||||
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
|
||||
@@ -52,7 +52,7 @@ LangString remove_firewallinfo ${LANG_ITALIAN} "Rimozione regola dal firewall di
|
||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_ITALIAN} "Rimuovi torrent e dati nella cache"
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_ITALIAN} "qBittorrent è in esecuzione.%n%nChiudi qBittorrent prima della disinstallazione."
|
||||
LangString uninst_warning ${LANG_ITALIAN} "qBittorrent è in esecuzione. Chiudilo prima di procedere con la disinstallazione."
|
||||
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_ITALIAN} "Associazione file .torrent non rimossa. File associati con:"
|
||||
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
||||
|
@@ -21,7 +21,7 @@ LangString inst_firewallinfo ${LANG_RUSSIAN} "Добавление в списо
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_RUSSIAN} "qBittorrent запущен. Пожалуйста, закройте qBittorrent и перезапустите программу установки."
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
|
||||
LangString inst_uninstall_question ${LANG_RUSSIAN} "Обнаружена предыдущая установка. Она будет деинсталлирована без удаления пользовательских настроек."
|
||||
LangString inst_uninstall_question ${LANG_RUSSIAN} "Текущая версия будет деинсталлирована. Пользовательские настройки и торренты останутся нетронутыми."
|
||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_RUSSIAN} "Деинсталлируется старая версия."
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
|
2
dist/windows/options.nsi
vendored
2
dist/windows/options.nsi
vendored
@@ -28,7 +28,7 @@ XPStyle on
|
||||
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
|
||||
|
||||
; Program specific
|
||||
!define PROG_VERSION "4.3.1"
|
||||
!define PROG_VERSION "4.3.2"
|
||||
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
|
||||
|
@@ -5,9 +5,9 @@
|
||||
# Sets the QT_QMAKE variable to the path of Qt5 qmake if found.
|
||||
# --------------------------------------
|
||||
AC_DEFUN([FIND_QT5],
|
||||
[PKG_CHECK_EXISTS([Qt5Core >= 5.9.0],
|
||||
[PKG_CHECK_EXISTS([Qt5Core >= 5.9.5],
|
||||
[PKG_CHECK_VAR(QT_QMAKE,
|
||||
[Qt5Core >= 5.9.0],
|
||||
[Qt5Core >= 5.9.5],
|
||||
[host_bins])
|
||||
])
|
||||
|
||||
@@ -18,7 +18,7 @@ AS_IF([test -f "$QT_QMAKE/qmake"],
|
||||
[QT_QMAKE=""])
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([for Qt5 qmake >= 5.9.0])
|
||||
AC_MSG_CHECKING([for Qt5 qmake >= 5.9.5])
|
||||
AS_IF([test "x$QT_QMAKE" != "x"],
|
||||
[AC_MSG_RESULT([$QT_QMAKE])],
|
||||
[AC_MSG_RESULT([not found])]
|
||||
@@ -29,8 +29,8 @@ 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.9.0])
|
||||
PKG_CHECK_EXISTS([Qt5DBus >= 5.9.0],
|
||||
[AC_MSG_CHECKING([for Qt5DBus >= 5.9.5])
|
||||
PKG_CHECK_EXISTS([Qt5DBus >= 5.9.5],
|
||||
[AC_MSG_RESULT([found])
|
||||
HAVE_QTDBUS=[true]],
|
||||
[AC_MSG_RESULT([not found])
|
||||
|
@@ -1,12 +1,12 @@
|
||||
if (UNIX AND (NOT APPLE) AND (NOT CYGWIN))
|
||||
find_package(LibtorrentRasterbar QUIET ${requiredLibtorrentVersion} COMPONENTS torrent-rasterbar)
|
||||
find_package(LibtorrentRasterbar QUIET ${minLibtorrentVersion} COMPONENTS torrent-rasterbar)
|
||||
if (NOT LibtorrentRasterbar_FOUND)
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(LIBTORRENT_RASTERBAR IMPORTED_TARGET GLOBAL "libtorrent-rasterbar>=${requiredLibtorrentVersion}")
|
||||
pkg_check_modules(LIBTORRENT_RASTERBAR IMPORTED_TARGET GLOBAL "libtorrent-rasterbar>=${minLibtorrentVersion}")
|
||||
if (NOT LIBTORRENT_RASTERBAR_FOUND)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Package LibtorrentRasterbar >= ${requiredLibtorrentVersion} not found"
|
||||
"Package LibtorrentRasterbar >= ${minLibtorrentVersion} not found"
|
||||
" with CMake or pkg-config.\n- Set LibtorrentRasterbar_DIR to a directory containing"
|
||||
" a LibtorrentRasterbarConfig.cmake file or add the installation prefix of LibtorrentRasterbar"
|
||||
" to CMAKE_PREFIX_PATH.\n- Alternatively, make sure there is a valid libtorrent-rasterbar.pc"
|
||||
@@ -18,9 +18,9 @@ if (UNIX AND (NOT APPLE) AND (NOT CYGWIN))
|
||||
# force a fake package to show up in the feature summary
|
||||
set_property(GLOBAL APPEND PROPERTY
|
||||
PACKAGES_FOUND
|
||||
"LibtorrentRasterbar via pkg-config (required version >= ${requiredLibtorrentVersion})"
|
||||
"LibtorrentRasterbar via pkg-config (version >= ${minLibtorrentVersion})"
|
||||
)
|
||||
set_package_properties("LibtorrentRasterbar via pkg-config (required version >= ${requiredLibtorrentVersion})"
|
||||
set_package_properties("LibtorrentRasterbar via pkg-config (version >= ${minLibtorrentVersion})"
|
||||
PROPERTIES
|
||||
TYPE REQUIRED
|
||||
)
|
||||
@@ -28,16 +28,16 @@ if (UNIX AND (NOT APPLE) AND (NOT CYGWIN))
|
||||
set_package_properties(LibtorrentRasterbar PROPERTIES TYPE REQUIRED)
|
||||
endif()
|
||||
else()
|
||||
find_package(LibtorrentRasterbar ${requiredLibtorrentVersion} REQUIRED COMPONENTS torrent-rasterbar)
|
||||
find_package(LibtorrentRasterbar ${minLibtorrentVersion} REQUIRED COMPONENTS torrent-rasterbar)
|
||||
endif()
|
||||
# force variable type so that it always shows up in ccmake/cmake-gui frontends
|
||||
set_property(CACHE LibtorrentRasterbar_DIR PROPERTY TYPE PATH)
|
||||
find_package(Boost ${requiredBoostVersion} REQUIRED)
|
||||
find_package(OpenSSL ${requiredOpenSSLVersion} REQUIRED)
|
||||
find_package(ZLIB ${requiredZlibVersion} REQUIRED)
|
||||
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS Core Network Xml LinguistTools)
|
||||
find_package(Boost ${minBoostVersion} REQUIRED)
|
||||
find_package(OpenSSL ${minOpenSSLVersion} REQUIRED)
|
||||
find_package(ZLIB ${minZlibVersion} REQUIRED)
|
||||
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS Core Network Xml LinguistTools)
|
||||
if (DBUS)
|
||||
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS DBus)
|
||||
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS DBus)
|
||||
set_package_properties(Qt5DBus PROPERTIES
|
||||
DESCRIPTION "Qt5 module for inter-process communication over the D-Bus protocol"
|
||||
PURPOSE "Required by the DBUS feature"
|
||||
@@ -60,11 +60,11 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_subdirectory(base)
|
||||
|
||||
if (GUI)
|
||||
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS Widgets Svg)
|
||||
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS Widgets Svg)
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS MacExtras)
|
||||
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS MacExtras)
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS WinExtras)
|
||||
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS WinExtras)
|
||||
endif()
|
||||
add_subdirectory(gui)
|
||||
endif()
|
||||
|
@@ -28,8 +28,7 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#ifndef APP_OPTIONS_H
|
||||
#define APP_OPTIONS_H
|
||||
#pragma once
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -81,5 +80,3 @@ private:
|
||||
|
||||
QBtCommandLineParameters parseCommandLine(const QStringList &args);
|
||||
void displayUsage(const QString &prgName);
|
||||
|
||||
#endif // APP_OPTIONS_H
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
#include <QTextStream>
|
||||
#include <QVector>
|
||||
|
||||
#include "base/global.h"
|
||||
#include "base/logger.h"
|
||||
|
@@ -26,8 +26,7 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#ifndef FILELOGGER_H
|
||||
#define FILELOGGER_H
|
||||
#pragma once
|
||||
|
||||
#include <QFile>
|
||||
#include <QObject>
|
||||
@@ -73,5 +72,3 @@ private:
|
||||
QFile m_logFile;
|
||||
QTimer m_flusher;
|
||||
};
|
||||
|
||||
#endif // FILELOGGER_H
|
||||
|
@@ -66,8 +66,7 @@
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef QTLOCALPEER_H
|
||||
#define QTLOCALPEER_H
|
||||
#pragma once
|
||||
|
||||
#include "qtlockedfile.h"
|
||||
|
||||
@@ -99,5 +98,3 @@ protected:
|
||||
private:
|
||||
static const char* ack;
|
||||
};
|
||||
|
||||
#endif // QTLOCALPEER_H
|
||||
|
@@ -66,8 +66,7 @@
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef QTLOCKEDFILE_H
|
||||
#define QTLOCKEDFILE_H
|
||||
#pragma once
|
||||
|
||||
#include <QFile>
|
||||
|
||||
@@ -112,5 +111,3 @@ namespace QtLP_Private
|
||||
LockMode m_lock_mode;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -18,8 +18,7 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef STACKTRACE_WIN_H
|
||||
#define STACKTRACE_WIN_H
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
#include <dbghelp.h>
|
||||
@@ -355,5 +354,3 @@ const QString straceWin::getBacktrace()
|
||||
#pragma warning(pop)
|
||||
#pragma optimize("g", on)
|
||||
#endif
|
||||
|
||||
#endif // STACKTRACE_WIN_H
|
||||
|
@@ -27,8 +27,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef STACKTRACEDIALOG_H
|
||||
#define STACKTRACEDIALOG_H
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
@@ -51,5 +50,3 @@ public:
|
||||
private:
|
||||
Ui::StacktraceDialog *m_ui;
|
||||
};
|
||||
|
||||
#endif // STACKTRACEDIALOG_H
|
||||
|
@@ -29,11 +29,15 @@
|
||||
#include "upgrade.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QMetaEnum>
|
||||
#include <QVector>
|
||||
|
||||
#include "base/bittorrent/torrentcontentlayout.h"
|
||||
#include "base/logger.h"
|
||||
#include "base/profile.h"
|
||||
#include "base/settingsstorage.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/string.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -78,11 +82,32 @@ namespace
|
||||
, QLatin1String("Preferences/WebUI/HTTPS/KeyPath")
|
||||
, Utils::Fs::toNativePath(configPath + QLatin1String("WebUIPrivateKey.pem")));
|
||||
}
|
||||
|
||||
void upgradeTorrentContentLayout()
|
||||
{
|
||||
const QString oldKey {QLatin1String {"BitTorrent/Session/CreateTorrentSubfolder"}};
|
||||
const QString newKey {QLatin1String {"BitTorrent/Session/TorrentContentLayout"}};
|
||||
|
||||
SettingsStorage *settingsStorage {SettingsStorage::instance()};
|
||||
const QVariant oldData {settingsStorage->loadValue(oldKey)};
|
||||
const QString newData {settingsStorage->loadValue(newKey).toString()};
|
||||
|
||||
if (!newData.isEmpty() || !oldData.isValid())
|
||||
return;
|
||||
|
||||
const bool createSubfolder = oldData.toBool();
|
||||
const BitTorrent::TorrentContentLayout torrentContentLayout =
|
||||
(createSubfolder ? BitTorrent::TorrentContentLayout::Original : BitTorrent::TorrentContentLayout::NoSubfolder);
|
||||
|
||||
settingsStorage->storeValue(newKey, Utils::String::fromEnum(torrentContentLayout));
|
||||
settingsStorage->removeValue(oldKey);
|
||||
}
|
||||
}
|
||||
|
||||
bool upgrade(const bool /*ask*/)
|
||||
{
|
||||
exportWebUIHttpsFiles();
|
||||
upgradeTorrentContentLayout();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -8,6 +8,7 @@ add_library(qbt_base STATIC
|
||||
bittorrent/common.h
|
||||
bittorrent/customstorage.h
|
||||
bittorrent/downloadpriority.h
|
||||
bittorrent/filesearcher.h
|
||||
bittorrent/filterparserthread.h
|
||||
bittorrent/infohash.h
|
||||
bittorrent/ltqhash.h
|
||||
@@ -23,6 +24,7 @@ add_library(qbt_base STATIC
|
||||
bittorrent/sessionstatus.h
|
||||
bittorrent/speedmonitor.h
|
||||
bittorrent/statistics.h
|
||||
bittorrent/torrentcontentlayout.h
|
||||
bittorrent/torrentcreatorthread.h
|
||||
bittorrent/torrenthandle.h
|
||||
bittorrent/torrenthandleimpl.h
|
||||
@@ -90,6 +92,7 @@ add_library(qbt_base STATIC
|
||||
bittorrent/bandwidthscheduler.cpp
|
||||
bittorrent/customstorage.cpp
|
||||
bittorrent/downloadpriority.cpp
|
||||
bittorrent/filesearcher.cpp
|
||||
bittorrent/filterparserthread.cpp
|
||||
bittorrent/infohash.cpp
|
||||
bittorrent/magneturi.cpp
|
||||
|
@@ -7,6 +7,7 @@ HEADERS += \
|
||||
$$PWD/bittorrent/common.h \
|
||||
$$PWD/bittorrent/customstorage.h \
|
||||
$$PWD/bittorrent/downloadpriority.h \
|
||||
$$PWD/bittorrent/filesearcher.h \
|
||||
$$PWD/bittorrent/filterparserthread.h \
|
||||
$$PWD/bittorrent/infohash.h \
|
||||
$$PWD/bittorrent/ltqhash.h \
|
||||
@@ -22,6 +23,7 @@ HEADERS += \
|
||||
$$PWD/bittorrent/sessionstatus.h \
|
||||
$$PWD/bittorrent/speedmonitor.h \
|
||||
$$PWD/bittorrent/statistics.h \
|
||||
$$PWD/bittorrent/torrentcontentlayout.h \
|
||||
$$PWD/bittorrent/torrentcreatorthread.h \
|
||||
$$PWD/bittorrent/torrenthandle.h \
|
||||
$$PWD/bittorrent/torrenthandleimpl.h \
|
||||
@@ -90,6 +92,7 @@ SOURCES += \
|
||||
$$PWD/bittorrent/bandwidthscheduler.cpp \
|
||||
$$PWD/bittorrent/customstorage.cpp \
|
||||
$$PWD/bittorrent/downloadpriority.cpp \
|
||||
$$PWD/bittorrent/filesearcher.cpp \
|
||||
$$PWD/bittorrent/filterparserthread.cpp \
|
||||
$$PWD/bittorrent/infohash.cpp \
|
||||
$$PWD/bittorrent/magneturi.cpp \
|
||||
|
@@ -28,12 +28,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
#include "base/tristatebool.h"
|
||||
#include "torrenthandle.h"
|
||||
#include "torrentcontentlayout.h"
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
@@ -52,7 +55,7 @@ namespace BitTorrent
|
||||
TriStateBool addPaused;
|
||||
QVector<DownloadPriority> filePriorities; // used if TorrentInfo is set
|
||||
bool skipChecking = false;
|
||||
TriStateBool createSubfolder;
|
||||
boost::optional<BitTorrent::TorrentContentLayout> contentLayout;
|
||||
TriStateBool useAutoTMM;
|
||||
int uploadLimit = -1;
|
||||
int downloadLimit = -1;
|
||||
|
@@ -27,8 +27,7 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#ifndef BANDWIDTHSCHEDULER_H
|
||||
#define BANDWIDTHSCHEDULER_H
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
@@ -52,5 +51,3 @@ private:
|
||||
QTimer m_timer;
|
||||
bool m_lastAlternative;
|
||||
};
|
||||
|
||||
#endif // BANDWIDTHSCHEDULER_H
|
||||
|
@@ -26,8 +26,7 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#ifndef BITTORRENT_CACHESTATUS_H
|
||||
#define BITTORRENT_CACHESTATUS_H
|
||||
#pragma once
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
@@ -39,8 +38,6 @@ namespace BitTorrent
|
||||
quint64 jobQueueLength = 0;
|
||||
quint64 averageJobTime = 0;
|
||||
quint64 queuedBytes = 0;
|
||||
qreal readRatio = 0.0;
|
||||
qreal readRatio = 0; // TODO: remove when LIBTORRENT_VERSION_NUM >= 20000
|
||||
};
|
||||
}
|
||||
|
||||
#endif // BITTORRENT_CACHESTATUS_H
|
||||
|
69
src/base/bittorrent/filesearcher.cpp
Normal file
69
src/base/bittorrent/filesearcher.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2020 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 "filesearcher.h"
|
||||
|
||||
#include <QDir>
|
||||
|
||||
#include "base/bittorrent/common.h"
|
||||
#include "base/bittorrent/infohash.h"
|
||||
|
||||
void FileSearcher::search(const BitTorrent::InfoHash &id, const QStringList &originalFileNames
|
||||
, const QString &completeSavePath, const QString &incompleteSavePath)
|
||||
{
|
||||
const auto findInDir = [](const QString &dirPath, QStringList &fileNames) -> bool
|
||||
{
|
||||
const QDir dir {dirPath};
|
||||
bool found = false;
|
||||
for (QString &fileName : fileNames)
|
||||
{
|
||||
if (dir.exists(fileName))
|
||||
{
|
||||
found = true;
|
||||
}
|
||||
else if (dir.exists(fileName + QB_EXT))
|
||||
{
|
||||
found = true;
|
||||
fileName += QB_EXT;
|
||||
}
|
||||
}
|
||||
|
||||
return found;
|
||||
};
|
||||
|
||||
QString savePath = completeSavePath;
|
||||
QStringList adjustedFileNames = originalFileNames;
|
||||
const bool found = findInDir(savePath, adjustedFileNames);
|
||||
if (!found && !incompleteSavePath.isEmpty())
|
||||
{
|
||||
savePath = incompleteSavePath;
|
||||
findInDir(savePath, adjustedFileNames);
|
||||
}
|
||||
|
||||
emit searchFinished(id, savePath, adjustedFileNames);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user