Correctly reimplement QPlatformCursor::pos() in QCocoaCursor
QPlatformCursor::pos() is a const function, the reimplementation should be as well. Change-Id: I7e37e41086e3b329dc31ebc060fcb0915771d884 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>bb10
parent
d8374aebc6
commit
b986131c6d
|
|
@ -55,7 +55,7 @@ public:
|
|||
explicit QCocoaCursor(QPlatformScreen *);
|
||||
|
||||
virtual void changeCursor(QCursor * widgetCursor, QWindow * widget);
|
||||
virtual QPoint pos();
|
||||
virtual QPoint pos() const;
|
||||
virtual void setPos(const QPoint &position);
|
||||
private:
|
||||
QHash<Qt::CursorShape, NSCursor *> m_cursors;
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ void QCocoaCursor::changeCursor(QCursor *cursor, QWindow *window)
|
|||
}
|
||||
}
|
||||
|
||||
QPoint QCocoaCursor::pos()
|
||||
QPoint QCocoaCursor::pos() const
|
||||
{
|
||||
return qt_mac_flipPoint([NSEvent mouseLocation]).toPoint();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue