mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-06-03 17:08:08 -04:00
Use nullptr everywhere
Differential Revision: https://phabricator.kde.org/D3987
This commit is contained in:
parent
e4aa067bd2
commit
740fe5df0e
@ -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;
|
||||
|
@ -218,10 +218,10 @@ QImageIOPlugin::Capabilities EXRPlugin::capabilities(QIODevice *device, const QB
|
||||
return Capabilities(CanRead);
|
||||
}
|
||||
if (!format.isEmpty()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
if (!device->isOpen()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Capabilities cap;
|
||||
|
@ -66,10 +66,10 @@ QImageIOPlugin::Capabilities KraPlugin::capabilities(QIODevice *device, const QB
|
||||
return Capabilities(CanRead);
|
||||
}
|
||||
if (!format.isEmpty()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
if (!device->isOpen()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Capabilities cap;
|
||||
|
@ -65,10 +65,10 @@ QImageIOPlugin::Capabilities OraPlugin::capabilities(QIODevice *device, const QB
|
||||
return Capabilities(CanRead);
|
||||
}
|
||||
if (!format.isEmpty()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
if (!device->isOpen()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Capabilities cap;
|
||||
|
@ -667,10 +667,10 @@ QImageIOPlugin::Capabilities PCXPlugin::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;
|
||||
|
@ -449,10 +449,10 @@ QImageIOPlugin::Capabilities SoftimagePICPlugin::capabilities(QIODevice *device,
|
||||
return Capabilities(CanRead | CanWrite);
|
||||
}
|
||||
if (!format.isEmpty()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
if (!device->isOpen()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Capabilities cap;
|
||||
|
@ -300,10 +300,10 @@ QImageIOPlugin::Capabilities PSDPlugin::capabilities(QIODevice *device, const QB
|
||||
return Capabilities(CanRead);
|
||||
}
|
||||
if (!format.isEmpty()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
if (!device->isOpen()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Capabilities cap;
|
||||
|
@ -282,10 +282,10 @@ QImageIOPlugin::Capabilities RASPlugin::capabilities(QIODevice *device, const QB
|
||||
return Capabilities(CanRead);
|
||||
}
|
||||
if (!format.isEmpty()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
if (!device->isOpen()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Capabilities cap;
|
||||
|
@ -111,8 +111,8 @@ private:
|
||||
};
|
||||
|
||||
SGIImage::SGIImage(QIODevice *io) :
|
||||
_starttab(0),
|
||||
_lengthtab(0)
|
||||
_starttab(nullptr),
|
||||
_lengthtab(nullptr)
|
||||
{
|
||||
_dev = io;
|
||||
_stream.setDevice(_dev);
|
||||
@ -714,10 +714,10 @@ QImageIOPlugin::Capabilities RGBPlugin::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;
|
||||
|
@ -414,10 +414,10 @@ QImageIOPlugin::Capabilities TGAPlugin::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;
|
||||
|
@ -107,7 +107,7 @@ private:
|
||||
//! copied in different ways.
|
||||
void (*assignBytes)(Layer &layer, uint i, uint j);
|
||||
|
||||
Layer(void) : name(0) {}
|
||||
Layer(void) : name(nullptr) {}
|
||||
~Layer(void)
|
||||
{
|
||||
delete[] name;
|
||||
@ -416,7 +416,7 @@ bool XCFImageFormat::loadImageProperties(QDataStream &xcf_io, XCFImage &xcf_imag
|
||||
property.readBytes(tag, size);
|
||||
|
||||
quint32 flags;
|
||||
char *data = 0;
|
||||
char *data = nullptr;
|
||||
property >> flags >> data;
|
||||
|
||||
if (tag && strncmp(tag, "gimp-comment", strlen("gimp-comment")) == 0) {
|
||||
@ -474,7 +474,7 @@ bool XCFImageFormat::loadProperty(QDataStream &xcf_io, PropType &type, QByteArra
|
||||
xcf_io >> foo;
|
||||
type = PropType(foo); // TODO urks
|
||||
|
||||
char *data = 0;
|
||||
char *data = nullptr;
|
||||
quint32 size;
|
||||
|
||||
// The colormap property size is not the correct number of bytes:
|
||||
@ -1442,7 +1442,7 @@ void XCFImageFormat::copyLayerToImage(XCFImage &xcf_image)
|
||||
{
|
||||
Layer &layer(xcf_image.layer);
|
||||
QImage &image(xcf_image.image);
|
||||
PixelCopyOperation copy = 0;
|
||||
PixelCopyOperation copy = nullptr;
|
||||
|
||||
switch (layer.type) {
|
||||
case RGB_GIMAGE:
|
||||
@ -1725,7 +1725,7 @@ void XCFImageFormat::mergeLayerIntoImage(XCFImage &xcf_image)
|
||||
Layer &layer(xcf_image.layer);
|
||||
QImage &image(xcf_image.image);
|
||||
|
||||
PixelMergeOperation merge = 0;
|
||||
PixelMergeOperation merge = nullptr;
|
||||
|
||||
if (!layer.opacity) {
|
||||
return; // don't bother doing anything
|
||||
@ -2686,10 +2686,10 @@ QImageIOPlugin::Capabilities XCFPlugin::capabilities(QIODevice *device, const QB
|
||||
return Capabilities(CanRead);
|
||||
}
|
||||
if (!format.isEmpty()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
if (!device->isOpen()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Capabilities cap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user