Fix build.

develop
Roman Telezhynskyi 2021-09-13 18:19:39 +03:00
parent eff295ccaf
commit f7974273fa
6 changed files with 16 additions and 16 deletions

View File

@ -56,8 +56,8 @@ VPCarrousel::VPCarrousel(const VPLayoutPtr &layout, QWidget *parent) :
connect(ui->comboBoxPieceList, QOverload<int>::of(&QComboBox::currentIndexChanged), this, connect(ui->comboBoxPieceList, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
&VPCarrousel::on_ActivePieceListChanged); &VPCarrousel::on_ActivePieceListChanged);
connect(layout.get(), &VPLayout::ActiveSheetChanged, this, &VPCarrousel::on_ActiveSheetChanged); connect(layout.data(), &VPLayout::ActiveSheetChanged, this, &VPCarrousel::on_ActiveSheetChanged);
connect(layout.get(), &VPLayout::SheetListChanged, this, &VPCarrousel::Refresh); connect(layout.data(), &VPLayout::SheetListChanged, this, &VPCarrousel::Refresh);
// ------ then we fill the carrousel with the layout content // ------ then we fill the carrousel with the layout content
Refresh(); Refresh();

View File

@ -243,7 +243,7 @@ auto VPLayout::AddSheet(const VPSheetPtr &sheet) -> VPSheetPtr
if (not sheet.isNull() && GetSheet(sheet->Uuid()).isNull()) if (not sheet.isNull() && GetSheet(sheet->Uuid()).isNull())
{ {
m_sheets.append(sheet); m_sheets.append(sheet);
connect(this, &VPLayout::PieceTransformationChanged, sheet.get(), &VPSheet::CheckPiecePositionValidity); connect(this, &VPLayout::PieceTransformationChanged, sheet.data(), &VPSheet::CheckPiecePositionValidity);
} }
return sheet; return sheet;
} }

View File

@ -304,11 +304,11 @@ void VPSheetSceneData::ConnectPiece(VPGraphicsPiece *piece)
return; return;
} }
QObject::connect(layout.get(), &VPLayout::PieceTransformationChanged, piece, QObject::connect(layout.data(), &VPLayout::PieceTransformationChanged, piece,
&VPGraphicsPiece::on_RefreshPiece); &VPGraphicsPiece::on_RefreshPiece);
QObject::connect(layout.get(), &VPLayout::PieceSelectionChanged, QObject::connect(layout.data(), &VPLayout::PieceSelectionChanged,
m_rotationControls, &VPGraphicsPieceControls::on_UpdateControls); m_rotationControls, &VPGraphicsPieceControls::on_UpdateControls);
QObject::connect(layout.get(), &VPLayout::PiecePositionValidityChanged, QObject::connect(layout.data(), &VPLayout::PiecePositionValidityChanged,
piece, &VPGraphicsPiece::on_RefreshPiece); piece, &VPGraphicsPiece::on_RefreshPiece);
QObject::connect(piece, &VPGraphicsPiece::PieceTransformationChanged, QObject::connect(piece, &VPGraphicsPiece::PieceTransformationChanged,
m_rotationControls, &VPGraphicsPieceControls::on_UpdateControls); m_rotationControls, &VPGraphicsPieceControls::on_UpdateControls);

View File

@ -99,7 +99,7 @@ VPGraphicsTransformationOrigin::VPGraphicsTransformationOrigin(const VPLayoutPtr
setZValue(1); setZValue(1);
setAcceptHoverEvents(true); setAcceptHoverEvents(true);
connect(layout.get(), &VPLayout::TransformationOriginChanged, this, connect(layout.data(), &VPLayout::TransformationOriginChanged, this,
&VPGraphicsTransformationOrigin::SetTransformationOrigin); &VPGraphicsTransformationOrigin::SetTransformationOrigin);
} }

View File

@ -72,8 +72,8 @@ VPMainGraphicsView::VPMainGraphicsView(const VPLayoutPtr &layout, QWidget *paren
setAcceptDrops(true); setAcceptDrops(true);
// add the connections // add the connections
connect(layout.get(), &VPLayout::PieceSheetChanged, this, &VPMainGraphicsView::on_PieceSheetChanged); connect(layout.data(), &VPLayout::PieceSheetChanged, this, &VPMainGraphicsView::on_PieceSheetChanged);
connect(layout.get(), &VPLayout::ActiveSheetChanged, this, &VPMainGraphicsView::on_ActiveSheetChanged); connect(layout.data(), &VPLayout::ActiveSheetChanged, this, &VPMainGraphicsView::on_ActiveSheetChanged);
auto *restoreOrigin = new QAction(this); auto *restoreOrigin = new QAction(this);
restoreOrigin->setShortcut(restoreOriginShortcut); restoreOrigin->setShortcut(restoreOriginShortcut);

View File

@ -287,16 +287,16 @@ VPMainWindow::VPMainWindow(const VPCommandLinePtr &cmd, QWidget *parent) :
{ {
ui->setupUi(this); ui->setupUi(this);
connect(m_layout.get(), &VPLayout::PieceSelectionChanged, this, &VPMainWindow::on_PieceSelectionChanged); connect(m_layout.data(), &VPLayout::PieceSelectionChanged, this, &VPMainWindow::on_PieceSelectionChanged);
connect(m_layout.get(), &VPLayout::LayoutChanged, this, [this]() connect(m_layout.data(), &VPLayout::LayoutChanged, this, [this]()
{ {
LayoutWasSaved(false); LayoutWasSaved(false);
}); });
connect(m_layout.get(), &VPLayout::PieceTransformationChanged, this, [this]() connect(m_layout.data(), &VPLayout::PieceTransformationChanged, this, [this]()
{ {
SetPropertyTabCurrentPieceData(); SetPropertyTabCurrentPieceData();
}); });
connect(m_layout.get(), &VPLayout::ActiveSheetChanged, this, [this]() connect(m_layout.data(), &VPLayout::ActiveSheetChanged, this, [this]()
{ {
m_layout->TileFactory()->refreshTileInfos(); m_layout->TileFactory()->refreshTileInfos();
m_graphicsView->RefreshLayout(); m_graphicsView->RefreshLayout();
@ -1582,7 +1582,7 @@ void VPMainWindow::InitMainGraphics()
connect(m_graphicsView, &VPMainGraphicsView::ScaleChanged, this, &VPMainWindow::on_ScaleChanged); connect(m_graphicsView, &VPMainGraphicsView::ScaleChanged, this, &VPMainWindow::on_ScaleChanged);
connect(m_graphicsView, &VPMainGraphicsView::mouseMove, this, &VPMainWindow::on_MouseMoved); 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<DialogPuzzlePreferences> &preferences) void VPMainWindow::ConnectToPreferences(const QSharedPointer<DialogPuzzlePreferences> &preferences)
{ {
// Must be first // Must be first
connect(preferences.get(), &DialogPuzzlePreferences::UpdateProperties, this, &VPMainWindow::WindowsLocale); connect(preferences.data(), &DialogPuzzlePreferences::UpdateProperties, this, &VPMainWindow::WindowsLocale);
connect(preferences.get(), &DialogPuzzlePreferences::UpdateProperties, this, &VPMainWindow::ToolBarStyles); connect(preferences.data(), &DialogPuzzlePreferences::UpdateProperties, this, &VPMainWindow::ToolBarStyles);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------