| 1452 | } |
| 1453 | |
| 1454 | void MainWindow::copyAsFormat(Converter *converter, const QString &mimeType) |
| 1455 | { |
| 1456 | // This is not ideal as we are *assuming* the converter is currently associated with the currentEditor() |
| 1457 | ScintillaNext *editor = currentEditor(); |
| 1458 | QByteArray buffer; |
| 1459 | QTextStream stream(&buffer); |
| 1460 | |
| 1461 | if (editor->selectionEmpty()) |
| 1462 | converter->convert(stream); |
| 1463 | else { |
| 1464 | converter->convertRange(stream, editor->selectionStart(), editor->selectionEnd()); |
| 1465 | } |
| 1466 | |
| 1467 | QMimeData *mimeData = new QMimeData(); |
| 1468 | mimeData->setData(mimeType, buffer); |
| 1469 | |
| 1470 | QApplication::clipboard()->setMimeData(mimeData); |
| 1471 | } |
| 1472 | |
| 1473 | void MainWindow::renameFile() |
| 1474 | { |
nothing calls this directly
no test coverage detected