AutoTest: Fix crash

Remove the unneeded stunt when clearing cache which only led
to crashes.

Fixes: QTCREATORBUG-28269
Change-Id: I908bcbee0f49369a589862cd8fbd3253444246c3
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2022-10-27 07:40:27 +02:00
parent 87cf82cf06
commit ba99a7f921

View File

@@ -155,16 +155,9 @@ void TestResultDelegate::currentChanged(const QModelIndex &current, const QModel
void TestResultDelegate::clearCache() void TestResultDelegate::clearCache()
{ {
const QModelIndex current = m_lastProcessedIndex;
m_lastProcessedIndex = QModelIndex(); m_lastProcessedIndex = QModelIndex();
m_lastProcessedFont = QFont(); m_lastProcessedFont = QFont();
m_lastWidth = -1; m_lastWidth = -1;
if (current.isValid()) {
if (auto model = current.model()) {
if (model->index(current.row(), current.column(), current.parent()) == current)
emit sizeHintChanged(current);
}
}
} }
void TestResultDelegate::limitTextOutput(QString &output) const void TestResultDelegate::limitTextOutput(QString &output) const