Re: [Interest] problem converting QVariant UserType to Int

2014-08-26 Thread Thiago Macieira
On Tuesday 26 August 2014 18:18:31 glenn popelka wrote: > qDebug() << "UserTypeClass::toInt " << this << ' ' << *ok << ' ' << m_data; qDebug() already adds the spaces for you -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center __

Re: [Interest] problem converting QVariant UserType to Int

2014-08-26 Thread Mandeep Sandhu
> > Output: > = > UserTypeClass ctor 0x7fff6aa02710 3 -> 3 > UserTypeClass copy 0x7fff6aa02710 to 0x194eb20 3 (UserType copied into > QVariant) > UserTypeClass::toInt 0x7fff6aa026f0 false 26537440 (1st conversion > failed, where did 26537440 come from?) Seems like uninitialized value from a TH

[Interest] problem converting QVariant UserType to Int

2014-08-26 Thread glenn popelka
Qt-5.3.1, Fedora 20, g++4.8.3. Also tested on Windows7 with Qt5.2.1 and 5.3.1. I’m trying to take advantage of the new functionality in Qt5.2 allowing conversion from a QVariant holding a UserType directly to Integer. I think this may be a bug, but I could be wrong... Here's my code, it can al