diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2019-01-30 10:11:35 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-01-30 20:33:22 +0100 |
commit | 9455565fba299645372ddf432d25b679af51281f (patch) | |
tree | 094e97010cc41b0e0dfd7783a6d9b0c001c24b7b /odk | |
parent | tdf#122752 kde5: Use plain qt5 fpicker for non-Plasma desktops (diff) | |
download | core-9455565fba299645372ddf432d25b679af51281f.tar.gz core-9455565fba299645372ddf432d25b679af51281f.zip |
tdf#122752 gtk3_kde5: Use non-native fpicker for non-Plasma desktops
Adding the custom widgets to the native dialog currently depends
on the native dialog using a KFileWidget, which is just the case for
the native QFileDialog implementation on Plasma/KDE5.
In order not to lose custom controls for non-Plasma desktops,
fall back to using the non-native QFileDialog there and adding
the custom controls to its layout.
This was mostly taken over from Qt5FileDialog.
(This is a similar approach as that taken for the kde5 VCL plugin
in https://gerrit.libreoffice.org/#/c/67106/ ).
Adding the controls to the layout returned by 'QFileDialog::layout()'
cannot be used for the native dialog as well, since a nullptr is
returned in this case.
From QFileDialog doc:
> By default, a platform-native file dialog will be used if the platform
> has one. In that case, the widgets which would otherwise be used to
> construct the dialog will not be instantiated, so related accessors such
> as layout() and itemDelegate() will return null. You can set the
> DontUseNativeDialog option to ensure that the widget-based
> implementation will be used instead of the native dialog.
Change-Id: I75fbe7731da28d0dc7df878f4c57e141d4d89902
Reviewed-on: https://gerrit.libreoffice.org/67111
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit bf93bae6990b01ee726b59b0969b93585719671a)
Reviewed-on: https://gerrit.libreoffice.org/67132
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'odk')
0 files changed, 0 insertions, 0 deletions