Commit Graph

304 Commits

Author SHA1 Message Date
Orgad Shaneh
3c8dec2398 QmakePM: Show kit name in compiler mismatch message
Change-Id: Ib5bfd90064c525a7b599434d31ab704e8e110d1a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-11 12:29:47 +00:00
Orgad Shaneh
c7ae8a7dab QmakePM: Reduce nesting in QmakeProject::testToolChain
Change-Id: If4e7af104844a0da74dec7e3c8a343b120e7822a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-11 12:26:26 +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
Eike Ziller
7099f21586 Merge remote-tracking branch 'origin/4.6'
Change-Id: I959428882b9da427c6bf522145646048141888c6
2018-04-19 09:25:04 +02:00
Tobias Hunger
fefce829ad Qmake: Invalidate contents of QmakeVfs on target change
Task-number: QTCREATORBUG-20113
Change-Id: I13cd3749a942cc06172dd63f163bff88490a44ed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-17 08:35:23 +00:00
Eike Ziller
185fe0c705 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/android/androidrunnable.h
	src/plugins/android/androidrunner.cpp
	src/plugins/qmakeandroidsupport/qmakeandroidrunconfiguration.cpp
	src/plugins/qmakeprojectmanager/qmakeproject.cpp
	src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp

Change-Id: I68093d44cfd672347eab82459ff70c21a32297ce
2018-04-17 10:09:35 +02:00
Tobias Hunger
fa11070977 QMake: Make signalling of parsing state more robust
Move the emitParsingStarted into a location that is called
from both methods that had it before.

Also add an QTC_ASSERT into incrementPending, which is
triggered by the qmake parsing code directly. If something went
wrong before, then the signal will be sent anyway and in the
right sequence -- although the start signal is a bit late at
that point.

Task-number: QTCREATORBUG-20203
Change-Id: I64611e471d1e4959d5cfe0118223594a04238433
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-16 12:43:39 +00:00
hjk
bc698d4ce6 ProjectExplorer: Consolidate RunConfiguration identifications
The previously per-Project/RunConfiguration changing meanings of
BuildTargetInfo::buildTarget have by now been split
into separate values in BuildTargetInfo:
  - buildKey     a handle to one item in Target::applicationTargetList
  - displayName  a user-visible string in the run settings page

The buildKey was tweaked to coincide with the previous 'extraId',
i.e. the non-RunConfiguration-type part of the project configuration
id that (still) use id mangling.

This allows replacing the cases of locally stored seven different
versions of buildKey(-ish) data by one RunConfiguration::m_buildKey,
and do all remaining extraId handling in RC::{from,to}Map only,
i.e. remove the base ProjectConfiguration::extraId() virtual and
remove the "re-try fromMap with mangled id" hack entirely.

The id mangling is still used to temporarily maintain .user file
compatibility in some cases for now, but should be replaced by
storing the build key and the RunConfiguration type soon. Qbs
already changes in here to only use the uniqueProductName as
buildKey, without the previously added display name which is
stored as part of the ProjectConfiguration already.

It turns out that RunConfiguration::buildSystemTarget was intended
and used to retrieve an item from the Target::applicationTargetList
for some configurations, coinciding with what buildKey does always.
So use that insteand and drop RunConfiguration::buildSystemTarget.

There is clearly is further consolidation potential left.

handling of (default)displayNames is still a per-runconfiguration
mess and there is further consolidation potential left.

Change-Id: I448ed30f1b562fb91b970e328a42fa5f6fb2e43e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-12 12:11:45 +00:00
hjk
fb8f007bbb Android: Move some unshared code closer to its only place of use
Change-Id: Ieaba2c8f76ee9ac020ebd44712aee593c34e4bf0
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-04-12 07:03:06 +00:00
Tobias Hunger
94cb7c988b QmakeProject: Do not try to emit "parsingStarted" several times
This prevents a soft assert from triggering.

Change-Id: Ic2b650f1c850d87492bad8f23d200ede0de35722
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-04-11 13:23:47 +00:00
hjk
96b5fa208f Qmake: Remove QmakeProject::runConfigurationCreators
Not used anymore.

Change-Id: Idba6fd4a8d6f4c7e251a78568b1da0debd93bf5f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-04-05 12:21:26 +00:00
hjk
07d8b7bfa4 Qmake: Remove now-unused QmakeProject::hasApplicationProFile
Change-Id: Ie309468a124497c0aafa3911b5bd6939a9adcb3d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-16 12:32:14 +00:00
Eike Ziller
278a5f1e33 Merge "Merge remote-tracking branch 'origin/4.6'" 2018-03-16 10:29:37 +00:00
hjk
55961a367d QMake: Adapt DesktopQMakeRunConfiguration to applicationTargets() use
Change-Id: I2844e2e97ca78c12c4abdb1538c37e77b841918e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-16 09:58:02 +00:00
Eike Ziller
cb84ae1a21 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
	src/plugins/qmakeprojectmanager/wizards/testwizard.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/qtsupport/gettingstartedwelcomepage.cpp

Change-Id: I126823f5f60613509520c07f52be7bc9d4f4367c
2018-03-16 09:28:08 +01:00
Oswald Buddenhagen
60245e55d7 qmake: Change source identifier type in ProString
The strings remember in which file they were created/assigned.

However, this used a non-counting reference to a ProFile, which could
become dangling. If a subsequent ProFile re-used the exact same address,
a string's source would be mis-identified, which would be fatal in
conjunction with discard_from().

Since we actually need only a unique id for comparison, let's use an
integer for that.

comment on cherry-pick: this is actually a lot more than a cherry-pick,
because the file ids need to be aware of the dual VFS which was
concurrently introduced on the qtc side.

Started-by: Simon Hausmann <simon.hausmann@qt.io>
Change-Id: I395153afaf7c835d0119690ee7f4b915e6f90d4a
(cherry picked from qtbase/190aa94be7f5e146bef44862b974d733755cec85)
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:34:01 +00:00
Tobias Hunger
835d4e92f3 Project: Improve default implementation of Project::needsConfiguration
Change-Id: Ic4d227334d818658f179c0589462551509274c17
Reviewed-by: hjk <hjk@qt.io>
2018-03-09 12:57:59 +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
hjk
8b92da254e Rename IRunConfigurationFactory to RunConfigurationFactory
It's not an *I*nterface anymore

Also, remove the in-all-but-one case unused QObject parent and the
object name that was only there for debugging purposes. The class
type serves the same purpose in the debugger.

Change-Id: I0dafb01e6b4fd7c7df04a63aaa3ef3e4bd693f6f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-03-07 16:07:42 +00:00
Tobias Hunger
997ece4361 Project: Remove unused Project::requiresTargetPanel(...)
Change-Id: I7a5298edefd7e26841c4070be23534dd33d093cb
Reviewed-by: hjk <hjk@qt.io>
2018-02-19 13:22:21 +00:00
Tobias Hunger
8059bf6204 Project: Make setRequiredKitPredicate private
Make calling Project::supportsKit(...) the default implementation.

Change-Id: I0e47972097e760e2ff3be229afb85eff839146b8
Reviewed-by: hjk <hjk@qt.io>
2018-02-19 09:28:02 +00:00
hjk
9f2bb5d0c5 ProjectExplorer: Simplify collection of RunConfigurationCreationInfos
Instead of calling twice for AutoCreated and UserCreated, call once
and record to which case it belongs. Only the 'both' and
'user only' combination are ever used.

Change-Id: I9c15085bcbb4bf6584a6156135f2084dbfc51c1c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-02-15 14:23:02 +00:00
hjk
e5a3a8d189 ProjectExplorer: Remove BuildTargetInfo::displayName
This was previously intented to be used in the RunConfig Add... menu,
but this role is now taken by RunConfigurationCreationInfo::displayName.

This fixes also a regression for setups that relied on
QmakeProject::buildTargets() and a fix up empty display names later.

Change-Id: If75fc79efbdedc918a126e50c962fc188d7a3ebc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-02-09 14:15:54 +00:00
hjk
c39eb08ac4 QmakeProject: Make availableBuildTargets return a BuildTargetInfo list
It's what the "consumer side" expects.

Change-Id: I1a4e75eda09f8626fcf65290e6c58a08eed9fdca
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-01-11 09:42:35 +00:00
hjk
6bb7da79de QmakeProject: Remove proFilesEvaluated() signal
It's not really different from Project::parsingFinished.

Adapt users.

Change-Id: I47d23469df2ec52c5d823508772a7e8b8ad429ce
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-01-09 12:23:56 +00:00
hjk
c136e81422 QmakeProject: Use base project node in two more cases
Change-Id: If7648d0ef549ac7f2fdd6c2d13a82b06d0328232
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-01-03 07:39:34 +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
Eike Ziller
469edcdde3 Merge remote-tracking branch 'origin/4.5'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: Ic1ab71d0d40fa6c90e337c8ee9d9558e8f103eaa
2017-12-12 10:53:51 +01:00
Tobias Hunger
18f38ff18e Project: Make Project::files return a FileNameList
Change-Id: I75ceb22ac65b8288d824f229d44089cba6fc8ea3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-08 09:09:59 +00:00
Christian Stenger
ee540da42e QmakePM: Avoid calling function on nullptr
Task-number: QTCREATORBUG-19419
Change-Id: Iaac597b947ca505819674eec0a862158dce8a632
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-12-07 14:57:59 +00:00
Eike Ziller
e2baa116ca Merge remote-tracking branch 'origin/4.5'
Change-Id: I86852d289c22210a0439e8e297819dc7276a96de
2017-11-29 09:56:22 +01:00
Tobias Hunger
78ef474c71 Qmake: Set up environment for initial project parsing
Set up a better environment for initial project parsing (before Kits
are configured).

Task-number: QTCREATORBUG-19241
Change-Id: I2431113dbbe6fb6a66f95fb1efb36834fa184f3d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-28 16:33:47 +00:00
Eike Ziller
8e1fefd8de Merge remote-tracking branch 'origin/4.5'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I29979e76cb01bc94ddcd7868ca1cbc34afb14c5d
2017-11-27 12:46:56 +01:00
Tobias Hunger
dfcd573427 Qmake: Do not crash when closing a project while it is parsing
* Fix crashes and resource leaks in qmake project.

Task-number: QTCREATORBUG-19358
Change-Id: I3b383640cdf994b4014ccbfc4278be48f9e5fd3f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-11-27 09:16:54 +00:00
hjk
1697f97aff ProjectExplorer: Register createes' base id in RunConfigurationFactory
This shifts the resposibility of creation/splitting of RunConfiguration
ids into what are essentially "type ids" and "build targets" to the base
implementation, possibly opening the path of abandoning the mangled ids
in favor of explicitly storing their constituent parts.

Take advantage of base id split in RunConfigurations for availableIds
/displayNameForId and for canCreate/canRestore/canClone.

Change-Id: I19fefb32757407ab5053a2ae0e5a79438659f6ec
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
2017-11-27 07:23:17 +00:00
Tobias Hunger
19e125ce5f Qmake: Pass on QMAKE_CFLAGS to the code model
Change-Id: I87c07177adcfd72c7852f84266feb9baf1f87e5b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-03 14:07:30 +00:00
Tobias Hunger
1094fe5abf Qmake: Fix detection of successful parsing run
Do not report success of a qmake parsing run based on every .pro-file
having reported success. Take the top-level .pro-file's success value
instead.

This fixes e.g. Creator, which has some .pro-files that error out in
some conditions.

Task-number: QTCREATORBUG-18992
Change-Id: I888141e723da84fb780ccd84c86acc25d03f5f28
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-03 10:12:59 +00:00
Christian Stenger
e255baaa8f CppTools: Add target type information to project part
Let project managers store information whether a project part
belongs to an executable or a library and use this information
inside the AutoTest plugin.
This information will help to determine which targets are
relevant for the execution of tests.

Change-Id: I93b42797bf55225425398dc83aecea3c99eea290
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-18 10:01:30 +00:00
Marco Bubke
b6e12f4a1c Convert macros from plain QByteArray to a vector of structs
The old code model expected the macros as C++ formatted text
("#define Foo 42) but newer targets like the Clang codemodel expect key
value arguments like "-DFoo=42". So instead of parsing the text again and
again we use an abstract data description.

Task-number: QTCREATORBUG-17915
Change-Id: I0179fd13c48a581e91ee79bba9d42d501c26f19f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-14 15:23:56 +00:00
Eike Ziller
ca959d8063 Merge remote-tracking branch 'origin/4.4'
Change-Id: Ic9a1cf3b40b259d9c77f2f542405d189171e0fbf
2017-09-05 12:15:42 +02:00
Ivan Donchevskii
410e31c665 CppTools: set default -std=c++11 for Qt4
qmake from Qt4 does not provide C++ standard and
clang can't properly compile Qt4.8.6 and earlier
with c++1z. Behavior in this commit mimics qmake
from Qt5 which also provides c++11 as a default
standard.

Task-number: QTCREATORBUG-16441
Change-Id: I3d29891d6e47f2367f2b3b2bf4be4d86661924e9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-05 09:37:14 +00:00
Eike Ziller
ddd9e96afa Merge remote-tracking branch 'origin/4.4'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/libs/utils/utils-lib.pri
	src/plugins/clangcodemodel/clangbackendipcintegration.h
	src/shared/qbs

Change-Id: I240e89afc76d8f40ce69d66683014b603f714707
2017-08-23 12:12:41 +02:00
Dan Cape
9a25e31ae8 QNX: Add QNX Abi to the library collection function
Since QNX was split into it's own Abi (QnxOS), it is no longer
piggybacking on the UnixOS Abi. When this change occurred,
there was no change done to collectLibraryData function so on
QNX we were no longer seeing libs created from projects that
were subdirs of a main project.

Related QnxOS change: e69c2eb

Change-Id: Ibb4ff8932ca5d6eea317946aecb53f58ddccc0ea
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-08-22 21:00:13 +00:00
Eike Ziller
d8fd5292f1 Merge remote-tracking branch 'origin/4.4'
Conflicts:
	src/tools/clangbackend/ipcsource/clangiasyncjob.cpp
	src/tools/clangbackend/ipcsource/clangjobrequest.cpp
	src/tools/clangbackend/ipcsource/clangjobrequest.h

Change-Id: Ib8602530663813ade418f995dfd2a736908cfe75
2017-08-15 10:07:51 +02:00
Christian Stenger
27cb331b4b AutoTest: Avoid guessing run configuration
Base the selection of the run configuration on the executable
we have gotten already from the BuildTargetInfo and take
deployment information into account.

This also reverts cce1e130 partially and avoids
stuffing unrelated information into the buildsystemtarget.

Change-Id: I3de6e910a5fd1092d428ec4afc33c4ca62daaa25
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-31 06:11:35 +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
34de70c270 Qmake: Quieten soft assert about parsing already happening
asyncUpdate is only ever called via scheduleAsyncUpdate, so only
notify about parsing start there.

Change-Id: I4311c6ac1add354de96cc25c0cccd0504409e0a8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-28 08:47:16 +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
98764a44a7 qmake: Fix WS
Change-Id: Ib87bdf6c686e3bb37bdd55955d5e18de79d2729a
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-07-18 08:05:07 +00:00
Christian Stenger
cce1e130d7 AutoTest: Fix handling of multiple build targets
If project files are not mapped 1:1 to targets the result
of the chosen executable was more or less random.
Try to handle multiple targets as correct as possible by
checking for build targets already where we still know
which files are part of the respective test cases.

Task-number: QTCREATORBUG-17783
Task-number: QTCREATORBUG-18357
Change-Id: I82dcc26bf52c9918e2727b439a719af08879ef49
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-19 08:14:55 +00:00