Changeset View
Changeset View
Standalone View
Standalone View
src/utils/katetemplatehandler.cpp
Show First 20 Lines • Show All 543 Lines • ▼ Show 20 Line(s) | |||||
544 | KateScript::FieldMap KateTemplateHandler::fieldMap() const | 544 | KateScript::FieldMap KateTemplateHandler::fieldMap() const | ||
545 | { | 545 | { | ||
546 | KateScript::FieldMap map; | 546 | KateScript::FieldMap map; | ||
547 | Q_FOREACH ( const auto& field, m_fields ) { | 547 | Q_FOREACH ( const auto& field, m_fields ) { | ||
548 | if ( field.kind != TemplateField::Editable ) { | 548 | if ( field.kind != TemplateField::Editable ) { | ||
549 | // only editable fields are of interest to the scripts | 549 | // only editable fields are of interest to the scripts | ||
550 | continue; | 550 | continue; | ||
551 | } | 551 | } | ||
552 | map.insert(field.identifier, QScriptValue(doc()->text(field.range->toRange()))); | 552 | map.insert(field.identifier, QJSValue(doc()->text(field.range->toRange()))); | ||
553 | } | 553 | } | ||
554 | return map; | 554 | return map; | ||
555 | } | 555 | } | ||
556 | 556 | | |||
557 | KTextEditor::ViewPrivate *KateTemplateHandler::view() const | 557 | KTextEditor::ViewPrivate *KateTemplateHandler::view() const | ||
558 | { | 558 | { | ||
559 | return m_view; | 559 | return m_view; | ||
560 | } | 560 | } | ||
561 | 561 | |