summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-09-17 11:01:59 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2019-01-25 23:50:14 +0100
commit24c0e1a2c10f39b0f9d3dc895ab717d88acad9b0 (patch)
tree08030f45dca84ce0d059dc1b599111b69aca247b
parentd2da9dd4ef3b56a0491022c3469957339c161123 (diff)
Qt5 use LO provided native file pickers
This uses the native file pickers on Windows and MacOSX. Change-Id: Ic836d3ed8de0760c6c94c68d61f6eaa96f773000
-rw-r--r--vcl/Library_vclplug_qt5.mk2
-rw-r--r--vcl/qt5/Qt5Instance.cxx14
2 files changed, 13 insertions, 3 deletions
diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index 5c55118f57fa..4c604edfa450 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -89,7 +89,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_qt5,\
vcl/qt5/Qt5Clipboard \
vcl/qt5/Qt5Data \
vcl/qt5/Qt5DragAndDrop \
- vcl/qt5/Qt5FilePicker \
+ $(if $(USING_X11),vcl/qt5/Qt5FilePicker) \
vcl/qt5/Qt5Font \
vcl/qt5/Qt5FontFace \
vcl/qt5/Qt5Frame \
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index 1c4cad5d3a09..68fb5bf6c684 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -225,17 +225,27 @@ void Qt5Instance::ProcessEvent(SalUserEvent aEvent)
}
css::uno::Reference<css::ui::dialogs::XFilePicker2>
-Qt5Instance::createFilePicker(const css::uno::Reference<css::uno::XComponentContext>&)
+Qt5Instance::createFilePicker(const css::uno::Reference<css::uno::XComponentContext>& cntxt)
{
+#if (defined _WIN32 || defined MACOSX)
+ return SalInstance::createFilePicker(cntxt);
+#else
+ (void)cntxt;
return css::uno::Reference<css::ui::dialogs::XFilePicker2>(
new Qt5FilePicker(QFileDialog::ExistingFile));
+#endif
}
css::uno::Reference<css::ui::dialogs::XFolderPicker2>
-Qt5Instance::createFolderPicker(const css::uno::Reference<css::uno::XComponentContext>&)
+Qt5Instance::createFolderPicker(const css::uno::Reference<css::uno::XComponentContext>& cntxt)
{
+#if (defined _WIN32 || defined MACOSX)
+ return SalInstance::createFolderPicker(cntxt);
+#else
+ (void)cntxt;
return css::uno::Reference<css::ui::dialogs::XFolderPicker2>(
new Qt5FilePicker(QFileDialog::Directory));
+#endif
}
css::uno::Reference<css::uno::XInterface>