Commit Graph

74 Commits

Author SHA1 Message Date
Eike Ziller
3bbe535b95 Merge remote-tracking branch 'origin/4.7'
Change-Id: I3c5d7e9e8c589ad4425cd89d61e1f572f5cb7997
2018-06-19 10:03:28 +02:00
Orgad Shaneh
77941ef9b3 Qmake: Fix redundant qmake execution for sub-project build
When building a sub-project using the context menu -> Build, qmake was
executed every time, because the pro file in the Makefile was compared
against the root project instead of the sub-project.

Change-Id: Id76d7d23e3fa9a8e4c5c10cd10adcc945ff3b186
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-13 10:11:30 +00:00
Eike Ziller
9b43b55dc0 Merge remote-tracking branch 'origin/4.7'
Change-Id: I762dbddb0f337e9a5fc4b113c7876813e9f45c9c
2018-06-11 16:01:18 +02:00
Orgad Shaneh
21c9740089 Qmake: Expand user arguments when comparing them to the Makefile
If the user used a macro, the Makefile will never match it, and qmake will
be executed on each build.

Change-Id: I2790db3a788ea7971145b475781a6193a1ed0842
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-08 09:21:23 +00:00
Eike Ziller
a2fe4087ff Rename files for QmakeMakeStep
Change-Id: Iff0f3f08fff7a5e25ed309891e54d3c02dbb8713
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-18 08:48:15 +00:00
Eike Ziller
2e8d1d00ae Use make step base for qmake projects
There are two differences that get introduced by this change:
- The configuration widget checks that there is a build configuration,
  but not if this build configuration is a QmakeBuildConfiguration. This
  should not matter, since Qmake is still the only supported project
  type for the qmake specific make step
- It removes the automaticallyAddedArguments(). As far as I can see this
  never had any effect anyhow, though. They were never actually added to
  the arguments.

Change-Id: I73be227a32117e462def38bdd040dbd7cbcc113f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-17 14:19:46 +00:00
hjk
ce20bde99c ProjectExplorer: Pass id directly to BuildConfigurations
It's what the base class wants, and follows run and deploy precedence.

Change-Id: I26eff43337851702417e7e4284fc390b904060f6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-08 08:13:00 +00:00
hjk
4e19b3609e ProjectExplorer: Remove *Configuration::availableCreationIdsChanged
Unused and apparently unneeded.

Change-Id: I58fab4e426b7daeac5a68887b5eacfeeb17013d3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-01-08 16:48:55 +00:00
hjk
53a151074a ProjectExplorer/all: Re-organize BuildSteps/{Deploy,Build}Config setup
This follow the rough pattern of recent *RunConfigurationFactory changes
for build and deploy configurations.

- Collapse the two lines of constructors similar to what
  890c1906e6 did for RunConfigurations
  * Deploy* was purely mechanical
  * Build* ctors are split in connects() in the ctor body
    to create "empty shell for clone" etc
    and build step additions in initialize() functions which
    are only used in the create() case.
  -- Allows to collapse the shared 'ctor()' functions, too.

- Move FooBuildConfigurationFactory::create() implementations
  to FooBuildConfiguration() constructor. That was a strange
  and unneeded ping-pong between factories and objects, and
  furthermore allows one level less of indirection (and for a
  later, left out here, some reduction of the
  FooBuildConfiguration interfaces that were only used to
  accommodate the *Factory::create() functions.

- Most {Build,Deploy}Configuration{,Factory} classes had a canHandle(),
  but there wasn't one in the base classses. Have one there.

- Most canHandle() functions were checking simple restrictions on
  e.g. project or target types, specify those by setters in the
  constructors instead and check them in the base canHandle()

- clone() is generally replaced by a creation of a "shell object"
  and a fromMap(source->toMap()), implemented in the base, there
  are two cases left for Android and Qbs that needed(?) some extra
  polish

- generally use canHandle() in base implementation, instead
  of doing that in all Derived::canFoo()

- as a result, canCreate/create/canClone/clone reimplementations
  are not needed anymore, keep the base implementation for
  now (could be inlined into their only users later), but
  de-virtualize them.

- Combine Ios{Preset,DSym}BuildStepFactory. There was only one
  'dsym' build step they could create.

- Split the 'mangled' id into the ProjectConfiguration subtype
  specific constant identifier, and a QString extraId() bit.
  Only maintain the mangled id in saved settings.

- Make ProjectConfiguration::m_id a constant member, adapt
  all constructors of derived classe.

Not done in this patch:

- Finish possible cosmetic changes on top

- Add a way to specify restrictions to supported Qt versions
  (used in Android/Ios), as the base implementation does not
  depend on the qtsupport plugin

- Combine the QList<X> availableFoo() + createFoo(X) function
  pairs to somthing like a direct
   QList<struct { X; std::function<X()>; }> fooCreators()
  to avoid e.g. the baseId.withSuffix() <-> id.suffixAfter(base)
  pingpong

- Remove the *Factories from the global object pool

- Do something about priority(). Falling back to plain
  qmake in android+qmake setup is not helpful.

Change-Id: I2be7d88d554c5aa8b7db8edf5b93278e1ae0112a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-12-08 11:17:55 +00: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
Tobias Hunger
2bc872e6b0 BuildConfiguration: Fix caching of environment
Task-number: QTCREATORBUG-19371
Change-Id: I5ab20cd39d18283d0bd9e5c24db69e7ddba387b9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-28 10:50:49 +00:00
Tobias Hunger
613519c3d5 QtSupport: Do not prepend QT_HOST_BINS to PATH
Do not unconditionally prepend QT_HOST_BINS to PATH as part of the Kit
setup.

Prepend this directory to PATH in the Qmake- and GenericBuildConfigurations
instead.

Task-number: QTCREATORBUG-18714
Change-Id: I1c1d1362105b82f9c369d989e90d4f7079c2c9a2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-18 14:48:01 +00:00
Tobias Hunger
10cb0b77a0 ProjectExplorer: Do not prepend compiler path to PATH everywhere!
Do not unconditionally prepend the (c++) compiler path to PATH for
all projects using GCC-derived toolchains.

Prepend the compiler path in the Qmake- and GenericBuildConfigurations
instead.

Also change the order: Apply buildconfiguration's addToEnvironment first,
only then apply the kit's addToEnvironment.

This does change a few things:
 * CMake and Qbs will now get the normal PATH
 * MSVC compilers will have their compiler path prepended to PATH
   by the effected BuildConfigurations. This should be harmless,
   since that happens before the environment setup script is appended.

Task-number: QTCREATORBUG-18714
Change-Id: I548182bc447d80d24f4de4ce7cf12ee1a753ed26
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-18 14:35:07 +00:00
Orgad Shaneh
28127bd955 QmakePM: Introduce Qmake:Makefile variable
Change-Id: I21551b21ee444dbe40a939a49bddaf184b486160
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-20 09:59:03 +00:00
hjk
3f5caf4cdc Utils: Wrap MimeDatabase into static functions
To avoid repeating the 'MimeDatabase mdb; mdb.something(); ' mantra
all over the place.

Change-Id: I4bfef62e73275a991455141671d6071162788e9d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-03-03 07:57:54 +00:00
Tobias Hunger
f9eab73dad qmake: move over from QmakeProjectNodes to QmakeParserNodes
Change-Id: Iab87e0c248b0f651a1774336c3bddf83baa9d057
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-02-22 16:00:49 +00:00
Oswald Buddenhagen
8288ca1251 make more use of BaseQtVersion::qmakeProperty()
... instead of peeking into versionInfo().
in fact, make versionInfo() private, to avoid subsequent deterioration
as happened before (after 5e596e89d).
some other functions that use it in its interface also become private.

this fixes several breakages related to working with non-installed
prefix builds of qt.

Change-Id: Ib67de79323c9e38f3de48a09854b155de9eef5b2
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-24 14:01:06 +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
Eike Ziller
8f0ddff1cc Merge remote-tracking branch 'origin/4.2'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/shared/qbs

Change-Id: I5050baa31f4a892d00cd6f7e088d1b597921474d
2016-12-05 10:55:35 +01:00
hjk
532c9d49ac QmakeBuildConfiguration: Pass build dir to base setter
Change-Id: I55bd47d62ef644257b49d3423c4d43a6443564aa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-05 09:20:55 +00:00
Tobias Hunger
afa226ea23 Qmake: Initialize members of LastKit
Change-Id: I7effa619403df78acd34cab3d41a9913a1e4aea1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-01 14:50:30 +00:00
Eike Ziller
b43765b3e8 Merge remote-tracking branch 'origin/4.1'
Change-Id: I5cacf96b5be4053d3a32a7c2a78fad463b9600d0
2016-08-17 15:14:57 +02:00
Ulf Hermann
bac2d18405 ProjectExplorer: Resolve any CurrentProject:<foo> in default build path
If ProjectMacroExpander doesn't resolve it we fall back to the generic
ProjectExplorer resolution, which is likely to pick the wrong project.

Task-number: QTCREATORBUG-16724
Change-Id: I201b722c5fe184905f744a1f344ec46941f92ae3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-08-15 16:27:50 +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
66bdd60947 ProjectExplorer: Sprinkle overrides over the code
Sprinkle overrides over code derived from classes in ProjectExplorer

Change-Id: Ia4cc25649f7dc00b0ea126d8176a59afbc5ed574
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-29 12:34:19 +00:00
hjk
0923feb31e De-noise QmakeBuildConfiguration
Change-Id: Ib3c156e8847789c03c1618218233e22c3dae496a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-22 07:49:24 +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
Tobias Hunger
d144ea58e0 Project: Add setRootProjectNode method
Add setRootProjectNode method and a default implementation of
rootProjectNode to Project. Use that in all derived classes.

Change-Id: Id28cde04457a20a8963d43020785ef9d77fea57c
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-11 15:33:26 +00:00
Eike Ziller
ff60bf37c9 Merge remote-tracking branch 'origin/3.6'
Change-Id: I8223551aec66539dd8c55262e5000c1621410334
2015-12-15 12:21:58 +01:00
Ulf Hermann
d3d616ea77 qmake: Don't generate profile build configurations for Qt4
In Qt4 the force_debug_info flag doesn't work, so we won't actually get
a profile build, but only a regular release build.

Change-Id: Ie8c31f882b393e35eb525dd12392354ecbbaee75
Task-number: QTCREATORBUG-15457
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-12-09 15:42:42 +00:00
Eike Ziller
9554495bb1 Merge remote-tracking branch 'origin/3.6'
Conflicts:
	src/plugins/baremetal/gdbserverproviderprocess.cpp

Change-Id: I1ba618db9db6669edada6477c05a1b56b7b5b430
2015-12-07 15:55:35 +01:00
Tobias Hunger
b6792f095c QMakeStep: Prevent possible crash
Task-number: QTCREATORBUG-15443
Change-Id: Ibec61938a911e7265fa1f12c4f3c7b60bf514b7c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-12-03 11:46:35 +00:00
Ulf Hermann
87b9954534 In Profile or Release mode use Qt Quick Compiler if supported
Also, use the proper API for determining QML debugging support.

Change-Id: I9038fb74fcee1f87a7687343ef51e115c8a93936
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-11-10 13:46:38 +00:00
Tobias Hunger
aface7b1d6 Expand CurrentBuild:Type in the wizards
This was just unset before.

Task-number: QTCREATORBUG-15178
Change-Id: Ice66273e2ce9bc60bd8a96516f774201a7a95331
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-26 16:57:02 +00:00
Tobias Hunger
6346835740 BuildInfo: Add BuildConfiguration::BuildType
Remove QbsBuildInfo, which only adds the same information over
the normal BuildInfo.

Change QmakeBuildInfo to use the buildType as provided by
its base class.

Change-Id: Iddb86487c85893988f78bbfaf549823a19f13b5b
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-26 16:56:53 +00:00
Tobias Hunger
5c4bd99715 Qmake: Remove PROFILE_BUILD_KEY from QmakeBuildConfiguration
It is unused.

Change-Id: I29ae0927a74b8f1ee6a66bf4ad99ac73e43e7170
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-10-23 07:59:45 +00:00
Ulf Hermann
69377f0de4 Introduce Profile build mode
We define a Profile build to be a Release build with separate debug
info. You can thus change a given build from Release to Profile of vice
versa by toggling the separate debug info checkbox. The messaging for
future user interaction about Profile builds has to take this into
account.

Task-number: QTCREATORBUG-14009
Change-Id: I62a5b13993b20bf36329b1eefa8b1b6096f31644
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-20 16:15:18 +00:00
Ulf Hermann
703ce02d4c Detach QML debugging option from qmakes build mode
The coupling of qml_debug to qmake's Debug profile is both brittle and
wrong. There are good reasons to also enable qml debugging in certain
Release builds and changing the build type of a specific build often
leaves the UI in an inconsistent state.

Change-Id: I89cb86849c984278ebfc54f66f139ec482b18d9a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-20 16:15:10 +00:00
Ulf Hermann
8db0a1b671 Remove QtQuick1 debugging option from build & run settings
We don't need to support QtQuick1 anymore. Consequently, the
minimum Qt version for QML debugging is bumped to 5.0.0.

Change-Id: I9528de3f6869fb391eaf9560a148e03f6067b9de
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-10-01 13:54:57 +00:00
Daniel Teske
780e70b757 QmakeProject: Show a better error message than just "Incompatible build"
Change-Id: I003e856dd5b222348bacd5acbdf9da4725864b35
Task-number: QTCREATORBUG-14021
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-08-31 15:22:05 +00:00
Daniel Teske
14300191a1 QmakeBuildConfiguration: Offer both Debug and Release in "Add Build"
Change-Id: Iac9749816119dab772c5b6fa34b4d998a68bcab3
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-08-31 12:53:49 +00:00
Orgad Shaneh
9aa58ab26e QmakePM: Remove unused private function
Change-Id: I2b7c0eda487495151616bf91211effd92c078a40
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-08-18 09:44:21 +00:00
Tobias Hunger
cbf302893d ToolChain: Turn id into a QByteArray
That should take a couple of bytes less to store. Make sure this
change is invisible to the configuration files.

Change-Id: If5e73b52493c9164de9e342021d8153d274b350f
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-07-09 11:07:12 +00:00
Jarek Kobus
a73ad816a3 QMakeProjectManager: Introduce member initialization.
Change-Id: I69df0c22a215b2df12f63fdc47082e9797fc02ac
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-06-23 21:03:41 +00:00
Daniel Teske
38e0dd02c4 QmakeBuildConfiguration: Use delegating constructor
Change-Id: I27690c11ca89509dbf770beacf8b13349c0ab7da
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-03-18 16:01:42 +00:00
Daniel Teske
f34773e9f2 QmakeProjectManager: Don't offer kits with invalid qts
Change-Id: Ic30a9eba40c5a3934a65006f730ae52de3eab852
Task-number: QTCREATORBUG-14001
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-15 11:33:59 +00:00
Daniel Teske
51e6fc9416 Fix importing creating additional kits on OS X
Extract the whole makefile parsing code into a separate class, to
make the code more manageable. Also fix some bugs on importing additional
flags like qt quick compiler or separate debug info.

Task-number: QTCREATORBUG-13947
Change-Id: Id04bff191c188f95230274d990b1676e9b2f419d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-03-11 16:02:40 +00:00
Daniel Teske
ea1977c446 QmakeProjectManager::availableSetups: Don't consider kits without a qt
Change-Id: I62526d0e60749999a52413d9d02b3b03ea9d83eb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-03-10 13:17:50 +00:00
Daniel Teske
74f67ffef4 Remove support for !shadowBuild
In ancient times we needed to support some qt versions that didn't support shadow
building. This code has been unused for some versions now, so remove it completely.

Change-Id: I311f255d6bfed6841e94c9c383bd9929d0d55520
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-03-09 10:45:31 +00:00
Orgad Shaneh
e93484d480 QmakePM: Fix crash when Qt version is not set
Reported in the mailing list

Change-Id: I111f66cdff99e7b9ee5bbfe887e87546377a137f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-03-09 08:41:04 +00:00