mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
Merge pull request #13168 from glassez/save-checking
Always allow to save resume data in checking state
This commit is contained in:
commit
dc7267b600
2 changed files with 7 additions and 6 deletions
|
@ -2318,8 +2318,7 @@ void Session::generateResumeData(const bool final)
|
||||||
if (!torrent->isValid()) continue;
|
if (!torrent->isValid()) continue;
|
||||||
|
|
||||||
if (!final && !torrent->needSaveResumeData()) continue;
|
if (!final && !torrent->needSaveResumeData()) continue;
|
||||||
if (torrent->isChecking()
|
if (torrent->isPaused()
|
||||||
|| torrent->isPaused()
|
|
||||||
|| torrent->hasError()
|
|| torrent->hasError()
|
||||||
|| torrent->hasMissingFiles())
|
|| torrent->hasMissingFiles())
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -35,11 +35,13 @@
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
#include <QRegExp>
|
#include <QRegExp>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#ifdef Q_OS_MACOS
|
|
||||||
|
#if defined(Q_OS_MACOS) || defined(__MINGW32__)
|
||||||
|
#define QBT_USES_QTHREADSTORAGE
|
||||||
#include <QThreadStorage>
|
#include <QThreadStorage>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../tristatebool.h"
|
#include "base/tristatebool.h"
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
@ -139,7 +141,7 @@ int Utils::String::naturalCompare(const QString &left, const QString &right, con
|
||||||
// provide a single `NaturalCompare` instance for easy use
|
// provide a single `NaturalCompare` instance for easy use
|
||||||
// https://doc.qt.io/qt-5/threads-reentrancy.html
|
// https://doc.qt.io/qt-5/threads-reentrancy.html
|
||||||
if (caseSensitivity == Qt::CaseSensitive) {
|
if (caseSensitivity == Qt::CaseSensitive) {
|
||||||
#ifdef Q_OS_MACOS // workaround for Apple xcode: https://stackoverflow.com/a/29929949
|
#ifdef QBT_USES_QTHREADSTORAGE
|
||||||
static QThreadStorage<NaturalCompare> nCmp;
|
static QThreadStorage<NaturalCompare> nCmp;
|
||||||
if (!nCmp.hasLocalData())
|
if (!nCmp.hasLocalData())
|
||||||
nCmp.setLocalData(NaturalCompare(Qt::CaseSensitive));
|
nCmp.setLocalData(NaturalCompare(Qt::CaseSensitive));
|
||||||
|
@ -150,7 +152,7 @@ int Utils::String::naturalCompare(const QString &left, const QString &right, con
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef QBT_USES_QTHREADSTORAGE
|
||||||
static QThreadStorage<NaturalCompare> nCmp;
|
static QThreadStorage<NaturalCompare> nCmp;
|
||||||
if (!nCmp.hasLocalData())
|
if (!nCmp.hasLocalData())
|
||||||
nCmp.setLocalData(NaturalCompare(Qt::CaseInsensitive));
|
nCmp.setLocalData(NaturalCompare(Qt::CaseInsensitive));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue