Fix compilation error on macOS

Pick-to: 6.9 6.9.1
Fixes: QTBUG-136654
Change-Id: I9d37edb53e91b7c78535c4a5cddb4a595580c293
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
This commit is contained in:
Tomi Korpipää 2025-05-08 12:11:44 +03:00 committed by Tomi Korpipää
parent 44fe58c4d5
commit 81ee13281c
1 changed files with 4 additions and 3 deletions

View File

@ -5338,9 +5338,10 @@ void QQuickGraphsItem::handleWindowChanged(/*QQuickWindow *window*/)
bool previousVisibility = window->isVisible();
// Enable touch events for Mac touchpads
window->setVisible(true);
typedef void *(*EnableTouch)(QWindow *, bool);
EnableTouch enableTouch = (EnableTouch) QGuiApplication::platformNativeInterface()
->nativeResourceFunctionForIntegration("registertouchwindow");
typedef void (*EnableTouch)(QWindow *, bool);
EnableTouch enableTouch = reinterpret_cast<EnableTouch>(
QFunctionPointer(QGuiApplication::platformNativeInterface()
->nativeResourceFunctionForIntegration("registertouchwindow")));
if (enableTouch)
enableTouch(window, true);
window->setVisible(previousVisibility);