Commit 09c009c9 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Wrapped overly long line

parent 2c25f5ed
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment