diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-09-27 09:08:43 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-09-28 09:32:44 +0200 |
commit | 25e5f050756bb25d67b6a90433c0a50a149d5dc0 (patch) | |
tree | cf3deae96087387ffdb4e163c6d793965e10d524 /vcl/qt5/QtTransferable.cxx | |
parent | a499874d9c0685d79b629b4bb246394b6b15691a (diff) |
qt: Let GetQtInstance return ref instead of pointer
The return value was dereferenced in all callers
anyway.
Change-Id: Ib91eddd23222d086f9a4edac980a05cd96c75ad7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174026
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/qt5/QtTransferable.cxx')
-rw-r--r-- | vcl/qt5/QtTransferable.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/vcl/qt5/QtTransferable.cxx b/vcl/qt5/QtTransferable.cxx index ce989da2aa5a..095ba9ec6836 100644 --- a/vcl/qt5/QtTransferable.cxx +++ b/vcl/qt5/QtTransferable.cxx @@ -190,9 +190,8 @@ css::uno::Any SAL_CALL QtClipboardTransferable::getTransferData(const css::datatransfer::DataFlavor& rFlavor) { css::uno::Any aAny; - auto* pSalInst(GetQtInstance()); SolarMutexGuard g; - pSalInst->RunInMainThread([&, this]() { + GetQtInstance().RunInMainThread([&, this]() { ensureConsistencyWithSystemClipboard(); aAny = QtTransferable::getTransferData(rFlavor); }); @@ -203,9 +202,8 @@ css::uno::Sequence<css::datatransfer::DataFlavor> SAL_CALL QtClipboardTransferable::getTransferDataFlavors() { css::uno::Sequence<css::datatransfer::DataFlavor> aSeq; - auto* pSalInst(GetQtInstance()); SolarMutexGuard g; - pSalInst->RunInMainThread([&, this]() { + GetQtInstance().RunInMainThread([&, this]() { ensureConsistencyWithSystemClipboard(); aSeq = QtTransferable::getTransferDataFlavors(); }); @@ -216,9 +214,8 @@ sal_Bool SAL_CALL QtClipboardTransferable::isDataFlavorSupported(const css::datatransfer::DataFlavor& rFlavor) { bool bIsSupported = false; - auto* pSalInst(GetQtInstance()); SolarMutexGuard g; - pSalInst->RunInMainThread([&, this]() { + GetQtInstance().RunInMainThread([&, this]() { ensureConsistencyWithSystemClipboard(); bIsSupported = QtTransferable::isDataFlavorSupported(rFlavor); }); |