aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 62cbe7b28..ea5f31556 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -549,13 +549,10 @@ void MainWindow::on_actionNew_triggered()
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;
}
@@ -773,9 +770,7 @@ void MainWindow::on_actionClose_triggered()
void MainWindow::updateLastUsedDir(const QString &dir)
{
- QSettings s;
- s.beginGroup("FileDialog");
- s.setValue("LastDir", dir);
+ qPrefDisplay::set_lastDir(dir);
}
void MainWindow::on_actionPrint_triggered()