[Libreoffice-commits] core.git: Branch 'feature/qt5+kde5' - 2 commits - vcl/unx
Katarina Behrens
Katarina.Behrens at cib.de
Fri Jun 15 12:36:25 UTC 2018
vcl/unx/kde5/KDE5FilePicker.cxx | 6 ------
vcl/unx/kde5/KDE5FilePicker.hxx | 2 --
vcl/unx/kde5/KDE5FilePicker2.cxx | 9 ++++++++-
3 files changed, 8 insertions(+), 9 deletions(-)
New commits:
commit 9054848924082a4c979f0bbefcbf4070108e4e61
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Fri Jun 15 14:35:20 2018 +0200
Fold enableFolderMode into ctor
Change-Id: I8674395271b83d9c50477bdf0242cd9f46af7a30
diff --git a/vcl/unx/kde5/KDE5FilePicker.cxx b/vcl/unx/kde5/KDE5FilePicker.cxx
index 7a30359ef580..5d9acdcd7a50 100644
--- a/vcl/unx/kde5/KDE5FilePicker.cxx
+++ b/vcl/unx/kde5/KDE5FilePicker.cxx
@@ -34,12 +34,6 @@
// KDE5FilePicker
-void KDE5FilePicker::enableFolderMode()
-{
- _dialog->setOption(QFileDialog::ShowDirsOnly, true);
- _dialog->setFileMode(QFileDialog::Directory);
-}
-
KDE5FilePicker::~KDE5FilePicker()
{
delete _extraControls;
diff --git a/vcl/unx/kde5/KDE5FilePicker.hxx b/vcl/unx/kde5/KDE5FilePicker.hxx
index 4fae59304fed..4b45052827c4 100644
--- a/vcl/unx/kde5/KDE5FilePicker.hxx
+++ b/vcl/unx/kde5/KDE5FilePicker.hxx
@@ -86,8 +86,6 @@ public:
explicit KDE5FilePicker(QFileDialog::FileMode);
virtual ~KDE5FilePicker() override;
- void enableFolderMode();
-
// XFilePickerNotifier
virtual void SAL_CALL addFilePickerListener(
const css::uno::Reference<css::ui::dialogs::XFilePickerListener>& xListener) override;
diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx
index bc37f3c02127..cebd2ee4f4f9 100644
--- a/vcl/unx/kde5/KDE5FilePicker2.cxx
+++ b/vcl/unx/kde5/KDE5FilePicker2.cxx
@@ -94,8 +94,15 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode)
QStringLiteral("webdavs"),
QStringLiteral("smb"),
});
+
_dialog->setFileMode(eMode);
+ if (eMode == QFileDialog::Directory)
+ {
+ _dialog->setOption(QFileDialog::ShowDirsOnly, true);
+ _dialog->setWindowTitle(toQString(VclResId(STR_FPICKER_FOLDER_DEFAULT_TITLE)));
+ }
+
setMultiSelectionMode(false);
connect(_dialog, &QFileDialog::filterSelected, this, &KDE5FilePicker::filterChanged);
commit 5af46248bd82d25e9d8eb1364d4d945dbc897c78
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Fri Jun 15 13:14:34 2018 +0200
Fix suggesting file name (for new documents)
Change-Id: I39eb672f7dd097e12ddb323ce702c6c28235b5d9
diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx
index 72519f656bec..bc37f3c02127 100644
--- a/vcl/unx/kde5/KDE5FilePicker2.cxx
+++ b/vcl/unx/kde5/KDE5FilePicker2.cxx
@@ -190,7 +190,7 @@ void SAL_CALL KDE5FilePicker::setDefaultName(const OUString& name)
return Q_EMIT setDefaultNameSignal(name);
}
- _dialog->selectUrl(QUrl(toQString(name)));
+ _dialog->selectFile(toQString(name));
}
void SAL_CALL KDE5FilePicker::setDisplayDirectory(const OUString& dir)
More information about the Libreoffice-commits
mailing list