diff --git a/src/app/puzzle/carousel/vpcarrousel.cpp b/src/app/puzzle/carousel/vpcarrousel.cpp index e444a632b..229ab15a9 100644 --- a/src/app/puzzle/carousel/vpcarrousel.cpp +++ b/src/app/puzzle/carousel/vpcarrousel.cpp @@ -56,8 +56,8 @@ VPCarrousel::VPCarrousel(const VPLayoutPtr &layout, QWidget *parent) : connect(ui->comboBoxPieceList, QOverload::of(&QComboBox::currentIndexChanged), this, &VPCarrousel::on_ActivePieceListChanged); - connect(layout.get(), &VPLayout::ActiveSheetChanged, this, &VPCarrousel::on_ActiveSheetChanged); - connect(layout.get(), &VPLayout::SheetListChanged, this, &VPCarrousel::Refresh); + connect(layout.data(), &VPLayout::ActiveSheetChanged, this, &VPCarrousel::on_ActiveSheetChanged); + connect(layout.data(), &VPLayout::SheetListChanged, this, &VPCarrousel::Refresh); // ------ then we fill the carrousel with the layout content Refresh(); diff --git a/src/app/puzzle/layout/vplayout.cpp b/src/app/puzzle/layout/vplayout.cpp index 5ab67c09b..52160411f 100644 --- a/src/app/puzzle/layout/vplayout.cpp +++ b/src/app/puzzle/layout/vplayout.cpp @@ -243,7 +243,7 @@ auto VPLayout::AddSheet(const VPSheetPtr &sheet) -> VPSheetPtr if (not sheet.isNull() && GetSheet(sheet->Uuid()).isNull()) { m_sheets.append(sheet); - connect(this, &VPLayout::PieceTransformationChanged, sheet.get(), &VPSheet::CheckPiecePositionValidity); + connect(this, &VPLayout::PieceTransformationChanged, sheet.data(), &VPSheet::CheckPiecePositionValidity); } return sheet; } diff --git a/src/app/puzzle/layout/vpsheet.cpp b/src/app/puzzle/layout/vpsheet.cpp index 9d25ef565..907faea35 100644 --- a/src/app/puzzle/layout/vpsheet.cpp +++ b/src/app/puzzle/layout/vpsheet.cpp @@ -304,11 +304,11 @@ void VPSheetSceneData::ConnectPiece(VPGraphicsPiece *piece) return; } - QObject::connect(layout.get(), &VPLayout::PieceTransformationChanged, piece, + QObject::connect(layout.data(), &VPLayout::PieceTransformationChanged, piece, &VPGraphicsPiece::on_RefreshPiece); - QObject::connect(layout.get(), &VPLayout::PieceSelectionChanged, + QObject::connect(layout.data(), &VPLayout::PieceSelectionChanged, m_rotationControls, &VPGraphicsPieceControls::on_UpdateControls); - QObject::connect(layout.get(), &VPLayout::PiecePositionValidityChanged, + QObject::connect(layout.data(), &VPLayout::PiecePositionValidityChanged, piece, &VPGraphicsPiece::on_RefreshPiece); QObject::connect(piece, &VPGraphicsPiece::PieceTransformationChanged, m_rotationControls, &VPGraphicsPieceControls::on_UpdateControls); diff --git a/src/app/puzzle/scene/vpgraphicspiececontrols.cpp b/src/app/puzzle/scene/vpgraphicspiececontrols.cpp index 0e422e1ff..f90a5fd04 100644 --- a/src/app/puzzle/scene/vpgraphicspiececontrols.cpp +++ b/src/app/puzzle/scene/vpgraphicspiececontrols.cpp @@ -99,7 +99,7 @@ VPGraphicsTransformationOrigin::VPGraphicsTransformationOrigin(const VPLayoutPtr setZValue(1); setAcceptHoverEvents(true); - connect(layout.get(), &VPLayout::TransformationOriginChanged, this, + connect(layout.data(), &VPLayout::TransformationOriginChanged, this, &VPGraphicsTransformationOrigin::SetTransformationOrigin); } diff --git a/src/app/puzzle/scene/vpmaingraphicsview.cpp b/src/app/puzzle/scene/vpmaingraphicsview.cpp index 72b3bc4ab..364d43b41 100644 --- a/src/app/puzzle/scene/vpmaingraphicsview.cpp +++ b/src/app/puzzle/scene/vpmaingraphicsview.cpp @@ -72,8 +72,8 @@ VPMainGraphicsView::VPMainGraphicsView(const VPLayoutPtr &layout, QWidget *paren setAcceptDrops(true); // add the connections - connect(layout.get(), &VPLayout::PieceSheetChanged, this, &VPMainGraphicsView::on_PieceSheetChanged); - connect(layout.get(), &VPLayout::ActiveSheetChanged, this, &VPMainGraphicsView::on_ActiveSheetChanged); + connect(layout.data(), &VPLayout::PieceSheetChanged, this, &VPMainGraphicsView::on_PieceSheetChanged); + connect(layout.data(), &VPLayout::ActiveSheetChanged, this, &VPMainGraphicsView::on_ActiveSheetChanged); auto *restoreOrigin = new QAction(this); restoreOrigin->setShortcut(restoreOriginShortcut); diff --git a/src/app/puzzle/vpmainwindow.cpp b/src/app/puzzle/vpmainwindow.cpp index 42c16d2dc..316ef77c9 100644 --- a/src/app/puzzle/vpmainwindow.cpp +++ b/src/app/puzzle/vpmainwindow.cpp @@ -287,16 +287,16 @@ VPMainWindow::VPMainWindow(const VPCommandLinePtr &cmd, QWidget *parent) : { ui->setupUi(this); - connect(m_layout.get(), &VPLayout::PieceSelectionChanged, this, &VPMainWindow::on_PieceSelectionChanged); - connect(m_layout.get(), &VPLayout::LayoutChanged, this, [this]() + connect(m_layout.data(), &VPLayout::PieceSelectionChanged, this, &VPMainWindow::on_PieceSelectionChanged); + connect(m_layout.data(), &VPLayout::LayoutChanged, this, [this]() { LayoutWasSaved(false); }); - connect(m_layout.get(), &VPLayout::PieceTransformationChanged, this, [this]() + connect(m_layout.data(), &VPLayout::PieceTransformationChanged, this, [this]() { SetPropertyTabCurrentPieceData(); }); - connect(m_layout.get(), &VPLayout::ActiveSheetChanged, this, [this]() + connect(m_layout.data(), &VPLayout::ActiveSheetChanged, this, [this]() { m_layout->TileFactory()->refreshTileInfos(); m_graphicsView->RefreshLayout(); @@ -1582,7 +1582,7 @@ void VPMainWindow::InitMainGraphics() connect(m_graphicsView, &VPMainGraphicsView::ScaleChanged, this, &VPMainWindow::on_ScaleChanged); connect(m_graphicsView, &VPMainGraphicsView::mouseMove, this, &VPMainWindow::on_MouseMoved); - connect(m_layout.get(), &VPLayout::PieceSheetChanged, m_carrousel, &VPCarrousel::Refresh); + connect(m_layout.data(), &VPLayout::PieceSheetChanged, m_carrousel, &VPCarrousel::Refresh); } //--------------------------------------------------------------------------------------------------------------------- @@ -1860,8 +1860,8 @@ auto VPMainWindow::IsLayoutReadOnly() const -> bool void VPMainWindow::ConnectToPreferences(const QSharedPointer &preferences) { // Must be first - connect(preferences.get(), &DialogPuzzlePreferences::UpdateProperties, this, &VPMainWindow::WindowsLocale); - connect(preferences.get(), &DialogPuzzlePreferences::UpdateProperties, this, &VPMainWindow::ToolBarStyles); + connect(preferences.data(), &DialogPuzzlePreferences::UpdateProperties, this, &VPMainWindow::WindowsLocale); + connect(preferences.data(), &DialogPuzzlePreferences::UpdateProperties, this, &VPMainWindow::ToolBarStyles); } //---------------------------------------------------------------------------------------------------------------------