summaryrefslogtreecommitdiff
path: root/vcl/qt5/Qt5Graphics_GDI.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-08 12:29:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-14 11:50:00 +0200
commit8447d31e529985ef7fc71933f0e55685530f9fc9 (patch)
treec8f01ee85837024482ab77c8770c8bca442ddd06 /vcl/qt5/Qt5Graphics_GDI.cxx
parent1cf27cb44380f4a2bd6778c2dbbdef2a2a00cbc8 (diff)
return SalBitmap using std::shared_ptr
since we hold it like that in Bitmap anyway Change-Id: I6264dfaaae6210cb008df5db8a421fc80c508f5b Reviewed-on: https://gerrit.libreoffice.org/55458 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/qt5/Qt5Graphics_GDI.cxx')
-rw-r--r--vcl/qt5/Qt5Graphics_GDI.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx
index 43e54b8b1385..b58f18e4b59b 100644
--- a/vcl/qt5/Qt5Graphics_GDI.cxx
+++ b/vcl/qt5/Qt5Graphics_GDI.cxx
@@ -435,9 +435,9 @@ void Qt5Graphics::drawMask(const SalTwoRect& rPosAry, const SalBitmap& /*rSalBit
assert(rPosAry.mnSrcHeight == rPosAry.mnDestHeight);
}
-SalBitmap* Qt5Graphics::getBitmap(long nX, long nY, long nWidth, long nHeight)
+std::shared_ptr<SalBitmap> Qt5Graphics::getBitmap(long nX, long nY, long nWidth, long nHeight)
{
- return new Qt5Bitmap(m_pQImage->copy(nX, nY, nWidth, nHeight));
+ return std::make_shared<Qt5Bitmap>(m_pQImage->copy(nX, nY, nWidth, nHeight));
}
Color Qt5Graphics::getPixel(long nX, long nY) { return m_pQImage->pixel(nX, nY); }