MCPcopy Create free account
hub / github.com/cpeditor/cpeditor / onEditorTextChanged

Method onEditorTextChanged

src/appwindow.cpp:970–995  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

968}
969
970void AppWindow::onEditorTextChanged(MainWindow *window)
971{
972 int index = ui->tabWidget->indexOf(window);
973 if (index != -1)
974 {
975 auto title = ui->tabWidget->tabText(index);
976 // assume the clean title doesn't end with " *"
977 if (title.endsWith(" *"))
978 title.chop(2);
979 if (windowAt(index)->isTextChanged())
980 title += " *";
981 ui->tabWidget->setTabText(index, title);
982
983 if (window == currentWindow())
984 {
985 if (window->getLanguage() == "C++")
986 lspTimerCpp->start();
987 else if (window->getLanguage() == "Java")
988 lspTimerJava->start();
989 else
990 lspTimerPython->start();
991
992 triggerWakaTime(window);
993 }
994 }
995}
996
997void AppWindow::updateLanguageServerFilePath(MainWindow *window, const QString &path)
998{

Callers

nothing calls this directly

Calls 3

isTextChangedMethod · 0.80
getLanguageMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected