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

Versteden2 Versteden2 at upcmail.nl
Sat Aug 8 08:22:53 EDT 2015


Boris,

Thank you for the quick reply.
I changed the code to use QSharedPointer now and it work.

Harrie

On Fri, 2015-08-07 at 13:16 +0200, Boris Kolpackov wrote:
> Hi,
> 
> 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>::pointe
> > r_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
> 
> Boris
> 



More information about the odb-users mailing list