${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>
Move the target detection code from the QnxConfiguration class into a
separate function that can be used by the QnxConfiguration code and
the QnxToolChain code.
Move some resetToolChain calls after setSdpPath calls. QNX ABI
detection depends on the SDP path.
Change-Id: I7417a5a1064a77edfb113d9d0010f1e061b81ca6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Remove a bunch of BlackBerry specific code blocks and functions.
Change most instances of NDK/SDK (the BlackBerry terms) to SDP (the QNX
term). To maintain backward compatibility, some instances of NDK/SDK
that end up in external files have been left as is.
Change-Id: I8f589601542983323e41e7b2dd7822914d971623
Reviewed-by: hjk <hjk@qt.io>
Change the code so that it detects a lot things that were previously
hard-coded.
Replace QnxArchitecture with Abi. There doesn't appear to be a good
reason to have a separate type.
The removal of Arch from qtversion.xml breaks backward compatibility.
Change-Id: Ic4f3a2de64f3f875841b73e9b12bbe0ea454eee8
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Enable creation of toolchains for different languages and wire
up the logic in the ToolChain Options Page.
Change-Id: I9fbd95607d30cc1aa10f73d6532338f07f3e2b4e
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
* Add a pure virtual method to get supportedLanguges with
Change-Id: Ida4445ca045c90fb9f7656a661af83e5b6801b30
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
* Add code to toolchains
* Assert that this is the case in the toolchainmanager
Change-Id: I82452689e83279fd9d1afb3140b0070bef9b6cd8
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Trigger ToolChainManager::toolChainChanged signal when something
changes. This was apparently missing in quite a few places of
some of the tool chains.
Change-Id: Ic94c6559e6267f4ff22dc74cc5b0865fb7aeac63
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The target triple will be used by the Clang Static Analyzer.
Change-Id: Ibf33fef286a4d3ad3f40be4d6d5c9f35881d3d46
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Consistently use Utils::FileNameList in favor of QList<Utils::FileName>
Change-Id: Iafbb466c882bfd91c25c9e78f107d401bfdb6d55
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
The name is overly generic, particularly with a pathChanged() signal
also present. Rename to "rawPathChanged", which adequately describes the
semantics.
Change-Id: Ia62b8b0a97a794cb6d5ad6b8ce0abcd36b5f5cdb
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This is the same as ToolChain::typeId(), so it should have the same
name.
Change-Id: Ifd344825be801aff3dab96bfe924a1984a77bbee
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
That should take a couple of bytes less to store. Make sure this
change is invisible to the configuration files.
Change-Id: If5e73b52493c9164de9e342021d8153d274b350f
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Keep QNX.
A short informal search did not turn up any more blackberry users,
even though there is interest in QNX. So this patch removes the
platform: We had no contact with the maintainers in months, there
are no changes going into the code for about as long.
I am not even aware of anybody testing the platform, so any
remaining users are probably better of with Qt Creator 3.2 or so
where the code was extensively tested.
Change-Id: Ibeda6bfd8565599918cfcc08fd01cb5ed8793dc2
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Do not rerun the compiler when setting up a new tool chain. All
the necessary data is already there, so there is no need to re-get
it.
This reduces the number of gcc runs at startup from 10 to 6 in
my settup (g++ and clang available on Linux).
Change-Id: Id02e79f52ab7a69d5edf84b711ab148d7bc43f21
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Add a QnxBaseConfiguration class as base class for
the BlackBerryApiLevelConfiguration and the new
QnxConfiguarion classes.
The split of the BlackBerryApiLevelConfiguration logic
makes the code more flexible to add support for
the user's SDP/Qnx configurations.
Upcoming patches adding support for the SDP/Qnx configuration
will depend on this change.
Change-Id: I44258d9a9f0dc44bb196f4178974ad04d4caf70a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This was recently introduced in qtbase/9ce697f2d54be6d94381c72af28dda79cbc027d4
Change-Id: Ied71c5d6a3571342153737ccb62de1424931fd51
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This fixes a crash when this class tries to show a UI while it is
destructed.
Task-number: QTCREATORBUG-11712
Change-Id: If4aca14a3ca4792bec1a45903a1f38287d16dbc4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
In order to use the correct mkspec in the qmake step,
the qt version mkspec needs to be explicitly listed in the QnxToolChain
suggested mkspec list (Otherwise the first one found in
list will be used).
That is currently broken due to the following issues:
* The mkspec for BB armle-v7 target has been recently
changed to blackberry-armle-v7-qcc, which was not listed
in the QnxToolChain suggested mkspec list.
* The Qt4 for BB armle-v7 uses the "default" mkspec which is a copy
of the "blackberry-armv7le-qcc" mkspec. The mkspec
name should be explicit in order to be found and used.
Task-number: QTCREATORBUG-11674
Change-Id: Idb53d22e7c4b746b23dd3a65c42d00dca5c27d0c
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Add support for managing user BlackBerry runtime configurations.
This does not handle adding manual runtimes yet, but only detects
runtimes from the NDK directories of the available API levels.
The BlackBerry NDK should provide a better way to detect installed
runtimes (e.g xml installation files) in order to improve
the BlackBerry runtime managemnt in Qt Creator.
Change-Id: I4f139d52352f903a27dfe4175d12b016b4ee25a9
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Qcc compiler doesn't support "dumpmachine" option provided by the gcc
to get a list of supported abis from the compiler,
and needs to pass -Wp option when running qcc to get
predefined macros and header paths.
GccToolChain fails to get those information from qcc and print
warning messages on the console.
This patch adds new QccToolChain class and reinterprets
the compiler options to detect predefined macros and header paths.
It also provids list of supported abis
and suggested mkspecs.
Task-number: QTCREATORBUG-10116
Change-Id: Ic48d5c58c5b957f5a8536248888c9a63ca499f34
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>