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-07 08:56:23 -0800
commit936fc2dae76fd3a2f8e661e23da1b0c52fcaf36c (patch)
tree56e1fe41d44f74b968d80234a28b18ebcef7f08b
parentbd994c1722595f97a931dfbec8704e778048bd15 (diff)
downloadsubsurface-936fc2dae76fd3a2f8e661e23da1b0c52fcaf36c.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()) {