Commit Graph

1245 Commits

Author SHA1 Message Date
Eike Ziller
829a08047f Merge remote-tracking branch 'origin/4.9'
Conflicts:
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp

Change-Id: I473084232ab99c18e2316154656de0035af02628
2019-05-17 12:47:24 +02:00
hjk
ce449e4219 ProjectExplorer: Remove BuildTargetInfoList wrapper class
Change-Id: I1a2ae06ec8c5b7278abca2386834d7edd31597d7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-14 13:30:34 +00:00
hjk
dd304fc824 Utils: Remove FileName::isNull
... and its uses in order to shrink the FileName interface.

Change-Id: I4b9a229d98ad53c4f189e381c89241981ddbed2e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-13 11:12:09 +00:00
Ivan Komissarov
af622b0110 qbs: add support for the clang-cl compiler
Task-nubmer: QBS-1316
Change-Id: I10d6ec2f425a990191aaf0974782c7e02d70bb93
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-10 12:47:52 +00:00
Christian Kandeler
da1bca07a1 QbsProjectManager: Consider cpp.minimum*Version properties
... when setting up the code model for Darwin targets.

Fixes: QTCREATORBUG-22355
Change-Id: I5cade8d3139dc3602298e9d4d056c9745b208489
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-05-09 11:57:51 +00:00
Christian Kandeler
d0a51796a6 QbsProjectManager: Skip run environment retrieval if project is parsing
...or building. We must not access the internal state of qbs::Project
while a parse or build is going on, as that could lead to race
conditions.
This can potentially leave the run configuration with an incomplete
environment temporarily, but eventually we'll get the correct one once
the project has finished parsing.

Fixes: QTCREATORBUG-22386
Change-Id: Iee3c36aadae9e3a6070993436890eb1ee89354e6
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-05-09 08:53:14 +00:00
hjk
635cd87685 Qbs: Remove two unused QbsBuildConfiguration members
Change-Id: I54ec0beaa12808718c50240e403815d77cb55016
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-03 14:15:17 +00:00
hjk
f6312282f7 Qbs: Remove QbsBuildConfiguration::emitBuildTypeChanged
The base BuildConfiguration::buildType() is accessible, and does
not need the casts.

Change-Id: I74bf9636901b99e3bf24a1a2ec8f46aabe707fbb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-03 13:51:03 +00:00
hjk
78d1e2d772 Qbs: Move build step connection setup to build step constructor
Instead of doing it manually afterwards on both paths that create
them.

Change-Id: I0e1734ae2b5028ce1d471aea0272df52acead221
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-02 08:15:23 +00:00
hjk
a5148b5363 ProjectExplorer: Rename ProjectTree::findCurrentNode to currentNode
For consistency, it's straight forwards access, similar to
currentProject, not much to search and find.

Change-Id: I7ce696bdc24b6a8713d6f11e02443a6f94c605f6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-04-30 17:10:39 +00:00
hjk
8e1e312273 QbsProjectManager: Aspectify QbsBuildConfiguration
Change-Id: Ifff6b770b9c6e2313809b35eef041c674df362e4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-04-30 09:04:38 +00:00
BogDan Vatra
57c48630a8 Android: Add proper QBS support
Now we can use QtCreator to build, deploy, run & debug QBS projects.

[ChangeLog][Android][QBS] Add Android support for QBS projects.

Fixes: QTCREATORBUG-15573
Fixes: QTCREATORBUG-19880
Fixes: QTCREATORBUG-22182
Change-Id: I08b153a44dcf7ca178689c1c30fa2201c4cc0dbb
Reviewed-by: hjk <hjk@qt.io>
2019-04-26 06:37:00 +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
Denis Shienkov
8f8ff686df bare-metal: Add support for SDCC toolchain
This patch adds support for the SDCC toolchain:

 * http://sdcc.sourceforge.net/

Now QtC's compiler page have additional 'SDCC' selector which
allows to user to choose a desired compiler. Main point is that
the SDCC supports only the C-language, so the C++ selector is
not available.

When the compiler is added, the QtC will tries to detect the
compiler ABI.

Also it is implemented the compiler auto-detection; each toolchain
is displayed with its detected version.

Currently is supported the following architecture:

 * 8051 (aka MCS51)

In addition, were added changes to the QBS Project Manager
plugin to make it work with QBS .

So, now do not need to do an additional 'hacks' into the
'qbs.toolchain' property of QtC SDCC kit.

Following features are not implemented yet:

* Debugger integration.
* Compile output parsers.
* Support for other architectures (z80, ds390 and etc) .

Change-Id: I92b97a81152d94cabf569e2013fc7260b8d7b953
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-04-15 16:35:22 +00:00
Orgad Shaneh
39ba01da71 Merge remote-tracking branch 'origin/4.9'
Change-Id: I7d1912cd5c4d824fd40d3454c5f1bb796f2c21d8
2019-04-07 23:13:17 +03:00
Christian Kandeler
7e3356c324 QbsProjectManager: Fix infinite loop when "force probes" is checked
This happened for all projects with a Qt dependency, because the module
provider kept recreating the Qt modules, which in turn caused Qt Creator
to re-parse the project.

Change-Id: I77c5c8723c1d0bcd477db648692ddaf9e060ce99
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-04 08:32:49 +00:00
Christian Kandeler
e257428b82 QbsProjectManager: Improve "Generated Files" project tree node
The priority was too high, and the base directory should be the product
build dir.

Change-Id: I559eedd2b14f1d41b39e7256621bdc68e72a3147
Reviewed-by: hjk <hjk@qt.io>
2019-04-03 12:15:34 +00:00
hjk
841bbfa7bf ProjectExplorer: Switch order of template parameters
... of SimpleRunWorkerFactory.

This requires being explicit about the SimpleTargetRunner worker
default, but makes the template re-usable for current users of
RunWorker::registerWorker() which I would like to phase out now,
for less variations in the RunWorkerFactory setup.

Change-Id: I32638437e5bb29f143650f5fde706711ab25accf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-04-02 09:46:48 +00:00
Eike Ziller
b3baed58c6 Merge remote-tracking branch 'origin/4.9'
Change-Id: If36258b8e572b5c7875433a31a836e4f06e27286
2019-03-21 11:28:21 +01:00
hjk
1bc10248c0 ProjectExplorer: Introduce a SimpleRunWorkerFactory template
... and use in as replacement for RunConfiguration::addRunWorkerFactory.

It is still convenient to have a simple way to set up run worker
factories for the typical "just run for this configuration" case,
but it's even better if it follows the nowadays predominant pattern
of keeping factories in the plugin's pimpl.

Also, it turned out there were two copies of
QmlProjectRunconfigurationFactory code, one is enough.

Change-Id: I0b28c4ea18d0f52165a49f6133dc8687a3b9c7cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-19 15:56:17 +00:00
hjk
fb4d8b5a01 ProjectExplorer: Make kit aspects self-register
Also, construct the KitManager implicitly when the first
KitAspect is created. Ramp-down is still explicit and
somewhat odd.

Change-Id: If1506e1d0789ecabbaad2d8008851d0b42c5218b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-18 14:14:28 +00:00
Christian Kandeler
d4565be655 ProjectExplorer: Drop KitAspect::defaultValue()
The functionality of this function overlapped with KitAspect::setup(),
leading to unclear responsibilities and resulting in bugs such as the
one fixed by 776d54e435.
Therefore, we drop the defaultValue() function, merging its
implementation with setup() where applicable.

Change-Id: Iefa9c3df8b76e97ddf9ad388516621f7ea6558d4
Reviewed-by: hjk <hjk@qt.io>
2019-03-15 14:47:18 +00:00
Christian Kandeler
312c4a1433 QbsProjectManager: Fix default build directory
Commit a43331ba67 broke the build, and commit 4a3546f58a fixed it, but
used the wrong function.

Fixes: QTCREATORBUG-22142
Change-Id: I8a66bc8a4501f017726149544d73a728ab753e32
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-03-15 12:40:11 +00:00
Christian Kandeler
8c0037af52 ProjectExplorer: Let user provide default for "run in terminal"
We enable the "Run in terminal" checkbox for all applications that
declare themselves console apps, but that's not necessarily what the
user wants. So let them opt out of this mechanism via a global setting.

[ChangeLog] There now is a global setting for "Run in terminal".

Change-Id: Ieeed72fdd01144d9aec0a7c7d4a12b9e5a94cd1d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-03-15 11:59:47 +00:00
hjk
164ae1428e ProjectExplorer: Move RunControl related classes to separate file pair
Change-Id: I5da56f80336673d595907abcc797f628be680cd5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-13 14:44:46 +00:00
Christian Kandeler
632d64fdc7 QbsProjectManager: Fix "Build product" action for files in groups
Change-Id: Ia557d51654ee98d89f5c2c5e4df2a1b7d32afb66
Reviewed-by: hjk <hjk@qt.io>
2019-03-13 13:38:57 +00:00
Denis Shienkov
a4b9d57824 bare-metal: Add support for KEIL toolchain
This patch adds support for the toolchains, provided by
KEIL:

 * http://www.keil.com/c51/
 * http://www2.keil.com/mdk5/

Now QtC's compiler page have additional 'KEIL' selector
which allows to user to choose a desired C/C++ compiler
from set of the KEIL toolchains.

In this case the QtC will tries to detect the compiler ABI,
in which was added the additional OMF binary format type
which is produced by C51 compiler:

 * http://www.keil.com/support/docs/93.htm

Currently are supported the following architectures:

 * ARM
 * 8051 (aka MCS51)

In addition, were added changes to the QBS Project Manager
plugin to make it work with QBS 1.13 (where previously were
added support for KEIL toolchain).

So, now do not need to do an additional 'hacks' into the
'qbs.toolchain' property of QtC KEIL kit.

Following features are not implemented yet:

* Debugger integration.
* Compile output parsers.
* Toolchains auto-detection.
* Support for C251, C166 architectures.

Change-Id: If0cc18d22b7dc0e5ce9096bdb3dc699ee3edde66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-11 13:47:36 +00:00
hjk
6faaea8d0c ProjectExplorer: Split EnvironmentAspect
... at least logically a bit more into hunks responsible for
one of the possible choices of base environments.

This makes it possible to move code that modifies individual
cases closer to the only place that uses it.

Change-Id: I1c87bb869e04e44b92ff097b0bf25274f93808be
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-11 12:40:51 +00:00
Denis Shienkov
1caff90686 bare-metal: Add support for IAR EW toolchain
This patch adds support for the toolchains, provided by
IAR Embedded Workbench:

 *  https://www.iar.com/iar-embedded-workbench/

Now QtC's compiler page have additional 'IAREW' selector
which allows to user to choose a desired C/C++ compiler
from set of the IAR EW toolchains.

In this case the QtC will tries to detect the compiler ABI,
in which was added the additional MCS51 architecture (which
includes all family for Intel x8051 MCU's):

 * https://en.wikipedia.org/wiki/Intel_MCS-51

Also, now the ABI has an additional proprietary UBROF binary
format type which is produced by some of IAR EW compilers:

 * https://netstorage.iar.com/SuppDB/Public/UPDINFO/011281/ew/doc/EW_MigrationFromUBROF.pdf
 * https://netstorage.iar.com/SuppDB/Public/UPDINFO/013556/ew/doc/UBROFRecordTags.pdf

Currently are supported the following architectures:

 * ARM
 * 8051 (aka MCS51)
 * AVR

In addition, were added changes to the QBS Project Manager
plugin to make it work with QBS 1.13 (where previously were
added support for IAR toolchain).

So, now do not need to do an additional 'hacks' into the
'qbs.toolchain' property of QtC IAR kit.

Following features are not implemented yet:

* C-SPY debugger integration.
* Compile output parsers.
* Toolchains auto-detection.

Change-Id: I4a7794efe8dc15652f5a7f1f3dd966c367943484
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-03-07 14:38:51 +00:00
hjk
e3a7aa1ad2 ProjectExplorer: Flip default for ProjectNode::showInSimpleTree
Change-Id: Ibd4f91ad55b2be93d20dfc4f583de95274e981ca
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-01 08:57:05 +00:00
hjk
729c74379a ProjectExplorer: Merge Node::isFileNodeType and asFileNode
They were identifying the same set of nodes.

Change-Id: I3316cbc434ff740547bcf0baf9e5f1544f6e3f56
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-01 08:44:22 +00:00
hjk
ad4e2562fa ProjectExplorer: Replace Node::setNodeType by virtual functions
Not the usual direction of change, but currently there are
several systems to identify or invoke node functionality.

Virtual functions are likely to stay in this context, so this
here attempts to help consolidation by reducing the influence
of the node type flags, hopefully leading to full removal
by making remaining functionality available through the
other mechanisms (virtual functions, asFooNode() 'casts',
less so the FileType flag).

Change-Id: I12a17ce30b3c8883995b29b4720408020ee0fa3e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-01 08:32:14 +00:00
hjk
f066af4c14 Qbs: Remove QbsBaseProjectNode layer
Change-Id: I7c43b0b04503d4c9a25c5fe758defc589655f387
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-27 12:09:12 +00:00
hjk
e318ecd81d Qbs: Simplify updateBuildActions()
Now that the sub-project cases are gone, part of the logic are dead.

Change-Id: I37d5bb7fe82ba5d8d2b064dd5231daf201ee6d67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-27 12:00:37 +00:00
hjk
a2d9acb6ec Qbs: Remove QbsFileNode
It's a ProjectExplorer::FileNode with a custom constructor.

Change-Id: I3057647a5843141ef9e55c97dd19255ea454479a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-26 15:22:04 +00:00
hjk
926174ad10 Qbs: Remove SubProject related actions from main Build Menu
Not really useful, Project, Product and File are still there.

Change-Id: Ib995f880151d0a219fc5d86bcbc7f1a959703ccb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-26 15:21:49 +00:00
hjk
6f37348b4c Replace static_casts by QOverload where possible
Mainly to get rid of the QProcess::finished deprecation warning.

Also adjust coding style in the surrounding connects when needed.

Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-26 15:18:14 +00:00
hjk
44a42db1ae ProjectExplorer: "Upstream" line number display for FileNodes
So far only used and set with QBS, but conceptually usable more
generally, and harmless if not used.

Change-Id: I1d2d615f5613340690de22a1c7d716a193fb1f05
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-26 13:58:18 +00:00
hjk
5cc1aee7ff Qbs: Move QbsBaseProjectNode::showInSimpleTree()
... to QbsGroupNode::showInSimpleTree(). It's the only subclass
that didn't re-implement it.

It's easier to reason about the actual value when the value isn't
flipped too often in the inheritance chain.

Change-Id: I61f6020acc95a3dc0383b44ad8d40ee39f923d0f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-26 13:31:43 +00:00
hjk
b97639158c Qbs: Some code cosmetics
Mostly namespaces, whitespace, avoidance of repetitive code.

Change-Id: I49185464b6e7baadeb519799f06c7f50e8039366
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-26 10:44:52 +00:00
hjk
7bf10a5842 ProjectExplorer: Use setter for VirtualFolder's priority
More uniform code.

Change-Id: I9a10a1bb15b0df9cf30c68d2c0537bfae2bed98a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-26 10:42:45 +00:00
hjk
65be7c2915 ProjectExplorer: Use a setter for the Node's type
Change-Id: I3cc496151888cdecff0be54043a24fefe5ee2b02
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-26 10:39:58 +00:00
hjk
ffa88006a5 ProjectExplorer: Replace FolderNode ctor display argument
... by use of the setter.

Change-Id: Ie6bf15b4dfae4d4e4d98694313b6e7dc9a22c117
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-26 10:33:07 +00:00
hjk
c1c3f74dee ProjectExplorer: Remove RunConfiguration::canRunForNode()
All implementations that were returning true effectively did that
in case of node->buildKey() == rc->buildKey(), either directly or
in disguise of qmake's projectPath, so this is the check that is
used now in the two places where this is used.

The new global has the theoretical potential of return true in
cases where it did not before.

Change-Id: Ic5829de5fef0f9a04d516a3d9207685055823775
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-26 08:39:29 +00:00
hjk
f844f54cb7 ProjectExplorer: Use setters in ProjectExplorer::Node
Instead of constructor arguments. This makes it clearer on the
user side which value is actually changed.

Change-Id: I63ae8cd139a49700996c8874098111aad89ace22
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-26 08:26:43 +00:00
hjk
1ca9b2b16e Qbs: Remove unused QbsGroupNode::qbsGroupData()
Change-Id: I2d615999db5e9056497f1ce6e31df6d53f1e8955
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-26 08:21:09 +00:00
hjk
2b1b00d0e6 QbsProjectManager: Remove unused class QbsFolderNode
Change-Id: I94656ed4508084ecc9b2d0da623c6885b06341f1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-25 14:46:33 +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
Orgad Shaneh
6fc532f812 Merge remote-tracking branch 'origin/4.9'
Change-Id: If4e8f52fc94c4e5fd9ec69c9000436d4ded913ff
2019-02-15 13:42:44 +02:00
hjk
c41ff1164b QtSupport: Remove BaseQtVersion::dumpUpdatedFor signal
Never emitted anymore.

Change-Id: I049e90dc77c70e57284ec967644a188735360310
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-02-14 13:10:02 +00:00