Console: rename PascalCase named methods to camelCase
This commit is contained in:
@@ -78,7 +78,7 @@ PyMOD_INIT_FUNC(_PartDesign)
|
||||
}
|
||||
|
||||
PyObject* mod = PartDesign::initModule();
|
||||
Base::Console().Log("Loading PartDesign module... done\n");
|
||||
Base::Console().log("Loading PartDesign module... done\n");
|
||||
|
||||
|
||||
// NOTE: To finish the initialization of our own type objects we must
|
||||
|
||||
@@ -378,19 +378,19 @@ App::DocumentObjectExecReturn *Body::execute()
|
||||
{
|
||||
Part::BodyBase::execute();
|
||||
/*
|
||||
Base::Console().Error("Body '%s':\n", getNameInDocument());
|
||||
Base::Console().error("Body '%s':\n", getNameInDocument());
|
||||
App::DocumentObject* tip = Tip.getValue();
|
||||
Base::Console().Error(" Tip: %s\n", (tip == NULL) ? "None" : tip->getNameInDocument());
|
||||
Base::Console().error(" Tip: %s\n", (tip == NULL) ? "None" : tip->getNameInDocument());
|
||||
std::vector<App::DocumentObject*> model = Group.getValues();
|
||||
Base::Console().Error(" Group:\n");
|
||||
Base::Console().error(" Group:\n");
|
||||
for (std::vector<App::DocumentObject*>::const_iterator m = model.begin(); m != model.end(); m++) {
|
||||
if (*m == NULL) continue;
|
||||
Base::Console().Error(" %s", (*m)->getNameInDocument());
|
||||
Base::Console().error(" %s", (*m)->getNameInDocument());
|
||||
if (Body::isSolidFeature(*m)) {
|
||||
App::DocumentObject* baseFeature = static_cast<PartDesign::Feature*>(*m)->BaseFeature.getValue();
|
||||
Base::Console().Error(", Base: %s\n", baseFeature == NULL ? "None" : baseFeature->getNameInDocument());
|
||||
Base::Console().error(", Base: %s\n", baseFeature == NULL ? "None" : baseFeature->getNameInDocument());
|
||||
} else {
|
||||
Base::Console().Error("\n");
|
||||
Base::Console().error("\n");
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -301,7 +301,7 @@ App::DocumentObjectExecReturn *Draft::execute()
|
||||
// therefore unusable. See https://forum.freecad.org/viewtopic.php?f=10&t=3209&start=10#p25341
|
||||
// The only solution is to discard mkDraft and start over without the current face
|
||||
// mkDraft.Remove(face);
|
||||
Base::Console().Error("Adding face failed on %s. Omitted\n", it->c_str());
|
||||
Base::Console().error("Adding face failed on %s. Omitted\n", it->c_str());
|
||||
success = false;
|
||||
SubVals.erase(it);
|
||||
break;
|
||||
|
||||
@@ -2628,7 +2628,7 @@ int Hole::baseProfileOption_idxToBitmask(int index)
|
||||
if (index == 2) {
|
||||
return PartDesign::Hole::BaseProfileTypeOptions::OnPoints;
|
||||
}
|
||||
Base::Console().Error("Unexpected hole base profile combobox index: %i", index);
|
||||
Base::Console().error("Unexpected hole base profile combobox index: %i", index);
|
||||
return 0;
|
||||
}
|
||||
int Hole::baseProfileOption_bitmaskToIdx(int bitmask)
|
||||
@@ -2643,7 +2643,7 @@ int Hole::baseProfileOption_bitmaskToIdx(int bitmask)
|
||||
return 2;
|
||||
}
|
||||
|
||||
Base::Console().Error("Unexpected hole base profile bitmask: %i", bitmask);
|
||||
Base::Console().error("Unexpected hole base profile bitmask: %i", bitmask);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -494,9 +494,9 @@ void Pipe::getContinuousEdges(Part::TopoShape /*TopShape*/, std::vector<std::str
|
||||
TopExp::MapShapesAndAncestors(TopShape.getShape(), TopAbs_EDGE, TopAbs_EDGE, mapEdgeEdge);
|
||||
TopExp::MapShapes(TopShape.getShape(), TopAbs_EDGE, mapOfEdges);
|
||||
|
||||
Base::Console().Message("Initial edges:\n");
|
||||
Base::Console().message("Initial edges:\n");
|
||||
for (int i=0; i<SubNames.size(); ++i)
|
||||
Base::Console().Message("Subname: %s\n", SubNames[i].c_str());
|
||||
Base::Console().message("Subname: %s\n", SubNames[i].c_str());
|
||||
|
||||
unsigned int i = 0;
|
||||
while(i < SubNames.size())
|
||||
@@ -531,9 +531,9 @@ void Pipe::getContinuousEdges(Part::TopoShape /*TopShape*/, std::vector<std::str
|
||||
}
|
||||
}
|
||||
|
||||
Base::Console().Message("Final edges:\n");
|
||||
Base::Console().message("Final edges:\n");
|
||||
for (int i=0; i<SubNames.size(); ++i)
|
||||
Base::Console().Message("Subname: %s\n", SubNames[i].c_str());
|
||||
Base::Console().message("Subname: %s\n", SubNames[i].c_str());
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ TopoShape FeatureRefine::refineShapeIfActive(const TopoShape& oldShape,
|
||||
}
|
||||
catch (Standard_Failure& err) {
|
||||
if (onError == RefineErrorPolicy::Warn) {
|
||||
Base::Console().Warning(
|
||||
Base::Console().warning(
|
||||
fmt::format("Refine failed: {}", err.GetMessageString()).c_str());
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -334,7 +334,7 @@ App::DocumentObjectExecReturn* Transformed::execute()
|
||||
|
||||
supportShape = refineShapeIfActive((supportShape));
|
||||
if (!isSingleSolidRuleSatisfied(supportShape.getShape())) {
|
||||
Base::Console().Warning("Transformed: Result has multiple solids. Only keeping the first.\n");
|
||||
Base::Console().warning("Transformed: Result has multiple solids. Only keeping the first.\n");
|
||||
}
|
||||
|
||||
this->Shape.setValue(getSolid(supportShape)); // picking the first solid
|
||||
|
||||
@@ -817,7 +817,7 @@ void SubShapeBinder::update(SubShapeBinder::UpdateOption options) {
|
||||
catch (...) {
|
||||
std::ostringstream msg;
|
||||
msg << Label.getValue() << ": failed to make 2D offset" << std::endl;
|
||||
Base::Console().Error(msg.str().c_str());
|
||||
Base::Console().error(msg.str().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ PyMOD_INIT_FUNC(PartDesignGui)
|
||||
}
|
||||
|
||||
PyObject* mod = PartDesignGui::initModule();
|
||||
Base::Console().Log("Loading GUI of PartDesign module... done\n");
|
||||
Base::Console().log("Loading GUI of PartDesign module... done\n");
|
||||
|
||||
// instantiating the commands
|
||||
CreatePartDesignCommands();
|
||||
|
||||
@@ -609,13 +609,13 @@ unsigned validateSketches(std::vector<App::DocumentObject*>& sketches,
|
||||
continue;
|
||||
}
|
||||
|
||||
//Base::Console().Error("Checking sketch %s\n", (*s)->getNameInDocument());
|
||||
//Base::Console().error("Checking sketch %s\n", (*s)->getNameInDocument());
|
||||
// Check whether this sketch is already being used by another feature
|
||||
// Body features don't count...
|
||||
std::vector<App::DocumentObject*> inList = (*s)->getInList();
|
||||
std::vector<App::DocumentObject*>::iterator o = inList.begin();
|
||||
while (o != inList.end()) {
|
||||
//Base::Console().Error("Inlist: %s\n", (*o)->getNameInDocument());
|
||||
//Base::Console().error("Inlist: %s\n", (*o)->getNameInDocument());
|
||||
if ((*o)->isDerivedFrom<PartDesign::Body>())
|
||||
o = inList.erase(o); //ignore bodies
|
||||
else if (!( (*o)->isDerivedFrom<PartDesign::Feature>() ))
|
||||
|
||||
@@ -570,7 +570,7 @@ void CmdPartDesignMoveTip::activated(int iMsg)
|
||||
|
||||
App::DocumentObject* oldTip = body->Tip.getValue();
|
||||
if (oldTip == selFeature) { // it's not generally an error, so print only a console message
|
||||
Base::Console().Message ("%s is already the tip of the body\n", selFeature->getNameInDocument () );
|
||||
Base::Console().message ("%s is already the tip of the body\n", selFeature->getNameInDocument () );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ public:
|
||||
tryFindBasePlanes();
|
||||
}
|
||||
catch (const Base::Exception &ex) {
|
||||
Base::Console().Error ("%s\n", ex.what() );
|
||||
Base::Console().error ("%s\n", ex.what() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@ void TaskChamferParameters::apply()
|
||||
|
||||
// Alert user if he created an empty feature
|
||||
if (ui->listWidgetReferences->count() == 0) {
|
||||
Base::Console().Warning(tr("Empty chamfer created !\n").toStdString().c_str());
|
||||
Base::Console().warning(tr("Empty chamfer created !\n").toStdString().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ void TaskDraftParameters::apply()
|
||||
{
|
||||
// Alert user if he created an empty feature
|
||||
if (ui->listWidgetReferences->count() == 0) {
|
||||
Base::Console().Warning(tr("Empty draft created !\n").toStdString().c_str());
|
||||
Base::Console().warning(tr("Empty draft created !\n").toStdString().c_str());
|
||||
}
|
||||
|
||||
TaskDressUpParameters::apply();
|
||||
|
||||
@@ -277,7 +277,7 @@ void TaskDressUpParameters::tryAddSelection(const std::string& doc,
|
||||
e.reportException();
|
||||
}
|
||||
catch (const Standard_Failure& e) {
|
||||
Base::Console().Error("OCC error: %s\n", e.GetMessageString());
|
||||
Base::Console().error("OCC error: %s\n", e.GetMessageString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -800,7 +800,7 @@ void TaskExtrudeParameters::onDirectionCBChanged(int num)
|
||||
else if (auto extrude = getObject<PartDesign::FeatureExtrude>()) {
|
||||
if (lnk.getValue()) {
|
||||
if (!extrude->getDocument()->isIn(lnk.getValue())) {
|
||||
Base::Console().Error("Object was deleted\n");
|
||||
Base::Console().error("Object was deleted\n");
|
||||
return;
|
||||
}
|
||||
propReferenceAxis->Paste(lnk);
|
||||
|
||||
@@ -330,11 +330,11 @@ std::vector<App::DocumentObject*> TaskFeaturePick::buildFeatures()
|
||||
catch (Py::Exception& e) {
|
||||
// reported by code analyzers
|
||||
e.clear();
|
||||
Base::Console().Warning("Unexpected PyCXX exception\n");
|
||||
Base::Console().warning("Unexpected PyCXX exception\n");
|
||||
}
|
||||
catch (const boost::exception&) {
|
||||
// reported by code analyzers
|
||||
Base::Console().Warning("Unexpected boost exception\n");
|
||||
Base::Console().warning("Unexpected boost exception\n");
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -191,7 +191,7 @@ void TaskFilletParameters::apply()
|
||||
// Alert user if he created an empty feature
|
||||
if (ui->listWidgetReferences->count() == 0) {
|
||||
std::string text = tr("Empty fillet created!").toStdString();
|
||||
Base::Console().Warning("%s\n", text.c_str());
|
||||
Base::Console().warning("%s\n", text.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -496,7 +496,7 @@ void TaskHelixParameters::onAxisChanged(int num)
|
||||
}
|
||||
else {
|
||||
if (!helix->getDocument()->isIn(lnk.getValue())) {
|
||||
Base::Console().Error("Object was deleted\n");
|
||||
Base::Console().error("Object was deleted\n");
|
||||
return;
|
||||
}
|
||||
propReferenceAxis->Paste(lnk);
|
||||
|
||||
@@ -277,7 +277,7 @@ void TaskHoleParameters::threadedChanged()
|
||||
|
||||
ui->ThreadGroupBox->setVisible(isChecked);
|
||||
ui->ClearanceWidget->setHidden(isChecked);
|
||||
// run modelThreadChanged
|
||||
// run modelThreadChanged
|
||||
// it will handle the visibility of the model options
|
||||
modelThreadChanged();
|
||||
recomputeFeature();
|
||||
@@ -781,7 +781,7 @@ void TaskHoleParameters::changedObject(const App::Document&, const App::Property
|
||||
}
|
||||
bool ro = Prop.isReadOnly();
|
||||
|
||||
Base::Console().Log("Parameter %s was updated\n", Prop.getName());
|
||||
Base::Console().log("Parameter %s was updated\n", Prop.getName());
|
||||
|
||||
auto updateCheckable = [&](QCheckBox* widget, bool value) {
|
||||
[[maybe_unused]] QSignalBlocker blocker(widget);
|
||||
@@ -1182,7 +1182,7 @@ void TaskHoleParameters::Observer::slotChangedObject(const App::DocumentObject&
|
||||
const App::Property& Prop)
|
||||
{
|
||||
if (&Obj == hole) {
|
||||
Base::Console().Log("Parameter %s was updated with a new value\n", Prop.getName());
|
||||
Base::Console().log("Parameter %s was updated with a new value\n", Prop.getName());
|
||||
if (Obj.getDocument()) {
|
||||
owner->changedObject(*Obj.getDocument(), Prop);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ void TaskLinearPatternParameters::setupParameterUI(QWidget* widget)
|
||||
vpOrigin->setTemporaryVisibility(Gui::DatumElement::Axes);
|
||||
}
|
||||
catch (const Base::Exception& ex) {
|
||||
Base::Console().Error("%s\n", ex.what());
|
||||
Base::Console().error("%s\n", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -400,7 +400,7 @@ TaskLinearPatternParameters::~TaskLinearPatternParameters()
|
||||
}
|
||||
}
|
||||
catch (const Base::Exception& ex) {
|
||||
Base::Console().Error("%s\n", ex.what());
|
||||
Base::Console().error("%s\n", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ void TaskMirroredParameters::setupParameterUI(QWidget* widget)
|
||||
vpOrigin->setTemporaryVisibility(Gui::DatumElement::Planes);
|
||||
}
|
||||
catch (const Base::Exception& ex) {
|
||||
Base::Console().Error("%s\n", ex.what());
|
||||
Base::Console().error("%s\n", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ TaskMirroredParameters::~TaskMirroredParameters()
|
||||
}
|
||||
}
|
||||
catch (const Base::Exception& ex) {
|
||||
Base::Console().Error("%s\n", ex.what());
|
||||
Base::Console().error("%s\n", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ void TaskPolarPatternParameters::setupParameterUI(QWidget* widget)
|
||||
vpOrigin->setTemporaryVisibility(Gui::DatumElement::Axes);
|
||||
}
|
||||
catch (const Base::Exception& ex) {
|
||||
Base::Console().Error("%s\n", ex.what());
|
||||
Base::Console().error("%s\n", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ TaskPolarPatternParameters::~TaskPolarPatternParameters()
|
||||
}
|
||||
}
|
||||
catch (const Base::Exception& ex) {
|
||||
Base::Console().Error("%s\n", ex.what());
|
||||
Base::Console().error("%s\n", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ TaskBoxPrimitives::TaskBoxPrimitives(ViewProviderPrimitive* vp, QWidget* parent)
|
||||
vpOrigin = static_cast<Gui::ViewProviderCoordinateSystem*>(Gui::Application::Instance->getViewProvider(origin));
|
||||
vpOrigin->setTemporaryVisibility(Gui::DatumElement::Planes | Gui::DatumElement::Axes);
|
||||
} catch (const Base::Exception &ex) {
|
||||
Base::Console().Error ("%s\n", ex.what () );
|
||||
Base::Console().error ("%s\n", ex.what () );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ TaskBoxPrimitives::~TaskBoxPrimitives()
|
||||
}
|
||||
}
|
||||
catch (const Base::Exception& ex) {
|
||||
Base::Console().Error("%s\n", ex.what());
|
||||
Base::Console().error("%s\n", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -541,7 +541,7 @@ void TaskRevolutionParameters::onAxisChanged(int num)
|
||||
AllowSelection::CIRCLE);
|
||||
} else {
|
||||
if (!pcRevolution->getDocument()->isIn(lnk.getValue())){
|
||||
Base::Console().Error("Object was deleted\n");
|
||||
Base::Console().error("Object was deleted\n");
|
||||
return;
|
||||
}
|
||||
propReferenceAxis->Paste(lnk);
|
||||
|
||||
@@ -242,7 +242,7 @@ QString TaskSketchBasedParameters::make2DLabel(const App::DocumentObject* sectio
|
||||
return QString::fromUtf8(section->Label.getValue());
|
||||
}
|
||||
else if (subValues.empty()) {
|
||||
Base::Console().Error("No valid subelement linked in %s\n", section->Label.getValue());
|
||||
Base::Console().error("No valid subelement linked in %s\n", section->Label.getValue());
|
||||
return {};
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -257,7 +257,7 @@ void TaskThicknessParameters::apply()
|
||||
{
|
||||
// Alert user if he created an empty feature
|
||||
if (ui->listWidgetReferences->count() == 0) {
|
||||
Base::Console().Warning(tr("Empty thickness created !\n").toStdString().c_str());
|
||||
Base::Console().warning(tr("Empty thickness created !\n").toStdString().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -374,7 +374,7 @@ void TaskTransformedParameters::onFeatureDeleted()
|
||||
std::vector<App::DocumentObject*> originals = pcTransformed->Originals.getValues();
|
||||
int currentRow = ui->listWidgetFeatures->currentRow();
|
||||
if (currentRow < 0) {
|
||||
Base::Console().Error("PartDesign Pattern: No feature selected for removing.\n");
|
||||
Base::Console().error("PartDesign Pattern: No feature selected for removing.\n");
|
||||
return; // no current row selected
|
||||
}
|
||||
originals.erase(originals.begin() + currentRow);
|
||||
@@ -424,7 +424,7 @@ void TaskTransformedParameters::fillAxisCombo(ComboLinks& combolinks, Part::Part
|
||||
combolinks.addLink(orig->getZ(), "", tr("Base Z axis"));
|
||||
}
|
||||
catch (const Base::Exception& ex) {
|
||||
Base::Console().Error("%s\n", ex.what());
|
||||
Base::Console().error("%s\n", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ void TaskTransformedParameters::fillPlanesCombo(ComboLinks& combolinks, Part::Pa
|
||||
combolinks.addLink(orig->getXZ(), "", tr("Base XZ plane"));
|
||||
}
|
||||
catch (const Base::Exception& ex) {
|
||||
Base::Console().Error("%s\n", ex.what());
|
||||
Base::Console().error("%s\n", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ void ViewProviderAddSub::updateAddSubShapeIndicator() {
|
||||
previewFaceSet ->partIndex .finishEditing();
|
||||
}
|
||||
catch (...) {
|
||||
Base::Console().Error("Cannot compute Inventor representation for the shape of %s.\n",pcObject->getNameInDocument());
|
||||
Base::Console().error("Cannot compute Inventor representation for the shape of %s.\n",pcObject->getNameInDocument());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -183,16 +183,16 @@ bool ViewProviderBody::doubleClicked()
|
||||
// if (ActiveGuiDoc == NULL) return;
|
||||
//
|
||||
// // Highlight active body and all its features
|
||||
// //Base::Console().Error("ViewProviderBody::updateTree()\n");
|
||||
// //Base::Console().error("ViewProviderBody::updateTree()\n");
|
||||
// PartDesign::Body* body = getObject<PartDesign::Body>();
|
||||
// bool active = body->IsActive.getValue();
|
||||
// //Base::Console().Error("Body is %s\n", active ? "active" : "inactive");
|
||||
// //Base::Console().error("Body is %s\n", active ? "active" : "inactive");
|
||||
// ActiveGuiDoc->signalHighlightObject(*this, Gui::Blue, active);
|
||||
// std::vector<App::DocumentObject*> features = body->Group.getValues();
|
||||
// bool highlight = true;
|
||||
// App::DocumentObject* tip = body->Tip.getValue();
|
||||
// for (std::vector<App::DocumentObject*>::const_iterator f = features.begin(); f != features.end(); f++) {
|
||||
// //Base::Console().Error("Highlighting %s: %s\n", (*f)->getNameInDocument(), highlight ? "true" : "false");
|
||||
// //Base::Console().error("Highlighting %s: %s\n", (*f)->getNameInDocument(), highlight ? "true" : "false");
|
||||
// Gui::ViewProviderDocumentObject* vp = dynamic_cast<Gui::ViewProviderDocumentObject*>(Gui::Application::Instance->getViewProvider(*f));
|
||||
// if (vp != NULL)
|
||||
// ActiveGuiDoc->signalHighlightObject(*vp, Gui::LightBlue, active ? highlight : false);
|
||||
@@ -257,7 +257,7 @@ void ViewProviderBody::onChanged(const App::Property* prop) {
|
||||
if(getOverrideMode() == "As Is")
|
||||
setDisplayMaskMode(DisplayMode.getValueAsString());
|
||||
else {
|
||||
Base::Console().Message("Set override mode: %s\n", getOverrideMode().c_str());
|
||||
Base::Console().message("Set override mode: %s\n", getOverrideMode().c_str());
|
||||
setDisplayMaskMode(getOverrideMode().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ void ViewProviderTransformed::showRejectedShape(TopoDS_Shape shape)
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
Base::Console().Error("Cannot compute Inventor representation for the rejected transformations of shape of %s.\n",
|
||||
Base::Console().error("Cannot compute Inventor representation for the rejected transformations of shape of %s.\n",
|
||||
getObject()->getNameInDocument());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user