diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp index 486901a8ca45437bb3f3a8d75fe1dffc5571cfda..71e51b6d8ae79ea061fb97b26779b23281c29584 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp @@ -79,7 +79,7 @@ QVariant StatesEditorModel::data(const QModelIndex &index, int role) const break; } case StateImageSourceRole: { - if (!m_statesView.isNull()) + if (!m_statesView.isNull()) return QString("image://qmldesigner_stateseditor/%1-%2").arg(index.row()).arg(m_updateCounter); break; } @@ -118,7 +118,10 @@ void StatesEditorModel::renameState(int i, const QString &newName) if (m_stateNames[i] != newName) { if (m_stateNames.contains(newName) || newName.isEmpty()) { - QMessageBox::warning(0, tr("Invalid state name"), newName.isEmpty()?tr("The empty string as a name is reserved for the base state."):tr("Name already used in another state")); + QMessageBox::warning(0, tr("Invalid state name"), + newName.isEmpty() ? + tr("The empty string as a name is reserved for the base state.") : + tr("Name already used in another state")); } else { m_stateNames.replace(i, newName); m_statesView->renameState(i,newName); @@ -132,10 +135,10 @@ void StatesEditorModel::updateState(int i) { Q_ASSERT(i >= 0 && i < m_stateNames.count()); - // QML images with the same URL are always cached, so this changes the URL each - // time to ensure the image is loaded from the StatesImageProvider and not the + // QML images with the same URL are always cached, so this changes the URL each + // time to ensure the image is loaded from the StatesImageProvider and not the // cache. - // TODO: only increase imageId when the scene has changed so that we can load + // TODO: only increase imageId when the scene has changed so that we can load // from the cache instead where possible. if (++m_updateCounter == INT_MAX) m_updateCounter = 0;