From 55a80035ef694de652e8cdc3546c9f5844a68f10 Mon Sep 17 00:00:00 2001 From: =?utf8?q?CHEMIN=20S=C3=A9bastien=20236498?= Date: Thu, 30 May 2024 12:10:22 +0200 Subject: [PATCH] Replace std::shared_ptr by QSharedPointer --- src/QtViewer/QtViewer_ViewPort.cxx | 4 ++-- src/QtViewer/QtViewer_ViewPort.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/QtViewer/QtViewer_ViewPort.cxx b/src/QtViewer/QtViewer_ViewPort.cxx index b741c4b2f..44402b418 100644 --- a/src/QtViewer/QtViewer_ViewPort.cxx +++ b/src/QtViewer/QtViewer_ViewPort.cxx @@ -78,7 +78,7 @@ QtViewer_ViewPort::~QtViewer_ViewPort() void QtViewer_ViewPort::resetForeground() { - for (std::shared_ptr obj : foregroundObjects) + for (QSharedPointer obj : foregroundObjects) obj.reset(); foregroundObjects.clear(); @@ -88,7 +88,7 @@ void QtViewer_ViewPort::drawForeground(QPainter *painter, const QRectF &rect) { Q_UNUSED(rect); - for (std::shared_ptr obj : foregroundObjects) + for (QSharedPointer obj : foregroundObjects) obj->draw(painter); } diff --git a/src/QtViewer/QtViewer_ViewPort.h b/src/QtViewer/QtViewer_ViewPort.h index 200ea383d..2749f9dd0 100644 --- a/src/QtViewer/QtViewer_ViewPort.h +++ b/src/QtViewer/QtViewer_ViewPort.h @@ -59,7 +59,7 @@ public: QImage dumpView(bool theWholeScene = false, QSizeF theSize = QSizeF()); bool dumpViewToFormat(const QString& fileName, const QString& format); - void addForegroundObject( std::shared_ptr obj) { foregroundObjects.append(obj); } + void addForegroundObject( QSharedPointer obj) { foregroundObjects.append(obj); } void resetForeground(); signals: @@ -96,7 +96,7 @@ private: QPoint previousPos; QCursor* zoomCursor; - QList > foregroundObjects; + QList > foregroundObjects; }; #endif -- 2.39.2