Focus on Download button if torrent link retrieved from the clipboard

PR #20716.
Closes #20682.
This commit is contained in:
Vladimir Golovnev 2024-04-19 09:21:52 +03:00 committed by GitHub
parent 3e0fd01604
commit 7310eec74e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,11 +90,12 @@ DownloadFromURLDialog::DownloadFromURLDialog(QWidget *parent)
urls << urlString;
}
const QString text = urls.join(u'\n')
+ (!urls.isEmpty() ? u"\n" : u"");
m_ui->textUrls->setText(text);
m_ui->textUrls->moveCursor(QTextCursor::End);
if (!urls.isEmpty())
{
m_ui->textUrls->setText(urls.join(u'\n') + u"\n");
m_ui->textUrls->moveCursor(QTextCursor::End);
m_ui->buttonBox->setFocus();
}
if (const QSize dialogSize = m_storeDialogSize; dialogSize.isValid())
resize(dialogSize);