From deb319d43c2a023332550c8a7940fa594c77aa78 Mon Sep 17 00:00:00 2001 From: Christian Hohnstaedt Date: Wed, 15 Apr 2015 05:47:19 +0200 Subject: [PATCH] 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. --- widgets/v3ext.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/widgets/v3ext.cpp b/widgets/v3ext.cpp index d124df24..69ce4251 100644 --- a/widgets/v3ext.cpp +++ b/widgets/v3ext.cpp @@ -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(); }