sources/qetgraphicsitem/ViewItem/projectdbmodel.cpp

QVector<int>(Qt::DisplayRole) creates a vector of size 0 (since  Qt::DisplayRole == 0), not a vector containing DisplayRole. Fixed
to {Qt::DisplayRole}.

The sam applies to QVector<int>(role) which gets changed to {role}.
This commit is contained in:
Andre Rummler
2026-08-11 00:25:45 +02:00
parent cc032c9c76
commit 8b40134a47
@@ -146,7 +146,7 @@ bool ProjectDBModel::setData(const QModelIndex &index, const QVariant &value, in
return false;
}
m_index_0_0_data.insert(role, value);
emit dataChanged(index, index, QVector<int>(role));
emit dataChanged(index, index, {role});
return true;
}
@@ -332,7 +332,7 @@ void ProjectDBModel::dataBaseUpdated()
auto row = m_record.size();
auto col = row ? m_record.first().count() : 1;
emit dataChanged(this->index(0,0), this->index(row-1, col-1), QVector<int>(Qt::DisplayRole));
emit dataChanged(this->index(0,0), this->index(row-1, col-1), {Qt::DisplayRole});
}
}