Compare commits

..

14 Commits

Author SHA1 Message Date
sledgehammer999
359b464958 Bump to 4.1.8 2019-09-23 21:56:30 +03:00
sledgehammer999
b5b0d68dd9 Update Changelog 2019-09-23 21:52:56 +03:00
Chocobo1
f48c49c248 Fix seeding failed after creating a new torrent
Closes #11252.
2019-09-23 21:47:37 +03:00
Chocobo1
11ca744548 Treat .magnet file extension as case insensitive
Closes #11200.
2019-09-23 21:47:35 +03:00
Chocobo1
82e6fc700e Fix filename validation on non-Windows OS
Closes #11191.
2019-09-23 21:47:34 +03:00
Mike Tzou
59fd70c638 Merge pull request #11240 from Chocobo1/backport
Revise HTML escaping in GUI (Backport)
2019-09-17 10:38:51 +08:00
Chocobo1
617bf767df Escape HTML in comment field 2019-09-16 23:48:12 +08:00
Chocobo1
55180e3598 Remove redundant HTML escaping
The text widget is already set to plaintext and doing HTML escaping will
not give us more security but only makes it harder to read.
2019-09-16 23:48:06 +08:00
Mike Tzou
56b62e6573 Merge pull request #11183 from Chocobo1/backport
Always save info dict when saving fastresume (backport to v4_1_x)
2019-09-04 12:09:14 +08:00
Chocobo1
b37e7b0340 Always save info dict when saving fastresume
Otherwise torrents loaded from fastresume won't have it and needs
to redownload it from elsewhere and slowing down the startup process.
This is also required for the future where we will drop loading the
`info` dict from .torrent files.
2019-09-03 14:37:45 +08:00
Mike Tzou
21aebaf16f Merge pull request #11074 from Chocobo1/backport
Fix translation issues (backport to v4_1_x)
2019-08-15 11:11:52 +08:00
Chocobo1
5792465317 Fix translation issues
By using disambiguation field instead of comment field to differentiate
translations.
2019-08-14 13:09:56 +08:00
Vladimir Golovnev
e98f44af63 Merge pull request #11067 from glassez/rss-api
Allow to refresh RSS item(s) via WebAPI
2019-08-13 19:52:10 +03:00
Vladimir Golovnev (Glassez)
40cf0203fb Allow to refresh RSS item(s) via WebAPI 2019-08-13 17:39:19 +03:00
18 changed files with 58 additions and 29 deletions

View File

@@ -1,3 +1,8 @@
* 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)

24
configure vendored
View File

@@ -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.8.
#
# 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.8'
PACKAGE_STRING='qbittorrent v4.1.8'
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.8 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.8:";;
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.8
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.8, 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.8'
cat >>confdefs.h <<_ACEOF
@@ -6274,7 +6274,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.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6332,7 +6332,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.8
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -7590,7 +7590,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.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7648,7 +7648,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.8
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@@ -1,4 +1,4 @@
AC_INIT([qbittorrent], [v4.1.7], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
AC_INIT([qbittorrent], [v4.1.8], [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
View File

@@ -55,7 +55,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.1.7</string>
<string>4.1.8</string>
<key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string>
<key>CFBundleIdentifier</key>

View File

@@ -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.8"
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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>

View File

@@ -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());

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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"});

View File

@@ -44,6 +44,7 @@ private slots:
void removeItemAction();
void moveItemAction();
void itemsAction();
void refreshItemAction();
void setRuleAction();
void renameRuleAction();
void removeRuleAction();

View File

@@ -353,7 +353,7 @@
</tr>
</table>
<div class="formRow">
<span>Info: The password is saved unencrypted</span>
<span>QBT_TR(Info: The password is saved unencrypted)QBT_TR[CONTEXT=OptionsDialog]</span>
</div>
</fieldset>
</fieldset>

View File

@@ -4,7 +4,7 @@ PROJECT_NAME = qbittorrent
# Define version numbers here
VER_MAJOR = 4
VER_MINOR = 1
VER_BUGFIX = 7
VER_BUGFIX = 8
VER_BUILD = 0
VER_STATUS = # Should be empty for stable releases!