[Development] QVariant comparison in Qt6
Thiago Macieira
thiago.macieira at intel.com
Mon Sep 21 23:02:35 CEST 2020
On Monday, 21 September 2020 01:17:58 PDT Lars Knoll wrote:
> > On 18 Sep 2020, at 17:11, Thiago Macieira <thiago.macieira at intel.com>
> > wrote:
> > On Friday, 18 September 2020 06:48:50 PDT Lars Knoll wrote:
> >
> >> std::optional<int> QVariant::compare(const QVariant &other);
> >>
> >> Would that be good enough?
> >
> >
> > Why the optional?
>
>
> Because there is no valid comparison we could do between a QDate and a
> QPoint. And because a QPolygon doesn’t provide any ordering even when
> comparing two of them.
Then we don't need the optional, we just need a distinct value from the other
three. In my other email, I gave you three options.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel DPG Cloud Engineering
More information about the Development
mailing list