diff options
author | Ville Voutilainen <ville.voutilainen@qt.io> | 2018-02-27 15:28:18 +0200 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2018-11-07 16:26:46 +0000 |
commit | 7547f57e26e01f0b20908d68afd93029fc7f8f1a (patch) | |
tree | 552eefa56176ba3f7cb5732d34bfa56edaf3d2be /src/plugins | |
parent | 928e77fa14e18773f994be7cf9dcf0da52f39055 (diff) |
Silence a GCC 8 warning in qxcbnativeinterface
qtbase/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:309:65: error: cast between incompatible function types from ‘void (*)(const char*)’ to ‘QPlatformNativeInterface::NativeResourceForIntegrationFunction’ {aka ‘void* (*)()’} [-Werror=cast-function-type]
return NativeResourceForIntegrationFunction(setStartupId);
Change-Id: I83409b3a6cc67ccb4c9e91e592e6a01bb6ce45ea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 1b72d3e645a41c7b7f7731cecbd7119b8e7f7f28)
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index 97dcb8f328..25dd1d1016 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -299,7 +299,7 @@ QPlatformNativeInterface::NativeResourceForIntegrationFunction QXcbNativeInterfa return func; if (lowerCaseResource == "setstartupid") - return NativeResourceForIntegrationFunction(setStartupId); + return NativeResourceForIntegrationFunction(reinterpret_cast<void *>(setStartupId)); return 0; } @@ -320,9 +320,9 @@ QPlatformNativeInterface::NativeResourceForScreenFunction QXcbNativeInterface::n return func; if (lowerCaseResource == "setapptime") - return NativeResourceForScreenFunction(setAppTime); + return NativeResourceForScreenFunction(reinterpret_cast<void *>(setAppTime)); else if (lowerCaseResource == "setappusertime") - return NativeResourceForScreenFunction(setAppUserTime); + return NativeResourceForScreenFunction(reinterpret_cast<void *>(setAppUserTime)); return 0; } @@ -374,7 +374,7 @@ QFunctionPointer QXcbNativeInterface::platformFunction(const QByteArray &functio } if (function == QXcbScreenFunctions::virtualDesktopNumberIdentifier()) - return QFunctionPointer(QXcbScreenFunctions::VirtualDesktopNumber(QXcbScreen::virtualDesktopNumberStatic)); + return QFunctionPointer(QXcbScreenFunctions::VirtualDesktopNumber(reinterpret_cast<void *>(QXcbScreen::virtualDesktopNumberStatic))); return Q_NULLPTR; } |