[odb-users] QOdbList with QSharedPointer

Adnan RIHAN adnan at rihan.fr
Sat Nov 1 07:35:45 EDT 2014


Hi there,

Does odb support “QOdbList” (Change tracking equivalent, for Qt’s profile) with a shared pointer as template type?

The doc doesn’t mention it, it only mentions for basic types (std::string, int, ...), and I have a compilation error:
> /usr/local/include/odb/database.ixx:299:40: error: no type named 'pointer_type' in 'odb::object_traits<QSharedPointer<Category> >'
>     typedef typename object_traits<T>::pointer_type object_pointer;
>             ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
> /usr/local/include/odb/database.ixx:330:5: note: in instantiation of function template specialization 'odb::database::update<QSharedPointer<Category>, QOdbList>' requested here
>     update<T, P> (cr);
>     ^
> /Users/Max13/Dev/System/LGC/Desktop/apps/LGC/src/Controllers/EntityManager/EntityManager.hpp:149:29: note: in instantiation of function template specialization 'odb::database::update<QSharedPointer<Category>, QOdbList>' requested here
>                 this->m_db->update(data);
>                             ^
> /Users/Max13/Dev/System/LGC/Desktop/apps/LGC/src/Classification/ClassificationWidget.cpp:147:59: note: in instantiation of function template specialization 'EntityManager::update<QOdbList<QSharedPointer<Category> > >' requested here
>         if (!(persisted = MasterController::inst()->em()->update(this->m_catList))) {
>                                                           ^

Do I have to do this: http://www.codesynthesis.com/products/odb/doc/manual.xhtml#6.5
Or did I just forgot to add a header or something ?

Thank you
--  
Cordialement, Adnan RIHAN.
Directeur-Gérant de Eolis-Software, société de services informatiques.  

GPG: 5675-62BA (https://keybase.io/max13/key.asc)
-> Si vous n’utilisez pas GPG mais souhaitez quand même m’envoyer un e-mail chiffré: (https://encrypt.to/0x567562BA).



More information about the odb-users mailing list