]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Replace std::shared_ptr by QSharedPointer
authorCHEMIN Sébastien 236498 <sc236498@is245491.intra.cea.fr>
Thu, 30 May 2024 10:10:22 +0000 (12:10 +0200)
committerCHEMIN Sébastien 236498 <sc236498@is245491.intra.cea.fr>
Thu, 30 May 2024 10:10:22 +0000 (12:10 +0200)
src/QtViewer/QtViewer_ViewPort.cxx
src/QtViewer/QtViewer_ViewPort.h

index b741c4b2f140823b10ca6121a5853c12d3e66656..44402b4188d9271ff2c74ffffce07f9b797cd26e 100644 (file)
@@ -78,7 +78,7 @@ QtViewer_ViewPort::~QtViewer_ViewPort()
 
 void QtViewer_ViewPort::resetForeground()
 {
-  for (std::shared_ptr<QtViewer_PainterObject> obj : foregroundObjects)
+  for (QSharedPointer<QtViewer_PainterObject> 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<QtViewer_PainterObject> obj : foregroundObjects)
+  for (QSharedPointer<QtViewer_PainterObject> obj : foregroundObjects)
     obj->draw(painter);
 }
 
index 200ea383deac56d7bde0a181f423350bb72f9790..2749f9dd0c6b02bda2f2054725c999f5f956013a 100644 (file)
@@ -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<QtViewer_PainterObject> obj) { foregroundObjects.append(obj); }
+  void addForegroundObject( QSharedPointer<QtViewer_PainterObject> obj) { foregroundObjects.append(obj); }
   void resetForeground();
 
 signals:
@@ -96,7 +96,7 @@ private:
   QPoint previousPos;
   QCursor* zoomCursor;
 
-  QList<std::shared_ptr<QtViewer_PainterObject> > foregroundObjects;
+  QList<QSharedPointer<QtViewer_PainterObject> > foregroundObjects;
 };
 
 #endif