In theory, this can never happen, but for some bizarre reason, mikkoc still managed to
trigger a segfault :) If you ever happen to find a way to reliably reproduce this, please
let us know.
this, SLOT(rowsInserted(const QModelIndex &, int, int)));
connect(model, SIGNAL(rowsAboutToBeRemoved(const QModelIndex &, int, int)),
this, SLOT(rowsAboutToBeRemoved(const QModelIndex &, int, int)));
this, SLOT(rowsInserted(const QModelIndex &, int, int)));
connect(model, SIGNAL(rowsAboutToBeRemoved(const QModelIndex &, int, int)),
this, SLOT(rowsAboutToBeRemoved(const QModelIndex &, int, int)));
for(int i = 0; i < model->rowCount(); i++) {
ChatLine *line = new ChatLine(i, model);
_lines.append(line);
for(int i = 0; i < model->rowCount(); i++) {
ChatLine *line = new ChatLine(i, model);
_lines.append(line);
_lastSelectionRow = curRow;
if(newstart == newend && minColumn == ChatLineModel::ContentsColumn) {
_lastSelectionRow = curRow;
if(newstart == newend && minColumn == ChatLineModel::ContentsColumn) {
+ if(!_selectingItem) {
+ qWarning() << "WARNING: ChatScene::updateSelection() has a null _selectingItem, this should never happen! Please report.";
+ return;
+ }
_lines[curRow]->setSelected(false);
_isSelecting = false;
_lines[curRow]->setSelected(false);
_isSelecting = false;
- Q_ASSERT(_selectingItem); // this seems to not always be true, but I have no idea why
- // adding this assert to make sure the occasional segfault is caused by this
_selectingItem->continueSelecting(_selectingItem->mapFromScene(pos));
}
}
_selectingItem->continueSelecting(_selectingItem->mapFromScene(pos));
}
}