From 75a065d3d1f22afb9fdbe6011f162c57ed58c1e0 Mon Sep 17 00:00:00 2001 From: Leander Schulten Date: Fri, 23 Aug 2019 22:42:30 +0200 Subject: [PATCH] DoxygenGenerator: Ignore Q_INVOKABLE in front of function declarations Otherwise the doxygen generation will not work. Fixes: QTCREATORBUG-12411 Change-Id: I3e887dfeb5caba727da6e56a056c092c5a2e23f9 Reviewed-by: Nikolai Kosjar --- src/plugins/cpptools/doxygengenerator.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/cpptools/doxygengenerator.cpp b/src/plugins/cpptools/doxygengenerator.cpp index c11cb4d7cba..702f92e5247 100644 --- a/src/plugins/cpptools/doxygengenerator.cpp +++ b/src/plugins/cpptools/doxygengenerator.cpp @@ -108,6 +108,10 @@ QString DoxygenGenerator::generate(QTextCursor cursor, return QString(); QString declCandidate = cursor.selectedText(); + + if (declCandidate.startsWith(QLatin1String("Q_INVOKABLE"))) + declCandidate = declCandidate.mid(11); + declCandidate.replace(QChar::ParagraphSeparator, QLatin1Char('\n')); // Let's append a closing brace in the case we got content like 'class MyType {'