fix -Wextra in PartDesign

This commit is contained in:
wmayer 2016-09-22 18:34:56 +02:00
parent 15d7ae5e2c
commit 664cf65d26
40 changed files with 133 additions and 90 deletions

View File

@ -213,7 +213,7 @@ bool Body::isAfterInsertPoint(App::DocumentObject* feature) {
}
}
const bool Body::isMemberOfMultiTransform(const App::DocumentObject* f)
bool Body::isMemberOfMultiTransform(const App::DocumentObject* f)
{
if (f == NULL)
return false;
@ -224,7 +224,7 @@ const bool Body::isMemberOfMultiTransform(const App::DocumentObject* f)
static_cast<const PartDesign::Transformed*>(f)->Originals.getValues().empty());
}
const bool Body::isSolidFeature(const App::DocumentObject* f)
bool Body::isSolidFeature(const App::DocumentObject* f)
{
if (f == NULL)
return false;
@ -236,7 +236,7 @@ const bool Body::isSolidFeature(const App::DocumentObject* f)
return false;//DeepSOIC: work-in-progress?
}
const bool Body::isAllowed(const App::DocumentObject* f)
bool Body::isAllowed(const App::DocumentObject* f)
{
if (f == NULL)
return false;

View File

@ -96,20 +96,20 @@ public:
bool isAfterInsertPoint(App::DocumentObject* feature);
/// Return true if the given feature is member of a MultiTransform feature
static const bool isMemberOfMultiTransform(const App::DocumentObject* f);
static bool isMemberOfMultiTransform(const App::DocumentObject* f);
/**
* Return true if the given feature is a solid feature allowed in a Body. Currently this is only valid
* for features derived from PartDesign::Feature
* Return false if the given feature is a Sketch or a Part::Datum feature
*/
static const bool isSolidFeature(const App::DocumentObject* f);
static bool isSolidFeature(const App::DocumentObject* f);
/**
* Return true if the given feature is allowed in a Body. Currently allowed are
* all features derived from PartDesign::Feature and Part::Datum and sketches
*/
static const bool isAllowed(const App::DocumentObject* f);
static bool isAllowed(const App::DocumentObject* f);
/**
* Return the body which this feature belongs too, or NULL

View File

@ -369,7 +369,7 @@ void Pipe::setupAlgorithm(BRepOffsetAPI_MakePipeShell& mkPipeShell, TopoDS_Shape
}
void Pipe::getContiniusEdges(Part::TopoShape TopShape, std::vector< std::string >& SubNames) {
void Pipe::getContiniusEdges(Part::TopoShape /*TopShape*/, std::vector< std::string >& /*SubNames*/) {
/*
TopTools_IndexedMapOfShape mapOfEdges;

View File

@ -730,8 +730,8 @@ void ProfileBased::generatePrism(TopoDS_Shape& prism,
}
const bool ProfileBased::checkWireInsideFace(const TopoDS_Wire& wire, const TopoDS_Face& face,
const gp_Dir& dir) {
bool ProfileBased::checkWireInsideFace(const TopoDS_Wire& wire, const TopoDS_Face& face,
const gp_Dir& dir) {
// Project wire onto the face (face, not surface! So limits of face apply)
// FIXME: The results of BRepProj_Projection do not seem to be very stable. Sometimes they return no result
// even in the simplest projection case.
@ -741,7 +741,7 @@ const bool ProfileBased::checkWireInsideFace(const TopoDS_Wire& wire, const Topo
return (proj.More() && proj.Current().Closed());
}
const bool ProfileBased::checkLineCrossesFace(const gp_Lin &line, const TopoDS_Face &face)
bool ProfileBased::checkLineCrossesFace(const gp_Lin &line, const TopoDS_Face &face)
{
#if 1
BRepBuilderAPI_MakeEdge mkEdge(line);
@ -1086,7 +1086,7 @@ bool ProfileBased::isParallelPlane(const TopoDS_Shape& s1, const TopoDS_Shape& s
}
const double ProfileBased::getReversedAngle(const Base::Vector3d &b, const Base::Vector3d &v)
double ProfileBased::getReversedAngle(const Base::Vector3d &b, const Base::Vector3d &v)
{
try {
Part::Feature* obj = getVerifiedObject();

View File

@ -137,17 +137,17 @@ protected:
const bool reversed);
/// Check whether the wire after projection on the face is inside the face
static const bool checkWireInsideFace(const TopoDS_Wire& wire,
const TopoDS_Face& face,
const gp_Dir& dir);
static bool checkWireInsideFace(const TopoDS_Wire& wire,
const TopoDS_Face& face,
const gp_Dir& dir);
/// Check whether the line crosses the face (line and face must be on the same plane)
static const bool checkLineCrossesFace(const gp_Lin& line, const TopoDS_Face& face);
static bool checkLineCrossesFace(const gp_Lin& line, const TopoDS_Face& face);
class Wire_Compare;
/// Used to suggest a value for Reversed flag so that material is always removed (Groove) or added (Revolution) from the support
const double getReversedAngle(const Base::Vector3d& b, const Base::Vector3d& v);
double getReversedAngle(const Base::Vector3d& b, const Base::Vector3d& v);
/// get Axis from ReferenceAxis
void getAxis(const App::DocumentObject* pcReferenceAxis, const std::vector<std::string>& subReferenceAxis,
Base::Vector3d& base, Base::Vector3d& dir);

View File

@ -63,7 +63,7 @@ public:
/// Get the list of transformations describing the members of the pattern
// Note: Only the Scaled feature requires the originals
virtual const std::list<gp_Trsf> getTransformations(const std::vector<App::DocumentObject*> originals) {
virtual const std::list<gp_Trsf> getTransformations(const std::vector<App::DocumentObject*> /*originals*/) {
return std::list<gp_Trsf>(); // Default method
}

View File

@ -156,6 +156,7 @@ CmdPartDesignPlane::CmdPartDesignPlane()
void CmdPartDesignPlane::activated(int iMsg)
{
Q_UNUSED(iMsg);
UnifiedDatumCommand(*this, Base::Type::fromName("PartDesign::Plane"),"DatumPlane");
}
@ -183,6 +184,7 @@ CmdPartDesignLine::CmdPartDesignLine()
void CmdPartDesignLine::activated(int iMsg)
{
Q_UNUSED(iMsg);
UnifiedDatumCommand(*this, Base::Type::fromName("PartDesign::Line"),"DatumLine");
}
@ -210,6 +212,7 @@ CmdPartDesignPoint::CmdPartDesignPoint()
void CmdPartDesignPoint::activated(int iMsg)
{
Q_UNUSED(iMsg);
UnifiedDatumCommand(*this, Base::Type::fromName("PartDesign::Point"),"DatumPoint");
}
@ -241,6 +244,7 @@ CmdPartDesignShapeBinder::CmdPartDesignShapeBinder()
void CmdPartDesignShapeBinder::activated(int iMsg)
{
Q_UNUSED(iMsg);
App::PropertyLinkSubList support;
getSelection().getAsPropertyLinkSubList(support);
@ -309,6 +313,7 @@ CmdPartDesignNewSketch::CmdPartDesignNewSketch()
void CmdPartDesignNewSketch::activated(int iMsg)
{
Q_UNUSED(iMsg);
App::Document *doc = getDocument ();
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(
/*messageIfNot = */ PartDesignGui::assureModernWorkflow ( doc ) );
@ -611,9 +616,9 @@ void finishFeature(const Gui::Command* cmd, const std::string& FeatName,
// Take a list of Part2DObjects and classify them for creating a
// ProfileBased feature. FirstFreeSketch is the first free sketch in the same body
// or sketches.end() if non available. The returned number is the amount of free sketches
const unsigned validateSketches(std::vector<App::DocumentObject*>& sketches,
std::vector<PartDesignGui::TaskFeaturePick::featureStatus>& status,
std::vector<App::DocumentObject*>::iterator& firstFreeSketch)
unsigned validateSketches(std::vector<App::DocumentObject*>& sketches,
std::vector<PartDesignGui::TaskFeaturePick::featureStatus>& status,
std::vector<App::DocumentObject*>::iterator& firstFreeSketch)
{
// TODO Review the function for non-part bodies (2015-09-04, Fat-Zer)
PartDesign::Body* pcActiveBody = PartDesignGui::getBody(false);
@ -868,6 +873,7 @@ CmdPartDesignPad::CmdPartDesignPad()
void CmdPartDesignPad::activated(int iMsg)
{
Q_UNUSED(iMsg);
App::Document *doc = getDocument();
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(
/*messageIfNot = */ PartDesignGui::assureModernWorkflow(doc));
@ -925,6 +931,7 @@ CmdPartDesignPocket::CmdPartDesignPocket()
void CmdPartDesignPocket::activated(int iMsg)
{
Q_UNUSED(iMsg);
App::Document *doc = getDocument();
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(
/*messageIfNot = */ PartDesignGui::assureModernWorkflow(doc));
@ -970,6 +977,7 @@ CmdPartDesignRevolution::CmdPartDesignRevolution()
void CmdPartDesignRevolution::activated(int iMsg)
{
Q_UNUSED(iMsg);
App::Document *doc = getDocument();
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(
/*messageIfNot = */ PartDesignGui::assureModernWorkflow(doc));
@ -1021,6 +1029,7 @@ CmdPartDesignGroove::CmdPartDesignGroove()
void CmdPartDesignGroove::activated(int iMsg)
{
Q_UNUSED(iMsg);
App::Document *doc = getDocument();
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(
/*messageIfNot = */ PartDesignGui::assureModernWorkflow(doc));
@ -1071,6 +1080,7 @@ CmdPartDesignAdditivePipe::CmdPartDesignAdditivePipe()
void CmdPartDesignAdditivePipe::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */ true);
// No PartDesign feature without Body past FreeCAD 0.13
@ -1117,6 +1127,7 @@ CmdPartDesignSubtractivePipe::CmdPartDesignSubtractivePipe()
void CmdPartDesignSubtractivePipe::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */ true);
// No PartDesign feature without Body past FreeCAD 0.13
@ -1163,6 +1174,7 @@ CmdPartDesignAdditiveLoft::CmdPartDesignAdditiveLoft()
void CmdPartDesignAdditiveLoft::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */ true);
// No PartDesign feature without Body past FreeCAD 0.13
@ -1209,6 +1221,7 @@ CmdPartDesignSubtractiveLoft::CmdPartDesignSubtractiveLoft()
void CmdPartDesignSubtractiveLoft::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */ true);
// No PartDesign feature without Body past FreeCAD 0.13
@ -1344,6 +1357,7 @@ CmdPartDesignFillet::CmdPartDesignFillet()
void CmdPartDesignFillet::activated(int iMsg)
{
Q_UNUSED(iMsg);
makeChamferOrFillet(this, "Fillet");
}
@ -1371,6 +1385,7 @@ CmdPartDesignChamfer::CmdPartDesignChamfer()
void CmdPartDesignChamfer::activated(int iMsg)
{
Q_UNUSED(iMsg);
makeChamferOrFillet(this, "Chamfer");
doCommand(Gui,"Gui.Selection.clearSelection()");
}
@ -1399,6 +1414,7 @@ CmdPartDesignDraft::CmdPartDesignDraft()
void CmdPartDesignDraft::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::SelectionObject selected;
if (!dressupGetSelected ( this, "Draft", selected))
return;
@ -1455,6 +1471,7 @@ CmdPartDesignThickness::CmdPartDesignThickness()
void CmdPartDesignThickness::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::SelectionObject selected;
if (!dressupGetSelected ( this, "Thickness", selected))
return;
@ -1585,6 +1602,7 @@ CmdPartDesignMirrored::CmdPartDesignMirrored()
void CmdPartDesignMirrored::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Command* cmd = this;
auto worker = [cmd](std::string FeatName, std::vector<App::DocumentObject*> features) {
@ -1638,6 +1656,7 @@ CmdPartDesignLinearPattern::CmdPartDesignLinearPattern()
void CmdPartDesignLinearPattern::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Command* cmd = this;
auto worker = [cmd](std::string FeatName, std::vector<App::DocumentObject*> features) {
@ -1693,6 +1712,7 @@ CmdPartDesignPolarPattern::CmdPartDesignPolarPattern()
void CmdPartDesignPolarPattern::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Command* cmd = this;
auto worker = [cmd](std::string FeatName, std::vector<App::DocumentObject*> features) {
@ -1749,6 +1769,7 @@ CmdPartDesignScaled::CmdPartDesignScaled()
void CmdPartDesignScaled::activated(int iMsg)
{
Q_UNUSED(iMsg);
Gui::Command* cmd = this;
auto worker = [cmd](std::string FeatName, std::vector<App::DocumentObject*> features) {
@ -1788,6 +1809,7 @@ CmdPartDesignMultiTransform::CmdPartDesignMultiTransform()
void CmdPartDesignMultiTransform::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */false);
//if (!pcActiveBody) return;
@ -1893,6 +1915,7 @@ CmdPartDesignBoolean::CmdPartDesignBoolean()
void CmdPartDesignBoolean::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */true);
if (!pcActiveBody) return;

View File

@ -89,6 +89,7 @@ CmdPartDesignPart::CmdPartDesignPart()
void CmdPartDesignPart::activated(int iMsg)
{
Q_UNUSED(iMsg);
if ( !PartDesignGui::assureModernWorkflow( getDocument() ) )
return;
@ -131,6 +132,7 @@ CmdPartDesignBody::CmdPartDesignBody()
void CmdPartDesignBody::activated(int iMsg)
{
Q_UNUSED(iMsg);
if ( !PartDesignGui::assureModernWorkflow( getDocument() ) )
return;
App::Part *actPart = PartDesignGui::getActivePart ();
@ -237,6 +239,7 @@ CmdPartDesignMigrate::CmdPartDesignMigrate()
void CmdPartDesignMigrate::activated(int iMsg)
{
Q_UNUSED(iMsg);
App::Document *doc = getDocument();
std::set<PartDesign::Feature*> migrateFeatures;
@ -451,6 +454,7 @@ CmdPartDesignMoveTip::CmdPartDesignMoveTip()
void CmdPartDesignMoveTip::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<App::DocumentObject*> features = getSelection().getObjectsOfType(
Part::Feature::getClassTypeId() );
App::DocumentObject* selFeature;
@ -527,7 +531,9 @@ CmdPartDesignDuplicateSelection::CmdPartDesignDuplicateSelection()
sStatusTip = sToolTipText;
}
void CmdPartDesignDuplicateSelection::activated(int iMsg) {
void CmdPartDesignDuplicateSelection::activated(int iMsg)
{
Q_UNUSED(iMsg);
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */false);
std::vector<App::DocumentObject*> beforeFeatures = getDocument()->getObjects();
@ -584,6 +590,7 @@ CmdPartDesignMoveFeature::CmdPartDesignMoveFeature()
void CmdPartDesignMoveFeature::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<App::DocumentObject*> features = getSelection().getObjectsOfType(Part::Feature::getClassTypeId());
if (features.empty()) return;
@ -723,6 +730,7 @@ CmdPartDesignMoveFeatureInTree::CmdPartDesignMoveFeatureInTree()
void CmdPartDesignMoveFeatureInTree::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<App::DocumentObject*> features = getSelection().getObjectsOfType(Part::Feature::getClassTypeId());
if (features.empty()) return;

View File

@ -430,7 +430,7 @@ void TaskDatumParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
}
}
void TaskDatumParameters::onSuperplacementChanged(double val, int idx)
void TaskDatumParameters::onSuperplacementChanged(double /*val*/, int idx)
{
Part::Datum* pcDatum = static_cast<Part::Datum*>(DatumView->getObject());
Base::Placement pl = pcDatum->superPlacement.getValue();

View File

@ -63,7 +63,7 @@ public:
*/
Attacher::eMapMode getActiveMapMode();
const bool isCompleted() const { return completed; }
bool isCompleted() const { return completed; }
private Q_SLOTS:
void onSuperplacementChanged(double, int idx);

View File

@ -218,7 +218,7 @@ void TaskDraftParameters::onAngleChanged(double angle)
pcDraft->getDocument()->recomputeFeature(pcDraft);
}
const double TaskDraftParameters::getAngle(void) const
double TaskDraftParameters::getAngle(void) const
{
return ui->draftAngle->value().getValue();
}
@ -230,7 +230,7 @@ void TaskDraftParameters::onReversedChanged(const bool on) {
pcDraft->getDocument()->recomputeFeature(pcDraft);
}
const bool TaskDraftParameters::getReversed(void) const
bool TaskDraftParameters::getReversed(void) const
{
return ui->checkReverse->isChecked();
}

View File

@ -39,8 +39,8 @@ public:
TaskDraftParameters(ViewProviderDressUp *DressUpView, QWidget *parent=0);
~TaskDraftParameters();
const double getAngle(void) const;
const bool getReversed(void) const;
double getAngle(void) const;
bool getReversed(void) const;
const std::vector<std::string> getFaces(void) const;
void getPlane(App::DocumentObject*& obj, std::vector<std::string>& sub) const;
void getLine(App::DocumentObject*& obj, std::vector<std::string>& sub) const;

View File

@ -66,7 +66,7 @@ TaskDressUpParameters::~TaskDressUpParameters()
Gui::Selection().rmvSelectionGate();
}
const bool TaskDressUpParameters::referenceSelected(const Gui::SelectionChanges& msg)
bool TaskDressUpParameters::referenceSelected(const Gui::SelectionChanges& msg)
{
if ((msg.Type == Gui::SelectionChanges::AddSelection) && (
(selectionMode == refAdd) || (selectionMode == refRemove))) {

View File

@ -62,7 +62,7 @@ protected Q_SLOTS:
protected:
void exitSelectionMode();
const bool referenceSelected(const Gui::SelectionChanges& msg);
bool referenceSelected(const Gui::SelectionChanges& msg);
protected:
enum selectionModes { none, refAdd, refRemove, plane, line };

View File

@ -382,7 +382,7 @@ App::DocumentObject* TaskFeaturePick::makeCopy(App::DocumentObject* obj, std::st
return copy;
}
void TaskFeaturePick::onSelectionChanged(const Gui::SelectionChanges& msg)
void TaskFeaturePick::onSelectionChanged(const Gui::SelectionChanges& /*msg*/)
{
ui->listWidget->clearSelection();
for(Gui::SelectionSingleton::SelObj obj : Gui::Selection().getSelection()) {

View File

@ -279,7 +279,8 @@ void TaskLinearPatternParameters::onOccurrences(const uint n) {
kickUpdateViewTimer();
}
void TaskLinearPatternParameters::onDirectionChanged(int num) {
void TaskLinearPatternParameters::onDirectionChanged(int /*num*/)
{
if (blockUpdate)
return;
PartDesign::LinearPattern* pcLinearPattern = static_cast<PartDesign::LinearPattern*>(getObject());
@ -338,17 +339,17 @@ void TaskLinearPatternParameters::getDirection(App::DocumentObject*& obj, std::v
sub = lnk.getSubValues();
}
const bool TaskLinearPatternParameters::getReverse(void) const
bool TaskLinearPatternParameters::getReverse(void) const
{
return ui->checkReverse->isChecked();
}
const double TaskLinearPatternParameters::getLength(void) const
double TaskLinearPatternParameters::getLength(void) const
{
return ui->spinLength->value().getValue();
}
const unsigned TaskLinearPatternParameters::getOccurrences(void) const
unsigned TaskLinearPatternParameters::getOccurrences(void) const
{
return ui->spinOccurrences->value();
}

View File

@ -73,9 +73,9 @@ protected:
virtual void onSelectionChanged(const Gui::SelectionChanges& msg);
virtual void clearButtons();
void getDirection(App::DocumentObject*& obj, std::vector<std::string>& sub) const;
const bool getReverse(void) const;
const double getLength(void) const;
const unsigned getOccurrences(void) const;
bool getReverse(void) const;
double getLength(void) const;
unsigned getOccurrences(void) const;
private:
void setupUI();

View File

@ -54,7 +54,7 @@ using namespace Gui;
/* TRANSLATOR PartDesignGui::TaskLoftParameters */
TaskLoftParameters::TaskLoftParameters(ViewProviderLoft *LoftView,bool newObj, QWidget *parent)
TaskLoftParameters::TaskLoftParameters(ViewProviderLoft *LoftView,bool /*newObj*/, QWidget *parent)
: TaskSketchBasedParameters(LoftView, parent, "PartDesign_Additive_Loft",tr("Loft parameters"))
{
// we need a separate container widget to add all controls to
@ -97,6 +97,7 @@ TaskLoftParameters::TaskLoftParameters(ViewProviderLoft *LoftView,bool newObj, Q
void TaskLoftParameters::updateUI(int index)
{
Q_UNUSED(index);
}
void TaskLoftParameters::onSelectionChanged(const Gui::SelectionChanges& msg)
@ -194,7 +195,7 @@ TaskLoftParameters::~TaskLoftParameters()
delete ui;
}
void TaskLoftParameters::changeEvent(QEvent *e)
void TaskLoftParameters::changeEvent(QEvent * /*e*/)
{/*
TaskBox::changeEvent(e);
if (e->type() == QEvent::LanguageChange) {

View File

@ -206,7 +206,8 @@ void TaskMirroredParameters::clearButtons()
ui->buttonRemoveFeature->setChecked(false);
}
void TaskMirroredParameters::onPlaneChanged(int num) {
void TaskMirroredParameters::onPlaneChanged(int /*num*/)
{
if (blockUpdate)
return;
PartDesign::Mirrored* pcMirrored = static_cast<PartDesign::Mirrored*>(getObject());

View File

@ -230,7 +230,9 @@ void TaskMultiTransformParameters::onTransformEdit()
subTask, SLOT(onUpdateView(bool)));
}
void TaskMultiTransformParameters::onTransformActivated(const QModelIndex& index) {
void TaskMultiTransformParameters::onTransformActivated(const QModelIndex& index)
{
Q_UNUSED(index);
onTransformEdit();
}

View File

@ -423,7 +423,7 @@ void TaskPadParameters::apply()
// TaskDialog
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TaskDlgPadParameters::TaskDlgPadParameters(ViewProviderPad *PadView,bool newObj)
TaskDlgPadParameters::TaskDlgPadParameters(ViewProviderPad *PadView, bool /*newObj*/)
: TaskDlgSketchBasedParameters(PadView)
{
assert(vp);

View File

@ -67,7 +67,7 @@ using namespace Gui;
// Task Parameter
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TaskPipeParameters::TaskPipeParameters(ViewProviderPipe *PipeView,bool newObj, QWidget *parent)
TaskPipeParameters::TaskPipeParameters(ViewProviderPipe *PipeView,bool /*newObj*/, QWidget *parent)
: TaskSketchBasedParameters(PipeView, parent, "PartDesign_Additive_Pipe",tr("Pipe parameters"))
{
// we need a separate container widget to add all controls to
@ -286,7 +286,7 @@ void TaskPipeParameters::exitSelectionMode() {
// Tassk Orientation
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TaskPipeOrientation::TaskPipeOrientation(ViewProviderPipe* PipeView, bool newObj, QWidget* parent)
TaskPipeOrientation::TaskPipeOrientation(ViewProviderPipe* PipeView, bool /*newObj*/, QWidget* parent)
: TaskSketchBasedParameters(PipeView, parent, "PartDesign_Additive_Pipe", tr("Section orientation")) {
// we need a separate container widget to add all controls to
@ -393,26 +393,27 @@ void TaskPipeOrientation::onButtonRefRemove(bool checked) {
}
}
void TaskPipeOrientation::onBaseButton(bool checked) {
void TaskPipeOrientation::onBaseButton(bool checked)
{
if (checked) {
Gui::Selection().clearSelection();
selectionMode = refObjAdd;
}
}
void TaskPipeOrientation::onTangentChanged(bool checked) {
void TaskPipeOrientation::onTangentChanged(bool checked)
{
Q_UNUSED(checked);
}
void TaskPipeOrientation::onCurvelinearChanged(bool checked) {
void TaskPipeOrientation::onCurvelinearChanged(bool checked)
{
static_cast<PartDesign::Pipe*>(vp->getObject())->AuxilleryCurvelinear.setValue(checked);
recomputeFeature();
}
void TaskPipeOrientation::onBinormalChanged(double) {
void TaskPipeOrientation::onBinormalChanged(double)
{
Base::Vector3d vec(ui->doubleSpinBoxX->value(),
ui->doubleSpinBoxY->value(),
ui->doubleSpinBoxZ->value());
@ -525,7 +526,7 @@ void TaskPipeOrientation::updateUI(int idx) {
//**************************************************************************
// Task Scaling
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TaskPipeScaling::TaskPipeScaling(ViewProviderPipe* PipeView, bool newObj, QWidget* parent)
TaskPipeScaling::TaskPipeScaling(ViewProviderPipe* PipeView, bool /*newObj*/, QWidget* parent)
: TaskSketchBasedParameters(PipeView, parent, "PartDesign_Additive_Pipe", tr("Section transformation")) {
// we need a separate container widget to add all controls to

View File

@ -277,7 +277,8 @@ void TaskPolarPatternParameters::onOccurrences(const uint n) {
kickUpdateViewTimer();
}
void TaskPolarPatternParameters::onAxisChanged(int num) {
void TaskPolarPatternParameters::onAxisChanged(int /*num*/)
{
if (blockUpdate)
return;
PartDesign::PolarPattern* pcPolarPattern = static_cast<PartDesign::PolarPattern*>(getObject());
@ -337,17 +338,17 @@ void TaskPolarPatternParameters::getAxis(App::DocumentObject*& obj, std::vector<
sub = lnk.getSubValues();
}
const bool TaskPolarPatternParameters::getReverse(void) const
bool TaskPolarPatternParameters::getReverse(void) const
{
return ui->checkReverse->isChecked();
}
const double TaskPolarPatternParameters::getAngle(void) const
double TaskPolarPatternParameters::getAngle(void) const
{
return ui->polarAngle->value().getValue();
}
const unsigned TaskPolarPatternParameters::getOccurrences(void) const
unsigned TaskPolarPatternParameters::getOccurrences(void) const
{
return ui->spinOccurrences->value();
}

View File

@ -74,9 +74,9 @@ protected:
void getAxis(App::DocumentObject*& obj, std::vector<std::string>& sub) const;
const std::string getStdAxis(void) const;
const std::string getAxis(void) const;
const bool getReverse(void) const;
const double getAngle(void) const;
const unsigned getOccurrences(void) const;
bool getReverse(void) const;
double getAngle(void) const;
unsigned getOccurrences(void) const;
private:
void setupUI();

View File

@ -413,4 +413,6 @@ TaskDlgRevolutionParameters::TaskDlgRevolutionParameters(PartDesignGui::ViewProv
assert(RevolutionView);
Content.push_back(new TaskRevolutionParameters(RevolutionView));
}
#include "moc_TaskRevolutionParameters.cpp"

View File

@ -64,6 +64,7 @@ public:
*/
void fillAxisCombo(bool forceRefill = false);
void addAxisToCombo(App::DocumentObject *linkObj, std::string linkSubname, QString itemText);
private Q_SLOTS:
void onAngleChanged(double);
void onAxisChanged(int);
@ -73,7 +74,7 @@ private Q_SLOTS:
protected:
void onSelectionChanged(const Gui::SelectionChanges& msg) override;
void changeEvent(QEvent *e) override;
const bool updateView() const;
bool updateView() const;
void getReferenceAxis(App::DocumentObject *&obj, std::vector<std::string> &sub) const;
double getAngle(void) const;
bool getMidplane(void) const;

View File

@ -202,12 +202,12 @@ void TaskScaledParameters::onFeatureDeleted(void)
recomputeFeature();
}
const double TaskScaledParameters::getFactor(void) const
double TaskScaledParameters::getFactor(void) const
{
return ui->spinFactor->value().getValue();
}
const unsigned TaskScaledParameters::getOccurrences(void) const
unsigned TaskScaledParameters::getOccurrences(void) const
{
return ui->spinOccurrences->value();
}

View File

@ -68,8 +68,8 @@ protected:
virtual void changeEvent(QEvent *e);
virtual void onSelectionChanged(const Gui::SelectionChanges& msg);
virtual void clearButtons();
const double getFactor(void) const;
const unsigned getOccurrences(void) const;
double getFactor(void) const;
unsigned getOccurrences(void) const;
private:
void setupUI();

View File

@ -56,7 +56,7 @@ using namespace Gui;
// TODO Review and cleanup the file (2015-09-11, Fat-Zer)
TaskShapeBinder::TaskShapeBinder(ViewProviderShapeBinder *view,bool newObj, QWidget *parent)
TaskShapeBinder::TaskShapeBinder(ViewProviderShapeBinder *view, bool /*newObj*/, QWidget *parent)
: Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("PartDesign_ShapeBinder"),
tr("Datum shape parameters"), true, parent)
{
@ -161,7 +161,7 @@ TaskShapeBinder::~TaskShapeBinder()
delete ui;
}
void TaskShapeBinder::changeEvent(QEvent *e)
void TaskShapeBinder::changeEvent(QEvent *)
{
}

View File

@ -163,7 +163,7 @@ void TaskThicknessParameters::onModeChanged(int mode) {
}
const double TaskThicknessParameters::getValue(void) const
double TaskThicknessParameters::getValue(void) const
{
return ui->Value->value().getValue();
}
@ -175,17 +175,17 @@ void TaskThicknessParameters::onReversedChanged(const bool on) {
pcThickness->getDocument()->recomputeFeature(pcThickness);
}
const bool TaskThicknessParameters::getReversed(void) const
bool TaskThicknessParameters::getReversed(void) const
{
return ui->checkReverse->isChecked();
}
const int TaskThicknessParameters::getJoinType(void) const {
int TaskThicknessParameters::getJoinType(void) const {
return ui->joinComboBox->currentIndex();
}
const int TaskThicknessParameters::getMode(void) const {
int TaskThicknessParameters::getMode(void) const {
return ui->modeComboBox->currentIndex();
}

View File

@ -39,10 +39,10 @@ public:
TaskThicknessParameters(ViewProviderDressUp *DressUpView, QWidget *parent=0);
~TaskThicknessParameters();
const double getValue(void) const;
const bool getReversed(void) const;
const int getMode(void) const;
const int getJoinType(void) const;
double getValue(void) const;
bool getReversed(void) const;
int getMode(void) const;
int getJoinType(void) const;
private Q_SLOTS:
void onValueChanged(double angle);

View File

@ -102,7 +102,7 @@ int TaskTransformedParameters::getUpdateViewTimeout() const
return 500;
}
const bool TaskTransformedParameters::originalSelected(const Gui::SelectionChanges& msg)
bool TaskTransformedParameters::originalSelected(const Gui::SelectionChanges& msg)
{
if (msg.Type == Gui::SelectionChanges::AddSelection && (
(selectionMode == addFeature) || (selectionMode == removeFeature))) {

View File

@ -168,7 +168,7 @@ protected:
*/
PartDesign::Transformed *getObject () const;
const bool originalSelected(const Gui::SelectionChanges& msg);
bool originalSelected(const Gui::SelectionChanges& msg);
/// Recompute either this feature or the parent feature (MultiTransform mode)
void recomputeFeature();

View File

@ -131,6 +131,8 @@ void ViewProviderBody::setOverrideMode(const std::string& mode) {
void ViewProviderBody::setupContextMenu(QMenu* menu, QObject* receiver, const char* member)
{
Q_UNUSED(receiver);
Q_UNUSED(member);
Gui::ActionFunction* func = new Gui::ActionFunction(menu);
QAction* act = menu->addAction(tr("Toggle active body"));
func->trigger(act, boost::bind(&ViewProviderBody::doubleClicked, this));

View File

@ -73,7 +73,7 @@ public:
* @note should be reimplemented in the offspings
* @note use FreeCAD-specific bbox here to simplify the math in derived classes
*/
virtual void setExtents (Base::BoundBox3d bbox)
virtual void setExtents (Base::BoundBox3d /*bbox*/)
{ }
/// Update the visual sizes. This overloaded version of the previous function to allow pass coin type

View File

@ -96,7 +96,7 @@ void ViewProviderLoft::unsetEdit(int ModNum) {
}
bool ViewProviderLoft::onDelete(const std::vector<std::string> &s)
bool ViewProviderLoft::onDelete(const std::vector<std::string> & /*s*/)
{/*
PartDesign::Loft* pcLoft = static_cast<PartDesign::Loft*>(getObject());
@ -113,9 +113,7 @@ bool ViewProviderLoft::onDelete(const std::vector<std::string> &s)
return true;
}
void ViewProviderLoft::highlightReferences(const bool on, bool auxillery)
void ViewProviderLoft::highlightReferences(const bool /*on*/, bool /*auxillery*/)
{/*
PartDesign::Loft* pcLoft = static_cast<PartDesign::Loft*>(getObject());
Part::Feature* base;

View File

@ -111,7 +111,9 @@ bool ViewProviderPrimitive::setEdit(int ModNum)
}
}
void ViewProviderPrimitive::unsetEdit(int ModNum) {
void ViewProviderPrimitive::unsetEdit(int ModNum)
{
Q_UNUSED(ModNum);
setPreviewDisplayMode(false);
}

View File

@ -122,8 +122,8 @@ void ViewProviderShapeBinder::unsetEdit(int ModNum) {
PartGui::ViewProviderPart::unsetEdit(ModNum);
}
void ViewProviderShapeBinder::highlightReferences(const bool on, bool auxillery) {
void ViewProviderShapeBinder::highlightReferences(const bool on, bool /*auxillery*/)
{
Part::Feature* obj;
std::vector<std::string> subs;

View File

@ -56,7 +56,7 @@ protected:
virtual bool setEdit(int ModNum);
virtual void unsetEdit(int ModNum);
const bool checkDlgOpen(TaskDlgTransformedParameters* transformedDlg);
bool checkDlgOpen(TaskDlgTransformedParameters* transformedDlg);
// node for the representation of rejected repetitions
SoGroup * pcRejectedRoot;

View File

@ -64,7 +64,7 @@ Workbench::~Workbench() {
WorkflowManager::destruct();
}
void Workbench::_switchToDocument(const App::Document* doc)
void Workbench::_switchToDocument(const App::Document* /*doc*/)
{
// TODO Commented out for thurther remove or rewrite (2015-09-04, Fat-Zer)
// if (doc == NULL) return;
@ -119,17 +119,17 @@ void Workbench::_switchToDocument(const App::Document* doc)
// }*/
}
void Workbench::slotActiveDocument(const Gui::Document& Doc)
void Workbench::slotActiveDocument(const Gui::Document& /*Doc*/)
{
// _switchToDocument(Doc.getDocument());
}
void Workbench::slotNewDocument(const App::Document& Doc)
void Workbench::slotNewDocument(const App::Document& /*Doc*/)
{
// _switchToDocument(&Doc);
}
void Workbench::slotFinishRestoreDocument(const App::Document& Doc)
void Workbench::slotFinishRestoreDocument(const App::Document& /*Doc*/)
{
// _switchToDocument(&Doc);
}