ScreenshotEffect: fix lookup of ComparableQPoint keys in QMap
QMap::value() failed to find existing keys when tow ComparablePoint shared the same x but not the same y. This commit improves the operator<() to fix that.
This commit is contained in:
parent
57086c341c
commit
bd626d9565
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ public:
|
|||
// utility class that allows using QMap to sort its keys when they are QPoint
|
||||
// so that the bottom and right points are after the top left ones
|
||||
bool operator<(const ComparableQPoint &other) const {
|
||||
return x() < other.x() || y() < other.y();
|
||||
return x() < other.x() || (x() == other.x() && y() < other.y());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue