Changeset View
Changeset View
Standalone View
Standalone View
src/view/kateviewinternal.cpp
Show First 20 Lines • Show All 3767 Lines • ▼ Show 20 Line(s) | 3702 | { | |||
---|---|---|---|---|---|
3768 | bool hideCursor = false; | 3768 | bool hideCursor = false; | ||
3769 | QColor caretColor; | 3769 | QColor caretColor; | ||
3770 | 3770 | | |||
3771 | if (m_imPreeditRange) { | 3771 | if (m_imPreeditRange) { | ||
3772 | qDeleteAll(m_imPreeditRangeChildren); | 3772 | qDeleteAll(m_imPreeditRangeChildren); | ||
3773 | m_imPreeditRangeChildren.clear(); | 3773 | m_imPreeditRangeChildren.clear(); | ||
3774 | 3774 | | |||
3775 | int decorationColumn = 0; | 3775 | int decorationColumn = 0; | ||
3776 | const auto attributes = e->attributes(); | 3776 | const auto &attributes = e->attributes(); | ||
3777 | for (auto &a : attributes) { | 3777 | for (auto &a : attributes) { | ||
3778 | if (a.type == QInputMethodEvent::Cursor) { | 3778 | if (a.type == QInputMethodEvent::Cursor) { | ||
3779 | newCursor = m_imPreeditRange->start() + KTextEditor::Cursor(0, a.start); | 3779 | newCursor = m_imPreeditRange->start() + KTextEditor::Cursor(0, a.start); | ||
3780 | hideCursor = !a.length; | 3780 | hideCursor = !a.length; | ||
3781 | QColor c = qvariant_cast<QColor>(a.value); | 3781 | QColor c = qvariant_cast<QColor>(a.value); | ||
3782 | if (c.isValid()) { | 3782 | if (c.isValid()) { | ||
3783 | caretColor = c; | 3783 | caretColor = c; | ||
3784 | } | 3784 | } | ||
Show All 34 Lines | 3814 | { | |||
3819 | if (!view()->textFolding().isLineVisible(pos.line())) { | 3819 | if (!view()->textFolding().isLineVisible(pos.line())) { | ||
3820 | return; | 3820 | return; | ||
3821 | } | 3821 | } | ||
3822 | 3822 | | |||
3823 | KTextEditor::Range range(pos, KTextEditor::Cursor(pos.line(), pos.column() + 1)); | 3823 | KTextEditor::Range range(pos, KTextEditor::Cursor(pos.line(), pos.column() + 1)); | ||
3824 | if (m_textAnimation) { | 3824 | if (m_textAnimation) { | ||
3825 | m_textAnimation->deleteLater(); | 3825 | m_textAnimation->deleteLater(); | ||
3826 | } | 3826 | } | ||
3827 | m_textAnimation = new KateTextAnimation(range, attribute, this); | 3827 | m_textAnimation = new KateTextAnimation(range, std::move(attribute), this); | ||
3828 | } | 3828 | } | ||
3829 | 3829 | | |||
3830 | void KateViewInternal::documentTextInserted(KTextEditor::Document *document, const KTextEditor::Range &range) | 3830 | void KateViewInternal::documentTextInserted(KTextEditor::Document *document, const KTextEditor::Range &range) | ||
3831 | { | 3831 | { | ||
3832 | #ifndef QT_NO_ACCESSIBILITY | 3832 | #ifndef QT_NO_ACCESSIBILITY | ||
3833 | if (QAccessible::isActive()) { | 3833 | if (QAccessible::isActive()) { | ||
3834 | QAccessibleTextInsertEvent ev(this, static_cast<KateViewAccessible *>(QAccessible::queryAccessibleInterface(this))->positionFromCursor(this, range.start()), document->text(range)); | 3834 | QAccessibleTextInsertEvent ev(this, static_cast<KateViewAccessible *>(QAccessible::queryAccessibleInterface(this))->positionFromCursor(this, range.start()), document->text(range)); | ||
3835 | QAccessible::updateAccessibility(&ev); | 3835 | QAccessible::updateAccessibility(&ev); | ||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |