You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-16 20:32:23 +02:00
Compare commits
280 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c0ccf28d2c | ||
![]() |
9ff617a644 | ||
![]() |
0fbdc6471c | ||
![]() |
1ecdcfc29c | ||
![]() |
522ff3b611 | ||
![]() |
edac24ecca | ||
![]() |
6bbc26e613 | ||
![]() |
ca5f184c3d | ||
![]() |
47078d31c1 | ||
![]() |
a42bca6098 | ||
![]() |
ade4c44aad | ||
![]() |
fdbf8e8b6e | ||
![]() |
a9f14a8408 | ||
![]() |
73e5bdc5b5 | ||
![]() |
c18a56769d | ||
![]() |
291d006740 | ||
![]() |
3693b34c2c | ||
![]() |
ad5dd8391a | ||
![]() |
e77e90e8d2 | ||
![]() |
e828b3a398 | ||
![]() |
f31bdc1fc4 | ||
![]() |
81912736ed | ||
![]() |
176dd0bee8 | ||
![]() |
bbcfa5aae7 | ||
![]() |
2990492506 | ||
![]() |
9d7c7c51ca | ||
![]() |
2dd65b9eb9 | ||
![]() |
c8b74215c0 | ||
![]() |
87092e2716 | ||
![]() |
bf3cbfc608 | ||
![]() |
ddde91dbb9 | ||
![]() |
93173fadeb | ||
![]() |
4eb6e74dd6 | ||
![]() |
3f9e528633 | ||
![]() |
0501971e82 | ||
![]() |
6b4aad8a83 | ||
![]() |
80de35c5ee | ||
![]() |
a7528ec27a | ||
![]() |
ab49c80247 | ||
![]() |
0ec35a24e0 | ||
![]() |
600aa61095 | ||
![]() |
5db783cb7f | ||
![]() |
1a653829b8 | ||
![]() |
7d1e2944ab | ||
![]() |
7cecad4e82 | ||
![]() |
6dc82df368 | ||
![]() |
fcb22eb568 | ||
![]() |
82866605b4 | ||
![]() |
a78cd3d2ac | ||
![]() |
2e08b365a2 | ||
![]() |
9eca9585a0 | ||
![]() |
e29a714da4 | ||
![]() |
e3f6cea95c | ||
![]() |
ddbdeb1f89 | ||
![]() |
9471d17a65 | ||
![]() |
5e457353e5 | ||
![]() |
81089945ae | ||
![]() |
b305b8d8c5 | ||
![]() |
a8603d66dc | ||
![]() |
fda3704a03 | ||
![]() |
6258dee96b | ||
![]() |
6334144f81 | ||
![]() |
4696fbff4a | ||
![]() |
8679b70b4c | ||
![]() |
56beb0ddce | ||
![]() |
8bf23e8087 | ||
![]() |
6bdfe77c80 | ||
![]() |
15c785d298 | ||
![]() |
577582ee0b | ||
![]() |
60ab8f87e9 | ||
![]() |
4420ae1996 | ||
![]() |
778046439c | ||
![]() |
be47c35cba | ||
![]() |
a51a855870 | ||
![]() |
6fc3c04dca | ||
![]() |
ae150b25ae | ||
![]() |
36ddf0fd2f | ||
![]() |
06d59cab2d | ||
![]() |
8f519d00e7 | ||
![]() |
ce58a3fd4b | ||
![]() |
303dbd7dbe | ||
![]() |
c9abcbfbd4 | ||
![]() |
baab8ddf75 | ||
![]() |
982d4a685a | ||
![]() |
52ff7a92fb | ||
![]() |
8a4a3b33f8 | ||
![]() |
aec4f1d343 | ||
![]() |
32ea862584 | ||
![]() |
9f1bd86c47 | ||
![]() |
d2853b3a98 | ||
![]() |
64cf3afe67 | ||
![]() |
7729035598 | ||
![]() |
021cf9fb65 | ||
![]() |
c2e9ce5966 | ||
![]() |
75e4a004f7 | ||
![]() |
ac60072ded | ||
![]() |
9cac51d9b0 | ||
![]() |
14d590b3be | ||
![]() |
86d1dc300c | ||
![]() |
6787623ff3 | ||
![]() |
636ff89e23 | ||
![]() |
568950e63e | ||
![]() |
b3b973d54b | ||
![]() |
ff64a79594 | ||
![]() |
26b635ca33 | ||
![]() |
7e63908977 | ||
![]() |
5c9ce2952b | ||
![]() |
6ca7ff0e25 | ||
![]() |
3091c30ff6 | ||
![]() |
1086b940a2 | ||
![]() |
9465f358c4 | ||
![]() |
f8cb9d09f6 | ||
![]() |
01d8b24982 | ||
![]() |
b7604b1c82 | ||
![]() |
4da4457f5f | ||
![]() |
858909bf19 | ||
![]() |
d3bdb52b8f | ||
![]() |
d804445de7 | ||
![]() |
5187899d7e | ||
![]() |
67ad8ef7d6 | ||
![]() |
cbd9ccef17 | ||
![]() |
d6420e6876 | ||
![]() |
f76b1eb2fb | ||
![]() |
e474f53910 | ||
![]() |
ccac6cb5a9 | ||
![]() |
92bb94ecca | ||
![]() |
b286351305 | ||
![]() |
3873a36338 | ||
![]() |
f989708e31 | ||
![]() |
2dbeda5985 | ||
![]() |
9d5d1dfea8 | ||
![]() |
3738302a3c | ||
![]() |
7f58ff4c8f | ||
![]() |
4c079ede83 | ||
![]() |
1ee91ddb13 | ||
![]() |
03fd0a36a6 | ||
![]() |
266c96f03b | ||
![]() |
a088657619 | ||
![]() |
7c164dfcb9 | ||
![]() |
20f4b95180 | ||
![]() |
8ac4cccc25 | ||
![]() |
d990af4a79 | ||
![]() |
8e73c262f9 | ||
![]() |
7804faa34d | ||
![]() |
0bb0a5ea13 | ||
![]() |
d5b9e3449b | ||
![]() |
753b33b8a3 | ||
![]() |
eb12d63d2d | ||
![]() |
b21ab50221 | ||
![]() |
34f89d3174 | ||
![]() |
54227c20ff | ||
![]() |
515c578188 | ||
![]() |
74bba9ecfe | ||
![]() |
41e052498b | ||
![]() |
3a51c5bf85 | ||
![]() |
cad542f3f4 | ||
![]() |
54a444d37f | ||
![]() |
1c5e6980e8 | ||
![]() |
8b7d995447 | ||
![]() |
0b83ea9fcf | ||
![]() |
04e582793e | ||
![]() |
07e2e88e79 | ||
![]() |
e120a6764b | ||
![]() |
c4a311cc09 | ||
![]() |
278872eb12 | ||
![]() |
c3d9321865 | ||
![]() |
882f5e325a | ||
![]() |
bf7bec61c2 | ||
![]() |
72af954b65 | ||
![]() |
514abca0ea | ||
![]() |
643224800f | ||
![]() |
8e25ec7dbf | ||
![]() |
07b36f313b | ||
![]() |
34d2bdadc0 | ||
![]() |
92ef98080b | ||
![]() |
34bf09b539 | ||
![]() |
06f46eae24 | ||
![]() |
ae5b2fa4a4 | ||
![]() |
9b7c2e669e | ||
![]() |
e6e087d391 | ||
![]() |
bf6b723206 | ||
![]() |
0bce0fc6c1 | ||
![]() |
4d913d123c | ||
![]() |
a00bbf349a | ||
![]() |
c61566d133 | ||
![]() |
a675a13587 | ||
![]() |
ebe0e7bb71 | ||
![]() |
e30df4ed70 | ||
![]() |
9dcb9848ae | ||
![]() |
7034d14eba | ||
![]() |
08c8b6f77d | ||
![]() |
be91f749ee | ||
![]() |
4ec2a37f5d | ||
![]() |
cc471dbd3c | ||
![]() |
ab62cbdf3f | ||
![]() |
cd708bb665 | ||
![]() |
c1a47279af | ||
![]() |
fec6c8af27 | ||
![]() |
fc605b119e | ||
![]() |
7892f37d3e | ||
![]() |
26cb71458d | ||
![]() |
069bd05d37 | ||
![]() |
c4f043a14d | ||
![]() |
16b9a28531 | ||
![]() |
1da29a450c | ||
![]() |
9095545425 | ||
![]() |
01dbc01635 | ||
![]() |
bd7fd47d9f | ||
![]() |
429dad3f70 | ||
![]() |
ca70f2ce5c | ||
![]() |
98a4b8c199 | ||
![]() |
6dd94ccc1d | ||
![]() |
e83a8393a4 | ||
![]() |
8fa79a0690 | ||
![]() |
0423a28f30 | ||
![]() |
18f32fae90 | ||
![]() |
057b998e0f | ||
![]() |
855ac43aca | ||
![]() |
5a6302af59 | ||
![]() |
174861274b | ||
![]() |
718983a4d6 | ||
![]() |
a77e550bf9 | ||
![]() |
aac6a4526c | ||
![]() |
23842a8ec3 | ||
![]() |
422db313de | ||
![]() |
07bbe70baf | ||
![]() |
f46eafc9fd | ||
![]() |
86df2520ad | ||
![]() |
640e0ea34d | ||
![]() |
cd03c511a5 | ||
![]() |
98533ede13 | ||
![]() |
09dedd0f22 | ||
![]() |
639f5b2d20 | ||
![]() |
e758f4ec26 | ||
![]() |
aae1a3564d | ||
![]() |
68e29df2ae | ||
![]() |
183643d77b | ||
![]() |
d8838363b8 | ||
![]() |
a0877fd57c | ||
![]() |
271b37885f | ||
![]() |
00b32a0996 | ||
![]() |
75979cc4d5 | ||
![]() |
cf41f41b16 | ||
![]() |
12ad2c7368 | ||
![]() |
86b21dacfd | ||
![]() |
7ce343c28f | ||
![]() |
fc3e85f449 | ||
![]() |
fb32408ba1 | ||
![]() |
32eec624a1 | ||
![]() |
8122ae4739 | ||
![]() |
49cce9b2fc | ||
![]() |
bded737c3c | ||
![]() |
a94b317150 | ||
![]() |
6d34f86c51 | ||
![]() |
6dfd962a13 | ||
![]() |
89cfd41c5f | ||
![]() |
9fbd19b2ca | ||
![]() |
1577a366e0 | ||
![]() |
19506ea323 | ||
![]() |
b0d321d729 | ||
![]() |
a63648b769 | ||
![]() |
cfe5f8e518 | ||
![]() |
56f842dd6d | ||
![]() |
95c8d078f1 | ||
![]() |
4b3d3f6ea6 | ||
![]() |
d783787ceb | ||
![]() |
1ef9a1151d | ||
![]() |
baa586a6f7 | ||
![]() |
c0454fbd02 | ||
![]() |
03fb897717 | ||
![]() |
43cd295b0c | ||
![]() |
80b2d00c7a | ||
![]() |
83e4059cea | ||
![]() |
92a250cdb3 | ||
![]() |
1a52368f79 | ||
![]() |
cbc0e2527a | ||
![]() |
52f8f9beb4 | ||
![]() |
3f110dabed | ||
![]() |
5af4dde3f3 | ||
![]() |
10880e10f1 |
71
.travis.yml
71
.travis.yml
@@ -1,30 +1,18 @@
|
||||
language: cpp
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
osx_image: xcode7
|
||||
|
||||
env:
|
||||
matrix:
|
||||
# Uncomment when Travis upgraded "Ubuntu 12.04 LTS" to a newer version whose repo will have a more up-to-date libtorrent package
|
||||
#- lt_branch=dist gui=true
|
||||
#- lt_branch=dist gui=false
|
||||
- lt_branch=RC_1_0 gui=true qt=4
|
||||
- lt_branch=RC_1_0 gui=true qt=5
|
||||
- lt_branch=RC_1_0 gui=false qt=4
|
||||
- lt_branch=RC_1_0 gui=false qt=5
|
||||
- lt_branch=RC_0_16 gui=true
|
||||
- lt_branch=RC_0_16 gui=false
|
||||
- lt_branch=RC_1_0 gui=true
|
||||
- lt_branch=RC_1_0 gui=false
|
||||
global:
|
||||
- secure: "OI9CUjj4lTb0HwwIZU5PbECU3hLlAL6KC8KsbwohG8/O3j5fLcnmDsK4Ad9us5cC39sS11Jcd1kDP2qRcCuST/glVNhLkcjKkiQerOfd5nQ/qL4JYfz/1mfP5mdpz9jHKzpLUIG+TXkbSTjP6VVmsb5KPT+3pKEdRFZB+Pu9+J8="
|
||||
- coverity_branch: coverity_scan
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
- os: linux
|
||||
env: lt_branch=RC_1_0 gui=true qt=5
|
||||
- os: linux
|
||||
env: lt_branch=RC_1_0 gui=false qt=5
|
||||
|
||||
branches:
|
||||
except:
|
||||
- search_encoding_windows
|
||||
@@ -37,7 +25,6 @@ notifications:
|
||||
|
||||
# container-based builds
|
||||
sudo: false
|
||||
# TODO: osx builder does not enable cache yet, see: https://github.com/travis-ci/travis-ci/issues/4011
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.ccache
|
||||
@@ -47,75 +34,63 @@ addons:
|
||||
project:
|
||||
name: "qbittorrent/qBittorrent"
|
||||
description: "Build submitted via Travis CI"
|
||||
build_command_prepend: "./bootstrap.sh && ./configure $qbtconf && echo QMAKE_CC=$CC >> conf.pri && echo QMAKE_CXX=$CXX >> conf.pri"
|
||||
build_command_prepend: "./bootstrap.sh && ./configure $qbtconf"
|
||||
build_command: make
|
||||
branch_pattern: $coverity_branch
|
||||
notification_email: sledgehammer999@qbittorrent.org
|
||||
apt:
|
||||
sources:
|
||||
# sources list: https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
|
||||
- ubuntu-toolchain-r-test
|
||||
- boost-latest
|
||||
packages:
|
||||
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
|
||||
- autoconf
|
||||
- automake
|
||||
- colormake
|
||||
- g++-4.8
|
||||
- libssl-dev
|
||||
- libboost1.55-dev
|
||||
- libboost-system1.55-dev
|
||||
- libboost-dev
|
||||
- libboost-system-dev
|
||||
- libgeoip-dev
|
||||
- libqt4-dev
|
||||
# Uncomment when Travis upgraded "Ubuntu 12.04 LTS" to a newer version whose repo will have a more up-to-date libtorrent package
|
||||
#- libtorrent-rasterbar6
|
||||
#- libboost-filesystem-dev
|
||||
|
||||
before_install:
|
||||
# Only allow specific build for coverity scan, others will stop
|
||||
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ] && ! [ "$TRAVIS_OS_NAME" = "linux" -a "$lt_branch" = "RC_1_0" -a "$gui" = true ]; then exit ; fi
|
||||
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ] && ! [[ "$lt_branch" == "RC_1_0" && "$gui" == "true" ]]; then exit ; fi
|
||||
|
||||
- shopt -s expand_aliases
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CC=gcc-4.8 CXX=g++-4.8 ; fi
|
||||
- if [ "$TRAVIS_BRANCH" != "$coverity_branch" -a "$TRAVIS_OS_NAME" = "linux" ]; then dpkg-query -L ccache && export PATH="/usr/lib/ccache/:$PATH" ; fi
|
||||
- if ! [ "$TRAVIS_BRANCH" = "$coverity_branch" ]; then dpkg-query -L ccache && export PATH="/usr/lib/ccache/:$PATH" ; fi
|
||||
- alias make="colormake -j3" # Using nprocs/2 sometimes may fail (gcc is killed by system)
|
||||
|
||||
- libt_path="$HOME/libt_install"
|
||||
- qbt_path="$HOME/qbt_install"
|
||||
- ltconf="$ltconf --prefix="$libt_path" --disable-geoip"
|
||||
- qbtconf="$qbtconf --prefix="$qbt_path" --with-qt4 PKG_CONFIG_PATH="$libt_path/lib/pkgconfig":$PKG_CONFIG_PATH"
|
||||
- ltconf="$ltconf --prefix="$libt_path" --with-libgeoip=system"
|
||||
- qbtconf="$qbtconf --prefix="$qbt_path" PKG_CONFIG_PATH="$libt_path/lib/pkgconfig":$PKG_CONFIG_PATH"
|
||||
|
||||
# Options for specific branches
|
||||
- if [[ "$lt_branch" == "RC_0_16" ]]; then qbtconf="$qbtconf --with-libtorrent-rasterbar0.16" ; fi
|
||||
# Also setup a virtual display for after_success target when gui == true
|
||||
- if [ "$gui" = false ]; then qbtconf="$qbtconf --disable-gui" ;
|
||||
elif [ "$TRAVIS_OS_NAME" = "linux" ]; then export "DISPLAY=:99.0" && /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16 ;
|
||||
fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then qbtconf="$qbtconf --disable-qt-dbus" ; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$qt" = 5 ]; then qbtconf="$qbtconf --with-qt4=no" ; fi
|
||||
- if ! $gui; then qbtconf="$qbtconf --disable-gui" ; else export "DISPLAY=:99.0" && /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16 ; fi
|
||||
|
||||
# Print settings
|
||||
- echo $lt_branch
|
||||
- echo $gui
|
||||
- echo $ltconf
|
||||
- echo $qbtconf
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ccache -V && ccache --show-stats && ccache --zero-stats ; fi
|
||||
- ccache -V && ccache --show-stats && ccache --zero-stats
|
||||
|
||||
install:
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$lt_branch" != "dist" ]; then cd "$HOME" && pwd && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch ; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$lt_branch" != "dist" ]; then cd libtorrent && ./autotool.sh && ./configure $ltconf && make install && cd "$TRAVIS_BUILD_DIR" ; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update > /dev/null && brew install colormake libtorrent-rasterbar; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$qt" = 4 ]; then brew install qt; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$qt" = 5 ]; then brew install qt5 && brew link --force qt5; fi
|
||||
- if ! [ "$lt_branch" == "dist" ]; then cd "$HOME" && pwd && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch --single-branch ; fi
|
||||
- if ! [ "$lt_branch" == "dist" ]; then cd libtorrent && ./autotool.sh && ./configure $ltconf && make install && cd "$TRAVIS_BUILD_DIR" ; fi
|
||||
|
||||
script:
|
||||
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ]; then exit ; fi # Skip usual build when running coverity scan
|
||||
- ./bootstrap.sh && ./configure $qbtconf
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then echo QMAKE_CC=$CC >> conf.pri && echo QMAKE_CXX=$CXX >> conf.pri ; fi
|
||||
- make && make install
|
||||
- make install
|
||||
|
||||
after_success:
|
||||
- if [ "$gui" = true ]; then qbt_exe="qbittorrent" ; else qbt_exe="qbittorrent-nox" ; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd "$qbt_path/bin" && export LD_PRELOAD="$libt_path/lib/libtorrent-rasterbar.so:$LD_PRELOAD" ; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cd "src/$qbt_exe.app/Contents/MacOS" ; fi
|
||||
- ./$qbt_exe --version
|
||||
- cd "$qbt_path/bin"
|
||||
- export LD_PRELOAD="$libt_path/lib/libtorrent-rasterbar.so:$LD_PRELOAD"
|
||||
- if $gui ; then ./qbittorrent --version ; else ./qbittorrent-nox --version ; fi
|
||||
|
||||
after_script:
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ccache --show-stats ; fi
|
||||
- ccache --show-stats
|
||||
|
@@ -1,7 +1,7 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[qbittorrent.qbittorrent_v3_3_x]
|
||||
[qbittorrent.qbittorrent_v3_2_x]
|
||||
file_filter = src/lang/qbittorrent_<lang>.ts
|
||||
source_file = src/lang/qbittorrent_en.ts
|
||||
source_lang = en
|
||||
|
@@ -10,20 +10,18 @@ int myFunction(int a)
|
||||
//code
|
||||
}
|
||||
|
||||
void myFunction() {} // empty body
|
||||
|
||||
MyClass::MyClass(int *parent)
|
||||
myClass::myClass(int *parent)
|
||||
: m_parent(parent)
|
||||
{
|
||||
//initialize
|
||||
//initialiaze
|
||||
}
|
||||
|
||||
int MyClass::myMethod(int a)
|
||||
int myClass::myMethod(int a)
|
||||
{
|
||||
//code
|
||||
}
|
||||
|
||||
class MyOtherClass
|
||||
class myOtherClass
|
||||
{
|
||||
public:
|
||||
//code
|
||||
@@ -33,18 +31,10 @@ private:
|
||||
//code
|
||||
};
|
||||
|
||||
namespace Name
|
||||
namespace id
|
||||
{
|
||||
//code
|
||||
}
|
||||
|
||||
// Lambdas
|
||||
[](int arg1, int arg2) -> bool { return arg1 < arg2; }
|
||||
|
||||
[this](int arg)
|
||||
{
|
||||
this->acc += arg;
|
||||
}
|
||||
```
|
||||
|
||||
#### b. Other code blocks ####
|
||||
@@ -85,12 +75,6 @@ default:
|
||||
}
|
||||
```
|
||||
|
||||
#### d. single-line blocks (lambdas, initializer lists etc.) ####
|
||||
```c++
|
||||
{} // empty - space before {
|
||||
{ body } // spaces around { and before }
|
||||
```
|
||||
|
||||
### 2. If blocks ###
|
||||
#### a. Multiple tests ####
|
||||
```c++
|
||||
@@ -135,16 +119,16 @@ Generally it will depend on the particular piece of code and would be determined
|
||||
|
||||
### 4. File encoding and line endings.###
|
||||
|
||||
UTF-8 and Unix-like line ending (LF). Unless some platform specific files need other encodings/line endings.
|
||||
UTF-8 and Unix-like line ending (LF). Unless some platform speficic files need other encodings/line endings.
|
||||
|
||||
### 5. Initialization lists.###
|
||||
Initialization lists should be vertical. This will allow for more easily readable diffs. The initialization colon should be indented and in its own line along with first argument. The rest of the arguments should be indented too and have the comma prepended.
|
||||
Initialization lists should be vertical. This will allow for more easily readable diffs. The inilization colon should be indented and in its own line along with first argument. The rest of the arguments should be indented too and have the comma prepended.
|
||||
```c++
|
||||
myClass::myClass(int a, int b, int c, int d)
|
||||
: m_a(a)
|
||||
, m_b(b)
|
||||
, m_c(c)
|
||||
, m_d(d)
|
||||
: priv_a(a)
|
||||
, priv_b(b)
|
||||
, priv_c(c)
|
||||
, priv_d(d)
|
||||
{
|
||||
//code
|
||||
}
|
||||
@@ -153,7 +137,7 @@ myClass::myClass(int a, int b, int c, int d)
|
||||
### 6. Enums.###
|
||||
Enums should be vertical. This will allow for more easily readable diffs. The members should be indented.
|
||||
```c++
|
||||
enum Days
|
||||
enum days
|
||||
{
|
||||
Monday,
|
||||
Tuesday,
|
||||
@@ -165,41 +149,7 @@ enum Days
|
||||
};
|
||||
```
|
||||
|
||||
### 7. Names.###
|
||||
All names should be camelCased.
|
||||
|
||||
#### a. Type names and namespaces ####
|
||||
Type names and namespaces start with Upper case letter (except POD types).
|
||||
```c++
|
||||
class ClassName {}
|
||||
|
||||
struct StructName {}
|
||||
|
||||
enum EnumName {}
|
||||
|
||||
typedef QList<ClassName> SomeList;
|
||||
|
||||
namespace NamespaceName
|
||||
{
|
||||
}
|
||||
```
|
||||
|
||||
#### b. Variable names ####
|
||||
Variable names start with lower case letter.
|
||||
```c++
|
||||
int myVar;
|
||||
```
|
||||
|
||||
#### c. Private member variable names ####
|
||||
Private member variable names start with lower case letter and should have ```m_``` prefix.
|
||||
```c++
|
||||
class MyClass
|
||||
{
|
||||
int m_myVar;
|
||||
}
|
||||
```
|
||||
|
||||
### 8. Misc.###
|
||||
### 7. Misc.###
|
||||
|
||||
* Line breaks for long lines with operation:
|
||||
|
||||
|
@@ -1,36 +0,0 @@
|
||||
# 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
|
||||
* **Patience**. 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:
|
||||
|
||||
|
||||
# Opening a pull request
|
||||
|
||||
### Must read
|
||||
* Read our [**coding guidelines**](https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md). There are some scripts to help you: [uncrustify script](https://gist.github.com/sledgehammer999/1cb1d9224d7fec8fa632), [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 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).
|
232
Changelog
232
Changelog
@@ -1,78 +1,162 @@
|
||||
* Tue Dec 08 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.1
|
||||
- FEATURE: New "Set as default label" option in Add torrent dialog. (takiz)
|
||||
- FEATURE: Support wildcards for filtering torrent list and torrent content (vlakoff)
|
||||
- BUGFIX: Fix -1 is displayed instead of the infinity symbol (Chocobo1)
|
||||
- BUGFIX: Fix scan dirs settings saving. Closes #4254, #4239, #4187. (glassez)
|
||||
- BUGFIX: Exported torrents now use name instead of hash. Closes #4205. (glassez)
|
||||
- BUGFIX: Improve upgrade to v3.3.0. Now undownloaded magnets will be migrated too. Fixes #4195. (glassez)
|
||||
- BUGFIX: Fix wrong encoding for listen failed error message. (glassez)
|
||||
- BUGFIX: Fix RSS not automarking articles as read. (glassez)
|
||||
- BUGFIX: Fix possible deadlock during application exit. (sledgehammer999)
|
||||
- WEBUI: Cookies support on WebUI when downloading torrent from a URL. (Naikel Aparicio)
|
||||
- WEBUI: Modified download and upload windows to allow autocompletion of browsers. (Naikel Aparicio)
|
||||
- WEBUI: Fixed the spinner in the WebUI upload page. (Naikel Aparicio)
|
||||
- WEBUI: Modified height of the WebUI download page. (Naikel Aparicio)
|
||||
- WEBUI: Fixed all the JavaScript functions for download and upload pages. (Naikel Aparicio)
|
||||
- WEBUI: Add seeds tab to WebUI (buinsky)
|
||||
- WEBUI: Bump WebUI API_VERSION.
|
||||
- COSMETIC: Cleanup "Trackers", "Peers", "HTTP Sources", "Speed" and "Content" page layout (Chocobo1)
|
||||
- COSMETIC: Reduce mainwindow border width (Chocobo1)
|
||||
- COSMETIC: Use QLineEdit built-in ClearButton (Qt5 only) (Chocobo1)
|
||||
- COSMETIC: Change text description for half-open connection (Chocobo1)
|
||||
- OTHER: Change update URL to FossHub. Closes #4188. (sledgehammer999)
|
||||
|
||||
* Sat Oct 31 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.5
|
||||
- BUGFIX: Fix difficult to reproduce crash. (glassez)
|
||||
- OTHER: Fix Windows' Qt5 build. (Gelmir)
|
||||
|
||||
* Sun Nov 29 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.0
|
||||
- FEATURE: Huge core code refactoring. Problems with labels, temp folders etc should be eliminated. Smoother UI should be observed too. (glassez)
|
||||
- FEATURE: Speed graph (Anton Lashkov)
|
||||
- FEATURE: Add multiple peers in Peers addition dialog. Closes #1563, #2245, #3133, #1419, #3287, #1419 (ngosang)
|
||||
- FEATURE: Allow to copy all peers with a keyboard shortcut (ngosang)
|
||||
- FEATURE: Use GeoIP2 database, allows for country resolution of IPv6 peers. It is no longer embedded in the program but downloaded and updated monthly. (glassez)
|
||||
- FEATURE: Add more "Run External Program" parameters, closes #3053, #238, #1291, #1522. (Chocobo1, glassez)
|
||||
- FEATURE: Add an option to allow the use of proxies only for torrents. Closes #2701. (pmzqla)
|
||||
- FEATURE: Detect network interface state changes. It should detect VPN connection resets. (Pawel Polewicz)
|
||||
- FEATURE: Switch to using c++11 (glassez)
|
||||
- FEATURE: Automatically add trackers to new downloads. (ngosang)
|
||||
- FEATURE: You can now choose the path to download for watched folders. (dsimakov, sledgehammer999)
|
||||
- FEATURE: Switch to Qt5 by default.
|
||||
- BUGFIX: Fix progress calculation in Content tab. Closes #2639 Closes #2752 (ngosang)
|
||||
- BUGFIX: Fix label filter. Closes #3429. (glassez)
|
||||
- BUGFIX: Fix "Run External Program Launches too Early" issue, closes #2107. (Chocobo1)
|
||||
- BUGFIX: Don't remove torrent contents parent folder, even it is empty. Closes #2244. (Chocobo1)
|
||||
- BUGFIX: Always apply filter for manually banned IPs. Related #3988. (sledgehammer999)
|
||||
- BUGFIX: Fix reporting of tracker status. Closes #3101. (sledgehammer999)
|
||||
- BUGFIX: Don't connect to "any interface" when the configured network interface is missing. Closes #3943, #2741, #1159, #844 and #143. (sledgehammer999)
|
||||
- BUGFIX: Fix reordering of first column with Qt5. Closes #2835. (sledgehammer999)
|
||||
- COSMETIC: Add back "qBittorrent" in program updater title, closes #3549. (Chocobo1)
|
||||
- COSMETIC: Use infinity symbol rather than -1 for nb_connections (pmzqla)
|
||||
- COSMETIC: Move uTP options to it's own section (Chocobo1)
|
||||
- COSMETIC: Fix availability bar & progress bar height being too small on high DPI displays (Chocobo1)
|
||||
- COSMETIC: Fix availability label & progress label clipped on high DPI displays, closes #3237. (Chocobo1)
|
||||
- COSMETIC: Add tooltips/legend for availability bar & progress bar (Chocobo1)
|
||||
- COSMETIC: Use theme color for background in PropertiesWidget (Chocobo1)
|
||||
- COSMETIC: Replace horizontal line with border in bottom panel (Chocobo1)
|
||||
- COSMETIC: Various visual changes in the side panel. (Chocobo1)
|
||||
- COSMETIC: Use thin border for transfer list (Chocobo1)
|
||||
- COSMETIC: Make URL in "Add Torrent File..." clickable. Closes #3928. (Chocobo1)
|
||||
- COSMETIC: New view for errored torrents. (sledgehammer999)
|
||||
- WEBUI: Add information in General tab (ngosang)
|
||||
- WEBUI: Reorder "Super seeding mode" option in right click menu (ngosang)
|
||||
- WEBUI: Clean up JavaScript code (ngosang)
|
||||
- WEBUI: Added labels support. #648 (Felipe Barriga Richards, ngosnag)
|
||||
- WEBUI: Fix accessing the WebUI through IPv6 (ngosang)
|
||||
- WEBUI: Bump WebUI API_VERSION to 6.
|
||||
- WEBUI: Change selected color to differentiate from the progressbar. (Daniel Peukert, ngosang)
|
||||
- SEARCH: Add "Copy description page URL" button in search tab. Closes #2371. (pmzqla)
|
||||
- SEARCH: Add https_proxy env variable. This forces Python to use the HTTP proxy for HTTPS connections. (pmzqla)
|
||||
- SEARCH: Detect new plugin URL from clipboard (ngosang)
|
||||
- SEARCH: Update Torrentz trackers (ngosang)
|
||||
- WINDOWS: Fix german translation of the installer (netswap)
|
||||
- NOX: Don't ask the user questions in nox build when in non-interactive mode. Closes #3875. (sledgehammer999)
|
||||
- OTHER: Fixed typos, spelling correction (dartraiden)
|
||||
- OTHER: Fix need for restart to enable/disable peer countries resolution. (glassez)
|
||||
- OTHER: Unload the GeoIP db when disabled. (sledgehammer999)
|
||||
- OTHER: Reduce max value of "Disk cache size" to 1536MB for 32bit. Closes to #4028. (Chocobo1)
|
||||
- OTHER: Make "Download in sequential order" and "Download first and last piece first" options independent. (glassez)
|
||||
* Sat Oct 10 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.4
|
||||
- FEATURE: Select the file of single file torrents when opening destination folder (pmzqla)
|
||||
- BUGFIX: Fix crash with invalid favicon. Closes #3632. (glassez)
|
||||
- BUGFIX: Try to download favicon.png when the download of favicon.ico fails (pmzqla)
|
||||
- BUGFIX: Try to avoid loading a corrupted configuration file. Also log errors encountered while saving/loading the configuration. Closes #3503. (sledgehammer999)
|
||||
- BUGFIX: Allow adding torrent link from Torcache (jsayol)
|
||||
- BUGFIX: Don't limit the number of torrents that can be announced to the tracker/dht/lsd. Closes #3473. (sledgehammer999)
|
||||
- BUGFIX: Fix potential crash when memory allocation failed. Closes #3877. (Chocobo1)
|
||||
- COSMETIC: Change Queue buttons order in the Toolbar (GUI & Web UI) (ngosang)
|
||||
- COSMETIC: Move option "Ignore transfer limits on local network" to Speed page (Chocobo1)
|
||||
- COSMETIC: Move option "Confirm torrent deletion" to Behavior page (Chocobo1)
|
||||
- COSMETIC: Fix typos. Make `μTP` untranslatable. Use American variation of words. Closes #3654. (sledgehammer999)
|
||||
- COSMETIC: Optimize text color for dark themes. Closes #3633 and #3815. (sledgehammer999)
|
||||
- COSMETIC: Show current label in the torrent context menu. Closes #3776. (sledgehammer999)
|
||||
- WEBUI: Add save_path to /query/torrents (Casey Bodley)
|
||||
- WEBUI: Bump API_VERSION to 5
|
||||
- SEARCH: Fix python detection when the 'Anaconda' software is installed. Closes #3731. (sledgehammer999)
|
||||
- RSS: Handle magnet links as torrents instead of news URLs. Closes #3560 (ngosang)
|
||||
- RSS: Trim elements text in RSS articles (ngosang)
|
||||
- RSS: Fix contextual menu in RSS torrents list (ngosang)
|
||||
- RSS: Improve error handling when a RSS feed doesn't contain torrents (ngosang)
|
||||
- RSS: More precise message and code simplification in RSS feeds deletion (ngosang)
|
||||
- RSS: Don't hide the elements in Unread list when clicked (ngosang)
|
||||
- RSS: Allow multiple selection in RSS torrents list (ngosang)
|
||||
- RSS: Simplify string translation (ngosang)
|
||||
- RSS: Handle more types of RSS feeds (ngosang)
|
||||
- RSS: Fix RSS panel position not saved (ngosang)
|
||||
- RSS: Fix forgetting label changes to first item in RSS rule list. (Gelmir)
|
||||
- RSS: Add label to UI when a new one is creating during rule addition. (Gelmir)
|
||||
- RSS: Removes refresh message when adding a new feed (ngosang)
|
||||
- RSS: Fix RSS crash when deleting RSS feeds. Closes #997, #2152, #2461, #3718, #3747, #3766, #3806, #3814, #3829 and #3846. (ngosang)
|
||||
- RSS: Sort labels in RSS Downloader dialog, closes #3140. (Chocobo1)
|
||||
- WINDOWS: Correctly show german letters in the installer. Closes #3574, #3566. (sledgehammer999)
|
||||
- WINDOWS: Fix file selection on Explorer when the filename contains weird characters. Closes #3185. (sledgehammer999)
|
||||
- WINDOWS: Fix wrong default download directory in Windows. Closes #2625. (Chocobo1)
|
||||
- WINDOWS: Fix German translation of the installer. (netswap)
|
||||
- LINUX: Fix broken .desktop file icon for some locales. See #3905. (sledgehammer999)
|
||||
- OTHER: Fix ppc64le detection during configure (sledgehammer999)
|
||||
- OTHER: Don't use sed in configure. Closes #3169. (pmzqla)
|
||||
- OTHER: Fix broken donation link. Closes #3771. (sledgehammer999)
|
||||
- OTHER: Add forum link in README. Closes #3853. (sledgehammer999)
|
||||
- OTHER: New translation: Esperanto
|
||||
- OTHER: Fix Qt5 nox build on non-Windows. (sledgehammer999)
|
||||
|
||||
* Sun Aug 02 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.3
|
||||
- BUGFIX: Fix crash when closing a search tab while search is running (pmzqla)
|
||||
- SEARCH: Other minor search fixes and improvements (pmzqla)
|
||||
|
||||
* Sat Aug 01 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.2
|
||||
- FEATURE: Allow to force reannounce DHT too (Chocobo1)
|
||||
- FEATURE: Implement an option to disable confirmation of torrent recheck (blaxspirit)
|
||||
- FEATURE: Allow to copy all the trackers with a keyboard shortcut (pmzqla)
|
||||
- BUGFIX: Fix torrent renaming. Closes #3398 (ngosang)
|
||||
- BUGFIX: Fix localhost address (::ffff:127.0.0.1) is not recognized when connecting to WebUI (Chocobo1)
|
||||
- BUGFIX: Fix '&' character in label name becomes accelerator key, closes #3454. (Chocobo1)
|
||||
- BUGFIX: Fix HTTP header parsing when torrent filename contains a semicolon. Closes #3511.
|
||||
- BUGFIX: Fix installing search plugin from local file. (sledgehammer999)
|
||||
- BUGFIX: Fix installing search plugin by drag-n-dropping file. (sledgehammer999)
|
||||
- COSMETIC: Update color scheme of completed.png icon. (sledgehammer999)
|
||||
- COSMETIC: Fix printing of the copyright symbol in the About dialog. (sledgehammer999)
|
||||
- COSMETIC: Minor changes in Preview File dialog (ngosang)
|
||||
- COSMETIC: Add Force Resume icon (ngosang)
|
||||
- COSMETIC: Add count of unread items to RSS tab label (pmzqla)
|
||||
- WEBUI: Ports between 1 and 65535 as in the GUI. Closes #1602 (ngosang)
|
||||
- WEBUI: Fix an error in Content tab when the torrent doesn't have metadata (ngosang)
|
||||
- WEBUI: New option Web UI port UPNP. Closes #3358 (ngosang)
|
||||
- WEBUI: Fix API Content Types. Closes #3393 (ngosang)
|
||||
- WEBUI: Fix empty trackers addition (ngosang)
|
||||
- WEBUI: Torrent download from hash. Closes #1173 (ngosang)
|
||||
- WEBUI: Fix sort by queue number (ngosang)
|
||||
- WEBUI: Open external links in a new window/tab (ngosang)
|
||||
- WEBUI: Massive increase in performance. (ngosang)
|
||||
- SEARCH: Search status per tab (DoumanAsh)
|
||||
- SEARCH: Remove the word 'torrent' in ExtraTorrent results (ngosang)
|
||||
- SEARCH: Prefer python3 over python2 on Linux and OS X (pmzqla)
|
||||
- SEARCH: Show notification if Python is not found and a search is started (pmzqla)
|
||||
- SEARCH: Update link to the Windows Python installer (pmzqla)
|
||||
- SEARCH: Improve checks for python. Print python version and path to log. (sledgehammer999)
|
||||
- SEARCH: Improve Python detection (ngosang)
|
||||
- OTHER: Improvements on the build system (Chocobo1)
|
||||
- OTHER: Bump minimum libtorrent version required to 1.0.6/0.16.19. (sledgehammer999)
|
||||
- OTHER: New translation: Slovenian
|
||||
|
||||
* Sat Jul 11 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.1
|
||||
- FEATURE: Change default preferences (ngosang)
|
||||
- FEATURE: Add "Add link to torrent" menu in TrayIconMenu. Closes #2918. (Chocobo1)
|
||||
- FEATURE: Allow to Open files from the properties pane by pressing "Enter" (pmzqla)
|
||||
- FEATURE: Add checkbox option for IpFilterTrackers. (Chocobo1)
|
||||
- FEATURE: Download-from-URL textbox change focus on tab key (Mayank Asthana)
|
||||
- FEATURE: Increase priority value of "High" (pmzqla)
|
||||
- FEATURE: Add 16 KiB, 8 MiB and 16 MiB piece sizes in Torrent Creator (ngosang)
|
||||
- BUGFIX: Disable Auto piece size when creating a new torrent (ngosang)
|
||||
- BUGFIX: Set default focus to cancel button in delete confirm dlg, closes #3085 (Chocobo1)
|
||||
- BUGFIX: Set default focus to ok button in add new torrent dlg (Chocobo1)
|
||||
- BUGFIX: Set default focus to no button in exit confirm box (Chocobo1)
|
||||
- BUGFIX: Fix Start Minimized checkbox in Options (ngosang)
|
||||
- BUGFIX: Remove limits on alternative speeds setting (LazyBui)
|
||||
- BUGFIX: Fix sorting torrents by ETA (pmzqla)
|
||||
- BUGFIX: Improve ratio calculation formula. Closes #3096. (Chocobo1)
|
||||
- BUGFIX: Clear missing files flag when resuming or force rechecking. Fixes issues in #2750. (sledgehammer999)
|
||||
- BUGFIX: Delete tempfile when downloading favicon.ico. Closes #3257. (sledgehammer999)
|
||||
- BUGFIX: Don't close downloadFromURL dialog when showing empty url warning (Chocobo1)
|
||||
- BUGFIX: Minimize to tray only if the relevant option is enabled. (sledgehammer999)
|
||||
- BUGFIX: Update disk space label after changing partition, closes #3309. (Chocobo1)
|
||||
- BUGFIX: Don't use a default upload limit. Closes #3275. (sledgehammer999)
|
||||
- BUGFIX: Fix Properties bar size when started minimized to tray. Closes #3206. (sledgehammer999)
|
||||
- COSMETIC: Change option text "Confirmation on exit when torrents are active" (Chocobo1)
|
||||
- COSMETIC: Enable to choose dark/light tray icons on all platforms. (Chocobo1)
|
||||
- COSMETIC: Use AllUppercase for label text (Chocobo1)
|
||||
- COSMETIC: changes in typography (ngosang)
|
||||
- COSMETIC: Menu revamp (Chocobo1)
|
||||
- COSMETIC: Revamp general tab info (Chocobo1)
|
||||
- COSMETIC: Better update message for users (Chocobo1)
|
||||
- COSMETIC: Fix ugly 'C++' wrapping in About dialog. (glassez)
|
||||
- WEBUI: Fix login and logout relative URLs (ngosang)
|
||||
- WEBUI: Fix resumeAll and pauseAll. Closes #3016 (ngosang)
|
||||
- WEBUI: Changes in title bar (ngosang)
|
||||
- WEBUI: Complete translatable strings (ngosang)
|
||||
- WEBUI: Minor changes in style (ngosang)
|
||||
- WEBUI: Fix Max connections and Time active in transfer information (ngosang)
|
||||
- WEBUI: New config - Global maximum number of upload slots (ngosang)
|
||||
- WEBUI: Display wasted data with friendly units. Closes #2994 (ngosang)
|
||||
- WEBUI: add delay in shutdown command in order to send out response msg (Chocobo1)
|
||||
- WEBUI: Option to hide Top Toolbar (ngosang)
|
||||
- WEBUI: Reorder the tabs/groups in Options window (ngosang)
|
||||
- WEBUI: Add new options (ngosang)
|
||||
- WEBUI: Increase API_VERSION due to changes in #3279, #3197, #3226 and #3040 (ngosang)
|
||||
- WEBUI: Add Web Seeds (HTTP Sources) tab (ngosang)
|
||||
- WEBUI: Don't update the tabs if tab's panel is collapsed (ngosang)
|
||||
- WEBUI: Fix alternative global rate limits. (ngosang)
|
||||
- SEARCH: Fix thepiratebay. Closes #3012 (ngosang)
|
||||
- SEARCH: Improve torrentz engine to return more results (ngosang)
|
||||
- SEARCH: Change width of columns in search tab. Closes #764 (ngosang)
|
||||
- SEARCH: Make strings translatable in seach engine (ngosang)
|
||||
- SEARCH: Aborting search engine process during closure. Close #2671 (DoumanAsh)
|
||||
- SEARCH: Perform searches in parallel (DoumanAsh)
|
||||
- SEARCH: Add Demonoid search engine (ngosang)
|
||||
- SEARCH: Minor fixes in search engines (ngosang)
|
||||
- SEARCH: Show the version of search engines (ngosang)
|
||||
- SEARCH: Update Legit Torrent to remove sgmllib (DoumanAsh)
|
||||
- SEARCH: Update KickassTorrents (ngosang)
|
||||
- SEARCH: Update BTDigg (ngosang)
|
||||
- SEARCH: Update Torrentz (ngosang)
|
||||
- SEARCH: Update ExtraTorrent (ngosang)
|
||||
- SEARCH: Update TorrentReactor (ngosang)
|
||||
- SEARCH: Fix Python 2 implementation of Torrentz (ngosang)
|
||||
- SEARCH: Cosmetic changes in search engine (ngosang)
|
||||
- SEARCH: Fix column sort in search engine. Closes #2621 (ngosang)
|
||||
- RSS: Update matching RSS articles while editing rules (pmzqla)
|
||||
- WINDOWS: Fix python detection from registry when multiple versions are installed (sledgehammer999)
|
||||
- LINUX: Fixes Linux issue for when the theme doesn't have a corresponding icon. (sledgehammer999)
|
||||
- OTHER: Correctly detect FreeBSD when configuring. (sledgehammer999, yurivict)
|
||||
- OTHER: Add translator to credits.
|
||||
- OTHER: New translation: Indonesian.
|
||||
- OTHER: Split Chinese locales into Chinese Simplified, Chinese Traditional(Taiwan), Chinese Traditional(Hong Kong). (sledgehammer999)
|
||||
|
||||
* Sun May 10 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.0
|
||||
- FEATURE: Show actual protocol for listen success/failure in the log. Needs libtorrent v1.0.0 (Gelmir)
|
||||
|
10
INSTALL
10
INSTALL
@@ -14,11 +14,15 @@ qBittorrent - A BitTorrent client in C++ / Qt4
|
||||
|
||||
- pkg-config executable
|
||||
|
||||
- libtorrent-rasterbar by Arvid Norberg (>= 1.0.6)
|
||||
- libtorrent-rasterbar by Arvid Norberg (>= 0.16.19 OR >= 1.0.6)
|
||||
-> http://www.libtorrent.net
|
||||
Be careful: another library (the one used by rTorrent) uses a similar name.
|
||||
|
||||
- libboost >= 1.35.x (libboost-system)
|
||||
- libboost 1.34.x (libboost-filesystem°) + libasio
|
||||
or
|
||||
- libboost >= 1.35.x (libboost-system, libboost-filesystem°)
|
||||
|
||||
°libboost-filesystem is not needed if libtorrent-rasterbar >= v0.16.x is used
|
||||
|
||||
- python >= 2.3 (needed by search engine)
|
||||
* Run time only dependency
|
||||
@@ -40,7 +44,7 @@ qBittorrent - A BitTorrent client in C++ / Qt4
|
||||
|
||||
- pkg-config executable
|
||||
|
||||
- libtorrent-rasterbar by Arvid Norberg (>= v1.0.6)
|
||||
- libtorrent-rasterbar by Arvid Norberg (>= 0.16.19 OR >= v1.0.6)
|
||||
-> http://www.libtorrent.net
|
||||
Be careful: another library (the one used by rTorrent) uses a similar name.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
qBittorrent - A BitTorrent client in Qt
|
||||
------------------------------------------
|
||||
|
||||
[](https://travis-ci.org/qbittorrent/qBittorrent)
|
||||
[](https://travis-ci.org/qbittorrent/qBittorrent)
|
||||
[](https://scan.coverity.com/projects/5494)
|
||||
********************************
|
||||
### Description:
|
||||
|
@@ -26,7 +26,7 @@ How to build
|
||||
First you need to create the conf.pri file in the same dir as this readme.os2 is.
|
||||
the conf.pri file has the following content:
|
||||
|
||||
##### conf.pri content begin #####
|
||||
##### conf.pri content beginn #####
|
||||
BINDIR = ./bin
|
||||
INCDIR = ./include
|
||||
LIBDIR = ./lib
|
||||
|
68
configure.ac
68
configure.ac
@@ -12,11 +12,23 @@ AM_INIT_AUTOMAKE
|
||||
|
||||
# Define --wth-* and --enable-* arguments
|
||||
|
||||
AC_ARG_WITH(qt4,
|
||||
[AS_HELP_STRING([--with-qt4],
|
||||
[Compile using Qt4 (default=no)])],
|
||||
AC_ARG_WITH(qt5,
|
||||
[AS_HELP_STRING([--with-qt5],
|
||||
[Compile using Qt5 (default=no)])],
|
||||
[],
|
||||
[with_qt4=no])
|
||||
[with_qt5=no])
|
||||
|
||||
AC_ARG_WITH(libtorrent-rasterbar0.16,
|
||||
[AS_HELP_STRING([--with-libtorrent-rasterbar0.16],
|
||||
[Compile using libtorrent-rasterbar 0.16.x series (default=no)])],
|
||||
[],
|
||||
[with_libtorrent_rasterbar0_16=no])
|
||||
|
||||
AC_ARG_WITH(geoip-database-embedded,
|
||||
[AS_HELP_STRING([--with-geoip-database-embedded],
|
||||
[Embed the GeoIP database in the qBittorrent executable (please follow instructions in src/gui/geoip/README) (default=no)])],
|
||||
[],
|
||||
[with_geoip_database_embedded=no])
|
||||
|
||||
AC_ARG_WITH(qtsingleapplication,
|
||||
[AS_HELP_STRING([--with-qtsingleapplication=@<:@system|shipped@:>@],
|
||||
@@ -95,6 +107,7 @@ AS_CASE(["x$enable_gui"],
|
||||
["xno"],
|
||||
[AC_MSG_RESULT([no])
|
||||
enable_qt_dbus=[no]
|
||||
enable_geoip_database=[no]
|
||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG nogui"],
|
||||
[AC_MSG_RESULT([$enable_gui])
|
||||
AC_MSG_ERROR([Unknown option "$enable_gui". Use either "yes" or "no".])])
|
||||
@@ -121,16 +134,16 @@ AS_CASE(["x$enable_webui"],
|
||||
[AC_MSG_RESULT([$enable_webui])
|
||||
AC_MSG_ERROR([Unknown option "$enable_webui". Use either "yes" or "no".])])
|
||||
|
||||
AC_MSG_CHECKING([whether Qt4 should be enabled])
|
||||
AS_CASE(["x$with_qt4"],
|
||||
AC_MSG_CHECKING([whether Qt5 should be enabled])
|
||||
AS_CASE(["x$with_qt5"],
|
||||
["xno"],
|
||||
[AC_MSG_RESULT([no])
|
||||
FIND_QT5()],
|
||||
FIND_QT4()],
|
||||
["xyes"],
|
||||
[AC_MSG_RESULT([yes])
|
||||
FIND_QT4()],
|
||||
[AC_MSG_RESULT([$with_qt4])
|
||||
AC_MSG_ERROR([Unknown option "$with_qt4". Use either "yes" or "no".])])
|
||||
FIND_QT5()],
|
||||
[AC_MSG_RESULT([$with_qt5])
|
||||
AC_MSG_ERROR([Unknown option "$with_qt5". Use either "yes" or "no".])])
|
||||
AS_IF([test "x$QT_QMAKE" = "x"],
|
||||
[AC_MSG_ERROR([Could not find qmake])
|
||||
])
|
||||
@@ -168,6 +181,34 @@ AS_IF([test "x$BOOST_SYSTEM_LIB" = "x"],
|
||||
[AC_MSG_NOTICE([Boost.System LIB: $BOOST_SYSTEM_LIB])
|
||||
LIBS="$BOOST_SYSTEM_LIB $LIBS"])
|
||||
|
||||
AC_MSG_CHECKING([whether to compile using libtorrent-rasterbar 0.16.x])
|
||||
AS_CASE(["x$with_libtorrent_rasterbar0_16"],
|
||||
["xno"],
|
||||
[AC_MSG_RESULT([no])
|
||||
PKG_CHECK_MODULES(libtorrent,
|
||||
[libtorrent-rasterbar >= 1.0.6],
|
||||
[CPPFLAGS="$libtorrent_CFLAGS $CPPFLAGS"
|
||||
LIBS="$libtorrent_LIBS $LIBS"])],
|
||||
["xyes"],
|
||||
[AC_MSG_RESULT([yes])
|
||||
PKG_CHECK_MODULES(libtorrent,
|
||||
[libtorrent-rasterbar >= 0.16.19],
|
||||
[CPPFLAGS="$libtorrent_CFLAGS $CPPFLAGS"
|
||||
LIBS="$libtorrent_LIBS $LIBS"])],
|
||||
[AC_MSG_RESULT([$with_libtorrent_rasterbar0_16])
|
||||
AC_MSG_ERROR([Unknown option "$with_libtorrent_rasterbar0_16". Use either "yes" or "no".])])
|
||||
|
||||
AC_MSG_CHECKING([whether to embed the GeoIP database])
|
||||
AS_CASE(["x$with_geoip_database_embedded"],
|
||||
["xno"],
|
||||
[AC_MSG_RESULT([no])
|
||||
QBT_REMOVE_DEFINES="$QBT_REMOVE_DEFINES WITH_GEOIP_EMBEDDED"],
|
||||
["xyes"],
|
||||
[AC_MSG_RESULT([yes])
|
||||
QBT_ADD_DEFINES="$QBT_ADD_DEFINES WITH_GEOIP_EMBEDDED"],
|
||||
[AC_MSG_RESULT([$with_geoip_database_embedded])
|
||||
AC_MSG_ERROR([Unknown option "$with_geoip_database_embedded". Use either "yes" or "no".])])
|
||||
|
||||
AC_MSG_CHECKING([which qtsingleapplication to use])
|
||||
AS_CASE(["x$with_qtsingleapplication"],
|
||||
["xshipped"],
|
||||
@@ -179,7 +220,7 @@ AS_CASE(["x$with_qtsingleapplication"],
|
||||
[AC_MSG_RESULT([$with_qtsingleapplication])
|
||||
AC_MSG_ERROR([Unknown option "$with_qtsingleapplication". Use either "system" or "shipped".])])
|
||||
|
||||
AS_IF([test "x$with_qt4" = "xyes"],
|
||||
AS_IF([test "x$with_qt5" = "xno"],
|
||||
[AC_MSG_CHECKING([which qjson to use])
|
||||
AS_CASE(["x$with_qjson"],
|
||||
["xshipped"],
|
||||
@@ -196,11 +237,6 @@ AS_IF([test "x$with_qt4" = "xyes"],
|
||||
AC_MSG_ERROR([Unknown option "$with_qjson". Use either "system" or "shipped".])])
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES(libtorrent,
|
||||
[libtorrent-rasterbar >= 1.0.6],
|
||||
[CPPFLAGS="$libtorrent_CFLAGS $CPPFLAGS"
|
||||
LIBS="$libtorrent_LIBS $LIBS"])
|
||||
|
||||
PKG_CHECK_MODULES(zlib,
|
||||
[zlib],
|
||||
[CPPFLAGS="$zlib_CFLAGS $CPPFLAGS"
|
||||
|
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>3.3.1</string>
|
||||
<string>3.2.5</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>qBit</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
|
7
dist/windows/README.txt
vendored
7
dist/windows/README.txt
vendored
@@ -11,7 +11,7 @@ TRANSLATORS:
|
||||
5. Save the files with utf8 encoding and BOM.
|
||||
6. Submit your changes: 1) as a pull request to the official git repo or
|
||||
2) open an issue to the bugtracker and attach them or 3) via email or
|
||||
4)the same way you provide the translations for qbt itself
|
||||
4)the same way you provide the tranlations for qbt itself
|
||||
|
||||
PACKAGERS:
|
||||
|
||||
@@ -41,10 +41,7 @@ installer-translations
|
||||
translations
|
||||
qt_ar.qm
|
||||
...
|
||||
(all the .qm files found in the 'translations' folder of your Qt install. Those files differ between Qt4 and Qt5.
|
||||
If you want to distribute Qt4 translations it is better to use the ones found in this repo under the path "dist/qt-translations".
|
||||
They contain extra languages not distributed via the official qt4 sources.
|
||||
Don't forget to edit the filelist in installer.nsi + uninstaller.nsi to include all your .qm files.)
|
||||
(all the .qm files found in dist/qt-translations in every source release)
|
||||
qt_zh_TW.qm
|
||||
installer.nsi
|
||||
license.txt
|
||||
|
@@ -3,7 +3,7 @@
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_GERMAN} "qBittorrent (erforderlich)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_GERMAN} "Verknüpfung auf dem Desktop erstellen"
|
||||
LangString inst_dekstop ${LANG_GERMAN} "Verknüpfung am Desktop erstellen"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_GERMAN} "Eintrag im Startmenü erstellen"
|
||||
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
|
||||
@@ -38,7 +38,7 @@ LangString remove_conf ${LANG_GERMAN} "Einstellungsdateien entfernen"
|
||||
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
|
||||
LangString remove_firewall ${LANG_GERMAN} "Regel in der Windows Firewall entfernen"
|
||||
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_GERMAN} "Entferne Regel aus der Windows Firewall"
|
||||
LangString remove_firewallinfo ${LANG_GERMAN} "Entferne Regel in der Windows Firewall"
|
||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_GERMAN} "Torrents und zwischengespeicherte Daten entfernen"
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
|
12
dist/windows/installer.nsi
vendored
12
dist/windows/installer.nsi
vendored
@@ -31,13 +31,13 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
|
||||
File "qbittorrent.pdb"
|
||||
File "qt.conf"
|
||||
File /oname=translations\qt_ar.qm "translations\qt_ar.qm"
|
||||
File /oname=translations\qt_bg.qm "translations\qt_bg.qm"
|
||||
File /oname=translations\qt_ca.qm "translations\qt_ca.qm"
|
||||
File /oname=translations\qt_cs.qm "translations\qt_cs.qm"
|
||||
File /oname=translations\qt_da.qm "translations\qt_da.qm"
|
||||
File /oname=translations\qt_de.qm "translations\qt_de.qm"
|
||||
File /oname=translations\qt_en.qm "translations\qt_en.qm"
|
||||
File /oname=translations\qt_es.qm "translations\qt_es.qm"
|
||||
File /oname=translations\qt_fa.qm "translations\qt_fa.qm"
|
||||
File /oname=translations\qt_eu.qm "translations\qt_eu.qm"
|
||||
File /oname=translations\qt_fi.qm "translations\qt_fi.qm"
|
||||
File /oname=translations\qt_fr.qm "translations\qt_fr.qm"
|
||||
File /oname=translations\qt_gl.qm "translations\qt_gl.qm"
|
||||
@@ -47,15 +47,17 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
|
||||
File /oname=translations\qt_ja.qm "translations\qt_ja.qm"
|
||||
File /oname=translations\qt_ko.qm "translations\qt_ko.qm"
|
||||
File /oname=translations\qt_lt.qm "translations\qt_lt.qm"
|
||||
File /oname=translations\qt_nl.qm "translations\qt_nl.qm"
|
||||
File /oname=translations\qt_pl.qm "translations\qt_pl.qm"
|
||||
File /oname=translations\qt_pt.qm "translations\qt_pt.qm"
|
||||
File /oname=translations\qt_pt_BR.qm "translations\qt_pt_BR.qm"
|
||||
File /oname=translations\qt_ru.qm "translations\qt_ru.qm"
|
||||
File /oname=translations\qt_sk.qm "translations\qt_sk.qm"
|
||||
File /oname=translations\qt_sl.qm "translations\qt_sl.qm"
|
||||
File /oname=translations\qt_sk.qm "translations\qt_sk.qm"
|
||||
File /oname=translations\qt_sv.qm "translations\qt_sv.qm"
|
||||
File /oname=translations\qt_tr.qm "translations\qt_tr.qm"
|
||||
File /oname=translations\qt_uk.qm "translations\qt_uk.qm"
|
||||
File /oname=translations\qt_zh_CN.qm "translations\qt_zh_CN.qm"
|
||||
File /oname=translations\qt_zh_TW.qm "translations\qt_zh_TW.qm"
|
||||
File /oname=translations\qt_zh_TW.qm "translations\qt_zh_TW.qm"
|
||||
|
||||
; Write the installation path into the registry
|
||||
WriteRegStr HKLM "Software\qBittorrent" "InstallLocation" "$INSTDIR"
|
||||
|
2
dist/windows/options.nsi
vendored
2
dist/windows/options.nsi
vendored
@@ -19,7 +19,7 @@ XPStyle on
|
||||
!define CSIDL_APPDATA '0x1A' ;Application Data path
|
||||
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
|
||||
|
||||
!define PROG_VERSION "3.3.1"
|
||||
!define PROG_VERSION "3.2.5"
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
|
||||
!define MUI_FINISHPAGE_RUN_TEXT $(launch_qbt)
|
||||
|
8
dist/windows/uninstaller.nsi
vendored
8
dist/windows/uninstaller.nsi
vendored
@@ -6,12 +6,13 @@
|
||||
Delete "$INSTDIR\qbittorrent.pdb"
|
||||
Delete "$INSTDIR\qt.conf"
|
||||
Delete "$INSTDIR\translations\qt_ar.qm"
|
||||
Delete "$INSTDIR\translations\qt_bg.qm"
|
||||
Delete "$INSTDIR\translations\qt_ca.qm"
|
||||
Delete "$INSTDIR\translations\qt_cs.qm"
|
||||
Delete "$INSTDIR\translations\qt_da.qm"
|
||||
Delete "$INSTDIR\translations\qt_de.qm"
|
||||
Delete "$INSTDIR\translations\qt_en.qm"
|
||||
Delete "$INSTDIR\translations\qt_es.qm"
|
||||
Delete "$INSTDIR\translations\qt_eu.qm"
|
||||
Delete "$INSTDIR\translations\qt_fa.qm"
|
||||
Delete "$INSTDIR\translations\qt_fi.qm"
|
||||
Delete "$INSTDIR\translations\qt_fr.qm"
|
||||
@@ -22,15 +23,18 @@
|
||||
Delete "$INSTDIR\translations\qt_ja.qm"
|
||||
Delete "$INSTDIR\translations\qt_ko.qm"
|
||||
Delete "$INSTDIR\translations\qt_lt.qm"
|
||||
Delete "$INSTDIR\translations\qt_nl.qm"
|
||||
Delete "$INSTDIR\translations\qt_pl.qm"
|
||||
Delete "$INSTDIR\translations\qt_pt.qm"
|
||||
Delete "$INSTDIR\translations\qt_pt_BR.qm"
|
||||
Delete "$INSTDIR\translations\qt_ru.qm"
|
||||
Delete "$INSTDIR\translations\qt_sk.qm"
|
||||
Delete "$INSTDIR\translations\qt_sl.qm"
|
||||
Delete "$INSTDIR\translations\qt_sv.qm"
|
||||
Delete "$INSTDIR\translations\qt_tr.qm"
|
||||
Delete "$INSTDIR\translations\qt_uk.qm"
|
||||
Delete "$INSTDIR\translations\qt_zh_CN.qm"
|
||||
Delete "$INSTDIR\translations\qt_zh_TW.qm"
|
||||
Delete "$INSTDIR\translations\qt_zh_TW.qm"
|
||||
Delete "$INSTDIR\uninst.exe"
|
||||
|
||||
; Remove directories used
|
||||
|
@@ -111,7 +111,7 @@ To install QBittorrent, do the following:
|
||||
=============
|
||||
|
||||
Please create bugreports at http://svn.netlabs.org/qtapps
|
||||
Only bug reports with a reproducible bug are accepted. :-)
|
||||
Only bug reports with a reproducable bug are accepted. :-)
|
||||
|
||||
|
||||
5. CREDITS
|
||||
|
@@ -54,7 +54,7 @@ AS_IF([test "x$QT_QMAKE" != "x"],
|
||||
# Sets the HAVE_QTDBUS variable to true or false.
|
||||
# --------------------------------------
|
||||
AC_DEFUN([FIND_QTDBUS],
|
||||
[AS_IF([test "x$with_qt4" = "xno"],
|
||||
[AS_IF([test "x$with_qt5" = "xyes"],
|
||||
[AC_MSG_CHECKING([for Qt5DBus >= 5.2.0])
|
||||
PKG_CHECK_EXISTS([Qt5DBus >= 5.2.0],
|
||||
[AC_MSG_RESULT([found])
|
||||
|
@@ -10,9 +10,7 @@ exists($$OUT_PWD/../conf.pri) {
|
||||
}
|
||||
|
||||
LIBS += -framework Carbon -framework IOKit
|
||||
|
||||
# C++11 support
|
||||
lessThan(QT_MAJOR_VERSION, 5): QMAKE_CXXFLAGS += -std=c++11
|
||||
CONFIG += c++11
|
||||
|
||||
QT_LANG_PATH = ../dist/qt-translations
|
||||
DIST_PATH = ../dist/mac
|
||||
@@ -58,3 +56,6 @@ QMAKE_BUNDLE_DATA += qt_translations
|
||||
|
||||
ICON = $$DIST_PATH/qbittorrent_mac.icns
|
||||
QMAKE_INFO_PLIST = $$DIST_PATH/Info.plist
|
||||
|
||||
DEFINES += WITH_GEOIP_EMBEDDED
|
||||
message("On Mac OS X, GeoIP database must be embedded.")
|
||||
|
@@ -1,6 +1,3 @@
|
||||
# C++11 support
|
||||
lessThan(QT_MAJOR_VERSION, 5): QMAKE_CXXFLAGS += -std=c++11
|
||||
|
||||
exists(conf.pri) {
|
||||
# to the conf.pri goes all system dependent stuff
|
||||
include(conf.pri)
|
||||
@@ -16,4 +13,8 @@ LIBS += \
|
||||
RC_FILE = qbittorrent_os2.rc
|
||||
|
||||
# LIBTORRENT DEFINES
|
||||
DEFINES += WITH_SHIPPED_GEOIP_H
|
||||
DEFINES += BOOST_ASIO_DYN_LINK
|
||||
|
||||
DEFINES += WITH_GEOIP_EMBEDDED
|
||||
message("On eCS(OS/2), GeoIP database must be embedded.")
|
||||
|
@@ -27,6 +27,3 @@ strace_win {
|
||||
}
|
||||
|
||||
SOURCES += $$PWD/main.cpp
|
||||
|
||||
# upgrade code
|
||||
HEADERS += $$PWD/upgrade.h
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -50,17 +50,10 @@ QT_END_NAMESPACE
|
||||
typedef QtSingleCoreApplication BaseApplication;
|
||||
#endif
|
||||
|
||||
#include "base/utils/misc.h"
|
||||
|
||||
#ifndef DISABLE_WEBUI
|
||||
class WebUI;
|
||||
#endif
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
class TorrentHandle;
|
||||
}
|
||||
|
||||
class Application : public BaseApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -84,8 +77,6 @@ protected:
|
||||
|
||||
private slots:
|
||||
void processMessage(const QString &message);
|
||||
void torrentFinished(BitTorrent::TorrentHandle *const torrent);
|
||||
void allTorrentsFinished();
|
||||
void cleanup();
|
||||
#if (!defined(DISABLE_GUI) && defined(Q_OS_WIN))
|
||||
void shutdownCleanup(QSessionManager &manager);
|
||||
@@ -96,7 +87,6 @@ private:
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
QPointer<MainWindow> m_window;
|
||||
ShutdownAction m_shutdownAct;
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_WEBUI
|
||||
@@ -109,7 +99,6 @@ private:
|
||||
|
||||
void initializeTranslation();
|
||||
void processParams(const QStringList ¶ms);
|
||||
void sendNotificationEmail(BitTorrent::TorrentHandle *const torrent);
|
||||
};
|
||||
|
||||
#endif // APPLICATION_H
|
||||
|
@@ -33,7 +33,6 @@
|
||||
#include <QScopedPointer>
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
// GUI-only includes
|
||||
#include <QFont>
|
||||
#include <QMessageBox>
|
||||
#include <QPainter>
|
||||
@@ -42,19 +41,14 @@
|
||||
#include <QSplashScreen>
|
||||
#ifdef QBT_STATIC_QT
|
||||
#include <QtPlugin>
|
||||
#ifdef QBT_USES_QT5
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
Q_IMPORT_PLUGIN(QICOPlugin)
|
||||
#else
|
||||
Q_IMPORT_PLUGIN(qico)
|
||||
#endif
|
||||
#endif // QBT_STATIC_QT
|
||||
|
||||
#else
|
||||
// NoGUI-only includes
|
||||
#else // DISABLE_GUI
|
||||
#include <cstdio>
|
||||
#ifdef Q_OS_UNIX
|
||||
#include "unistd.h"
|
||||
#endif
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
@@ -72,10 +66,9 @@ Q_IMPORT_PLUGIN(qico)
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include "application.h"
|
||||
#include "base/utils/misc.h"
|
||||
#include "base/preferences.h"
|
||||
|
||||
#include "upgrade.h"
|
||||
#include "misc.h"
|
||||
#include "preferences.h"
|
||||
#include "logger.h"
|
||||
|
||||
// Signal handlers
|
||||
#if defined(Q_OS_UNIX) || defined(STACKTRACE_WIN)
|
||||
@@ -127,11 +120,13 @@ QBtCommandLineParameters parseCommandLine();
|
||||
// Main
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
//Initialize logger singleton here to avoid threading issues
|
||||
Logger::instance()->addMessage(QObject::tr("qBittorrent %1 started", "qBittorrent v3.2.0alpha started").arg(VERSION));
|
||||
// We must save it here because QApplication constructor may change it
|
||||
bool isOneArg = (argc == 2);
|
||||
|
||||
// Create Application
|
||||
QString appId = QLatin1String("qBittorrent-") + Utils::Misc::getUserIDString();
|
||||
QString appId = QLatin1String("qBittorrent-") + misc::getUserIDString();
|
||||
QScopedPointer<Application> app(new Application(appId, argc, argv));
|
||||
|
||||
const QBtCommandLineParameters params = parseCommandLine();
|
||||
@@ -181,16 +176,8 @@ int main(int argc, char *argv[])
|
||||
if (!qputenv("QBITTORRENT", QByteArray(VERSION)))
|
||||
std::cerr << "Couldn't set environment variable...\n";
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
if (!userAgreesWithLegalNotice())
|
||||
return EXIT_SUCCESS;
|
||||
#else
|
||||
if (!params.shouldDaemonize
|
||||
&& isatty(fileno(stdin))
|
||||
&& isatty(fileno(stdout))
|
||||
&& !userAgreesWithLegalNotice())
|
||||
return EXIT_SUCCESS;
|
||||
#endif
|
||||
|
||||
// Check if qBittorrent is already running for this user
|
||||
if (app->isRunning()) {
|
||||
@@ -204,20 +191,12 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
qDebug("qBittorrent is already running for this user.");
|
||||
|
||||
Utils::Misc::msleep(300);
|
||||
misc::msleep(300);
|
||||
app->sendParams(params.torrents);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
if (!upgrade()) return EXIT_FAILURE;
|
||||
#else
|
||||
if (!upgrade(!params.shouldDaemonize
|
||||
&& isatty(fileno(stdin))
|
||||
&& isatty(fileno(stdout)))) return EXIT_FAILURE;
|
||||
#endif
|
||||
|
||||
srand(time(0));
|
||||
#ifdef DISABLE_GUI
|
||||
if (params.shouldDaemonize) {
|
||||
@@ -419,7 +398,7 @@ void displayUsage(const QString& prg_name)
|
||||
#else
|
||||
QMessageBox msgBox(QMessageBox::Information, QObject::tr("Help"), makeUsage(prg_name), QMessageBox::Ok);
|
||||
msgBox.show(); // Need to be shown or to moveToCenter does not work
|
||||
msgBox.move(Utils::Misc::screenCenter(&msgBox));
|
||||
msgBox.move(misc::screenCenter(&msgBox));
|
||||
msgBox.exec();
|
||||
#endif
|
||||
}
|
||||
@@ -431,7 +410,7 @@ void displayBadArgMessage(const QString& message)
|
||||
QMessageBox msgBox(QMessageBox::Critical, QObject::tr("Bad command line"),
|
||||
message + QLatin1Char('\n') + help, QMessageBox::Ok);
|
||||
msgBox.show(); // Need to be shown or to moveToCenter does not work
|
||||
msgBox.move(Utils::Misc::screenCenter(&msgBox));
|
||||
msgBox.move(misc::screenCenter(&msgBox));
|
||||
msgBox.exec();
|
||||
#else
|
||||
std::cerr << qPrintable(QObject::tr("Bad command line: "));
|
||||
@@ -463,7 +442,7 @@ bool userAgreesWithLegalNotice()
|
||||
msgBox.addButton(QObject::tr("Cancel"), QMessageBox::RejectRole);
|
||||
QAbstractButton *agree_button = msgBox.addButton(QObject::tr("I Agree"), QMessageBox::AcceptRole);
|
||||
msgBox.show(); // Need to be shown or to moveToCenter does not work
|
||||
msgBox.move(Utils::Misc::screenCenter(&msgBox));
|
||||
msgBox.move(misc::screenCenter(&msgBox));
|
||||
msgBox.exec();
|
||||
if (msgBox.clickedButton() == agree_button) {
|
||||
// Save the answer
|
||||
|
@@ -1,177 +0,0 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef UPGRADE_H
|
||||
#define UPGRADE_H
|
||||
|
||||
#include <libtorrent/lazy_entry.hpp>
|
||||
#include <libtorrent/entry.hpp>
|
||||
#include <libtorrent/bencode.hpp>
|
||||
|
||||
#include <QString>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#ifndef DISABLE_GUI
|
||||
#include <QMessageBox>
|
||||
#endif
|
||||
|
||||
#include "base/logger.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/misc.h"
|
||||
#include "base/utils/string.h"
|
||||
#include "base/qinisettings.h"
|
||||
|
||||
bool userAcceptsUpgrade()
|
||||
{
|
||||
#ifdef DISABLE_GUI
|
||||
std::cout << std::endl << "*** " << qPrintable(QObject::tr("Upgrade")) << " ***" << std::endl;
|
||||
char ret = '\0';
|
||||
do {
|
||||
std::cout << qPrintable(QObject::tr("You updated from an older version that saved things differently. You must migrate to the new saving system. You will not be able to use an older version than v3.3.0 again. Continue? [y/n]")) << std::endl;
|
||||
ret = getchar(); // Read pressed key
|
||||
}
|
||||
while ((ret != 'y') && (ret != 'Y') && (ret != 'n') && (ret != 'N'));
|
||||
|
||||
if ((ret == 'y') || (ret == 'Y'))
|
||||
return true;
|
||||
#else
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(QObject::tr("You updated from an older version that saved things differently. You must migrate to the new saving system. If you continue, you will not be able to use an older version than v3.3.0 again."));
|
||||
msgBox.setWindowTitle(QObject::tr("Upgrade"));
|
||||
msgBox.addButton(QMessageBox::Abort);
|
||||
msgBox.addButton(QMessageBox::Ok);
|
||||
msgBox.setDefaultButton(QMessageBox::Abort);
|
||||
msgBox.show(); // Need to be shown or to moveToCenter does not work
|
||||
msgBox.move(Utils::Misc::screenCenter(&msgBox));
|
||||
if (msgBox.exec() == QMessageBox::Ok)
|
||||
return true;
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool upgradeResumeFile(const QString &filepath, const QVariantHash &oldTorrent, int &maxPrio)
|
||||
{
|
||||
QFile file1(filepath);
|
||||
if (!file1.open(QIODevice::ReadOnly))
|
||||
return false;
|
||||
|
||||
QByteArray data = file1.readAll();
|
||||
file1.close();
|
||||
|
||||
libtorrent::lazy_entry fastOld;
|
||||
libtorrent::error_code ec;
|
||||
libtorrent::lazy_bdecode(data.constData(), data.constData() + data.size(), fastOld, ec);
|
||||
if ((fastOld.type() != libtorrent::lazy_entry::dict_t) && !ec) return false;
|
||||
|
||||
libtorrent::entry fastNew;
|
||||
fastNew = fastOld;
|
||||
|
||||
int priority = fastOld.dict_find_int_value("qBt-queuePosition");
|
||||
if (priority > maxPrio)
|
||||
maxPrio = priority;
|
||||
|
||||
fastNew["qBt-name"] = Utils::String::toStdString(oldTorrent.value("name").toString());
|
||||
fastNew["qBt-tempPathDisabled"] = false;
|
||||
|
||||
QFile file2(QString("%1.%2").arg(filepath).arg(priority > 0 ? priority : 0));
|
||||
QVector<char> out;
|
||||
libtorrent::bencode(std::back_inserter(out), fastNew);
|
||||
if (file2.open(QIODevice::WriteOnly)) {
|
||||
if (file2.write(&out[0], out.size()) == out.size()) {
|
||||
Utils::Fs::forceRemove(filepath);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool upgrade(bool ask = true)
|
||||
{
|
||||
QIniSettings *oldResumeSettings = new QIniSettings("qBittorrent", "qBittorrent-resume");
|
||||
QString oldResumeFilename = oldResumeSettings->fileName();
|
||||
QVariantHash oldResumeData = oldResumeSettings->value("torrents").toHash();
|
||||
delete oldResumeSettings;
|
||||
if (oldResumeData.isEmpty())
|
||||
Utils::Fs::forceRemove(oldResumeFilename);
|
||||
|
||||
|
||||
QString backupFolderPath = Utils::Fs::expandPathAbs(Utils::Fs::QDesktopServicesDataLocation() + "BT_backup");
|
||||
QDir backupFolderDir(backupFolderPath);
|
||||
QStringList backupFiles = backupFolderDir.entryList(QStringList() << QLatin1String("*.fastresume"), QDir::Files, QDir::Unsorted);
|
||||
if (backupFiles.isEmpty() && oldResumeData.isEmpty()) return true;
|
||||
if (ask && !userAcceptsUpgrade()) return false;
|
||||
|
||||
int maxPrio = 0;
|
||||
QRegExp rx(QLatin1String("^([A-Fa-f0-9]{40})\\.fastresume$"));
|
||||
foreach (QString backupFile, backupFiles) {
|
||||
if (rx.indexIn(backupFile) != -1) {
|
||||
if (upgradeResumeFile(backupFolderDir.absoluteFilePath(backupFile), oldResumeData[rx.cap(1)].toHash(), maxPrio))
|
||||
oldResumeData.remove(rx.cap(1));
|
||||
else
|
||||
Logger::instance()->addMessage(QObject::tr("Couldn't migrate torrent with hash: %1").arg(rx.cap(1)), Log::WARNING);
|
||||
}
|
||||
else {
|
||||
Logger::instance()->addMessage(QObject::tr("Couldn't migrate torrent. Invalid fastresume file name: %1").arg(backupFile), Log::WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (const QString &hash, oldResumeData.keys()) {
|
||||
QVariantHash oldTorrent = oldResumeData[hash].toHash();
|
||||
if (oldTorrent.value("is_magnet", false).toBool()) {
|
||||
libtorrent::entry resumeData;
|
||||
resumeData["qBt-magnetUri"] = Utils::String::toStdString(oldTorrent.value("magnet_uri").toString());
|
||||
resumeData["qBt-paused"] = false;
|
||||
resumeData["qBt-forced"] = false;
|
||||
|
||||
resumeData["qBt-savePath"] = Utils::String::toStdString(oldTorrent.value("save_path").toString());
|
||||
resumeData["qBt-ratioLimit"] = Utils::String::toStdString(QString::number(oldTorrent.value("max_ratio", -2).toReal()));
|
||||
resumeData["qBt-label"] = Utils::String::toStdString(oldTorrent.value("label").toString());
|
||||
resumeData["qBt-name"] = Utils::String::toStdString(oldTorrent.value("name").toString());
|
||||
resumeData["qBt-seedStatus"] = oldTorrent.value("seed").toBool();
|
||||
resumeData["qBt-tempPathDisabled"] = false;
|
||||
|
||||
QString filename = QString("%1.fastresume.%2").arg(hash).arg(++maxPrio);
|
||||
QString filepath = backupFolderDir.absoluteFilePath(filename);
|
||||
|
||||
QFile resumeFile(filepath);
|
||||
QVector<char> out;
|
||||
libtorrent::bencode(std::back_inserter(out), resumeData);
|
||||
if (resumeFile.open(QIODevice::WriteOnly))
|
||||
resumeFile.write(&out[0], out.size());
|
||||
}
|
||||
}
|
||||
|
||||
if (!oldResumeData.isEmpty())
|
||||
QFile(oldResumeFilename).rename(oldResumeFilename + ".bak");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // UPGRADE_H
|
@@ -1,86 +0,0 @@
|
||||
HEADERS += \
|
||||
$$PWD/types.h \
|
||||
$$PWD/tristatebool.h \
|
||||
$$PWD/filesystemwatcher.h \
|
||||
$$PWD/qinisettings.h \
|
||||
$$PWD/logger.h \
|
||||
$$PWD/preferences.h \
|
||||
$$PWD/iconprovider.h \
|
||||
$$PWD/http/irequesthandler.h \
|
||||
$$PWD/http/connection.h \
|
||||
$$PWD/http/requestparser.h \
|
||||
$$PWD/http/responsegenerator.h \
|
||||
$$PWD/http/server.h \
|
||||
$$PWD/http/types.h \
|
||||
$$PWD/http/responsebuilder.h \
|
||||
$$PWD/net/dnsupdater.h \
|
||||
$$PWD/net/downloadmanager.h \
|
||||
$$PWD/net/downloadhandler.h \
|
||||
$$PWD/net/geoipmanager.h \
|
||||
$$PWD/net/portforwarder.h \
|
||||
$$PWD/net/reverseresolution.h \
|
||||
$$PWD/net/smtp.h \
|
||||
$$PWD/net/private/geoipdatabase.h \
|
||||
$$PWD/bittorrent/infohash.h \
|
||||
$$PWD/bittorrent/session.h \
|
||||
$$PWD/bittorrent/sessionstatus.h \
|
||||
$$PWD/bittorrent/cachestatus.h \
|
||||
$$PWD/bittorrent/magneturi.h \
|
||||
$$PWD/bittorrent/torrentinfo.h \
|
||||
$$PWD/bittorrent/torrenthandle.h \
|
||||
$$PWD/bittorrent/peerinfo.h \
|
||||
$$PWD/bittorrent/trackerentry.h \
|
||||
$$PWD/bittorrent/tracker.h \
|
||||
$$PWD/bittorrent/torrentcreatorthread.h \
|
||||
$$PWD/bittorrent/private/speedmonitor.h \
|
||||
$$PWD/bittorrent/private/bandwidthscheduler.h \
|
||||
$$PWD/bittorrent/private/filterparserthread.h \
|
||||
$$PWD/bittorrent/private/statistics.h \
|
||||
$$PWD/utils/fs.h \
|
||||
$$PWD/utils/gzip.h \
|
||||
$$PWD/utils/misc.h \
|
||||
$$PWD/utils/string.h \
|
||||
$$PWD/unicodestrings.h \
|
||||
$$PWD/torrentfilter.h \
|
||||
$$PWD/scanfoldersmodel.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/tristatebool.cpp \
|
||||
$$PWD/filesystemwatcher.cpp \
|
||||
$$PWD/logger.cpp \
|
||||
$$PWD/preferences.cpp \
|
||||
$$PWD/iconprovider.cpp \
|
||||
$$PWD/http/connection.cpp \
|
||||
$$PWD/http/requestparser.cpp \
|
||||
$$PWD/http/responsegenerator.cpp \
|
||||
$$PWD/http/server.cpp \
|
||||
$$PWD/http/responsebuilder.cpp \
|
||||
$$PWD/net/dnsupdater.cpp \
|
||||
$$PWD/net/downloadmanager.cpp \
|
||||
$$PWD/net/downloadhandler.cpp \
|
||||
$$PWD/net/geoipmanager.cpp \
|
||||
$$PWD/net/portforwarder.cpp \
|
||||
$$PWD/net/reverseresolution.cpp \
|
||||
$$PWD/net/smtp.cpp \
|
||||
$$PWD/net/private/geoipdatabase.cpp \
|
||||
$$PWD/bittorrent/infohash.cpp \
|
||||
$$PWD/bittorrent/session.cpp \
|
||||
$$PWD/bittorrent/sessionstatus.cpp \
|
||||
$$PWD/bittorrent/cachestatus.cpp \
|
||||
$$PWD/bittorrent/magneturi.cpp \
|
||||
$$PWD/bittorrent/torrentinfo.cpp \
|
||||
$$PWD/bittorrent/torrenthandle.cpp \
|
||||
$$PWD/bittorrent/peerinfo.cpp \
|
||||
$$PWD/bittorrent/trackerentry.cpp \
|
||||
$$PWD/bittorrent/tracker.cpp \
|
||||
$$PWD/bittorrent/torrentcreatorthread.cpp \
|
||||
$$PWD/bittorrent/private/speedmonitor.cpp \
|
||||
$$PWD/bittorrent/private/bandwidthscheduler.cpp \
|
||||
$$PWD/bittorrent/private/filterparserthread.cpp \
|
||||
$$PWD/bittorrent/private/statistics.cpp \
|
||||
$$PWD/utils/fs.cpp \
|
||||
$$PWD/utils/gzip.cpp \
|
||||
$$PWD/utils/misc.cpp \
|
||||
$$PWD/utils/string.cpp \
|
||||
$$PWD/torrentfilter.cpp \
|
||||
$$PWD/scanfoldersmodel.cpp
|
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* 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 "cachestatus.h"
|
||||
|
||||
using namespace BitTorrent;
|
||||
|
||||
CacheStatus::CacheStatus(const libtorrent::cache_status &nativeStatus)
|
||||
: m_nativeStatus(nativeStatus)
|
||||
{
|
||||
}
|
||||
|
||||
int CacheStatus::totalUsedBuffers() const
|
||||
{
|
||||
return m_nativeStatus.total_used_buffers;
|
||||
}
|
||||
|
||||
qreal CacheStatus::readRatio() const
|
||||
{
|
||||
if (m_nativeStatus.blocks_read > 0)
|
||||
return (static_cast<qreal>(m_nativeStatus.blocks_read_hit) / m_nativeStatus.blocks_read);
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
int CacheStatus::jobQueueLength() const
|
||||
{
|
||||
return m_nativeStatus.job_queue_length;
|
||||
}
|
||||
|
||||
int CacheStatus::averageJobTime() const
|
||||
{
|
||||
return m_nativeStatus.average_job_time;
|
||||
}
|
||||
|
||||
qlonglong CacheStatus::queuedBytes() const
|
||||
{
|
||||
return m_nativeStatus.queued_bytes;
|
||||
}
|
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef BITTORRENT_CACHESTATUS_H
|
||||
#define BITTORRENT_CACHESTATUS_H
|
||||
|
||||
#include <libtorrent/disk_io_thread.hpp>
|
||||
#include <QtGlobal>
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
class CacheStatus
|
||||
{
|
||||
public:
|
||||
CacheStatus(const libtorrent::cache_status &nativeStatus);
|
||||
|
||||
int totalUsedBuffers() const;
|
||||
qreal readRatio() const;
|
||||
int jobQueueLength() const;
|
||||
int averageJobTime() const;
|
||||
qlonglong queuedBytes() const;
|
||||
|
||||
private:
|
||||
libtorrent::cache_status m_nativeStatus;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // BITTORRENT_CACHESTATUS_H
|
@@ -1,98 +0,0 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* 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 <QHash>
|
||||
#include "infohash.h"
|
||||
|
||||
using namespace BitTorrent;
|
||||
|
||||
InfoHash::InfoHash()
|
||||
: m_valid(false)
|
||||
{
|
||||
}
|
||||
|
||||
InfoHash::InfoHash(const libtorrent::sha1_hash &nativeHash)
|
||||
: m_valid(true)
|
||||
, m_nativeHash(nativeHash)
|
||||
{
|
||||
char out[(libtorrent::sha1_hash::size * 2) + 1];
|
||||
libtorrent::to_hex((char const*)&m_nativeHash[0], libtorrent::sha1_hash::size, out);
|
||||
m_hashString = QString(out);
|
||||
}
|
||||
|
||||
InfoHash::InfoHash(const QString &hashString)
|
||||
: m_valid(false)
|
||||
, m_hashString(hashString)
|
||||
{
|
||||
QByteArray raw = m_hashString.toLatin1();
|
||||
if (raw.size() == 40)
|
||||
m_valid = libtorrent::from_hex(raw.constData(), 40, (char*)&m_nativeHash[0]);
|
||||
}
|
||||
|
||||
|
||||
InfoHash::InfoHash(const InfoHash &other)
|
||||
: m_valid(other.m_valid)
|
||||
, m_nativeHash(other.m_nativeHash)
|
||||
, m_hashString(other.m_hashString)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
bool InfoHash::isValid() const
|
||||
{
|
||||
return m_valid;
|
||||
}
|
||||
|
||||
|
||||
InfoHash::operator libtorrent::sha1_hash() const
|
||||
{
|
||||
return m_nativeHash;
|
||||
}
|
||||
|
||||
|
||||
InfoHash::operator QString() const
|
||||
{
|
||||
return m_hashString;
|
||||
}
|
||||
|
||||
|
||||
bool InfoHash::operator==(const InfoHash &other) const
|
||||
{
|
||||
return (m_nativeHash == other.m_nativeHash);
|
||||
}
|
||||
|
||||
|
||||
bool InfoHash::operator!=(const InfoHash &other) const
|
||||
{
|
||||
return (m_nativeHash != other.m_nativeHash);
|
||||
}
|
||||
|
||||
uint qHash(const InfoHash &key, uint seed)
|
||||
{
|
||||
return qHash(static_cast<QString>(key), seed);
|
||||
}
|
@@ -1,93 +0,0 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* 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 <libtorrent/bencode.hpp>
|
||||
#include <libtorrent/error_code.hpp>
|
||||
#include <libtorrent/magnet_uri.hpp>
|
||||
|
||||
#include "base/utils/string.h"
|
||||
#include "magneturi.h"
|
||||
|
||||
namespace libt = libtorrent;
|
||||
using namespace BitTorrent;
|
||||
|
||||
MagnetUri::MagnetUri(const QString &url)
|
||||
: m_valid(false)
|
||||
, m_url(url)
|
||||
{
|
||||
if (url.isEmpty()) return;
|
||||
|
||||
libt::error_code ec;
|
||||
libt::parse_magnet_uri(url.toUtf8().constData(), m_addTorrentParams, ec);
|
||||
if (ec) return;
|
||||
|
||||
m_valid = true;
|
||||
m_hash = m_addTorrentParams.info_hash;
|
||||
m_name = Utils::String::fromStdString(m_addTorrentParams.name);
|
||||
|
||||
foreach (const std::string &tracker, m_addTorrentParams.trackers)
|
||||
m_trackers.append(Utils::String::fromStdString(tracker));
|
||||
|
||||
foreach (const std::string &urlSeed, m_addTorrentParams.url_seeds)
|
||||
m_urlSeeds.append(QUrl(urlSeed.c_str()));
|
||||
}
|
||||
|
||||
bool MagnetUri::isValid() const
|
||||
{
|
||||
return m_valid;
|
||||
}
|
||||
|
||||
InfoHash MagnetUri::hash() const
|
||||
{
|
||||
return m_hash;
|
||||
}
|
||||
|
||||
QString MagnetUri::name() const
|
||||
{
|
||||
return m_name;
|
||||
}
|
||||
|
||||
QList<TrackerEntry> MagnetUri::trackers() const
|
||||
{
|
||||
return m_trackers;
|
||||
}
|
||||
|
||||
QList<QUrl> MagnetUri::urlSeeds() const
|
||||
{
|
||||
return m_urlSeeds;
|
||||
}
|
||||
|
||||
QString MagnetUri::url() const
|
||||
{
|
||||
return m_url;
|
||||
}
|
||||
|
||||
libtorrent::add_torrent_params MagnetUri::addTorrentParams() const
|
||||
{
|
||||
return m_addTorrentParams;
|
||||
}
|
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef BITTORRENT_MAGNETURI_H
|
||||
#define BITTORRENT_MAGNETURI_H
|
||||
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
#include <QUrl>
|
||||
|
||||
#include <libtorrent/add_torrent_params.hpp>
|
||||
|
||||
#include "infohash.h"
|
||||
#include "trackerentry.h"
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
class MagnetUri
|
||||
{
|
||||
public:
|
||||
explicit MagnetUri(const QString &url = QString());
|
||||
|
||||
bool isValid() const;
|
||||
InfoHash hash() const;
|
||||
QString name() const;
|
||||
QList<TrackerEntry> trackers() const;
|
||||
QList<QUrl> urlSeeds() const;
|
||||
QString url() const;
|
||||
|
||||
libtorrent::add_torrent_params addTorrentParams() const;
|
||||
|
||||
private:
|
||||
bool m_valid;
|
||||
QString m_url;
|
||||
InfoHash m_hash;
|
||||
QString m_name;
|
||||
QList<TrackerEntry> m_trackers;
|
||||
QList<QUrl> m_urlSeeds;
|
||||
libtorrent::add_torrent_params m_addTorrentParams;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // BITTORRENT_MAGNETURI_H
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user