vcl/inc/qt5/Qt5Instance.hxx | 2 +- vcl/qt5/Qt5Instance.cxx | 4 ++-- vcl/unx/kf5/KF5SalInstance.cxx | 4 ++-- vcl/unx/kf5/KF5SalInstance.hxx | 5 +++-- 4 files changed, 8 insertions(+), 7 deletions(-)
New commits: commit 9b56b718f6921b1160733e56f5cfc0d12c4146ab Author: Noel <noel.gran...@collabora.co.uk> AuthorDate: Mon Mar 1 20:36:56 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Mar 3 11:09:15 2021 +0100 loplugin:refcounting in vcl Change-Id: I92e9db7abdfe5912335fd94e42422e8556d71091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111769 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx index cd9c51826a90..8cfa9ac960f1 100644 --- a/vcl/inc/qt5/Qt5Instance.hxx +++ b/vcl/inc/qt5/Qt5Instance.hxx @@ -80,7 +80,7 @@ Q_SIGNALS: void deleteObjectLaterSignal(QObject* pObject); protected: - virtual Qt5FilePicker* + virtual rtl::Reference<Qt5FilePicker> createPicker(css::uno::Reference<css::uno::XComponentContext> const& context, QFileDialog::FileMode); diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx index 97eff04fe77a..5afbd8722418 100644 --- a/vcl/qt5/Qt5Instance.cxx +++ b/vcl/qt5/Qt5Instance.cxx @@ -437,14 +437,14 @@ void Qt5Instance::ProcessEvent(SalUserEvent aEvent) aEvent.m_pFrame->CallCallback(aEvent.m_nEvent, aEvent.m_pData); } -Qt5FilePicker* +rtl::Reference<Qt5FilePicker> Qt5Instance::createPicker(css::uno::Reference<css::uno::XComponentContext> const& context, QFileDialog::FileMode eMode) { if (!IsMainThread()) { SolarMutexGuard g; - Qt5FilePicker* pPicker; + rtl::Reference<Qt5FilePicker> pPicker; RunInMainThread([&, this]() { pPicker = createPicker(context, eMode); }); assert(pPicker); return pPicker; diff --git a/vcl/unx/kf5/KF5SalInstance.cxx b/vcl/unx/kf5/KF5SalInstance.cxx index 5b95ff8df572..4c1a87730e51 100644 --- a/vcl/unx/kf5/KF5SalInstance.cxx +++ b/vcl/unx/kf5/KF5SalInstance.cxx @@ -57,14 +57,14 @@ bool KF5SalInstance::hasNativeFileSelection() const return Qt5Instance::hasNativeFileSelection(); } -Qt5FilePicker* +rtl::Reference<Qt5FilePicker> KF5SalInstance::createPicker(css::uno::Reference<css::uno::XComponentContext> const& context, QFileDialog::FileMode eMode) { if (!IsMainThread()) { SolarMutexGuard g; - Qt5FilePicker* pPicker; + rtl::Reference<Qt5FilePicker> pPicker; RunInMainThread([&, this]() { pPicker = createPicker(context, eMode); }); assert(pPicker); return pPicker; diff --git a/vcl/unx/kf5/KF5SalInstance.hxx b/vcl/unx/kf5/KF5SalInstance.hxx index 5dd306da5231..b462e147003d 100644 --- a/vcl/unx/kf5/KF5SalInstance.hxx +++ b/vcl/unx/kf5/KF5SalInstance.hxx @@ -24,8 +24,9 @@ class KF5SalInstance final : public Qt5Instance { bool hasNativeFileSelection() const override; - Qt5FilePicker* createPicker(css::uno::Reference<css::uno::XComponentContext> const& context, - QFileDialog::FileMode) override; + rtl::Reference<Qt5FilePicker> + createPicker(css::uno::Reference<css::uno::XComponentContext> const& context, + QFileDialog::FileMode) override; SalFrame* CreateFrame(SalFrame* pParent, SalFrameStyleFlags nStyle) override; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits