From a9ab406a69f4edc4228cc2effbcde309fcdcf411 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. Pick-to: 6.8 Change-Id: I8048e26e890009cc8f6bc3ce49e2c01af1e89514 Reviewed-by: Ahmad Samir Reviewed-by: Thiago Macieira --- 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 fb93ecb8974..39fed08aeeb 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -45,13 +45,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)