| 424 | } |
| 425 | |
| 426 | void Editor::toggleTextBlockDirection() |
| 427 | { |
| 428 | QTextBlock currentBlock = textCursor().block(); |
| 429 | Qt::LayoutDirection currentDirection = currentBlock.layout()->textOption().textDirection(); |
| 430 | if (currentDirection == Qt::LeftToRight) { |
| 431 | setTextBlockDirection(Qt::RightToLeft); |
| 432 | } |
| 433 | else { |
| 434 | setTextBlockDirection(Qt::LeftToRight); |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | void Editor::setTextBlockDirection(Qt::LayoutDirection dir) |
| 439 | { |
nothing calls this directly
no outgoing calls
no test coverage detected