diff options
author | jan Iversen <jani@apache.org> | 2018-08-18 20:07:35 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-25 11:49:47 -0700 |
commit | 3436734bb9e12a4effa5cfe973a0e6d432cc78c9 (patch) | |
tree | b1cbb94a8c267c5a4ab7db2f345dd28f9e41dcc1 | |
parent | 31eb48c3c2e718b17c0986bea184b5325c5f579a (diff) | |
download | subsurface-3436734bb9e12a4effa5cfe973a0e6d432cc78c9.tar.gz |
smtk_import: remove QSettings
Update smtk_import to use qPrefDisplay (amended variable)
Signed-off-by: Jan Iversen <jani@apache.org>
-rw-r--r-- | smtk-import/smrtk2ssrfc_window.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/smtk-import/smrtk2ssrfc_window.cpp b/smtk-import/smrtk2ssrfc_window.cpp index e44abe10c..16f2fbf6a 100644 --- a/smtk-import/smrtk2ssrfc_window.cpp +++ b/smtk-import/smrtk2ssrfc_window.cpp @@ -4,9 +4,9 @@ #include "qt-models/filtermodels.h" #include "core/dive.h" #include "core/divelist.h" +#include "core/settings/qPrefDisplay.h" #include <QFileDialog> #include <QFileInfo> -#include <QSettings> #include <QDebug> QStringList inputFiles; @@ -37,21 +37,16 @@ Smrtk2ssrfcWindow::~Smrtk2ssrfcWindow() static QString lastUsedDir() { - QSettings settings; QString lastDir = QDir::homePath(); - settings.beginGroup("FileDialog"); - if (settings.contains("LastDir")) - if (QDir(settings.value("LastDir").toString()).exists()) - lastDir = settings.value("LastDir").toString(); + if (QDir(qPrefDisplay::lastDir()).exists()) + lastDir = qPrefDisplay::lastDir(); return lastDir; } void Smrtk2ssrfcWindow::updateLastUsedDir(const QString &dir) { - QSettings s; - s.beginGroup("FileDialog"); - s.setValue("LastDir", dir); + qPrefDisplay::set_lastDir(dir); } void Smrtk2ssrfcWindow::on_inputFilesButton_clicked() |