summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-24 14:40:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-05-24 16:09:56 +0200
commitb358bb95c04772a6ff00d7fcbb6fbef9d3dca13c (patch)
treee2af8d9d1b9b9aa21bd7a9a29f448b929f98a259 /include
parent3dfcc485b19f918f434f34ee0157f5dca96bad43 (diff)
cannot create a shared_ptr from an existing object
so pass in the shared_ptr we already have (and enforce that we pass in the right one) Change-Id: Ic481b5ec17c34ed9cba50586dedb6184505dee24 Reviewed-on: https://gerrit.libreoffice.org/72908 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/weld.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 71214ada80cf..af7271037a3b 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -403,7 +403,10 @@ private:
public:
virtual int run() = 0;
// Run async without a controller
- virtual bool runAsync(const std::function<void(sal_Int32)>& func) = 0;
+ // @param self - must point to this, to enforce that the dialog was created/held by a shared_ptr
+ virtual bool runAsync(std::shared_ptr<Dialog> const& rxSelf,
+ const std::function<void(sal_Int32)>& func)
+ = 0;
virtual void response(int response) = 0;
virtual void add_button(const OUString& rText, int response, const OString& rHelpId = OString())
= 0;