[odb-users] Error when adding --profile qt

Boris Kolpackov boris at codesynthesis.com
Fri Aug 7 07:16:20 EDT 2015


Versteden2 <Versteden2 at upcmail.nl> writes:

> For this i added --profile qt to the odb compilation command. Now i get
> an error:
> taskmanager.cpp:60:36: error: no matching function for call to
> ‘std::shared_ptr<task>::shared_ptr(odb::object_traits<task>::pointer_ty
> pe)’
> shared_ptr<task> p (i.load ()); <<<< Got an error on this line..

As mentioned in the Qt profile's documentation, enabling it makes
QSharedPointer the default object pointer. In other words, before
adding this option, i.load() above returned task* while after
adding it, it started returning QSharedPointer<task>. If you want
to continue using shared_ptr, add the following option after the
'--profile qt':

--default-pointer std::shared_ptr


More information about the odb-users mailing list