mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-22 17:26:21 +03:00
- Fix error in torrent addition dialog when the label name is left empty
This commit is contained in:
parent
4b43871708
commit
7ad39003f4
1 changed files with 4 additions and 2 deletions
|
@ -433,14 +433,16 @@ public slots:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!misc::isValidFileSystemName(comboLabel->currentText().trimmed())) {
|
QString current_label = comboLabel->currentText().trimmed();
|
||||||
|
if (!current_label.isEmpty() && !misc::isValidFileSystemName(current_label)) {
|
||||||
QMessageBox::warning(this, tr("Invalid label name"), tr("Please don't use any special characters in the label name."));
|
QMessageBox::warning(this, tr("Invalid label name"), tr("Please don't use any special characters in the label name."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Save savepath
|
// Save savepath
|
||||||
TorrentTempData::setSavePath(hash, savePath.path());
|
TorrentTempData::setSavePath(hash, savePath.path());
|
||||||
qDebug("Torrent label is: %s", comboLabel->currentText().trimmed().toLocal8Bit().data());
|
qDebug("Torrent label is: %s", comboLabel->currentText().trimmed().toLocal8Bit().data());
|
||||||
TorrentTempData::setLabel(hash, comboLabel->currentText().trimmed());
|
if(!current_label.isEmpty())
|
||||||
|
TorrentTempData::setLabel(hash, current_label);
|
||||||
// Is download sequential?
|
// Is download sequential?
|
||||||
TorrentTempData::setSequential(hash, checkIncrementalDL->isChecked());
|
TorrentTempData::setSequential(hash, checkIncrementalDL->isChecked());
|
||||||
// Save files path
|
// Save files path
|
||||||
|
|
Loading…
Reference in a new issue