forked from qt-creator/qt-creator
QmlDesigner: Avoid detachs
The non const overloads of first() and last() do detach if the reference count is higher than 1. Therefore we use constFirst() and constLast() instead. Change-Id: I737cfc428f1c21f16185b9b51175e181c0ec7068 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -396,7 +396,7 @@ void DebugView::instancesChildrenChanged(const QVector<ModelNode> & nodeList)
|
||||
void DebugView::customNotification(const AbstractView *view, const QString &identifier, const QList<ModelNode> &nodeList, const QList<QVariant> &data)
|
||||
{
|
||||
if (identifier == "PuppetStatus" && data.count() == 1) {
|
||||
m_debugViewWidget->setPuppetStatus(data.first().toString());
|
||||
m_debugViewWidget->setPuppetStatus(data.constFirst().toString());
|
||||
|
||||
} else if (isDebugViewEnabled()) {
|
||||
QTextStream message;
|
||||
|
||||
Reference in New Issue
Block a user