summaryrefslogtreecommitdiffstats
path: root/smtk-import
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2017-12-04 08:49:28 +0100
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-12-04 18:35:44 +0100
commit0a2e53caf27b30186f8492fcfb6efa61ca7808b1 (patch)
treed9b8db120031bc6c8ecc139ad143a1096642341b /smtk-import
parented92b60bfe249e2ec030c8e103e545dec854aba9 (diff)
downloadsubsurface-0a2e53caf27b30186f8492fcfb6efa61ca7808b1.tar.gz
Use QDir::exists() instead of QDir::setCurrent() to check for existence
Don't change into a directory just to see if it exists. Remove unnecessary braces of one of the changed if statements. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'smtk-import')
-rw-r--r--smtk-import/smrtk2ssrfc_window.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}