From: CHEMIN Sébastien 236498 Date: Thu, 30 May 2024 10:10:22 +0000 (+0200) Subject: Replace std::shared_ptr by QSharedPointer X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=55a80035ef694de652e8cdc3546c9f5844a68f10;p=modules%2Fgui.git Replace std::shared_ptr by QSharedPointer --- 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