Improve coding style

This commit is contained in:
Vladimir Golovnev (Glassez)
2020-11-16 10:02:11 +03:00
parent acad35c5bc
commit c41df9ffbd
147 changed files with 4454 additions and 2227 deletions

View File

@@ -71,7 +71,8 @@ DownloadFromURLDialog::DownloadFromURLDialog(QWidget *parent)
const QVector<QStringRef> clipboardList = clipboardText.splitRef('\n');
QSet<QString> uniqueURLs;
for (QStringRef strRef : clipboardList) {
for (QStringRef strRef : clipboardList)
{
strRef = strRef.trimmed();
if (strRef.isEmpty()) continue;
@@ -96,14 +97,16 @@ void DownloadFromURLDialog::downloadButtonClicked()
const QVector<QStringRef> urls = plainText.splitRef('\n');
QSet<QString> uniqueURLs;
for (QStringRef url : urls) {
for (QStringRef url : urls)
{
url = url.trimmed();
if (url.isEmpty()) continue;
uniqueURLs << url.toString();
}
if (uniqueURLs.isEmpty()) {
if (uniqueURLs.isEmpty())
{
QMessageBox::warning(this, tr("No URL entered"), tr("Please type at least one URL."));
return;
}