SF Bug #104 Export to template introduces spaces

.. between subject alternative names, spaces break the editor

The spaces are not recognized correctly, when editing with
the v3ext editor.
It now peoperly removes spaces at the beginning and end
of each part.
This commit is contained in:
Christian Hohnstaedt 2015-04-15 05:47:19 +02:00
parent c1931f0296
commit deb319d43c

View File

@ -125,8 +125,12 @@ void v3ext::setupLineEdit(const QString &s, QLineEdit *l)
/* for one TYPE:Content String */
void v3ext::addEntry(QString line)
{
int idx = line.indexOf(':');
int idx;
QString type, value;
line = line.trimmed();
idx = line.indexOf(':');
if (idx == -1) {
value = line;
} else {
@ -152,14 +156,14 @@ QString v3ext::toString()
QStringList s = tab->getRow(i);
str += s[0] + ":" +s[1];
}
return str.join(",");
return str.join(", ");
}
void v3ext::on_apply_clicked()
{
__validate(false);
if (le)
le->setText(toString());
__validate(false);
accept();
}