forked from qt-creator/qt-creator
DiffEditor: Remove dead code
It updates a local variable that is not used. Change-Id: Id7ec92108bb3a35c9177bd3429b6f69ac23a9f28 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -100,25 +100,7 @@ void SelectableTextEditorWidget::setSelections(const QMap<int, QList<DiffSelecti
|
||||
}
|
||||
workingList.append(diffSelection);
|
||||
}
|
||||
const int blockNumber = itBlock.key();
|
||||
QVector<QTextLayout::FormatRange> selList;
|
||||
for (int i = 0; i < workingList.count(); i++) {
|
||||
const DiffSelection &diffSelection = workingList.at(i);
|
||||
if (diffSelection.format) {
|
||||
QTextLayout::FormatRange formatRange;
|
||||
formatRange.start = diffSelection.start;
|
||||
if (formatRange.start < 0)
|
||||
formatRange.start = 0;
|
||||
formatRange.length = diffSelection.end < 0
|
||||
? INT_MAX
|
||||
: diffSelection.end - diffSelection.start;
|
||||
formatRange.format = *diffSelection.format;
|
||||
if (diffSelection.end < 0)
|
||||
formatRange.format.setProperty(QTextFormat::FullWidthSelection, true);
|
||||
selList.append(formatRange);
|
||||
}
|
||||
}
|
||||
m_diffSelections.insert(blockNumber, workingList);
|
||||
m_diffSelections.insert(itBlock.key(), workingList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user