diff options
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 087ccc228..3d984ab15 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -544,6 +544,18 @@ void MainWindow::on_actionNew_triggered() on_actionClose_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(); + return lastDir; +} + void MainWindow::on_actionOpen_triggered() { if (!okToClose(tr("Please save or cancel the current dive edit before opening a new file."))) @@ -784,18 +796,6 @@ void MainWindow::on_actionClose_triggered() } } -QString MainWindow::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(); - return lastDir; -} - void MainWindow::updateLastUsedDir(const QString &dir) { QSettings s; |