Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
{
public:
QImageWriterPrivate();
+ ~QImageWriterPrivate();
// device
QByteArray format;
\internal
*/
QImageWriterPrivate::QImageWriterPrivate()
+ : device(Q_NULLPTR),
+ deleteDevice(false),
+ handler(Q_NULLPTR),
+ quality(-1),
+ compression(0),
+ gamma(0.0),
+ imageWriterError(QImageWriter::UnknownError),
+ errorString(QT_TRANSLATE_NOOP(QImageWriter, QLatin1String("Unknown error")))
{
- device = 0;
- deleteDevice = false;
- handler = 0;
- quality = -1;
- compression = 0;
- gamma = 0.0;
- imageWriterError = QImageWriter::UnknownError;
- errorString = QT_TRANSLATE_NOOP(QImageWriter, QLatin1String("Unknown error"));
+}
+
+QImageWriterPrivate::~QImageWriterPrivate()
+{
+ if (deleteDevice)
+ delete device;
+ delete handler;
}
/*!
*/
QImageWriter::~QImageWriter()
{
- if (d->deleteDevice)
- delete d->device;
- delete d->handler;
delete d;
}