diff options
author | Tor Arne Vestbø <[email protected]> | 2025-03-27 11:12:31 +0100 |
---|---|---|
committer | Tor Arne Vestbø <[email protected]> | 2025-03-27 15:57:42 +0100 |
commit | cf8f9580da5414dfc3f79b4c83c6684497a3241c (patch) | |
tree | 060bf78b3d6bfc043123f702632dfcfbade4f7f8 /src/widgets/kernel/qapplication.cpp | |
parent | 002badc3abdea577651b58c5d61c35ea7c38240a (diff) |
Cast NativeResourceForIntegrationFunction via QFunctionPointer
To fix warnings with Xcode 16.3:
/Users/torarne/dev/qt/qtbase/src/widgets/widgets/qtabbar.cpp:117:6: warning: cast from 'QPlatformNativeInterface::NativeResourceForIntegrationFunction' (aka 'void *(*)()') to 'SetContentBorderAreaEnabledFunction' (aka 'void (*)(QWindow *, unsigned long long, bool)') converts to incompatible function type [-Wcast-function-type-mismatch]
117 | (reinterpret_cast<SetContentBorderAreaEnabledFunction>(function))(q->window()->windowHandle(), identifier, q->isVisible());
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Pick-to: 6.9 6.8
Change-Id: Ie7b5ace64c1aad5f970bc1a23e59c5724fcd92b5
Reviewed-by: Marc Mutz <[email protected]>
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 40894c28702..d3cf1587c45 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -3234,8 +3234,8 @@ bool QApplication::notify(QObject *receiver, QEvent *e) typedef void (*RegisterTouchWindowFn)(QWindow *, bool); case QEvent::Enter: if (w->testAttribute(Qt::WA_AcceptTouchEvents)) { - RegisterTouchWindowFn registerTouchWindow = reinterpret_cast<RegisterTouchWindowFn> - (platformNativeInterface()->nativeResourceFunctionForIntegration("registertouchwindow")); + RegisterTouchWindowFn registerTouchWindow = reinterpret_cast<RegisterTouchWindowFn>( + QFunctionPointer(platformNativeInterface()->nativeResourceFunctionForIntegration("registertouchwindow"))); if (registerTouchWindow) registerTouchWindow(w->window()->windowHandle(), true); } @@ -3243,8 +3243,8 @@ bool QApplication::notify(QObject *receiver, QEvent *e) break; case QEvent::Leave: if (w->testAttribute(Qt::WA_AcceptTouchEvents)) { - RegisterTouchWindowFn registerTouchWindow = reinterpret_cast<RegisterTouchWindowFn> - (platformNativeInterface()->nativeResourceFunctionForIntegration("registertouchwindow")); + RegisterTouchWindowFn registerTouchWindow = reinterpret_cast<RegisterTouchWindowFn>( + QFunctionPointer(platformNativeInterface()->nativeResourceFunctionForIntegration("registertouchwindow"))); if (registerTouchWindow) registerTouchWindow(w->window()->windowHandle(), false); } |