Re: [Development] Behaviour change in QML in Qt 5.8 regarding null

2016-09-28 Thread Chris Adams
I'm certain that it's possible. I suspect the reason why the code used QVariant is that when it was originally written (in Qt 4.7 days, IIRC), QJSValue didn't exist, and it simply hasn't been ported to newer interfaces since then. Without knowing too much about the QML bindings in QtPIM, I am goi

Re: [Development] Behaviour change in QML in Qt 5.8 regarding null

2016-09-28 Thread Thiago Macieira
On quarta-feira, 28 de setembro de 2016 15:42:06 PDT Simon Hausmann wrote: > I don't think the QVariant interface is deprecated, but it just inherently > unsuitable for JavaScript specific things such as distinguishing undefined > from null or storing function closures. That is why the engine suppo

Re: [Development] Behaviour change in QML in Qt 5.8 regarding null

2016-09-28 Thread Simon Hausmann
Hi, I don't think the QVariant interface is deprecated, but it just inherently unsuitable for JavaScript specific things such as distinguishing undefined from null or storing function closures. That is why the engine supports both, for different purposes. Simon From: thiago.macie...@intel.co

Re: [Development] Behaviour change in QML in Qt 5.8 regarding null

2016-09-28 Thread Thiago Macieira
On quarta-feira, 28 de setembro de 2016 08:54:10 PDT Simon Hausmann wrote: > Hi, > > Ok, let me clarify: When the JavaScript engine wants to map a JS null value > to a QVariant, it used to use > > QVariant(QMetaType::VoidStar, (void *)0); > > and now uses > > QVariant::fromValue(nullptr

Re: [Development] Behaviour change in QML in Qt 5.8 regarding null

2016-09-28 Thread Allan Sandfeld Jensen
On Wednesday 28 September 2016, Olivier Goffart wrote: > > int main() { > QVariant v1 = QVariant::fromValue(nullptr); > QVariant v2 = QVariant::fromValue(nullptr); > qDebug() << v1.isNull() << v2.isNull() << (v1 == v2) << (v2 == v1); > qDebug() << v2.canConvert() << v2.canConver

Re: [Development] Module maintainers: action required (Coin migrates from sync.profile to .gitmodules on 28.09.2016)

2016-09-28 Thread Jedrzej Nowacki
Good news everyone! The deployment was success and we can wait for fireworks. I'm sure there will be some. So if something doesn't compile now, because of an invalid dependency look to .gitmodules in the right qt5 branch and fix it. Integrations may fail also because of invalid intermodule dep

Re: [Development] Behaviour change in QML in Qt 5.8 regarding null

2016-09-28 Thread Olivier Goffart
On Mittwoch, 28. September 2016 10:39:42 CEST Allan Sandfeld Jensen wrote: > On Wednesday 28 September 2016, Thiago Macieira wrote: > > On quarta-feira, 28 de setembro de 2016 01:22:33 PDT Allan Sandfeld Jensen > > > > wrote: > > > > QVariant::fromValue(nullptr).isNull() == false > > > > QVariant(

Re: [Development] Behaviour change in QML in Qt 5.8 regarding null

2016-09-28 Thread Simon Hausmann
Hi, Ok, let me clarify: When the JavaScript engine wants to map a JS null value to a QVariant, it used to use QVariant(QMetaType::VoidStar, (void *)0); and now uses QVariant::fromValue(nullptr); If a string is to be converted to a QVariant, it will naturally use QVariant(thatS

Re: [Development] Behaviour change in QML in Qt 5.8 regarding null

2016-09-28 Thread Allan Sandfeld Jensen
On Wednesday 28 September 2016, Thiago Macieira wrote: > On quarta-feira, 28 de setembro de 2016 01:22:33 PDT Allan Sandfeld Jensen > > wrote: > > > QVariant::fromValue(nullptr).isNull() == false > > > QVariant(QMetaType::Nullptr).isNull() == true > > > > And QVariant(nullptr) doesn't compile. >