forked from qt-creator/qt-creator
DiffEditor: Replace QVector with QList
Change-Id: I79246cc79a2cdcd6150b060386b34ce2f9923456 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -74,7 +74,7 @@ private:
|
|||||||
UnifiedView *m_unifiedView = nullptr;
|
UnifiedView *m_unifiedView = nullptr;
|
||||||
SideBySideView *m_sideBySideView = nullptr;
|
SideBySideView *m_sideBySideView = nullptr;
|
||||||
QStackedWidget *m_stackedWidget = nullptr;
|
QStackedWidget *m_stackedWidget = nullptr;
|
||||||
QVector<IDiffView *> m_views;
|
QList<IDiffView *> m_views;
|
||||||
QToolBar *m_toolBar = nullptr;
|
QToolBar *m_toolBar = nullptr;
|
||||||
QComboBox *m_entriesComboBox = nullptr;
|
QComboBox *m_entriesComboBox = nullptr;
|
||||||
QSpinBox *m_contextSpinBox = nullptr;
|
QSpinBox *m_contextSpinBox = nullptr;
|
||||||
|
|||||||
@@ -114,13 +114,13 @@ void SelectableTextEditorWidget::setFoldingIndent(const QTextBlock &block, int i
|
|||||||
void SelectableTextEditorWidget::paintBlock(QPainter *painter,
|
void SelectableTextEditorWidget::paintBlock(QPainter *painter,
|
||||||
const QTextBlock &block,
|
const QTextBlock &block,
|
||||||
const QPointF &offset,
|
const QPointF &offset,
|
||||||
const QVector<QTextLayout::FormatRange> &selections,
|
const QList<QTextLayout::FormatRange> &selections,
|
||||||
const QRect &clipRect) const
|
const QRect &clipRect) const
|
||||||
{
|
{
|
||||||
const int blockNumber = block.blockNumber();
|
const int blockNumber = block.blockNumber();
|
||||||
QList<DiffSelection> diffs = m_diffSelections.value(blockNumber);
|
const QList<DiffSelection> diffs = m_diffSelections.value(blockNumber);
|
||||||
|
|
||||||
QVector<QTextLayout::FormatRange> newSelections;
|
QList<QTextLayout::FormatRange> newSelections;
|
||||||
for (const DiffSelection &diffSelection : diffs) {
|
for (const DiffSelection &diffSelection : diffs) {
|
||||||
if (diffSelection.format) {
|
if (diffSelection.format) {
|
||||||
QTextLayout::FormatRange formatRange;
|
QTextLayout::FormatRange formatRange;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ private:
|
|||||||
void paintBlock(QPainter *painter,
|
void paintBlock(QPainter *painter,
|
||||||
const QTextBlock &block,
|
const QTextBlock &block,
|
||||||
const QPointF &offset,
|
const QPointF &offset,
|
||||||
const QVector<QTextLayout::FormatRange> &selections,
|
const QList<QTextLayout::FormatRange> &selections,
|
||||||
const QRect &clipRect) const override;
|
const QRect &clipRect) const override;
|
||||||
|
|
||||||
DiffSelections m_diffSelections;
|
DiffSelections m_diffSelections;
|
||||||
|
|||||||
Reference in New Issue
Block a user