Code review comment for lp:~mhr3/dee-qt/changeset-support

Revision history for this message
Michal Hruby (mhr3) wrote :

> 221 + // have the "extra" row from the addition, so we need to hide
> it
> Can you enhance this comment a bit - how is "hiding" actually achieved here?

Updated the comments, hopefully it's more clear now.

> 230 + m_count += m_changesetRowEnd - m_changesetRowStart + 1;
> 241 + m_count -= m_changesetRowEnd - m_changesetRowStart + 1;
>
> Why "+1"

Because a single insert is beginInsertRows(0, 0) => ie rowStart = 0, rowEnd = 0; count += 0 - 0 + 1;
For insertion of two rows: beginInsertRows(0, 1) => rowStart = 0, rowEnd = 1; count += 1 - 0 + 1;

« Back to merge proposal