diff options
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscursor.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowscursor.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/plugins/platforms/windows/qwindowscursor.cpp b/src/plugins/platforms/windows/qwindowscursor.cpp index 72155a1d1b..825602e7dc 100644 --- a/src/plugins/platforms/windows/qwindowscursor.cpp +++ b/src/plugins/platforms/windows/qwindowscursor.cpp @@ -43,16 +43,16 @@ #include "qwindowswindow.h" #include "qwindowsscreen.h" -#include <QtGui/QBitmap> -#include <QtGui/QImage> -#include <QtGui/QBitmap> -#include <QtGui/QGuiApplication> -#include <QtGui/QScreen> +#include <QtGui/qbitmap.h> +#include <QtGui/qimage.h> +#include <QtGui/qbitmap.h> +#include <QtGui/qguiapplication.h> +#include <QtGui/qscreen.h> #include <QtGui/private/qguiapplication_p.h> // getPixmapCursor() #include <QtGui/private/qhighdpiscaling_p.h> -#include <QtCore/QDebug> -#include <QtCore/QScopedArrayPointer> +#include <QtCore/qdebug.h> +#include <QtCore/qscopedpointer.h> static bool initResources() { @@ -524,10 +524,11 @@ HCURSOR QWindowsCursor::createCursorFromShape(Qt::CursorShape cursorShape, const } // Load available standard cursors from resources - const QWindowsStandardCursorMapping *sEnd = standardCursors + sizeof(standardCursors) / sizeof(standardCursors[0]); - for (const QWindowsStandardCursorMapping *s = standardCursors; s < sEnd; ++s) { - if (s->shape == cursorShape) - return static_cast<HCURSOR>(LoadImage(0, s->resource, IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_SHARED)); + for (const QWindowsStandardCursorMapping &s : standardCursors) { + if (s.shape == cursorShape) { + return static_cast<HCURSOR>(LoadImage(nullptr, s.resource, IMAGE_CURSOR, + 0, 0, LR_DEFAULTSIZE | LR_SHARED)); + } } qWarning("%s: Invalid cursor shape %d", __FUNCTION__, cursorShape); |