From f31330eeac41f0c8bf20ba7427c865d29ec03a65 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 7 Jan 2020 19:29:28 +0100 Subject: [PATCH] Add a comment at the top explaining where the generated file comes from It's useful to have the source of the generated file on top when reaching it from the IDE. Also it is useful to explain that it's a generated file at all. [ChangeLog][qtwaylandscanner] Include a comment on top explaining what xml file is being represented. Change-Id: Ie0584295791f246b0e8c83e0afd3a521f6bdbb2e Reviewed-by: Johan Helsing --- src/tools/qtwaylandscanner/qtwaylandscanner.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/qtwaylandscanner/qtwaylandscanner.cpp b/src/tools/qtwaylandscanner/qtwaylandscanner.cpp index 24977a2f234..05f00beee7b 100644 --- a/src/tools/qtwaylandscanner/qtwaylandscanner.cpp +++ b/src/tools/qtwaylandscanner/qtwaylandscanner.cpp @@ -467,6 +467,9 @@ bool Scanner::process() if (m_xml->hasError()) return false; + printf("// This file was generated by qtwaylandscanner\n"); + printf("// source file is %s\n\n", qPrintable(m_protocolFilePath)); + for (auto b : qAsConst(m_includes)) printf("#include %s\n", b.constData());