summaryrefslogtreecommitdiff
path: root/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp')
-rw-r--r--src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
index adb627a003..7e6808f177 100644
--- a/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
+++ b/src/plugins/qmldesigner/components/stateseditor/stateseditormodel.cpp
@@ -106,22 +106,20 @@ QVariant StatesEditorModel::data(const QModelIndex &index, int role) const
if (index.row() == 0) {
return QString(tr("base state", "Implicit default state"));
} else {
- if (stateNode.hasVariantProperty("name")) {
+ if (stateNode.hasVariantProperty("name"))
return stateNode.variantProperty("name").value();
- } else {
+ else
return QVariant();
- }
}
}
case StateImageSourceRole: {
static int randomNumber = 0;
randomNumber++;
- if (index.row() == 0) {
+ if (index.row() == 0)
return QString("image://qmldesigner_stateseditor/baseState-%1").arg(randomNumber);
- } else {
+ else
return QString("image://qmldesigner_stateseditor/%1-%2").arg(index.internalId()).arg(randomNumber);
- }
}
case NodeId : return index.internalId();
}