| 47 | } |
| 48 | |
| 49 | void TextEditor::openFile(const QString &fileName) |
| 50 | { |
| 51 | if (d->fileName == fileName) |
| 52 | return; |
| 53 | |
| 54 | beginUndoAction(); |
| 55 | d->isAutoCompletionEnabled = false; |
| 56 | d->fileName = fileName; |
| 57 | setReadOnly(!QFileInfo(fileName).isWritable()); |
| 58 | d->readFile(""); |
| 59 | setModified(false); |
| 60 | editor.fileOpened(fileName); |
| 61 | d->loadLexer(); |
| 62 | d->initLanguageClient(); |
| 63 | d->isAutoCompletionEnabled = true; |
| 64 | endUndoAction(); |
| 65 | } |
| 66 | |
| 67 | void TextEditor::openFileWithDocument(const QString &fileName, const QsciDocument &doc) |
| 68 | { |
nothing calls this directly
no test coverage detected