You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-09 18:32:15 +02:00
Compare commits
141 Commits
release-4.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
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 |
@@ -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
|
||||
|
73
Changelog
73
Changelog
@@ -1,3 +1,76 @@
|
||||
* 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)
|
||||
|
16
configure
vendored
16
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]
|
||||
@@ -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
|
||||
@@ -5801,15 +5801,15 @@ _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")
|
||||
# Convert " -" to "\n" if not between quotes and remove possible leading white spaces
|
||||
string=$(echo " $*" | $SED -e 's: -:\n: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
|
||||
|
14
configure.ac
14
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,7 +181,7 @@ 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])
|
||||
@@ -251,15 +251,15 @@ 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")
|
||||
# Convert " -" to "\n" if not between quotes and remove possible leading white spaces
|
||||
string=$(echo " $*" | $SED -e 's: -:\n: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.1</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>
|
||||
|
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.1"
|
||||
!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}"
|
||||
|
||||
|
@@ -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,8 @@ 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");
|
||||
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) {
|
||||
|
@@ -187,6 +187,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.
|
||||
|
@@ -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;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Bittorrent Client using Qt4 and libtorrent.
|
||||
* Copyright (C) 2006 Christophe Dumez
|
||||
*
|
||||
@@ -28,6 +28,7 @@
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#include "core/unicodestrings.h"
|
||||
#include "misc.h"
|
||||
|
||||
#include <cmath>
|
||||
@@ -183,9 +184,7 @@ void misc::shutdownComputer(shutDownAction action)
|
||||
AppleEvent eventReply = {typeNull, NULL};
|
||||
AppleEvent appleEventToSend = {typeNull, NULL};
|
||||
|
||||
OSStatus error = noErr;
|
||||
|
||||
error = AECreateDesc(typeProcessSerialNumber, &kPSNOfSystemProcess,
|
||||
OSStatus error = AECreateDesc(typeProcessSerialNumber, &kPSNOfSystemProcess,
|
||||
sizeof(kPSNOfSystemProcess), &targetDesc);
|
||||
|
||||
if (error != noErr)
|
||||
@@ -298,8 +297,10 @@ QString misc::friendlyUnit(qreal val, bool is_speed)
|
||||
if (val < 0)
|
||||
return QCoreApplication::translate("misc", "Unknown", "Unknown (size)");
|
||||
int i = 0;
|
||||
while(val >= 1024. && i++<6)
|
||||
while(val >= 1024. && i < 4) {
|
||||
val /= 1024.;
|
||||
++i;
|
||||
}
|
||||
QString ret;
|
||||
if (i == 0)
|
||||
ret = QString::number((long)val) + " " + QCoreApplication::translate("misc", units[0].source, units[0].comment);
|
||||
@@ -405,7 +406,7 @@ QString misc::magnetUriToHash(const QString& magnet_uri)
|
||||
QString misc::userFriendlyDuration(qlonglong seconds)
|
||||
{
|
||||
if (seconds < 0 || seconds >= MAX_ETA)
|
||||
return QString::fromUtf8("∞");
|
||||
return QString::fromUtf8(C_INFINITY);
|
||||
if (seconds == 0)
|
||||
return "0";
|
||||
if (seconds < 60)
|
||||
@@ -421,7 +422,7 @@ QString misc::userFriendlyDuration(qlonglong seconds)
|
||||
hours = hours - days * 24;
|
||||
if (days < 100)
|
||||
return QCoreApplication::translate("misc", "%1d %2h", "e.g: 2days 10hours").arg(QString::number(days)).arg(QString::number(hours));
|
||||
return QString::fromUtf8("∞");
|
||||
return QString::fromUtf8(C_INFINITY);
|
||||
}
|
||||
|
||||
QString misc::getUserIDString()
|
||||
@@ -527,12 +528,14 @@ QString misc::parseHtmlLinks(const QString &raw_text)
|
||||
static QRegExp reNoScheme("<a\\s+href=\"(?!http(s?))([a-zA-Z0-9\\?%=&/_\\.-:#]+)\\s*\">");
|
||||
result.replace(reNoScheme, "<a href=\"http://\\1\">");
|
||||
|
||||
// to preserve plain text formatting
|
||||
result = "<p style=\"white-space: pre-wrap;\">" + result + "</p>";
|
||||
return result;
|
||||
}
|
||||
|
||||
QString misc::toQString(time_t t)
|
||||
QString misc::toQString(time_t t, Qt::DateFormat f)
|
||||
{
|
||||
return QDateTime::fromTime_t(t).toString(Qt::DefaultLocaleLongDate);
|
||||
return QDateTime::fromTime_t(t).toString(f);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
|
@@ -64,6 +64,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);
|
||||
@@ -100,7 +101,6 @@ 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
|
||||
|
@@ -295,7 +295,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 +627,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 +659,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 +858,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 +870,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 +971,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 +1030,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)
|
||||
@@ -1479,7 +1489,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 +1564,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)
|
||||
@@ -1636,7 +1646,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));
|
||||
}
|
||||
@@ -1751,7 +1761,7 @@ QString Preferences::getPythonPath()
|
||||
|
||||
// Fallback: Detect python from default locations
|
||||
QStringList supported_versions;
|
||||
supported_versions << "32" << "31" << "30" << "27" << "26" << "25";
|
||||
supported_versions << "34" << "33" << "32" << "31" << "30" << "27" << "26" << "25";
|
||||
foreach (const QString &v, supported_versions)
|
||||
if (QFile::exists("C:/Python" + v + "/python.exe"))
|
||||
return "C:/Python" + v;
|
||||
|
@@ -282,6 +282,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;
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -131,7 +131,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 +414,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
|
||||
@@ -1253,9 +1253,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 +1552,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();
|
||||
@@ -2209,15 +2194,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 +2204,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();
|
||||
@@ -2622,7 +2606,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) {
|
||||
|
@@ -418,8 +418,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)");
|
||||
|
@@ -54,7 +54,7 @@ class TorrentModelItem : public QObject {
|
||||
|
||||
public:
|
||||
enum State {STATE_DOWNLOADING, STATE_DOWNLOADING_META, STATE_ALLOCATING, STATE_STALLED_DL, STATE_SEEDING, STATE_STALLED_UP, STATE_QUEUED_DL, STATE_QUEUED_UP, STATE_CHECKING_UP, STATE_CHECKING_DL, STATE_QUEUED_CHECK, STATE_QUEUED_FASTCHECK, STATE_PAUSED_DL, STATE_PAUSED_UP, STATE_PAUSED_MISSING, STATE_FORCED_DL, STATE_FORCED_UP, STATE_INVALID};
|
||||
enum Column {TR_NAME, TR_PRIORITY, TR_SIZE, TR_TOTAL_SIZE, TR_PROGRESS, TR_STATUS, TR_SEEDS, TR_PEERS, TR_DLSPEED, TR_UPSPEED, TR_ETA, TR_RATIO, TR_LABEL, TR_ADD_DATE, TR_SEED_DATE, TR_TRACKER, TR_DLLIMIT, TR_UPLIMIT, TR_AMOUNT_DOWNLOADED, TR_AMOUNT_UPLOADED, TR_AMOUNT_LEFT, TR_TIME_ELAPSED, TR_SAVE_PATH, TR_COMPLETED, TR_RATIO_LIMIT, TR_SEEN_COMPLETE_DATE, TR_LAST_ACTIVITY, TR_AMOUNT_DOWNLOADED_SESSION, TR_AMOUNT_UPLOADED_SESSION, NB_COLUMNS};
|
||||
enum Column {TR_PRIORITY, TR_NAME, TR_SIZE, TR_TOTAL_SIZE, TR_PROGRESS, TR_STATUS, TR_SEEDS, TR_PEERS, TR_DLSPEED, TR_UPSPEED, TR_ETA, TR_RATIO, TR_LABEL, TR_ADD_DATE, TR_SEED_DATE, TR_TRACKER, TR_DLLIMIT, TR_UPLIMIT, TR_AMOUNT_DOWNLOADED, TR_AMOUNT_UPLOADED, TR_AMOUNT_DOWNLOADED_SESSION, TR_AMOUNT_UPLOADED_SESSION, TR_AMOUNT_LEFT, TR_TIME_ELAPSED, TR_SAVE_PATH, TR_COMPLETED, TR_RATIO_LIMIT, TR_SEEN_COMPLETE_DATE, TR_LAST_ACTIVITY, NB_COLUMNS};
|
||||
|
||||
public:
|
||||
TorrentModelItem(const QTorrentHandle& h);
|
||||
|
83
src/core/unicodestrings.h
Normal file
83
src/core/unicodestrings.h
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2015 Mike Tzou
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* In addition, as a special exception, the copyright holders give permission to
|
||||
* link this program with the OpenSSL project's "OpenSSL" library (or with
|
||||
* modified versions of it that use the same license as the "OpenSSL" library),
|
||||
* and distribute the linked executables. You must obey the GNU General Public
|
||||
* License in all respects for all of the code used other than "OpenSSL". If you
|
||||
* modify file(s), you may extend this exception to your version of the file(s),
|
||||
* but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
// This file must be encoded in "UTF-8 with BOM"
|
||||
#ifdef _MSC_VER
|
||||
#pragma execution_character_set("utf-8")
|
||||
#endif
|
||||
|
||||
// Because of the poor handling of UTF-8 characters in MSVC (emits warning C4819),
|
||||
// we put all problematic UTF-8 chars/strings in this file.
|
||||
// See issue #3059 for more details (https://github.com/qbittorrent/qBittorrent/issues/3059).
|
||||
const char C_INFINITY[] = "∞";
|
||||
const char C_UP[] = "▲";
|
||||
const char C_DOWN[] = "▼";
|
||||
const char C_COPYRIGHT[] = "©";
|
||||
const char C_LOCALE_ENGLISH[] = "English";
|
||||
const char C_LOCALE_ENGLISH_AUSTRALIA[] = "English(Australia)";
|
||||
const char C_LOCALE_ENGLISH_UNITEDKINGDOM[] = "English(United Kingdom)";
|
||||
const char C_LOCALE_FRENCH[] = "Français";
|
||||
const char C_LOCALE_GERMAN[] = "Deutsch";
|
||||
const char C_LOCALE_HUNGARIAN[] = "Magyar";
|
||||
const char C_LOCALE_INDONESIAN[] = "Bahasa Indonesia";
|
||||
const char C_LOCALE_ITALIAN[] = "Italiano";
|
||||
const char C_LOCALE_DUTCH[] = "Nederlands";
|
||||
const char C_LOCALE_SPANISH[] = "Español";
|
||||
const char C_LOCALE_CATALAN[] = "Català";
|
||||
const char C_LOCALE_GALICIAN[] = "Galego";
|
||||
const char C_LOCALE_PORTUGUESE[] = "Português";
|
||||
const char C_LOCALE_PORTUGUESE_BRAZIL[] = "Português brasileiro";
|
||||
const char C_LOCALE_POLISH[] = "Polski";
|
||||
const char C_LOCALE_LITHUANIAN[] = "Lietuvių";
|
||||
const char C_LOCALE_CZECH[] = "Čeština";
|
||||
const char C_LOCALE_SLOVAK[] = "Slovenčina";
|
||||
const char C_LOCALE_SERBIAN[] = "Српски";
|
||||
const char C_LOCALE_CROATIAN[] = "Hrvatski";
|
||||
const char C_LOCALE_ARMENIAN[] = "Հայերեն";
|
||||
const char C_LOCALE_ROMANIAN[] = "Română";
|
||||
const char C_LOCALE_TURKISH[] = "Türkçe";
|
||||
const char C_LOCALE_GREEK[] = "Ελληνικά";
|
||||
const char C_LOCALE_SWEDISH[] = "Svenska";
|
||||
const char C_LOCALE_FINNISH[] = "Suomi";
|
||||
const char C_LOCALE_NORWEGIAN[] = "Norsk";
|
||||
const char C_LOCALE_DANISH[] = "Dansk";
|
||||
const char C_LOCALE_BULGARIAN[] = "Български";
|
||||
const char C_LOCALE_UKRAINIAN[] = "Українська";
|
||||
const char C_LOCALE_RUSSIAN[] = "Русский";
|
||||
const char C_LOCALE_JAPANESE[] = "日本語";
|
||||
const char C_LOCALE_HEBREW[] = "עברית";
|
||||
const char C_LOCALE_HINDI[] = "हिन्दी, हिंदी";
|
||||
const char C_LOCALE_ARABIC[] = "عربي";
|
||||
const char C_LOCALE_GEORGIAN[] = "ქართული";
|
||||
const char C_LOCALE_BYELORUSSIAN[] = "Беларуская";
|
||||
const char C_LOCALE_BASQUE[] = "Euskara";
|
||||
const char C_LOCALE_VIETNAMESE[] = "tiếng Việt";
|
||||
const char C_LOCALE_CHINESE_TRADITIONAL_TW[] = "正體中文 (臺灣)";
|
||||
const char C_LOCALE_CHINESE_TRADITIONAL_HK[] = "繁體中文 (香港)";
|
||||
const char C_LOCALE_CHINESE_SIMPLIFIED[] = "简体中文";
|
||||
const char C_LOCALE_KOREAN[] = "한글";
|
@@ -1,6 +1,8 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file>gpl.html</file>
|
||||
<file>thanks.html</file>
|
||||
<file>translators.html</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
|
@@ -89,7 +89,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="icons.qrc">:/icons/skin/mascot.png</pixmap>
|
||||
<pixmap resource="../icons.qrc">:/icons/skin/mascot.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -369,7 +369,11 @@
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="te_thanks"/>
|
||||
<widget class="QTextBrowser" name="te_thanks">
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -517,7 +521,7 @@
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources>
|
||||
<include location="icons.qrc"/>
|
||||
<include location="../icons.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#include <QtGlobal>
|
||||
#include <libtorrent/version.hpp>
|
||||
#include <boost/version.hpp>
|
||||
#include "core/unicodestrings.h"
|
||||
|
||||
class about : public QDialog, private Ui::AboutDlg{
|
||||
Q_OBJECT
|
||||
@@ -51,9 +52,9 @@ class about : public QDialog, private Ui::AboutDlg{
|
||||
// About
|
||||
QString aboutText =
|
||||
QString::fromUtf8("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\"><html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">p, li { white-space: pre-wrap; }</style></head><body style=\" font-size:11pt; font-weight:400; font-style:normal;\"><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">") +
|
||||
tr("An advanced BitTorrent client programmed in C++, based on Qt toolkit and libtorrent-rasterbar.") +
|
||||
tr("An advanced BitTorrent client programmed in <nobr>C++</nobr>, based on Qt toolkit and libtorrent-rasterbar.") +
|
||||
QString::fromUtf8(" <br /><br />") +
|
||||
trUtf8("Copyright ©2006-2013 The qBittorrent project") +
|
||||
trUtf8("Copyright %1 2006-2015 The qBittorrent project").arg(C_COPYRIGHT) +
|
||||
QString::fromUtf8("<br /><br />") +
|
||||
tr("Home Page: ") +
|
||||
QString::fromUtf8("<a href=\"http://www.qbittorrent.org\"><span style=\" text-decoration: underline; color:#0000ff;\">http://www.qbittorrent.org</span></a></p><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">") +
|
||||
@@ -71,60 +72,21 @@ class about : public QDialog, private Ui::AboutDlg{
|
||||
//Title
|
||||
lb_name->setText(QString::fromUtf8("<b><h1>qBittorrent")+QString::fromUtf8(" " VERSION"</h1></b>"));
|
||||
// Thanks
|
||||
QString thanks_txt;
|
||||
thanks_txt += QString::fromUtf8("<p>I would first like to thank sourceforge.net for hosting qBittorrent project and for their support.</p>");
|
||||
thanks_txt += QString::fromUtf8("<p>I am pleased that people from all over the world are contributing to qBittorrent: Ishan Arora (India), Arnaud Demaizière (France) and Stephanos Antaris (Greece). Their help is greatly appreciated</p>");
|
||||
thanks_txt += QString::fromUtf8("<p>I also want to thank Στέφανος Αντάρης (santaris@csd.auth.gr) and Mirco Chinelli (infinity89@fastwebmail.it) for working on Mac OS X packaging.</p>");
|
||||
thanks_txt += QString::fromUtf8("<p>I am grateful to Peter Koeleman (peter@qbittorrent.org) and Mohammad Dib (mdib@qbittorrent.org) for working on qBittorrent port to Windows.</p>");
|
||||
thanks_txt += QString::fromUtf8("<p>Thanks a lot to our graphist Mateusz Toboła (tobejodok@qbittorrent.org) for his great work.</p>");
|
||||
te_thanks->setHtml(thanks_txt);
|
||||
QFile thanksfile(":/thanks.html");
|
||||
if (thanksfile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
te_thanks->setHtml(QString::fromUtf8(thanksfile.readAll().constData()));
|
||||
thanksfile.close();
|
||||
}
|
||||
// Translation
|
||||
QString trans_txt = "<p>"+tr("I would like to thank the following people who volunteered to translate qBittorrent:")+"</p>";
|
||||
trans_txt += QString::fromUtf8("<ul><li><u>Arabic:</u> SDERAWI (abz8868@msn.com), sn51234 (nesseyan@gmail.com) and Ibrahim Saed ibraheem_alex(Transifex)</li>\
|
||||
<li><u>Armenian:</u> Hrant Ohanyan (hrantohanyan@mail.am)</li>\
|
||||
<li><u>Basque:</u> Xabier Aramendi (azpidatziak@gmail.com)</li>\
|
||||
<li><u>Belarusian:</u> Mihas Varantsou (meequz@gmail.com)</li>\
|
||||
<li><u>Bulgarian:</u> Tsvetan & Boyko Bankoff (emerge_life@users.sourceforge.net)</li>\
|
||||
<li><u>Catalan:</u> Francisco Luque Contreras (frannoe@ya.com)</li>\
|
||||
<li><u>Chinese (Simplified):</u> Guo Yue (yue.guo0418@gmail.com)</li>\
|
||||
<li><u>Chinese (Traditional):</u> Yi-Shun Wang (dnextstep@gmail.com) and 冥王歐西里斯 s8321414(Transifex)</li>\
|
||||
<li><u>Croatian:</u> Oliver Mucafir (oliver.untwist@gmail.com)</li>\
|
||||
<li><u>Czech:</u> Jirka Vilim (web@tets.cz) and Petr Cernobila abr(Transifex)</li>\
|
||||
<li><u>Danish:</u> Mathias Nielsen (comoneo@gmail.com)</li>\
|
||||
<li><u>Dutch:</u> Pieter Heyvaert (pieter_heyvaert@hotmail.com)</li>\
|
||||
<li><u>English(Australia):</u> Robert Readman readmanr(Transifex)</li>\
|
||||
<li><u>English(United Kingdom):</u> Robert Readman readmanr(Transifex)</li>\
|
||||
<li><u>Finnish:</u> Niklas Laxström (nikerabbit@users.sourceforge.net), Pekka Niemi (pekka.niemi@iki.fi) and Jiri Grönroos artnay(Transifex)</li>\
|
||||
<li><u>Galician:</u> Marcos Lans (marcoslansgarza@gmail.com) and antiparvos(Transifex)</li>\
|
||||
<li><u>Georgian:</u> Beqa Arabuli (arabulibeqa@yahoo.com)</li>\
|
||||
<li><u>German:</u> Niels Hoffmann (zentralmaschine@users.sourceforge.net), schnurlos (schnurlos@gmail.com)</li>\
|
||||
<li><u>Greek:</u> Tsvetan Bankov (emerge_life@users.sourceforge.net), Stephanos Antaris (santaris@csd.auth.gr), sledgehammer999(hammered999@gmail.com) and Γιάννης Ανθυμίδης Evropi(Transifex)</li>\
|
||||
<li><u>Hebrew:</u> David Deutsch (d.deffo@gmail.com)</li>\
|
||||
<li><u>Hungarian:</u> Majoros Péter (majoros.peterj@gmail.com)</li>\
|
||||
<li><u>Italian:</u> bovirus (bovirus@live.it) and Matteo Sechi (bu17714@gmail.com)</li>\
|
||||
<li><u>Japanese:</u> Masato Hashimoto (cabezon.hashimoto@gmail.com)</li>\
|
||||
<li><u>Korean:</u> Jin Woo Sin (jin828sin@users.sourceforge.net)</li>\
|
||||
<li><u>Lithuanian:</u> Naglis Jonaitis (njonaitis@gmail.com)</li>\
|
||||
<li><u>Norwegian:</u> Tomaso</li>\
|
||||
<li><u>Polish:</u> Mariusz Fik (fisiu@opensuse.org)</li>\
|
||||
<li><u>Portuguese:</u> Sérgio Marques smarquespt(Transifex)</li>\
|
||||
<li><u>Portuguese(Brazil):</u> Nick Marinho (nickmarinho@gmail.com)</li>\
|
||||
<li><u>Romanian:</u> Obada Denis (obadadenis@users.sourceforge.net), Adrian Gabor Adriannho(Transifex) and Mihai Coman z0id(Transifex)</li>\
|
||||
<li><u>Russian:</u> Nick Khazov (m2k3d0n at users.sourceforge.net), Alexey Morsov (samurai@ricom.ru), Nick Tiskov Dayman(daymansmail (at) gmail (dot) com), Dmitry DmitryKX(Transifex) and kraleksandr kraleksandr(Transifex)</li>\
|
||||
<li><u>Serbian:</u> Anaximandar Milet (anaximandar@operamail.com)</li>\
|
||||
<li><u>Slovak:</u> helix84</li>\
|
||||
<li><u>Spanish:</u> Alfredo Monclús (alfrix), Francisco Luque Contreras (frannoe@ya.com), José Antonio Moray moray33(Transifex) and Diego de las Heras(Transifex)</li>\
|
||||
<li><u>Swedish:</u> Daniel Nylander (po@danielnylander.se) and Emil Hammarberg Ooglogput(Transifex)</li>\
|
||||
<li><u>Turkish:</u> Hasan YILMAZ (iletisim@hedefturkce.com) and Erdem Bingöl (erdem84@gmail.com)</li>\
|
||||
<li><u>Ukrainian:</u> Oleh Prypin (blaxpirit@gmail.com)</li>\
|
||||
<li><u>Vietnamese:</u> Anh Phan ppanhh(Transifex)</li></ul>");
|
||||
trans_txt += "<p>"+tr("Please contact me if you would like to translate qBittorrent into your own language.")+"</p>";
|
||||
te_translation->setHtml(trans_txt);
|
||||
QFile translatorsfile(":/translators.html");
|
||||
if (translatorsfile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
te_translation->setHtml(QString::fromUtf8(translatorsfile.readAll().constData()));
|
||||
translatorsfile.close();
|
||||
}
|
||||
// License
|
||||
te_license->append(QString::fromUtf8("<a name='top'></a>"));
|
||||
QFile licensefile(":/gpl.html");
|
||||
if (licensefile.open(QIODevice::ReadOnly|QIODevice::Text)) {
|
||||
te_license->setHtml(licensefile.readAll());
|
||||
if (licensefile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
te_license->setHtml(QString::fromUtf8(licensefile.readAll().constData()));
|
||||
licensefile.close();
|
||||
}
|
||||
// Libraries
|
||||
|
@@ -40,6 +40,7 @@
|
||||
#include "fs_utils.h"
|
||||
#include "autoexpandabledialog.h"
|
||||
#include "messageboxraised.h"
|
||||
#include "core/unicodestrings.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QString>
|
||||
@@ -87,6 +88,8 @@ AddNewTorrentDialog::AddNewTorrentDialog(QWidget *parent)
|
||||
editHotkey = new QShortcut(QKeySequence("F2"), ui->content_tree, 0, 0, Qt::WidgetShortcut);
|
||||
connect(editHotkey, SIGNAL(activated()), SLOT(renameSelectedFile()));
|
||||
connect(ui->content_tree, SIGNAL(doubleClicked(QModelIndex)), SLOT(renameSelectedFile()));
|
||||
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setFocus();
|
||||
}
|
||||
|
||||
AddNewTorrentDialog::~AddNewTorrentDialog()
|
||||
@@ -153,7 +156,7 @@ void AddNewTorrentDialog::showEvent(QShowEvent *event)
|
||||
void AddNewTorrentDialog::showAdvancedSettings(bool show)
|
||||
{
|
||||
if (show) {
|
||||
ui->adv_button->setText(QString::fromUtf8("▲"));
|
||||
ui->adv_button->setText(QString::fromUtf8(C_UP));
|
||||
ui->settings_group->setVisible(true);
|
||||
ui->info_group->setVisible(true);
|
||||
if (m_hasMetadata && (m_torrentInfo->num_files() > 1)) {
|
||||
@@ -167,7 +170,7 @@ void AddNewTorrentDialog::showAdvancedSettings(bool show)
|
||||
static_cast<QVBoxLayout*>(layout())->insertWidget(layout()->indexOf(ui->never_show_cb) + 1, ui->adv_button);
|
||||
}
|
||||
else {
|
||||
ui->adv_button->setText(QString::fromUtf8("▼"));
|
||||
ui->adv_button->setText(QString::fromUtf8(C_DOWN));
|
||||
ui->settings_group->setVisible(false);
|
||||
ui->info_group->setVisible(false);
|
||||
ui->buttonsHLayout->insertWidget(0, layout()->takeAt(layout()->indexOf(ui->never_show_cb) + 1)->widget());
|
||||
@@ -311,7 +314,7 @@ void AddNewTorrentDialog::updateDiskSpaceLabel()
|
||||
|
||||
QString size_string = torrent_size ? misc::friendlyUnit(torrent_size) : QString(tr("Not Available", "This size is unavailable."));
|
||||
size_string += " (";
|
||||
size_string += tr("Disk space: %1").arg(misc::friendlyUnit(fsutils::freeDiskSpaceOnPath(
|
||||
size_string += tr("Free disk space: %1").arg(misc::friendlyUnit(fsutils::freeDiskSpaceOnPath(
|
||||
ui->save_path_combo->itemData(
|
||||
ui->save_path_combo->currentIndex()).toString())));
|
||||
size_string += ")";
|
||||
@@ -327,6 +330,8 @@ void AddNewTorrentDialog::onSavePathChanged(int index)
|
||||
|
||||
// Remember index
|
||||
m_oldIndex = index;
|
||||
|
||||
updateDiskSpaceLabel();
|
||||
}
|
||||
|
||||
void AddNewTorrentDialog::browseButton_clicked()
|
||||
@@ -377,8 +382,6 @@ void AddNewTorrentDialog::browseButton_clicked()
|
||||
ui->save_path_combo->setCurrentIndex(m_oldIndex);
|
||||
}
|
||||
connect(ui->save_path_combo, SIGNAL(currentIndexChanged(int)), SLOT(onSavePathChanged(int)));
|
||||
|
||||
updateDiskSpaceLabel();
|
||||
}
|
||||
|
||||
void AddNewTorrentDialog::relayout()
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#define DELETIONCONFIRMATIONDLG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QPushButton>
|
||||
#include "ui_confirmdeletiondlg.h"
|
||||
#include "preferences.h"
|
||||
#include "iconprovider.h"
|
||||
@@ -55,7 +56,7 @@ class DeletionConfirmationDlg : public QDialog, private Ui::confirmDeletionDlg {
|
||||
move(misc::screenCenter(this));
|
||||
checkPermDelete->setChecked(Preferences::instance()->deleteTorrentFilesAsDefault());
|
||||
connect(checkPermDelete, SIGNAL(clicked()), this, SLOT(updateRememberButtonState()));
|
||||
buttonBox->setFocus();
|
||||
buttonBox->button(QDialogButtonBox::Cancel)->setFocus();
|
||||
}
|
||||
|
||||
bool shouldDeleteLocalFiles() const {
|
||||
|
@@ -80,7 +80,6 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{
|
||||
|
||||
public slots:
|
||||
void on_downloadButton_clicked() {
|
||||
close();
|
||||
QString urls = textUrls->toPlainText();
|
||||
QStringList url_list = urls.split(QString::fromUtf8("\n"));
|
||||
QString url;
|
||||
@@ -94,9 +93,10 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{
|
||||
}
|
||||
}
|
||||
if (!url_list_cleaned.size()) {
|
||||
QMessageBox::critical(0, tr("No URL entered"), tr("Please type at least one URL."));
|
||||
QMessageBox::warning(0, tr("No URL entered"), tr("Please type at least one URL."));
|
||||
return;
|
||||
}
|
||||
close();
|
||||
emit urlsReadyToBeDownloaded(url_list_cleaned);
|
||||
qDebug("Emitted urlsReadytobedownloaded signal");
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user