From 965d143be37fdeb571dbb94c14217271a2f2e074 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Sun, 11 Jun 2023 19:04:47 +0200 Subject: [PATCH] Sketcher: unused variable fixes --- src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h | 4 ++-- src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfEllipse.h | 2 +- src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfHyperbola.h | 2 +- src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfParabola.h | 2 +- src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h | 8 ++++---- .../Gui/DrawSketchHandlerBSplineByInterpolation.h | 8 ++++---- src/Mod/Sketcher/Gui/DrawSketchHandlerCarbonCopy.h | 2 +- src/Mod/Sketcher/Gui/DrawSketchHandlerCircle.h | 4 ++-- src/Mod/Sketcher/Gui/DrawSketchHandlerEllipse.h | 2 +- src/Mod/Sketcher/Gui/DrawSketchHandlerExtend.h | 2 +- src/Mod/Sketcher/Gui/DrawSketchHandlerExternal.h | 2 +- src/Mod/Sketcher/Gui/DrawSketchHandlerLine.h | 2 +- src/Mod/Sketcher/Gui/DrawSketchHandlerLineSet.h | 4 ++-- src/Mod/Sketcher/Gui/DrawSketchHandlerPoint.h | 2 +- src/Mod/Sketcher/Gui/DrawSketchHandlerPolygon.h | 2 +- src/Mod/Sketcher/Gui/DrawSketchHandlerRectangle.h | 4 ++-- src/Mod/Sketcher/Gui/DrawSketchHandlerSlot.h | 2 +- src/Mod/Sketcher/Gui/DrawSketchHandlerSplitting.h | 2 +- src/Mod/Sketcher/Gui/DrawSketchHandlerTrimming.h | 2 +- src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp | 4 ++-- 20 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h index 292be97f42..6e4b7219d4 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h @@ -193,7 +193,7 @@ public: Gui::Command::commitCommand(); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Failed to add arc")); @@ -465,7 +465,7 @@ public: Gui::Command::commitCommand(); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Failed to add arc")); diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfEllipse.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfEllipse.h index 21bd951be6..01b504889b 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfEllipse.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfEllipse.h @@ -315,7 +315,7 @@ public: Gui::cmdAppObjectArgs( sketchgui->getObject(), "exposeInternalGeometry(%d)", currentgeoid); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError( sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfHyperbola.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfHyperbola.h index 8ce665f50b..9e8ae862f5 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfHyperbola.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfHyperbola.h @@ -323,7 +323,7 @@ public: Gui::cmdAppObjectArgs( sketchgui->getObject(), "exposeInternalGeometry(%d)", currentgeoid); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError( sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfParabola.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfParabola.h index fb65154f8a..1c89c7d9ad 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfParabola.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfParabola.h @@ -253,7 +253,7 @@ public: Gui::cmdAppObjectArgs( sketchgui->getObject(), "exposeInternalGeometry(%d)", currentgeoid); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError( sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h index 7a14bc1ef4..33e55c3310 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h @@ -123,7 +123,7 @@ public: poleGeoIds.back(), 1.0);// First pole defaults to 1.0 weight } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Error adding B-Spline pole")); @@ -199,7 +199,7 @@ public: poleGeoIds[0], poleGeoIds.back()); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError( sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), @@ -300,7 +300,7 @@ public: drawControlPolygonToPosition(prevCursorPosition); drawCursorToPosition(prevCursorPosition); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Error deleting last pole")); @@ -512,7 +512,7 @@ private: Gui::cmdAppObjectArgs( sketchgui->getObject(), "exposeInternalGeometry(%d)", currentgeoid); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Error creating B-spline")); diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSplineByInterpolation.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSplineByInterpolation.h index 205ed267b5..6ab7860846 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSplineByInterpolation.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSplineByInterpolation.h @@ -118,7 +118,7 @@ public: knotGeoIds.push_back(getHighestCurveIndex()); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Cannot add knot point")); @@ -188,7 +188,7 @@ public: knotGeoIds.push_back(getHighestCurveIndex()); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError( sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), @@ -298,7 +298,7 @@ public: drawControlPolygonToPosition(prevCursorPosition); drawCursorToPosition(prevCursorPosition); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Error removing knot")); @@ -608,7 +608,7 @@ private: Gui::cmdAppObjectArgs( sketchgui->getObject(), "exposeInternalGeometry(%d)", currentgeoid); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Error creating B-spline")); diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerCarbonCopy.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerCarbonCopy.h index b96032a136..31117a585c 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerCarbonCopy.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerCarbonCopy.h @@ -165,7 +165,7 @@ public: * handler is destroyed by the quit() method on pressing the * right button of the mouse */ } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError( sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerCircle.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerCircle.h index 09532dae27..27ee4603cd 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerCircle.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerCircle.h @@ -122,7 +122,7 @@ public: Gui::Command::commitCommand(); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Failed to add circle")); @@ -312,7 +312,7 @@ public: Gui::Command::commitCommand(); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Failed to add circle")); diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerEllipse.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerEllipse.h index 5c129fbea0..ff5b445511 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerEllipse.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerEllipse.h @@ -794,7 +794,7 @@ private: Gui::cmdAppObjectArgs( sketchgui->getObject(), "exposeInternalGeometry(%d)", currentgeoid); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Failed to add an ellipse")); diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerExtend.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerExtend.h index f0ec6cd42d..de2e961fd5 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerExtend.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerExtend.h @@ -319,7 +319,7 @@ public: // ViewProvider } } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Failed to extend edge")); diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerExternal.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerExternal.h index bddfc8dd4f..11fa3f86a4 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerExternal.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerExternal.h @@ -166,7 +166,7 @@ public: * handler is destroyed by the quit() method on pressing the * right button of the mouse */ } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError( sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerLine.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerLine.h index b805cee998..1e5a987c52 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerLine.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerLine.h @@ -116,7 +116,7 @@ public: Gui::Command::commitCommand(); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Failed to add line")); diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerLineSet.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerLineSet.h index c801e652ac..b492d81fef 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerLineSet.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerLineSet.h @@ -425,7 +425,7 @@ public: EditCurve[1].y, geometryCreationMode == Construction ? "True" : "False"); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { addedGeometry = false; Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), @@ -455,7 +455,7 @@ public: std::max(startAngle, endAngle), geometryCreationMode == Construction ? "True" : "False"); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { addedGeometry = false; Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerPoint.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerPoint.h index cb2231d53e..80c1a51cb7 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerPoint.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerPoint.h @@ -75,7 +75,7 @@ public: Gui::Command::commitCommand(); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Failed to add point")); diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerPolygon.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerPolygon.h index 72bed77b96..435ba29404 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerPolygon.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerPolygon.h @@ -152,7 +152,7 @@ public: tryAutoRecomputeIfNotSolve( static_cast(sketchgui->getObject())); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Failed to add polygon")); diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerRectangle.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerRectangle.h index fdadc2d2af..819b17d48a 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerRectangle.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerRectangle.h @@ -286,7 +286,7 @@ public: Gui::Command::commitCommand(); } } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Failed to add box")); @@ -693,7 +693,7 @@ public: tryAutoRecomputeIfNotSolve( static_cast(sketchgui->getObject())); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError( sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerSlot.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerSlot.h index 5ac15db770..eddda9c7f0 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerSlot.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerSlot.h @@ -301,7 +301,7 @@ public: tryAutoRecomputeIfNotSolve( static_cast(sketchgui->getObject())); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Failed to add slot")); diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerSplitting.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerSplitting.h index e4fe6015b0..1d5d433499 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerSplitting.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerSplitting.h @@ -143,7 +143,7 @@ public: Gui::Command::commitCommand(); tryAutoRecompute(static_cast(sketchgui->getObject())); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Failed to add edge")); diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerTrimming.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerTrimming.h index 5064c6bdb8..0db3e6148d 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerTrimming.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerTrimming.h @@ -144,7 +144,7 @@ public: Gui::Command::commitCommand(); tryAutoRecompute(static_cast(sketchgui->getObject())); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::NotifyError(sketchgui, QT_TRANSLATE_NOOP("Notifications", "Error"), QT_TRANSLATE_NOOP("Notifications", "Failed to trim edge")); diff --git a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp index d7fb24474b..3460a30833 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp @@ -1146,7 +1146,7 @@ void TaskSketcherConstraints::changeFilteredVisibility(bool show, ActionTarget t Gui::cmdAppObjectArgs( sketch, "setVirtualSpace(%s, %s)", constrIdList, show ? "False" : "True"); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::Command::abortCommand(); Gui::TranslatedUserError( @@ -1539,7 +1539,7 @@ void TaskSketcherConstraints::change3DViewVisibilityToTrackFilter() constrIdList, isvirtualspace ? "True" : "False"); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::Command::abortCommand(); Gui::TranslatedUserError(