Code review comment for lp:~aacid/unity8/verticalJournal

Revision history for this message
Albert Astals Cid (aacid) wrote :

> In VerticalJournal::setModel and VerticalJournal::setDelegate:
>
> if (!m_delegateModel) {
> [...]
> }
> [...]
> for (int i = 0; i < m_columnVisibleItems.count(); ++i)
> {
> [...]
> }
>
> coding style: Let's be consistent with the placement of {}.
>
> Seeing that you have the same code snippet in two functions makes me think
> that you could at least have a cleanupExistingItems() helper function with
> that chunk of code:
>
> for (int i = 0; i < m_columnVisibleItems.count(); ++i) {
> QList<ViewItem> &column = m_columnVisibleItems[i];
> Q_FOREACH(const ViewItem &item, column)
> releaseItem(item);
> column.clear();
> }
> m_indexColumnMap.clear();
>
>
> ---------------------------

Done

« Back to merge proposal