Use setters/getters for the bool flags in
Project::needsBuildConfigurations() and
Project::hasMakeInstallEquivalent.
Change-Id: I5ce937c3a5e8e0db627cda02a9007f8c28ccda0c
Reviewed-by: hjk <hjk@qt.io>
The only user can also get this information from the relevant
CMakeBuildConfiguration.
Change-Id: I80e176ef0a8bc427f6adbf75b20e29f38d7b949f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
When the filesystem scan takes longer than the cmake parsing, then
resetData() was called on BuildDirManager by the CMakeBuildConfiguration
before the CMakeProject had requested its data.
Move some code back into CMakeProject to resolve this issue.
Change-Id: Ib21bdd63fdca79c2ad39a7e060df438b456700b4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
There is no need to reset a reader when e.g. the build directory changes
when the server-mode reader is *not* used. So the one case where having
separate reparse-options for the case where the reader changes and the
case where it stays the same is bogus.
So unify the flags into one set and simplify the code accordingly.
Change-Id: I9bcfcc6333d574d49513ef1256a9a8597bda4ec7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Move code closer to the BuildDirManager that was moved into the
CMakeBuildConfiguration.
Change-Id: I21d7188e4a3b03a02b12b01c7dd3e46754d653f8
Reviewed-by: hjk <hjk@qt.io>
Handle environment changes in cmake better.
Server-mode will trigger an reader-change when the environment changes.
This has not been considered so far and a reader-change triggered by
an environment change was considered an error (and ignored).
Change-Id: I2d0baadbcfc86e04348c75d8e5997817bdc233a5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This prodecure requires no further information from the specific project
managers, so we can start it from the ProjectExplorer itself.
Also wait until after project parsing has officially finished and the
run configurations have updated their "enabled" state. Otherwise,
RunConfiguration::isEnabled() will always return false, potentially
leading to the active run configuration getting switched
unintentionally.
Fixes: QTCREATORBUG-21692
Change-Id: I32f4f758b5baa6222329d07b811993568eff1ee3
Reviewed-by: hjk <hjk@qt.io>
... from the environment.
Fixes: QTCREATORBUG-17985
Change-Id: I9b54e550121cfcc0684a6e173337d59d235c6107
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Just use the target name as buildkey. This is unique in cmake projects, so
there is no need to mangle the source directory into the whole thing.
This is a problem since different readers might report different source
directories. That will then result in RunConfigurations getting duplicated
after switching the reader types.
Task-number: QTCREATORBUG-22129
Change-Id: I849ab68f221d732341e98faa9a4e757d3a495b2a
Reviewed-by: hjk <hjk@qt.io>
This should help to remove UI blocking by pointing to the costly
operations.
Change-Id: I8b3250e9ec5995c7b6a705337d60250554b77b53
Reviewed-by: hjk <hjk@qt.io>
Use the category in CMakeProject.
Change-Id: Idb19a92080884f1feff082d8e9db3ca5336b9249
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
When project parsing fails, then the project node might be non-nullptr but
empty. This case is handled in setRootProjectNode(...), where such a
node gets discarded (rootProjectNode() will return a nullptr afterwards).
In this case, do not use the project name that came in from the parser as
it might be wrong.
Change-Id: Iec11aa2d88cca7352d957f428aab24b0f1affd49
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Avoid copying the entire list of files known to a project just to
filter out a couple of files from it.
Change-Id: I58b2e323f9678058ba482353eb777a55189fe05d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Use a dedicated errrorMessage out parameter for error reporting in
the builddirmanager methods related to information retrieval. Those are
called after the parsing has finished.
This frees the errrorOccured signal of the builddirmanager to be used only
when the parsing itself has failed.
Change-Id: Ieefc32c0386769479177a6bd4bc4a0e77df5db7b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Use this back-pointer to validate the buildconfiguration.
Use the validated buildconfiguration consistently. In theory
the buildconfiguration is valid at all times (since deleting
a buildconfiguration will trigger an update to the parameters
in BuildDirManager), but better be safe.
Change-Id: I614d9ce16e4974a9437a2f44756f01c71a5ede13
Reviewed-by: hjk <hjk@qt.io>
This lets users build the executable corresponding to the currently
active run configuration. It's functionally equivalent to locating the
corresponding node in the project tree and choosing "Build" from the
context menu.
Fixes: QTCREATORBUG-22403
Change-Id: Ic2b729c7ce17f1ad944dc06746bb9d6db90b6c61
Reviewed-by: hjk <hjk@qt.io>
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>
For the command and the working directory.
Change-Id: Ia69dc7100aeb57bb6e1b35f4dd4f3cf3763d8cda
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This provides correct deployment information as seen by the build system
when Qt Creator cannot retrieve it directly.
It's most useful for autotools and cmake projects, but can also help
with qmake in certain edge cases.
[ChangeLog] It is no longer necessary to provide a
QtCreatorDeployment.txt file when using CMake projects with remote Linux
devices.
Fixes: QTCREATORBUG-21855
Change-Id: I27e07a45dd1565e489f4b573cc3fff8191c57d9b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Requirements:
- NDKr19 or newer
- Qt 5.12.1 or newer
QtCreator supports the following variables:
- ANDROID_PACKAGE_SOURCE_DIR
- ANDROID_EXTRA_LIBS
Be aware, that there is a lot of magic done on QtCreator side, and you
can't use only cmake to build an Android APK.
[ChangeLog][Android][CMake] Add Android support for CMake projects.
Change-Id: I1d351976ed56f424c2bc972f4ff7b5968147a2ed
Reviewed-by: hjk <hjk@qt.io>
The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".
Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
createGeneratedCodeModelSupport() can now be marked const and is renamed
since it doesn't create GeneratedCodeModelSupport instances any longer.
Change-Id: I8b4b8e8980623841889bd3a03e5fe8c1d4342cb3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Also change method names from update...() to create...() and mark as
const. This communicates that the objects the methods are called on are
neither altered nor updated.
Change-Id: I29e84dc398ded3ffcbf90741227362c6b4be2bf9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Centralize gathering the kit, toolchains and qt version.
Change-Id: I6bd586ac7925e2ee556fd119f1dab096cd500e41
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Less use of activeBuildConfiguration and activeTarget.
Change-Id: I9fa77a0084c5701e86530e4f9845c47baddaed4e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
We checked the command line from the project manager for "-std=X" and
friends to figure out the language version to use. However, if such a
flag was not provided, we assumed the latest version we support. This
could conflict with the actual version of the compiler and its
predefined macros.
Figure out the version by inspecting __cplusplus/__STDC_VERSION__ in the
predefined macros of the toolchain. The MSVC compiler is an exception to
this, as it does not seem to properly set the value - check for
_MSVC_LANG if possible, otherwise simply assume some versions as before.
While at it, add also support for C17/C18 and the upcoming C++2a.
Task-number: QTCREATORBUG-20884
Task-number: QTCREATORBUG-21188
Change-Id: I464ffcd52d2120c0208275a050e82efda44fae1c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>