Don't rely on implicit QScopedPointer to bool conversion
No longer available in Qt6.
This commit is contained in:
parent
1fd1c03742
commit
9d9e89fb84
6 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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())) {
|
||||
|
|
|
@ -21,7 +21,7 @@ OpenGLSurfaceTexture::~OpenGLSurfaceTexture()
|
|||
|
||||
bool OpenGLSurfaceTexture::isValid() const
|
||||
{
|
||||
return m_texture;
|
||||
return !m_texture.isNull();
|
||||
}
|
||||
|
||||
OpenGLBackend *OpenGLSurfaceTexture::backend() const
|
||||
|
|
|
@ -284,7 +284,7 @@ bool ScreenCastStream::createStream()
|
|||
int n_params;
|
||||
|
||||
auto canCreateDmaBuf = [this] () -> bool {
|
||||
return QSharedPointer<DmaBufTexture>(kwinApp()->platform()->createDmaBufTexture(m_resolution));
|
||||
return !QSharedPointer<DmaBufTexture>(kwinApp()->platform()->createDmaBufTexture(m_resolution)).isNull();
|
||||
};
|
||||
const auto format = m_source->hasAlphaChannel() ? SPA_VIDEO_FORMAT_BGRA : SPA_VIDEO_FORMAT_BGR;
|
||||
|
||||
|
|
Loading…
Reference in a new issue