mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
smtk_import: remove QSettings
Update smtk_import to use qPrefDisplay (amended variable) Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
31eb48c3c2
commit
3436734bb9
1 changed files with 4 additions and 9 deletions
|
@ -4,9 +4,9 @@
|
||||||
#include "qt-models/filtermodels.h"
|
#include "qt-models/filtermodels.h"
|
||||||
#include "core/dive.h"
|
#include "core/dive.h"
|
||||||
#include "core/divelist.h"
|
#include "core/divelist.h"
|
||||||
|
#include "core/settings/qPrefDisplay.h"
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QSettings>
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
QStringList inputFiles;
|
QStringList inputFiles;
|
||||||
|
@ -37,21 +37,16 @@ Smrtk2ssrfcWindow::~Smrtk2ssrfcWindow()
|
||||||
|
|
||||||
static QString lastUsedDir()
|
static QString lastUsedDir()
|
||||||
{
|
{
|
||||||
QSettings settings;
|
|
||||||
QString lastDir = QDir::homePath();
|
QString lastDir = QDir::homePath();
|
||||||
|
|
||||||
settings.beginGroup("FileDialog");
|
if (QDir(qPrefDisplay::lastDir()).exists())
|
||||||
if (settings.contains("LastDir"))
|
lastDir = qPrefDisplay::lastDir();
|
||||||
if (QDir(settings.value("LastDir").toString()).exists())
|
|
||||||
lastDir = settings.value("LastDir").toString();
|
|
||||||
return lastDir;
|
return lastDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Smrtk2ssrfcWindow::updateLastUsedDir(const QString &dir)
|
void Smrtk2ssrfcWindow::updateLastUsedDir(const QString &dir)
|
||||||
{
|
{
|
||||||
QSettings s;
|
qPrefDisplay::set_lastDir(dir);
|
||||||
s.beginGroup("FileDialog");
|
|
||||||
s.setValue("LastDir", dir);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Smrtk2ssrfcWindow::on_inputFilesButton_clicked()
|
void Smrtk2ssrfcWindow::on_inputFilesButton_clicked()
|
||||||
|
|
Loading…
Reference in a new issue