Browse Source

Fix Add tracker dialog empty trackers

adaptive-webui-19844
ngosang 9 years ago
parent
commit
b7ef066545
  1. 8
      src/gui/properties/trackersadditiondlg.cpp

8
src/gui/properties/trackersadditiondlg.cpp

@ -53,7 +53,13 @@ TrackersAdditionDlg::TrackersAdditionDlg(BitTorrent::TorrentHandle *const torren
QStringList TrackersAdditionDlg::newTrackers() const 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() void TrackersAdditionDlg::on_uTorrentListButton_clicked()

Loading…
Cancel
Save