Console: rename PascalCase named methods to camelCase

This commit is contained in:
bofdahof
2025-03-30 00:50:27 +10:00
committed by Kacper Donat
parent 1dbc0638c3
commit ba2c2ca5ad
497 changed files with 2423 additions and 2425 deletions

View File

@@ -262,14 +262,14 @@ public:
if (event->type() == Spaceball::ButtonEvent::ButtonEventType) {
auto buttonEvent = static_cast<Spaceball::ButtonEvent*>(event); // NOLINT
if (!buttonEvent) {
Base::Console().Log("invalid spaceball button event\n");
Base::Console().log("invalid spaceball button event\n");
return true;
}
}
else if (event->type() == Spaceball::MotionEvent::MotionEventType) {
auto motionEvent = static_cast<Spaceball::MotionEvent*>(event); // NOLINT
if (!motionEvent) {
Base::Console().Log("invalid spaceball motion event\n");
Base::Console().log("invalid spaceball motion event\n");
return true;
}
}
@@ -287,7 +287,7 @@ public:
if (event->type() == Spaceball::MotionEvent::MotionEventType) {
auto motionEvent = static_cast<Spaceball::MotionEvent*>(event); // NOLINT
if (!motionEvent) {
Base::Console().Log("invalid spaceball motion event\n");
Base::Console().log("invalid spaceball motion event\n");
return nullptr;
}
@@ -624,9 +624,9 @@ void View3DInventorViewer::init()
this->grabGesture(Qt::PanGesture);
this->grabGesture(Qt::PinchGesture);
} catch (Base::Exception &e) {
Base::Console().Warning("Failed to set up gestures. Error: %s\n", e.what());
Base::Console().warning("Failed to set up gestures. Error: %s\n", e.what());
} catch (...) {
Base::Console().Warning("Failed to set up gestures. Unknown error.\n");
Base::Console().warning("Failed to set up gestures. Unknown error.\n");
}
//create the cursors
@@ -1019,18 +1019,18 @@ void View3DInventorViewer::resetEditingRoot(bool updateLinks)
Py::Object py = Py::type(e);
if (py.isString()) {
Py::String str(py);
Base::Console().Warning("%s\n", str.as_std_string("utf-8").c_str());
Base::Console().warning("%s\n", str.as_std_string("utf-8").c_str());
}
else {
Py::String str(py.repr());
Base::Console().Warning("%s\n", str.as_std_string("utf-8").c_str());
Base::Console().warning("%s\n", str.as_std_string("utf-8").c_str());
}
// Prints message to console window if we are in interactive mode
PyErr_Print();
}
catch (Py::Exception& e) {
e.clear();
Base::Console().Error("Unexpected exception raised in View3DInventorViewer::resetEditingRoot\n");
Base::Console().error("Unexpected exception raised in View3DInventorViewer::resetEditingRoot\n");
}
}
}
@@ -2029,7 +2029,7 @@ void View3DInventorViewer::interactionFinishCB(void* ud, SoQTQuarterAdaptor* vie
void View3DInventorViewer::interactionLoggerCB(void* ud, SoAction* action)
{
Q_UNUSED(ud)
Base::Console().Log("%s\n", action->getTypeId().getName().getString());
Base::Console().log("%s\n", action->getTypeId().getName().getString());
}
void View3DInventorViewer::addGraphicsItem(GLGraphicsItem* item)
@@ -2215,7 +2215,7 @@ void View3DInventorViewer::imageFromFramebuffer(int width, int height, int sampl
const QOpenGLContext* context = QOpenGLContext::currentContext();
if (!context) {
Base::Console().Warning("imageFromFramebuffer failed because no context is active\n");
Base::Console().warning("imageFromFramebuffer failed because no context is active\n");
return;
}
@@ -3575,7 +3575,7 @@ void View3DInventorViewer::alignToSelection()
// Convert to global coordinates
globalRotation.multVec(alignmentZ, alignmentZ);
globalRotation.multVec(alignmentX, alignmentX);
const auto cameraOrientation = getCameraOrientation();
auto directionZ = Base::convertTo<SbVec3f>(alignmentZ);
@@ -3605,18 +3605,18 @@ void View3DInventorViewer::alignToSelection()
if (axis.dot(directionZ) < 0 && angle != 0) {
angle *= -1;
}
using std::numbers::pi;
// Make angle positive
if (angle < 0) {
angle += 2 * pi;
}
// Find the angle to rotate to the nearest horizontal or vertical alignment with directionX.
// f is a small value used to get more deterministic behavior when the camera is at directionX +- 45 degrees.
const float f = 0.00001F;
if (angle <= pi/4 + f) {
angle = 0;
}
@@ -3642,7 +3642,7 @@ void View3DInventorViewer::alignToSelection()
directionY[0], directionY[1], directionY[2], 0,
directionZ[0], directionZ[1], directionZ[2], 0,
0, 0, 0, 1));
setCameraOrientation(orientation);
}
}
@@ -4295,7 +4295,7 @@ void View3DInventorViewer::removeEventCallback(SoType eventtype, SoEventCallback
ViewProvider* View3DInventorViewer::getViewProviderByPath(SoPath* path) const
{
if (!guiDocument) {
Base::Console().Warning("View3DInventorViewer::getViewProviderByPath: No document set\n");
Base::Console().warning("View3DInventorViewer::getViewProviderByPath: No document set\n");
return nullptr;
}
return guiDocument->getViewProviderByPathFromHead(path);
@@ -4304,7 +4304,7 @@ ViewProvider* View3DInventorViewer::getViewProviderByPath(SoPath* path) const
ViewProvider* View3DInventorViewer::getViewProviderByPathFromTail(SoPath* path) const
{
if (!guiDocument) {
Base::Console().Warning("View3DInventorViewer::getViewProviderByPathFromTail: No document set\n");
Base::Console().warning("View3DInventorViewer::getViewProviderByPathFromTail: No document set\n");
return nullptr;
}
return guiDocument->getViewProviderByPathFromTail(path);
@@ -4313,7 +4313,7 @@ ViewProvider* View3DInventorViewer::getViewProviderByPathFromTail(SoPath* path)
std::vector<ViewProvider*> View3DInventorViewer::getViewProvidersOfType(const Base::Type& typeId) const
{
if (!guiDocument) {
Base::Console().Warning("View3DInventorViewer::getViewProvidersOfType: No document set\n");
Base::Console().warning("View3DInventorViewer::getViewProvidersOfType: No document set\n");
return {};
}
return guiDocument->getViewProvidersOfType(typeId);