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 <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2024-07-18 22:41:39 +02:00
parent 47c2263e89
commit a9ab406a69

View File

@ -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)