Initialize boolean variables

This commit is contained in:
Chocobo1
2020-03-06 15:04:29 +08:00
parent 9c6bc6c89a
commit 48e7191ef7
4 changed files with 6 additions and 6 deletions

View File

@@ -1003,7 +1003,7 @@ void TransferListWidget::renameSelectedTorrent()
if (!torrent) return;
// Ask for a new Name
bool ok;
bool ok = false;
QString name = AutoExpandableDialog::getText(this, tr("Rename"), tr("New name:"), QLineEdit::Normal, torrent->name(), &ok);
if (ok && !name.isEmpty()) {
name.replace(QRegularExpression("\r?\n|\r"), " ");