QWindowsCursor: compile without feature_imageformat_xpm

Fix compile with feature_imageformat_xpm = OFF

Change-Id: Id84c2050f27bbe43ae9710f4e23c52cc24dd3370
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit bdf9d703940621ba1074ce4879212a162a50eaf5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Christian Ehrlicher 2025-04-30 09:17:09 +02:00 committed by Qt Cherry-pick Bot
parent ffd4b96376
commit 48dae6d4df

View File

@ -708,6 +708,7 @@ QPixmap QWindowsCursor::dragDefaultCursor(Qt::DropAction action) const
break;
}
#if QT_CONFIG(imageformat_xpm)
static const char * const ignoreDragCursorXpmC[] = {
"24 30 3 1",
". c None",
@ -743,6 +744,7 @@ QPixmap QWindowsCursor::dragDefaultCursor(Qt::DropAction action) const
"............XaaaaaaaaX..",
".............XXaaaaXX...",
"...............XXXX....."};
#endif
if (m_ignoreDragCursor.isNull()) {
HCURSOR cursor = LoadCursor(nullptr, IDC_NO);
@ -761,8 +763,10 @@ QPixmap QWindowsCursor::dragDefaultCursor(Qt::DropAction action) const
m_ignoreDragCursor = QPixmap::fromImage(colorImage);
delete [] colorBits;
#if QT_CONFIG(imageformat_xpm)
} else {
m_ignoreDragCursor = QPixmap(ignoreDragCursorXpmC);
#endif
}
DeleteObject(iconInfo.hbmMask);