Fix Add tracker dialog empty trackers

This commit is contained in:
ngosang 2016-04-22 23:47:22 +02:00
parent f22aee2bff
commit b7ef066545

View file

@ -53,7 +53,13 @@ TrackersAdditionDlg::TrackersAdditionDlg(BitTorrent::TorrentHandle *const torren
QStringList TrackersAdditionDlg::newTrackers() const
{
return trackers_list->toPlainText().trimmed().split("\n");
QStringList cleanTrackers;
foreach (QString url, trackers_list->toPlainText().split("\n")) {
url = url.trimmed();
if (!url.isEmpty())
cleanTrackers << url;
}
return cleanTrackers;
}
void TrackersAdditionDlg::on_uTorrentListButton_clicked()