D6053: Use explicit flag values or explicit constructor instead of nullptr
    Friedrich W. H. Kossebau 
    noreply at phabricator.kde.org
       
    Wed May 31 23:32:07 UTC 2017
    
    
  
kossebau created this revision.
Restricted Application added a project: Frameworks.
REVISION SUMMARY
  The constructor of QFlags which was intended to handle literal "0"
  as commonly used indicator of no-flags-set has been done with a
  trick based on pointer types. Which these days of nullptr existing and
  compilers pushing to use that sadly fired back and, instead of
  allowing convenient code with commonly understood literal "0" values,
  resulted in quite some code using "nullptr" to indicate a QFLags-based
  type value with no flags set, which can be puzzling for humans
  reading the code.
  
  To improve the code again, instead of "nullptr" are used:
  
  - enum item representing the 0=no-flag-set value, if existing
  - explicit constructor
REPOSITORY
  R236 KWidgetsAddons
BRANCH
  nonullptrforflagsplease
REVISION DETAIL
  https://phabricator.kde.org/D6053
AFFECTED FILES
  src/kassistantdialog.h
  src/keditlistwidget.cpp
  src/kfontrequester.cpp
  src/kpagedialog.h
  src/kpagewidgetmodel.cpp
  src/kpassworddialog.h
  src/kruler.h
  src/kseparator.h
To: kossebau, #frameworks, cfeck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170531/69c0c8f7/attachment.html>
    
    
More information about the Kde-frameworks-devel
mailing list