mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
make use of const iterator in QTextTable::splitCell()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
18e0bb09d8
commit
35e9aeb055
2 changed files with 3 additions and 4 deletions
|
@ -206,8 +206,7 @@ QTextDocumentPrivate *QTextObject::docHandle() const
|
|||
|
||||
void QTextBlockGroupPrivate::markBlocksDirty()
|
||||
{
|
||||
for (int i = 0; i < blocks.count(); ++i) {
|
||||
const QTextBlock &block = blocks.at(i);
|
||||
foreach (const QTextBlock &block, blocks) {
|
||||
pieceTable->documentChange(block.position(), block.length());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1208,8 +1208,8 @@ void QTextTable::splitCell(int row, int column, int numRows, int numCols)
|
|||
for (int r = row + 1; r < row + rowSpan; ++r) {
|
||||
// find the cell before which to insert the new cell markers
|
||||
int gridIndex = r * d->nCols + column;
|
||||
QVector<int>::iterator it = qUpperBound(d->cellIndices.begin(), d->cellIndices.end(), gridIndex);
|
||||
int cellIndex = it - d->cellIndices.begin();
|
||||
QVector<int>::const_iterator it = qUpperBound(d->cellIndices.constBegin(), d->cellIndices.constEnd(), gridIndex);
|
||||
int cellIndex = it - d->cellIndices.constBegin();
|
||||
int fragment = d->cells.value(cellIndex, d->fragment_end);
|
||||
rowPositions[r - row] = p->fragmentMap().position(fragment);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue