D3987: Use nullptr in all Frameworks (just diff in KIO shown here)

Martin Koller noreply at phabricator.kde.org
Sun Dec 3 12:21:53 UTC 2017


mkoller added a comment.


  I just found out that this change introduced wrong replacements.
  The changes in frameworks/kimageformats/src/imageformats like the following are incorrect, since the return type is not a pointer but an enum flags type, so it should still be 0, not nullptr.
  
  @@ -337,10 +337,10 @@ QImageIOPlugin::Capabilities EPSPlugin::capabilities(QIODevice *device, const QB
  
        return Capabilities(CanRead | CanWrite);
    }
    if (!format.isEmpty()) {
  
  - return 0;
  
  +        return nullptr;
  
    }
    if (!device->isOpen()) {
  
  - return 0;
  
  +        return nullptr;
  
    }
     
    Capabilities cap;

REPOSITORY
  R280 Prison

REVISION DETAIL
  https://phabricator.kde.org/D3987

To: kfunk, #frameworks, dfaure, kossebau
Cc: mkoller, skelly, kossebau, dfaure, graesslin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171203/2606dbe3/attachment.html>


More information about the Kde-frameworks-devel mailing list