Commit Graph

98 Commits

Author SHA1 Message Date
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
Eike Ziller
9a149e295b Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/tools/qml2puppet/CMakeLists.txt

Change-Id: Id6243b0f725a68075d789bf35e771113b742645b
2020-03-30 17:27:55 +02:00
Christian Kandeler
29488fbdaf Qbs: Suppress spurious warnings about mismatching compiler paths
Apparently, MSVC toolchains set their compiler paths asynchronously, so
don't complain if it's empty initially.

Fixes: QTCREATORBUG-23725
Change-Id: Id800fa01d6368d244ec879181d12f6f7c7f1bf0a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-03-30 10:00:04 +00:00
Eike Ziller
c8a2ea5433 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp

Change-Id: I2a0ccb84560174c5170d5baaff526c0e095f0ba0
2020-03-19 09:35:50 +01:00
Denis Shienkov
3ad7ef4796 QbsPM: Fix wrong {GCC|Clang} compiler name and prefix handling
When the GCC or Clang compiler name ends with the version sub-string
(f.e. arm-none-eabi-gcc-8.2.1.exe), this leads to the wrong cCompilerName
detection, that causes the project parsing errors and disables the project:

  The following properties are not set. Set them in your profile or product:
  cpp.compilerIncludePaths
  cpp.compilerFrameworkPaths
  cpp.compilerLibraryPaths

  Product 'xyz' had errors and was disabled.

Now we return a proper prefix (e.g. arm-none-eabi-) and cCompilerName
with a version (e.g. 'gcc-8.2.1.exe')

Change-Id: I5dd42a343a0982326ed0f23b821e5016b8df39f1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-03-16 18:37:18 +00:00
hjk
3f68292dbe ProjectExplorer: Introduce ToolChainKitAspect::{c,cxx}ToolChain
Special accessors to the repeatedly used C and C++ cases to denoise
and slim down user code.  Plus some code cosmetics nearby.

Change-Id: Iba4662bd4731d8c4256e658529f39d5c995691ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-19 15:59:12 +00:00
Eike Ziller
bd5dae90ad Merge remote-tracking branch 'origin/4.11'
Conflicts:
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp

Change-Id: I5e424e34db619bb769c7abc1e8651b7b40210839
2020-01-20 09:59:27 +01:00
Christian Kandeler
f1b2120ccb QbsProjectManager: Fix setting qbs.architecture for Android
- Use values that qbs understands.
- Make sure qbs.architecture(s) is set also with no Qt present.

This was broken in 6b31f9cf23.

Fixes: QTCREATORBUG-23489
Change-Id: If7bf8862b850defa04e8f45eace99e08388d780f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-01-17 11:44:01 +00:00
Christian Kandeler
6913947986 QbsProjectManager: Switch to an out-of-process approach
That is, do not link to the qbscore library anymore. Instead, use the
JSON-based API.
Advantages:
    - We can build Qt Creator with qbs support without qbs being present
      on the build machine.
    - Smaller memory footprint for Qt Creator, as the qbs build graphs
      are now being managed by a separate process.
    - Potential crashes in qbs will not kill the Qt Creator process.

Fixes: QTCREATORBUG-20622
Task-number: QTCREATORBUG-22904
Change-Id: If7d344b0ac65a99ff0a3a3db215d61b8d903e47e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-11-21 13:32:18 +00:00
BogDan Vatra
6b31f9cf23 Android multi arch support
[ChangeLog][Android] Android multi arch support for qmake

Change-Id: Ib8b1874604a3392130c96fbc00b26713b3d788ae
Reviewed-by: hjk <hjk@qt.io>
2019-09-16 07:34:54 +00:00
Eike Ziller
8e376ab340 Merge remote-tracking branch 'origin/4.10'
Conflicts:
	src/plugins/baremetal/iarewtoolchain.cpp

Change-Id: I483e81d7e920e724fb7cde84a8f6fa9bce4cd518
2019-07-25 09:38:09 +02:00
Christian Kandeler
39ae3ca68f QbsProjectManager: Set qbs.architecture, not just qbs.architectures
If there's no multiplexing, then qbs.architectures will have no effect.

Task-number: QTCREATORBUG-22738
Change-Id: If485481bf0f683fc3c693216d13aee1ba87255fe
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-23 09:20:05 +00:00
hjk
3c92742605 Android: Rename ANDROID_TOOLCHAIN_ID to ANDROID_TOOLCHAIN_TYPEID
That's what it is, and it's the only odd one out currently.

Change-Id: If098e2691b9f88fbd5f516cf869e390f43b9ddfa
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-06-14 09:42:09 +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
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
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
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
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
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
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
Christian Kandeler
d59663cfe4 ProjectExplorer: Remove SysRootKitInformation::hasSysRoot()
This function is exactly the same as SysrootKitInformation::sysroot(),
except that is returns a boolean. And it's always used like this:
if (SysRootKitInformation::hasSysRoot(k))
    sysroot = SysRootKitInformation::SysrootKitInformation::sysroot(k);
Which means that the same code is executed twice in a row.
There is no point in this, so let's just remove it.

Change-Id: I95e4de101d6164ed48558b888e22ed8892fc6d9b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-09 09:06:36 +00:00
Alessandro Portale
11632bbedd QbsProjectManager: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override

Change-Id: I8a67b87e614f54554f9ca50c9f5e3f3297458ec1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-07-27 12:35:12 +00:00
Christian Kandeler
327d7a495b QbsProjectManager: Set qbs.targetPlatform rather than qbs.targetOS
This is the recommended way in qbs 1.11.

Change-Id: Id20ecdc2b8332336c92c47cf05077dbe4e54cff2
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2018-01-24 15:51:53 +00:00
Oswald Buddenhagen
777ca8e655 Merge remote-tracking branch 'origin/4.5'
Conflicts:
	src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
	src/plugins/qmlprofiler/qmlprofilertraceclient.cpp

Change-Id: I94647f59d7a9df48168ac066555afe80f5f9b91f
2017-12-21 13:20:24 +01:00
Christian Kandeler
265d093c36 QbsProjectManager: Fix compiler name setup for GCC-like toolchains
The mapping was not quite right. In particular, cpp.cCompilerName needs
to be set if the compiler name is not the default.

Task-number: QTCREATORBUG-19467
Change-Id: I6c190fdda98ff15dce6066bfb082d24853538a78
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-20 10:22:52 +00:00
Joerg Bornemann
e71912b45b QbsProjectManager: Avoid allocations in string comparisons
Use case-insensitive comparisons instead of converting toLower() first.
Found by clazy.

Change-Id: I0d32b0ba7ccb5493d1c86d41044b09c8baed3dc8
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-10-19 14:22:59 +00:00
Christian Kandeler
75395af824 QbsProjectManager: Respect overridden target ABI
Auto-detecting the architecture in qbs is all well and good, but if the
user explicitly set an ABI in the toolchain widget, we must set
qbs.architecture accordingly.

Change-Id: I3a2c441ceea5e939e43764e0468588d2d0ef323c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-09-27 16:13:06 +00:00
Christian Kandeler
d5066ac06e QbsProjectManager: Introduce QbsKitInformation
... and use it to allow users to set custom properties in the
corresponding profile. This replaces the idiosyncratic and more
complicated approach we had before, when that was done in the qbs
profiles settings page. The profiles view is now read-only.

Change-Id: I0c29c1ac0c510e17d685e7bbaa38b54c8100ddb8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-20 12:00:11 +00:00
Jake Petroules
a251c2c966 Adapt to new architectures handling in qbs
This lets qbs handle architectures entirely for GCC/MinGW, ICC, and MSVC
toolchains, as well as projects targeting Android or any Apple platform
with any toolchain. Now Qt Creator only passes down architecture
information to qbs for QNX/QCC and Clang on Windows, Linux, BSD, etc.

Change-Id: I44925671d7f280890f9e25a5726d019d3f98dea9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-06-19 14:26:55 +00:00
Jake Petroules
83fd207a64 Qbs: use the separate QNX OS type
... instead of detecting it via the device type.

Amends e69c2eb2

Change-Id: If7bd19412e723c268d93e16d46828925b74d6a4b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
2017-04-07 15:58:44 +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
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
Christian Kandeler
8751d46f97 QbsProjectManager: Take the "no OS" case into account
When a toolchain did not specify an operating system, we did not set
qbs.targetOS, which meant it stayed at its default value (qbs.hostOS).
Instead, we correctly set it to an empty list now.

Task-number: QTCREATORBUG-17452
Change-Id: I2c7030013ea7a1f954e8d0f7059b471008a0ed72
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-20 14:18:20 +00:00
Eike Ziller
0596699dbd Merge remote-tracking branch 'origin/4.1' into 4.2
Conflicts:
	src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp
	src/plugins/qbsprojectmanager/qbsconstants.h

Change-Id: I3800e580faaccdc1dd08da851956ba677d33df51
2016-11-21 17:01:15 +01:00
Jake Petroules
e50c9afce9 Qbs: filter out -arch compiler flags from platformCompiler/LinkerFlags
-arch is not allowed in compiler flags as it's automatically handled by
the qbs.architecture property, and is an error in current versions of
Qbs. If the architecture was successfully detected, remove the flags.

Change-Id: I85cce7b7f4ef5a92f857ec624a912861bcb267f5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-14 12:02:06 +00:00
Christian Stenger
b892d82086 QbsProjectManager: Fix compile with gcc 4.8
Change-Id: I3be0349c9af1f8ed51f04c04ce97983409dd7512
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-14 10:10:54 +00:00
Jake Petroules
d1c2a841af Qbs: don't set cpp.linkerName
This is unnecessary (and counterproductive) with automatic linker mode
in Qbs 1.6.

Change-Id: I808effead885eeba0d524fa27989b8a54b8c655f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-11 10:28:49 +00:00
Jake Petroules
a8bb2af30e Qbs: fix Xcode SDK detection (take 2)
This adds xcode to the toolchain list, which is required to load the
Xcode module. It also uses the compiler path as the mechanism to find
the developer path, and then extracts the canonical SDK name using the
sysroot if it's a valid one for the previously extracted developer path.

amends d121fefaa9

Change-Id: I73cf1a50acd6b99a9fc3b6003bcc6dc23c2a04ab
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-11 10:28:44 +00:00
Christian Stenger
2380757199 QbsProjectManager: Fix missing include
Avoid compile issue when using gcc 4.8.
(error: variable 'const QRegularExpression re' has initializer but
incomplete type)

Change-Id: Ic89f9afdf0a6854948a21103a64ec8b8f4ad1681
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-11-11 07:57:02 +00:00
Jake Petroules
d121fefaa9 Qbs: fix Xcode SDK detection
The Xcode related properties in the cpp module no longer exist. Use the
correct ones, and be a little stricter about extracting the constituent
components from the sysroot.

Change-Id: I6ceaebf529764e69e1e04af6650a2920b139fac2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-10 11:04:57 +00:00
Christian Kandeler
f911ddba86 QbsProjectManager: Remove a redundant header file
Somebody mistakenly introduced qbsconstants.h, even though
qbsprojectmanagerconstants.h already existed for that purpose. Merge
these two files and remove the newer one.

Change-Id: I6103509d902880d0e9c181873ec4cf56acf04424
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-26 08:21:31 +00:00
Christian Kandeler
a97f1bd0bb QbsProjectManager: Do not set an empty compiler name
If one of the two compiler types in the Kit is not set, leave the
respective value in qbs at its default. Things will likely work anyway,
whereas setting an empty compiler name is guaranteed to break.

Task-number: QTCREATORBUG-17109
Change-Id: I2b4153cb9a9daafb2f57659e16622e00d3921005
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-19 09:29:57 +00:00
Christian Kandeler
b491a1c2c0 QbsProjectManager: Fix typo in toolchain setup code
This lead to weird behavior regarding compiler name and toolchain
prefix.

Task-number: QBS-1022
Change-Id: I10abfb22ee71aed6ec5ebc6b3eb477536c86f717
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-29 05:31:13 +00:00
Jake Petroules
f41b48ef5d Rename Abi::MacOS/GenericMacFlavor to DarwinOS/GenericDarwinFlavor
This makes clear that the ABI encompasses all Darwin platforms (macOS,
iOS, tvOS, watchOS) in the wake of the OS X to macOS rename, and would
have been more technically correct anyways since ABIs are far below the
"macOS" parts of our favorite desktop Unix operating system.

Change-Id: I16d1477f44ffe70e5d8cddd67199a1602ba6fd97
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-08-22 12:54:06 +00:00
Jake Petroules
6776b78655 Revert "QbsProjectManager: Write MSVC compiler version to profile"
This reverts commit 3c63b621d9.

This is no longer necessary because Qbs determines the version automatically.

Change-Id: I80161ddf366091eca8bb1e1b29657371e9a7b0fb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-08-15 17:05:30 +00:00
Jake Petroules
ac19d0691d Don't set cpp.linkerName for Qbs kits
This is unnecessary now that Qbs handles the linker automatically.

Change-Id: I8c6270f74355bfa274717a7791daf8d1f4721e00
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-08-15 17:04:55 +00:00
Aaron Barany
6d3497d4e2 QBS DefaultPropertyProvider: Separate C and C++ compilers
Task-number: QBS-893
Change-Id: If811a34d6fecba8989b19089e8bac5df5621836f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-25 18:41:18 +00:00
Tobias Hunger
cb14fb0d71 Kits: Save several ToolChains per kit
BREAKS BACKWARD COMPATIBILITY OF TOOLCHAIN SETTINGS!

* Convert old ToolChainKitInformation to new version
* Store several toolchains in one kit (one per language)

Change-Id: Ia59a2ad067c57971ec34ce9b2e43758344443755
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:06 +00:00
Jake Petroules
069a4dc7dd Add macos value to qbs.targetOS.
Change-Id: I38f810ae72ff1f7ef428835b2eeeed6d726d4727
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-20 16:17:17 +00:00
Jake Petroules
1c04cce4d7 Remove unnecessary /FS flag in qbs property provider.
The current version of qbs handles this automatically.

Change-Id: I81905335fd3366198164436e7125944ad8a3d304
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-05-18 15:31:59 +00:00