summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2014-02-19 00:26:36 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-18 15:30:59 -0800
commit226b55893d78a3057c97e9d78fef450688631520 (patch)
tree2bd9474aed657631a4b583acc416a070e9b8957e
parenta814a5c9046db7a3ecc352e5c257051dca41d839 (diff)
downloadsubsurface-226b55893d78a3057c97e9d78fef450688631520.tar.gz
Make lastUsedImageDir static to prevent a crash
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/divelistview.h2
-rw-r--r--qt-ui/simplewidgets.cpp3
2 files changed, 2 insertions, 3 deletions
diff --git a/qt-ui/divelistview.h b/qt-ui/divelistview.h
index c77b85f24..f078a33f8 100644
--- a/qt-ui/divelistview.h
+++ b/qt-ui/divelistview.h
@@ -52,7 +52,7 @@ public slots:
void shiftTimes();
void loadImages();
void uploadToDivelogsDE();
- QString lastUsedImageDir();
+ static QString lastUsedImageDir();
signals:
void currentDiveChanged(int divenr);
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index 4ee3998b9..e73b23560 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -180,9 +180,8 @@ void ShiftImageTimesDialog::syncCameraClicked()
QDateTime dcDateTime = QDateTime();
QStringList fileNames = QFileDialog::getOpenFileNames(this,
tr("Open Image File"),
- MainWindow().dive_list()->lastUsedImageDir(),
+ DiveListView::lastUsedImageDir(),
tr("Image Files (*.jpg *.jpeg *.pnm *.tif *.tiff)"));
-
if (fileNames.isEmpty())
return;