Changeset View
Changeset View
Standalone View
Standalone View
layers/selections/text/kpPreeditText.cpp
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
46 | //--------------------------------------------------------------------- | 46 | //--------------------------------------------------------------------- | ||
47 | 47 | | |||
48 | kpPreeditText::kpPreeditText (const QInputMethodEvent *event) | 48 | kpPreeditText::kpPreeditText (const QInputMethodEvent *event) | ||
49 | : m_cursorPosition (0), m_cursorColor (Qt::transparent), | 49 | : m_cursorPosition (0), m_cursorColor (Qt::transparent), | ||
50 | m_selectionStart (0), m_selectionLength (0), | 50 | m_selectionStart (0), m_selectionLength (0), | ||
51 | m_position (-1, -1) | 51 | m_position (-1, -1) | ||
52 | { | 52 | { | ||
53 | m_preeditString = event->preeditString (); | 53 | m_preeditString = event->preeditString (); | ||
54 | foreach (const QInputMethodEvent::Attribute &attr, event->attributes ()) | 54 | for (const auto &attr : event->attributes ()) | ||
55 | { | 55 | { | ||
56 | switch (attr.type) | 56 | switch (attr.type) | ||
57 | { | 57 | { | ||
58 | case QInputMethodEvent::TextFormat: | 58 | case QInputMethodEvent::TextFormat: | ||
59 | m_textFormatList.append (attr); | 59 | m_textFormatList.append (attr); | ||
60 | break; | 60 | break; | ||
61 | case QInputMethodEvent::Cursor: | 61 | case QInputMethodEvent::Cursor: | ||
62 | m_cursorPosition = attr.start; | 62 | m_cursorPosition = attr.start; | ||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |