| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
${AnyProject}::updateCppCodeModel() did two potentially not that cheap
operations in the ui thread:
(1) Querying the MimeDatabase for the mime type for the source files of
the project. In 99.9% of the cases no files need to be read for
this as the file extension will resolve the type. The expensiveness
comes from the sheer number of files that can occur.
(2) Calling compilers with the "(sub)project's compiler command line"
to determine the macros. While the caches avoid redundant calls,
the number of the unique compiler calls makes this still a
ui-freezing experience.
These two operations are moved into a worker thread. For this, the
expensive compiler calls are encapsulated in thread safe lambdas
("runners") in order to keep the "mutexed" data minimal. The original
API calls of the toolchains are implemented in terms of the runners.
While adapting the project managers, remove also the calls to
setProjectLanguage(). These are redundant because all of the project
managers already set a proper value in the constructor. Also, currently
there is no need (client) to report back detection of C sources in
project parts. This also keeps CppProjectUpdater simple.
There is still room for improvement:
* Run the compiler calls in parallel instead of sequence.
* Ensure that the mime type for a file is determined exactly once.
Change-Id: I2efc4e132ee88e3c8f264012ec8fafe3d86c404f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
| |
...for Project::setProjectLanguage().
Change-Id: I77347c4597061fb48782c629d5ad6898028fee13
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
|
| |
We don't need two IDs for C++ and the QmlJS ID should look the same as
as the others.
Change-Id: Ib9747f6b36a90bb652951d85eec69666615670c4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
| |
Change-Id: I728a2ed1ef7d9f44d7c2b59d27d6e23444cd3bb5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
...for a given file in the ambiguous case (CppModelManager::projectPart).
There are several places where the first one will be preferred if there
are multiple project parts associated with a project file.
Change-Id: Ic01ea06277bc10f872238dcc181a55532b5783be
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
...as the other project managers.
This removes extra code paths, duplication and improves classification
of source files (ambiguous headers).
Change-Id: Iae05cbbc61ab2e5dd841ae617bec994e0a1e52d5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
| |
Change-Id: Ia7969ceb52ffb25e7c63b24bc33b091001e9b50a
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
|
|
|
|
|
| |
...instead, use the latest we support.
Change-Id: I7e7768bc4bc31de1fe0f441c03f3ab5d677d76e8
Reviewed-by: David Schulz <david.schulz@qt.io>
|
|
...and add some basic tests.
Introduce the abstractions ProjectInterface and ToolChainInterface in
order to break the dependency to the ProjectExplorer. Also, some simple
logic can go there to simplify the (Base)ProjectPartBuilder.
Change-Id: I6c50a1804ce62098b87109931eb171f5c2542937
Reviewed-by: David Schulz <david.schulz@qt.io>
|