You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-09 18:32:15 +02:00
Compare commits
280 Commits
release-5.
...
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 |
9
.gitignore
vendored
9
.gitignore
vendored
@@ -2,13 +2,19 @@ src/gui/geoip/GeoIP.dat
|
||||
src/gui/geoip/GeoIP.dat.gz
|
||||
src/qbittorrent
|
||||
src/qbittorrent-nox
|
||||
src/release
|
||||
src/debug
|
||||
qbittorrent.pro.user*
|
||||
conf.pri
|
||||
Makefile
|
||||
Makefile*
|
||||
*.pyc
|
||||
*.log
|
||||
|
||||
# Compiled object files
|
||||
*.o
|
||||
*.pdb
|
||||
*.exe
|
||||
|
||||
# Generated MOC, resource and UI files
|
||||
moc_*.cpp
|
||||
qrc_*.cpp
|
||||
@@ -19,6 +25,7 @@ src/lang/qbittorrent_*.qm
|
||||
.qmake.stash
|
||||
src/qbittorrent.app
|
||||
*.dmg
|
||||
|
||||
#Autotools junk
|
||||
aclocal.m4
|
||||
autom4te.cache/*
|
||||
|
108
.travis.yml
108
.travis.yml
@@ -1,16 +1,17 @@
|
||||
language:
|
||||
- cpp
|
||||
language: cpp
|
||||
|
||||
env:
|
||||
# use libtorrent 0.15.10
|
||||
# uncomment when Travis doesn't use Ubuntu 12.04 LTS, which has libtorrent 0.15.10 as package
|
||||
#- lt_source=from_dist gui=true
|
||||
#- lt_source=from_dist gui=false
|
||||
# use libtorrent 0.16.X from RC_0_16 svn branch
|
||||
- lt_source=from_svnRC_0_16 gui=true
|
||||
- lt_source=from_svnRC_0_16 gui=false
|
||||
- lt_source=from_svnRC_1_0 gui=true
|
||||
- lt_source=from_svnRC_1_0 gui=false
|
||||
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_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
|
||||
|
||||
branches:
|
||||
except:
|
||||
@@ -20,41 +21,76 @@ branches:
|
||||
notifications:
|
||||
email:
|
||||
on_success: change
|
||||
on_failure: change
|
||||
on_failure: change
|
||||
|
||||
# container-based builds
|
||||
sudo: false
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.ccache
|
||||
|
||||
addons:
|
||||
coverity_scan:
|
||||
project:
|
||||
name: "qbittorrent/qBittorrent"
|
||||
description: "Build submitted via Travis CI"
|
||||
build_command_prepend: "./bootstrap.sh && ./configure $qbtconf"
|
||||
build_command: make
|
||||
branch_pattern: $coverity_branch
|
||||
notification_email: sledgehammer999@qbittorrent.org
|
||||
apt:
|
||||
packages:
|
||||
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
|
||||
- autoconf
|
||||
- automake
|
||||
- colormake
|
||||
- libssl-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" ] && ! [[ "$lt_branch" == "RC_1_0" && "$gui" == "true" ]]; then exit ; fi
|
||||
|
||||
- shopt -s expand_aliases
|
||||
- alias sudo="sudo "
|
||||
# Using nprocs/2 sometimes may fail (gcc is killed by system), just use two threads
|
||||
- alias make="colormake -j2 "
|
||||
- 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" --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; 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
|
||||
- qbtconf="$qbtconf --with-qt4"
|
||||
- ltconf=" --with-libgeoip=system"
|
||||
- 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
|
||||
|
||||
- echo settings
|
||||
- echo $lt_source
|
||||
- echo $ltconf
|
||||
# Print settings
|
||||
- echo $lt_branch
|
||||
- echo $gui
|
||||
- echo $ltconf
|
||||
- echo $qbtconf
|
||||
|
||||
- sudo apt-get -qq update
|
||||
# Travis can stall during heavy load if these packages are installed in one step - split the command
|
||||
- sudo apt-get -qq install debhelper autoconf automake colormake libssl-dev libgeoip-dev
|
||||
# uncomment when Travis doesn't use Ubuntu 12.04 LTS, which has libtorrent 0.15.10 as package
|
||||
#- sudo apt-get -qq install libboost-dev libboost-filesystem-dev libboost-system-dev
|
||||
- sudo apt-get -qq install libboost-dev libboost-system-dev
|
||||
- sudo apt-get -qq install libqt4-dev
|
||||
- ccache -V && ccache --show-stats && ccache --zero-stats
|
||||
|
||||
install:
|
||||
#- if [[ "$lt_source" == "from_dist" ]]; then sudo apt-get -qq install libtorrent-rasterbar-dev; fi
|
||||
- if [[ "$lt_source" == "from_svnRC_0_16" ]]; then qbtconf="$qbtconf --with-libtorrent-rasterbar0.16" && cd .. && svn co svn://svn.code.sf.net/p/libtorrent/code/branches/RC_0_16 ./libtorrent && (cd libtorrent && ./autotool.sh && ./configure $ltconf && sudo make install) && sudo ldconfig /usr/local/lib && cd $TRAVIS_BUILD_DIR ; fi
|
||||
- if [[ "$lt_source" == "from_svnRC_1_0" ]]; then cd .. && svn co svn://svn.code.sf.net/p/libtorrent/code/branches/RC_1_0 ./libtorrent && (cd libtorrent && ./autotool.sh && ./configure $ltconf && sudo make install) && sudo ldconfig /usr/local/lib && cd $TRAVIS_BUILD_DIR ; 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:
|
||||
- ./bootstrap.sh
|
||||
- ./configure $qbtconf && sudo make install
|
||||
|
||||
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ]; then exit ; fi # Skip usual build when running coverity scan
|
||||
- ./bootstrap.sh && ./configure $qbtconf
|
||||
- make install
|
||||
|
||||
after_success:
|
||||
- if $gui ; then qbittorrent --version ; else qbittorrent-nox --version ; fi
|
||||
- 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:
|
||||
- ccache --show-stats
|
||||
|
@@ -1,7 +1,7 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[qbittorrent.qbittorrent_master]
|
||||
[qbittorrent.qbittorrent_v3_2_x]
|
||||
file_filter = src/lang/qbittorrent_<lang>.ts
|
||||
source_file = src/lang/qbittorrent_en.ts
|
||||
source_lang = en
|
||||
|
160
Changelog
160
Changelog
@@ -1,3 +1,163 @@
|
||||
* Sat Oct 31 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.5
|
||||
- BUGFIX: Fix difficult to reproduce crash. (glassez)
|
||||
- OTHER: Fix Windows' Qt5 build. (Gelmir)
|
||||
|
||||
* Sat Oct 10 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.4
|
||||
- FEATURE: Select the file of single file torrents when opening destination folder (pmzqla)
|
||||
- BUGFIX: Fix crash with invalid favicon. Closes #3632. (glassez)
|
||||
- BUGFIX: Try to download favicon.png when the download of favicon.ico fails (pmzqla)
|
||||
- BUGFIX: Try to avoid loading a corrupted configuration file. Also log errors encountered while saving/loading the configuration. Closes #3503. (sledgehammer999)
|
||||
- BUGFIX: Allow adding torrent link from Torcache (jsayol)
|
||||
- BUGFIX: Don't limit the number of torrents that can be announced to the tracker/dht/lsd. Closes #3473. (sledgehammer999)
|
||||
- BUGFIX: Fix potential crash when memory allocation failed. Closes #3877. (Chocobo1)
|
||||
- COSMETIC: Change Queue buttons order in the Toolbar (GUI & Web UI) (ngosang)
|
||||
- COSMETIC: Move option "Ignore transfer limits on local network" to Speed page (Chocobo1)
|
||||
- COSMETIC: Move option "Confirm torrent deletion" to Behavior page (Chocobo1)
|
||||
- COSMETIC: Fix typos. Make `μTP` untranslatable. Use American variation of words. Closes #3654. (sledgehammer999)
|
||||
- COSMETIC: Optimize text color for dark themes. Closes #3633 and #3815. (sledgehammer999)
|
||||
- COSMETIC: Show current label in the torrent context menu. Closes #3776. (sledgehammer999)
|
||||
- WEBUI: Add save_path to /query/torrents (Casey Bodley)
|
||||
- WEBUI: Bump API_VERSION to 5
|
||||
- SEARCH: Fix python detection when the 'Anaconda' software is installed. Closes #3731. (sledgehammer999)
|
||||
- RSS: Handle magnet links as torrents instead of news URLs. Closes #3560 (ngosang)
|
||||
- RSS: Trim elements text in RSS articles (ngosang)
|
||||
- RSS: Fix contextual menu in RSS torrents list (ngosang)
|
||||
- RSS: Improve error handling when a RSS feed doesn't contain torrents (ngosang)
|
||||
- RSS: More precise message and code simplification in RSS feeds deletion (ngosang)
|
||||
- RSS: Don't hide the elements in Unread list when clicked (ngosang)
|
||||
- RSS: Allow multiple selection in RSS torrents list (ngosang)
|
||||
- RSS: Simplify string translation (ngosang)
|
||||
- RSS: Handle more types of RSS feeds (ngosang)
|
||||
- RSS: Fix RSS panel position not saved (ngosang)
|
||||
- RSS: Fix forgetting label changes to first item in RSS rule list. (Gelmir)
|
||||
- RSS: Add label to UI when a new one is creating during rule addition. (Gelmir)
|
||||
- RSS: Removes refresh message when adding a new feed (ngosang)
|
||||
- RSS: Fix RSS crash when deleting RSS feeds. Closes #997, #2152, #2461, #3718, #3747, #3766, #3806, #3814, #3829 and #3846. (ngosang)
|
||||
- RSS: Sort labels in RSS Downloader dialog, closes #3140. (Chocobo1)
|
||||
- WINDOWS: Correctly show german letters in the installer. Closes #3574, #3566. (sledgehammer999)
|
||||
- WINDOWS: Fix file selection on Explorer when the filename contains weird characters. Closes #3185. (sledgehammer999)
|
||||
- WINDOWS: Fix wrong default download directory in Windows. Closes #2625. (Chocobo1)
|
||||
- WINDOWS: Fix German translation of the installer. (netswap)
|
||||
- LINUX: Fix broken .desktop file icon for some locales. See #3905. (sledgehammer999)
|
||||
- OTHER: Fix ppc64le detection during configure (sledgehammer999)
|
||||
- OTHER: Don't use sed in configure. Closes #3169. (pmzqla)
|
||||
- OTHER: Fix broken donation link. Closes #3771. (sledgehammer999)
|
||||
- OTHER: Add forum link in README. Closes #3853. (sledgehammer999)
|
||||
- OTHER: New translation: Esperanto
|
||||
- OTHER: Fix Qt5 nox build on non-Windows. (sledgehammer999)
|
||||
|
||||
* Sun Aug 02 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.3
|
||||
- BUGFIX: Fix crash when closing a search tab while search is running (pmzqla)
|
||||
- SEARCH: Other minor search fixes and improvements (pmzqla)
|
||||
|
||||
* Sat Aug 01 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.2
|
||||
- FEATURE: Allow to force reannounce DHT too (Chocobo1)
|
||||
- FEATURE: Implement an option to disable confirmation of torrent recheck (blaxspirit)
|
||||
- FEATURE: Allow to copy all the trackers with a keyboard shortcut (pmzqla)
|
||||
- BUGFIX: Fix torrent renaming. Closes #3398 (ngosang)
|
||||
- BUGFIX: Fix localhost address (::ffff:127.0.0.1) is not recognized when connecting to WebUI (Chocobo1)
|
||||
- BUGFIX: Fix '&' character in label name becomes accelerator key, closes #3454. (Chocobo1)
|
||||
- BUGFIX: Fix HTTP header parsing when torrent filename contains a semicolon. Closes #3511.
|
||||
- BUGFIX: Fix installing search plugin from local file. (sledgehammer999)
|
||||
- BUGFIX: Fix installing search plugin by drag-n-dropping file. (sledgehammer999)
|
||||
- COSMETIC: Update color scheme of completed.png icon. (sledgehammer999)
|
||||
- COSMETIC: Fix printing of the copyright symbol in the About dialog. (sledgehammer999)
|
||||
- COSMETIC: Minor changes in Preview File dialog (ngosang)
|
||||
- COSMETIC: Add Force Resume icon (ngosang)
|
||||
- COSMETIC: Add count of unread items to RSS tab label (pmzqla)
|
||||
- WEBUI: Ports between 1 and 65535 as in the GUI. Closes #1602 (ngosang)
|
||||
- WEBUI: Fix an error in Content tab when the torrent doesn't have metadata (ngosang)
|
||||
- WEBUI: New option Web UI port UPNP. Closes #3358 (ngosang)
|
||||
- WEBUI: Fix API Content Types. Closes #3393 (ngosang)
|
||||
- WEBUI: Fix empty trackers addition (ngosang)
|
||||
- WEBUI: Torrent download from hash. Closes #1173 (ngosang)
|
||||
- WEBUI: Fix sort by queue number (ngosang)
|
||||
- WEBUI: Open external links in a new window/tab (ngosang)
|
||||
- WEBUI: Massive increase in performance. (ngosang)
|
||||
- SEARCH: Search status per tab (DoumanAsh)
|
||||
- SEARCH: Remove the word 'torrent' in ExtraTorrent results (ngosang)
|
||||
- SEARCH: Prefer python3 over python2 on Linux and OS X (pmzqla)
|
||||
- SEARCH: Show notification if Python is not found and a search is started (pmzqla)
|
||||
- SEARCH: Update link to the Windows Python installer (pmzqla)
|
||||
- SEARCH: Improve checks for python. Print python version and path to log. (sledgehammer999)
|
||||
- SEARCH: Improve Python detection (ngosang)
|
||||
- OTHER: Improvements on the build system (Chocobo1)
|
||||
- OTHER: Bump minimum libtorrent version required to 1.0.6/0.16.19. (sledgehammer999)
|
||||
- OTHER: New translation: Slovenian
|
||||
|
||||
* Sat Jul 11 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.1
|
||||
- FEATURE: Change default preferences (ngosang)
|
||||
- FEATURE: Add "Add link to torrent" menu in TrayIconMenu. Closes #2918. (Chocobo1)
|
||||
- FEATURE: Allow to Open files from the properties pane by pressing "Enter" (pmzqla)
|
||||
- FEATURE: Add checkbox option for IpFilterTrackers. (Chocobo1)
|
||||
- FEATURE: Download-from-URL textbox change focus on tab key (Mayank Asthana)
|
||||
- FEATURE: Increase priority value of "High" (pmzqla)
|
||||
- FEATURE: Add 16 KiB, 8 MiB and 16 MiB piece sizes in Torrent Creator (ngosang)
|
||||
- BUGFIX: Disable Auto piece size when creating a new torrent (ngosang)
|
||||
- BUGFIX: Set default focus to cancel button in delete confirm dlg, closes #3085 (Chocobo1)
|
||||
- BUGFIX: Set default focus to ok button in add new torrent dlg (Chocobo1)
|
||||
- BUGFIX: Set default focus to no button in exit confirm box (Chocobo1)
|
||||
- BUGFIX: Fix Start Minimized checkbox in Options (ngosang)
|
||||
- BUGFIX: Remove limits on alternative speeds setting (LazyBui)
|
||||
- BUGFIX: Fix sorting torrents by ETA (pmzqla)
|
||||
- BUGFIX: Improve ratio calculation formula. Closes #3096. (Chocobo1)
|
||||
- BUGFIX: Clear missing files flag when resuming or force rechecking. Fixes issues in #2750. (sledgehammer999)
|
||||
- BUGFIX: Delete tempfile when downloading favicon.ico. Closes #3257. (sledgehammer999)
|
||||
- BUGFIX: Don't close downloadFromURL dialog when showing empty url warning (Chocobo1)
|
||||
- BUGFIX: Minimize to tray only if the relevant option is enabled. (sledgehammer999)
|
||||
- BUGFIX: Update disk space label after changing partition, closes #3309. (Chocobo1)
|
||||
- BUGFIX: Don't use a default upload limit. Closes #3275. (sledgehammer999)
|
||||
- BUGFIX: Fix Properties bar size when started minimized to tray. Closes #3206. (sledgehammer999)
|
||||
- COSMETIC: Change option text "Confirmation on exit when torrents are active" (Chocobo1)
|
||||
- COSMETIC: Enable to choose dark/light tray icons on all platforms. (Chocobo1)
|
||||
- COSMETIC: Use AllUppercase for label text (Chocobo1)
|
||||
- COSMETIC: changes in typography (ngosang)
|
||||
- COSMETIC: Menu revamp (Chocobo1)
|
||||
- COSMETIC: Revamp general tab info (Chocobo1)
|
||||
- COSMETIC: Better update message for users (Chocobo1)
|
||||
- COSMETIC: Fix ugly 'C++' wrapping in About dialog. (glassez)
|
||||
- WEBUI: Fix login and logout relative URLs (ngosang)
|
||||
- WEBUI: Fix resumeAll and pauseAll. Closes #3016 (ngosang)
|
||||
- WEBUI: Changes in title bar (ngosang)
|
||||
- WEBUI: Complete translatable strings (ngosang)
|
||||
- WEBUI: Minor changes in style (ngosang)
|
||||
- WEBUI: Fix Max connections and Time active in transfer information (ngosang)
|
||||
- WEBUI: New config - Global maximum number of upload slots (ngosang)
|
||||
- WEBUI: Display wasted data with friendly units. Closes #2994 (ngosang)
|
||||
- WEBUI: add delay in shutdown command in order to send out response msg (Chocobo1)
|
||||
- WEBUI: Option to hide Top Toolbar (ngosang)
|
||||
- WEBUI: Reorder the tabs/groups in Options window (ngosang)
|
||||
- WEBUI: Add new options (ngosang)
|
||||
- WEBUI: Increase API_VERSION due to changes in #3279, #3197, #3226 and #3040 (ngosang)
|
||||
- WEBUI: Add Web Seeds (HTTP Sources) tab (ngosang)
|
||||
- WEBUI: Don't update the tabs if tab's panel is collapsed (ngosang)
|
||||
- WEBUI: Fix alternative global rate limits. (ngosang)
|
||||
- SEARCH: Fix thepiratebay. Closes #3012 (ngosang)
|
||||
- SEARCH: Improve torrentz engine to return more results (ngosang)
|
||||
- SEARCH: Change width of columns in search tab. Closes #764 (ngosang)
|
||||
- SEARCH: Make strings translatable in seach engine (ngosang)
|
||||
- SEARCH: Aborting search engine process during closure. Close #2671 (DoumanAsh)
|
||||
- SEARCH: Perform searches in parallel (DoumanAsh)
|
||||
- SEARCH: Add Demonoid search engine (ngosang)
|
||||
- SEARCH: Minor fixes in search engines (ngosang)
|
||||
- SEARCH: Show the version of search engines (ngosang)
|
||||
- SEARCH: Update Legit Torrent to remove sgmllib (DoumanAsh)
|
||||
- SEARCH: Update KickassTorrents (ngosang)
|
||||
- SEARCH: Update BTDigg (ngosang)
|
||||
- SEARCH: Update Torrentz (ngosang)
|
||||
- SEARCH: Update ExtraTorrent (ngosang)
|
||||
- SEARCH: Update TorrentReactor (ngosang)
|
||||
- SEARCH: Fix Python 2 implementation of Torrentz (ngosang)
|
||||
- SEARCH: Cosmetic changes in search engine (ngosang)
|
||||
- SEARCH: Fix column sort in search engine. Closes #2621 (ngosang)
|
||||
- RSS: Update matching RSS articles while editing rules (pmzqla)
|
||||
- WINDOWS: Fix python detection from registry when multiple versions are installed (sledgehammer999)
|
||||
- LINUX: Fixes Linux issue for when the theme doesn't have a corresponding icon. (sledgehammer999)
|
||||
- OTHER: Correctly detect FreeBSD when configuring. (sledgehammer999, yurivict)
|
||||
- OTHER: Add translator to credits.
|
||||
- OTHER: New translation: Indonesian.
|
||||
- OTHER: Split Chinese locales into Chinese Simplified, Chinese Traditional(Taiwan), Chinese Traditional(Hong Kong). (sledgehammer999)
|
||||
|
||||
* Sun May 10 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.0
|
||||
- FEATURE: Show actual protocol for listen success/failure in the log. Needs libtorrent v1.0.0 (Gelmir)
|
||||
- FEATURE: Support per tracker re-announce. Needs libtorrent v1.0.0 (Gelmir)
|
||||
|
4
INSTALL
4
INSTALL
@@ -14,7 +14,7 @@ qBittorrent - A BitTorrent client in C++ / Qt4
|
||||
|
||||
- pkg-config executable
|
||||
|
||||
- libtorrent-rasterbar by Arvid Norberg (>= 0.15.0)
|
||||
- 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.
|
||||
|
||||
@@ -44,7 +44,7 @@ qBittorrent - A BitTorrent client in C++ / Qt4
|
||||
|
||||
- pkg-config executable
|
||||
|
||||
- libtorrent-rasterbar by Arvid Norberg (>= v0.15.0)
|
||||
- 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,9 +1,10 @@
|
||||
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:
|
||||
### Description:
|
||||
qBittorrent is a bittorrent client programmed in C++ / Qt that uses
|
||||
libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
|
||||
|
||||
@@ -31,6 +32,9 @@ http://www.qbittorrent.org
|
||||
or our wiki here:
|
||||
http://wiki.qbittorrent.org
|
||||
|
||||
Use the forum for troubleshooting before reporting bugs:
|
||||
http://forum.qbittorrent.org
|
||||
|
||||
Please report any bug (or feature request) to:
|
||||
http://bugs.qbittorrent.org
|
||||
|
||||
@@ -39,4 +43,3 @@ You can also meet me (sledgehammer_999) on IRC:
|
||||
|
||||
------------------------------------------
|
||||
sledgehammer999 <sledgehammer999@qbittorrent.org>
|
||||
|
||||
|
63
configure
vendored
63
configure
vendored
@@ -1390,13 +1390,13 @@ Optional Packages:
|
||||
--with-geoip-database-embedded
|
||||
Embed the GeoIP database in the qBittorrent
|
||||
executable (please follow instructions in
|
||||
src/geoip/README) (default=no)
|
||||
src/gui/geoip/README) (default=no)
|
||||
--with-qtsingleapplication=[system|shipped]
|
||||
Use the shipped qtsingleapplication library or the
|
||||
system one (default=shipped)
|
||||
--with-qjson=[system|shipped]
|
||||
Use the shipped qjson library or the system one
|
||||
(default=shipped) (Qt4 only
|
||||
(default=shipped) (Qt4 only)
|
||||
--with-boost[=ARG] use Boost library from a standard location
|
||||
(ARG=yes), from the specified location (ARG=<path>),
|
||||
or disable it (ARG=no) [ARG=yes]
|
||||
@@ -3275,7 +3275,7 @@ IFS=$ac_save_IFS
|
||||
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
am__api_version='1.14'
|
||||
am__api_version='1.15'
|
||||
|
||||
# Find a good install program. We prefer a C program (faster),
|
||||
# so one script is as good as another. But avoid the broken or
|
||||
@@ -3464,7 +3464,7 @@ else
|
||||
$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
|
||||
fi
|
||||
|
||||
if test x"${install_sh}" != xset; then
|
||||
if test x"${install_sh+set}" != xset; then
|
||||
case $am_aux_dir in
|
||||
*\ * | *\ *)
|
||||
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
||||
@@ -3855,8 +3855,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
|
||||
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
|
||||
mkdir_p='$(MKDIR_P)'
|
||||
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
# We need awk for the "check" target (and possibly the TAP driver). The
|
||||
# system "awk" is bad on some platforms.
|
||||
# Always define AMTAR for backward compatibility. Yes, it's still used
|
||||
# in the wild :-( We should find a proper way to deprecate it ...
|
||||
AMTAR='$${TAR-tar}'
|
||||
@@ -4263,7 +4263,7 @@ fi
|
||||
# Detect OS
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OS is FreeBSD" >&5
|
||||
$as_echo_n "checking whether OS is FreeBSD... " >&6; }
|
||||
if test "x$host_os" = "x*FreeBSD*"; then :
|
||||
if expr "$host_os" : ".*freebsd.*" > /dev/null; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
LIBS="-lexecinfo $LIBS"
|
||||
@@ -5294,8 +5294,8 @@ $as_echo "$as_me: Boost.System LIB: $BOOST_SYSTEM_LIB" >&6;}
|
||||
LIBS="$BOOST_SYSTEM_LIB $LIBS"
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compile using libtorrent-raser 0.16.x" >&5
|
||||
$as_echo_n "checking whether to compile using libtorrent-raser 0.16.x... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compile using libtorrent-rasterbar 0.16.x" >&5
|
||||
$as_echo_n "checking whether to compile using libtorrent-rasterbar 0.16.x... " >&6; }
|
||||
case "x$with_libtorrent_rasterbar0_16" in #(
|
||||
"xno") :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
@@ -5309,12 +5309,12 @@ if test -n "$libtorrent_CFLAGS"; then
|
||||
pkg_cv_libtorrent_CFLAGS="$libtorrent_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.0.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.0.0") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.0.6\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.0.6") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 1.0.0" 2>/dev/null`
|
||||
pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 1.0.6" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@@ -5326,12 +5326,12 @@ if test -n "$libtorrent_LIBS"; then
|
||||
pkg_cv_libtorrent_LIBS="$libtorrent_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.0.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.0.0") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.0.6\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.0.6") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 1.0.0" 2>/dev/null`
|
||||
pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 1.0.6" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@@ -5352,14 +5352,14 @@ else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 1.0.0" 2>&1`
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 1.0.6" 2>&1`
|
||||
else
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 1.0.0" 2>&1`
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 1.0.6" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$libtorrent_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "Package requirements (libtorrent-rasterbar >= 1.0.0) were not met:
|
||||
as_fn_error $? "Package requirements (libtorrent-rasterbar >= 1.0.6) were not met:
|
||||
|
||||
$libtorrent_PKG_ERRORS
|
||||
|
||||
@@ -5404,12 +5404,12 @@ if test -n "$libtorrent_CFLAGS"; then
|
||||
pkg_cv_libtorrent_CFLAGS="$libtorrent_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 0.16.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 0.16.0") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 0.16.19\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 0.16.19") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 0.16.0" 2>/dev/null`
|
||||
pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 0.16.19" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@@ -5421,12 +5421,12 @@ if test -n "$libtorrent_LIBS"; then
|
||||
pkg_cv_libtorrent_LIBS="$libtorrent_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 0.16.0\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 0.16.0") 2>&5
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 0.16.19\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 0.16.19") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 0.16.0" 2>/dev/null`
|
||||
pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 0.16.19" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
@@ -5447,14 +5447,14 @@ else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 0.16.0" 2>&1`
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 0.16.19" 2>&1`
|
||||
else
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 0.16.0" 2>&1`
|
||||
libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 0.16.19" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$libtorrent_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "Package requirements (libtorrent-rasterbar >= 0.16.0) were not met:
|
||||
as_fn_error $? "Package requirements (libtorrent-rasterbar >= 0.16.19) were not met:
|
||||
|
||||
$libtorrent_PKG_ERRORS
|
||||
|
||||
@@ -5801,15 +5801,18 @@ _ACEOF
|
||||
|
||||
# Original extract() function contributed by pmzqla
|
||||
# $*: Strings to parse
|
||||
# Set $DEFINES, $INCLUDES, $OTHER
|
||||
# Set $QBT_CONF_DEFINES, $QBT_CONF_INCLUDES, $QBT_CONF_EXTRA_CFLAGS
|
||||
extract() {
|
||||
if [ -z "$*" ]; then
|
||||
echo "Input string required"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Convert " -" to "\n" if not between quotes
|
||||
string=$(echo " $*" | $SED -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g")
|
||||
# BSD sed needs an actual newline character in the substitute command
|
||||
new_line='
|
||||
'
|
||||
# Convert " -" to "\n" if not between quotes and remove possible leading white spaces
|
||||
string=$(echo " $*" | $SED -e "s: -:\\${new_line}:g" -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[:space:]*//')
|
||||
SAVEIFS=$IFS
|
||||
IFS=$(printf "\n\b")
|
||||
for i in $string; do
|
||||
|
21
configure.ac
21
configure.ac
@@ -26,7 +26,7 @@ AC_ARG_WITH(libtorrent-rasterbar0.16,
|
||||
|
||||
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/geoip/README) (default=no)])],
|
||||
[Embed the GeoIP database in the qBittorrent executable (please follow instructions in src/gui/geoip/README) (default=no)])],
|
||||
[],
|
||||
[with_geoip_database_embedded=no])
|
||||
|
||||
@@ -38,7 +38,7 @@ AC_ARG_WITH(qtsingleapplication,
|
||||
|
||||
AC_ARG_WITH(qjson,
|
||||
[AS_HELP_STRING([--with-qjson=@<:@system|shipped@:>@],
|
||||
[Use the shipped qjson library or the system one (default=shipped) (Qt4 only])],
|
||||
[Use the shipped qjson library or the system one (default=shipped) (Qt4 only)])],
|
||||
[],
|
||||
[with_qjson=shipped])
|
||||
|
||||
@@ -74,7 +74,7 @@ AC_ARG_ENABLE(qt-dbus,
|
||||
|
||||
# Detect OS
|
||||
AC_MSG_CHECKING([whether OS is FreeBSD])
|
||||
AS_IF([test "x$host_os" = "x*FreeBSD*"],
|
||||
AS_IF([expr "$host_os" : ".*freebsd.*" > /dev/null],
|
||||
[AC_MSG_RESULT([yes])
|
||||
LIBS="-lexecinfo $LIBS"],
|
||||
[AC_MSG_RESULT([no])])
|
||||
@@ -181,18 +181,18 @@ 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-raser 0.16.x])
|
||||
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.0],
|
||||
[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.0],
|
||||
[libtorrent-rasterbar >= 0.16.19],
|
||||
[CPPFLAGS="$libtorrent_CFLAGS $CPPFLAGS"
|
||||
LIBS="$libtorrent_LIBS $LIBS"])],
|
||||
[AC_MSG_RESULT([$with_libtorrent_rasterbar0_16])
|
||||
@@ -251,15 +251,18 @@ AX_DEFINE_DIR([EXPAND_MANDIR], [mandir])
|
||||
|
||||
# Original extract() function contributed by pmzqla
|
||||
# $*: Strings to parse
|
||||
# Set $DEFINES, $INCLUDES, $OTHER
|
||||
# Set $QBT_CONF_DEFINES, $QBT_CONF_INCLUDES, $QBT_CONF_EXTRA_CFLAGS
|
||||
extract() {
|
||||
if [[ -z "$*" ]]; then
|
||||
echo "Input string required"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Convert " -" to "\n" if not between quotes
|
||||
string=$(echo " $*" | $SED -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g")
|
||||
# BSD sed needs an actual newline character in the substitute command
|
||||
new_line='
|
||||
'
|
||||
# Convert " -" to "\n" if not between quotes and remove possible leading white spaces
|
||||
string=$(echo " $*" | $SED -e "s: -:\\${new_line}:g" -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[[:space:]]*//')
|
||||
SAVEIFS=$IFS
|
||||
IFS=$(printf "\n\b")
|
||||
for i in $string; do
|
||||
|
4
dist/mac/Info.plist
vendored
4
dist/mac/Info.plist
vendored
@@ -45,7 +45,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.2.0</string>
|
||||
<string>3.2.5</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>qBit</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
@@ -59,7 +59,7 @@
|
||||
<key>NSAppleScriptEnabled</key>
|
||||
<string>YES</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2006-2013 The qBittorrent project</string>
|
||||
<string>Copyright © 2006-2015 The qBittorrent project</string>
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
2
dist/unix/qBittorrent.appdata.xml
vendored
2
dist/unix/qBittorrent.appdata.xml
vendored
@@ -57,5 +57,5 @@
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<url type="homepage">http://www.qbittorrent.org/</url>
|
||||
<updatecontact>sledgehammer999@qbittorrent.org</updatecontact>
|
||||
<update_contact>sledgehammer999@qbittorrent.org</update_contact>
|
||||
</component>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
;Installer strings
|
||||
;Installer strings
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_GERMAN} "qBittorrent (erforderlich)"
|
||||
@@ -44,6 +44,6 @@ LangString remove_cache ${LANG_GERMAN} "Torrents und zwischengespeicherte Daten
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_GERMAN} "qBittorrent läuft gerade. Bitte das Programm vor der Deinstallation beenden."
|
||||
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_GERMAN} "Dateiverknüfung mit .torrent-Dateien konnte nicht entfernt werden, da dieser Typ mit diesem Programm verknüpft ist:"
|
||||
LangString uninst_tor_warn ${LANG_GERMAN} "Dateiverknüpfung mit .torrent-Dateien konnte nicht entfernt werden, da dieser Typ mit diesem Programm verknüpft ist:"
|
||||
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_GERMAN} "Dateiverknüfung mit Magnet-Links konnte nicht entfernt werden, da dieser Typ mit diesem Programm verknüpft ist:"
|
||||
LangString uninst_mag_warn ${LANG_GERMAN} "Dateiverknüpfung mit Magnet-Links konnte nicht entfernt werden, da dieser Typ mit diesem Programm verknüpft ist:"
|
||||
|
4
dist/windows/options.nsi
vendored
4
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.2.0"
|
||||
!define PROG_VERSION "3.2.5"
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
|
||||
!define MUI_FINISHPAGE_RUN_TEXT $(launch_qbt)
|
||||
@@ -33,7 +33,7 @@ OutFile "qbittorrent_${PROG_VERSION}_setup.exe"
|
||||
;Installer Version Information
|
||||
VIAddVersionKey "ProductName" "qBittorrent"
|
||||
VIAddVersionKey "CompanyName" "The qBittorrent project"
|
||||
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2014 The qBittorrent project"
|
||||
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2015 The qBittorrent project"
|
||||
VIAddVersionKey "FileDescription" "qBittorrent - A Bittorrent Client"
|
||||
VIAddVersionKey "FileVersion" "${PROG_VERSION}"
|
||||
|
||||
|
@@ -33,7 +33,7 @@
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 23
|
||||
#serial 26
|
||||
|
||||
AC_DEFUN([AX_BOOST_BASE],
|
||||
[
|
||||
@@ -92,8 +92,11 @@ if test "x$want_boost" = "xyes"; then
|
||||
libsubdirs="lib"
|
||||
ax_arch=`uname -m`
|
||||
case $ax_arch in
|
||||
x86_64|ppc64|s390x|sparc64|aarch64)
|
||||
libsubdirs="lib64 lib lib64"
|
||||
x86_64)
|
||||
libsubdirs="lib64 libx32 lib lib64"
|
||||
;;
|
||||
ppc64|s390x|sparc64|aarch64|ppc64le)
|
||||
libsubdirs="lib64 lib lib64 ppc64le"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -170,6 +173,10 @@ if test "x$want_boost" = "xyes"; then
|
||||
dnl if we found no boost with system layout we search for boost libraries
|
||||
dnl built and installed without the --layout=system option or for a staged(not installed) version
|
||||
if test "x$succeeded" != "xyes"; then
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
BOOST_CPPFLAGS=
|
||||
BOOST_LDFLAGS=
|
||||
_version=0
|
||||
if test "$ac_boost_path" != ""; then
|
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
|
||||
@@ -182,6 +189,12 @@ if test "x$want_boost" = "xyes"; then
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
|
||||
done
|
||||
dnl if nothing found search for layout used in Windows distributions
|
||||
if test -z "$BOOST_CPPFLAGS"; then
|
||||
if test -d "$ac_boost_path/boost" && test -r "$ac_boost_path/boost"; then
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "$cross_compiling" != yes; then
|
||||
|
@@ -222,10 +222,10 @@ bool Application::event(QEvent *ev)
|
||||
// Get the url instead
|
||||
path = static_cast<QFileOpenEvent *>(ev)->url().toString();
|
||||
qDebug("Received a mac file open event: %s", qPrintable(path));
|
||||
if (running_)
|
||||
if (m_running)
|
||||
processParams(QStringList(path));
|
||||
else
|
||||
paramsQueue_.append(path);
|
||||
m_paramsQueue.append(path);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
@@ -253,6 +253,7 @@ void Application::initializeTranslation()
|
||||
Preferences* const pref = Preferences::instance();
|
||||
// Load translation
|
||||
QString locale = pref->getLocale();
|
||||
|
||||
if (locale.isEmpty()) {
|
||||
locale = QLocale::system().name();
|
||||
pref->setLocale(locale);
|
||||
|
@@ -379,7 +379,7 @@ QString makeUsage(const QString &prg_name)
|
||||
#endif
|
||||
text += QLatin1String("\t-h | --help\t\t") + QObject::tr("Displays this help message") + QLatin1Char('\n');
|
||||
text += QLatin1String("\t--webui-port=<port>\t")
|
||||
+ QObject::tr("Changes the webui port (current: %1)").arg(QString::number(Preferences::instance()->getWebUiPort()))
|
||||
+ QObject::tr("Changes the Web UI port (current: %1)").arg(QString::number(Preferences::instance()->getWebUiPort()))
|
||||
+ QLatin1Char('\n');
|
||||
#ifndef DISABLE_GUI
|
||||
text += QLatin1String("\t--no-splash\t\t") + QObject::tr("Disable splash screen") + QLatin1Char('\n');
|
||||
|
@@ -41,6 +41,7 @@
|
||||
|
||||
#include "qtlocalpeer.h"
|
||||
#include <QCoreApplication>
|
||||
#include <QDataStream>
|
||||
#include <QTime>
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
|
@@ -23,7 +23,8 @@ HEADERS += \
|
||||
$$PWD/http/responsegenerator.h \
|
||||
$$PWD/http/server.h \
|
||||
$$PWD/http/types.h \
|
||||
$$PWD/http/responsebuilder.h
|
||||
$$PWD/http/responsebuilder.h \
|
||||
$$PWD/unicodestrings.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/downloadthread.cpp \
|
||||
|
@@ -76,7 +76,7 @@ void DNSUpdater::checkPublicIP()
|
||||
m_lastIPCheckTime = QDateTime::currentDateTime();
|
||||
QNetworkRequest request;
|
||||
request.setUrl(QUrl("http://checkip.dyndns.org"));
|
||||
request.setRawHeader("User-Agent", "qBittorrent/" VERSION" chris@qbittorrent.org");
|
||||
request.setRawHeader("User-Agent", "qBittorrent/" VERSION);
|
||||
manager->get(request);
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ void DNSUpdater::updateDNSService()
|
||||
m_lastIPCheckTime = QDateTime::currentDateTime();
|
||||
QNetworkRequest request;
|
||||
request.setUrl(getUpdateUrl());
|
||||
request.setRawHeader("User-Agent", "qBittorrent/" VERSION" chris@qbittorrent.org");
|
||||
request.setRawHeader("User-Agent", "qBittorrent/" VERSION);
|
||||
manager->get(request);
|
||||
}
|
||||
|
||||
|
@@ -191,9 +191,10 @@ QNetworkReply* DownloadThread::downloadUrl(const QString &url, const QList<QNetw
|
||||
qDebug("url is %s", qPrintable(url));
|
||||
const QUrl qurl = QUrl::fromEncoded(url.toUtf8());
|
||||
QNetworkRequest request(qurl);
|
||||
// Spoof Firefox 3.5 user agent to avoid
|
||||
// Web server banning
|
||||
request.setRawHeader("User-Agent", "Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5");
|
||||
// Spoof Firefox 38 user agent to avoid web server banning
|
||||
request.setRawHeader("User-Agent", "Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0");
|
||||
// Spoof HTTP Referer to allow adding torrent link from Torcache/KickAssTorrents
|
||||
request.setRawHeader("Referer", request.url().toEncoded().data());
|
||||
qDebug("Downloading %s...", request.url().toEncoded().data());
|
||||
qDebug("%d cookies for this URL", m_networkManager.cookieJar()->cookiesForUrl(url).size());
|
||||
for (int i=0; i<m_networkManager.cookieJar()->cookiesForUrl(url).size(); ++i) {
|
||||
@@ -277,7 +278,7 @@ QString DownloadThread::errorCodeToString(QNetworkReply::NetworkError status) {
|
||||
case QNetworkReply::ProxyTimeoutError:
|
||||
return tr("The connection to the proxy timed out or the proxy did not reply in time to the request sent");
|
||||
case QNetworkReply::ProxyAuthenticationRequiredError:
|
||||
return tr("The proxy requires authentication in order to honour the request but did not accept any credentials offered");
|
||||
return tr("The proxy requires authentication in order to honor the request but did not accept any credentials offered");
|
||||
case QNetworkReply::ContentAccessDenied:
|
||||
return tr("The access to the remote content was denied (401)");
|
||||
case QNetworkReply::ContentOperationNotPermittedError:
|
||||
|
@@ -62,13 +62,15 @@
|
||||
#include <winbase.h>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
#include <QDesktopServices>
|
||||
#endif
|
||||
|
||||
#else
|
||||
#include <QStandardPaths>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
@@ -187,6 +189,27 @@ bool fsutils::forceRemove(const QString& file_path) {
|
||||
return f.remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes directory and its content recursively.
|
||||
*
|
||||
*/
|
||||
void fsutils::removeDirRecursive(const QString& dirName) {
|
||||
QDir dir(dirName);
|
||||
|
||||
if (!dir.exists()) return;
|
||||
|
||||
Q_FOREACH(QFileInfo info, dir.entryInfoList(QDir::NoDotAndDotDot |
|
||||
QDir::System |
|
||||
QDir::Hidden |
|
||||
QDir::AllDirs |
|
||||
QDir::Files, QDir::DirsFirst)) {
|
||||
if (info.isDir()) removeDirRecursive(info.absoluteFilePath());
|
||||
else forceRemove(info.absoluteFilePath());
|
||||
}
|
||||
|
||||
dir.rmdir(dirName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the size of a file.
|
||||
* If the file is a folder, it will compute its size based on its content.
|
||||
@@ -443,62 +466,76 @@ QString fsutils::QDesktopServicesCacheLocation() {
|
||||
return result;
|
||||
}
|
||||
|
||||
QString fsutils::QDesktopServicesDownloadLocation() {
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
||||
// as long as it stays WinXP like we do the same on OS/2
|
||||
// TODO: Use IKnownFolderManager to get path of FOLDERID_Downloads
|
||||
// instead of hardcoding "Downloads"
|
||||
// Unfortunately, this would break compatibility with WinXP
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
|
||||
return QDir(QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation)).absoluteFilePath(
|
||||
QCoreApplication::translate("fsutils", "Downloads"));
|
||||
#else
|
||||
return QDir(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)).absoluteFilePath(
|
||||
QCoreApplication::translate("fsutils", "Downloads"));
|
||||
QString fsutils::QDesktopServicesDownloadLocation()
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
#if defined(Q_OS_WIN)
|
||||
if (QSysInfo::windowsVersion() <= QSysInfo::WV_XP) // Windows XP
|
||||
return QDir(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)).absoluteFilePath(
|
||||
QCoreApplication::translate("fsutils", "Downloads"));
|
||||
#endif
|
||||
return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
|
||||
#else
|
||||
|
||||
#if defined(Q_OS_OS2)
|
||||
return QDir(QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation)).absoluteFilePath(
|
||||
QCoreApplication::translate("fsutils", "Downloads"));
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
// as long as it stays WinXP like we do the same on OS/2
|
||||
// TODO: Use IKnownFolderManager to get path of FOLDERID_Downloads
|
||||
// instead of hardcoding "Downloads"
|
||||
// Unfortunately, this would break compatibility with WinXP
|
||||
if (QSysInfo::windowsVersion() <= QSysInfo::WV_XP) // Windows XP
|
||||
return QDir(QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation)).absoluteFilePath(
|
||||
QCoreApplication::translate("fsutils", "Downloads"));
|
||||
else
|
||||
return QDir(QDesktopServices::storageLocation(QDesktopServices::HomeLocation)).absoluteFilePath("Downloads");
|
||||
#endif
|
||||
|
||||
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
||||
QString save_path;
|
||||
// Default save path on Linux
|
||||
QString config_path = QString::fromLocal8Bit(qgetenv("XDG_CONFIG_HOME").constData());
|
||||
if (config_path.isEmpty())
|
||||
config_path = QDir::home().absoluteFilePath(".config");
|
||||
QString save_path;
|
||||
// Default save path on Linux
|
||||
QString config_path = QString::fromLocal8Bit(qgetenv("XDG_CONFIG_HOME").constData());
|
||||
if (config_path.isEmpty())
|
||||
config_path = QDir::home().absoluteFilePath(".config");
|
||||
|
||||
QString user_dirs_file = config_path + "/user-dirs.dirs";
|
||||
if (QFile::exists(user_dirs_file)) {
|
||||
QSettings settings(user_dirs_file, QSettings::IniFormat);
|
||||
// We need to force UTF-8 encoding here since this is not
|
||||
// the default for Ini files.
|
||||
settings.setIniCodec("UTF-8");
|
||||
QString xdg_download_dir = settings.value("XDG_DOWNLOAD_DIR").toString();
|
||||
if (!xdg_download_dir.isEmpty()) {
|
||||
// Resolve $HOME environment variables
|
||||
xdg_download_dir.replace("$HOME", QDir::homePath());
|
||||
save_path = xdg_download_dir;
|
||||
qDebug() << Q_FUNC_INFO << "SUCCESS: Using XDG path for downloads: " << save_path;
|
||||
QString user_dirs_file = config_path + "/user-dirs.dirs";
|
||||
if (QFile::exists(user_dirs_file)) {
|
||||
QSettings settings(user_dirs_file, QSettings::IniFormat);
|
||||
// We need to force UTF-8 encoding here since this is not
|
||||
// the default for Ini files.
|
||||
settings.setIniCodec("UTF-8");
|
||||
QString xdg_download_dir = settings.value("XDG_DOWNLOAD_DIR").toString();
|
||||
if (!xdg_download_dir.isEmpty()) {
|
||||
// Resolve $HOME environment variables
|
||||
xdg_download_dir.replace("$HOME", QDir::homePath());
|
||||
save_path = xdg_download_dir;
|
||||
qDebug() << Q_FUNC_INFO << "SUCCESS: Using XDG path for downloads: " << save_path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback
|
||||
if (!save_path.isEmpty() && !QFile::exists(save_path)) {
|
||||
QDir().mkpath(save_path);
|
||||
}
|
||||
// Fallback
|
||||
if (!save_path.isEmpty() && !QFile::exists(save_path)) {
|
||||
QDir().mkpath(save_path);
|
||||
}
|
||||
|
||||
if (save_path.isEmpty() || !QFile::exists(save_path)) {
|
||||
save_path = QDir::home().absoluteFilePath(QCoreApplication::translate("fsutils", "Downloads"));
|
||||
qDebug() << Q_FUNC_INFO << "using" << save_path << "as fallback since the XDG detection did not work";
|
||||
}
|
||||
if (save_path.isEmpty() || !QFile::exists(save_path)) {
|
||||
save_path = QDir::home().absoluteFilePath(QCoreApplication::translate("fsutils", "Downloads"));
|
||||
qDebug() << Q_FUNC_INFO << "using" << save_path << "as fallback since the XDG detection did not work";
|
||||
}
|
||||
|
||||
return save_path;
|
||||
return save_path;
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
// TODO: How to support this on Mac OS X?
|
||||
#if defined(Q_OS_MAC)
|
||||
// TODO: How to support this on Mac OS?
|
||||
#endif
|
||||
|
||||
// Fallback
|
||||
return QDir::home().absoluteFilePath(QCoreApplication::translate("fsutils", "Downloads"));
|
||||
// Fallback
|
||||
return QDir::home().absoluteFilePath(QCoreApplication::translate("fsutils", "Downloads"));
|
||||
#endif
|
||||
}
|
||||
|
||||
QString fsutils::searchEngineLocation() {
|
||||
|
@@ -57,6 +57,7 @@ namespace fsutils
|
||||
bool isValidTorrentFile(const QString& path);
|
||||
bool smartRemoveEmptyFolderTree(const QString& dir_path);
|
||||
bool forceRemove(const QString& file_path);
|
||||
void removeDirRecursive(const QString& dirName);
|
||||
|
||||
/* Ported from Qt4 to drop dependency on QtGui */
|
||||
QString QDesktopServicesDataLocation();
|
||||
|
@@ -79,9 +79,8 @@ RequestParser::ErrorCode RequestParser::parseHttpRequest(const QByteArray& data,
|
||||
}
|
||||
|
||||
// Parse HTTP request message
|
||||
int content_length = 0;
|
||||
if (m_request.headers.contains("content-length")) {
|
||||
content_length = m_request.headers["content-length"].toInt();
|
||||
int content_length = m_request.headers["content-length"].toInt();
|
||||
if (content_length > static_cast<int>(m_maxContentLength)) {
|
||||
qWarning() << Q_FUNC_INFO << "bad request: message too long";
|
||||
return BadRequest;
|
||||
@@ -331,16 +330,22 @@ bool RequestParser::parseFormData(const QByteArray& data)
|
||||
|
||||
bool RequestParser::parseHeaderValue(const QString& value, QStringMap& out)
|
||||
{
|
||||
QStringList items = value.split(QLatin1Char(';'));
|
||||
out[""] = items[0];
|
||||
|
||||
for (QStringList::size_type i = 1; i < items.size(); ++i) {
|
||||
int pos = items[i].indexOf("=");
|
||||
if (pos < 0)
|
||||
return false;
|
||||
|
||||
out[items[i].left(pos).trimmed()] = unquoted(items[i].mid(pos + 1).trimmed());
|
||||
int pos = value.indexOf(QLatin1Char(';'));
|
||||
if (pos == -1) {
|
||||
out[""] = value.trimmed();
|
||||
return true;
|
||||
}
|
||||
|
||||
out[""] = value.left(pos).trimmed();
|
||||
|
||||
QRegExp rx(";\\s*([^=;\"]+)\\s*=\\s*(\"[^\"]*\"|[^\";\\s]+)\\s*");
|
||||
while (rx.indexIn(value, pos) == pos) {
|
||||
out[rx.cap(1).trimmed()] = unquoted(rx.cap(2));
|
||||
pos += rx.cap(0).length();
|
||||
}
|
||||
|
||||
if (pos != value.length())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@@ -47,7 +47,8 @@ const QString HEADER_CACHE_CONTROL = "Cache-Control";
|
||||
const QString CONTENT_TYPE_CSS = "text/css; charset=UTF-8";
|
||||
const QString CONTENT_TYPE_GIF = "image/gif";
|
||||
const QString CONTENT_TYPE_HTML = "text/html; charset=UTF-8";
|
||||
const QString CONTENT_TYPE_JS = "text/javascript; charset=UTF-8";
|
||||
const QString CONTENT_TYPE_JS = "application/javascript; charset=UTF-8";
|
||||
const QString CONTENT_TYPE_JSON = "application/json";
|
||||
const QString CONTENT_TYPE_PNG = "image/png";
|
||||
const QString CONTENT_TYPE_TXT = "text/plain; charset=UTF-8";
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -41,6 +41,9 @@
|
||||
#include <QUrl>
|
||||
#ifndef DISABLE_GUI
|
||||
#include <QIcon>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
|
||||
#include <QCollator>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <libtorrent/version.hpp>
|
||||
@@ -64,6 +67,7 @@ namespace misc
|
||||
{
|
||||
QString toQString(const std::string &str);
|
||||
QString toQString(const char* str);
|
||||
QString toQString(time_t t, Qt::DateFormat f = Qt::DefaultLocaleLongDate);
|
||||
QString toQStringU(const std::string &str);
|
||||
QString toQStringU(const char* str);
|
||||
QString toQString(const libtorrent::sha1_hash &hash);
|
||||
@@ -81,6 +85,8 @@ namespace misc
|
||||
QPoint screenCenter(QWidget *win);
|
||||
#endif
|
||||
int pythonVersion();
|
||||
QString pythonExecutable();
|
||||
QString pythonVersionComplete();
|
||||
// return best userfriendly storage unit (B, KiB, MiB, GiB, TiB)
|
||||
// use Binary prefix standards from IEC 60027-2
|
||||
// see http://en.wikipedia.org/wiki/Kilobyte
|
||||
@@ -100,11 +106,22 @@ namespace misc
|
||||
QList<int> intListfromStringList(const QStringList &l);
|
||||
QList<bool> boolListfromStringList(const QStringList &l);
|
||||
|
||||
QString toQString(time_t t);
|
||||
QString accurateDoubleToString(const double &n, const int &precision);
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
bool naturalSort(QString left, QString right, bool& result);
|
||||
bool naturalSort(const QString &left, const QString &right, bool &result);
|
||||
|
||||
class NaturalCompare
|
||||
{
|
||||
public:
|
||||
NaturalCompare();
|
||||
bool operator()(const QString &l, const QString &r);
|
||||
bool lessThan(const QString &left, const QString &right);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
|
||||
private:
|
||||
QCollator m_collator;
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
// Implements constant-time comparison to protect against timing attacks
|
||||
@@ -112,6 +129,11 @@ namespace misc
|
||||
bool slowEquals(const QByteArray &a, const QByteArray &b);
|
||||
void loadBencodedFile(const QString &filename, std::vector<char> &buffer, libtorrent::lazy_entry &entry, libtorrent::error_code &ec);
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
void openPath(const QString& absolutePath);
|
||||
void openFolderSelect(const QString& absolutePath);
|
||||
#endif
|
||||
|
||||
void msleep(unsigned long msecs);
|
||||
}
|
||||
|
||||
|
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "preferences.h"
|
||||
#include "qinisettings.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <QCryptographicHash>
|
||||
#include <QPair>
|
||||
@@ -67,12 +68,12 @@ Preferences::Preferences()
|
||||
QStringList keys = settings_new->allKeys();
|
||||
bool use_new = false;
|
||||
|
||||
|
||||
// This means that the PC closed either due to power outage
|
||||
// or because the disk was full. In any case the settings weren't transfered
|
||||
// in their final position. So assume that qbittorrent_new.ini/qbittorrent_new.conf
|
||||
// contains the most recent settings.
|
||||
if (!keys.isEmpty()) {
|
||||
Logger::instance()->addMessage(tr("Detected unclean program exit. Using fallback file to restore settings."), Log::WARNING);
|
||||
use_new = true;
|
||||
dirty = true;
|
||||
}
|
||||
@@ -100,7 +101,9 @@ Preferences::Preferences()
|
||||
//Ensures sync to disk before we attempt to manipulate the files from save().
|
||||
delete settings;
|
||||
#ifndef Q_OS_MAC
|
||||
QString new_path = settings_new->fileName();
|
||||
delete settings_new;
|
||||
fsutils::forceRemove(new_path);
|
||||
|
||||
if (use_new)
|
||||
save();
|
||||
@@ -134,7 +137,7 @@ void Preferences::drop()
|
||||
|
||||
void Preferences::save()
|
||||
{
|
||||
QReadLocker locker(&lock);
|
||||
QWriteLocker locker(&lock);
|
||||
|
||||
if (!dirty)
|
||||
return;
|
||||
@@ -158,11 +161,19 @@ void Preferences::save()
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
settings->sync(); // Important to get error status
|
||||
if (settings->status() == QSettings::AccessError) {
|
||||
QString new_path = settings->fileName();
|
||||
QSettings::Status status = settings->status();
|
||||
|
||||
if (status != QSettings::NoError) {
|
||||
if (status == QSettings::AccessError)
|
||||
Logger::instance()->addMessage(tr("An access error occurred while trying to write the configuration file."), Log::CRITICAL);
|
||||
else
|
||||
Logger::instance()->addMessage(tr("A format error occurred while trying to write the configuration file."), Log::CRITICAL);
|
||||
|
||||
delete settings;
|
||||
fsutils::forceRemove(new_path);
|
||||
return;
|
||||
}
|
||||
QString new_path = settings->fileName();
|
||||
delete settings;
|
||||
QString final_path = new_path;
|
||||
int index = final_path.lastIndexOf("_new", -1, Qt::CaseInsensitive);
|
||||
@@ -295,7 +306,7 @@ void Preferences::setMinimizeToTray(bool b)
|
||||
|
||||
bool Preferences::closeToTray() const
|
||||
{
|
||||
return value("Preferences/General/CloseToTray", false).toBool();
|
||||
return value("Preferences/General/CloseToTray", true).toBool();
|
||||
}
|
||||
|
||||
void Preferences::setCloseToTray(bool b)
|
||||
@@ -627,7 +638,7 @@ int Preferences::getSessionPort() const
|
||||
QReadLocker locker(&lock);
|
||||
if (useRandomPort())
|
||||
return m_randomPort;
|
||||
return value("Preferences/Connection/PortRangeMin", 6881).toInt();
|
||||
return value("Preferences/Connection/PortRangeMin", 8999).toInt();
|
||||
}
|
||||
|
||||
void Preferences::setSessionPort(int port)
|
||||
@@ -659,7 +670,7 @@ void Preferences::setGlobalDownloadLimit(int limit)
|
||||
|
||||
int Preferences::getGlobalUploadLimit() const
|
||||
{
|
||||
return value("Preferences/Connection/GlobalUPLimit", 50).toInt();
|
||||
return value("Preferences/Connection/GlobalUPLimit", -1).toInt();
|
||||
}
|
||||
|
||||
void Preferences::setGlobalUploadLimit(int limit)
|
||||
@@ -858,7 +869,7 @@ void Preferences::setMaxConnecsPerTorrent(int val)
|
||||
|
||||
int Preferences::getMaxUploads() const
|
||||
{
|
||||
return value("Preferences/Bittorrent/MaxUploads", 8).toInt();
|
||||
return value("Preferences/Bittorrent/MaxUploads", -1).toInt();
|
||||
}
|
||||
|
||||
void Preferences::setMaxUploads(int val)
|
||||
@@ -870,7 +881,7 @@ void Preferences::setMaxUploads(int val)
|
||||
|
||||
int Preferences::getMaxUploadsPerTorrent() const
|
||||
{
|
||||
return value("Preferences/Bittorrent/MaxUploadsPerTorrent", 4).toInt();
|
||||
return value("Preferences/Bittorrent/MaxUploadsPerTorrent", -1).toInt();
|
||||
}
|
||||
|
||||
void Preferences::setMaxUploadsPerTorrent(int val)
|
||||
@@ -971,6 +982,16 @@ void Preferences::setFilteringEnabled(bool enabled)
|
||||
setValue("Preferences/IPFilter/Enabled", enabled);
|
||||
}
|
||||
|
||||
bool Preferences::isFilteringTrackerEnabled() const
|
||||
{
|
||||
return value("Preferences/IPFilter/FilterTracker", false).toBool();
|
||||
}
|
||||
|
||||
void Preferences::setFilteringTrackerEnabled(bool enabled)
|
||||
{
|
||||
setValue("Preferences/IPFilter/FilterTracker", enabled);
|
||||
}
|
||||
|
||||
QString Preferences::getFilter() const
|
||||
{
|
||||
return fsutils::fromNativePath(value("Preferences/IPFilter/File").toString());
|
||||
@@ -1020,7 +1041,7 @@ void Preferences::setExecutionLogEnabled(bool b)
|
||||
// Queueing system
|
||||
bool Preferences::isQueueingSystemEnabled() const
|
||||
{
|
||||
return value("Preferences/Queueing/QueueingEnabled", false).toBool();
|
||||
return value("Preferences/Queueing/QueueingEnabled", true).toBool();
|
||||
}
|
||||
|
||||
void Preferences::setQueueingSystemEnabled(bool enabled)
|
||||
@@ -1407,12 +1428,12 @@ void Preferences::setOutgoingPortsMax(uint val)
|
||||
setValue("Preferences/Advanced/OutgoingPortsMax", val);
|
||||
}
|
||||
|
||||
bool Preferences::ignoreLimitsOnLAN() const
|
||||
bool Preferences::getIgnoreLimitsOnLAN() const
|
||||
{
|
||||
return value("Preferences/Advanced/IgnoreLimitsLAN", true).toBool();
|
||||
}
|
||||
|
||||
void Preferences::ignoreLimitsOnLAN(bool ignore)
|
||||
void Preferences::setIgnoreLimitsOnLAN(bool ignore)
|
||||
{
|
||||
setValue("Preferences/Advanced/IgnoreLimitsLAN", ignore);
|
||||
}
|
||||
@@ -1479,7 +1500,7 @@ void Preferences::resolvePeerHostNames(bool resolve)
|
||||
|
||||
int Preferences::getMaxHalfOpenConnections() const
|
||||
{
|
||||
const int val = value("Preferences/Connection/MaxHalfOpenConnec", 50).toInt();
|
||||
const int val = value("Preferences/Connection/MaxHalfOpenConnec", 20).toInt();
|
||||
if (val <= 0)
|
||||
return -1;
|
||||
return val;
|
||||
@@ -1554,7 +1575,7 @@ void Preferences::enableSuperSeeding(bool enabled)
|
||||
|
||||
bool Preferences::announceToAllTrackers() const
|
||||
{
|
||||
return value("Preferences/Advanced/AnnounceToAllTrackers", false).toBool();
|
||||
return value("Preferences/Advanced/AnnounceToAllTrackers", true).toBool();
|
||||
}
|
||||
|
||||
void Preferences::setAnnounceToAllTrackers(bool enabled)
|
||||
@@ -1584,6 +1605,13 @@ void Preferences::setTorrentLabels(const QStringList& labels)
|
||||
setValue("TransferListFilters/customLabels", labels);
|
||||
}
|
||||
|
||||
void Preferences::addTorrentLabelExternal(const QString &label)
|
||||
{
|
||||
addTorrentLabel(label);
|
||||
QString toEmit = label;
|
||||
emit externalLabelAdded(toEmit);
|
||||
}
|
||||
|
||||
void Preferences::addTorrentLabel(const QString& label)
|
||||
{
|
||||
QStringList labels = value("TransferListFilters/customLabels").toStringList();
|
||||
@@ -1636,7 +1664,7 @@ namespace {
|
||||
|
||||
for (DWORD i = 0; i < cSubKeys; ++i) {
|
||||
cName = cMaxSubKeyLen;
|
||||
res = ::RegEnumKeyExW(handle, 0, lpName, &cName, NULL, NULL, NULL, NULL);
|
||||
res = ::RegEnumKeyExW(handle, i, lpName, &cName, NULL, NULL, NULL, NULL);
|
||||
if (res == ERROR_SUCCESS)
|
||||
keys.push_back(QString::fromWCharArray(lpName));
|
||||
}
|
||||
@@ -1750,11 +1778,12 @@ QString Preferences::getPythonPath()
|
||||
return path;
|
||||
|
||||
// Fallback: Detect python from default locations
|
||||
QStringList supported_versions;
|
||||
supported_versions << "32" << "31" << "30" << "27" << "26" << "25";
|
||||
foreach (const QString &v, supported_versions)
|
||||
if (QFile::exists("C:/Python" + v + "/python.exe"))
|
||||
return "C:/Python" + v;
|
||||
const QStringList dirs = QDir("C:/").entryList(QStringList("Python*"), QDir::Dirs, QDir::Name | QDir::Reversed);
|
||||
foreach (const QString &dir, dirs) {
|
||||
const QString path("C:/" + dir + "/");
|
||||
if (QFile::exists(path + "python.exe"))
|
||||
return path;
|
||||
}
|
||||
|
||||
return QString();
|
||||
}
|
||||
@@ -1881,6 +1910,16 @@ void Preferences::setConfirmTorrentDeletion(bool enabled)
|
||||
setValue("Preferences/Advanced/confirmTorrentDeletion", enabled);
|
||||
}
|
||||
|
||||
bool Preferences::confirmTorrentRecheck() const
|
||||
{
|
||||
return value("Preferences/Advanced/confirmTorrentRecheck", true).toBool();
|
||||
}
|
||||
|
||||
void Preferences::setConfirmTorrentRecheck(bool enabled)
|
||||
{
|
||||
setValue("Preferences/Advanced/confirmTorrentRecheck", enabled);
|
||||
}
|
||||
|
||||
TrayIcon::Style Preferences::trayIconStyle() const
|
||||
{
|
||||
return TrayIcon::Style(value("Preferences/Advanced/TrayIconStyle", TrayIcon::NORMAL).toInt());
|
||||
@@ -2176,36 +2215,36 @@ void Preferences::setRssOpenFolders(const QStringList &folders)
|
||||
QByteArray Preferences::getRssHSplitterState() const
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
return value("rss/qt5/splitter_h").toByteArray();
|
||||
return value("Rss/qt5/splitter_h").toByteArray();
|
||||
#else
|
||||
return value("rss/splitter_h").toByteArray();
|
||||
return value("Rss/splitter_h").toByteArray();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Preferences::setRssHSplitterState(const QByteArray &state)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
setValue("rss/qt5/splitter_h", state);
|
||||
setValue("Rss/qt5/splitter_h", state);
|
||||
#else
|
||||
setValue("rss/splitter_h", state);
|
||||
setValue("Rss/splitter_h", state);
|
||||
#endif
|
||||
}
|
||||
|
||||
QByteArray Preferences::getRssVSplitterState() const
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
return value("rss/qt5/splitter_v").toByteArray();
|
||||
return value("Rss/qt5/splitter_v").toByteArray();
|
||||
#else
|
||||
return value("rss/splitter_v").toByteArray();
|
||||
return value("Rss/splitter_v").toByteArray();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Preferences::setRssVSplitterState(const QByteArray &state)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
setValue("rss/qt5/splitter_v", state);
|
||||
setValue("Rss/qt5/splitter_v", state);
|
||||
#else
|
||||
setValue("rss/splitter_v", state);
|
||||
setValue("Rss/splitter_v", state);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -113,6 +113,7 @@ private:
|
||||
|
||||
signals:
|
||||
void changed();
|
||||
void externalLabelAdded(QString&);
|
||||
|
||||
public slots:
|
||||
void save();
|
||||
@@ -282,6 +283,8 @@ public:
|
||||
// IP Filter
|
||||
bool isFilteringEnabled() const;
|
||||
void setFilteringEnabled(bool enabled);
|
||||
bool isFilteringTrackerEnabled() const;
|
||||
void setFilteringTrackerEnabled(bool enabled);
|
||||
QString getFilter() const;
|
||||
void setFilter(const QString &path);
|
||||
QStringList bannedIPs() const;
|
||||
@@ -365,8 +368,8 @@ public:
|
||||
void setOutgoingPortsMin(uint val);
|
||||
uint outgoingPortsMax() const;
|
||||
void setOutgoingPortsMax(uint val);
|
||||
bool ignoreLimitsOnLAN() const;
|
||||
void ignoreLimitsOnLAN(bool ignore);
|
||||
bool getIgnoreLimitsOnLAN() const;
|
||||
void setIgnoreLimitsOnLAN(bool ignore);
|
||||
bool includeOverheadInLimits() const;
|
||||
void includeOverheadInLimits(bool include);
|
||||
bool trackerExchangeEnabled() const;
|
||||
@@ -401,6 +404,7 @@ public:
|
||||
#endif
|
||||
QStringList getTorrentLabels() const;
|
||||
void setTorrentLabels(const QStringList& labels);
|
||||
void addTorrentLabelExternal(const QString &label);
|
||||
void addTorrentLabel(const QString& label);
|
||||
void removeTorrentLabel(const QString& label);
|
||||
bool recursiveDownloadDisabled() const;
|
||||
@@ -424,6 +428,8 @@ public:
|
||||
#endif
|
||||
bool confirmTorrentDeletion() const;
|
||||
void setConfirmTorrentDeletion(bool enabled);
|
||||
bool confirmTorrentRecheck() const;
|
||||
void setConfirmTorrentRecheck(bool enabled);
|
||||
TrayIcon::Style trayIconStyle() const;
|
||||
void setTrayIconStyle(TrayIcon::Style style);
|
||||
|
||||
|
@@ -105,10 +105,7 @@ void QAlertDispatcher::dispatch(QSharedPointer<Tag> tag,
|
||||
return;
|
||||
|
||||
bool was_empty = that->alerts.empty();
|
||||
|
||||
that->alerts.push_back(alert_ptr.get());
|
||||
alert_ptr.release();
|
||||
|
||||
that->alerts.push_back(alert_ptr.release());
|
||||
if (was_empty)
|
||||
that->alerts_condvar.wakeAll();
|
||||
|
||||
|
@@ -51,7 +51,7 @@ int FilterParserThread::parseDATFilterFile(QString filePath, libtorrent::ip_filt
|
||||
QFile file(filePath);
|
||||
if (file.exists()) {
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
std::cerr << "I/O Error: Could not open ip filer file in read mode." << std::endl;
|
||||
std::cerr << "I/O Error: Could not open ip filter file in read mode." << std::endl;
|
||||
return ruleCount;
|
||||
}
|
||||
unsigned int nbLine = 0;
|
||||
@@ -137,7 +137,7 @@ int FilterParserThread::parseP2PFilterFile(QString filePath, libtorrent::ip_filt
|
||||
QFile file(filePath);
|
||||
if (file.exists()) {
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
std::cerr << "I/O Error: Could not open ip filer file in read mode." << std::endl;
|
||||
std::cerr << "I/O Error: Could not open ip filter file in read mode." << std::endl;
|
||||
return ruleCount;
|
||||
}
|
||||
unsigned int nbLine = 0;
|
||||
@@ -229,7 +229,7 @@ int FilterParserThread::parseP2BFilterFile(QString filePath, libtorrent::ip_filt
|
||||
QFile file(filePath);
|
||||
if (file.exists()) {
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
std::cerr << "I/O Error: Could not open ip filer file in read mode." << std::endl;
|
||||
std::cerr << "I/O Error: Could not open ip filter file in read mode." << std::endl;
|
||||
return ruleCount;
|
||||
}
|
||||
QDataStream stream(&file);
|
||||
|
@@ -52,6 +52,7 @@
|
||||
#include "scannedfoldersmodel.h"
|
||||
#include "qtracker.h"
|
||||
#include "logger.h"
|
||||
#include "unicodestrings.h"
|
||||
#ifndef DISABLE_GUI
|
||||
#include "shutdownconfirm.h"
|
||||
#include "geoipmanager.h"
|
||||
@@ -131,7 +132,7 @@ QBtSession::QBtSession()
|
||||
// Construct session
|
||||
s = new session(fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)), 0);
|
||||
//std::cout << "Peer ID: " << fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)).to_string() << std::endl;
|
||||
Logger::instance()->addMessage("Peer ID: "+misc::toQString(fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)).to_string()));
|
||||
Logger::instance()->addMessage(tr("Peer ID: ")+misc::toQString(fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)).to_string()));
|
||||
|
||||
// Set severity level of libtorrent session
|
||||
s->set_alert_mask(alert::error_notification | alert::peer_notification | alert::port_mapping_notification | alert::storage_notification | alert::tracker_notification | alert::status_notification | alert::ip_block_notification | alert::progress_notification | alert::stats_notification);
|
||||
@@ -414,9 +415,9 @@ void QBtSession::configureSession() {
|
||||
// * Session settings
|
||||
session_settings sessionSettings = s->settings();
|
||||
sessionSettings.user_agent = "qBittorrent " VERSION;
|
||||
//std::cout << "HTTP user agent is " << sessionSettings.user_agent << std::endl;
|
||||
logger->addMessage(tr("HTTP user agent is %1").arg(misc::toQString(sessionSettings.user_agent)));
|
||||
logger->addMessage(tr("HTTP User-Agent is %1").arg(misc::toQString(sessionSettings.user_agent)));
|
||||
|
||||
sessionSettings.apply_ip_filter_to_trackers = pref->isFilteringTrackerEnabled();
|
||||
sessionSettings.upnp_ignore_nonrouters = true;
|
||||
sessionSettings.use_dht_as_fallback = false;
|
||||
// Disable support for SSL torrents for now
|
||||
@@ -449,23 +450,17 @@ void QBtSession::configureSession() {
|
||||
if (pref->isQueueingSystemEnabled()) {
|
||||
int max_downloading = pref->getMaxActiveDownloads();
|
||||
int max_active = pref->getMaxActiveTorrents();
|
||||
|
||||
if (max_downloading > -1)
|
||||
sessionSettings.active_downloads = max_downloading + HiddenData::getDownloadingSize();
|
||||
else
|
||||
sessionSettings.active_downloads = max_downloading;
|
||||
if (max_active > -1) {
|
||||
int limit = max_active + HiddenData::getDownloadingSize();
|
||||
sessionSettings.active_limit = limit;
|
||||
sessionSettings.active_tracker_limit = limit;
|
||||
sessionSettings.active_dht_limit = limit;
|
||||
sessionSettings.active_lsd_limit = limit;
|
||||
}
|
||||
else {
|
||||
|
||||
if (max_active > -1)
|
||||
sessionSettings.active_limit = max_active + HiddenData::getDownloadingSize();
|
||||
else
|
||||
sessionSettings.active_limit = max_active;
|
||||
sessionSettings.active_tracker_limit = max_active;
|
||||
sessionSettings.active_dht_limit = max_active;
|
||||
sessionSettings.active_lsd_limit = max_active;
|
||||
}
|
||||
|
||||
sessionSettings.active_seeds = pref->getMaxActiveUploads();
|
||||
sessionSettings.dont_count_slow_torrents = pref->ignoreSlowTorrentsForQueueing();
|
||||
setQueueingEnabled(true);
|
||||
@@ -473,16 +468,16 @@ void QBtSession::configureSession() {
|
||||
sessionSettings.active_downloads = -1;
|
||||
sessionSettings.active_seeds = -1;
|
||||
sessionSettings.active_limit = -1;
|
||||
sessionSettings.active_tracker_limit = -1;
|
||||
sessionSettings.active_dht_limit = -1;
|
||||
sessionSettings.active_lsd_limit = -1;
|
||||
setQueueingEnabled(false);
|
||||
}
|
||||
sessionSettings.active_tracker_limit = -1;
|
||||
sessionSettings.active_dht_limit = -1;
|
||||
sessionSettings.active_lsd_limit = -1;
|
||||
// Outgoing ports
|
||||
sessionSettings.outgoing_ports = std::make_pair(pref->outgoingPortsMin(), pref->outgoingPortsMax());
|
||||
// Ignore limits on LAN
|
||||
qDebug() << "Ignore limits on LAN" << pref->ignoreLimitsOnLAN();
|
||||
sessionSettings.ignore_limits_on_local_network = pref->ignoreLimitsOnLAN();
|
||||
qDebug() << "Ignore limits on LAN" << pref->getIgnoreLimitsOnLAN();
|
||||
sessionSettings.ignore_limits_on_local_network = pref->getIgnoreLimitsOnLAN();
|
||||
// Include overhead in transfer limits
|
||||
sessionSettings.rate_limit_ip_overhead = pref->includeOverheadInLimits();
|
||||
// IP address to announce to trackers
|
||||
@@ -1253,9 +1248,9 @@ void QBtSession::loadTorrentTempData(QTorrentHandle &h, QString savePath, bool m
|
||||
|
||||
// Update file names
|
||||
const QStringList files_path = TorrentTempData::getFilesPath(hash);
|
||||
bool force_recheck = false;
|
||||
QDir base_dir(h.save_path());
|
||||
if (files_path.size() == h.num_files()) {
|
||||
bool force_recheck = false;
|
||||
for (int i=0; i<h.num_files(); ++i) {
|
||||
const QString &path = files_path.at(i);
|
||||
if (!force_recheck && base_dir.exists(path))
|
||||
@@ -1552,36 +1547,21 @@ void QBtSession::enableDHT(bool b) {
|
||||
}
|
||||
|
||||
qreal QBtSession::getRealRatio(const libtorrent::torrent_status &status) const {
|
||||
libtorrent::size_type all_time_upload = status.all_time_upload;
|
||||
libtorrent::size_type all_time_download = status.all_time_download;
|
||||
libtorrent::size_type total_done = status.total_done;
|
||||
libtorrent::size_type upload = status.all_time_upload;
|
||||
// special case for a seeder who lost its stats, also assume nobody will import a 99% done torrent
|
||||
libtorrent::size_type download = (status.all_time_download < status.total_done * 0.01) ? status.total_done : status.all_time_download;
|
||||
|
||||
if (all_time_download < total_done) {
|
||||
// We have more data on disk than we downloaded
|
||||
// either because the user imported the file
|
||||
// or because of crash the download histroy was lost.
|
||||
// Otherwise will get weird ratios
|
||||
// eg when downloaded 1KB and uploaded 700MB of a
|
||||
// 700MB torrent.
|
||||
all_time_download = total_done;
|
||||
}
|
||||
if (download == 0)
|
||||
return (upload == 0) ? 0.0 : MAX_RATIO;
|
||||
|
||||
if (all_time_download == 0) {
|
||||
if (all_time_upload == 0)
|
||||
return 0.0;
|
||||
return MAX_RATIO+1;
|
||||
}
|
||||
|
||||
qreal ratio = all_time_upload / (float) all_time_download;
|
||||
Q_ASSERT(ratio >= 0.);
|
||||
if (ratio > MAX_RATIO)
|
||||
ratio = MAX_RATIO;
|
||||
return ratio;
|
||||
qreal ratio = upload / (qreal) download;
|
||||
Q_ASSERT(ratio >= 0.0);
|
||||
return (ratio > MAX_RATIO) ? MAX_RATIO : ratio;
|
||||
}
|
||||
|
||||
// Called periodically
|
||||
void QBtSession::saveTempFastResumeData() {
|
||||
std::vector<torrent_handle> torrents = s->get_torrents();
|
||||
std::vector<torrent_handle> torrents = s->get_torrents();
|
||||
|
||||
std::vector<torrent_handle>::iterator torrentIT = torrents.begin();
|
||||
std::vector<torrent_handle>::iterator torrentITend = torrents.end();
|
||||
@@ -1972,7 +1952,7 @@ void QBtSession::updateRatioTimer()
|
||||
|
||||
// Enable IP Filtering
|
||||
void QBtSession::enableIPFilter(const QString &filter_path, bool force) {
|
||||
qDebug("Enabling IPFiler");
|
||||
qDebug("Enabling IPFilter");
|
||||
if (!filterParser) {
|
||||
filterParser = new FilterParserThread(this, s);
|
||||
connect(filterParser.data(), SIGNAL(IPFilterParsed(int)), SLOT(handleIPFilterParsed(int)));
|
||||
@@ -2209,15 +2189,7 @@ void QBtSession::handleTorrentFinishedAlert(libtorrent::torrent_finished_alert*
|
||||
qDebug("Emitting finishedTorrent() signal");
|
||||
emit finishedTorrent(h);
|
||||
qDebug("Received finished alert for %s", qPrintable(h.name()));
|
||||
#ifndef DISABLE_GUI
|
||||
bool will_shutdown = (pref->shutdownWhenDownloadsComplete() ||
|
||||
pref->shutdownqBTWhenDownloadsComplete() ||
|
||||
pref->suspendWhenDownloadsComplete() ||
|
||||
pref->hibernateWhenDownloadsComplete())
|
||||
&& !hasDownloadingTorrents();
|
||||
#else
|
||||
bool will_shutdown = false;
|
||||
#endif
|
||||
|
||||
// AutoRun program
|
||||
if (pref->isAutoRunEnabled())
|
||||
autoRunExternalProgram(h);
|
||||
@@ -2227,8 +2199,15 @@ void QBtSession::handleTorrentFinishedAlert(libtorrent::torrent_finished_alert*
|
||||
// Mail notification
|
||||
if (pref->isMailNotificationEnabled())
|
||||
sendNotificationEmail(h);
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
// Auto-Shutdown
|
||||
bool will_shutdown = (pref->shutdownWhenDownloadsComplete() ||
|
||||
pref->shutdownqBTWhenDownloadsComplete() ||
|
||||
pref->suspendWhenDownloadsComplete() ||
|
||||
pref->hibernateWhenDownloadsComplete())
|
||||
&& !hasDownloadingTorrents();
|
||||
|
||||
if (will_shutdown) {
|
||||
bool suspend = pref->suspendWhenDownloadsComplete();
|
||||
bool hibernate = pref->hibernateWhenDownloadsComplete();
|
||||
@@ -2584,10 +2563,10 @@ void QBtSession::handlePeerBlockedAlert(libtorrent::peer_blocked_alert* p)
|
||||
reason = tr("because it has a low port.", "this peer was blocked because it has a low port.");
|
||||
break;
|
||||
case peer_blocked_alert::utp_disabled:
|
||||
reason = tr("because μTP is disabled.", "this peer was blocked because μTP is disabled.");
|
||||
reason = trUtf8("because %1 is disabled.", "this peer was blocked because uTP is disabled.").arg(QString::fromUtf8(C_UTP)); // don't translate μTP
|
||||
break;
|
||||
case peer_blocked_alert::tcp_disabled:
|
||||
reason = tr("because TCP is disabled.", "this peer was blocked because TCP is disabled.");
|
||||
reason = tr("because %1 is disabled.", "this peer was blocked because TCP is disabled.").arg("TCP"); // don't translate TCP
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2622,7 +2601,7 @@ void QBtSession::handleFastResumeRejectedAlert(libtorrent::fastresume_rejected_a
|
||||
}
|
||||
|
||||
void QBtSession::handleUrlSeedAlert(libtorrent::url_seed_alert* p) {
|
||||
Logger::instance()->addMessage(tr("Url seed lookup failed for url: %1, message: %2").arg(misc::toQString(p->url)).arg(misc::toQStringU(p->message())), Log::CRITICAL);
|
||||
Logger::instance()->addMessage(tr("URL seed lookup failed for url: %1, message: %2").arg(misc::toQString(p->url)).arg(misc::toQStringU(p->message())), Log::CRITICAL);
|
||||
}
|
||||
|
||||
void QBtSession::handleListenSucceededAlert(libtorrent::listen_succeeded_alert *p) {
|
||||
|
@@ -533,6 +533,7 @@ void QTorrentHandle::resume(const bool force) const
|
||||
bool has_persistant_error = TorPersistent->hasError(torrent_hash);
|
||||
TorPersistent->setErrorState(torrent_hash, false);
|
||||
bool temp_path_enabled = Preferences::instance()->isTempPathEnabled();
|
||||
TorPersistent->setHasMissingFiles(torrent_hash, false);
|
||||
if (has_persistant_error && temp_path_enabled) {
|
||||
// Torrent was supposed to be seeding, checking again in final destination
|
||||
qDebug("Resuming a torrent with error...");
|
||||
@@ -732,8 +733,8 @@ void QTorrentHandle::prioritize_first_last_piece(bool b) const
|
||||
{
|
||||
if (!has_metadata()) return;
|
||||
// Download first and last pieces first for all media files in the torrent
|
||||
const uint nbfiles = num_files();
|
||||
for (uint index = 0; index < nbfiles; ++index) {
|
||||
const int nbfiles = num_files();
|
||||
for (int index = 0; index < nbfiles; ++index) {
|
||||
const QString path = filepath_at(index);
|
||||
const QString ext = fsutils::fileExtension(path);
|
||||
if (misc::isPreviewable(ext) && torrent_handle::file_priority(index) > 0) {
|
||||
|
@@ -208,32 +208,36 @@ QIcon TorrentModelItem::getIconByState(State state) {
|
||||
}
|
||||
|
||||
QColor TorrentModelItem::getColorByState(State state) {
|
||||
// Color names taken from http://cloford.com/resources/colours/500col.htm
|
||||
bool dark = isDarkTheme();
|
||||
switch (state) {
|
||||
case STATE_DOWNLOADING:
|
||||
case STATE_DOWNLOADING_META:
|
||||
case STATE_FORCED_DL:
|
||||
return QColor(34, 139, 34); // Forest Green
|
||||
if (!dark)
|
||||
return QColor(34, 139, 34); // Forest Green
|
||||
else
|
||||
return QColor(50, 205, 50); // Lime Green
|
||||
case STATE_ALLOCATING:
|
||||
case STATE_STALLED_DL:
|
||||
case STATE_STALLED_UP:
|
||||
if (!dark)
|
||||
return QColor(0, 0, 0); // Black
|
||||
else
|
||||
return QColor(255, 255, 255); // White
|
||||
return QColor(204, 204, 204); // Gray 80
|
||||
case STATE_SEEDING:
|
||||
case STATE_FORCED_UP:
|
||||
if (!dark)
|
||||
return QColor(65, 105, 225); // Royal Blue
|
||||
else
|
||||
return QColor(100, 149, 237); // Cornflower Blue
|
||||
return QColor(99, 184, 255); // Steel Blue 1
|
||||
case STATE_PAUSED_DL:
|
||||
return QColor(250, 128, 114); // Salmon
|
||||
case STATE_PAUSED_UP:
|
||||
if (!dark)
|
||||
return QColor(0, 0, 139); // Dark Blue
|
||||
else
|
||||
return QColor(65, 105, 225); // Royal Blue
|
||||
return QColor(79, 148, 205); // Steel Blue 3
|
||||
case STATE_PAUSED_MISSING:
|
||||
return QColor(255, 0, 0); // red
|
||||
case STATE_QUEUED_DL:
|
||||
@@ -242,7 +246,10 @@ QColor TorrentModelItem::getColorByState(State state) {
|
||||
case STATE_CHECKING_DL:
|
||||
case STATE_QUEUED_CHECK:
|
||||
case STATE_QUEUED_FASTCHECK:
|
||||
return QColor(0, 128, 128); // Teal
|
||||
if (!dark)
|
||||
return QColor(0, 128, 128); // Teal
|
||||
else
|
||||
return QColor(0, 205, 205); // Cyan 3
|
||||
case STATE_INVALID:
|
||||
return QColor(255, 0, 0); // red
|
||||
default:
|
||||
@@ -418,8 +425,8 @@ QVariant TorrentModel::headerData(int section, Qt::Orientation orientation,
|
||||
if (orientation == Qt::Horizontal) {
|
||||
if (role == Qt::DisplayRole) {
|
||||
switch(section) {
|
||||
case TorrentModelItem::TR_NAME: return tr("Name", "i.e: torrent name");
|
||||
case TorrentModelItem::TR_PRIORITY: return "#";
|
||||
case TorrentModelItem::TR_NAME: return tr("Name", "i.e: torrent name");
|
||||
case TorrentModelItem::TR_SIZE: return tr("Size", "i.e: torrent size");
|
||||
case TorrentModelItem::TR_PROGRESS: return tr("Done", "% Done");
|
||||
case TorrentModelItem::TR_STATUS: return tr("Status", "Torrent status (e.g. downloading, seeding, paused)");
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user