Move cursor to the next line of end of text

Closes #13908.
This commit is contained in:
Chocobo1 2021-03-28 15:38:30 +08:00
parent 2f28d3c7b6
commit 2b7b3c65cc
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C

View File

@ -83,7 +83,12 @@ DownloadFromURLDialog::DownloadFromURLDialog(QWidget *parent)
if (isDownloadable(str))
uniqueURLs << str;
}
m_ui->textUrls->setText(uniqueURLs.values().join('\n'));
const QString text = uniqueURLs.values().join(QLatin1Char('\n'))
+ (!uniqueURLs.isEmpty() ? QLatin1String("\n") : QLatin1String(""));
m_ui->textUrls->setText(text);
m_ui->textUrls->moveCursor(QTextCursor::End);
Utils::Gui::resize(this, m_storeDialogSize);
show();