vcl/inc/qt5/Qt5Instance.hxx | 6 +++--- vcl/inc/salinst.hxx | 3 +-- vcl/unx/kde5/KDE5SalInstance.cxx | 7 +++++++ vcl/unx/kde5/KDE5SalInstance.hxx | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-)
New commits: commit 042496b3718f5f742b20ce7feeeab8bf9c941002 Author: Jan-Marek Glogowski <glo...@fbihome.de> AuthorDate: Sun Jul 14 11:29:09 2019 +0200 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Mon Jul 15 14:00:34 2019 +0200 Qt5 also has native file selection This includes commit e6a77656736e ("KDE5 renaming KDE5 to PLASMA5 hasn't happend yet"). Change-Id: Ia47ab46f27e07b396aa324dd01af9d152b65de98 Reviewed-on: https://gerrit.libreoffice.org/75573 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> (cherry picked from commit 6d0dd8847aae01767fa53e0c6db5a5e198dd7b49) Reviewed-on: https://gerrit.libreoffice.org/75588 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx index 881ac17803d4..e6a80728b596 100644 --- a/vcl/inc/qt5/Qt5Instance.hxx +++ b/vcl/inc/qt5/Qt5Instance.hxx @@ -142,10 +142,10 @@ public: virtual void TriggerUserEventProcessing() override; virtual void ProcessEvent(SalUserEvent aEvent) override; - virtual css::uno::Reference<css::ui::dialogs::XFilePicker2> + bool hasNativeFileSelection() const override { return true; } + css::uno::Reference<css::ui::dialogs::XFilePicker2> createFilePicker(const css::uno::Reference<css::uno::XComponentContext>&) override; - - virtual css::uno::Reference<css::ui::dialogs::XFolderPicker2> + css::uno::Reference<css::ui::dialogs::XFolderPicker2> createFolderPicker(const css::uno::Reference<css::uno::XComponentContext>&) override; virtual css::uno::Reference<css::uno::XInterface> diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx index 93121c2e01f8..91a1ada923b3 100644 --- a/vcl/inc/salinst.hxx +++ b/vcl/inc/salinst.hxx @@ -191,10 +191,9 @@ public: virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) = 0; virtual bool hasNativeFileSelection() const { return false; } - + // if you override this, make sure to override hasNativeFileSelection too. virtual css::uno::Reference< css::ui::dialogs::XFilePicker2 > createFilePicker( const css::uno::Reference< css::uno::XComponentContext >& ) { return css::uno::Reference< css::ui::dialogs::XFilePicker2 >(); } - virtual css::uno::Reference< css::ui::dialogs::XFolderPicker2 > createFolderPicker( const css::uno::Reference< css::uno::XComponentContext >& ) { return css::uno::Reference< css::ui::dialogs::XFolderPicker2 >(); } diff --git a/vcl/unx/kde5/KDE5SalInstance.cxx b/vcl/unx/kde5/KDE5SalInstance.cxx index 0143212249ed..b1b8eb59375f 100644 --- a/vcl/unx/kde5/KDE5SalInstance.cxx +++ b/vcl/unx/kde5/KDE5SalInstance.cxx @@ -50,6 +50,13 @@ SalFrame* KDE5SalInstance::CreateFrame(SalFrame* pParent, SalFrameStyleFlags nSt return pRet; } +bool KDE5SalInstance::hasNativeFileSelection() const +{ + if (Application::GetDesktopEnvironment() == "KDE5") + return true; + return Qt5Instance::hasNativeFileSelection(); +} + Qt5FilePicker* KDE5SalInstance::createPicker(css::uno::Reference<css::uno::XComponentContext> const& context, QFileDialog::FileMode eMode) diff --git a/vcl/unx/kde5/KDE5SalInstance.hxx b/vcl/unx/kde5/KDE5SalInstance.hxx index a7c633f150e1..4215ec483308 100644 --- a/vcl/unx/kde5/KDE5SalInstance.hxx +++ b/vcl/unx/kde5/KDE5SalInstance.hxx @@ -23,11 +23,11 @@ class KDE5SalInstance final : public Qt5Instance { + bool hasNativeFileSelection() const override; Qt5FilePicker* createPicker(css::uno::Reference<css::uno::XComponentContext> const& context, QFileDialog::FileMode) override; SalFrame* CreateFrame(SalFrame* pParent, SalFrameStyleFlags nStyle) override; - bool hasNativeFileSelection() const override { return true; } public: explicit KDE5SalInstance(std::unique_ptr<QApplication>& pQApp); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits