mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
ed92b60bfe
commit
0a2e53caf2
4 changed files with 4 additions and 5 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue