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:
parent
6fbf50248d
commit
972a0402be
@ -1614,7 +1614,7 @@ QRectF QTextDocumentLayoutPrivate::layoutTable(QTextTable *table, int layoutFrom
|
|||||||
for (int i = 0; i < children.count(); ++i) {
|
for (int i = 0; i < children.count(); ++i) {
|
||||||
QTextFrame *frame = children.at(i);
|
QTextFrame *frame = children.at(i);
|
||||||
QTextTableCell cell = table->cellAt(frame->firstPosition());
|
QTextTableCell cell = table->cellAt(frame->firstPosition());
|
||||||
td->childFrameMap.insertMulti(cell.row() + cell.column() * rows, frame);
|
td->childFrameMap.insert(cell.row() + cell.column() * rows, frame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2479,7 +2479,7 @@ void QWidgetTextControl::setExtraSelections(const QList<QTextEdit::ExtraSelectio
|
|||||||
QHash<int, int> hash;
|
QHash<int, int> hash;
|
||||||
for (int i = 0; i < d->extraSelections.count(); ++i) {
|
for (int i = 0; i < d->extraSelections.count(); ++i) {
|
||||||
const QAbstractTextDocumentLayout::Selection &esel = d->extraSelections.at(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) {
|
for (int i = 0; i < selections.count(); ++i) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user