[Development] QVariant::operator< deprecation fallout
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Mon Nov 23 15:47:23 CET 2020
Hi,
On 23/11/2020 08:48, Fabian Kosmale wrote:
> I think we should at least_somehow_ deprecate operator<; but I'm not sure if it should be a special deprecation macro, or a special one.
I'm guessing you meant generic / special. I'm more keen on keeping
everything deprecated, but with a special macro. (Or maybe just bump the
deprecation version to 6.0 instead of 5.15?)
A deprecation without replacement in the same Qt version is a dead end
for a user; and the last thing we want is for users to switch _OFF_
deprecation warnings because they depend on stuff they can't fix.
> Regarding point 4: Unfortunately, it's not that easy: If userType is actually a built-in type, then QMetaType::hasRegisteredComparators returns false, and QMetaType compare will not work. I'm afraid that in this case you would actually have to call the deprecated operator< [1]; unless we provide a replacement functionality in 5.15.3.
Ouch, right, this is the sort of things that really call for a helper
function with the right semantics™ to be added. But if we can't keep
that function compatible with Qt 6 anyhow, then we also burn the
"compare" name.
Thanks,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/development/attachments/20201123/f27b210d/attachment.bin>
More information about the Development
mailing list