Skip to content

Commit b3a0730

Browse files
committed
Fix
1 parent ec5aedd commit b3a0730

File tree

11 files changed

+17
-15
lines changed

11 files changed

+17
-15
lines changed

resources/projects/libraries/qt_utils/motion_editor/AddStateDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ AddStateDialog::AddStateDialog(Motion *motion, QWidget *parent) : QDialog(parent
3232
populateListWidget();
3333

3434
QWidget *buttonsWidget = new QWidget(this);
35-
const QPushButton *const cancelButton = new QPushButton(tr("Cancel"), buttonsWidget);
35+
const QPushButton *cancelButton = new QPushButton(tr("Cancel"), buttonsWidget);
3636
QPushButton *okButton = new QPushButton(tr("Ok"), buttonsWidget);
3737
QHBoxLayout *hBoxLayout = new QHBoxLayout(buttonsWidget);
3838
hBoxLayout->addStretch();

resources/projects/libraries/qt_utils/motion_editor/PoseEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ PoseEditor::PoseEditor(Pose *pose, Pose *previousPose, Pose *nextPose, bool fixe
3636
formLayout->addRow(tr("&Milliseconds:"), mMilliSecondsSpinBox);
3737

3838
QWidget *buttonsWidget = new QWidget(this);
39-
const QPushButton *const cancelButton = new QPushButton(tr("Cancel"), buttonsWidget);
39+
const QPushButton *cancelButton = new QPushButton(tr("Cancel"), buttonsWidget);
4040
QPushButton *okButton = new QPushButton(tr("Ok"), buttonsWidget);
4141
QHBoxLayout *hBoxLayout = new QHBoxLayout(buttonsWidget);
4242
hBoxLayout->addStretch();

src/webots/control/WbControlledWorld.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ WbControlledWorld::WbControlledWorld(WbTokenizer *tokenizer) :
4646
return;
4747

4848
mNeedToYield = false;
49-
foreach (const WbRobot *robot, robots())
49+
foreach (const WbRobot *const robot, robots())
5050
connect(robot, &WbRobot::startControllerRequest, this, &WbControlledWorld::startController);
5151
}
5252

@@ -195,7 +195,7 @@ void WbControlledWorld::checkIfReadRequestCompleted() {
195195

196196
void WbControlledWorld::step() {
197197
if (mFirstStep && !mRetryEnabled) {
198-
foreach (const WbRobot *robot, robots()) {
198+
foreach (const WbRobot *const robot, robots()) {
199199
if (!robot->isControllerStarted())
200200
startController(robot);
201201
}

src/webots/engine/WbSimulationWorld.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ void WbSimulationWorld::step() {
226226
dImmersionOutlineDestroy(mImmersionGeoms.at(i).outline);
227227
mImmersionGeoms.clear();
228228

229-
foreach (const WbRobot *robot, robots()) {
229+
foreach (const WbRobot *const robot, robots()) {
230230
if (robots().contains(robot)) // the 'processImmediateMessages' of another robot may have removed/regenerated this robot
231231
robot->processImmediateMessages();
232232
}
@@ -400,7 +400,7 @@ void WbSimulationWorld::reset(bool restartControllers) {
400400
dImmersionLinkGroupEmpty(mCluster->immersionLinkGroup());
401401
WbSoundEngine::stopAllSources();
402402
if (restartControllers) {
403-
foreach (const WbRobot *robot, robots()) {
403+
foreach (const WbRobot *const robot, robots()) {
404404
if (robot->isControllerStarted())
405405
robot->restartController();
406406
}

src/webots/gui/WbView3D.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1813,7 +1813,7 @@ void WbView3D::mouseMoveEvent(QMouseEvent *event) {
18131813
// Drag overlay even if modifier keys are pressed
18141814
WbRenderingDevice *const renderingDevice = WbRenderingDevice::fromMousePosition(position.x(), position.y());
18151815
if (renderingDevice) {
1816-
const WbWrenTextureOverlay *overlay = renderingDevice->overlay();
1816+
const WbWrenTextureOverlay *const overlay = renderingDevice->overlay();
18171817
if (overlay) {
18181818
overlay->putOnTop();
18191819
if (overlay->isInsideResizeArea(position.x(), position.y()))

src/webots/nodes/WbRobot.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ void WbRobot::addDevices(WbNode *node) {
331331
const WbJoint *const joint = dynamic_cast<WbJoint *>(basicJoint);
332332
if (joint) {
333333
const QVector<WbLogicalDevice *> &jointDevices = joint->devices();
334-
foreach (const WbLogicalDevice *jointDevice, jointDevices) {
334+
foreach (const WbLogicalDevice *const jointDevice, jointDevices) {
335335
if (jointDevice == NULL)
336336
continue;
337337
mDevices.append(jointDevice);
@@ -344,9 +344,9 @@ void WbRobot::addDevices(WbNode *node) {
344344
return;
345345
}
346346

347-
const WbPropeller *propeller = dynamic_cast<const WbPropeller *>(node);
347+
const WbPropeller *const propeller = dynamic_cast<const WbPropeller *>(node);
348348
if (propeller) {
349-
const WbLogicalDevice *propellerDevice = propeller->device();
349+
const WbLogicalDevice *const propellerDevice = propeller->device();
350350
if (propellerDevice) {
351351
mDevices.append(propellerDevice);
352352
connect(static_cast<WbBaseNode *>(propellerDevice), &WbBaseNode::destroyed, this, &WbRobot::updateDevicesAfterDestruction,

src/webots/nodes/WbSolid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,7 @@ void WbSolid::updateChildren() {
15801580
connect(solid, &WbSolid::destroyed, this, &WbSolid::refreshPhysicsRepresentation, Qt::UniqueConnection);
15811581
connect(solid, &WbSolid::physicsPropertiesChanged, this, &WbSolid::refreshPhysicsRepresentation, Qt::UniqueConnection);
15821582
}
1583-
foreach (const WbBasicJoint *jointChild, mJointChildren)
1583+
foreach (const WbBasicJoint *const jointChild, mJointChildren)
15841584
connect(jointChild, &WbBasicJoint::endPointChanged, this, &WbSolid::updateChildrenAfterJointEndPointChange,
15851585
Qt::UniqueConnection);
15861586
}

src/webots/nodes/WbTrack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ void WbTrack::exportNodeSubNodes(WbWriter &writer) const {
951951
// write animated geometries
952952
if (!writer.isW3d() && !writer.isUrdf() && !isEmpty)
953953
writer << "\n";
954-
isEmpty |= mAnimatedObjectList.isEmpty();
954+
isEmpty = isEmpty || mAnimatedObjectList.isEmpty();
955955

956956
exportAnimatedGeometriesMesh(writer);
957957

src/webots/nodes/utils/WbNodeOperations.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,9 @@ bool WbNodeOperations::deleteNode(WbNode *node, bool fromSupervisor) {
309309

310310
setFromSupervisor(fromSupervisor);
311311

312-
WbWorld::instance()->awake();
312+
const WbSolid *solidNode = dynamic_cast<WbSolid *>(node);
313+
if (solidNode)
314+
WbWorld::instance()->awake();
313315

314316
const bool dictionaryNeedsUpdate = WbVrmlNodeUtilities::hasAreferredDefNodeDescendant(node);
315317
WbField *parentField = node->parentField();

src/webots/scene_tree/WbSceneTree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,7 @@ void WbSceneTree::updateSelection() {
11251125
// quitting Webots
11261126
return;
11271127

1128-
WbNodeOperations *const nodeOperations = WbNodeOperations::instance();
1128+
const WbNodeOperations *nodeOperations = WbNodeOperations::instance();
11291129
if (nodeOperations->isFromSupervisor())
11301130
// do not update selection if change come from supervisor
11311131
return;

0 commit comments

Comments
 (0)