mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-24 01:08:06 -06:00
Add struct TorrentCreatorParams for passing parameters
Filter out continuous newlines in Trackers field Avoid adding empty url seed entries Cleanup: Replace boost::bind Add const Use nullptr Use QString::SkipEmptyParts Rename variables Throw proper exception type
This commit is contained in:
@@ -161,12 +161,13 @@ void TorrentCreatorDlg::onCreateButtonClicked()
|
||||
setInteractionEnabled(false);
|
||||
setCursor(QCursor(Qt::WaitCursor));
|
||||
|
||||
QStringList trackers = m_ui->trackersList->toPlainText().split("\n");
|
||||
QStringList urlSeeds = m_ui->URLSeedsList->toPlainText().split("\n");
|
||||
QString comment = m_ui->txtComment->toPlainText();
|
||||
const QStringList trackers = m_ui->trackersList->toPlainText().trimmed()
|
||||
.replace(QRegularExpression("\n\n[\n]+"), "\n\n").split('\n');
|
||||
const QStringList urlSeeds = m_ui->URLSeedsList->toPlainText().split('\n', QString::SkipEmptyParts);
|
||||
const QString comment = m_ui->txtComment->toPlainText();
|
||||
|
||||
// run the creator thread
|
||||
m_creatorThread->create(input, destination, trackers, urlSeeds, comment, m_ui->checkPrivate->isChecked(), getPieceSize());
|
||||
m_creatorThread->create({ m_ui->checkPrivate->isChecked(), getPieceSize(), input, destination, comment, trackers, urlSeeds });
|
||||
}
|
||||
|
||||
void TorrentCreatorDlg::handleCreationFailure(const QString &msg)
|
||||
|
||||
Reference in New Issue
Block a user