Disable the ability to create torrents with a piece size of 256MiB

Disabling will reduce the number of users experiencing this issue.
https://github.com/qbittorrent/qBittorrent/issues/21011

PR #21295.
This commit is contained in:
stalkerok 2024-10-07 16:40:02 +03:00 committed by Vladimir Golovnev (glassez)
parent 6379c33964
commit 93096dba56
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7

View file

@ -84,11 +84,7 @@ TorrentCreatorDialog::TorrentCreatorDialog(QWidget *parent, const Path &defaultP
m_ui->setupUi(this); m_ui->setupUi(this);
m_ui->comboPieceSize->addItem(tr("Auto"), 0); m_ui->comboPieceSize->addItem(tr("Auto"), 0);
#ifdef QBT_USES_LIBTORRENT2
for (int i = 4; i <= 18; ++i)
#else
for (int i = 4; i <= 17; ++i) for (int i = 4; i <= 17; ++i)
#endif
{ {
const int size = 1024 << i; const int size = 1024 << i;
const QString displaySize = Utils::Misc::friendlyUnit(size, false, 0); const QString displaySize = Utils::Misc::friendlyUnit(size, false, 0);