| 548 | */ |
| 549 | |
| 550 | void KUndo2QStack::setIndex(int idx, bool clean) |
| 551 | { |
| 552 | bool was_clean = m_index == m_clean_index; |
| 553 | |
| 554 | if (idx != m_index) { |
| 555 | m_index = idx; |
| 556 | Q_EMIT indexChanged(m_index); |
| 557 | Q_EMIT canUndoChanged(canUndo()); |
| 558 | Q_EMIT undoTextChanged(undoText()); |
| 559 | Q_EMIT canRedoChanged(canRedo()); |
| 560 | Q_EMIT redoTextChanged(redoText()); |
| 561 | } |
| 562 | |
| 563 | if (clean) |
| 564 | m_clean_index = m_index; |
| 565 | |
| 566 | bool is_clean = m_index == m_clean_index; |
| 567 | if (is_clean != was_clean) |
| 568 | Q_EMIT cleanChanged(is_clean); |
| 569 | } |
| 570 | |
| 571 | void KUndo2QStack::purgeRedoState() |
| 572 | { |
no test coverage detected