diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-08-14 11:27:36 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-08-14 11:27:36 +0200 |
commit | 5398b886ed0da065fe084da0f107bebba0a163ba (patch) | |
tree | 85deb4b66b4c114e55b6654e8ba8ee1d2bbf1262 /odb/qt/smart-ptr/lazy-ptr.txx | |
parent | da7829e9e5297c47d6e9c5efee599e6e207cd43b (diff) |
Reimplement lazy_weak_ptr lock() to preserve database type
Now we initialize the returned lazy_shared_ptr with the same loader
function as the one set for weak_ptr.
Diffstat (limited to 'odb/qt/smart-ptr/lazy-ptr.txx')
-rw-r--r-- | odb/qt/smart-ptr/lazy-ptr.txx | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/odb/qt/smart-ptr/lazy-ptr.txx b/odb/qt/smart-ptr/lazy-ptr.txx index 9e8be80..2497811 100644 --- a/odb/qt/smart-ptr/lazy-ptr.txx +++ b/odb/qt/smart-ptr/lazy-ptr.txx @@ -73,26 +73,3 @@ equal (const QLazySharedPointer<X>& r) const return r.equal (sp); } - -template <class T> -QLazySharedPointer<T> QLazyWeakPointer<T>:: -toStrongRef () const -{ - QSharedPointer<T> sp (p_.toStrongRef ()); - - if (sp) - { - if (database_type* db = i_.database ()) - return QLazySharedPointer<T> (*db, sp); - else - return QLazySharedPointer<T> (sp); - } - else - { - if (i_) - return QLazySharedPointer<T> ( - *i_.database (), i_.template object_id<T> ()); - else - return QLazySharedPointer<T> (); - } -} |