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
Bradley T. Hughes 2011-12-09 13:40:47 +01:00 committed by Qt by Nokia
parent d8374aebc6
commit b986131c6d
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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();
}