Error when update to 1.4.4

Forum for posting problems using QxOrm library

Error when update to 1.4.4

Postby behtgod » Mon Jun 25, 2018 10:22 am

I updated the QxOrm from 1.4.1 to 1.4.4.
But when i compliled my source ,I found that QxConvert_FromVariant::fromVariant and QxConvert_ToVariant::toVariant is changed.
I fixed it by add argument ctx.
Then , I got a complie error like qx_need_to_specialize_template_convert_to_string_from_string.
I tried to specialize template qx::cvt::detail::QxConvert_FromString according the comments, but it not works.
It seems that I made some mistake.
So, are there any migrate manual or example about it?
behtgod
 
Posts: 18
Joined: Mon Nov 16, 2015 8:21 am

Re: Error when update to 1.4.4

Postby qxorm » Tue Jun 26, 2018 7:03 am

are there any migrate manual or example about it?

No there is no migration manual, sorry for that.

Yes the QxConvert module has changed a bit, and if you have specialized some templates with your own types, you have to change the methods signature.

For example, with QxOrm 1.4.1 :
Code: Select all
template <typename T>
struct QxConvert_FromVariant
{
   static inline qx_bool fromVariant(const QVariant & v, T & t, const QString & format, int index)


And with QxOrm 1.4.4 (as you said the 'ctx' parameter has been added) :
Code: Select all
template <typename T>
struct QxConvert_FromVariant
{
   static inline qx_bool fromVariant(const QVariant & v, T & t, const QString & format, int index, qx::cvt::context::ctx_type ctx)


Could you please provide an example of your specializations ?
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron