mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 20:26:17 +00:00
Fix file extension regesp
The original negative lookahead failed in case the file name contains more than 1 dot as it looks for dot that is not followed by the given extensions. And such a match exists in the file name. The new version should look properly if the file ends with any of the given extensions. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4955f858bf
commit
8a4f2f998a
1 changed files with 1 additions and 1 deletions
|
@ -1814,7 +1814,7 @@ void MainWindow::on_actionImportDiveLog_triggered()
|
|||
return;
|
||||
updateLastUsedDir(QFileInfo(fileNames[0]).dir().path());
|
||||
|
||||
QStringList logFiles = fileNames.filter(QRegExp("^.*\\.(?!(csv|txt|apd|zxu|zxl))", Qt::CaseInsensitive));
|
||||
QStringList logFiles = fileNames.filter(QRegExp("^(?!.*\\.(csv|txt|apd|zxu|zxl))", Qt::CaseInsensitive));
|
||||
QStringList csvFiles = fileNames.filter(".csv", Qt::CaseInsensitive);
|
||||
csvFiles += fileNames.filter(".apd", Qt::CaseInsensitive);
|
||||
csvFiles += fileNames.filter(".zxu", Qt::CaseInsensitive);
|
||||
|
|
Loading…
Add table
Reference in a new issue