diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-02-02 17:11:37 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-02-02 17:44:27 -0200 |
commit | f6c452eb4e262f3870846316000dfa8e02983a32 (patch) | |
tree | 95400a842c854ac5bab3cde2dfe1d00735f198ea /shibokengenerator.cpp | |
parent | aade17f52185d7c1b0e412aaf678cb9c7ea8a28d (diff) |
Do not add an extra indentation on code injections.
Write an comment on start and ending of code injections.
Diffstat (limited to 'shibokengenerator.cpp')
-rw-r--r-- | shibokengenerator.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp index 039adb527..fb7cf7353 100644 --- a/shibokengenerator.cpp +++ b/shibokengenerator.cpp @@ -801,7 +801,6 @@ void ShibokenGenerator::writeCodeSnips(QTextStream& s, QString code; QTextStream tmpStream(&code); Indentation indent1(INDENT); - Indentation indent2(INDENT); formatCode(tmpStream, snip.code(), INDENT); if (context) { @@ -984,7 +983,11 @@ void ShibokenGenerator::writeCodeSnips(QTextStream& s, replaceTemplateVariables(code, func); } - s << code; + if (!code.isEmpty()) { + s << INDENT << "// Begin code injection" << endl; + s << code; + s << INDENT << "// End of code injection" << endl; + } } } |