[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
Michael Weghorn (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 21 19:32:12 UTC 2019
vcl/unx/kde5/KDE5FilePicker.hxx | 12 ------------
vcl/unx/kde5/KDE5FilePicker2.cxx | 34 ----------------------------------
2 files changed, 46 deletions(-)
New commits:
commit 74a013404dd7c2ccd805c1440cc611fef1afe46a
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Tue Feb 5 15:09:44 2019 +0100
Commit: Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Tue May 21 21:30:58 2019 +0200
KDE5FilePicker: Drop 'm_xListener' and related methods
Drop the 'm_xListener' member and methods using it.
The inherited Qt5FilePicker methods do the same thing.
This also avoids that two methods are called when
a file or filter is selected, since the
'QFileDialog::filterSelected' and 'QFileDialog::fileSelected'
signals had been connected to slots in both, the
qt5 and kde5 fpicker constructors.
Change-Id: I60e3eda29e6497f51165e87d0c4ab2e17f209a1c
Reviewed-on: https://gerrit.libreoffice.org/68043
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
(cherry picked from commit 1e9148f96341424d5403f2e5175937e289010701)
Reviewed-on: https://gerrit.libreoffice.org/72640
diff --git a/vcl/unx/kde5/KDE5FilePicker.hxx b/vcl/unx/kde5/KDE5FilePicker.hxx
index dcc7367cebab..5e894571c219 100644
--- a/vcl/unx/kde5/KDE5FilePicker.hxx
+++ b/vcl/unx/kde5/KDE5FilePicker.hxx
@@ -51,7 +51,6 @@ class KDE5FilePicker : public Qt5FilePicker
{
Q_OBJECT
protected:
- css::uno::Reference<css::ui::dialogs::XFilePickerListener> m_xListener;
osl::Mutex _helperMutex;
//running filter string to add to dialog
@@ -77,12 +76,6 @@ public:
explicit KDE5FilePicker(QFileDialog::FileMode);
virtual ~KDE5FilePicker() override;
- // XFilePickerNotifier
- virtual void SAL_CALL addFilePickerListener(
- const css::uno::Reference<css::ui::dialogs::XFilePickerListener>& xListener) override;
- virtual void SAL_CALL removeFilePickerListener(
- const css::uno::Reference<css::ui::dialogs::XFilePickerListener>& xListener) override;
-
// XExecutableDialog functions
virtual void SAL_CALL setTitle(const OUString& rTitle) override;
virtual sal_Int16 SAL_CALL execute() override;
@@ -152,11 +145,6 @@ private:
css::uno::Any handleGetListValue(QComboBox* pQComboBox, sal_Int16 nAction);
OUString implGetDirectory();
- // emit XFilePickerListener controlStateChanged event
- void filterChanged();
- // emit XFilePickerListener fileSelectionChanged event
- void selectionChanged();
-
protected:
bool eventFilter(QObject* watched, QEvent* event) override;
diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx
index e8e86f0e5dcf..e8eb75346de4 100644
--- a/vcl/unx/kde5/KDE5FilePicker2.cxx
+++ b/vcl/unx/kde5/KDE5FilePicker2.cxx
@@ -99,10 +99,6 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode)
QStringLiteral("smb"),
});
- connect(m_pFileDialog.get(), &QFileDialog::filterSelected, this,
- &KDE5FilePicker::filterChanged);
- connect(m_pFileDialog.get(), &QFileDialog::fileSelected, this,
- &KDE5FilePicker::selectionChanged);
connect(this, &KDE5FilePicker::executeSignal, this, &KDE5FilePicker::execute,
Qt::BlockingQueuedConnection);
@@ -152,19 +148,6 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode)
KDE5FilePicker::~KDE5FilePicker() { delete _extraControls; }
-void SAL_CALL
-KDE5FilePicker::addFilePickerListener(const uno::Reference<XFilePickerListener>& xListener)
-{
- SolarMutexGuard aGuard;
- m_xListener = xListener;
-}
-
-void SAL_CALL KDE5FilePicker::removeFilePickerListener(const uno::Reference<XFilePickerListener>&)
-{
- SolarMutexGuard aGuard;
- m_xListener.clear();
-}
-
// XExecutableDialog
void SAL_CALL KDE5FilePicker::setTitle(const OUString& title)
{
@@ -804,23 +787,6 @@ uno::Sequence<OUString> SAL_CALL KDE5FilePicker::getSupportedServiceNames()
return FilePicker_getSupportedServiceNames();
}
-void KDE5FilePicker::filterChanged()
-{
- FilePickerEvent aEvent;
- aEvent.ElementId = LISTBOX_FILTER;
- OSL_TRACE("filter changed");
- if (m_xListener.is())
- m_xListener->controlStateChanged(aEvent);
-}
-
-void KDE5FilePicker::selectionChanged()
-{
- FilePickerEvent aEvent;
- OSL_TRACE("file selection changed");
- if (m_xListener.is())
- m_xListener->fileSelectionChanged(aEvent);
-}
-
bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
{
if (e->type() == QEvent::Show && o->isWidgetType())
More information about the Libreoffice-commits
mailing list