From c8771a30826313d36327c21ce4eb6e3e2bccbe46 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 18 Jul 2024 22:41:39 +0200 Subject: [PATCH] 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 Reviewed-by: Thiago Macieira (cherry picked from commit a9ab406a69f4edc4228cc2effbcde309fcdcf411) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/io/qdebug.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index 6d48c7853d4..35ce50a0f15 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -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)