summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/divelistview.cpp2
-rw-r--r--desktop-widgets/divelogexportdialog.cpp3
-rw-r--r--desktop-widgets/mainwindow.cpp2
3 files changed, 3 insertions, 4 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
index 48b10fbc4..104b65a63 100644
--- a/desktop-widgets/divelistview.cpp
+++ b/desktop-widgets/divelistview.cpp
@@ -1017,7 +1017,7 @@ QString DiveListView::lastUsedImageDir()
settings.beginGroup("FileDialog");
if (settings.contains("LastImageDir"))
- if (QDir::setCurrent(settings.value("LastImageDir").toString()))
+ if (QDir(settings.value("LastImageDir").toString()).exists())
lastImageDir = settings.value("LastImageDir").toString();
return lastImageDir;
}
diff --git a/desktop-widgets/divelogexportdialog.cpp b/desktop-widgets/divelogexportdialog.cpp
index ed908e937..96417c1bc 100644
--- a/desktop-widgets/divelogexportdialog.cpp
+++ b/desktop-widgets/divelogexportdialog.cpp
@@ -127,9 +127,8 @@ void DiveLogExportDialog::on_buttonBox_accepted()
settings.beginGroup("FileDialog");
if (settings.contains("LastDir")) {
- if (QDir::setCurrent(settings.value("LastDir").toString())) {
+ if (QDir(settings.value("LastDir").toString()).exists())
lastDir = settings.value("LastDir").toString();
- }
}
settings.endGroup();
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 680a24fde..a9dd960d0 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -743,7 +743,7 @@ QString MainWindow::lastUsedDir()
settings.beginGroup("FileDialog");
if (settings.contains("LastDir"))
- if (QDir::setCurrent(settings.value("LastDir").toString()))
+ if (QDir(settings.value("LastDir").toString()).exists())
lastDir = settings.value("LastDir").toString();
return lastDir;
}