From 84aa8155cea762feab62a9658895633e40122e78 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 1 Feb 2023 16:20:39 +0100 Subject: [PATCH] Part: replace slots with member function pointers --- src/Mod/Part/Gui/TaskDimension.cpp | 12 ++++++------ src/Mod/Part/Gui/TaskSweep.cpp | 2 +- src/Mod/Part/Gui/ViewProviderMirror.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Mod/Part/Gui/TaskDimension.cpp b/src/Mod/Part/Gui/TaskDimension.cpp index a6c05467fd..7e7dcb197c 100644 --- a/src/Mod/Part/Gui/TaskDimension.cpp +++ b/src/Mod/Part/Gui/TaskDimension.cpp @@ -572,7 +572,7 @@ void PartGui::TaskMeasureLinear::onSelectionChanged(const Gui::SelectionChanges& newSelection.z = msg.z; selections1.selections.clear();//we only want one item. selections1.selections.push_back(newSelection); - QTimer::singleShot(0, this, SLOT(selectionClearDelayedSlot())); + QTimer::singleShot(0, this, &PartGui::TaskMeasureLinear::selectionClearDelayedSlot); stepped->getButton(1)->setEnabled(true); stepped->getButton(1)->setChecked(true); return; @@ -594,7 +594,7 @@ void PartGui::TaskMeasureLinear::onSelectionChanged(const Gui::SelectionChanges& selections2.selections.push_back(newSelection); buildDimension(); clearSelectionStrings(); - QTimer::singleShot(0, this, SLOT(selectionClearDelayedSlot())); + QTimer::singleShot(0, this, &PartGui::TaskMeasureLinear::selectionClearDelayedSlot); stepped->getButton(0)->setChecked(true); stepped->getButton(1)->setEnabled(false); return; @@ -1597,7 +1597,7 @@ void PartGui::TaskMeasureAngular::onSelectionChanged(const Gui::SelectionChanges assert(selections1.selections.at(0).shapeType == DimSelections::Vertex); assert(selections1.selections.at(1).shapeType == DimSelections::Vertex); - QTimer::singleShot(0, this, SLOT(selectionClearDelayedSlot())); + QTimer::singleShot(0, this, &PartGui::TaskMeasureAngular::selectionClearDelayedSlot); stepped->getButton(1)->setEnabled(true); stepped->getButton(1)->setChecked(true); return; @@ -1618,7 +1618,7 @@ void PartGui::TaskMeasureAngular::onSelectionChanged(const Gui::SelectionChanges selections1.selections.push_back(newSelection); } - QTimer::singleShot(0, this, SLOT(selectionClearDelayedSlot())); + QTimer::singleShot(0, this, &PartGui::TaskMeasureAngular::selectionClearDelayedSlot); stepped->getButton(1)->setEnabled(true); stepped->getButton(1)->setChecked(true); return; @@ -1651,7 +1651,7 @@ void PartGui::TaskMeasureAngular::onSelectionChanged(const Gui::SelectionChanges buildDimension(); clearSelection(); - QTimer::singleShot(0, this, SLOT(selectionClearDelayedSlot())); + QTimer::singleShot(0, this, &PartGui::TaskMeasureAngular::selectionClearDelayedSlot); stepped->getButton(0)->setChecked(true); stepped->getButton(1)->setEnabled(false); return; @@ -1673,7 +1673,7 @@ void PartGui::TaskMeasureAngular::onSelectionChanged(const Gui::SelectionChanges buildDimension(); clearSelection(); - QTimer::singleShot(0, this, SLOT(selectionClearDelayedSlot())); + QTimer::singleShot(0, this, &PartGui::TaskMeasureAngular::selectionClearDelayedSlot); stepped->getButton(0)->setChecked(true); stepped->getButton(1)->setEnabled(false); return; diff --git a/src/Mod/Part/Gui/TaskSweep.cpp b/src/Mod/Part/Gui/TaskSweep.cpp index c93ebd47f7..8c83251308 100644 --- a/src/Mod/Part/Gui/TaskSweep.cpp +++ b/src/Mod/Part/Gui/TaskSweep.cpp @@ -492,7 +492,7 @@ void TaskSweep::clicked(int id) } label->show(); - QTimer::singleShot(3000, label, SLOT(hide())); + QTimer::singleShot(3000, label, &Gui::StatusWidget::hide); } } diff --git a/src/Mod/Part/Gui/ViewProviderMirror.cpp b/src/Mod/Part/Gui/ViewProviderMirror.cpp index d9287b8ea5..f9210f9042 100644 --- a/src/Mod/Part/Gui/ViewProviderMirror.cpp +++ b/src/Mod/Part/Gui/ViewProviderMirror.cpp @@ -659,7 +659,7 @@ void ViewProviderThickness::unsetEdit(int ModNum) { if (ModNum == ViewProvider::Default) { // when pressing ESC make sure to close the dialog - QTimer::singleShot(0, &Gui::Control(), SLOT(closeDialog())); + QTimer::singleShot(0, &Gui::Control(), &Gui::ControlSingleton::closeDialog); } else { PartGui::ViewProviderPart::unsetEdit(ModNum);