Skip to content

Commit b3293c3

Browse files
committed
Revert
Signed-off-by: Raul Metsma <raul@metsma.ee>
1 parent 3a6b2ed commit b3293c3

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

client/dialogs/RoleAddressDialog.cpp

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,6 @@
2828

2929
class RoleAddressDialog::Private: public Ui::RoleAddressDialog {};
3030

31-
static QString cleanUp(const QString& src) {
32-
QString dst;
33-
dst.reserve(src.size());
34-
size_t dlen = 0;
35-
for (auto s = src.cbegin(); s != src.cend(); s++) {
36-
if ((*s <= ' ') && (*s != QChar(0x9)) && (*s != QChar(0xa)) && (*s != QChar(0xd))) continue;
37-
if ((*s == QChar(0xfffe)) || (*s == QChar(0xffff))) continue;
38-
dst.append(*s);
39-
}
40-
dst.resize(dlen);
41-
return dst;
42-
}
43-
4431
RoleAddressDialog::RoleAddressDialog(QWidget *parent)
4532
: QDialog(parent)
4633
, d(new Private)
@@ -70,7 +57,7 @@ RoleAddressDialog::RoleAddressDialog(QWidget *parent)
7057
line->setCompleter(completer);
7158
connect(line, &QLineEdit::editingFinished, this, [line, s = std::move(s)] {
7259
QStringList list = s;
73-
QString text = cleanUp(line->text());
60+
QString text = line->text();
7461
list.removeAll(text);
7562
list.insert(0, text);
7663
if(list.size() > 10)
@@ -95,10 +82,10 @@ int RoleAddressDialog::get(QString &city, QString &country, QString &state, QStr
9582
int result = QDialog::exec();
9683
if(result == QDialog::Rejected)
9784
return result;
98-
role = cleanUp(d->Role->text());
99-
city = cleanUp(d->City->text());
100-
state = cleanUp(d->State->text());
101-
country = cleanUp(d->Country->text());
102-
zip = cleanUp(d->Zip->text());
85+
role = d->Role->text();
86+
city = d->City->text();
87+
state = d->State->text();
88+
country = d->Country->text();
89+
zip = d->Zip->text();
10390
return result;
10491
}

0 commit comments

Comments
 (0)