diff options
Diffstat (limited to 'src/plugins/platforms/windows')
4 files changed, 11 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 80517ffe69..073d6da536 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -1605,7 +1605,11 @@ static inline QByteArray nativeEventType() { return QByteArrayLiteral("windows_g bool QWindowsContext::filterNativeEvent(MSG *msg, LRESULT *result) { QAbstractEventDispatcher *dispatcher = QAbstractEventDispatcher::instance(); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + qintptr filterResult = 0; +#else long filterResult = 0; +#endif if (dispatcher && dispatcher->filterNativeEvent(nativeEventType(), msg, &filterResult)) { *result = LRESULT(filterResult); return true; @@ -1616,7 +1620,11 @@ bool QWindowsContext::filterNativeEvent(MSG *msg, LRESULT *result) // Send to QWindowSystemInterface bool QWindowsContext::filterNativeEvent(QWindow *window, MSG *msg, LRESULT *result) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + qintptr filterResult = 0; +#else long filterResult = 0; +#endif if (QWindowSystemInterface::handleNativeEvent(window, nativeEventType(), msg, &filterResult)) { *result = LRESULT(filterResult); return true; diff --git a/src/plugins/platforms/windows/qwindowscursor.h b/src/plugins/platforms/windows/qwindowscursor.h index 8495b51a5a..2e57c80def 100644 --- a/src/plugins/platforms/windows/qwindowscursor.h +++ b/src/plugins/platforms/windows/qwindowscursor.h @@ -61,7 +61,7 @@ inline bool operator==(const QWindowsPixmapCursorCacheKey &k1, const QWindowsPix return k1.bitmapCacheKey == k2.bitmapCacheKey && k1.maskCacheKey == k2.maskCacheKey; } -inline uint qHash(const QWindowsPixmapCursorCacheKey &k, uint seed) Q_DECL_NOTHROW +inline uint qHash(const QWindowsPixmapCursorCacheKey &k, uint seed) noexcept { return (uint(k.bitmapCacheKey) + uint(k.maskCacheKey)) ^ seed; } diff --git a/src/plugins/platforms/windows/qwindowsmenu.cpp b/src/plugins/platforms/windows/qwindowsmenu.cpp index 5a92a7cf90..17a1b94101 100644 --- a/src/plugins/platforms/windows/qwindowsmenu.cpp +++ b/src/plugins/platforms/windows/qwindowsmenu.cpp @@ -784,7 +784,7 @@ void QWindowsMenuBar::handleReparent(QWindow *newParentWindow) if (QPlatformWindow *platWin = newParentWindow->handle()) install(static_cast<QWindowsWindow *>(platWin)); else // Store for later creation, see menuBarOf() - newParentWindow->setProperty(menuBarPropertyName, qVariantFromValue<QObject *>(this)); + newParentWindow->setProperty(menuBarPropertyName, QVariant::fromValue<QObject *>(this)); } QWindowsMenuBar *QWindowsMenuBar::menuBarOf(const QWindow *notYetCreatedWindow) diff --git a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp index 9003e94c56..b8ab7f8779 100644 --- a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp +++ b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp @@ -143,7 +143,7 @@ QVariant QWindowsNativeInterface::windowProperty(QPlatformWindow *window, const { QWindowsWindow *platformWindow = static_cast<QWindowsWindow *>(window); if (name == QLatin1String(customMarginPropertyC)) - return qVariantFromValue(platformWindow->customMargins()); + return QVariant::fromValue(platformWindow->customMargins()); return QVariant(); } |