Changeset View
Changeset View
Standalone View
Standalone View
templates/scriptabletags/scriptablecontext.cpp
Show All 36 Lines | |||||
37 | { | 37 | { | ||
38 | m_c->insert(name, variant); | 38 | m_c->insert(name, variant); | ||
39 | } | 39 | } | ||
40 | 40 | | |||
41 | void ScriptableContext::push() { m_c->push(); } | 41 | void ScriptableContext::push() { m_c->push(); } | ||
42 | 42 | | |||
43 | void ScriptableContext::pop() { m_c->pop(); } | 43 | void ScriptableContext::pop() { m_c->pop(); } | ||
44 | 44 | | |||
45 | QString ScriptableContext::render(const QObjectList &list) const | 45 | QString ScriptableContext::render(const QList<QObject *> &list) const | ||
46 | { | 46 | { | ||
47 | NodeList nodeList; | 47 | NodeList nodeList; | ||
48 | QListIterator<QObject *> it(list); | 48 | QListIterator<QObject *> it(list); | ||
49 | while (it.hasNext()) { | 49 | while (it.hasNext()) { | ||
50 | auto node = qobject_cast<Node *>(it.next()); | 50 | auto node = qobject_cast<Node *>(it.next()); | ||
51 | if (node) | 51 | if (node) | ||
52 | nodeList << node; | 52 | nodeList << node; | ||
53 | } | 53 | } | ||
54 | QString ret; | 54 | QString ret; | ||
55 | QTextStream t(&ret); | 55 | QTextStream t(&ret); | ||
56 | OutputStream stream(&t); | 56 | OutputStream stream(&t); | ||
57 | nodeList.render(&stream, m_c); | 57 | nodeList.render(&stream, m_c); | ||
58 | return ret; | 58 | return ret; | ||
59 | } | 59 | } |