summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qcocoanativeinterface.mm12
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm2
-rw-r--r--src/widgets/kernel/qapplication.cpp8
-rw-r--r--src/widgets/widgets/qtabbar.cpp6
-rw-r--r--src/widgets/widgets/qtoolbar.cpp3
-rw-r--r--src/widgets/widgets/qtoolbarlayout.cpp6
6 files changed, 21 insertions, 16 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
index 58bda2706af..91032b24bed 100644
--- a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
+++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
@@ -60,17 +60,17 @@ void *QCocoaNativeInterface::nativeResourceForWindow(const QByteArray &resourceS
QPlatformNativeInterface::NativeResourceForIntegrationFunction QCocoaNativeInterface::nativeResourceFunctionForIntegration(const QByteArray &resource)
{
if (resource.toLower() == "registerdraggedtypes")
- return NativeResourceForIntegrationFunction(QCocoaNativeInterface::registerDraggedTypes);
+ return NativeResourceForIntegrationFunction(QFunctionPointer(QCocoaNativeInterface::registerDraggedTypes));
if (resource.toLower() == "registertouchwindow")
- return NativeResourceForIntegrationFunction(QCocoaNativeInterface::registerTouchWindow);
+ return NativeResourceForIntegrationFunction(QFunctionPointer(QCocoaNativeInterface::registerTouchWindow));
if (resource.toLower() == "setembeddedinforeignview")
- return NativeResourceForIntegrationFunction(QCocoaNativeInterface::setEmbeddedInForeignView);
+ return NativeResourceForIntegrationFunction(QFunctionPointer(QCocoaNativeInterface::setEmbeddedInForeignView));
if (resource.toLower() == "registercontentborderarea")
- return NativeResourceForIntegrationFunction(QCocoaNativeInterface::registerContentBorderArea);
+ return NativeResourceForIntegrationFunction(QFunctionPointer(QCocoaNativeInterface::registerContentBorderArea));
if (resource.toLower() == "setcontentborderareaenabled")
- return NativeResourceForIntegrationFunction(QCocoaNativeInterface::setContentBorderAreaEnabled);
+ return NativeResourceForIntegrationFunction(QFunctionPointer(QCocoaNativeInterface::setContentBorderAreaEnabled));
if (resource.toLower() == "testcontentborderposition")
- return NativeResourceForIntegrationFunction(QCocoaNativeInterface::testContentBorderPosition);
+ return NativeResourceForIntegrationFunction(QFunctionPointer(QCocoaNativeInterface::testContentBorderPosition));
return nullptr;
}
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index 20530e067bc..749a4484a9c 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -437,7 +437,7 @@ static bool isInMacUnifiedToolbarArea(QWindow *window, int windowY)
return false; // Not Cocoa platform plugin.
typedef bool (*TestContentBorderPositionFunction)(QWindow *, int);
- return (reinterpret_cast<TestContentBorderPositionFunction>(function))(window, windowY);
+ return (reinterpret_cast<TestContentBorderPositionFunction>(QFunctionPointer(function)))(window, windowY);
}
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);
}
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index b586a96e4d7..53d13ca2855 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -106,14 +106,16 @@ void QTabBarPrivate::updateMacBorderMetrics()
if (!function)
return; // Not Cocoa platform plugin.
typedef void (*RegisterContentBorderAreaFunction)(QWindow *window, quintptr identifier, int upper, int lower);
- (reinterpret_cast<RegisterContentBorderAreaFunction>(function))(q->window()->windowHandle(), identifier, upper, lower);
+ (reinterpret_cast<RegisterContentBorderAreaFunction>(QFunctionPointer(function)))(
+ q->window()->windowHandle(), identifier, upper, lower);
// Set visibility state
function = nativeInterface->nativeResourceFunctionForIntegration("setContentBorderAreaEnabled");
if (!function)
return;
typedef void (*SetContentBorderAreaEnabledFunction)(QWindow *window, quintptr identifier, bool enable);
- (reinterpret_cast<SetContentBorderAreaEnabledFunction>(function))(q->window()->windowHandle(), identifier, q->isVisible());
+ (reinterpret_cast<SetContentBorderAreaEnabledFunction>(QFunctionPointer(function)))(
+ q->window()->windowHandle(), identifier, q->isVisible());
#endif
}
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp
index b8b462b03f8..66fdcf20d78 100644
--- a/src/widgets/widgets/qtoolbar.cpp
+++ b/src/widgets/widgets/qtoolbar.cpp
@@ -1000,7 +1000,8 @@ static void enableMacToolBar(QToolBar *toolbar, bool enable)
return; // Not Cocoa platform plugin.
typedef void (*SetContentBorderAreaEnabledFunction)(QWindow *window, void *identifier, bool enabled);
- (reinterpret_cast<SetContentBorderAreaEnabledFunction>(function))(toolbar->window()->windowHandle(), toolbar, enable);
+ (reinterpret_cast<SetContentBorderAreaEnabledFunction>(QFunctionPointer(function)))(
+ toolbar->window()->windowHandle(), toolbar, enable);
}
#endif
diff --git a/src/widgets/widgets/qtoolbarlayout.cpp b/src/widgets/widgets/qtoolbarlayout.cpp
index cc842e26574..a81155257b3 100644
--- a/src/widgets/widgets/qtoolbarlayout.cpp
+++ b/src/widgets/widgets/qtoolbarlayout.cpp
@@ -336,9 +336,11 @@ void QToolBarLayout::updateMacBorderMetrics()
typedef void (*RegisterContentBorderAreaFunction)(QWindow *window, void *identifier, int upper, int lower);
if (mainWindow->toolBarArea(tb) == Qt::TopToolBarArea) {
- (reinterpret_cast<RegisterContentBorderAreaFunction>(function))(tb->window()->windowHandle(), tb, upper.y(), lower.y());
+ (reinterpret_cast<RegisterContentBorderAreaFunction>(QFunctionPointer(function)))(
+ tb->window()->windowHandle(), tb, upper.y(), lower.y());
} else {
- (reinterpret_cast<RegisterContentBorderAreaFunction>(function))(tb->window()->windowHandle(), tb, 0, 0);
+ (reinterpret_cast<RegisterContentBorderAreaFunction>(QFunctionPointer(function)))(
+ tb->window()->windowHandle(), tb, 0, 0);
}
#endif
}