<table><tr><td style="">kfunk added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8215" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Do I understand correctly that all those columns are just here for storing data? They're not shown in the end.</p>

<p>Then one should rather refactor this to set the data on each individual item via <a href="http://doc.qt.io/qt-5/qstandarditemmodel.html#setData" class="remarkup-link" target="_blank" rel="noreferrer">http://doc.qt.io/qt-5/qstandarditemmodel.html#setData</a> instead of creating (hidden) columns. Even better: Turn this whole <tt style="background: #ebebeb; font-size: 13px;">CMakeCacheModel</tt> into a proper model inheriting from <tt style="background: #ebebeb; font-size: 13px;">QAbstractItemModel</tt> (more work). That way you're inherently required to implement this more cleanly :)</p>

<p>Bonus points for introducing an enum for Name, Type, Value, ....</p>

<p><a href="https://phabricator.kde.org/p/gracicot/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;" rel="noreferrer">@gracicot</a> Not your fault of course, you just followed the existing pattern here.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8215" rel="noreferrer">https://phabricator.kde.org/D8215</a></div></div><br /><div><strong>To: </strong>gracicot, KDevelop, kfunk<br /><strong>Cc: </strong>apol, kdevelop-devel<br /></div>