summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-02-07 16:42:27 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-10 15:03:28 -0800
commitc104ff67e46e6d401dcea2a2e76731c408262359 (patch)
tree8a0fb22a6ba392e65db3ff2e6c06ed540df01f38
parent2dab00f5dc8fbb8c24b09975498122afabd14bba (diff)
downloadsubsurface-c104ff67e46e6d401dcea2a2e76731c408262359.tar.gz
Add the .apd file extension to be treated as CSV file
Adding support for importing .apd files (APD Log Viewer). They are CSV files and already supported in CSV import, but the file extension .apd is added here. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/mainwindow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index df87eeef0..3142f5a82 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -1316,7 +1316,7 @@ void MainWindow::loadFiles(const QStringList fileNames)
void MainWindow::on_actionImportDiveLog_triggered()
{
QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open dive log file"), lastUsedDir(),
- tr("Dive log files (*.can *.csv *.db *.dld *.jlb *.lvd *.sde *.udcf *.uddf *.xml *.txt *.dlf);;"
+ tr("Dive log files (*.can *.csv *.db *.dld *.jlb *.lvd *.sde *.udcf *.uddf *.xml *.txt *.dlf *.apd);;"
"Cochran files (*.can);;"
"CSV files (*.csv);;"
"DiveLog.de files (*.dld);;"
@@ -1327,14 +1327,16 @@ void MainWindow::on_actionImportDiveLog_triggered()
"Divesoft files (*.dlf);;"
"UDDF/UDCF files (*.uddf *.udcf);;"
"XML files (*.xml);;"
+ "APD log viewer (*.apd);;"
"All files (*)"));
if (fileNames.isEmpty())
return;
updateLastUsedDir(QFileInfo(fileNames[0]).dir().path());
- QStringList logFiles = fileNames.filter(QRegExp("^.*\\.(?!(csv|txt))", Qt::CaseInsensitive));
+ QStringList logFiles = fileNames.filter(QRegExp("^.*\\.(?!(csv|txt|apd))", Qt::CaseInsensitive));
QStringList csvFiles = fileNames.filter(".csv", Qt::CaseInsensitive);
+ csvFiles += fileNames.filter(".apd", Qt::CaseInsensitive);
QStringList txtFiles = fileNames.filter(".txt", Qt::CaseInsensitive);
if (logFiles.size()) {