| 4705 | |
| 4706 | |
| 4707 | void Widget::checkEditorInstructionsFile() |
| 4708 | // ---------------------------------------------------------------------------- |
| 4709 | // Check if the Tao editor left instructions for us |
| 4710 | // ---------------------------------------------------------------------------- |
| 4711 | { |
| 4712 | QString instrsFile = +xlProgram->name + ".tao-instrs"; |
| 4713 | QFileInfo instrsInfo(instrsFile); |
| 4714 | if (instrsInfo.exists()) |
| 4715 | { |
| 4716 | QFile file(instrsInfo.absoluteFilePath()); |
| 4717 | file.open(QIODevice::ReadOnly); |
| 4718 | QTextStream textStream(&file); |
| 4719 | textStream.setAutoDetectUnicode(true); |
| 4720 | text data = +textStream.readAll(); |
| 4721 | file.close(); |
| 4722 | file.remove(); |
| 4723 | |
| 4724 | unsigned pnum = 0, pid = 0; |
| 4725 | if (sscanf(data.c_str(), "page %u id %u", &pnum, &pid) == 2) |
| 4726 | { |
| 4727 | if (pnum) |
| 4728 | { |
| 4729 | pnum--; |
| 4730 | if (pnum < pageNames.size()) |
| 4731 | { |
| 4732 | gotoPageName = pageNames[pnum]; |
| 4733 | QString previewScreenShot = QString("%1-preview-%2.png") |
| 4734 | .arg(+xlProgram->name).arg(pid); |
| 4735 | savePreviewThread.setMaxSize(800, 600); |
| 4736 | savePreviewThread.setInterval(533); |
| 4737 | savePreviewThread.setPath(previewScreenShot); |
| 4738 | refresh(0); |
| 4739 | } |
| 4740 | } |
| 4741 | } |
| 4742 | } |
| 4743 | } |
| 4744 | |
| 4745 | |
| 4746 | void Widget::preloadSelectionCode() |
nothing calls this directly
no test coverage detected