aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/divelistview.cpp7
-rw-r--r--desktop-widgets/simplewidgets.cpp1
2 files changed, 7 insertions, 1 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
index 9c7c30578..a92afadbd 100644
--- a/desktop-widgets/divelistview.cpp
+++ b/desktop-widgets/divelistview.cpp
@@ -917,7 +917,12 @@ void DiveListView::shiftTimes()
void DiveListView::loadImages()
{
- QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open image files"), lastUsedImageDir(), tr("Image files (*.jpg *.jpeg *.pnm *.tif *.tiff)"));
+ QStringList filters = imageExtensionFilters();
+ QStringList fileNames = QFileDialog::getOpenFileNames(this,
+ tr("Open image files"),
+ lastUsedImageDir(),
+ tr("Image files (%1)").arg(filters.join(" ")));
+
if (fileNames.isEmpty())
return;
updateLastUsedImageDir(QFileInfo(fileNames[0]).dir().path());
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp
index f985a0f01..e6bbe87d9 100644
--- a/desktop-widgets/simplewidgets.cpp
+++ b/desktop-widgets/simplewidgets.cpp
@@ -19,6 +19,7 @@
#include "core/display.h"
#include "profile-widget/profilewidget2.h"
#include "desktop-widgets/undocommands.h"
+#include "core/qthelper.h"
class MinMaxAvgWidgetPrivate {
public: