[Libreoffice-commits] core.git: vcl/unx
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Feb 6 05:59:43 UTC 2020
vcl/unx/kf5/KF5FilePicker.cxx | 2 +-
vcl/unx/kf5/KF5FilePicker.hxx | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
New commits:
commit be89cb65e262d8f04baf26ac663ee419fdbc3048
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Feb 5 15:02:10 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Feb 6 06:59:10 2020 +0100
fix leak in KF5FilePicker
Change-Id: Ic9bc2b9357da288ad4c0ba7e0d84b1316700c3f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88020
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/unx/kf5/KF5FilePicker.cxx b/vcl/unx/kf5/KF5FilePicker.cxx
index 0d95cd0be304..20e64007bd96 100644
--- a/vcl/unx/kf5/KF5FilePicker.cxx
+++ b/vcl/unx/kf5/KF5FilePicker.cxx
@@ -57,7 +57,7 @@ KF5FilePicker::KF5FilePicker(css::uno::Reference<css::uno::XComponentContext> co
_layout->setColumnStretch(2, 1);
// set layout so custom widgets show up in our native file dialog
- setCustomControlWidgetLayout(_layout);
+ setCustomControlWidgetLayout(_layout.get());
m_pFileDialog->setSupportedSchemes({
QStringLiteral("file"), QStringLiteral("ftp"), QStringLiteral("http"),
diff --git a/vcl/unx/kf5/KF5FilePicker.hxx b/vcl/unx/kf5/KF5FilePicker.hxx
index 0886579cf459..4cf84c7fecbd 100644
--- a/vcl/unx/kf5/KF5FilePicker.hxx
+++ b/vcl/unx/kf5/KF5FilePicker.hxx
@@ -20,6 +20,7 @@
#pragma once
#include <Qt5FilePicker.hxx>
+#include <memory>
class QGridLayout;
@@ -29,7 +30,7 @@ class KF5FilePicker final : public Qt5FilePicker
private:
//layout for extra custom controls
- QGridLayout* _layout;
+ std::unique_ptr<QGridLayout> _layout;
public:
explicit KF5FilePicker(css::uno::Reference<css::uno::XComponentContext> const& context,
More information about the Libreoffice-commits
mailing list