diff options
-rw-r--r-- | vcl/inc/qt5/Qt5VirtualDevice.hxx | 4 | ||||
-rw-r--r-- | vcl/qt5/Qt5VirtualDevice.cxx | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/vcl/inc/qt5/Qt5VirtualDevice.hxx b/vcl/inc/qt5/Qt5VirtualDevice.hxx index 89251c96d783..ad0dc3c3c804 100644 --- a/vcl/inc/qt5/Qt5VirtualDevice.hxx +++ b/vcl/inc/qt5/Qt5VirtualDevice.hxx @@ -22,7 +22,7 @@ #include <salvd.hxx> #include <memory> -#include <list> +#include <vector> #include <QtCore/QSize> @@ -32,7 +32,7 @@ enum class DeviceFormat; class Qt5VirtualDevice final : public SalVirtualDevice { - std::list<Qt5Graphics*> m_aGraphics; + std::vector<Qt5Graphics*> m_aGraphics; std::unique_ptr<QImage> m_pImage; DeviceFormat m_eFormat; QSize m_aFrameSize; diff --git a/vcl/qt5/Qt5VirtualDevice.cxx b/vcl/qt5/Qt5VirtualDevice.cxx index f1c7d9606c8f..10b2066ccbf6 100644 --- a/vcl/qt5/Qt5VirtualDevice.cxx +++ b/vcl/qt5/Qt5VirtualDevice.cxx @@ -40,7 +40,9 @@ SalGraphics* Qt5VirtualDevice::AcquireGraphics() void Qt5VirtualDevice::ReleaseGraphics(SalGraphics* pGraphics) { - m_aGraphics.remove(dynamic_cast<Qt5Graphics*>(pGraphics)); + m_aGraphics.erase( + std::remove(m_aGraphics.begin(), m_aGraphics.end(), dynamic_cast<Qt5Graphics*>(pGraphics)), + m_aGraphics.end()); delete pGraphics; } |