From 671f73bb1f26cf1d8daa1d33f01fc15fd1e9f62e Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 11 Jul 2019 11:13:43 +0200 Subject: Bump module version to 6.0.0 And fix the build at the same time. Change-Id: I71f1ef2b8777fe514107a27c9ef6ee4c702a74c0 Reviewed-by: Alexandru Croitor --- .../client/dmabuf-server/dmabufserverbufferintegration.cpp | 4 ++-- .../client/vulkan-server/vulkanserverbufferintegration.cpp | 14 +++++++------- .../wayland-egl/qwaylandeglclientbufferintegration.cpp | 2 +- .../dmabuf-server/dmabufserverbufferintegration.cpp | 8 ++++---- .../linuxdmabufclientbufferintegration.cpp | 2 +- .../vulkan-server/vulkanserverbufferintegration.cpp | 12 ++++++------ .../wayland-egl/waylandeglclientbufferintegration.cpp | 2 +- .../waylandeglstreamintegration.cpp | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.cpp b/src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.cpp index 9f840414e..1c931a9ea 100644 --- a/src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.cpp +++ b/src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.cpp @@ -83,7 +83,7 @@ DmaBufServerBuffer::DmaBufServerBuffer(DmaBufServerBufferIntegration *integratio int err = eglGetError(); qCDebug(lcQpaWayland) << "imported egl image" << m_image; if (m_image == EGL_NO_IMAGE_KHR || err != EGL_SUCCESS) - qCWarning(lcQpaWayland) << "DmaBufServerBuffer error importing image. EGL error code" << hex << err; + qCWarning(lcQpaWayland) << "DmaBufServerBuffer error importing image. EGL error code" << Qt::hex << err; qt_server_buffer_set_user_data(id, this); @@ -93,7 +93,7 @@ DmaBufServerBuffer::~DmaBufServerBuffer() { int err = m_integration->eglDestroyImageKHR(m_image); if (err != EGL_SUCCESS) - qCWarning(lcQpaWayland) << "~DmaBufServerBuffer error destroying image" << m_image << "error code " << hex << err; + qCWarning(lcQpaWayland) << "~DmaBufServerBuffer error destroying image" << m_image << "error code " << Qt::hex << err; qt_server_buffer_release(m_server_buffer); qt_server_buffer_destroy(m_server_buffer); } diff --git a/src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.cpp b/src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.cpp index 4b2be50e6..b44038558 100644 --- a/src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.cpp +++ b/src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.cpp @@ -136,7 +136,7 @@ void VulkanServerBuffer::import() if (m_texture) return; - if (extraDebug) qDebug() << "importing" << m_fd << hex << glGetError(); + if (extraDebug) qDebug() << "importing" << m_fd << Qt::hex << glGetError(); auto *glContext = QOpenGLContext::currentContext(); if (!glContext) @@ -146,21 +146,21 @@ void VulkanServerBuffer::import() return; funcs->glCreateMemoryObjectsEXT(1, &m_memoryObject); - if (extraDebug) qDebug() << "glCreateMemoryObjectsEXT" << hex << glGetError(); + if (extraDebug) qDebug() << "glCreateMemoryObjectsEXT" << Qt::hex << glGetError(); funcs->glImportMemoryFdEXT(m_memoryObject, m_memorySize, GL_HANDLE_TYPE_OPAQUE_FD_EXT, m_fd); - if (extraDebug) qDebug() << "glImportMemoryFdEXT" << hex << glGetError(); + if (extraDebug) qDebug() << "glImportMemoryFdEXT" << Qt::hex << glGetError(); m_texture = new QOpenGLTexture(QOpenGLTexture::Target2D); m_texture->create(); - if (extraDebug) qDebug() << "created texture" << m_texture->textureId() << hex << glGetError(); + if (extraDebug) qDebug() << "created texture" << m_texture->textureId() << Qt::hex << glGetError(); m_texture->bind(); - if (extraDebug) qDebug() << "bound texture" << hex << glGetError(); + if (extraDebug) qDebug() << "bound texture" << Qt::hex << glGetError(); funcs->glTexStorageMem2DEXT(GL_TEXTURE_2D, 1, m_internalFormat, m_size.width(), m_size.height(), m_memoryObject, 0 ); - if (extraDebug) qDebug() << "glTexStorageMem2DEXT" << hex << glGetError(); - if (extraDebug) qDebug() << "format" << hex << m_internalFormat << GL_RGBA8; + if (extraDebug) qDebug() << "glTexStorageMem2DEXT" << Qt::hex << glGetError(); + if (extraDebug) qDebug() << "format" << Qt::hex << m_internalFormat << GL_RGBA8; } QOpenGLTexture *VulkanServerBuffer::toOpenGlTexture() diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp index 3a34d2561..596911ad3 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp @@ -108,7 +108,7 @@ void QWaylandEglClientBufferIntegration::initialize(QWaylandDisplay *display) EGLint major,minor; if (!eglInitialize(m_eglDisplay, &major, &minor)) { - qCWarning(lcQpaWayland) << "Failed to initialize EGL display" << hex << eglGetError(); + qCWarning(lcQpaWayland) << "Failed to initialize EGL display" << Qt::hex << eglGetError(); m_eglDisplay = EGL_NO_DISPLAY; return; } diff --git a/src/hardwareintegration/compositor/dmabuf-server/dmabufserverbufferintegration.cpp b/src/hardwareintegration/compositor/dmabuf-server/dmabufserverbufferintegration.cpp index 32171f5e2..9041daf5b 100644 --- a/src/hardwareintegration/compositor/dmabuf-server/dmabufserverbufferintegration.cpp +++ b/src/hardwareintegration/compositor/dmabuf-server/dmabufserverbufferintegration.cpp @@ -63,7 +63,7 @@ DmaBufServerBuffer::DmaBufServerBuffer(DmaBufServerBufferIntegration *integratio int err = eglGetError(); if (err != EGL_SUCCESS || m_image == EGL_NO_IMAGE_KHR) - qCWarning(qLcWaylandCompositorHardwareIntegration) << "DmaBufServerBuffer error creating EGL image" << hex << err; + qCWarning(qLcWaylandCompositorHardwareIntegration) << "DmaBufServerBuffer error creating EGL image" << Qt::hex << err; // TODO: formats with more than one plane @@ -71,7 +71,7 @@ DmaBufServerBuffer::DmaBufServerBuffer(DmaBufServerBufferIntegration *integratio if (!m_integration->eglExportDMABUFImageQueryMESA(m_image, &m_fourcc_format, &num_planes, nullptr)) { qCWarning(qLcWaylandCompositorHardwareIntegration) << "DmaBufServerBuffer: Failed to query egl image"; - qCDebug(qLcWaylandCompositorHardwareIntegration) << "error" << hex << eglGetError(); + qCDebug(qLcWaylandCompositorHardwareIntegration) << "error" << Qt::hex << eglGetError(); } else { qCDebug(qLcWaylandCompositorHardwareIntegration) << "num_planes" << num_planes << "fourcc_format" << m_fourcc_format; if (num_planes != 1) { @@ -85,7 +85,7 @@ DmaBufServerBuffer::DmaBufServerBuffer(DmaBufServerBufferIntegration *integratio } if (!m_integration->eglExportDMABUFImageMESA(m_image, &m_fd, &m_stride, &m_offset)) { - qCWarning(qLcWaylandCompositorHardwareIntegration) << "DmaBufServerBuffer: Failed to export egl image. Error code" << hex << eglGetError(); + qCWarning(qLcWaylandCompositorHardwareIntegration) << "DmaBufServerBuffer: Failed to export egl image. Error code" << Qt::hex << eglGetError(); } else { qCDebug(qLcWaylandCompositorHardwareIntegration) << "DmaBufServerBuffer exported egl image: fd" << m_fd << "stride" << m_stride << "offset" << m_offset; m_texture->release(); @@ -99,7 +99,7 @@ DmaBufServerBuffer::~DmaBufServerBuffer() int err; m_integration->eglDestroyImageKHR(m_image); if ((err = eglGetError()) != EGL_SUCCESS) - qCWarning(qLcWaylandCompositorHardwareIntegration) << "~DmaBufServerBuffer: eglDestroyImageKHR error" << hex << err; + qCWarning(qLcWaylandCompositorHardwareIntegration) << "~DmaBufServerBuffer: eglDestroyImageKHR error" << Qt::hex << err; err = ::close(m_fd); if (err) diff --git a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp index d512613a7..7514929de 100644 --- a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp +++ b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp @@ -99,7 +99,7 @@ static QWaylandBufferRef::BufferFormatEgl formatFromDrmFormat(EGLint format) { case DRM_FORMAT_YUYV: return QWaylandBufferRef::BufferFormatEgl_Y_XUXV; default: - qCDebug(qLcWaylandCompositorHardwareIntegration) << "Buffer format" << hex << format << "not supported"; + qCDebug(qLcWaylandCompositorHardwareIntegration) << "Buffer format" << Qt::hex << format << "not supported"; return QWaylandBufferRef::BufferFormatEgl_Null; } } diff --git a/src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.cpp b/src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.cpp index df197ca23..2ff7ef785 100644 --- a/src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.cpp +++ b/src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.cpp @@ -215,7 +215,7 @@ QOpenGLTexture *VulkanServerBuffer::toOpenGlTexture() return nullptr; funcs->glCreateMemoryObjectsEXT(1, &m_memoryObject); - if (extraDebug) qDebug() << "glCreateMemoryObjectsEXT" << hex << glGetError(); + if (extraDebug) qDebug() << "glCreateMemoryObjectsEXT" << Qt::hex << glGetError(); int dupfd = fcntl(m_fd, F_DUPFD_CLOEXEC, 0); @@ -225,7 +225,7 @@ QOpenGLTexture *VulkanServerBuffer::toOpenGlTexture() } funcs->glImportMemoryFdEXT(m_memoryObject, m_memorySize, GL_HANDLE_TYPE_OPAQUE_FD_EXT, dupfd); - if (extraDebug) qDebug() << "glImportMemoryFdEXT" << hex << glGetError(); + if (extraDebug) qDebug() << "glImportMemoryFdEXT" << Qt::hex << glGetError(); if (!m_texture) @@ -233,13 +233,13 @@ QOpenGLTexture *VulkanServerBuffer::toOpenGlTexture() m_texture->create(); GLuint texId = m_texture->textureId(); - if (extraDebug) qDebug() << "created texture" << texId << hex << glGetError(); + if (extraDebug) qDebug() << "created texture" << texId << Qt::hex << glGetError(); m_texture->bind(); - if (extraDebug) qDebug() << "bound texture" << texId << hex << glGetError(); + if (extraDebug) qDebug() << "bound texture" << texId << Qt::hex << glGetError(); funcs->glTexStorageMem2DEXT(GL_TEXTURE_2D, 1, m_glInternalFormat, m_size.width(), m_size.height(), m_memoryObject, 0 ); - if (extraDebug) qDebug() << "glTexStorageMem2DEXT" << hex << glGetError(); - if (extraDebug) qDebug() << "format" << hex << m_glInternalFormat << GL_RGBA8; + if (extraDebug) qDebug() << "glTexStorageMem2DEXT" << Qt::hex << glGetError(); + if (extraDebug) qDebug() << "format" << Qt::hex << m_glInternalFormat << GL_RGBA8; return m_texture; diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp index 88dab2ab2..01830d373 100644 --- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp +++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp @@ -345,7 +345,7 @@ bool WaylandEglClientBufferIntegrationPrivate::initEglStream(WaylandEglClientBuf auto newStream = funcs->stream_consumer_gltexture(egl_display, state.egl_stream); if (!newStream) { EGLint code = eglGetError(); - qWarning() << "Could not initialize EGLStream:" << egl_error_string(code) << hex << (long)code; + qWarning() << "Could not initialize EGLStream:" << egl_error_string(code) << Qt::hex << (long)code; funcs->destroy_stream(egl_display, state.egl_stream); state.egl_stream = EGL_NO_STREAM_KHR; return false; diff --git a/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp b/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp index 1493e9fc0..badde8016 100644 --- a/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp +++ b/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp @@ -255,7 +255,7 @@ bool WaylandEglStreamClientBufferIntegrationPrivate::initEglStream(WaylandEglStr if (!newStream) { EGLint code = eglGetError(); - qWarning() << "Could not initialize EGLStream:" << egl_error_string(code) << hex << (long)code; + qWarning() << "Could not initialize EGLStream:" << egl_error_string(code) << Qt::hex << (long)code; funcs->destroy_stream(egl_display, state.egl_stream); state.egl_stream = EGL_NO_STREAM_KHR; return false; -- cgit v1.2.3 From 3e9fe00c4e4ae4c096a960b4a3b432fca546007a Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 6 Aug 2019 16:19:01 +0200 Subject: Fix Qt6 build Modify all the qmlRegisterModule calls to use minor version 15 because minor version zero from 6.0.0 would make tests fail. This is similar to what was done in qtdeclarative in c147b20a2c1299b2d659fe7c9472ae3866b6a425. Change-Id: I62081374f1cd2a6afde2d5e0654755a62897d6fb Reviewed-by: Simon Hausmann --- src/imports/compositor/qwaylandquickcompositorplugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/imports/compositor/qwaylandquickcompositorplugin.cpp b/src/imports/compositor/qwaylandquickcompositorplugin.cpp index 949d2cfaa..93bab1790 100644 --- a/src/imports/compositor/qwaylandquickcompositorplugin.cpp +++ b/src/imports/compositor/qwaylandquickcompositorplugin.cpp @@ -130,9 +130,9 @@ public: static void defineModule(const char *uri) { - // This is needed so to guarantee that the import is available with the current - // Qt minor version even if no new types have been added since the last release. - qmlRegisterModule(uri, 1, QT_VERSION_MINOR); + // The minor version used to be the current Qt 5 minor. For compatibility it is the last + // Qt 5 release. + qmlRegisterModule(uri, 1, 15); qmlRegisterType(uri, 1, 0, "WaylandCompositor"); qmlRegisterType(uri, 1, 0, "WaylandQuickItem"); -- cgit v1.2.3