QDebug: make Stream ctors explicit

Their argument types are not faithful representations of a Stream
object, so ctors should not be implicit. Besides, the QDebug ctors
that delegate to these Stream ctors are explicit, too, with the same
arguments.

Change-Id: I8048e26e890009cc8f6bc3ce49e2c01af1e89514
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a9ab406a69f4edc4228cc2effbcde309fcdcf411)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2024-07-18 22:41:39 +02:00 committed by Qt Cherry-pick Bot
parent 0471e845e4
commit c8771a3082

View File

@ -44,13 +44,13 @@ class QT6_ONLY(Q_CORE_EXPORT) QDebug : public QIODeviceBase
struct Stream {
enum { VerbosityShift = 29, VerbosityMask = 0x7 };
Stream(QIODevice *device)
explicit Stream(QIODevice *device)
: ts(device)
{}
Stream(QString *string)
explicit Stream(QString *string)
: ts(string, WriteOnly)
{}
Stream(QtMsgType t)
explicit Stream(QtMsgType t)
: ts(&buffer, WriteOnly),
type(t),
message_output(true)