Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
6.x
-
None
-
64bit ArchLinux, gcc (GCC) 10.1.0, updated today (2020-08-11)
-
-
b39685d4c26009d6f85cbbee287d5647a7bd6fe4 (qt/qtbase/dev)
Description
QPixmap has no operator== (historic reasons?), my compiler thinks it's a valid way forward to cast both with QCursor(const QPixmap &pixmap, int hotX=-1, int hotY=-1) and then compare those.
Which clearly isn't a good thing (to do implicitly). There a multiple issues with this (can't probably compare null pixmaps, performance, expected behavior, ...).
I personally see 3 possible solutions:
- make a operator== for qpixmap that is private - this will cause the compiler to complain that you're calling a private function
- make the ctor of QCursor explicit - this will make the compiler complain that there isn't any operator== suitable (I think?)
- make a proper and public operator== for qpixmap - this will make comparing them just work (for that you could rely on QPixmap::cacheKey() ? Maybe?)
Attachments
Issue Links
- is duplicated by
-
QTBUG-92044 QPixmap comparison
- Closed