[odb-users] Compilation error when calling
QLazyWeakPointer<T>::load()
Gilles Bene
gilles.benepougoue at gmail.com
Mon Feb 20 18:53:51 EST 2017
Hi .
Problem, when calling the load() methode of a QLazyWeakPointer please need
help.
I have a class with a member as a QLazyWeakPointer
example:
class SomeClass {
//...
QLazyWeakPointer<Bill> bill_;
//....
}
qreal Bill::getAmount() const{
return bill_.load()->Amount();
}
When I compile I get this error message.
/usr/include/odb/qt/smart-ptr/lazy-ptr.ixx: In instantiation of
'QSharedPointer<T> QLazyWeakPointer<T>::load() const [with T = Sortie]':
Facture.cpp:28:18: required from here
/usr/include/odb/qt/smart-ptr/lazy-ptr.ixx:473:7: error: no match for
'operator=' (operand types are 'QSharedPointer<Sortie>' and
'odb::object_traits<Sortie>::pointer_type {aka Sortie*}')
r = i_.template load<T> (false); // Keep id.
^
I get the same error anytime I call the load() methode of a
QLazyWeakPointer (
)
Please help.
More information about the odb-users
mailing list