summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/divelistview.cpp2
-rw-r--r--desktop-widgets/divelogexportdialog.cpp3
-rw-r--r--desktop-widgets/mainwindow.cpp2
-rw-r--r--smtk-import/smrtk2ssrfc_window.cpp2
4 files changed, 4 insertions, 5 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;
}
diff --git a/smtk-import/smrtk2ssrfc_window.cpp b/smtk-import/smrtk2ssrfc_window.cpp
index 6b40b8a7d..15f736a7d 100644
--- a/smtk-import/smrtk2ssrfc_window.cpp
+++ b/smtk-import/smrtk2ssrfc_window.cpp
@@ -34,7 +34,7 @@ QString Smrtk2ssrfcWindow::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;
}