fix -Wextra in Sketcher

This commit is contained in:
wmayer 2016-09-22 18:34:35 +02:00
parent 65bcaf4b6e
commit 15d7ae5e2c
22 changed files with 143 additions and 45 deletions

View File

@ -252,9 +252,8 @@ int Sketch::addPoint(const Part::GeomPoint &point, bool fixed)
return Geoms.size()-1;
}
int Sketch::addLine(const Part::GeomLineSegment &line, bool fixed)
int Sketch::addLine(const Part::GeomLineSegment & /*line*/, bool /*fixed*/)
{
// return the position of the newly added geometry
return Geoms.size()-1;
}
@ -2472,7 +2471,7 @@ int Sketch::movePoint(int geoId, PointPos pos, Base::Vector3d toPoint, bool rela
return solve();
}
int Sketch::setDatum(int constrId, double value)
int Sketch::setDatum(int /*constrId*/, double /*value*/)
{
return -1;
}
@ -2611,12 +2610,12 @@ unsigned int Sketch::getMemSize(void) const
return 0;
}
void Sketch::Save(Writer &writer) const
void Sketch::Save(Writer &) const
{
}
void Sketch::Restore(XMLReader &reader)
void Sketch::Restore(XMLReader &)
{
}

View File

@ -63,6 +63,8 @@ int SketchPy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/)
PyObject* SketchPy::solve(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return 0;
getSketchPtr()->resetSolver();
return Py::new_reference_to(Py::Int(getSketchPtr()->solve()));
}

View File

@ -74,12 +74,12 @@ double Constraint::error()
return 0.;
}
double Constraint::grad(double *param)
double Constraint::grad(double * /*param*/)
{
return 0.;
}
double Constraint::maxStep(MAP_pD_D &dir, double lim)
double Constraint::maxStep(MAP_pD_D & /*dir*/, double lim)
{
return lim;
}

View File

@ -412,7 +412,7 @@ int System::addConstraintP2PAngle(Point &p1, Point &p2, double *angle,
return addConstraint(constr);
}
int System::addConstraintP2PAngle(Point &p1, Point &p2, double *angle, int tagId)
int System::addConstraintP2PAngle(Point &p1, Point &p2, double *angle, int /*tagId*/)
{
return addConstraintP2PAngle(p1, p2, angle, 0.);
}
@ -1137,7 +1137,7 @@ int System::solve(SubSystem *subsys, bool isFine, Algorithm alg, bool isRedundan
return Failed;
}
int System::solve_BFGS(SubSystem *subsys, bool isFine, bool isRedundantsolving)
int System::solve_BFGS(SubSystem *subsys, bool /*isFine*/, bool isRedundantsolving)
{
#ifdef _GCS_EXTRACT_SOLVER_SUBSYSTEM_
extractSubsystem(subsys, isRedundantsolving);
@ -3169,7 +3169,7 @@ void System::extractSubsystem(SubSystem *subsys, bool isRedundantsolving)
// The following solver variant solves a system compound of two subsystems
// treating the first of them as of higher priority than the second
int System::solve(SubSystem *subsysA, SubSystem *subsysB, bool isFine, bool isRedundantsolving)
int System::solve(SubSystem *subsysA, SubSystem *subsysB, bool /*isFine*/, bool isRedundantsolving)
{
int xsizeA = subsysA->pSize();
int xsizeB = subsysB->pSize();

View File

@ -87,7 +87,7 @@ DeriVector2 DeriVector2::divD(double val, double dval) const
);
}
DeriVector2 Line::CalculateNormal(Point &p, double* derivparam)
DeriVector2 Line::CalculateNormal(Point & /*p*/, double* derivparam)
{
DeriVector2 p1v(p1, derivparam);
DeriVector2 p2v(p2, derivparam);

View File

@ -329,7 +329,7 @@ void SubSystem::applySolution()
*(it->first) = *(it->second);
}
void SubSystem::analyse(Eigen::MatrixXd &J, Eigen::MatrixXd &ker, Eigen::MatrixXd &img)
void SubSystem::analyse(Eigen::MatrixXd & /*J*/, Eigen::MatrixXd & /*ker*/, Eigen::MatrixXd & /*img*/)
{
}

View File

@ -147,6 +147,7 @@ CmdSketcherNewSketch::CmdSketcherNewSketch()
void CmdSketcherNewSketch::activated(int iMsg)
{
Q_UNUSED(iMsg);
Attacher::eMapMode mapmode = Attacher::mmDeactivated;
bool bAttach = false;
if (Gui::Selection().hasSelection()){
@ -287,6 +288,7 @@ CmdSketcherEditSketch::CmdSketcherEditSketch()
void CmdSketcherEditSketch::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::SelectionFilter SketchFilter("SELECT Sketcher::SketchObject COUNT 1");
if (SketchFilter.match()) {
@ -318,6 +320,7 @@ CmdSketcherLeaveSketch::CmdSketcherLeaveSketch()
void CmdSketcherLeaveSketch::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Document *doc = getActiveGuiDocument();
if (doc) {
@ -361,6 +364,7 @@ CmdSketcherReorientSketch::CmdSketcherReorientSketch()
void CmdSketcherReorientSketch::activated(int iMsg)
{
Q_UNUSED(iMsg);
Sketcher::SketchObject* sketch = Gui::Selection().getObjectsOfType<Sketcher::SketchObject>().front();
if (sketch->Support.getValue()) {
int ret = QMessageBox::question(Gui::getMainWindow(),
@ -444,6 +448,7 @@ CmdSketcherMapSketch::CmdSketcherMapSketch()
void CmdSketcherMapSketch::activated(int iMsg)
{
Q_UNUSED(iMsg);
QString msg_str;
try{
Attacher::eMapMode suggMapMode;
@ -603,6 +608,7 @@ CmdSketcherViewSketch::CmdSketcherViewSketch()
void CmdSketcherViewSketch::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Document *doc = getActiveGuiDocument();
SketcherGui::ViewProviderSketch* vp = dynamic_cast<SketcherGui::ViewProviderSketch*>(doc->getInEdit());
if (vp) {
@ -639,6 +645,7 @@ CmdSketcherValidateSketch::CmdSketcherValidateSketch()
void CmdSketcherValidateSketch::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx(0, Sketcher::SketchObject::getClassTypeId());
if (selection.size() != 1) {
QMessageBox::warning(Gui::getMainWindow(),
@ -673,6 +680,7 @@ CmdSketcherMirrorSketch::CmdSketcherMirrorSketch()
void CmdSketcherMirrorSketch::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx(0, Sketcher::SketchObject::getClassTypeId());
if (selection.size() < 1) {
QMessageBox::warning(Gui::getMainWindow(),
@ -782,6 +790,7 @@ CmdSketcherMergeSketches::CmdSketcherMergeSketches()
void CmdSketcherMergeSketches::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx(0, Sketcher::SketchObject::getClassTypeId());
if (selection.size() < 2) {
QMessageBox::warning(Gui::getMainWindow(),

View File

@ -92,6 +92,7 @@ CmdSketcherToggleConstruction::CmdSketcherToggleConstruction()
void CmdSketcherToggleConstruction::activated(int iMsg)
{
Q_UNUSED(iMsg);
// Option A: nothing is selected change creation mode from/to construction
if(Gui::Selection().countObjectsOfType(Sketcher::SketchObject::getClassTypeId()) == 0){

View File

@ -561,6 +561,7 @@ CmdSketcherConstrainHorizontal::CmdSketcherConstrainHorizontal()
void CmdSketcherConstrainHorizontal::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -658,6 +659,7 @@ CmdSketcherConstrainVertical::CmdSketcherConstrainVertical()
void CmdSketcherConstrainVertical::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -754,6 +756,7 @@ CmdSketcherConstrainLock::CmdSketcherConstrainLock()
void CmdSketcherConstrainLock::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -856,6 +859,7 @@ CmdSketcherConstrainCoincident::CmdSketcherConstrainCoincident()
void CmdSketcherConstrainCoincident::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -948,6 +952,7 @@ CmdSketcherConstrainDistance::CmdSketcherConstrainDistance()
void CmdSketcherConstrainDistance::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -1129,6 +1134,7 @@ CmdSketcherConstrainPointOnObject::CmdSketcherConstrainPointOnObject()
void CmdSketcherConstrainPointOnObject::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -1215,6 +1221,7 @@ CmdSketcherConstrainDistanceX::CmdSketcherConstrainDistanceX()
void CmdSketcherConstrainDistanceX::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -1373,6 +1380,7 @@ CmdSketcherConstrainDistanceY::CmdSketcherConstrainDistanceY()
void CmdSketcherConstrainDistanceY::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -1530,6 +1538,7 @@ CmdSketcherConstrainParallel::CmdSketcherConstrainParallel()
void CmdSketcherConstrainParallel::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -1629,6 +1638,7 @@ CmdSketcherConstrainPerpendicular::CmdSketcherConstrainPerpendicular()
void CmdSketcherConstrainPerpendicular::activated(int iMsg)
{
Q_UNUSED(iMsg);
QString strBasicHelp =
QObject::tr(
"There is a number of ways this constraint can be applied.\n\n"
@ -1941,6 +1951,7 @@ CmdSketcherConstrainTangent::CmdSketcherConstrainTangent()
void CmdSketcherConstrainTangent::activated(int iMsg)
{
Q_UNUSED(iMsg);
QString strBasicHelp =
QObject::tr(
"There is a number of ways this constraint can be applied.\n\n"
@ -2205,6 +2216,7 @@ CmdSketcherConstrainRadius::CmdSketcherConstrainRadius()
void CmdSketcherConstrainRadius::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -2528,6 +2540,7 @@ CmdSketcherConstrainAngle::CmdSketcherConstrainAngle()
void CmdSketcherConstrainAngle::activated(int iMsg)
{
Q_UNUSED(iMsg);
//TODO: comprehensive messages, like in CmdSketcherConstrainTangent
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -2801,6 +2814,7 @@ CmdSketcherConstrainEqual::CmdSketcherConstrainEqual()
void CmdSketcherConstrainEqual::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -2920,6 +2934,7 @@ CmdSketcherConstrainSymmetric::CmdSketcherConstrainSymmetric()
void CmdSketcherConstrainSymmetric::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -3090,6 +3105,7 @@ CmdSketcherConstrainSnellsLaw::CmdSketcherConstrainSnellsLaw()
void CmdSketcherConstrainSnellsLaw::activated(int iMsg)
{
Q_UNUSED(iMsg);
QString strHelp = QObject::tr("Select two endpoints of lines to act as rays, and"
" an edge representing a boundary. The first"
" selected point corresponds to index n1, second"
@ -3238,6 +3254,7 @@ CmdSketcherConstrainInternalAlignment::CmdSketcherConstrainInternalAlignment()
void CmdSketcherConstrainInternalAlignment::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -3671,6 +3688,7 @@ CmdSketcherToggleDrivingConstraint::CmdSketcherToggleDrivingConstraint()
void CmdSketcherToggleDrivingConstraint::activated(int iMsg)
{
Q_UNUSED(iMsg);
bool modeChange=true;
std::vector<Gui::SelectionObject> selection;

View File

@ -193,7 +193,7 @@ public:
STATUS_End
};
virtual void activated(ViewProviderSketch *sketchgui)
virtual void activated(ViewProviderSketch *)
{
setCursor(QPixmap(cursor_createline),7,7);
}
@ -240,6 +240,7 @@ public:
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
if (Mode==STATUS_End){
unsetCursor();
resetPositionText();
@ -324,6 +325,7 @@ CmdSketcherCreateLine::CmdSketcherCreateLine()
void CmdSketcherCreateLine::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerLine() );
}
@ -400,7 +402,7 @@ public:
STATUS_End
};
virtual void activated(ViewProviderSketch *sketchgui)
virtual void activated(ViewProviderSketch *)
{
setCursor(QPixmap(cursor_createbox),7,7);
}
@ -453,6 +455,7 @@ public:
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
if (Mode==STATUS_End){
unsetCursor();
resetPositionText();
@ -567,6 +570,7 @@ CmdSketcherCreateRectangle::CmdSketcherCreateRectangle()
void CmdSketcherCreateRectangle::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerBox() );
}
@ -748,7 +752,7 @@ public:
}
}
virtual void activated(ViewProviderSketch *sketchgui)
virtual void activated(ViewProviderSketch *)
{
setCursor(QPixmap(cursor_createlineset),7,7);
}
@ -1193,6 +1197,7 @@ CmdSketcherCreatePolyline::CmdSketcherCreatePolyline()
void CmdSketcherCreatePolyline::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerLineSet() );
}
@ -1278,7 +1283,7 @@ public:
STATUS_End
};
virtual void activated(ViewProviderSketch *sketchgui)
virtual void activated(ViewProviderSketch *)
{
setCursor(QPixmap(cursor_createarc),7,7);
}
@ -1388,6 +1393,7 @@ public:
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
if (Mode==STATUS_End) {
unsetCursor();
resetPositionText();
@ -1482,6 +1488,7 @@ CmdSketcherCreateArc::CmdSketcherCreateArc()
void CmdSketcherCreateArc::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerArc() );
}
@ -1552,7 +1559,7 @@ public:
STATUS_End
};
virtual void activated(ViewProviderSketch *sketchgui)
virtual void activated(ViewProviderSketch *)
{
setCursor(QPixmap(cursor_create3pointarc),7,7);
}
@ -1696,6 +1703,7 @@ public:
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
// Need to look at. rx might need fixing.
if (Mode==STATUS_End) {
unsetCursor();
@ -1792,6 +1800,7 @@ CmdSketcherCreate3PointArc::CmdSketcherCreate3PointArc()
void CmdSketcherCreate3PointArc::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandler3PointArc() );
}
@ -1954,7 +1963,7 @@ public:
STATUS_Close
};
virtual void activated(ViewProviderSketch *sketchgui)
virtual void activated(ViewProviderSketch *)
{
setCursor(QPixmap(cursor_createcircle),7,7);
}
@ -2011,6 +2020,7 @@ public:
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
if (Mode==STATUS_Close) {
double rx = EditCurve[1].fX - EditCurve[0].fX;
double ry = EditCurve[1].fY - EditCurve[0].fY;
@ -2099,6 +2109,7 @@ CmdSketcherCreateCircle::CmdSketcherCreateCircle()
void CmdSketcherCreateCircle::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerCircle() );
}
@ -2219,7 +2230,7 @@ public:
* @brief Slot called when the create ellipse command is activated
* @param sketchgui A pointer to the active sketch
*/
virtual void activated(ViewProviderSketch *sketchgui)
virtual void activated(ViewProviderSketch *)
{
setCursor(QPixmap(cursor_createellipse),7,7);
if (constrMethod == 0) {
@ -2365,6 +2376,7 @@ public:
*/
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
if (mode == STATUS_Close) {
saveEllipse();
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher");
@ -2949,6 +2961,7 @@ CmdSketcherCreateEllipseByCenter::CmdSketcherCreateEllipseByCenter()
void CmdSketcherCreateEllipseByCenter::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerEllipse(0) );
}
@ -2978,6 +2991,7 @@ CmdSketcherCreateEllipseBy3Points::CmdSketcherCreateEllipseBy3Points()
void CmdSketcherCreateEllipseBy3Points::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerEllipse(1) );
}
@ -3044,7 +3058,7 @@ public:
STATUS_Close
};
virtual void activated(ViewProviderSketch *sketchgui)
virtual void activated(ViewProviderSketch *)
{
setCursor(QPixmap(cursor_createarcofellipse),7,7);
}
@ -3187,6 +3201,7 @@ public:
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
if (Mode==STATUS_Close) {
unsetCursor();
resetPositionText();
@ -3361,6 +3376,7 @@ CmdSketcherCreateArcOfEllipse::CmdSketcherCreateArcOfEllipse()
void CmdSketcherCreateArcOfEllipse::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerArcOfEllipse() );
}
@ -3545,7 +3561,7 @@ public:
STATUS_End
};
virtual void activated(ViewProviderSketch *sketchgui)
virtual void activated(ViewProviderSketch *)
{
setCursor(QPixmap(cursor_create3pointcircle),7,7);
}
@ -3638,6 +3654,7 @@ public:
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
// Need to look at. rx might need fixing.
if (Mode==STATUS_End) {
unsetCursor();
@ -3732,6 +3749,7 @@ CmdSketcherCreate3PointCircle::CmdSketcherCreate3PointCircle()
void CmdSketcherCreate3PointCircle::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandler3PointCircle() );
}
@ -3888,7 +3906,7 @@ public:
DrawSketchHandlerPoint() : selectionDone(false) {}
virtual ~DrawSketchHandlerPoint() {}
virtual void activated(ViewProviderSketch *sketchgui)
virtual void activated(ViewProviderSketch *)
{
setCursor(QPixmap(cursor_createpoint),7,7);
}
@ -3912,6 +3930,7 @@ public:
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
if (selectionDone){
unsetCursor();
resetPositionText();
@ -3983,6 +4002,7 @@ CmdSketcherCreatePoint::CmdSketcherCreatePoint()
void CmdSketcherCreatePoint::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerPoint());
}
@ -4011,6 +4031,7 @@ CmdSketcherCreateText::CmdSketcherCreateText()
void CmdSketcherCreateText::activated(int iMsg)
{
Q_UNUSED(iMsg);
}
bool CmdSketcherCreateText::isActive(void)
@ -4038,6 +4059,7 @@ CmdSketcherCreateDraftLine::CmdSketcherCreateDraftLine()
void CmdSketcherCreateDraftLine::activated(int iMsg)
{
Q_UNUSED(iMsg);
}
bool CmdSketcherCreateDraftLine::isActive(void)
@ -4057,7 +4079,7 @@ namespace SketcherGui {
: Gui::SelectionFilterGate((Gui::SelectionFilter*)0), object(obj)
{}
bool allow(App::Document *pDoc, App::DocumentObject *pObj, const char *sSubName)
bool allow(App::Document * /*pDoc*/, App::DocumentObject *pObj, const char *sSubName)
{
if (pObj != this->object)
return false;
@ -4143,7 +4165,7 @@ public:
STATUS_SEEK_Second
};
virtual void activated(ViewProviderSketch *sketchgui)
virtual void activated(ViewProviderSketch *)
{
Gui::Selection().rmvSelectionGate();
Gui::Selection().addSelectionGate(new FilletSelection(sketchgui->getObject()));
@ -4152,10 +4174,12 @@ public:
virtual void mouseMove(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
}
virtual bool pressButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
return true;
}
@ -4333,6 +4357,7 @@ CmdSketcherCreateFillet::CmdSketcherCreateFillet()
void CmdSketcherCreateFillet::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerFillet());
}
@ -4353,7 +4378,7 @@ namespace SketcherGui {
: Gui::SelectionFilterGate((Gui::SelectionFilter*)0), object(obj)
{}
bool allow(App::Document *pDoc, App::DocumentObject *pObj, const char *sSubName)
bool allow(App::Document * /*pDoc*/, App::DocumentObject *pObj, const char *sSubName)
{
if (pObj != this->object)
return false;
@ -4436,10 +4461,12 @@ public:
virtual void mouseMove(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
}
virtual bool pressButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
return true;
}
@ -4497,6 +4524,7 @@ CmdSketcherTrimming::CmdSketcherTrimming()
void CmdSketcherTrimming::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerTrimming());
}
@ -4641,17 +4669,20 @@ public:
virtual void mouseMove(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
if (Gui::Selection().getPreselection().pObjectName)
applyCursor();
}
virtual bool pressButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
return true;
}
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
/* this is ok not to call to purgeHandler
* in continuous creation mode because the
* handler is destroyed by the quit() method on pressing the
@ -4727,6 +4758,7 @@ CmdSketcherExternal::CmdSketcherExternal()
void CmdSketcherExternal::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerExternal());
}
@ -4793,7 +4825,7 @@ public:
STATUS_End
};
virtual void activated(ViewProviderSketch *sketchgui)
virtual void activated(ViewProviderSketch *)
{
setCursor(QPixmap(cursor_creatslot),7,7);
}
@ -4865,6 +4897,7 @@ public:
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
if (Mode==STATUS_End){
unsetCursor();
resetPositionText();
@ -4998,6 +5031,7 @@ CmdSketcherCreateSlot::CmdSketcherCreateSlot()
void CmdSketcherCreateSlot::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerSlot() );
}
@ -5082,7 +5116,7 @@ public:
STATUS_End
};
virtual void activated(ViewProviderSketch *sketchgui)
virtual void activated(ViewProviderSketch *)
{
setCursor(QPixmap(cursor_createregularpolygon),7,7);
}
@ -5142,6 +5176,7 @@ public:
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
if (Mode==STATUS_End){
unsetCursor();
resetPositionText();
@ -5238,6 +5273,7 @@ CmdSketcherCreateTriangle::CmdSketcherCreateTriangle()
void CmdSketcherCreateTriangle::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerRegularPolygon(3) );
}
@ -5263,6 +5299,7 @@ CmdSketcherCreateSquare::CmdSketcherCreateSquare()
void CmdSketcherCreateSquare::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerRegularPolygon(4) );
}
@ -5288,6 +5325,7 @@ CmdSketcherCreatePentagon::CmdSketcherCreatePentagon()
void CmdSketcherCreatePentagon::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerRegularPolygon(5) );
}
@ -5314,6 +5352,7 @@ CmdSketcherCreateHexagon::CmdSketcherCreateHexagon()
void CmdSketcherCreateHexagon::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerRegularPolygon(6) );
}
@ -5339,6 +5378,7 @@ CmdSketcherCreateHeptagon::CmdSketcherCreateHeptagon()
void CmdSketcherCreateHeptagon::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerRegularPolygon(7) );
}
@ -5364,6 +5404,7 @@ CmdSketcherCreateOctagon::CmdSketcherCreateOctagon()
void CmdSketcherCreateOctagon::activated(int iMsg)
{
Q_UNUSED(iMsg);
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandlerRegularPolygon(8) );
}

View File

@ -106,6 +106,7 @@ CmdSketcherCloseShape::CmdSketcherCloseShape()
void CmdSketcherCloseShape::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -216,6 +217,7 @@ CmdSketcherConnect::CmdSketcherConnect()
void CmdSketcherConnect::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -302,6 +304,7 @@ CmdSketcherSelectConstraints::CmdSketcherSelectConstraints()
void CmdSketcherSelectConstraints::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -364,6 +367,7 @@ CmdSketcherSelectOrigin::CmdSketcherSelectOrigin()
void CmdSketcherSelectOrigin::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Document * doc= getActiveGuiDocument();
SketcherGui::ViewProviderSketch* vp = static_cast<SketcherGui::ViewProviderSketch*>(doc->getInEdit());
@ -411,6 +415,7 @@ CmdSketcherSelectVerticalAxis::CmdSketcherSelectVerticalAxis()
void CmdSketcherSelectVerticalAxis::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Document * doc= getActiveGuiDocument();
SketcherGui::ViewProviderSketch* vp = static_cast<SketcherGui::ViewProviderSketch*>(doc->getInEdit());
@ -454,7 +459,8 @@ CmdSketcherSelectHorizontalAxis::CmdSketcherSelectHorizontalAxis()
void CmdSketcherSelectHorizontalAxis::activated(int iMsg)
{
Gui::Document * doc= getActiveGuiDocument();
Q_UNUSED(iMsg);
Gui::Document * doc= getActiveGuiDocument();
SketcherGui::ViewProviderSketch* vp = static_cast<SketcherGui::ViewProviderSketch*>(doc->getInEdit());
@ -496,6 +502,7 @@ CmdSketcherSelectRedundantConstraints::CmdSketcherSelectRedundantConstraints()
void CmdSketcherSelectRedundantConstraints::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Document * doc= getActiveGuiDocument();
SketcherGui::ViewProviderSketch* vp = static_cast<SketcherGui::ViewProviderSketch*>(doc->getInEdit());
@ -548,6 +555,7 @@ CmdSketcherSelectConflictingConstraints::CmdSketcherSelectConflictingConstraints
void CmdSketcherSelectConflictingConstraints::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Document * doc= getActiveGuiDocument();
SketcherGui::ViewProviderSketch* vp = static_cast<SketcherGui::ViewProviderSketch*>(doc->getInEdit());
@ -598,21 +606,20 @@ CmdSketcherSelectElementsAssociatedWithConstraints::CmdSketcherSelectElementsAss
void CmdSketcherSelectElementsAssociatedWithConstraints::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<Gui::SelectionObject> selection = Gui::Selection().getSelectionEx();
Gui::Document * doc= getActiveGuiDocument();
SketcherGui::ViewProviderSketch* vp = static_cast<SketcherGui::ViewProviderSketch*>(doc->getInEdit());
Sketcher::SketchObject* Obj= vp->getSketchObject();
const std::vector<std::string> &SubNames = selection[0].getSubNames();
const std::vector< Sketcher::Constraint * > &vals = Obj->Constraints.getValues();
getSelection().clearSelection();
std::string doc_name = Obj->getDocument()->getName();
std::string obj_name = Obj->getNameInDocument();
std::stringstream ss;
@ -721,6 +728,7 @@ CmdSketcherRestoreInternalAlignmentGeometry::CmdSketcherRestoreInternalAlignment
void CmdSketcherRestoreInternalAlignmentGeometry::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -1000,6 +1008,7 @@ CmdSketcherSymmetry::CmdSketcherSymmetry()
void CmdSketcherSymmetry::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
@ -1274,6 +1283,7 @@ static const char *cursor_createcopy[]={
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
if (Mode==STATUS_End){
Base::Vector2D vector = EditCurve[1]-EditCurve[0];
@ -1479,6 +1489,7 @@ CmdSketcherCopy::CmdSketcherCopy()
void CmdSketcherCopy::activated(int iMsg)
{
Q_UNUSED(iMsg);
activate(false);
}
@ -1515,6 +1526,7 @@ CmdSketcherClone::CmdSketcherClone()
void CmdSketcherClone::activated(int iMsg)
{
Q_UNUSED(iMsg);
activate(true);
}
@ -1716,6 +1728,7 @@ static const char *cursor_createrectangulararray[]={
virtual bool releaseButton(Base::Vector2D onSketchPos)
{
Q_UNUSED(onSketchPos);
if (Mode==STATUS_End){
Base::Vector2D vector = EditCurve[1]-EditCurve[0];
@ -1798,6 +1811,7 @@ CmdSketcherRectangularArray::CmdSketcherRectangularArray()
void CmdSketcherRectangularArray::activated(int iMsg)
{
Q_UNUSED(iMsg);
// get the selection
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();

View File

@ -62,13 +62,13 @@ public:
DrawSketchHandler();
virtual ~DrawSketchHandler();
virtual void activated(ViewProviderSketch *sketchgui){};
virtual void deactivated(ViewProviderSketch *sketchgui){};
virtual void activated(ViewProviderSketch *){}
virtual void deactivated(ViewProviderSketch *){}
virtual void mouseMove(Base::Vector2D onSketchPos)=0;
virtual bool pressButton(Base::Vector2D onSketchPos)=0;
virtual bool releaseButton(Base::Vector2D onSketchPos)=0;
virtual bool onSelectionChanged(const Gui::SelectionChanges& msg) { return false; };
virtual void registerPressedKey(bool pressed, int key){};
virtual bool onSelectionChanged(const Gui::SelectionChanges&) { return false; }
virtual void registerPressedKey(bool /*pressed*/, int /*key*/){}
virtual void quit(void);

View File

@ -247,10 +247,13 @@ bool PropertyConstraintListItem::event (QEvent* ev)
void PropertyConstraintListItem::setValue(const QVariant& value)
{
// see PropertyConstraintListItem::event
Q_UNUSED(value);
}
QWidget* PropertyConstraintListItem::createEditor(QWidget* parent, const QObject* receiver, const char* method) const
{
Q_UNUSED(receiver);
Q_UNUSED(method);
QLineEdit *le = new QLineEdit(parent);
le->setFrame(false);
le->setReadOnly(true);

View File

@ -142,7 +142,7 @@ void SoDatumLabel::drawImage()
Gui::BitmapFactory().convert(image, this->image);
}
void SoDatumLabel::computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center)
void SoDatumLabel::computeBBox(SoAction * /*action*/, SbBox3f &box, SbVec3f &center)
{
if (!this->bbox.isEmpty()) {
// Set the bounding box using stored parameters

View File

@ -642,6 +642,7 @@ void TaskSketcherConstrains::on_listWidgetConstraints_itemActivated(QListWidgetI
void TaskSketcherConstrains::on_listWidgetConstraints_updateDrivingStatus(QListWidgetItem *item, bool status)
{
Q_UNUSED(status);
ConstraintItem *citem = dynamic_cast<ConstraintItem*>(item);
if (!citem) return;

View File

@ -76,6 +76,7 @@ void TaskSketcherCreateCommands::changeEvent(QEvent *e)
void TaskSketcherCreateCommands::OnChange(Gui::SelectionSingleton::SubjectType &rCaller,
Gui::SelectionSingleton::MessageType Reason)
{
Q_UNUSED(rCaller);
if (Reason.Type == SelectionChanges::AddSelection ||
Reason.Type == SelectionChanges::RmvSelection ||
Reason.Type == SelectionChanges::SetSelection ||

View File

@ -619,8 +619,9 @@ void TaskSketcherElements::on_listWidgetElements_itemEntered(QListWidgetItem *it
}
}
void TaskSketcherElements::leaveEvent ( QEvent * event )
void TaskSketcherElements::leaveEvent (QEvent * event)
{
Q_UNUSED(event);
Gui::Selection().rmvPreselect();
ui->listWidgetElements->clearFocus();
}

View File

@ -182,6 +182,8 @@ void TaskSketcherGeneral::toggleAutoconstraints(int state)
void TaskSketcherGeneral::OnChange(Gui::SelectionSingleton::SubjectType &rCaller,
Gui::SelectionSingleton::MessageType Reason)
{
Q_UNUSED(rCaller);
Q_UNUSED(Reason);
//if (Reason.Type == SelectionChanges::AddSelection ||
// Reason.Type == SelectionChanges::RmvSelection ||
// Reason.Type == SelectionChanges::SetSelection ||

View File

@ -123,6 +123,7 @@ void TaskSketcherMessages::on_autoUpdate_stateChanged(int state)
void TaskSketcherMessages::on_manualUpdate_clicked(bool checked)
{
Q_UNUSED(checked);
Gui::Command::updateActive();
}

View File

@ -509,11 +509,13 @@ void TaskSketcherSolverAdvanced::on_comboBoxDebugMode_currentIndexChanged(int in
void TaskSketcherSolverAdvanced::on_pushButtonSolve_clicked(bool checked/* = false*/)
{
Q_UNUSED(checked);
sketchView->getSketchObject()->solve();
}
void TaskSketcherSolverAdvanced::on_pushButtonDefaults_clicked(bool checked/* = false*/)
{
Q_UNUSED(checked);
// Algorithm params for default solvers
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/SolverAdvanced");
hGrp->SetASCII("LM_eps",QString::number(LM_EPS).toUtf8());

View File

@ -314,7 +314,7 @@ ViewProviderSketch::~ViewProviderSketch()
delete rubberband;
}
void ViewProviderSketch::slotUndoDocument(const Gui::Document& doc)
void ViewProviderSketch::slotUndoDocument(const Gui::Document& /*doc*/)
{
if(getSketchObject()->noRecomputes)
getSketchObject()->solve(); // the sketch must be solved to update the DoF of the solver
@ -322,7 +322,7 @@ void ViewProviderSketch::slotUndoDocument(const Gui::Document& doc)
getSketchObject()->getDocument()->recompute(); // or fully recomputed if applicable
}
void ViewProviderSketch::slotRedoDocument(const Gui::Document& doc)
void ViewProviderSketch::slotRedoDocument(const Gui::Document& /*doc*/)
{
if(getSketchObject()->noRecomputes)
getSketchObject()->solve(); // the sketch must be solved to update the DoF of the solver
@ -4173,6 +4173,7 @@ void ViewProviderSketch::setupContextMenu(QMenu *menu, QObject *receiver, const
bool ViewProviderSketch::setEdit(int ModNum)
{
Q_UNUSED(ModNum);
//find the Part and body object the feature belongs to for placement calculations
//TODO: this needs to be replaced with GRAPH methods to get the real stacked placement
parentBody = Part::BodyBase::findBodyOf(getSketchObject());
@ -4598,6 +4599,7 @@ void ViewProviderSketch::createEditInventorNodes(void)
void ViewProviderSketch::unsetEdit(int ModNum)
{
Q_UNUSED(ModNum);
ShowGrid.setValue(false);
TightGrid.setValue(true);
@ -4657,6 +4659,7 @@ void ViewProviderSketch::unsetEdit(int ModNum)
void ViewProviderSketch::setEditViewer(Gui::View3DInventorViewer* viewer, int ModNum)
{
Q_UNUSED(ModNum);
//visibility automation: save camera
if (! this->TempoVis.getValue().isNone()){
try{

View File

@ -265,7 +265,7 @@ inline void SketcherAddWorkbenchTools<Gui::ToolBarItem>(Gui::ToolBarItem& consac
}
template <typename T>
inline void SketcherAddWorkspaceSketchExtra(T& sketch){
inline void SketcherAddWorkspaceSketchExtra(T& /*sketch*/){
}
template <>