fbconvenience: use smart pointer for QFbCursor

Fixes: QTBUG-110785
Change-Id: Id82fc300c5716ce68a2609b7fb36195f2d37e322
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit bb84232b0540ba834747459b68458054b7107541)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Liang Qi 2023-02-07 13:25:21 +01:00 committed by Qt Cherry-pick Bot
parent 3851964388
commit e31cbbaefc
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ QFbCursor::QFbCursor(QFbScreen *screen)
if (!mVisible)
return;
mCursorImage = new QPlatformCursorImage(0, 0, 0, 0, 0, 0);
mCursorImage.reset(new QPlatformCursorImage(0, 0, 0, 0, 0, 0));
setCursor(Qt::ArrowCursor);
mDeviceListener = new QFbCursorDeviceListener(this);

View File

@ -77,7 +77,7 @@ private:
QRect mPrevRect; // last place the cursor was drawn
bool mDirty;
bool mOnScreen;
QPlatformCursorImage *mCursorImage;
QScopedPointer<QPlatformCursorImage> mCursorImage;
QFbCursorDeviceListener *mDeviceListener;
QPoint m_pos;
};