broulik added inline comments. INLINE COMMENTS
> kconcatenaterowsproxymodel.cpp:70 > const QAbstractItemModel *sourceModel = sourceIndex.model(); > + if (!sourceModel) > + return {}; Coding style, braces also for single line statements > kconcatenaterowsproxymodel.cpp:112 > const QModelIndex sourceIndex = mapToSource(proxyIndex); > - return sourceIndex.model()->itemData(sourceIndex); > + return sourceIndex.isValid() ? > sourceIndex.model()->itemData(sourceIndex) : QMap<int, QVariant>(); > } You can also use `{}` here, no? Also, I would prefer an early return rather than unary operator > kconcatenaterowsproxymodel.cpp:151 > { > - Q_ASSERT(row >= 0); > - Q_ASSERT(column >= 0); > + if(row < 0) > + return {}; Coding style. Also, check `parent.isValid() return {};` since this is a flat model? REPOSITORY R275 KItemModels REVISION DETAIL https://phabricator.kde.org/D13043 To: apol, #frameworks Cc: broulik, kde-frameworks-devel, michaelh, ngraham, bruns