From 9608495c8c9a4ee3900cf98830dc7b497c1edd10 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 21 May 2013 19:22:51 -0400 Subject: Add ability to get underlying eager pointer in weak pointers --- odb/qt/smart-ptr/lazy-ptr.ixx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'odb/qt/smart-ptr/lazy-ptr.ixx') diff --git a/odb/qt/smart-ptr/lazy-ptr.ixx b/odb/qt/smart-ptr/lazy-ptr.ixx index 091d729..a78e52c 100644 --- a/odb/qt/smart-ptr/lazy-ptr.ixx +++ b/odb/qt/smart-ptr/lazy-ptr.ixx @@ -221,6 +221,13 @@ unload () const } template +inline QSharedPointer QLazySharedPointer:: +getEager () const +{ + return p_; +} + +template template inline QLazySharedPointer:: QLazySharedPointer (DB& db, const ID& id): i_ (db, id) {} @@ -480,6 +487,13 @@ unload () const } template +inline QWeakPointer QLazyWeakPointer:: +getEager () const +{ + return p_; +} + +template template inline QLazyWeakPointer:: QLazyWeakPointer (DB& db, const ID& id): i_ (db, id) {} -- cgit v1.1