Commit Graph

68 Commits

Author SHA1 Message Date
Marcus Tillmanns
2c4553366c docker: Correctly initialize Kit during autodetection
* Added returning the Id after detecting CMake so it can be set in the autodetected kit
* Trying to keep autodetect from adding the same Qt installation twice if qmake is linked in /bin and /usr/bin
* Added FIXME for RunControlPrivate::runConfiguration as it is used after free in rare cases
* Fixed IosCompilerDetector to not just run if a device is set
* Fixed QnxCompilerDetector to not just run if a device is set
* Fixed auto-detected debuggers not being set as auto-detected, as they now can be removed from the device screen

Change-Id: Ia7772c454d70e147e4326efacc4a6a888fa26782
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-12 14:15:45 +00:00
Christian Kandeler
8a70f66c9c ProjectExplorer: Move GCC config widgets out of header file
They are only used in one source file.

Change-Id: I9a267be83156fb50c98da63fab165ef6123e7e59
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-24 15:58:30 +00:00
hjk
5cfe69b049 ProjectExplorer: Use a struct for toolchain autodetection parameters
Also, make some functions const and use an alias for QList<ToolChain *>.

Change-Id: I6a1cbcb79bfaa9d252c4b69e00aa93e5d0dabe2f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-18 11:25:34 +00:00
Cristian Adam
5a6c625c5e CppEditor: Fix codemodel highlighting for QNX
The code model will get the necessary bits so that it can successfully
parse the QNX code.

Fixes: QTCREATORBUG-23483
Change-Id: Id9488f644ace23952edf7a7cb5da7ca138182134
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-12-03 14:15:05 +00:00
hjk
be4cfd9d07 Qnx: Use more FilePath for paths
Change-Id: I36f00548247cd34bbb52b452bc80978f131e5270
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-09-30 11:57:05 +00:00
hjk
509f40825a ProjectExplorer: Pass device to ToolChain::autodetect
Currently unused, will be useful to detect toolchains in docker
containers.

Change-Id: I0fd7643969ab02c05839332a436147ffb242635d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-04-28 07:59:45 +00:00
hjk
68c539bb9d Utils: Replace FileChooser::path() by filePath().toString()
Keep the old method for now to ease downstream porting.

The change is kept mechanical, there's a lot of cleanup possible now
on the user code side.

Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-04-09 17:45:06 +00:00
hjk
79b680e7f0 Utils: Rename PathChooser::{f,setF}ileName() to {f,setF}ilePath()
It's returning a FilePath, so it's a better fit.

Keep the old versions as inline function now to ease downstream migration.

Change-Id: I535887928018f42b92895c8b0c82527f0d55e5ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-04-09 17:30:23 +00:00
hjk
a84e626b67 ProjectExplorer: De-QObject-ify ToolChainFactory
As collateral damage, use a capital C in  KeilToolchain*.

Change-Id: If9d64de2108366546683144975d975d9d1727712
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-27 13:58:24 +00:00
Cristian Adam
642be63991 QNX: Use the QNX_CONFIGURATION_EXCLUSIVE envvar in QnxToolchain
QNX_CONFIGURATION_EXCLUSIVE is responsible for license checking
failure when qcc was probed for capabilities.

Change-Id: Ib7efa9eba3b2f3cb131899aa6cb75e632446342c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-09-27 09:43:12 +00:00
Cristian Adam
9caca851f4 QNX: Add C compiler in the compiler selection dialog
QNX compiler can also do C, and it's needed for properly configuring
a CMake project.

Change-Id: I68edf35d7e288400f48b59c258065e6f82d17fc4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-09-26 15:09:14 +00:00
Christian Kandeler
6d3f236aab Utils::Environment: Use expanded values
The Environment class is supposed to support values with references to
other variables, but we failed to actually expand them in most places.

Fixes: QTCREATORBUG-22687
Change-Id: I108cb59d3b4571471423455240f6f4f1cf64bf05
Reviewed-by: hjk <hjk@qt.io>
2019-08-20 12:39:16 +00:00
hjk
d56fa44964 ProjectExplorer: Use data member for ToolChain::typeDisplayName
Change-Id: Ia78ea3f8628b759706c5b024d687d917b203ec4d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-20 12:15:04 +00:00
Eike Ziller
917636b88b Merge remote-tracking branch 'origin/4.10'
Conflicts:
        src/libs/utils/consoleprocess.h
        src/libs/utils/consoleprocess_unix.cpp
        src/libs/utils/consoleprocess_win.cpp
        src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp
        src/tools/clangrefactoringbackend/source/symbolscollector.cpp
        tests/unit/mockup/projectexplorer/project.h

Change-Id: I8d10f26b9bcb54829ba31cdc2272885691df1e16
2019-06-18 12:30:55 +02:00
Giuseppe D'Angelo
885cd63e8f Port from QLatin1Literal to QLatin1String
QLatin1Literal is an undocumented and deprecated typedef
for QLatin1String, just use the original.

Change-Id: I42347a2128e7b4280aaafeea5ebdee5a1b623c82
Reviewed-by: hjk <hjk@qt.io>
2019-06-13 23:07:35 +00:00
Marco Bubke
4bae5de36b Enable macro editing for the Clang indexer
Refactor much of the code from Environment* classes to NameValue* classes
to share it with the preprocessor macro settings.

Change-Id: Ica4ee817aa338230c422b30d91240d266248d226
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-13 16:51:48 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
hjk
cc877949ca ProjectExplorer: (Re-)start using strings for mkspecs
Even if this is part of a directory name it is naturally closer to a
"string" id than a file path.

Change-Id: If66f930526744379ce86e2b18bd9eac7fabfe773
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 11:12:00 +00:00
hjk
2ac89cba92 ProjectExplorer: Use an alias for QList<Abi>
Change-Id: I69231c5974620ae30296bfc4e0ab41c900d95a3c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-27 09:35:53 +00:00
hjk
b997214abb ProjectExplorer: Use a member for ToolChainFactory::canCreate
... in all but one case (ClangCL, which is special).

Change-Id: I6429f2f37b18524c29b6be78801ea0e5517cad4c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-13 14:55:15 +00:00
hjk
728010a705 ProjectExplorer: Use functor for ToolChain creation in ToolChainFactory
Change-Id: I935eecab2f16618a2a5b34d31a79672db82c3398
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-13 12:13:21 +00:00
hjk
d116559cd8 ProjectExplorer: Drop Detection argument from ToolChain constructor
This was used wildly inconsistently. Use a setter instead in
circumstances where the context is reasonably clear.

The assumption is that this will always be done at some time in all
code paths.

Use a new 'Uninitialized' value to avoid triggering the first update.

Change-Id: I82c38cb9da3ccdbd8fbae8beefcbfa0e559ff794
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-10 14:38:45 +00:00
hjk
3ec78efb58 ProjectExplorer: Simplify ToolChainFactory::create() signature
Change-Id: I9d579898387609fa7374f43633711a978bb36d93
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-09 15:12:54 +00:00
hjk
881b59c36e ProjectExplorer: Replace ToolChainFactory::supportedLanguange
... by a member-based approach.

Change-Id: I5c7fef196df6c37fd26c60a58c774426eca562a0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-09 14:43:23 +00:00
hjk
78fd99f5d3 ProjectExplorer: Replace ToolChainFactory::canRestore
... by a member-based check.

Change-Id: Id7d19e488695e76ea17cf2d02c7b6eb2cd0246cc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-09 14:36:41 +00:00
Alessandro Portale
ba4c434211 Qnx: Modernize
modernize-*

Change-Id: I8aae8e3edac885f23b191333d8b0d803c846af43
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-11-28 17:48:53 +00:00
Ivan Donchevskii
2c0554c187 ProjectExplorer: Fix memory leaks in tree models
Fix widgets being leaked by the ToolChainOptionsPage.
This page created widgets and stored them in the tree node
and never deleted them.

The fix is to put all the widgets into one QStackedWidget, so
that this will clean up once the page is destroyed.

Change-Id: Ic02824a4c52771d8962dc594176077c2e139fb84
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:25:51 +00:00
Orgad Shaneh
371b2bbbab Merge remote-tracking branch 'origin/4.5' into master
Change-Id: Ibcdd1230b40d1ca7a414843ee0f9ae4cddb29f6f
2017-10-17 20:00:44 +03:00
Tobias Hunger
dfe23b210d Qnx: Code cosmetics
Change-Id: I8ac1ff2bbe2c16b080dcfced489c1c932dbd102a
Reviewed-by: hjk <hjk@qt.io>
2017-10-17 13:22:17 +00:00
Tobias Hunger
c330cf0679 Replace manual signal blocking/unblocking with QSignalBlocker
Change-Id: Ibb59fab4e37d045e506c5a8172b6f5cbb955b028
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-04 09:35:06 +00:00
James McDonnell
e8b02713b1 Propagate cpuDir into QnxToolChain
Add sdpPath and cpuDir comparison to QNX tool chain comparison.
Ensures that QnxConfiguration created tool chains don't get
removed just because they have the same ABI as another QNX
configuration created tool chain.

This should really be visible in the interface but that can be
done later since this isn't something that can currently happen
with official 6.6.0/7.0.0 SDPs.

Change-Id: Ibbb6a8aa645721028d1512460e51e59633b3cedc
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: hjk <hjk@qt.io>
2017-03-31 19:46:40 +00:00
James McDonnell
e69c2eb2d5 Make QNX a separate OS type
Limits conflicts with Linux tool chains and debuggers.

Change-Id: Ie6408aecbc2828e8be53c46cf579441ccaba19bb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-03-13 14:32:11 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Nikolai Kosjar
8c90998fff CppTools/ProjectManagers: Reduce ui blocking when loading projects
${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>
2017-02-20 09:18:13 +00:00
James McDonnell
a13e666cb7 Add 64-bit QNX mkspecs
Remove obsolete armlev7 mkspec.

Change-Id: I8d7314ef1e2f0f9dd3acef187026ac24d5308c8e
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-02-15 14:34:03 +00:00
James McDonnell
f163cdc9fe Switch QNX tool chains from hard-coded to detected ABIs
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>
2017-02-10 13:46:14 +00:00
Filippo Cucchetto
4b1f8f3609 ProjectExplorer: Added support for registering custom languages
Change-Id: I728a2ed1ef7d9f44d7c2b59d27d6e23444cd3bb5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-23 11:19:11 +00:00
James McDonnell
9fda4907f2 Remove BlackBerry terminology and code
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>
2017-01-20 16:31:52 +00:00
James McDonnell
aa7d1ec296 Add support for 64-bit QNX platforms
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>
2017-01-18 12:37:54 +00:00
James McDonnell
6c8d6c97e5 Prevent QNX tool chain demotion
Change-Id: Ia355cf80131e36e806781665c4926769a1b144f8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-15 17:06:26 +00:00
Tobias Hunger
ce9ca1f0ef ToolChain: Create toolchains for different languages
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>
2016-07-14 15:34:00 +00:00
Tobias Hunger
ca04c4c264 ToolChainFactory: Add support for different languages
* Add a pure virtual method to get supportedLanguges with

Change-Id: Ida4445ca045c90fb9f7656a661af83e5b6801b30
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:33:40 +00:00
Tobias Hunger
1304b250eb ToolChain: Make sure all ToolChains have a language set
* Add code to toolchains
* Assert that this is the case in the toolchainmanager

Change-Id: I82452689e83279fd9d1afb3140b0070bef9b6cd8
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:33:33 +00:00
Tobias Hunger
4ac80fe3a0 ToolChains: Trigger ToolChainManager::toolChainChanged signal
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>
2016-07-06 12:53:52 +00:00
hjk
76a8e89ec7 Qnx: Code cosmetics
Qt 5 connects, namespaces, ...

Change-Id: I887f75627e4ff53f6c5bde20456b809d8f2ad463
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-12 12:44:18 +00:00
Nikolai Kosjar
5c030a4336 ProjectExplorer: Retain original target triple for gcc toolchains
The target triple will be used by the Clang Static Analyzer.

Change-Id: Ibf33fef286a4d3ad3f40be4d6d5c9f35881d3d46
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 10:40:32 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Tobias Hunger
ca29cbfc8a Consistently use Utils::FileNameList
Consistently use Utils::FileNameList in favor of QList<Utils::FileName>

Change-Id: Iafbb466c882bfd91c25c9e78f107d401bfdb6d55
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-11-16 08:33:02 +00:00
Tobias Hunger
a004cfbdd0 ToolchainFactory: Remove unused typeid
Change-Id: Id13787d549312251fbe806076b9ad594ab16c2d2
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-08 09:38:30 +00:00
Christian Kandeler
8d3aa026e0 Utils: Rename PathChooser::changed() signal.
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>
2015-09-03 11:12:57 +00:00