Skip to content

Commit

Permalink
fbconvenience: use smart pointer for QFbCursor
Browse files Browse the repository at this point in the history
Pick-to: 6.5 6.4 6.2 5.15
Fixes: QTBUG-110785
Change-Id: Id82fc300c5716ce68a2609b7fb36195f2d37e322
Reviewed-by: Laszlo Agocs <[email protected]>
  • Loading branch information
liangqi committed Feb 10, 2023
1 parent fc33fea commit bb84232
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/platformsupport/fbconvenience/qfbcursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/platformsupport/fbconvenience/qfbcursor_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class QFbCursor : public QPlatformCursor
QRect mPrevRect; // last place the cursor was drawn
bool mDirty;
bool mOnScreen;
QPlatformCursorImage *mCursorImage;
QScopedPointer<QPlatformCursorImage> mCursorImage;
QFbCursorDeviceListener *mDeviceListener;
QPoint m_pos;
};
Expand Down

0 comments on commit bb84232

Please sign in to comment.