| 1494 | } |
| 1495 | |
| 1496 | void handle(QAction* action, QLineEdit* lineEdit) { |
| 1497 | if (!m_actionPointers.contains(action)) |
| 1498 | return; |
| 1499 | |
| 1500 | const int cursorPos = lineEdit->cursorPosition(); |
| 1501 | const int index = action->data().toUInt(); |
| 1502 | const QString& before = m_insertBefore[index]; |
| 1503 | const QString& after = m_insertAfter[index]; |
| 1504 | lineEdit->insert(before + after); |
| 1505 | lineEdit->setCursorPosition(cursorPos + before.count()); |
| 1506 | lineEdit->setFocus(); |
| 1507 | } |
| 1508 | }; |
| 1509 | |
| 1510 | struct ParInfo { |
no test coverage detected