qt5/kde5: Reuse QFileDialog from Qt5Filepicker in kde5
commit0e4963186a6f1bfbde5279c25c62694d073e92a1
authorMichael Weghorn <m.weghorn@posteo.de>
Tue, 5 Feb 2019 12:43:20 +0000 (5 13:43 +0100)
committerKatarina Behrens <Katarina.Behrens@cib.de>
Wed, 20 Feb 2019 15:42:12 +0000 (20 16:42 +0100)
treeeb407e0dc25e8b27fd4f6378b821db029657e634
parent77c0c38ec3b4e6056d74649c9b071add1f49f96c
qt5/kde5: Reuse QFileDialog from Qt5Filepicker in kde5

Drop the '_dialog' member from KDE5FileDialog and use
the one from Qt5FileDialog instead.
Move up 'm_bIsFolderPicker' to Qt5FilePicker.

Also, move some of the related functionality from
the kde5 file picker to the qt5 one, in particular
take over missing parts from 'KDE5FilePicker::setMultiSelectionMode'
to 'Qt5FilePicker::setMultiSelectionMode' and drop the
former (now inherited from the base class).

This e.g. also makes sure that only folders are available
for selection when using a FolderPicker in qt5
(e.g. in the dialog to add a JRE in "Tools" -> "Options"
 -> "Advanced"). The functionality had only been implemented
for kde5 beforehand.

Since the QFileDialog is set to non-native mode in
Qt5FilePicker constructor, native mode needs to be
excplicitly enabled again for kde5.

Since Qt's signal/slot mechanism is used to connect
signals on the object in both constructors
(Qt5FilePicker/KDE5FilePicker), some events will
trigger multiple actions. This will be taken care
of in subsequent commits, along with further
refactoring.

Change-Id: I245d46c12945acb91c9b52dcff5c83248ac087dd
Reviewed-on: https://gerrit.libreoffice.org/68042
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
vcl/inc/qt5/Qt5FilePicker.hxx
vcl/qt5/Qt5FilePicker.cxx
vcl/unx/kde5/KDE5FilePicker.hxx
vcl/unx/kde5/KDE5FilePicker2.cxx