diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-07-16 15:04:35 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-07-18 21:38:52 +0000 |
commit | d407daa683775b30f127345d3a2025a0434a4f73 (patch) | |
tree | fc9a9466f4dcad75935f207b1dd0813883a00979 | |
parent | d2fb421b2c40595246b9b5bb087a231c3061ecd8 (diff) |
Update resolveInterface after change in qtbase
Change-Id: I999f3e519779f059e06ab441a67b8fe64a8888f4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 09a414f0806ec73ac58dd17822055bc4955a4c21)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgtexture.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgtexture.cpp b/src/quick/scenegraph/coreapi/qsgtexture.cpp index d1a777995a..d70a9664ba 100644 --- a/src/quick/scenegraph/coreapi/qsgtexture.cpp +++ b/src/quick/scenegraph/coreapi/qsgtexture.cpp @@ -990,29 +990,27 @@ VkImageLayout QSGTexturePlatformVulkan::nativeImageLayout() const } #endif // vulkan -template<> -Q_NATIVE_INTERFACE_EXPORT void * -QNativeInterface::Private::resolveInterface(const QSGTexture *that, const char *name, int revision) +void *QSGTexture::resolveInterface(const char *name, int revision) const { using namespace QNativeInterface; - Q_UNUSED(that); Q_UNUSED(name); Q_UNUSED(revision); - auto *texturePrivate = QSGTexturePrivate::get(const_cast<QSGTexture*>(that)); - Q_UNUSED(texturePrivate); + Q_D(const QSGTexture); + auto *dd = const_cast<QSGTexturePrivate *>(d); + Q_UNUSED(dd); #if QT_CONFIG(vulkan) - QT_NATIVE_INTERFACE_RETURN_IF(QSGVulkanTexture, &texturePrivate->m_vulkanTextureAccessor); + QT_NATIVE_INTERFACE_RETURN_IF(QSGVulkanTexture, &dd->m_vulkanTextureAccessor); #endif #if defined(__OBJC__) - QT_NATIVE_INTERFACE_RETURN_IF(QSGMetalTexture, &texturePrivate->m_metalTextureAccessor); + QT_NATIVE_INTERFACE_RETURN_IF(QSGMetalTexture, &dd->m_metalTextureAccessor); #endif #if defined(Q_OS_WIN) - QT_NATIVE_INTERFACE_RETURN_IF(QSGD3D11Texture, &texturePrivate->m_d3d11TextureAccessor); + QT_NATIVE_INTERFACE_RETURN_IF(QSGD3D11Texture, &dd->m_d3d11TextureAccessor); #endif #if QT_CONFIG(opengl) - QT_NATIVE_INTERFACE_RETURN_IF(QSGOpenGLTexture, &texturePrivate->m_openglTextureAccessor); + QT_NATIVE_INTERFACE_RETURN_IF(QSGOpenGLTexture, &dd->m_openglTextureAccessor); #endif return nullptr; |