MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / openFile

Method openFile

src/plugins/codeeditor/gui/texteditor.cpp:49–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void 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
67void TextEditor::openFileWithDocument(const QString &fileName, const QsciDocument &doc)
68{

Callers

nothing calls this directly

Calls 3

loadLexerMethod · 0.80
initLanguageClientMethod · 0.80
readFileMethod · 0.45

Tested by

no test coverage detected