MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / detectLanguage

Method detectLanguage

src/dialogs/MainWindow.cpp:1768–1784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1766}
1767
1768void MainWindow::detectLanguage(ScintillaNext *editor)
1769{
1770 qInfo(Q_FUNC_INFO);
1771
1772 if (!editor->isFile()) {
1773 // Default to some specific language if it is not a file.
1774 setLanguage(editor, "Text");
1775 return;
1776 }
1777 else {
1778 const QString language_name = app->detectLanguage(editor);
1779
1780 setLanguage(editor, language_name);
1781 }
1782
1783 return;
1784}
1785
1786void MainWindow::activateEditor(ScintillaNext *editor)
1787{

Callers

nothing calls this directly

Calls 1

isFileMethod · 0.80

Tested by

no test coverage detected