diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp index fc70e066f78..ff9c96ca4d0 100644 --- a/src/corelib/io/qdebug.cpp +++ b/src/corelib/io/qdebug.cpp @@ -318,7 +318,7 @@ void QDebug::putString(const QChar *begin, size_t length) // we'll reset the QTextStream formatting mechanisms, so save the state QDebugStateSaver saver(*this); stream->ts.d_ptr->params.reset(); - putEscapedString(stream->ts.d_ptr.data(), reinterpret_cast(begin), length); + putEscapedString(stream->ts.d_ptr.get(), reinterpret_cast(begin), length); } } @@ -338,7 +338,7 @@ void QDebug::putByteArray(const char *begin, size_t length, Latin1Content conten // we'll reset the QTextStream formatting mechanisms, so save the state QDebugStateSaver saver(*this); stream->ts.d_ptr->params.reset(); - putEscapedString(stream->ts.d_ptr.data(), reinterpret_cast(begin), + putEscapedString(stream->ts.d_ptr.get(), reinterpret_cast(begin), length, content == ContainsLatin1); } } diff --git a/src/corelib/serialization/qtextstream.h b/src/corelib/serialization/qtextstream.h index 7a0fc42a68b..84fa14ec5ed 100644 --- a/src/corelib/serialization/qtextstream.h +++ b/src/corelib/serialization/qtextstream.h @@ -6,9 +6,10 @@ #include #include -#include #include +#include + #include #if 0 @@ -174,7 +175,7 @@ private: friend class QDebugStateSaverPrivate; friend class QDebug; - QScopedPointer d_ptr; + std::unique_ptr d_ptr; }; Q_DECLARE_OPERATORS_FOR_FLAGS(QTextStream::NumberFlags)