You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-23 22:32:16 +02:00
Compare commits
38 Commits
release-4.
...
v4_1_x
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8cb552804 | ||
|
|
304e831b0c | ||
|
|
f16d219646 | ||
|
|
22b0160eaa | ||
|
|
d4f49c3666 | ||
|
|
0b055d8fef | ||
|
|
21595fca9c | ||
|
|
64ac48ee11 | ||
|
|
5d98721593 | ||
|
|
598159552e | ||
|
|
eea38e7c9e | ||
|
|
5c933c9734 | ||
|
|
102b7fa78e | ||
|
|
b5ee908f6c | ||
|
|
7825d8627f | ||
|
|
b798c591e7 | ||
|
|
9e7d21d7aa | ||
|
|
38a15b27f0 | ||
|
|
cb31684a66 | ||
|
|
850cde19f7 | ||
|
|
fc5b3b4f70 | ||
|
|
73fd4d83af | ||
|
|
811b525b1d | ||
|
|
0f8def9a49 | ||
|
|
359b464958 | ||
|
|
b5b0d68dd9 | ||
|
|
f48c49c248 | ||
|
|
11ca744548 | ||
|
|
82e6fc700e | ||
|
|
59fd70c638 | ||
|
|
617bf767df | ||
|
|
55180e3598 | ||
|
|
56b62e6573 | ||
|
|
b37e7b0340 | ||
|
|
21aebaf16f | ||
|
|
5792465317 | ||
|
|
e98f44af63 | ||
|
|
40cf0203fb |
13
Changelog
13
Changelog
@@ -1,3 +1,16 @@
|
||||
* Thu Oct 31 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.1.9.1
|
||||
- WINDOWS: Fix a problem with bigger dialogs due to wrong DPI reported by the system (Chocobo1)
|
||||
|
||||
* Sun Oct 27 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.1.9
|
||||
- BUGFIX: Preserve relative order when moving to top/bottom in queue (Chocobo1)
|
||||
- WINDOWS: Use real physical screen DPI (Chocobo1)
|
||||
- WEBUI: Bump Web API version
|
||||
|
||||
* Mon Sep 23 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.1.8
|
||||
- BUGFIX: Fix filename validation on non-Windows OS (Chocobo1)
|
||||
- BUGFIX: ScanFolders/FileSystemWatcher now detect magnet files with case insensitivity in filename (Chocobo1)
|
||||
- BUGFIX: Fix failed seeding after creating a torrent and auto-adding it to the session (Chocobo1)
|
||||
|
||||
* Sun Aug 04 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.1.7
|
||||
- FEATURE: Add 12 hour and 24 hour speed graphs (dzmat)
|
||||
- FEATURE: Change "Add new torrent" dialog to horizontal layout (Evgeny Lensky)
|
||||
|
||||
@@ -13,8 +13,7 @@ It aims to be a good alternative to all other bittorrent clients
|
||||
out there. qBittorrent is fast, stable and provides unicode
|
||||
support as well as many features.
|
||||
|
||||
This product includes GeoLite data created by MaxMind, available from
|
||||
https://www.maxmind.com/
|
||||
The free [IP to Country Lite database](https://db-ip.com/db/download/ip-to-country-lite) by [DB-IP](https://db-ip.com/) is used for resolving the countries of peers. The database is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).
|
||||
|
||||
### Installation:
|
||||
For installation, follow the instructions from INSTALL file, but simple:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
|
||||
# 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, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
@@ -255,7 +255,8 @@ EOF
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
||||
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
@@ -339,9 +340,9 @@ exit $ret
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
||||
966
build-aux/config.guess
vendored
966
build-aux/config.guess
vendored
File diff suppressed because it is too large
Load Diff
2770
build-aux/config.sub
vendored
2770
build-aux/config.sub
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2013-12-25.23; # UTC
|
||||
scriptversion=2018-03-11.20; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
@@ -271,15 +271,18 @@ do
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
# If destination is a directory, append the input filename.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstbase=`basename "$src"`
|
||||
case $dst in
|
||||
*/) dst=$dst$dstbase;;
|
||||
*) dst=$dst/$dstbase;;
|
||||
esac
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
@@ -288,6 +291,11 @@ do
|
||||
fi
|
||||
fi
|
||||
|
||||
case $dstdir in
|
||||
*/) dstdirslash=$dstdir;;
|
||||
*) dstdirslash=$dstdir/;;
|
||||
esac
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
@@ -324,34 +332,43 @@ do
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
# Note that $RANDOM variable is not portable (e.g. dash); Use it
|
||||
# here however when possible just to lower collision chance.
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
||||
# directory is successfully created first before we actually test
|
||||
# 'mkdir -p' feature.
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
@@ -427,8 +444,8 @@ do
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
dsttmp=${dstdirslash}_inst.$$_
|
||||
rmtmp=${dstdirslash}_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
@@ -493,9 +510,9 @@ do
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC
|
||||
# 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, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
@@ -101,9 +101,9 @@ else
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
perl_URL=https://www.perl.org/
|
||||
flex_URL=https://github.com/westes/flex
|
||||
gnu_software_URL=https://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
@@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
||||
31
configure
vendored
31
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for qbittorrent v4.1.7.
|
||||
# Generated by GNU Autoconf 2.69 for qbittorrent v4.1.9.1.
|
||||
#
|
||||
# Report bugs to <bugs.qbittorrent.org>.
|
||||
#
|
||||
@@ -580,8 +580,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='qbittorrent'
|
||||
PACKAGE_TARNAME='qbittorrent'
|
||||
PACKAGE_VERSION='v4.1.7'
|
||||
PACKAGE_STRING='qbittorrent v4.1.7'
|
||||
PACKAGE_VERSION='v4.1.9.1'
|
||||
PACKAGE_STRING='qbittorrent v4.1.9.1'
|
||||
PACKAGE_BUGREPORT='bugs.qbittorrent.org'
|
||||
PACKAGE_URL='https://www.qbittorrent.org/'
|
||||
|
||||
@@ -1299,7 +1299,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures qbittorrent v4.1.7 to adapt to many kinds of systems.
|
||||
\`configure' configures qbittorrent v4.1.9.1 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1370,7 +1370,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of qbittorrent v4.1.7:";;
|
||||
short | recursive ) echo "Configuration of qbittorrent v4.1.9.1:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1505,7 +1505,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
qbittorrent configure v4.1.7
|
||||
qbittorrent configure v4.1.9.1
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -1644,7 +1644,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by qbittorrent $as_me v4.1.7, which was
|
||||
It was created by qbittorrent $as_me v4.1.9.1, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3822,7 +3822,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='qbittorrent'
|
||||
VERSION='v4.1.7'
|
||||
VERSION='v4.1.9.1'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -4178,7 +4178,6 @@ QBT_CXX="$CXX"
|
||||
|
||||
# Define --wth-* and --enable-* arguments
|
||||
|
||||
|
||||
# Check whether --with-qtsingleapplication was given.
|
||||
if test "${with_qtsingleapplication+set}" = set; then :
|
||||
withval=$with_qtsingleapplication;
|
||||
@@ -4749,7 +4748,9 @@ fi
|
||||
case ${host_cpu} in #(
|
||||
x86_64) :
|
||||
libsubdirs="lib64 libx32 lib lib64" ;; #(
|
||||
ppc64|s390x|sparc64|aarch64|ppc64le) :
|
||||
mips*64*) :
|
||||
libsubdirs="lib64 lib32 lib lib64" ;; #(
|
||||
ppc64|powerpc64|s390x|sparc64|aarch64|ppc64le|powerpc64le|riscv64) :
|
||||
libsubdirs="lib64 lib lib64" ;; #(
|
||||
*) :
|
||||
libsubdirs="lib"
|
||||
@@ -5271,7 +5272,7 @@ fi
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
as_fn_error $? "Could not find a version of the library!" "$LINENO" 5
|
||||
as_fn_error $? "Could not find a version of the Boost::System library!" "$LINENO" 5
|
||||
fi
|
||||
if test "x$link_system" = "xno"; then
|
||||
as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5
|
||||
@@ -6274,7 +6275,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by qbittorrent $as_me v4.1.7, which was
|
||||
This file was extended by qbittorrent $as_me v4.1.9.1, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -6332,7 +6333,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
qbittorrent config.status v4.1.7
|
||||
qbittorrent config.status v4.1.9.1
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
@@ -7590,7 +7591,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by qbittorrent $as_me v4.1.7, which was
|
||||
This file was extended by qbittorrent $as_me v4.1.9.1, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -7648,7 +7649,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
qbittorrent config.status v4.1.7
|
||||
qbittorrent config.status v4.1.9.1
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
AC_INIT([qbittorrent], [v4.1.7], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
||||
AC_INIT([qbittorrent], [v4.1.9.1], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_PROG_CC
|
||||
|
||||
2
dist/mac/Info.plist
vendored
2
dist/mac/Info.plist
vendored
@@ -55,7 +55,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.1.7</string>
|
||||
<string>4.1.9</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
||||
4
dist/windows/options.nsi
vendored
4
dist/windows/options.nsi
vendored
@@ -27,7 +27,7 @@ XPStyle on
|
||||
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
|
||||
|
||||
; Program specific
|
||||
!define PROG_VERSION "4.1.7"
|
||||
!define PROG_VERSION "4.1.9.1"
|
||||
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
|
||||
@@ -54,7 +54,7 @@ VIAddVersionKey "LegalCopyright" "Copyright ©2006-2019 The qBittorrent project"
|
||||
VIAddVersionKey "FileDescription" "qBittorrent - A Bittorrent Client"
|
||||
VIAddVersionKey "FileVersion" "${PROG_VERSION}"
|
||||
|
||||
VIProductVersion "${PROG_VERSION}.0"
|
||||
VIProductVersion "${PROG_VERSION}.1"
|
||||
|
||||
; The default installation directory. It changes depending if we install in the 64bit dir or not.
|
||||
; A caveat of this is if a user has installed a 32bit version and then runs the 64bit installer
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 42
|
||||
#serial 47
|
||||
|
||||
# example boost program (need to pass version)
|
||||
m4_define([_AX_BOOST_BASE_PROGRAM],
|
||||
@@ -113,7 +113,8 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
dnl are found, e.g. when only header-only libraries are installed!
|
||||
AS_CASE([${host_cpu}],
|
||||
[x86_64],[libsubdirs="lib64 libx32 lib lib64"],
|
||||
[ppc64|s390x|sparc64|aarch64|ppc64le],[libsubdirs="lib64 lib lib64"],
|
||||
[mips*64*],[libsubdirs="lib64 lib32 lib lib64"],
|
||||
[ppc64|powerpc64|s390x|sparc64|aarch64|ppc64le|powerpc64le|riscv64],[libsubdirs="lib64 lib lib64"],
|
||||
[libsubdirs="lib"]
|
||||
)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 19
|
||||
#serial 20
|
||||
|
||||
AC_DEFUN([AX_BOOST_SYSTEM],
|
||||
[
|
||||
@@ -108,7 +108,7 @@ AC_DEFUN([AX_BOOST_SYSTEM],
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
AC_MSG_ERROR(Could not find a version of the Boost::System library!)
|
||||
fi
|
||||
if test "x$link_system" = "xno"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
|
||||
@@ -2034,7 +2034,7 @@ void Session::topTorrentsPriority(const QStringList &hashes)
|
||||
{
|
||||
std::priority_queue<QPair<int, TorrentHandle *>,
|
||||
std::vector<QPair<int, TorrentHandle *>>,
|
||||
std::greater<QPair<int, TorrentHandle *>>> torrentQueue;
|
||||
std::less<QPair<int, TorrentHandle *>>> torrentQueue;
|
||||
|
||||
// Sort torrents by priority
|
||||
for (const InfoHash infoHash : hashes) {
|
||||
@@ -2043,7 +2043,7 @@ void Session::topTorrentsPriority(const QStringList &hashes)
|
||||
torrentQueue.push(qMakePair(torrent->queuePosition(), torrent));
|
||||
}
|
||||
|
||||
// Top torrents priority (starting with the ones with highest priority)
|
||||
// Top torrents priority (starting with the ones with lowest priority)
|
||||
while (!torrentQueue.empty()) {
|
||||
TorrentHandle *const torrent = torrentQueue.top().second;
|
||||
torrentQueuePositionTop(torrent->nativeHandle());
|
||||
@@ -2057,7 +2057,7 @@ void Session::bottomTorrentsPriority(const QStringList &hashes)
|
||||
{
|
||||
std::priority_queue<QPair<int, TorrentHandle *>,
|
||||
std::vector<QPair<int, TorrentHandle *>>,
|
||||
std::less<QPair<int, TorrentHandle *>>> torrentQueue;
|
||||
std::greater<QPair<int, TorrentHandle *>>> torrentQueue;
|
||||
|
||||
// Sort torrents by priority
|
||||
for (const InfoHash infoHash : hashes) {
|
||||
@@ -2066,7 +2066,7 @@ void Session::bottomTorrentsPriority(const QStringList &hashes)
|
||||
torrentQueue.push(qMakePair(torrent->queuePosition(), torrent));
|
||||
}
|
||||
|
||||
// Bottom torrents priority (starting with the ones with lowest priority)
|
||||
// Bottom torrents priority (starting with the ones with highest priority)
|
||||
while (!torrentQueue.empty()) {
|
||||
TorrentHandle *const torrent = torrentQueue.top().second;
|
||||
torrentQueuePositionBottom(torrent->nativeHandle());
|
||||
|
||||
@@ -508,7 +508,7 @@ bool TorrentHandle::needSaveResumeData() const
|
||||
|
||||
void TorrentHandle::saveResumeData()
|
||||
{
|
||||
m_nativeHandle.save_resume_data();
|
||||
m_nativeHandle.save_resume_data(lt::torrent_handle::save_info_dict);
|
||||
m_session->handleTorrentSaveResumeDataRequested(this);
|
||||
}
|
||||
|
||||
@@ -1273,17 +1273,18 @@ void TorrentHandle::forceDHTAnnounce()
|
||||
|
||||
void TorrentHandle::forceRecheck()
|
||||
{
|
||||
if (m_startupState != Started) return;
|
||||
if (!hasMetadata()) return;
|
||||
|
||||
m_nativeHandle.force_recheck();
|
||||
m_unchecked = false;
|
||||
|
||||
if (isPaused()) {
|
||||
if ((m_startupState != Started) || isPaused()) {
|
||||
m_nativeHandle.stop_when_ready(true);
|
||||
m_nativeHandle.auto_managed(true);
|
||||
m_pauseWhenReady = true;
|
||||
}
|
||||
|
||||
if ((m_startupState == Started) && isPaused())
|
||||
m_pauseWhenReady = true;
|
||||
}
|
||||
|
||||
void TorrentHandle::setSequentialDownload(bool b)
|
||||
@@ -1351,30 +1352,27 @@ void TorrentHandle::toggleFirstLastPiecePriority()
|
||||
|
||||
void TorrentHandle::pause()
|
||||
{
|
||||
if (m_startupState != Started) return;
|
||||
if (m_pauseWhenReady) return;
|
||||
if (isChecking()) {
|
||||
m_pauseWhenReady = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (isPaused()) return;
|
||||
|
||||
m_nativeHandle.auto_managed(false);
|
||||
m_nativeHandle.pause();
|
||||
|
||||
// Libtorrent doesn't emit a torrent_paused_alert when the
|
||||
// torrent is queued (no I/O)
|
||||
// We test on the cached m_nativeStatus
|
||||
if (isQueued())
|
||||
m_session->handleTorrentPaused(this);
|
||||
if (m_startupState == Started) {
|
||||
if (m_pauseWhenReady) {
|
||||
m_nativeHandle.stop_when_ready(false);
|
||||
m_pauseWhenReady = false;
|
||||
}
|
||||
|
||||
// Libtorrent doesn't emit a torrent_paused_alert when the
|
||||
// torrent is queued (no I/O)
|
||||
// We test on the cached m_nativeStatus
|
||||
if (isQueued())
|
||||
m_session->handleTorrentPaused(this);
|
||||
}
|
||||
}
|
||||
|
||||
void TorrentHandle::resume(bool forced)
|
||||
{
|
||||
if (m_startupState != Started) return;
|
||||
|
||||
m_pauseWhenReady = false;
|
||||
resume_impl(forced);
|
||||
}
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ void FileSystemWatcher::processTorrentsInDir(const QDir &dir)
|
||||
const QStringList files = dir.entryList({"*.torrent", "*.magnet"}, QDir::Files);
|
||||
for (const QString &file : files) {
|
||||
const QString fileAbsPath = dir.absoluteFilePath(file);
|
||||
if (file.endsWith(".magnet"))
|
||||
if (file.endsWith(".magnet", Qt::CaseInsensitive))
|
||||
torrents << fileAbsPath;
|
||||
else if (BitTorrent::TorrentInfo::loadFromFile(fileAbsPath).isValid())
|
||||
torrents << fileAbsPath;
|
||||
|
||||
@@ -44,10 +44,9 @@
|
||||
#include "downloadmanager.h"
|
||||
#include "private/geoipdatabase.h"
|
||||
|
||||
static const char DATABASE_URL[] = "https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz";
|
||||
static const char GEOIP_FOLDER[] = "GeoIP";
|
||||
static const char GEOIP_FILENAME[] = "GeoLite2-Country.mmdb";
|
||||
static const int UPDATE_INTERVAL = 30; // Days between database updates
|
||||
static const QString DATABASE_URL = QStringLiteral("https://download.db-ip.com/free/dbip-country-lite-%1.mmdb.gz");
|
||||
static const char GEODB_FOLDER[] = "GeoDB";
|
||||
static const char GEODB_FILENAME[] = "dbip-country-lite.mmdb";
|
||||
|
||||
using namespace Net;
|
||||
|
||||
@@ -96,29 +95,45 @@ void GeoIPManager::loadDatabase()
|
||||
}
|
||||
|
||||
QString filepath = Utils::Fs::expandPathAbs(
|
||||
QString("%1%2/%3").arg(specialFolderLocation(SpecialFolder::Data), GEOIP_FOLDER, GEOIP_FILENAME));
|
||||
QString("%1%2/%3").arg(specialFolderLocation(SpecialFolder::Data), GEODB_FOLDER, GEODB_FILENAME));
|
||||
|
||||
QString error;
|
||||
m_geoIPDatabase = GeoIPDatabase::load(filepath, error);
|
||||
if (m_geoIPDatabase)
|
||||
Logger::instance()->addMessage(tr("GeoIP database loaded. Type: %1. Build time: %2.")
|
||||
Logger::instance()->addMessage(tr("IP geolocation database loaded. Type: %1. Build time: %2.")
|
||||
.arg(m_geoIPDatabase->type(), m_geoIPDatabase->buildEpoch().toString()),
|
||||
Log::INFO);
|
||||
else
|
||||
Logger::instance()->addMessage(tr("Couldn't load GeoIP database. Reason: %1").arg(error), Log::WARNING);
|
||||
Logger::instance()->addMessage(tr("Couldn't load IP geolocation database. Reason: %1").arg(error), Log::WARNING);
|
||||
|
||||
manageDatabaseUpdate();
|
||||
}
|
||||
|
||||
void GeoIPManager::manageDatabaseUpdate()
|
||||
{
|
||||
if (!m_geoIPDatabase || (m_geoIPDatabase->buildEpoch().daysTo(QDateTime::currentDateTimeUtc()) >= UPDATE_INTERVAL))
|
||||
const auto expired = [](const QDateTime &testDateTime)
|
||||
{
|
||||
const QDate testDate = testDateTime.date();
|
||||
const QDate curDate = QDateTime::currentDateTimeUtc().date();
|
||||
|
||||
if ((testDate.year() < curDate.year()) && (curDate.day() > 1))
|
||||
return true;
|
||||
|
||||
if ((testDate.month() < curDate.month()) && (curDate.day() > 1))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
if (!m_geoIPDatabase || expired(m_geoIPDatabase->buildEpoch()))
|
||||
downloadDatabaseFile();
|
||||
}
|
||||
|
||||
void GeoIPManager::downloadDatabaseFile()
|
||||
{
|
||||
DownloadHandler *handler = DownloadManager::instance()->download({DATABASE_URL});
|
||||
const QDate curDate = QDateTime::currentDateTimeUtc().date();
|
||||
const QString curUrl = DATABASE_URL.arg(curDate.toString("yyyy-MM"));
|
||||
DownloadHandler *handler = DownloadManager::instance()->download({curUrl});
|
||||
connect(handler, static_cast<void (Net::DownloadHandler::*)(const QString &, const QByteArray &)>(&Net::DownloadHandler::downloadFinished)
|
||||
, this, &GeoIPManager::downloadFinished);
|
||||
connect(handler, &Net::DownloadHandler::downloadFailed, this, &GeoIPManager::downloadFailed);
|
||||
@@ -420,7 +435,7 @@ void GeoIPManager::downloadFinished(const QString &url, QByteArray data)
|
||||
bool ok = false;
|
||||
data = Utils::Gzip::decompress(data, &ok);
|
||||
if (!ok) {
|
||||
Logger::instance()->addMessage(tr("Could not decompress GeoIP database file."), Log::WARNING);
|
||||
LogMsg(tr("Could not decompress IP geolocation database file."), Log::WARNING);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -431,28 +446,25 @@ void GeoIPManager::downloadFinished(const QString &url, QByteArray data)
|
||||
if (m_geoIPDatabase)
|
||||
delete m_geoIPDatabase;
|
||||
m_geoIPDatabase = geoIPDatabase;
|
||||
Logger::instance()->addMessage(tr("GeoIP database loaded. Type: %1. Build time: %2.")
|
||||
LogMsg(tr("IP geolocation database loaded. Type: %1. Build time: %2.")
|
||||
.arg(m_geoIPDatabase->type(), m_geoIPDatabase->buildEpoch().toString()),
|
||||
Log::INFO);
|
||||
QString targetPath = Utils::Fs::expandPathAbs(
|
||||
specialFolderLocation(SpecialFolder::Data) + GEOIP_FOLDER);
|
||||
const QString targetPath = Utils::Fs::expandPathAbs(
|
||||
specialFolderLocation(SpecialFolder::Data) + GEODB_FOLDER);
|
||||
if (!QDir(targetPath).exists())
|
||||
QDir().mkpath(targetPath);
|
||||
QFile targetFile(QString("%1/%2").arg(targetPath, GEOIP_FILENAME));
|
||||
if (!targetFile.open(QFile::WriteOnly) || (targetFile.write(data) == -1)) {
|
||||
Logger::instance()->addMessage(
|
||||
tr("Couldn't save downloaded GeoIP database file."), Log::WARNING);
|
||||
}
|
||||
else {
|
||||
Logger::instance()->addMessage(tr("Successfully updated GeoIP database."), Log::INFO);
|
||||
}
|
||||
QFile targetFile(QString("%1/%2").arg(targetPath, GEODB_FILENAME));
|
||||
if (!targetFile.open(QFile::WriteOnly) || (targetFile.write(data) == -1))
|
||||
LogMsg(tr("Couldn't save downloaded IP geolocation database file."), Log::WARNING);
|
||||
else
|
||||
LogMsg(tr("Successfully updated IP geolocation database."), Log::INFO);
|
||||
}
|
||||
else {
|
||||
delete geoIPDatabase;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Logger::instance()->addMessage(tr("Couldn't load GeoIP database. Reason: %1").arg(error), Log::WARNING);
|
||||
LogMsg(tr("Couldn't load IP geolocation database. Reason: %1").arg(error), Log::WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
namespace
|
||||
{
|
||||
const qint32 MAX_FILE_SIZE = 67108864; // 64MB
|
||||
const char DB_TYPE[] = "GeoLite2-Country";
|
||||
const quint32 MAX_METADATA_SIZE = 131072; // 128KB
|
||||
const char METADATA_BEGIN_MARK[] = "\xab\xcd\xefMaxMind.com";
|
||||
const char DATA_SECTION_SEPARATOR[16] = {0};
|
||||
@@ -144,7 +143,7 @@ GeoIPDatabase::~GeoIPDatabase()
|
||||
|
||||
QString GeoIPDatabase::type() const
|
||||
{
|
||||
return DB_TYPE;
|
||||
return m_dbType;
|
||||
}
|
||||
|
||||
quint16 GeoIPDatabase::ipVersion() const
|
||||
@@ -255,11 +254,7 @@ bool GeoIPDatabase::parseMetadata(const QVariantHash &metadata, QString &error)
|
||||
m_indexSize = m_nodeCount * m_nodeSize;
|
||||
|
||||
CHECK_METADATA_REQ(database_type, QString);
|
||||
QString dbType = metadata.value("database_type").toString();
|
||||
if (dbType != DB_TYPE) {
|
||||
error = tr("Invalid database type: %1").arg(dbType);
|
||||
return false;
|
||||
}
|
||||
m_dbType = metadata.value("database_type").toString();
|
||||
|
||||
CHECK_METADATA_REQ(build_epoch, ULongLong);
|
||||
m_buildEpoch = QDateTime::fromTime_t(metadata.value("build_epoch").toULongLong());
|
||||
@@ -272,7 +267,7 @@ bool GeoIPDatabase::parseMetadata(const QVariantHash &metadata, QString &error)
|
||||
|
||||
bool GeoIPDatabase::loadDB(QString &error) const
|
||||
{
|
||||
qDebug() << "Parsing MaxMindDB index tree...";
|
||||
qDebug() << "Parsing IP geolocation database index tree...";
|
||||
|
||||
const int nodeSize = m_recordSize / 4; // in bytes
|
||||
const int indexSize = m_nodeCount * nodeSize;
|
||||
|
||||
@@ -93,6 +93,7 @@ private:
|
||||
int m_indexSize;
|
||||
int m_recordBytes;
|
||||
QDateTime m_buildEpoch;
|
||||
QString m_dbType;
|
||||
// Search data
|
||||
mutable QHash<quint32, QString> m_countries;
|
||||
quint32 m_size;
|
||||
|
||||
@@ -360,7 +360,7 @@ void ScanFoldersModel::addTorrentsToSession(const QStringList &pathList)
|
||||
else if (!downloadInDefaultFolder(file))
|
||||
params.savePath = downloadPathTorrentFolder(file);
|
||||
|
||||
if (file.endsWith(".magnet")) {
|
||||
if (file.endsWith(".magnet", Qt::CaseInsensitive)) {
|
||||
QFile f(file);
|
||||
if (f.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QTextStream str(&f);
|
||||
|
||||
@@ -236,7 +236,19 @@ bool Utils::Fs::isValidFileSystemName(const QString &name, bool allowSeparators)
|
||||
{
|
||||
if (name.isEmpty()) return false;
|
||||
|
||||
const QRegularExpression regex(allowSeparators ? "[:?\"*<>|]" : "[\\\\/:?\"*<>|]");
|
||||
#if defined(Q_OS_WIN)
|
||||
const QRegularExpression regex {allowSeparators
|
||||
? QLatin1String("[:?\"*<>|]")
|
||||
: QLatin1String("[\\\\/:?\"*<>|]")};
|
||||
#elif defined(Q_OS_MACOS)
|
||||
const QRegularExpression regex {allowSeparators
|
||||
? QLatin1String("[\\0:]")
|
||||
: QLatin1String("[\\0/:]")};
|
||||
#else
|
||||
const QRegularExpression regex {allowSeparators
|
||||
? QLatin1String("[\\0]")
|
||||
: QLatin1String("[\\0/]")};
|
||||
#endif
|
||||
return !name.contains(regex);
|
||||
}
|
||||
|
||||
@@ -342,7 +354,7 @@ bool Utils::Fs::isNetworkFileSystem(const QString &path)
|
||||
// Magic number references:
|
||||
// 1. /usr/include/linux/magic.h
|
||||
// 2. https://github.com/coreutils/coreutils/blob/master/src/stat.c
|
||||
switch (buf.f_type) {
|
||||
switch (static_cast<unsigned int>(buf.f_type)) {
|
||||
case 0xFF534D42: // CIFS_MAGIC_NUMBER
|
||||
case 0x6969: // NFS_SUPER_MAGIC
|
||||
case 0x517B: // SMB_SUPER_MAGIC
|
||||
|
||||
@@ -102,6 +102,14 @@ public:
|
||||
labelLibtVer->setText(Utils::Misc::libtorrentVersionString());
|
||||
labelBoostVer->setText(Utils::Misc::boostVersionString());
|
||||
|
||||
const QString DBIPText = QString(
|
||||
"<html><head/><body><p>"
|
||||
"%1"
|
||||
" (<a href=\"https://db-ip.com/\">https://db-ip.com/</a>)</p></body></html>")
|
||||
.arg(tr("The free IP to Country Lite database by DB-IP is used for resolving the countries of peers. "
|
||||
"The database is licensed under the Creative Commons Attribution 4.0 International License"));
|
||||
labelDBIP->setText(DBIPText);
|
||||
|
||||
Utils::Gui::resize(this);
|
||||
show();
|
||||
}
|
||||
|
||||
@@ -314,11 +314,11 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="librariesTab">
|
||||
<widget class="QWidget" name="SoftwareUsedTab">
|
||||
<attribute name="title">
|
||||
<string>Libraries</string>
|
||||
<string>Software Used</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="librariesTabLayout">
|
||||
<layout class="QVBoxLayout" name="SoftwareUsedTabLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
@@ -430,6 +430,22 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelDBIP">
|
||||
<property name="text">
|
||||
<string notr="true">DB-IP license text</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
||||
@@ -606,7 +606,7 @@ void AddNewTorrentDialog::setupTreeview()
|
||||
setWindowTitle(m_torrentInfo.name());
|
||||
|
||||
// Set torrent information
|
||||
m_ui->labelCommentData->setText(Utils::Misc::parseHtmlLinks(m_torrentInfo.comment()));
|
||||
m_ui->labelCommentData->setText(Utils::Misc::parseHtmlLinks(m_torrentInfo.comment().toHtmlEscaped()));
|
||||
m_ui->labelDateData->setText(!m_torrentInfo.creationDate().isNull() ? m_torrentInfo.creationDate().toString(Qt::DefaultLocaleShortDate) : tr("Not available"));
|
||||
|
||||
// Prepare content tree
|
||||
|
||||
@@ -419,7 +419,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
||||
addRow(LIST_REFRESH, tr("Transfer list refresh interval"), &spinBoxListRefresh);
|
||||
// Resolve Peer countries
|
||||
checkBoxResolveCountries.setChecked(pref->resolvePeerCountries());
|
||||
addRow(RESOLVE_COUNTRIES, tr("Resolve peer countries (GeoIP)"), &checkBoxResolveCountries);
|
||||
addRow(RESOLVE_COUNTRIES, tr("Resolve peer countries"), &checkBoxResolveCountries);
|
||||
// Resolve peer hosts
|
||||
checkBoxResolveHosts.setChecked(pref->resolvePeerHostNames());
|
||||
addRow(RESOLVE_HOSTS, tr("Resolve peer host names"), &checkBoxResolveHosts);
|
||||
|
||||
@@ -1139,7 +1139,7 @@
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>To:</string>
|
||||
<string comment="To receiver">To:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1159,7 +1159,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>From:</string>
|
||||
<string comment="From sender">From:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1915,7 +1915,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string extracomment="from (time1 to time2)">From:</string>
|
||||
<string comment="From start time">From:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1939,7 +1939,7 @@
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string extracomment="time1 to time2">To:</string>
|
||||
<string comment="To end time">To:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -333,7 +333,7 @@ void PropertiesWidget::loadTorrentInfos(BitTorrent::TorrentHandle *const torrent
|
||||
// URL seeds
|
||||
loadUrlSeeds();
|
||||
|
||||
m_ui->labelCreatedByVal->setText(m_torrent->creator().toHtmlEscaped());
|
||||
m_ui->labelCreatedByVal->setText(m_torrent->creator());
|
||||
|
||||
// List files in torrent
|
||||
m_propListModel->model()->setupModelData(m_torrent->info());
|
||||
|
||||
@@ -109,7 +109,7 @@ void TorrentContentTreeView::renameSelectedFile(BitTorrent::TorrentHandle *torre
|
||||
, modelIndex.data().toString(), &ok, isFile).trimmed();
|
||||
if (!ok) return;
|
||||
|
||||
if (newName.isEmpty() || !Utils::Fs::isValidFileSystemName(newName)) {
|
||||
if (!Utils::Fs::isValidFileSystemName(newName)) {
|
||||
RaisedMessageBox::warning(this, tr("Rename error"),
|
||||
tr("The name is empty or contains forbidden characters, please choose a different one."),
|
||||
QMessageBox::Ok);
|
||||
@@ -228,7 +228,7 @@ void TorrentContentTreeView::renameSelectedFile(BitTorrent::TorrentInfo &torrent
|
||||
, modelIndex.data().toString(), &ok, isFile).trimmed();
|
||||
if (!ok) return;
|
||||
|
||||
if (newName.isEmpty() || !Utils::Fs::isValidFileSystemName(newName)) {
|
||||
if (!Utils::Fs::isValidFileSystemName(newName)) {
|
||||
RaisedMessageBox::warning(this, tr("Rename error"),
|
||||
tr("The name is empty or contains forbidden characters, please choose a different one."),
|
||||
QMessageBox::Ok);
|
||||
|
||||
@@ -199,6 +199,7 @@ void TorrentCreatorDialog::handleCreationSuccess(const QString &path, const QStr
|
||||
params.savePath = branchPath;
|
||||
params.skipChecking = true;
|
||||
params.ignoreShareLimits = m_ui->checkIgnoreShareLimits->isChecked();
|
||||
params.useAutoTMM = TriStateBool::False; // otherwise if it is on by default, it will overwrite `savePath` to the default save path
|
||||
|
||||
BitTorrent::Session::instance()->addTorrent(t, params);
|
||||
}
|
||||
|
||||
@@ -50,8 +50,12 @@ qreal Utils::Gui::screenScalingFactor(const QWidget *widget)
|
||||
return 1;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
const int screen = qApp->desktop()->screenNumber(widget);
|
||||
return (QApplication::screens()[screen]->logicalDotsPerInch() / 96);
|
||||
const int screenNumber = qApp->desktop()->screenNumber(widget);
|
||||
const QScreen *screen = QApplication::screens()[screenNumber];
|
||||
// Workaround for QScreen::physicalDotsPerInch() that could return
|
||||
// values that are smaller than the normal 96 DPI on Windows
|
||||
const qreal physicalDPI = qMax<qreal>(screen->physicalDotsPerInch(), 96);
|
||||
return (screen->logicalDotsPerInch() / physicalDPI);
|
||||
#elif defined(Q_OS_MAC)
|
||||
return 1;
|
||||
#else
|
||||
|
||||
@@ -91,6 +91,16 @@ void RSSController::itemsAction()
|
||||
setResult(jsonVal.toObject());
|
||||
}
|
||||
|
||||
void RSSController::refreshItemAction()
|
||||
{
|
||||
checkParams({"itemPath"});
|
||||
|
||||
const QString itemPath {params()["itemPath"]};
|
||||
RSS::Item *item = RSS::Session::instance()->itemByPath(itemPath);
|
||||
if (item)
|
||||
item->refresh();
|
||||
}
|
||||
|
||||
void RSSController::setRuleAction()
|
||||
{
|
||||
checkParams({"ruleName", "ruleDef"});
|
||||
|
||||
@@ -44,6 +44,7 @@ private slots:
|
||||
void removeItemAction();
|
||||
void moveItemAction();
|
||||
void itemsAction();
|
||||
void refreshItemAction();
|
||||
void setRuleAction();
|
||||
void renameRuleAction();
|
||||
void removeRuleAction();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user