Skip to content
Snippets Groups Projects
Commit b41f60ce authored by Edward Brown's avatar Edward Brown
Browse files

Attempted to improve understandablity of enumerateCellsInRow.

- Added descriptive comment.
- Renamed parameters.

Re #22263
parent 41d9c643
No related branches found
No related tags found
No related merge requests found
...@@ -78,12 +78,16 @@ private: ...@@ -78,12 +78,16 @@ private:
Cell m_emptyCellStyle; Cell m_emptyCellStyle;
}; };
/**
* Enumerates the first `columnCount` number of cells to the right of
* startAtCell, moving left to right.
*/
template <typename Action> template <typename Action>
void QtStandardItemTreeModelAdapter::enumerateCellsInRow( void QtStandardItemTreeModelAdapter::enumerateCellsInRow(
QModelIndexForMainModel const &startIndex, int columns, QModelIndexForMainModel const &startAtCell, int columnCount,
Action const &action) const { Action const &action) const {
for (auto i = 0; i < columns; i++) { for (auto i = 0; i < columnCount; i++) {
auto cellIndex = startIndex.sibling(startIndex.row(), i); auto cellIndex = startAtCell.sibling(startAtCell.row(), i);
action(cellIndex, i); action(cellIndex, i);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment