Commit 4d846691 authored by Allen Winter's avatar Allen Winter
Browse files

publishdialog.cpp - build a proper comma-separated addresslist

parent a4b62b4f
......@@ -122,18 +122,16 @@ void PublishDialog::addAttendee(const Attendee &attendee)
QString PublishDialog::addresses() const
{
QString to;
QStringList toList;
const int count = d->mUI.mListWidget->count();
for (int i = 0; i < count; ++i) {
QListWidgetItem *item = d->mUI.mListWidget->item(i);
if (!item->text().isEmpty()) {
to += item->text();
if (i < count - 1) {
to += QLatin1String(", ");
}
toList << item->text();
}
}
return to;
return toList.join(QLatin1Char(','));
}
void PublishDialog::accept()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment