diff --git a/src/backends/drm/egl_gbm_layer.cpp b/src/backends/drm/egl_gbm_layer.cpp index 45b4a838ae..a992ae15bd 100644 --- a/src/backends/drm/egl_gbm_layer.cpp +++ b/src/backends/drm/egl_gbm_layer.cpp @@ -133,7 +133,7 @@ bool EglGbmLayer::endRendering(const QRegion &damagedRegion) m_currentBuffer = buffer; m_currentDamage = damagedRegion; } - return buffer; + return !buffer.isNull(); } QRegion EglGbmLayer::currentDamage() const diff --git a/src/backends/wayland/wayland_backend.cpp b/src/backends/wayland/wayland_backend.cpp index d0ddc05250..55e1e1a169 100644 --- a/src/backends/wayland/wayland_backend.cpp +++ b/src/backends/wayland/wayland_backend.cpp @@ -387,12 +387,12 @@ void WaylandInputDevice::setLeds(LEDs leds) bool WaylandInputDevice::isKeyboard() const { - return m_keyboard; + return !m_keyboard.isNull(); } bool WaylandInputDevice::isAlphaNumericKeyboard() const { - return m_keyboard; + return !m_keyboard.isNull(); } bool WaylandInputDevice::isPointer() const @@ -407,7 +407,7 @@ bool WaylandInputDevice::isTouchpad() const bool WaylandInputDevice::isTouch() const { - return m_touch; + return !m_touch.isNull(); } bool WaylandInputDevice::isTabletTool() const diff --git a/src/effects/screenshot/screenshotdbusinterface1.cpp b/src/effects/screenshot/screenshotdbusinterface1.cpp index 7d00156bcd..74464f6dce 100644 --- a/src/effects/screenshot/screenshotdbusinterface1.cpp +++ b/src/effects/screenshot/screenshotdbusinterface1.cpp @@ -783,7 +783,7 @@ QString ScreenShotDBusInterface1::screenshotArea(int x, int y, int width, int he bool ScreenShotDBusInterface1::isTakingScreenshot() const { - return m_source; + return !m_source.isNull(); } void ScreenShotDBusInterface1::showInfoMessage(InfoMessageMode mode) diff --git a/src/libkwineffects/kwinoffscreenquickview.cpp b/src/libkwineffects/kwinoffscreenquickview.cpp index aeb6269c32..a6526f2ed6 100644 --- a/src/libkwineffects/kwinoffscreenquickview.cpp +++ b/src/libkwineffects/kwinoffscreenquickview.cpp @@ -237,7 +237,7 @@ void OffscreenQuickView::update() return; } - bool usingGl = d->m_glcontext; + bool usingGl = !d->m_glcontext.isNull(); if (usingGl) { if (!d->m_glcontext->makeCurrent(d->m_offscreenSurface.data())) { diff --git a/src/platformsupport/scenes/opengl/openglsurfacetexture.cpp b/src/platformsupport/scenes/opengl/openglsurfacetexture.cpp index 8a950ce17f..07a71ec576 100644 --- a/src/platformsupport/scenes/opengl/openglsurfacetexture.cpp +++ b/src/platformsupport/scenes/opengl/openglsurfacetexture.cpp @@ -21,7 +21,7 @@ OpenGLSurfaceTexture::~OpenGLSurfaceTexture() bool OpenGLSurfaceTexture::isValid() const { - return m_texture; + return !m_texture.isNull(); } OpenGLBackend *OpenGLSurfaceTexture::backend() const diff --git a/src/plugins/screencast/screencaststream.cpp b/src/plugins/screencast/screencaststream.cpp index bb095867aa..531decc1ec 100644 --- a/src/plugins/screencast/screencaststream.cpp +++ b/src/plugins/screencast/screencaststream.cpp @@ -284,7 +284,7 @@ bool ScreenCastStream::createStream() int n_params; auto canCreateDmaBuf = [this] () -> bool { - return QSharedPointer(kwinApp()->platform()->createDmaBufTexture(m_resolution)); + return !QSharedPointer(kwinApp()->platform()->createDmaBufTexture(m_resolution)).isNull(); }; const auto format = m_source->hasAlphaChannel() ? SPA_VIDEO_FORMAT_BGRA : SPA_VIDEO_FORMAT_BGR;