On Thursday 17 of July 2014 10:51:03 you wrote: > QVariant::operator== is not symmetric > > QDateTime dateTime = QDateTime::currentDateTime(); > QTime time = dateTime.time(); > > qDebug() << (QVariant(dateTime) == QVariant(time)); > qDebug() << (QVariant(time) == QVariant(dateTime)); > > --> > false > true
We could make it symmetric, if you want. My recommendation is to not use the comparison at all. If you want more "features" of QVariant you can look into isNull() this is a perfect randomizer :P. The whole discussion took wrong direction. I didn't want to discuss QVariant API, which is not fixable, even Qt6 would not help, to much staff depends on it. Jędrek _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development