summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2020-01-07 19:29:28 +0100
committerAleix Pol <aleixpol@kde.org>2020-01-08 16:13:12 +0100
commitc1f6942c6b2318a73ae1424be02e442c7c5cd292 (patch)
treeee952fbf758d9b615ab012c4cefa76e5e952416e
parent222455cd643c128fa9730c9c527a7fdcadd0acfe (diff)
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 <johan.helsing@qt.io>
-rw-r--r--src/qtwaylandscanner/qtwaylandscanner.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qtwaylandscanner/qtwaylandscanner.cpp b/src/qtwaylandscanner/qtwaylandscanner.cpp
index 24977a2f2..05f00beee 100644
--- a/src/qtwaylandscanner/qtwaylandscanner.cpp
+++ b/src/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());