[odb-users] Error when adding --profile qt
Versteden2
Versteden2 at upcmail.nl
Fri Aug 7 06:24:05 EDT 2015
Hello,
I have a working project.
ow I want to make a change to use QString for strings instead of
std::string.
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)’
on the code:
int TaskManager::LoadTasks()
{
typedef odb::query<task> query;
typedef odb::result<task> result;
odb::result< task > r;
{
int index;
transaction t (db->begin ());
result r (db->query<task> ());
qDebug() << "Number of rows fetched (1) " << r.size();
index = 0;
for (result::iterator i (r.begin ()); i != r.end (); ++i, index++)
{
qDebug() << "Filling data, index = " << index;
shared_ptr<task> p (i.load ()); <<<< Got an error on this line..
_tasks[p->get_id()] = p;
}
t.commit ();
qDebug() << "Number of rows fetched (2)" << _tasks.size();
return _tasks.size();
}
}
Can anyone tel me what i am doing wrong?
More information about the odb-users
mailing list