Use insert instead of insertMulti when operating on a QMultiHash

Change-Id: I96ebf6954d0a137f9f6f9632cdad6e18750519fe
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Lars Knoll 2018-12-03 12:38:45 +01:00
parent 6fbf50248d
commit 972a0402be
2 changed files with 2 additions and 2 deletions

View File

@ -1614,7 +1614,7 @@ QRectF QTextDocumentLayoutPrivate::layoutTable(QTextTable *table, int layoutFrom
for (int i = 0; i < children.count(); ++i) {
QTextFrame *frame = children.at(i);
QTextTableCell cell = table->cellAt(frame->firstPosition());
td->childFrameMap.insertMulti(cell.row() + cell.column() * rows, frame);
td->childFrameMap.insert(cell.row() + cell.column() * rows, frame);
}
}

View File

@ -2479,7 +2479,7 @@ void QWidgetTextControl::setExtraSelections(const QList<QTextEdit::ExtraSelectio
QHash<int, int> hash;
for (int i = 0; i < d->extraSelections.count(); ++i) {
const QAbstractTextDocumentLayout::Selection &esel = d->extraSelections.at(i);
hash.insertMulti(esel.cursor.anchor(), i);
hash.insert(esel.cursor.anchor(), i);
}
for (int i = 0; i < selections.count(); ++i) {