aboutsummaryrefslogtreecommitdiffstats
path: root/typesystem.cpp
diff options
context:
space:
mode:
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: