mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	In recent files use native directory separators
Qt internally always uses / as directory separator. #651 shows that in the recent files menu, under windows we can have double entries with both versions of the separator. This patch should normalize the menu entires to use the native separator (i.e. \ on Windows). (Untested due to lack of Windows computer). See #651 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									6c15647858
								
							
						
					
					
						commit
						a7eb316b1f
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -970,7 +970,7 @@ void MainWindow::addRecentFile(const QStringList &newFiles) | |||
| 	} | ||||
| 
 | ||||
| 	foreach (const QString &file, newFiles) { | ||||
| 		int index = files.indexOf(file); | ||||
| 		int index = files.indexOf(QDir::toNativeSeparators(file)); | ||||
| 
 | ||||
| 		if (index >= 0) { | ||||
| 			files.removeAt(index); | ||||
|  | @ -979,7 +979,7 @@ void MainWindow::addRecentFile(const QStringList &newFiles) | |||
| 
 | ||||
| 	foreach (const QString &file, newFiles) { | ||||
| 		if (QFile::exists(file)) { | ||||
| 			files.prepend(file); | ||||
| 			files.prepend(QDir::toNativeSeparators(file)); | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue