From d135c9ea0045f7219ba79ebfa759663baa224c26 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Tue, 21 Jan 2025 12:28:01 +0100 Subject: [PATCH] Restore the docs for QFlags debug streaming operator The unconstrained implementation was removed, so qdoc was not able to find a proper function. Provide a fake definition that matches what qdoc expects. In this case the users shouldn't really care about the constraints that the actual implementation has. Amends 0c707c6ebece18677deaccccdfec5d48c587106f. Found in Qt 6.9 API review. Change-Id: I6207b491fa94cc62d217af7dc7687923dc6971a4 Reviewed-by: Fabian Kosmale Reviewed-by: Paul Wicking Reviewed-by: Thiago Macieira (cherry picked from commit b1509550436400ec9be608b5c760501d9b86912a) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/io/qdebug.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index 582ee942952..872b5e5d79e 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -650,6 +650,11 @@ inline QDebug operator<<(QDebug debug, Flags flags) } } +#ifdef Q_QDOC +template +QDebug operator<<(QDebug debug, const QFlags &flags); +#endif // Q_QDOC + #if !defined(QT_NO_QOBJECT) && !defined(Q_QDOC) // Debugging of plain enums. There are three cases: // 1) the enum is part of a Q_DECLARE_FLAGS and there's a Q_FLAG for that