summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-08 12:36:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-10 12:02:44 +0200
commit366d08f2f6d4de922f6099c62bb81b49d89e0a68 (patch)
treeb232884af6e844c2f0994859e4b42efbc1ce654c /vcl/qt5
parent75a2257a5bd716a9f937abe5e53f305c983afd5d (diff)
new loplugin:simplifypointertobool
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/Qt5Bitmap.cxx18
-rw-r--r--vcl/qt5/Qt5Frame.cxx4
2 files changed, 11 insertions, 11 deletions
diff --git a/vcl/qt5/Qt5Bitmap.cxx b/vcl/qt5/Qt5Bitmap.cxx
index b698046ae307..01c6ebc4dd2b 100644
--- a/vcl/qt5/Qt5Bitmap.cxx
+++ b/vcl/qt5/Qt5Bitmap.cxx
@@ -71,7 +71,7 @@ bool Qt5Bitmap::Create(const Size& rSize, sal_uInt16 nBitCount, const BitmapPale
m_aPalette = rPal;
auto count = rPal.GetEntryCount();
- if (nBitCount != 4 && count && m_pImage.get())
+ if (nBitCount != 4 && count && m_pImage)
{
QVector<QRgb> aColorTable(count);
for (unsigned i = 0; i < count; ++i)
@@ -84,7 +84,7 @@ bool Qt5Bitmap::Create(const Size& rSize, sal_uInt16 nBitCount, const BitmapPale
bool Qt5Bitmap::Create(const SalBitmap& rSalBmp)
{
const Qt5Bitmap* pBitmap = static_cast<const Qt5Bitmap*>(&rSalBmp);
- if (pBitmap->m_pImage.get())
+ if (pBitmap->m_pImage)
{
m_pImage.reset(new QImage(*pBitmap->m_pImage));
m_pBuffer.reset();
@@ -124,7 +124,7 @@ bool Qt5Bitmap::Create(const SalBitmap& rSalBmp, sal_uInt16 nNewBitCount)
&& "Unsupported BitCount!");
const Qt5Bitmap* pBitmap = static_cast<const Qt5Bitmap*>(&rSalBmp);
- if (pBitmap->m_pBuffer.get())
+ if (pBitmap->m_pBuffer)
{
if (nNewBitCount != 32)
return false;
@@ -188,18 +188,18 @@ void Qt5Bitmap::Destroy()
Size Qt5Bitmap::GetSize() const
{
- if (m_pBuffer.get())
+ if (m_pBuffer)
return m_aSize;
- else if (m_pImage.get())
+ else if (m_pImage)
return toSize(m_pImage->size());
return Size();
}
sal_uInt16 Qt5Bitmap::GetBitCount() const
{
- if (m_pBuffer.get())
+ if (m_pBuffer)
return 4;
- else if (m_pImage.get())
+ else if (m_pImage)
return getFormatBits(m_pImage->format());
return 0;
}
@@ -208,12 +208,12 @@ BitmapBuffer* Qt5Bitmap::AcquireBuffer(BitmapAccessMode /*nMode*/)
{
static const BitmapPalette aEmptyPalette;
- if (!(m_pImage.get() || m_pBuffer.get()))
+ if (!(m_pImage || m_pBuffer))
return nullptr;
BitmapBuffer* pBuffer = new BitmapBuffer;
- if (m_pBuffer.get())
+ if (m_pBuffer)
{
pBuffer->mnWidth = m_aSize.Width();
pBuffer->mnHeight = m_aSize.Height();
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 2d780c7bd4ee..daa930ff6b82 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -308,7 +308,7 @@ SalGraphics* Qt5Frame::AcquireGraphics()
if (m_bUseCairo)
{
- if (!m_pOurSvpGraphics.get() || m_bGraphicsInvalid)
+ if (!m_pOurSvpGraphics || m_bGraphicsInvalid)
{
m_pOurSvpGraphics.reset(new Qt5SvpGraphics(this));
InitQt5SvpGraphics(m_pOurSvpGraphics.get());
@@ -318,7 +318,7 @@ SalGraphics* Qt5Frame::AcquireGraphics()
}
else
{
- if (!m_pQt5Graphics.get() || m_bGraphicsInvalid)
+ if (!m_pQt5Graphics || m_bGraphicsInvalid)
{
m_pQt5Graphics.reset(new Qt5Graphics(this));
m_pQImage.reset(