PD: [skip ci] Fix several clazy issues:
* Maybe you meant to call base method instead [-Wclazy-skipped-base-method] * Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference] * Mixing iterators with const_iterators [-Wclazy-strict-iterators] * Unused QByteArray [-Wclazy-unused-non-trivial-variable] * C++11 range-loop might detach Qt container (QList) [-Wclazy-range-loop-detach]
This commit is contained in:
@@ -60,7 +60,7 @@ short DressUp::mustExecute() const
|
||||
{
|
||||
if (Base.getValue() && Base.getValue()->isTouched())
|
||||
return 1;
|
||||
return PartDesign::Feature::mustExecute();
|
||||
return PartDesign::FeatureAddSub::mustExecute();
|
||||
}
|
||||
|
||||
void DressUp::positionByBaseFeature(void)
|
||||
|
||||
@@ -236,7 +236,7 @@ App::DocumentObjectExecReturn *Transformed::execute(void)
|
||||
shapes.emplace_back(shape);
|
||||
}
|
||||
|
||||
for (auto shape : shapes)
|
||||
for (const auto& shape : shapes)
|
||||
shapeTools.Append(shape);
|
||||
|
||||
return shapeTools;
|
||||
|
||||
@@ -204,7 +204,7 @@ Part::TopoShape ShapeBinder::buildShapeFromReferences(App::GeoFeature* obj, std:
|
||||
return part->Shape.getValue();
|
||||
|
||||
std::vector<TopoDS_Shape> shapes;
|
||||
for (std::string sub : subs) {
|
||||
for (const std::string& sub : subs) {
|
||||
shapes.push_back(part->Shape.getShape().getSubShape(sub.c_str()));
|
||||
}
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ void TaskDressUpParameters::removeItemFromListWidget(QListWidget* widget, const
|
||||
{
|
||||
QList<QListWidgetItem*> items = widget->findItems(QString::fromLatin1(itemstr), Qt::MatchExactly);
|
||||
if (!items.empty()) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.begin(); i != items.end(); i++) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.cbegin(); i != items.cend(); i++) {
|
||||
QListWidgetItem* it = widget->takeItem(widget->row(*i));
|
||||
delete it;
|
||||
}
|
||||
|
||||
@@ -152,9 +152,9 @@ void TaskExtrudeParameters::setupDialog()
|
||||
}
|
||||
else if (obj && faceId >= 0) {
|
||||
ui->lineFaceName->setText(QString::fromLatin1("%1:%2%3")
|
||||
.arg(QString::fromUtf8(obj->Label.getValue()))
|
||||
.arg(tr("Face"))
|
||||
.arg(faceId));
|
||||
.arg(QString::fromUtf8(obj->Label.getValue()),
|
||||
tr("Face"),
|
||||
QString::number(faceId)));
|
||||
ui->lineFaceName->setProperty("FeatureName", QByteArray(obj->getNameInDocument()));
|
||||
}
|
||||
else {
|
||||
@@ -735,9 +735,9 @@ void TaskExtrudeParameters::translateFaceName()
|
||||
|
||||
if (ok) {
|
||||
ui->lineFaceName->setText(QString::fromLatin1("%1:%2%3")
|
||||
.arg(parts[0])
|
||||
.arg(tr("Face"))
|
||||
.arg(faceId));
|
||||
.arg(parts[0],
|
||||
tr("Face"),
|
||||
QString(faceId)));
|
||||
}
|
||||
else {
|
||||
ui->lineFaceName->setText(parts[0]);
|
||||
|
||||
@@ -112,8 +112,8 @@ TaskFeaturePick::TaskFeaturePick(std::vector<App::DocumentObject*>& objects,
|
||||
for (; statusIt != status.end(); ++statusIt, ++objIt) {
|
||||
QListWidgetItem* item = new QListWidgetItem(
|
||||
QString::fromLatin1("%1 (%2)")
|
||||
.arg(QString::fromUtf8((*objIt)->Label.getValue()))
|
||||
.arg(getFeatureStatusString(*statusIt)
|
||||
.arg(QString::fromUtf8((*objIt)->Label.getValue()),
|
||||
getFeatureStatusString(*statusIt)
|
||||
)
|
||||
);
|
||||
item->setData(Qt::UserRole, QString::fromLatin1((*objIt)->getNameInDocument()));
|
||||
|
||||
@@ -85,7 +85,8 @@ TaskLoftParameters::TaskLoftParameters(ViewProviderLoft *LoftView, bool /*newObj
|
||||
this->groupLayout()->addWidget(proxy);
|
||||
|
||||
// Temporarily prevent unnecessary feature recomputes
|
||||
for (QWidget* child : proxy->findChildren<QWidget*>())
|
||||
const auto childs = proxy->findChildren<QWidget*>();
|
||||
for (QWidget* child : childs)
|
||||
child->blockSignals(true);
|
||||
|
||||
//add the profiles
|
||||
@@ -115,7 +116,7 @@ TaskLoftParameters::TaskLoftParameters(ViewProviderLoft *LoftView, bool /*newObj
|
||||
ui->checkBoxClosed->setChecked(loft->Closed.getValue());
|
||||
|
||||
// activate and de-activate dialog elements as appropriate
|
||||
for (QWidget* child : proxy->findChildren<QWidget*>())
|
||||
for (QWidget* child : childs)
|
||||
child->blockSignals(false);
|
||||
|
||||
updateUI();
|
||||
@@ -225,7 +226,7 @@ void TaskLoftParameters::removeFromListWidget(QListWidget* widget, QString name)
|
||||
|
||||
QList<QListWidgetItem*> items = widget->findItems(name, Qt::MatchExactly);
|
||||
if (!items.empty()) {
|
||||
for (QList<QListWidgetItem*>::const_iterator it = items.begin(); it != items.end(); ++it) {
|
||||
for (QList<QListWidgetItem*>::const_iterator it = items.cbegin(); it != items.cend(); ++it) {
|
||||
QListWidgetItem* item = widget->takeItem(widget->row(*it));
|
||||
delete item;
|
||||
}
|
||||
@@ -266,7 +267,6 @@ void TaskLoftParameters::indexesMoved()
|
||||
PartDesign::Loft* loft = static_cast<PartDesign::Loft*>(vp->getObject());
|
||||
auto originals = loft->Sections.getSubListValues();
|
||||
|
||||
QByteArray name;
|
||||
int rows = model->rowCount();
|
||||
for (int i = 0; i < rows; i++) {
|
||||
QModelIndex index = model->index(i, 0);
|
||||
|
||||
@@ -258,7 +258,7 @@ void TaskPipeParameters::removeFromListWidget(QListWidget* widget, QString items
|
||||
{
|
||||
QList<QListWidgetItem*> items = widget->findItems(itemstr, Qt::MatchExactly);
|
||||
if (!items.empty()) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.begin(); i != items.end(); i++) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.cbegin(); i != items.cend(); i++) {
|
||||
QListWidgetItem* it = widget->takeItem(widget->row(*i));
|
||||
delete it;
|
||||
}
|
||||
@@ -758,7 +758,7 @@ void TaskPipeOrientation::removeFromListWidget(QListWidget* widget, QString name
|
||||
{
|
||||
QList<QListWidgetItem*> items = widget->findItems(name, Qt::MatchExactly);
|
||||
if (!items.empty()) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.begin(); i != items.end(); i++) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.cbegin(); i != items.cend(); i++) {
|
||||
QListWidgetItem* it = widget->takeItem(widget->row(*i));
|
||||
delete it;
|
||||
}
|
||||
@@ -876,7 +876,6 @@ void TaskPipeScaling::indexesMoved()
|
||||
PartDesign::Pipe* pipe = static_cast<PartDesign::Pipe*>(vp->getObject());
|
||||
auto originals = pipe->Sections.getSubListValues();
|
||||
|
||||
QByteArray name;
|
||||
int rows = model->rowCount();
|
||||
for (int i = 0; i < rows; i++) {
|
||||
QModelIndex index = model->index(i, 0);
|
||||
@@ -988,7 +987,7 @@ void TaskPipeScaling::removeFromListWidget(QListWidget* widget, QString name)
|
||||
{
|
||||
QList<QListWidgetItem*> items = widget->findItems(name, Qt::MatchExactly);
|
||||
if (!items.empty()) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.begin(); i != items.end(); i++) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.cbegin(); i != items.cend(); i++) {
|
||||
QListWidgetItem* it = widget->takeItem(widget->row(*i));
|
||||
delete it;
|
||||
}
|
||||
|
||||
@@ -691,10 +691,10 @@ bool TaskBoxPrimitives::setPrimitive(App::DocumentObject *obj)
|
||||
"%1.Length=%2\n"
|
||||
"%1.Width=%3\n"
|
||||
"%1.Height=%4\n")
|
||||
.arg(name)
|
||||
.arg(Base::UnitsApi::toNumber(ui->boxLength->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->boxWidth->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->boxHeight->value(), format));
|
||||
.arg(name,
|
||||
Base::UnitsApi::toNumber(ui->boxLength->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->boxWidth->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->boxHeight->value(), format));
|
||||
break;
|
||||
|
||||
case 2: // cylinder
|
||||
@@ -704,12 +704,12 @@ bool TaskBoxPrimitives::setPrimitive(App::DocumentObject *obj)
|
||||
"%1.Angle=%4\n"
|
||||
"%1.FirstAngle=%5\n"
|
||||
"%1.SecondAngle=%6\n")
|
||||
.arg(name)
|
||||
.arg(Base::UnitsApi::toNumber(ui->cylinderRadius->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->cylinderHeight->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->cylinderAngle->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->cylinderXSkew->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->cylinderYSkew->value(), format));
|
||||
.arg(name,
|
||||
Base::UnitsApi::toNumber(ui->cylinderRadius->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->cylinderHeight->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->cylinderAngle->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->cylinderXSkew->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->cylinderYSkew->value(), format));
|
||||
break;
|
||||
|
||||
case 3: // cone
|
||||
@@ -724,11 +724,11 @@ bool TaskBoxPrimitives::setPrimitive(App::DocumentObject *obj)
|
||||
"%1.Radius2=%3\n"
|
||||
"%1.Height=%4\n"
|
||||
"%1.Angle=%5\n")
|
||||
.arg(name)
|
||||
.arg(Base::UnitsApi::toNumber(ui->coneRadius1->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->coneRadius2->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->coneHeight->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->coneAngle->value(), format));
|
||||
.arg(name,
|
||||
Base::UnitsApi::toNumber(ui->coneRadius1->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->coneRadius2->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->coneHeight->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->coneAngle->value(), format));
|
||||
break;
|
||||
|
||||
case 4: // sphere
|
||||
@@ -737,11 +737,11 @@ bool TaskBoxPrimitives::setPrimitive(App::DocumentObject *obj)
|
||||
"%1.Angle1=%3\n"
|
||||
"%1.Angle2=%4\n"
|
||||
"%1.Angle3=%5\n")
|
||||
.arg(name)
|
||||
.arg(Base::UnitsApi::toNumber(ui->sphereRadius->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->sphereAngle1->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->sphereAngle2->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->sphereAngle3->value(), format));
|
||||
.arg(name,
|
||||
Base::UnitsApi::toNumber(ui->sphereRadius->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->sphereAngle1->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->sphereAngle2->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->sphereAngle3->value(), format));
|
||||
break;
|
||||
case 5: // ellipsoid
|
||||
cmd = QString::fromLatin1(
|
||||
@@ -751,13 +751,13 @@ bool TaskBoxPrimitives::setPrimitive(App::DocumentObject *obj)
|
||||
"%1.Angle1=%5\n"
|
||||
"%1.Angle2=%6\n"
|
||||
"%1.Angle3=%7\n")
|
||||
.arg(name)
|
||||
.arg(Base::UnitsApi::toNumber(ui->ellipsoidRadius1->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->ellipsoidRadius2->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->ellipsoidRadius3->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->ellipsoidAngle1->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->ellipsoidAngle2->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->ellipsoidAngle3->value(), format));
|
||||
.arg(name,
|
||||
Base::UnitsApi::toNumber(ui->ellipsoidRadius1->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->ellipsoidRadius2->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->ellipsoidRadius3->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->ellipsoidAngle1->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->ellipsoidAngle2->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->ellipsoidAngle3->value(), format));
|
||||
break;
|
||||
|
||||
case 6: // torus
|
||||
@@ -767,12 +767,12 @@ bool TaskBoxPrimitives::setPrimitive(App::DocumentObject *obj)
|
||||
"%1.Angle1=%4\n"
|
||||
"%1.Angle2=%5\n"
|
||||
"%1.Angle3=%6\n")
|
||||
.arg(name)
|
||||
.arg(Base::UnitsApi::toNumber(ui->torusRadius1->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->torusRadius2->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->torusAngle1->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->torusAngle2->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->torusAngle3->value(), format));
|
||||
.arg(name,
|
||||
Base::UnitsApi::toNumber(ui->torusRadius1->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->torusRadius2->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->torusAngle1->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->torusAngle2->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->torusAngle3->value(), format));
|
||||
break;
|
||||
case 7: // prism
|
||||
cmd = QString::fromLatin1(
|
||||
@@ -781,12 +781,12 @@ bool TaskBoxPrimitives::setPrimitive(App::DocumentObject *obj)
|
||||
"%1.Height=%4\n"
|
||||
"%1.FirstAngle=%5\n"
|
||||
"%1.SecondAngle=%6\n")
|
||||
.arg(name)
|
||||
.arg(ui->prismPolygon->value())
|
||||
.arg(Base::UnitsApi::toNumber(ui->prismCircumradius->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->prismHeight->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->prismXSkew->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->prismYSkew->value(), format));
|
||||
.arg(name,
|
||||
QString::number(ui->prismPolygon->value()),
|
||||
Base::UnitsApi::toNumber(ui->prismCircumradius->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->prismHeight->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->prismXSkew->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->prismYSkew->value(), format));
|
||||
break;
|
||||
case 8: // wedge
|
||||
// Xmin/max, Ymin/max and Zmin/max must each not be equal
|
||||
@@ -816,17 +816,17 @@ bool TaskBoxPrimitives::setPrimitive(App::DocumentObject *obj)
|
||||
"%1.Zmax=%9\n"
|
||||
"%1.X2max=%10\n"
|
||||
"%1.Z2max=%11\n")
|
||||
.arg(name)
|
||||
.arg(Base::UnitsApi::toNumber(ui->wedgeXmin->value()))
|
||||
.arg(Base::UnitsApi::toNumber(ui->wedgeYmin->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->wedgeZmin->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->wedgeX2min->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->wedgeZ2min->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->wedgeXmax->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->wedgeYmax->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->wedgeZmax->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->wedgeX2max->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->wedgeZ2max->value(), format));
|
||||
.arg(name,
|
||||
Base::UnitsApi::toNumber(ui->wedgeXmin->value()),
|
||||
Base::UnitsApi::toNumber(ui->wedgeYmin->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->wedgeZmin->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->wedgeX2min->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->wedgeZ2min->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->wedgeXmax->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->wedgeYmax->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->wedgeZmax->value(), format))
|
||||
.arg(Base::UnitsApi::toNumber(ui->wedgeX2max->value(), format),
|
||||
Base::UnitsApi::toNumber(ui->wedgeZ2max->value(), format));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -99,7 +99,7 @@ void TaskShapeBinder::updateUI()
|
||||
connect(ui->baseEdit, &QLineEdit::textChanged,
|
||||
this, &TaskShapeBinder::supportChanged);
|
||||
|
||||
for (auto sub : subs)
|
||||
for (const auto& sub : subs)
|
||||
ui->listWidgetReferences->addItem(QString::fromStdString(sub));
|
||||
|
||||
if (obj) {
|
||||
@@ -222,7 +222,7 @@ void TaskShapeBinder::removeFromListWidget(QListWidget* widget, QString itemstr)
|
||||
{
|
||||
QList<QListWidgetItem*> items = widget->findItems(itemstr, Qt::MatchExactly);
|
||||
if (!items.empty()) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.begin(); i != items.end(); i++) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.cbegin(); i != items.cend(); i++) {
|
||||
QListWidgetItem* it = widget->takeItem(widget->row(*i));
|
||||
delete it;
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ void TaskTransformedParameters::removeItemFromListWidget(QListWidget* widget, co
|
||||
{
|
||||
QList<QListWidgetItem*> items = widget->findItems(itemstr, Qt::MatchExactly);
|
||||
if (!items.empty()) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.begin(); i != items.end(); i++) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.cbegin(); i != items.cend(); i++) {
|
||||
QListWidgetItem* it = widget->takeItem(widget->row(*i));
|
||||
delete it;
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
return transactionID;
|
||||
}
|
||||
|
||||
protected Q_SLOTS:
|
||||
protected:
|
||||
/**
|
||||
* Returns the base transformation view provider
|
||||
* For stand alone features it will be view provider associated with this object
|
||||
@@ -171,6 +171,7 @@ protected Q_SLOTS:
|
||||
*/
|
||||
PartDesign::Transformed *getTopTransformedObject () const;
|
||||
|
||||
protected Q_SLOTS:
|
||||
/// Connect the subTask OK button to the MultiTransform task
|
||||
virtual void onSubTaskButtonOK() {}
|
||||
void onButtonAddFeature(const bool checked);
|
||||
|
||||
@@ -85,7 +85,7 @@ bool ViewProviderBase::setEdit(int ModNum)
|
||||
if (!base->Placement.testStatus(App::Property::Immutable) &&
|
||||
!base->Placement.testStatus(App::Property::ReadOnly) &&
|
||||
!base->Placement.testStatus(App::Property::Hidden)) {
|
||||
return PartGui::ViewProviderPart::setEdit(ModNum);
|
||||
return PartGui::ViewProviderPart::setEdit(ModNum); // clazy:exclude=skipped-base-method
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -93,5 +93,5 @@ bool ViewProviderBase::setEdit(int ModNum)
|
||||
|
||||
void ViewProviderBase::unsetEdit(int ModNum)
|
||||
{
|
||||
PartGui::ViewProviderPart::unsetEdit(ModNum);
|
||||
PartGui::ViewProviderPart::unsetEdit(ModNum); // clazy:exclude=skipped-base-method
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ void ViewProviderBody::setupContextMenu(QMenu* menu, QObject* receiver, const ch
|
||||
QAction* act = menu->addAction(tr("Toggle active body"));
|
||||
func->trigger(act, std::bind(&ViewProviderBody::doubleClicked, this));
|
||||
|
||||
Gui::ViewProviderGeometryObject::setupContextMenu(menu, receiver, member);
|
||||
Gui::ViewProviderGeometryObject::setupContextMenu(menu, receiver, member); // clazy:exclude=skipped-base-method
|
||||
}
|
||||
|
||||
bool ViewProviderBody::doubleClicked(void)
|
||||
|
||||
@@ -103,7 +103,7 @@ bool ViewProviderBoolean::setEdit(int ModNum)
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return PartGui::ViewProviderPart::setEdit(ModNum);
|
||||
return PartGui::ViewProviderPart::setEdit(ModNum); // clazy:exclude=skipped-base-method
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ std::vector<App::DocumentObject*> ViewProviderHole::claimChildren(void)const
|
||||
void ViewProviderHole::setupContextMenu(QMenu* menu, QObject* receiver, const char* member)
|
||||
{
|
||||
addDefaultAction(menu, QObject::tr("Edit hole"));
|
||||
PartGui::ViewProviderPart::setupContextMenu(menu, receiver, member);
|
||||
PartGui::ViewProviderPart::setupContextMenu(menu, receiver, member); // clazy:exclude=skipped-base-method
|
||||
}
|
||||
|
||||
bool ViewProviderHole::setEdit(int ModNum)
|
||||
@@ -102,7 +102,7 @@ bool ViewProviderHole::setEdit(int ModNum)
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return PartGui::ViewProviderPart::setEdit(ModNum);
|
||||
return PartGui::ViewProviderPart::setEdit(ModNum); // clazy:exclude=skipped-base-method
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ void ViewProviderLoft::highlightSection(bool on)
|
||||
{
|
||||
PartDesign::Loft* pcLoft = static_cast<PartDesign::Loft*>(getObject());
|
||||
auto sections = pcLoft->Sections.getSubListValues();
|
||||
for (auto it : sections) {
|
||||
for (auto& it : sections) {
|
||||
// only take the entire shape when we have a sketch selected, but
|
||||
// not a point of the sketch
|
||||
auto subName = it.second.empty() ? "" : it.second.front();
|
||||
|
||||
@@ -40,7 +40,7 @@ TaskDlgFeatureParameters *ViewProviderMultiTransform::getEditDialog() {
|
||||
void ViewProviderMultiTransform::setupContextMenu(QMenu* menu, QObject* receiver, const char* member)
|
||||
{
|
||||
this->addDefaultAction(menu, QObject::tr("Edit %1").arg(QString::fromStdString(featureName)));
|
||||
PartDesignGui::ViewProvider::setupContextMenu(menu, receiver, member);
|
||||
PartDesignGui::ViewProvider::setupContextMenu(menu, receiver, member); // clazy:exclude=skipped-base-method
|
||||
}
|
||||
|
||||
std::vector<App::DocumentObject*> ViewProviderMultiTransform::claimChildren(void) const
|
||||
|
||||
@@ -160,7 +160,7 @@ void ViewProviderShapeBinder::highlightReferences(bool on)
|
||||
std::vector<App::Color> fcolors = originalFaceColors;
|
||||
fcolors.resize(eMap.Extent(), svp->ShapeColor.getValue());
|
||||
|
||||
for (std::string e : subs) {
|
||||
for (const std::string& e : subs) {
|
||||
// Note: stoi may throw, but it strictly shouldn't happen
|
||||
if (e.compare(0, 4, "Edge") == 0) {
|
||||
int idx = std::stoi(e.substr(4)) - 1;
|
||||
|
||||
Reference in New Issue
Block a user