summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>2019-12-03 06:54:14 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2019-12-06 16:20:40 +0100
commite536f28e9d7f640028461c5d02d3e50ef1102773 (patch)
treef08ddeb4d8143b85a334564002dec1cecbea3446 /vcl/unx
parent1644fb345e41851fe9fa9d34544e7a1556e1afd6 (diff)
KF5 drop KF5FilePicker::execute
To prevent calls to Qt5FilePicker::updateAutomaticFileExtension, it is simply made virtual with an empty override. This is needed, because the KF5 file picker has its own automatic extension handling. The main motivation is the fix for tdf#129071, which will result in some major changes to XExecutableDialog::execute, so this will prevent larger code duplication later. Change-Id: I5f747f0828cb8a65b4e7043f3ee68ebd31973e6a Reviewed-on: https://gerrit.libreoffice.org/84297 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins (cherry picked from commit c0cdb01ef33042be76251c4a353e0582a0838e0e) Reviewed-on: https://gerrit.libreoffice.org/84605 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/kf5/KF5FilePicker.cxx22
-rw-r--r--vcl/unx/kf5/KF5FilePicker.hxx7
2 files changed, 4 insertions, 25 deletions
diff --git a/vcl/unx/kf5/KF5FilePicker.cxx b/vcl/unx/kf5/KF5FilePicker.cxx
index a7ecd938ccca..0d95cd0be304 100644
--- a/vcl/unx/kf5/KF5FilePicker.cxx
+++ b/vcl/unx/kf5/KF5FilePicker.cxx
@@ -70,28 +70,6 @@ KF5FilePicker::KF5FilePicker(css::uno::Reference<css::uno::XComponentContext> co
qApp->installEventFilter(this);
}
-sal_Int16 SAL_CALL KF5FilePicker::execute()
-{
- SolarMutexGuard g;
- auto* pSalInst(static_cast<Qt5Instance*>(GetSalData()->m_pInstance));
- assert(pSalInst);
- if (!pSalInst->IsMainThread())
- {
- sal_Int16 ret;
- pSalInst->RunInMainThread([&ret, this] { ret = execute(); });
- return ret;
- }
-
- if (!m_aNamedFilterList.isEmpty())
- m_pFileDialog->setNameFilters(m_aNamedFilterList);
- if (!m_aCurrentFilter.isEmpty())
- m_pFileDialog->selectNameFilter(m_aCurrentFilter);
-
- m_pFileDialog->show();
- //block and wait for user input
- return m_pFileDialog->exec() == QFileDialog::Accepted ? 1 : 0;
-}
-
// XFilePickerControlAccess
void SAL_CALL KF5FilePicker::setValue(sal_Int16 controlId, sal_Int16 nControlAction,
const uno::Any& value)
diff --git a/vcl/unx/kf5/KF5FilePicker.hxx b/vcl/unx/kf5/KF5FilePicker.hxx
index ee731a36a425..0886579cf459 100644
--- a/vcl/unx/kf5/KF5FilePicker.hxx
+++ b/vcl/unx/kf5/KF5FilePicker.hxx
@@ -35,9 +35,6 @@ public:
explicit KF5FilePicker(css::uno::Reference<css::uno::XComponentContext> const& context,
QFileDialog::FileMode);
- // XExecutableDialog functions
- virtual sal_Int16 SAL_CALL execute() override;
-
// XFilePickerControlAccess functions
virtual void SAL_CALL setValue(sal_Int16 nControlId, sal_Int16 nControlAction,
const css::uno::Any& rValue) override;
@@ -56,6 +53,10 @@ private:
//add a custom control widget to the file dialog
void addCustomControl(sal_Int16 controlId) override;
bool eventFilter(QObject* watched, QEvent* event) override;
+
+private Q_SLOTS:
+ // the KF5 file picker has its own automatic extension handling
+ void updateAutomaticFileExtension() override {}
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */