<table><tr><td style="">kossebau created this revision.<br />Restricted Application added a subscriber: kdevelop-devel.
</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/D6050" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The constructor of QFlags which was intended to handle literal "0"<br />
as commonly used indicator of no-flags-set has been done with a<br />
trick based on pointer types. Which these days of nullptr existing and<br />
compilers pushing to use that sadly fired back and, instead of<br />
allowing convenient code with commonly understood literal "0" values,<br />
resulted in quite some code using "nullptr" to indicate a QFLags-based<br />
type value with no flags set, which can be puzzling for humans<br />
reading the code</p>

<p>To improve the code again IMHO, instead of "nullptr" are used:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">enum item representing the 0=no-flag-set value, if existing</li>
<li class="remarkup-list-item">explicit constructor (or {} for default arg values, given arg type is aƶready noted as part of arg definition)</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R33 KDevPlatform</div></div></div><br /><div><strong>BRANCH</strong><div><div>nonullptrforflagsplease</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D6050" rel="noreferrer">https://phabricator.kde.org/D6050</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>debugger/breakpoint/breakpointmodel.cpp<br />
debugger/util/treemodel.cpp<br />
interfaces/idocumentcontroller.h<br />
project/projectmodel.cpp<br />
shell/documentcontroller.h<br />
sublime/aggregatemodel.cpp</div></div></div><br /><div><strong>To: </strong>kossebau, KDevelop<br /><strong>Cc: </strong>kdevelop-devel<br /></div>