Windows QPA: Fix compiler warning when Vulkan is not present

qwindowsnativeinterface.cpp: In member function 'virtual void* QWindowsNativeInterface::nativeResourceForWindow(const QByteArray&, QWindow*)':
qwindowsnativeinterface.cpp:104:12: error: enumeration value 'VulkanSurface' not handled in switch [-Werror=switch]

Amends  f1a23a546720e4f1541404185ff8e765463e6bf6.

Task-number: QTBUG-55981
Change-Id: Ie9bf396ab8ea1be505abfaffd5d603bb3856c089
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Friedemann Kleint 2017-03-20 11:46:35 +01:00 committed by Laszlo Agocs
parent bf9a1cf939
commit 62c7ca2de3

View File

@ -114,12 +114,12 @@ void *QWindowsNativeInterface::nativeResourceForWindow(const QByteArray &resourc
case QWindow::OpenGLSurface: case QWindow::OpenGLSurface:
case QWindow::OpenVGSurface: case QWindow::OpenVGSurface:
break; break;
#if QT_CONFIG(vulkan)
case QWindow::VulkanSurface: case QWindow::VulkanSurface:
#if QT_CONFIG(vulkan)
if (type == VkSurface) if (type == VkSurface)
return bw->surface(nullptr, nullptr); // returns the address of the VkSurfaceKHR, not the value, as expected return bw->surface(nullptr, nullptr); // returns the address of the VkSurfaceKHR, not the value, as expected
break;
#endif #endif
break;
} }
qWarning("%s: Invalid key '%s' requested.", __FUNCTION__, resource.constData()); qWarning("%s: Invalid key '%s' requested.", __FUNCTION__, resource.constData());
return 0; return 0;