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/inc/qt5 | |
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/inc/qt5')
-rw-r--r-- | vcl/inc/qt5/QtInstance.hxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/inc/qt5/QtInstance.hxx b/vcl/inc/qt5/QtInstance.hxx index f82def9c830c..4eb88e26d3f2 100644 --- a/vcl/inc/qt5/QtInstance.hxx +++ b/vcl/inc/qt5/QtInstance.hxx @@ -197,6 +197,11 @@ public: void setActivePopup(QtFrame*); }; -inline QtInstance* GetQtInstance() { return static_cast<QtInstance*>(GetSalInstance()); } +inline QtInstance& GetQtInstance() +{ + QtInstance* pInstance = static_cast<QtInstance*>(GetSalInstance()); + assert(pInstance); + return *pInstance; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |