aboutsummaryrefslogtreecommitdiffstats
path: root/typesystem.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-11-14 13:06:52 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-11-14 13:07:22 -0300
commit4b1d0e2c4213066bca5f1363403875772abd6219 (patch)
treee673e2fda5e5cb4917b1cff56b7b5cd62bc9dbdf /typesystem.cpp
parenta98088877fc638ce9f068aaaa5fa4c7f883a1a87 (diff)
fixed the appending of code injection to the module;
previously only code injected from a file was being stored correctly in the module object, code written inside the 'inject-code' tag was always lost
Diffstat (limited to 'typesystem.cpp')
-rw-r--r--typesystem.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/typesystem.cpp b/typesystem.cpp
index ffbde3656..cc6db6ed2 100644
--- a/typesystem.cpp
+++ b/typesystem.cpp
@@ -344,9 +344,12 @@ bool Handler::characters(const QString &ch)
if (m_current->parent) {
if ((m_current->type & StackElement::CodeSnipMask)) {
+ CodeSnipList snips;
switch (m_current->parent->type) {
case StackElement::Root:
- ((TypeSystemTypeEntry *) m_current->parent->entry)->codeSnips().last().addCode(ch);
+ snips = m_current->parent->entry->codeSnips();
+ snips.last().addCode(ch);
+ m_current->parent->entry->setCodeSnips(snips);
break;
case StackElement::ModifyFunction:
case StackElement::AddFunction: