mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue