Clean up the cached cursors inside the destructor of QCocoaCursor

Change-Id: I4e1222832efa29680b4e658a5c9109641599a2b9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
bb10
Andy Shaw 2013-02-15 14:51:48 +01:00 committed by The Qt Project
parent 79498af6e4
commit e47c2744e6
2 changed files with 5 additions and 0 deletions

View File

@ -53,6 +53,7 @@ class QCocoaCursor : public QPlatformCursor
{
public:
QCocoaCursor();
~QCocoaCursor();
virtual void changeCursor(QCursor * widgetCursor, QWindow * widget);
virtual QPoint pos() const;

View File

@ -48,6 +48,10 @@
QT_BEGIN_NAMESPACE
QCocoaCursor::QCocoaCursor()
{
}
QCocoaCursor::~QCocoaCursor()
{
// release cursors
QHash<Qt::CursorShape, NSCursor *>::const_iterator i = m_cursors.constBegin();