mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-27 08:19:30 +08:00
Merge pull request #2690 from Chocobo1/dev4
Don't close downloadFromURL dialog when showing empty url warning.
This commit is contained in:
commit
dbbf1a8fce
@ -80,7 +80,6 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void on_downloadButton_clicked() {
|
void on_downloadButton_clicked() {
|
||||||
close();
|
|
||||||
QString urls = textUrls->toPlainText();
|
QString urls = textUrls->toPlainText();
|
||||||
QStringList url_list = urls.split(QString::fromUtf8("\n"));
|
QStringList url_list = urls.split(QString::fromUtf8("\n"));
|
||||||
QString url;
|
QString url;
|
||||||
@ -94,9 +93,10 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!url_list_cleaned.size()) {
|
if (!url_list_cleaned.size()) {
|
||||||
QMessageBox::critical(0, tr("No URL entered"), tr("Please type at least one URL."));
|
QMessageBox::warning(0, tr("No URL entered"), tr("Please type at least one URL."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
close();
|
||||||
emit urlsReadyToBeDownloaded(url_list_cleaned);
|
emit urlsReadyToBeDownloaded(url_list_cleaned);
|
||||||
qDebug("Emitted urlsReadytobedownloaded signal");
|
qDebug("Emitted urlsReadytobedownloaded signal");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user