From d18449c74327a8883ce0d7a80592255dbc70e864 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 17 Mar 2020 15:56:54 +0100 Subject: [PATCH] Fix build with Qt 5.12, Qt::hex and Qt::endl --- plugins/platforms/drm/drm_backend.cpp | 13 +++++++++---- plugins/platforms/x11/standalone/glxbackend.cpp | 9 ++++++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/plugins/platforms/drm/drm_backend.cpp b/plugins/platforms/drm/drm_backend.cpp index 08811b053c..fadd238ab3 100644 --- a/plugins/platforms/drm/drm_backend.cpp +++ b/plugins/platforms/drm/drm_backend.cpp @@ -781,11 +781,16 @@ QString DrmBackend::supportInformation() const QString supportInfo; QDebug s(&supportInfo); s.nospace(); - s << "Name: " << "DRM" << Qt::endl; - s << "Active: " << m_active << Qt::endl; - s << "Atomic Mode Setting: " << m_atomicModeSetting << Qt::endl; + +#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) + using Qt::endl; +#endif + + s << "Name: " << "DRM" << endl; + s << "Active: " << m_active << endl; + s << "Atomic Mode Setting: " << m_atomicModeSetting << endl; #if HAVE_EGL_STREAMS - s << "Using EGL Streams: " << m_useEglStreams << Qt::endl; + s << "Using EGL Streams: " << m_useEglStreams << endl; #endif return supportInfo; } diff --git a/plugins/platforms/x11/standalone/glxbackend.cpp b/plugins/platforms/x11/standalone/glxbackend.cpp index 1ea6d4e6b9..6d9a4879de 100644 --- a/plugins/platforms/x11/standalone/glxbackend.cpp +++ b/plugins/platforms/x11/standalone/glxbackend.cpp @@ -572,8 +572,11 @@ FBConfigInfo *GlxBackend::infoForVisual(xcb_visualid_t visual) const xcb_render_pictformat_t format = XRenderUtils::findPictFormat(visual); const xcb_render_directformat_t *direct = XRenderUtils::findPictFormatInfo(format); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) + using Qt::hex; +#endif if (!direct) { - qCCritical(KWIN_X11STANDALONE).nospace() << "Could not find a picture format for visual 0x" << Qt::hex << visual; + qCCritical(KWIN_X11STANDALONE).nospace() << "Could not find a picture format for visual 0x" << hex << visual; return info; } @@ -607,7 +610,7 @@ FBConfigInfo *GlxBackend::infoForVisual(xcb_visualid_t visual) GLXFBConfig *configs = glXChooseFBConfig(display(), DefaultScreen(display()), attribs, &count); if (count < 1) { - qCCritical(KWIN_X11STANDALONE).nospace() << "Could not find a framebuffer configuration for visual 0x" << Qt::hex << visual; + qCCritical(KWIN_X11STANDALONE).nospace() << "Could not find a framebuffer configuration for visual 0x" << hex << visual; return info; } @@ -689,7 +692,7 @@ FBConfigInfo *GlxBackend::infoForVisual(xcb_visualid_t visual) glXGetFBConfigAttrib(display(), info->fbconfig, GLX_FBCONFIG_ID, &fbc_id); glXGetFBConfigAttrib(display(), info->fbconfig, GLX_VISUAL_ID, &visual_id); - qCDebug(KWIN_X11STANDALONE).nospace() << "Using FBConfig 0x" << Qt::hex << fbc_id << " for visual 0x" << Qt::hex << visual_id; + qCDebug(KWIN_X11STANDALONE).nospace() << "Using FBConfig 0x" << hex << fbc_id << " for visual 0x" << hex << visual_id; } return info;