Name Description Size Coverage
CMakeLists.txt 2508 -
codeActionSupport -
documentSymbolSupport -
qdochtmlparser.cpp ! \internal \brief Process the string obtained from start mark to end mark. This is duplicated from QtC's Utils::HtmlExtractor, modified on top of it. 7741 -
qdochtmlparser_p.h 1126 -
qlanguageserver.cpp ! \internal \class QLanguageServer \brief Implements a server for the language server protocol QLanguageServer is a class that uses the QLanguageServerProtocol to provide a server implementation. It handles the lifecycle management, and can be extended via QLanguageServerModule subclasses. The language server keeps a strictly monotonically increasing runState that can be queried from any thread (and is thus mutex gated), the normal run state is Initialized. The language server also keeps track of the task canceled by the client (or implicitly when shutting down, and isRequestCanceled can be called from any thread. 9402 -
qlanguageserver_p.h 2217 -
qlanguageserver_p_p.h 1842 -
qlspcustomtypes_p.h 1235 -
qmllsmain.cpp just a header, do nothing 19779 -
qmllsmain_p.h 662 -
qprocessscheduler.cpp ! \internal \class QProcessScheduler \brief Runs multiple processes sequentially via a QProcess, and signals once they are done. QProcessScheduler runs multiple programs sequentially through a QProcess, and emits the \c done signal once all programs finished. Use schedule(programs, id) to add new programs to be run. The id is used to signal their completion. Duplicate programs that already are in the queue are not re-added to the queue. 5498 -
qprocessscheduler_p.h 2315 -
qqmlbasemodule_p.h ! \internal \brief This class sends a result or an error when going out of scope. It has a helper method \c setErrorFrom that sets an error from variant and optionals. 9339 -
qqmlcodemodel.cpp ! \internal \class QQmlCodeModel The code model offers a view of the current state of the current files, and traks open files. All methods are threadsafe, and generally return immutable or threadsafe objects that can be worked on from any thread (unless otherwise noted). The idea is the let all other operations be as lock free as possible, concentrating all tricky synchronization here. \section2 Global views \list \li currentEnv() offers a view that contains the latest version of all the loaded files \li validEnv() is just like current env but stores only the valid (meaning correctly parsed, not necessarily without errors) version of a file, it is normally a better choice to load the dependencies/symbol information from \endlist \section2 OpenFiles \list \li snapshotByUrl() returns an OpenDocumentSnapshot of an open document. From it you can get the document, its latest valid version, scope, all connected to a specific version of the document and immutable. The signal updatedSnapshot() is called every time a snapshot changes (also for every partial change: document change, validDocument change, scope change). \li openDocumentByUrl() is a lower level and more intrusive access to OpenDocument objects. These contains the current snapshot, and shared pointer to a Utils::TextDocument. This is *always* the current version of the document, and has line by line support. Working on it is more delicate and intrusive, because you have to explicitly acquire its mutex() before *any* read or write/modification to it. It has a version nuber which is supposed to always change and increase. It is mainly used for highlighting/indenting, and is immediately updated when the user edits a document. Its use should be avoided if possible, preferring the snapshots. \endlist \section2 Parallelism/Theading Most operations are not parallel and usually take place in the main thread (but are still thread safe). There is one task that is executed in parallel: OpenDocumentUpdate. OpenDocumentUpdate keeps the snapshots of the open documents up to date. There is always a tension between being responsive, using all threads available, and avoid to hog too many resources. One can choose different parallelization strategies, we went with a flexiable approach. We have (private) functions that execute part of the work: openUpdateSome(). These do all locking needed, get some work, do it without locks, and at the end update the state of the code model. If there is more work, then they return true. Thus while (xxxSome()); works until there is no work left. The internal addOpenToUpdate() add more work to do. openNeedUpdate() checks if there is work to do, and if yes ensure that a worker thread (or more) that work on it exist. 32507 -
qqmlcodemodel_p.h 8276 -
qqmlcodemodelmanager.cpp ! \internal Enable and initialize the functionality that uses CMake, if CMake exists. \note Set the buildpaths before calling this method! 14263 -
qqmlcodemodelmanager_p.h 5430 -
qqmlcompletioncontextstrings.cpp 1681 -
qqmlcompletioncontextstrings_p.h 1975 -
qqmlcompletionsupport.cpp ! \internal \note Remove this method and all its usages once the new fault-tolerant parser from QTBUG-118053 is introduced!!! Tries to make the document valid for the parser, to be able to provide completions after dots. The created DomItem is not in the qqmlcodemodel which mean it cannot be seen and cannot bother other modules: it would be bad to have the linting module complain about code that was modified here, but cannot be seen by the user. 8255 -
qqmlcompletionsupport_p.h 1970 -
qqmldiffer.cpp The main algorithm "diffMyers()" is based on "An O(ND) Difference Algorithm and Its Variations" by Eugene W. Myers: http://www.xmailserver.org/diff2.pdf Preprocessing and postprocessing functions inspired by "Diff Strategies" publication by Neil Fraser: http://neil.fraser.name/writing/diff/ 17212 -
qqmldiffer_p.h 2365 -
qqmlfindusagessupport.cpp 2086 -
qqmlfindusagessupport_p.h 1467 -
qqmlformatting.cpp 3523 -
qqmlformatting_p.h 1386 -
qqmlgotodefinitionsupport.cpp 2224 -
qqmlgotodefinitionsupport_p.h 1492 -
qqmlgototypedefinitionsupport.cpp 1987 -
qqmlgototypedefinitionsupport_p.h 1523 -
qqmlhighlightsupport.cpp ! \internal Make a list of enum names to register the supported token types and modifiers. It is case-sensitive in the protocol thus we need to lower the first characters of the enum names. 10026 -
qqmlhighlightsupport_p.h 3943 -
qqmlhover.cpp 2539 -
qqmlhover_p.h 1203 -
qqmllanguageserver.cpp ! \internal \class QmlLsp::QQmlLanguageServer \brief Sets up a QmlLanguageServer. This class sets up a QML language server. Use the following function to send replies: \code std::function<void(const QByteArray &)> sendData \endcode And, feed the data that the function receives to the \c {server()->receive()} method. Call this method only from a single thread, and do not block. To achieve this, avoid direct calls, and connect the method as a slot, while reading from another thread. The various tasks of the language server are divided between QLanguageServerModule instances. Each instance is responsible for handling a certain subset of client requests. For example, one instance handles completion requests, another one updates the code in the code model when the client sends a new file version, and so on. The QLanguageServerModule instances are constructed and registered with QLanguageServer in the constructor of this class. Generally, do all operations in the object thread and always call handlers from it. However, the operations can delegate the response to another thread, as the response handler is thread safe. All the methods of the \c server() object are also thread safe. The code model starts other threads to update its state. See its documentation for more information. 4205 -
qqmllanguageserver_p.h 3013 -
qqmllintsuggestions.cpp 14848 -
qqmllintsuggestions_p.h 1893 -
qqmllscompletion.cpp ! \class QQmlLSCompletion \internal \brief QQmlLSCompletion provides completions for all kinds of QML and JS constructs. Use the \l{completions} method to obtain completions at a certain DomItem. All the other methods in this class are helper methods: some compute completions for specific QML and JS constructs and some are shared between multiple QML or JS constructs to avoid code duplication. Most of the helper methods add their completion items via a BackInsertIterator. Some helper methods are called "suggest*" and will try to suggest code that does not exist yet. For example, any JS statement can be expected inside a Blockstatement so suggestJSStatementCompletion() is used to suggest JS statements inside of BlockStatements. Another example might be suggestReachableTypes() that will suggest Types for type annotations, attached types or Qml Object hierarchies, or suggestCaseAndDefaultStatementCompletion() that will only suggest "case" and "default" clauses for switch statements. Some helper methods are called "inside*" and will try to suggest code inside an existing structure. For example, insideForStatementCompletion() will try to suggest completion for the different code pieces initializer, condition, increment and statement that exist inside of: \badcode for(initializer; condition; increment) statement \endcode 83784 -
qqmllscompletion_p.h 13589 -
qqmllscompletionplugin.cpp 231 -
qqmllscompletionplugin_p.h 1325 -
qqmllshelpplugininterface.cpp 234 -
qqmllshelpplugininterface_p.h 2164 -
qqmllshelputils.cpp 12458 -
qqmllshelputils_p.h 2367 -
qqmllsplugin_p.h 1055 -
qqmllsutils.cpp ! \internal Helper to check if item is a Field Member Expression \c {<someExpression>.propertyName}. 104144 -
qqmllsutils_p.h ! Represents a rename operation where the file itself needs to be renamed. \internal 11194 -
qqmlprogresssupport.cpp 5510 -
qqmlprogresssupport_p.h 2042 -
qqmlrangeformatting.cpp 5051 -
qqmlrangeformatting_p.h 1264 -
qqmlrenamesymbolsupport.cpp 3900 -
qqmlrenamesymbolsupport_p.h 1243 -
qqmlsemantictokens.cpp 74119 -
qqmlsemantictokens_p.h 8452 -
qtextblock.cpp 1824 -
qtextblock_p.h 1619 -
qtextcursor.cpp 2725 -
qtextcursor_p.h 1665 -
qtextdocument.cpp 3199 -
qtextdocument_p.h 1839 -
qtextsynchronization.cpp 3862 -
qtextsynchronization_p.h 1384 -
qworkspace.cpp 5563 -
qworkspace_p.h 1272 -