diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2019-02-05 12:38:18 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2019-02-20 16:41:46 +0100 |
commit | 77c0c38ec3b4e6056d74649c9b071add1f49f96c (patch) | |
tree | 729fa4992e8d97417c20cf7509b9d5ee62ae1e6d | |
parent | fbd86a73dc3c1909dc088ae147a8bef519983d68 (diff) |
Make KDE5FilePicker a subclass of Qt5FilePicker
While this does not make much sense by itself as of now,
it will allow to reduce code duplication in follow-up commits.
Change-Id: Ie1a9bf3e516044ad5e56c526d1cf49cf1cb76f8a
Reviewed-on: https://gerrit.libreoffice.org/68041
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
-rw-r--r-- | vcl/inc/qt5/Qt5FilePicker.hxx | 4 | ||||
-rw-r--r-- | vcl/unx/kde5/KDE5FilePicker.hxx | 12 | ||||
-rw-r--r-- | vcl/unx/kde5/KDE5FilePicker2.cxx | 2 |
3 files changed, 7 insertions, 11 deletions
diff --git a/vcl/inc/qt5/Qt5FilePicker.hxx b/vcl/inc/qt5/Qt5FilePicker.hxx index dbe8020d30ca..e40d4c491263 100644 --- a/vcl/inc/qt5/Qt5FilePicker.hxx +++ b/vcl/inc/qt5/Qt5FilePicker.hxx @@ -19,6 +19,8 @@ #pragma once +#include <vclpluginapi.h> + #include <cppuhelper/compbase.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -50,7 +52,7 @@ typedef ::cppu::WeakComponentImplHelper< css::ui::dialogs::XFolderPicker2, css::lang::XInitialization, css::lang::XServiceInfo> Qt5FilePicker_Base; -class Qt5FilePicker : public QObject, public Qt5FilePicker_Base +class VCLPLUG_QT5_PUBLIC Qt5FilePicker : public QObject, public Qt5FilePicker_Base { Q_OBJECT diff --git a/vcl/unx/kde5/KDE5FilePicker.hxx b/vcl/unx/kde5/KDE5FilePicker.hxx index 13e487366d52..6870a4d34da5 100644 --- a/vcl/unx/kde5/KDE5FilePicker.hxx +++ b/vcl/unx/kde5/KDE5FilePicker.hxx @@ -19,6 +19,8 @@ #pragma once +#include <Qt5FilePicker.hxx> + #include <cppuhelper/compbase.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -45,15 +47,7 @@ class QGridLayout; class QWidget; class QComboBox; -typedef ::cppu::WeakComponentImplHelper<css::ui::dialogs::XFilePicker3, - css::ui::dialogs::XFilePickerControlAccess, - css::ui::dialogs::XFolderPicker2 - // TODO css::ui::dialogs::XFilePreview - , - css::lang::XInitialization, css::lang::XServiceInfo> - KDE5FilePicker_Base; - -class KDE5FilePicker : public QObject, public KDE5FilePicker_Base +class KDE5FilePicker : public Qt5FilePicker { Q_OBJECT protected: diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index 64a9aa374c1b..748b0bbf3d27 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -82,7 +82,7 @@ uno::Sequence<OUString> FilePicker_getSupportedServiceNames() // KDE5FilePicker KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode) - : KDE5FilePicker_Base(_helperMutex) + : Qt5FilePicker(eMode) , _dialog(new QFileDialog(nullptr, {}, QDir::homePath())) , _extraControls(new QWidget) , _layout(new QGridLayout(_extraControls)) |