CSV import: parse (unit) style headers
Commit fc010456 introduced the units to column headers. Thus the matching of these labels must take the unit into account when doing automatic matching of the header line with our field naming. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
9ef90daf77
commit
c53442e37e
@ -100,7 +100,9 @@ int ColumnNameProvider::rowCount(const QModelIndex &parent) const
|
||||
int ColumnNameProvider::mymatch(QString value) const
|
||||
{
|
||||
QString searchString = value.toLower();
|
||||
searchString.replace("\"", "").replace(" ", "").replace(".", "").replace("\n","");
|
||||
QRegExp re(" \\(.*\\)");
|
||||
|
||||
searchString.replace("\"", "").replace(re, "").replace(" ", "").replace(".", "").replace("\n","");
|
||||
for (int i = 0; i < columnNames.count(); i++) {
|
||||
QString name = columnNames.at(i).toLower();
|
||||
name.replace("\"", "").replace(" ", "").replace(".", "").replace("\n","");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user