|
|
@ -47,7 +47,7 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{ |
|
|
|
setupUi(this); |
|
|
|
setupUi(this); |
|
|
|
setAttribute(Qt::WA_DeleteOnClose); |
|
|
|
setAttribute(Qt::WA_DeleteOnClose); |
|
|
|
setModal(true); |
|
|
|
setModal(true); |
|
|
|
show(); |
|
|
|
|
|
|
|
// Paste clipboard if there is an URL in it
|
|
|
|
// Paste clipboard if there is an URL in it
|
|
|
|
QString clip_txt = qApp->clipboard()->text(); |
|
|
|
QString clip_txt = qApp->clipboard()->text(); |
|
|
|
QStringList clip_txt_list = clip_txt.split(QString::fromUtf8("\n")); |
|
|
|
QStringList clip_txt_list = clip_txt.split(QString::fromUtf8("\n")); |
|
|
@ -71,6 +71,8 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{ |
|
|
|
} |
|
|
|
} |
|
|
|
if (clip_txt_list_cleaned.size() > 0) |
|
|
|
if (clip_txt_list_cleaned.size() > 0) |
|
|
|
textUrls->setText(clip_txt_list_cleaned.join("\n")); |
|
|
|
textUrls->setText(clip_txt_list_cleaned.join("\n")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
show(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
~downloadFromURL() {} |
|
|
|
~downloadFromURL() {} |
|
|
@ -93,7 +95,7 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!url_list_cleaned.size()) { |
|
|
|
if (!url_list_cleaned.size()) { |
|
|
|
QMessageBox::warning(0, tr("No URL entered"), tr("Please type at least one URL.")); |
|
|
|
QMessageBox::warning(this, tr("No URL entered"), tr("Please type at least one URL.")); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
emit urlsReadyToBeDownloaded(url_list_cleaned); |
|
|
|
emit urlsReadyToBeDownloaded(url_list_cleaned); |
|
|
|