diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-22 10:44:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-22 14:04:59 +0100 |
commit | 70c15946ac5b2f481fed3c6e79f496196feb1b22 (patch) | |
tree | 6c0babb9a0f5df1518c460dbeb9e7eef3246875e /include/vcl | |
parent | b6c0356ac9d59a4599d15f8d2f001d39010b3e48 (diff) |
StartExecuteAsync doesn't need a second param
we can just use this to store a keep-alive reference in AsyncContext
Change-Id: I0152aef5386aa9753b48afdfc958790f10d13560
Reviewed-on: https://gerrit.libreoffice.org/48294
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/abstdlg.hxx | 4 | ||||
-rw-r--r-- | include/vcl/dialog.hxx | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx index 87336e0d5a5f..542930084e37 100644 --- a/include/vcl/abstdlg.hxx +++ b/include/vcl/abstdlg.hxx @@ -49,10 +49,10 @@ public: bool isSet() { return !!maEndDialogFn; } }; - bool StartExecuteAsync(const std::function<void(sal_Int32)> &rEndDialogFn, VclPtr<VclReferenceBase> xOwner) + bool StartExecuteAsync(const std::function<void(sal_Int32)> &rEndDialogFn) { AsyncContext aCtx; - aCtx.mxOwner = xOwner; + aCtx.mxOwner = this; aCtx.maEndDialogFn = rEndDialogFn; return StartExecuteAsync(aCtx); } diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index eaf9bbe99960..979c62c199dc 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -142,11 +142,10 @@ public: // FIXME: Need to remove old StartExecuteModal in favour of this one. /// Returns true of the dialog successfully starts - bool StartExecuteAsync(const std::function<void(sal_Int32)> &rEndDialogFn, - VclPtr<VclReferenceBase> xOwner = VclPtr<VclReferenceBase>()) + bool StartExecuteAsync(const std::function<void(sal_Int32)> &rEndDialogFn) { VclAbstractDialog::AsyncContext aCtx; - aCtx.mxOwner = xOwner; + aCtx.mxOwner = this; aCtx.maEndDialogFn = rEndDialogFn; return StartExecuteAsync(aCtx); } |