forked from qt-creator/qt-creator
Fix warnings about possible detach of temporary objects
Calling first() or last() on temporary container may unnecessarily detach the container. Fix it by calling constFirst() and constLast(). Change-Id: I2460efd5dbee1534eec8a514d9bff2a947bfddf9 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -82,7 +82,7 @@ Edit3DWidget::Edit3DWidget(Edit3DView *view) :
|
||||
|
||||
// Register action as creator command to make it configurable
|
||||
Core::Command *command = Core::ActionManager::registerAction(
|
||||
action->action(), action->menuId().data(), context);
|
||||
action->action(), action->menuId().constData(), context);
|
||||
command->setDefaultKeySequence(action->action()->shortcut());
|
||||
command->augmentActionWithShortcutToolTip(action->action());
|
||||
// Clear action shortcut so it doesn't conflict with command's override action
|
||||
|
||||
Reference in New Issue
Block a user