Commit Graph

38 Commits

Author SHA1 Message Date
hjk
0334b6e491 ProjectManager: Add convenience Task subclasses
For Compile, BuildSystem and Deployment. Unclutters user code and reduces
binary size.

Change-Id: Ia18e917bb411754162e9f4ec6056d752a020bb50
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-20 10:11:59 +00:00
Christian Kandeler
9feabb7ba3 QmakeKitAspect: Leave the toolchains alone
The QmakeKitAspect's purpose is to let the user force a specific mkspec
when building with qmake. It is unexpected that it silently changes the
kit's toolchains.
The code that automatically sets up a Qt version for a given toolchain
already exists in QtKitAspect and appears to work just fine these days.

Fixes: QTCREATORBUG-23191
Change-Id: I2727a4faa2285738d0e81e8558ca02e97ef319d3
Reviewed-by: hjk <hjk@qt.io>
2019-12-16 15:15:38 +00:00
Leena Miettinen
73f3291c6d qmake Project Manager: Fix UI text
Change-Id: I6048c952ca36d953d7667676435440615d756c45
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-25 11:37:02 +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
93dfbad97b QmakeProject: Use QString mkspec in QmakeKitInformation
... and BaseQtVersion, and QmakeBuildConfiguration.

Change-Id: Iac5f768b80a7f8c2ea9a37d099b285d5793270db
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 11:16:57 +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
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
Christian Kandeler
1a78230c00 ProjectExplorer: Do not ignore user-supplied mkspec
If the user explicitly sets the mkspec for a kit, we should remember
that, even if it happens to be the (current) default mkspec of the kit.

Fixes: QTCREATORBUG-16205
Change-Id: I9ee047bdaecce1aae7d0a8e4dfc2a0a25b6be744
Reviewed-by: hjk <hjk@qt.io>
2019-05-02 08:13:59 +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
hjk
470ce8a856 ProjectExplorer: Move use of some knowledge from KitAspectWidget to KitAspect
Essentially a follow-up to 09a7d2bd45.

Change-Id: I4dd9d64eec77ddf9cdccbac808e9a0978b9986bf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-12 13:41:09 +00:00
Christian Kandeler
09a7d2bd45 Move some knowledge from KitAspectWidget to KitAspect
The authoritative source of information about a KitAspect is the
KitAspect itself, not the associated widget.

Change-Id: I72d3d0425b845457846a940350bab59f1ff0cc2c
Reviewed-by: hjk <hjk@qt.io>
2019-02-11 15:15:04 +00:00
Christian Kandeler
ce19540b77 Move KitAspectWidget definitions alongside their KitAspects
A KitAspectWidget class is tightly coupled with the respective
KitAspect, and no one else ever needs to see any KitAspectWidget
subclass at build time.

Change-Id: I1883af3b054c225e1ff5dd913118715bfdbaacfc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-02-11 14:39:29 +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
Orgad Shaneh
891e618c5a Merge remote-tracking branch 'origin/4.6'
Change-Id: Ib8a52ad56c4d74542c5a4c283699f6afca2ed6ae
2018-03-02 10:03:29 +02:00
Alessandro Portale
0db9df2806 Compile fix: Don't use Utils::FileName's private constructor
error: C2248: 'Utils::FileName::FileName': cannot access private member
declared in class 'Utils::FileName'

Change-Id: I0d7169170d4c360fce038c43c6572acc6760bddf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-03-01 20:26:17 +00:00
Eike Ziller
205c930592 Merge remote-tracking branch 'origin/4.6'
Change-Id: I63f8aebb201936f671b1486ff9420f67e5e3fafc
2018-03-01 15:46:37 +01:00
Eike Ziller
ec571d86fd Merge remote-tracking branch 'origin/4.5' into 4.6
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I6a9838d60dd37d4762fa7a345febc3a59e9d8351
2018-03-01 15:44:34 +01:00
Eike Ziller
16d1561794 Improve detection of toolchain and debugger for desktop kits
In the situation where a cross-compilation tool chain has the same ABI
as the host.
Prefer toolchains and debuggers in PATH if the ABI matches. This is just
a short-term hack. It is not fail-safe, because either both tool chains
could be found somewhere in the PATH, or the "right" desktop tool chain
could not be in PATH, but manually added.
Anyhow, in many default setups this should improve the result. (In case
of failure the user can still change the kit manually.)
A better long term solution would be to make our ABI settings more
flexible.

Change-Id: I6ec5aaf45ef0b983cd949895dacdd5190f786219
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-23 10:43:41 +00:00
Eike Ziller
c7fdb93865 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp

Change-Id: I2445882a270731b866b04f28ff87d161224c539a
2018-02-13 13:37:37 +01:00
Tobias Hunger
3874b6b6ec KitInformation: Improve robustness to nullptr passed as kit
All the KitInformation methods need to gracefully handle a kit that is
a nullptr. Ensure this is indeed the case.

This might fix the actual trigger for QTCREATORBUG-19469.

Change-Id: Id78ac8a26c1be908f41a425ff1935b86888e4b8b
Reviewed-by: hjk <hjk@qt.io>
2018-02-13 08:46:35 +00:00
hjk
68526cbd19 Qnx: Remove run-time dependency on QmakeProjectManager
This re-uses what work in RemoteLinux. There's still a compile-time header
dependency due to the QmakeProjectManager::Constants::KIT_INFORMATION_ID
constant.

Change-Id: I6d6b8bbaed8ec2e80d54afe62a5a6b7f84eb37ec
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-02-09 13:35:37 +00:00
Ulf Hermann
47886969cc Drop unused variables and lambda captures
Also, add context to connect() expressions where we are or were
capturing "this".

Change-Id: I6e006ba6f83d532478018550d148ee93eca59605
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-09-08 09:06:53 +00:00
Tobias Hunger
9a0562f83f Kit: Improve toolchain setup on auto-detected kit setup
The auto-detected Kit used by default in creator used to set up a
set of toolchains, that usually match up with each other (this relies
on the auto-detecion of toolchains to detect groups of compilers
in one go).

Then the Qt version selected (or better: The mkspec) will change the
C++ compiler if necessary.

Change this to actually pick a good C++ compiler and also update all
other toolchains to match the C++ compiler.

Task-number: QTCREATORBUG-18571
Change-Id: I95ddd9b83cf1642fba648919b76d3e3b7aa24c43
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-08-04 13:58:57 +00:00
Kari Oikarinen
e763ce28e8 QmakeKitInformation: Leave new Boot2Qt Qt versions also alone
Original check was introduced in
200e7dd437, but in Boot2Qt 5.9 Qt versions
use a different id.

This lead to Emulator kits using system g++ on Linux instead of the
provided one. Possibly also other way (desktop using emulator g++).

Task-number: QTCREATORBUG-18169
Change-Id: I42f0da784ccaf749ce2eaba5d689bbdb8c11f971
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-16 10:48:51 +00:00
Jarek Kobus
1a5bdf14ad Fix a crash when configured kit list is empty
Task-number: QTCREATORBUG-17841
Change-Id: I73453c12d264961c6d766fbc58ceb1468104833c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-09 13:54:52 +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
Tobias Hunger
a89100fe47 ToolChainManager: Allow for filtering of toolchains
Allow to provide a Predicate to ToolChainManager::toolChains and
add a ToolChainManager::toolChain method.

Change-Id: I0849f6fa67ffd8d5c6cfe4253cb0a326e1b023fa
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-17 13:13:53 +00:00
Tobias Hunger
200e7dd437 QmakeKitInformation: Leave boot2Qt kits alone
HACK! The magic in QmakeKitInformation::setup() should be removed altogether,
but that is something I dare not do in a patch release. HACK!

Change-Id: If3f0ec9976171977c253cee531203ac3ab41c6a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-12-14 14:33:19 +00:00
Tobias Hunger
f2cd2ac877 Qmake: Do not consider non C++ toolchains
Do not consider non C++ toolchains when searching for a matching toolchain.

Change-Id: I2b06fd677ec3b89d0c15290ba170344629ded20e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-12-14 14:32:47 +00:00
Orgad Shaneh
4325f4facb QmakePM: Avoid soft assertion
... when a matching toolchain is not found.

Change-Id: I901bdb51f98a88b2402b12309a05e0bc5ffcaa3b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-31 13:46:23 +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
Tobias Hunger
8777f4b9b9 Qmake: Add a macro expander to get the currently configured mkspec of a kit
Change-Id: I97cd6f47c20867277ed7612a0cf5a179dedd7501
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-28 09:17:41 +00:00
Tobias Hunger
eafb667066 KitInformation: Make defaultValue take a const Kit *
There is no reason not to.

Change-Id: I4accb0b690173d93ad6f4c9dd0bce66d8de75faa
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-02-05 11:35:20 +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
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
hjk
d7d27fccbc Rename plugins/qt4projectmanager to qmakeprojectmanager
This finally renames the plugin itself.

Change-Id: Ibdf4f4b4e9776c2fdc809e0127f3e1310de44bd1
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-10-29 17:57:06 +01:00