Commit Graph

259 Commits

Author SHA1 Message Date
hjk
596a54f645 RemoteLinux: Move EmbeddeLinuxQtVersion to QtSupport
The class uses only one ID from RL at compile time, and after the
move RL does not hard-depend on QtSupport anymore.

Change-Id: I9f8aa6782e45fe998d83ddcc5323c396964bf1fe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-16 06:10:43 +00:00
hjk
2d9471137c ProjectExplorer: Drop filtering from KitManager::Kits
Only uses twice out of 54 cases, saves a few cycles and bytes
in the others.

Change-Id: I180005d041e3abaf841890d208adfbcb1a51fb74
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-14 12:03:28 +00:00
Tobias Hunger
ae345003aa ProjectExplorer: De-virtualize some more virtual methods
Use setters/getters for the bool flags in
Project::needsBuildConfigurations() and
Project::hasMakeInstallEquivalent.

Change-Id: I5ce937c3a5e8e0db627cda02a9007f8c28ccda0c
Reviewed-by: hjk <hjk@qt.io>
2019-08-13 10:24:30 +00:00
Tobias Hunger
0f1fcb72e2 QmlProjectManager: Remove dead code
Change-Id: I174aaaa9bde229aaeaded32835858243972e5086
Reviewed-by: hjk <hjk@qt.io>
2019-08-13 10:24:12 +00:00
Tobias Hunger
09530d6dcc ProjectExplorer: Use RAII pattern for parsing start/stop signalling
Change-Id: I13de537140f265db3e3d0ab1cd924d6897cd90c8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-09 12:45:29 +00:00
hjk
09e5c167bd ProjectExplorer: Add convenience Project::addTargetFor{Default,}Kit
Less noise on the user side.

Change-Id: I5cdf4af4910a3cc1ee0af1b43fcbc7329a6d59db
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-01 16:16:29 +00:00
Tim Jenssen
1df6443d4a Merge remote-tracking branch 'origin/4.10'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/libs/utils/synchronousprocess.cpp
	src/plugins/baremetal/iarewtoolchain.cpp
	src/plugins/cmakeprojectmanager/cmakeproject.cpp
	tests/unit/unittest/CMakeLists.txt

Change-Id: I124ad492df403286751e175d27fe36487ddf6d07
2019-07-04 15:17:55 +02:00
hjk
6a58666f44 More Utils::toSet/toList
... and unrelated cosmetic changes.

Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-04 12:28:38 +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
2b1c8aa877 ProjectExplorer: Introduce a alias for QList<Tasks>
Change-Id: I91391ad22b420926b0f512cac23cfe009048b218
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 05:51:40 +00:00
Thomas Hartmann
f8202239d6 QmlProject: Implement basic support for QmlFileSelector
This patch adds support for QmlFileSelector for
QmlProject and Qt Quick Designer.

Task-number: QDS-590
Change-Id: I0cc043d3ec9578008ec879b36fe834b70fb8c5ad
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-04-25 13:55:29 +00:00
Christian Kandeler
261d7752b0 RemoteLinux: Retrieve deployment info from local install root
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>
2019-04-23 15:52:05 +00:00
hjk
09372918c1 ProjectExplorer: Remove FileNode's isGenerated constructor bool
Use setter of base class, similar to setListInProject() before.

Change-Id: Id620f0084a5dec0410f29c80f8f6393a6bcd5050
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-25 12:23:31 +00:00
Christian Kandeler
83dd031960 ProjectExplorer: Rename KitInformation to KitAspect
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>
2019-02-11 11:55:01 +00:00
Tim Jenssen
8d9ac8d94b QmlProject: update mainFile after renaming it
Set mainFile at the QmlProject and replaces the string inside
the .qmlproject file.
If that file is open and modified just save that, it is not nice
but qmake projects haves the same at the moment.

Task-number: QTCREATORBUG-10629
Change-Id: Ia3916644bacfc65862802e3dc5361edd50951d35
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-01-23 14:35:54 +00:00
Eike Ziller
9b43b55dc0 Merge remote-tracking branch 'origin/4.7'
Change-Id: I762dbddb0f337e9a5fc4b113c7876813e9f45c9c
2018-06-11 16:01:18 +02:00
Leena Miettinen
b85905ca5f Projects: Fix capitalization in messages
Change-Id: I1928fe11a3a23c0577ecc941d259d310a211e86f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-08 12:43:57 +00:00
Tobias Hunger
bef6d49adc QmlProject: Remove unnecessary code
The normal RunConfiguration already triggers this.

Change-Id: I33f8704e28768efc264a2e2e717284ba7615dc08
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-06-01 14:03:02 +00:00
Tobias Hunger
d332954567 ProjectExplorer: Add and use addNestedNode(...) that takes unique_ptr
Change-Id: Ieb26721d053111fb350494e31d1f6da3fe642420
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-02 14:55:15 +00:00
Tobias Hunger
5754d5accf ProjectExplorer: Use unique_ptr for Project::setRootProjectNode
Change-Id: If63a49d0eecfb93adcc6076fcb3208c87603af10
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-02 11:34:35 +00:00
Tobias Hunger
2a34f2177c ProjectExplorer: Hide build page for projects that do not build
Change-Id: I56feaab67690b5ece7379a9c1f676392230de107
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-04-19 13:21:52 +00:00
Tobias Hunger
460fdc02e0 ProjectExplorer: Report project-specific kit errors/warnings
Report project-specific warnings about the kit used in Project Mode.
E.g. a python project should not complain about missing toolchains,
while a qmake project should.

Change-Id: I5ce6742683cdeffc7ff3f1a3e8f0b89aee9aa0b4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-04-19 13:21:45 +00:00
Tim Jenssen
e0c8ec8f79 QmlProject: simplify code
Change-Id: I3cfee42b63bf840bf2ecde54c5f2d277d7a32e7c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-04-06 17:23:30 +00:00
Tobias Hunger
97ede133a9 QmlProject: Fix selection of supported kits
This now fixes the auto-selection of kits for me.

Task-number: QTCREATORBUG-19717
Change-Id: I39581ab2471211e9553c345164bb3ce788242dad
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-09 10:56:24 +00:00
Tobias Hunger
8ae505f30e QmlProject: Unify selection of supported kits
Change-Id: Ic33e9688d823bd09664e5dc74fe5253cb5fcbc58
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-09 10:56:17 +00:00
Thomas Hartmann
0474216e2f QmlProject: Fix import paths for code model
This fixes a regression introduced by
30638df441.

Custom import paths have to be absolute for the code model.

Change-Id: I232229fa58c3900fe684ca4529b2ed08bf93e8be
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-02-26 13:31:23 +00:00
Thomas Hartmann
ef9ac8f2f4 QmlProject: Add support for setting the environment
This allows setting arbitrary environment variables
in the .qmlproject.
This is required for example qtquickcontrols2.conf
and QT_AUTO_SCREEN_SCALE_FACTOR.

Task-number: QTCREATORBUG-19513
Change-Id: I8421a9fc7f85d24b3564f1b60f383be3838f2af4
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-02-02 07:18:20 +00:00
Ulf Hermann
e44504371c QmlProjectManager: Prepare for running on remote devices
We add a "targetDirectory" property to the file format and fill in the
deployment data.

(cherry picked from commit fba61c5b55)
Change-Id: If207cd5c77175c54cffdb5df92ea85c425cd3191
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-29 09:04:45 +00:00
Ulf Hermann
8964de84d3 Remove qmlsceneCommand() and qmlViewerCommand() from BaseQtVersion
qmlviewer is QtQuick1 and not supported anymore.

The qmlscene command is in general not a property of the Qt version but
of the target device, as we generally assume Qt binaries to be
preinstalled on the target and qmlscene is executed on the target.

DesktopQtVersion retains a method to retrieve the qmlscene path as there
target == host and having the method available enables us to warn if the
binary is missing.

Also, QmlProjectManager needs to pick the qmlscene command from the Qt
version if it's a desktop Qt.

Change-Id: I2ee0f993e60b96d672080db2db0a6abe5ca933e3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-01-08 09:13:56 +00:00
hjk
8e92c28573 QmlProject: Remove unneeded reimplementation of rootProjectNode
Change-Id: I0ffd72ae6be2cc94daf3e84a713c55088d463ab1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-01-03 10:35:37 +00:00
Ulf Hermann
544ac85191 QmlProject: Avoid error messages about missing build configurations
Override the target setup, so that we don't try to initialize build
configurations.

Change-Id: I8f8022c705ea54dd66df828fdb4837d4a41bc96e
Reviewed-by: hjk <hjk@qt.io>
2017-12-21 08:44:23 +00:00
hjk
b2a16190e8 Use project id uniformly as project context
The possibly intented flexibility e.g. to have different project types
share the same idea of a common context was never used, in all cases
we had a 1:1 relation ship between project ids and ids that were used
as context. This led to oversights like the one fixed in 60fb35a2.

This patch here uses the project id unconditionally as context and
drops all context ids. If we'll ever have the situation where the
original flexibility was needed, Project::projectContext() could be
made virtual and overridden were needed.

Also, the context was never modified for any given project, so the
updating machinery is not needed.

Change-Id: I3f7fac0ed5e4704e126558987c48577f26082dfd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-20 12:35:14 +00:00
hjk
4a66cae854 ProjectExplorer: Use ids in RunConfigFactory:: setSupportedProjectType
More similar to what build/deploy uses.

Change-Id: Icf8bd7031d00a6e2831f8c1f3b1bdcaa8bf259b4
Reviewed-by: hjk <hjk@qt.io>
2017-12-19 09:42:01 +00:00
Tobias Hunger
8cd2c234db QmlProjectManager: Fix warning about unused lambda capture
Change-Id: I3fd8f89dc3f5f54a7479c7e1d118766fedd66ba7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 13:16:26 +00:00
Ulf Hermann
8c504dc61e QmlProjectManager: Drop support for QtQuick1
Change-Id: Id60c9768d8fad03f588207af07bba676dbfc76fc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-11-30 15:57:53 +00:00
Ulf Hermann
b2c2c7d642 QmlProjectManager: Detect file types correctly
Just calling everything "Source" is not very helpful.

Change-Id: I74a19e46782aa301c5726130200aeb16ef916d78
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-11-23 11:15:27 +00:00
Tobias Hunger
131c7a1c4e ProjectExplorer: Introduce base class for enabled/disabled project configuration
... and use this as a base for all RunConfigurations.

Clean out code in the individual run configurations dealing with their
enabled/disabled state.

Change-Id: Icc2ea136b056f7aea7ce96480b4402459d7ac0ce
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-28 17:26:03 +00:00
Tobias Hunger
09b127f9f1 Project: Move signalling of parsing state into Project
Get rid of duplicated code to do such signaling in derived Project types.

Change-Id: I26914a1d751d72ee65c15a7943e0e7f34978f042
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-26 09:29:21 +00:00
Tobias Hunger
8793d0f0fa QmlProject: List .qmlproject file in project tree
Task-number: QTCREATORBUG-18057
Change-Id: I6a38093d1b6fdaeac7920746395cfbebc595d062
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-04-24 07:48:35 +00:00
Tobias Hunger
0951589420 Project: Unify handling of displayName
Unify the handling of displayName with a proper changed signal across
all projects.

Change-Id: I7e503528854b85f6f38de4b0943775f82a0d6123
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-04-07 14:49:51 +00:00
Tobias Hunger
b0c7bb0f7b Project: Move ProjectDocument setup into Project class
Change-Id: I5c0ec79ddf066e37660fb9a6b24f9d882355d511
Reviewed-by: hjk <hjk@qt.io>
2017-03-29 11:53:24 +00:00
Tobias Hunger
348aa12eaa ProjectExplorer: Provide ProjectDocument and use it in all projects
Change-Id: I6e054ebf1043bd1f6748f1567f35c68394bd6528
Reviewed-by: hjk <hjk@qt.io>
2017-03-29 11:03:34 +00:00
Tobias Hunger
fc5ce1e710 ProjectExplorer: Handle project file list globally
Handle the generation of the list of files in a project globally, based
on the project tree.

Creator now has the concept of TreeManagers which can enrich the project
tree with additional data (e.g. the files found in a resource file), which
the project does not necessarily know about. So use that tree to find
the files that belong to a project instead of implementing similar features
in each project.

Change-Id: Ia375a914a1f2c0adaa427f9eda834eec2db07f68
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-03-27 15:32:13 +00:00
hjk
df73d57295 QmlProject: Simplify interface a bit
Remove unneeded code and don't repeately fetch a singleton value.

Change-Id: I718a44c28be7ef8718f813f987f45b32cbcd7ad5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-15 06:57:31 +00:00
Orgad Shaneh
da7cb91446 Merge remote-tracking branch 'origin/4.2' into 4.3
Change-Id: I4931dcc81be872d7712e67123e94d15ee696459f
2017-03-14 16:20:14 +02:00
hjk
4d8352a6c1 ProjectExplorer: Add a FolderNode::addNestedNode() function
Also, rename buildTree() to addNestedNodes(), it's really
adding things, not recompletely (re-)building the subtree.

Use it whenever possible to avoid intermediate lists of items
to insert.

Change-Id: I5fde41e5b164a8a292410bd381a85f5efadf3471
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-14 12:26:22 +00:00
Samuel Gaist
4033471aa9 QRegExp include cleanup
This patch adds the missing include statements for QRegExp.

Change-Id: Ibb03b929940adb84ae190b5090cb6b88653cc14c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-03-13 22:05:30 +00:00
Tobias Hunger
49fef0ae24 ProjectExplorer: Create initial project tree
Create an initial project tree with a ProjectNode and a FileNode for
the project file itself.

Fix the Projects to not implement their own tree before they have
better data.

Change-Id: I147ccd5603d22d1d60880a97f30fd8c271eac88c
Reviewed-by: hjk <hjk@qt.io>
2017-03-10 16:22:31 +00:00
Tobias Hunger
2fde3fffa9 Make all projects generate a fresh project tree
Do not update the existing project tree anymore: Start a fresh one
and throw the old one away.

Change-Id: Ifabe293b6ca668b0672516a6d81acd5346d98fe5
Reviewed-by: hjk <hjk@qt.io>
2017-03-10 16:22:26 +00:00