From fa67208f8f864e2269ea3668031cc44006feb984 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 4 Apr 2022 15:06:36 +0200 Subject: [PATCH] QBufferPrivate: use NSDMI Removes some #ifdef'ery. Also remove the unneeded dtor. While this is a polymophic class, it's not in a header, so we won't run into the scenario described in QTBUG-45582. Pick-to: 6.3 Change-Id: I1a8598402ff2a564cc53da2f85ed3ed00ca3ddbf Reviewed-by: Fabian Kosmale Reviewed-by: Giuseppe D'Angelo --- src/corelib/io/qbuffer.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/corelib/io/qbuffer.cpp b/src/corelib/io/qbuffer.cpp index 8bf51709bca..3da76a35fb4 100644 --- a/src/corelib/io/qbuffer.cpp +++ b/src/corelib/io/qbuffer.cpp @@ -49,15 +49,9 @@ class QBufferPrivate : public QIODevicePrivate Q_DECLARE_PUBLIC(QBuffer) public: - QBufferPrivate() - : buf(nullptr) -#ifndef QT_NO_QOBJECT - , writtenSinceLastEmit(0), signalConnectionCount(0), signalsEmitted(false) -#endif - { } - ~QBufferPrivate() { } + QBufferPrivate() = default; - QByteArray *buf; + QByteArray *buf = nullptr; QByteArray defaultBuf; qint64 peek(char *data, qint64 maxSize) override; @@ -67,9 +61,9 @@ public: // private slots void _q_emitSignals(); - qint64 writtenSinceLastEmit; - int signalConnectionCount; - bool signalsEmitted; + qint64 writtenSinceLastEmit = 0; + int signalConnectionCount = 0; + bool signalsEmitted = false; #endif };