Crash bug in qobjectlistmodel.cpp - QObjectListModel::timerEvent
Hi,
I've had some crashes in qobjectlistmodel.cpp. The timerEvent function is sometimes called even with m_notifyIndexes being empty. I don't know why, but it does happen in real-world applications.
Changing the function into something like this seems to fix it, at least for me. I'm just checking that m_notifyIndexes is not empty before emitting dataChanged:
void QObjectListModel::timerEvent(QTimerEvent * ev) {
if (ev->timerId() != m_notifyTimer.timerId()) return;
if (!m_notifyIndexes.isEmpty())
emit dataChanged(index(m_notifyIndexes.begin().key()),
index((m_notifyIndexes.end()-1).key()),
QVector
Thanks for the feedback. I will look into it soon.