mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 16:07:23 -06:00
Don't ask the user questions in nox build when in non-interactive mode. Closes #3875.
This commit is contained in:
@@ -104,7 +104,7 @@ bool upgradeResumeFile(const QString &filepath)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool upgrade()
|
||||
bool upgrade(bool ask = true)
|
||||
{
|
||||
QString backupFolderPath = Utils::Fs::expandPathAbs(Utils::Fs::QDesktopServicesDataLocation() + "BT_backup");
|
||||
QDir backupFolderDir(backupFolderPath);
|
||||
@@ -112,7 +112,7 @@ bool upgrade()
|
||||
|
||||
QStringList backupFiles = backupFolderDir.entryList(QStringList() << QLatin1String("*.fastresume"), QDir::Files, QDir::Unsorted);
|
||||
if (!backupFiles.isEmpty()) {
|
||||
if (!userAcceptsUpgrade()) return false;
|
||||
if (ask && !userAcceptsUpgrade()) return false;
|
||||
|
||||
QRegExp rx(QLatin1String("^([A-Fa-f0-9]{40})\\.fastresume$"));
|
||||
foreach (QString backupFile, backupFiles) {
|
||||
|
||||
Reference in New Issue
Block a user