Commit Graph

102 Commits

Author SHA1 Message Date
Christian Kandeler
8c7567c447 QbsProjectManager: Fix uniqueProductName() and productDisplayName()
These still assumed we can only multiplex on profiles.

Change-Id: Ice3dfe06c1be732ecae42db75155e930b0554b6f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2018-02-09 16:25:39 +00:00
Christian Stenger
1d763d1941 QbsPM: Fix compile with Qt5.6 + gcc4.9
Broke with a40f11e071.

Change-Id: If647f1a66ddd47795598cc1825c17b73d712d409
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-01-24 06:07:13 +00:00
Christian Kandeler
a40f11e071 QbsProjectManager: Add paths of library dependencies to run environment
... with the ability to opt out, as in the qmake run configuration.

Task-number: QTCREATORBUG-19274
Change-Id: If4e996a974a82080bb09f2971b0bb5df9173fb14
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2018-01-23 16:00:19 +00:00
Christian Kandeler
ff0d67dcd2 Update qbs submodule
To HEAD of 1.11 branch. Also do the adaptations necessary because of the
branch switch.

Change-Id: Ief69ef014c10397c14fcd68a9ca770d1391d5491
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-01-23 08:55:40 +00:00
Orgad Shaneh
8d523f1900 Qbs: Use right path for Qt libraries
Similar to 85206e216a for qmake.

Unify the lookup logic in BaseQtVersion.

Change-Id: Id0b0ff3127f0561ac36610ada16110b55252eb31
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-01-10 08:38:33 +00:00
hjk
c3d87e81c5 ProjectExplorer: Return BuildTargetInfo from availableBuildTarget()
... including build target name and display names instead of
returning QString build target names and producing display names
via displayNameForBuildTarget()

This is a mechanical intermediate step on the road to use
Target::applicationTargets().list uniformly as source of build
targets.

Change-Id: I7b0b1fb398d5061b0cec0b86890f9eaf0bb53a19
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-01-05 09:34:29 +00:00
hjk
4a66cae854 ProjectExplorer: Use ids in RunConfigFactory:: setSupportedProjectType
More similar to what build/deploy uses.

Change-Id: Icf8bd7031d00a6e2831f8c1f3b1bdcaa8bf259b4
Reviewed-by: hjk <hjk@qt.io>
2017-12-19 09:42:01 +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
Eike Ziller
a2739f55ed Merge remote-tracking branch 'origin/4.5'
Change-Id: Ic7c16091268083c0426cf29f0691a7ee458f2bd9
2017-12-07 09:16:01 +01:00
Christian Kandeler
9488b7e604 QbsProjectManager: Set the default working directory in the run config
... rather than in the run config widget. Otherwise merely opening the
run settings can change the behavior of applications.

Task-number: QTCREATORBUG-19374
Change-Id: Ib227ab07d09b7a8ce34909ae0b08b6b222bcee14
Reviewed-by: Georger Araujo <georger_br@yahoo.com.br>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-11-30 09:23:38 +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
Eike Ziller
4c8db5e9b7 Merge remote-tracking branch 'origin/4.5'
Change-Id: I32715e2fdbb14e4fccc4c58d3fd6052d7c1127f3
2017-11-24 10:03:38 +01:00
hjk
8e8890abc8 QbsProject: Compute uniqueProductName on the fly
To simplify and fix cloning.

Change-Id: I380834710243f104635628b8d455219f0f73e67b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-22 15:46:15 +00:00
hjk
d1c9b33eb7 ProjectExplorer: Add a RunConfigurationFactory::canHandle(Target *)
All RunConfiguration factories had some kind of canHandle(Target *)
implementation. Centralize this notion.

Change-Id: Ie24a355e857bddfd76b866859b8c7a42ffc83840
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-20 08:52:00 +00:00
hjk
9792547ef9 ProjectExplorer: Implement RunConfiguration::do{Clone,Restore} in base
It's possible now.

Change-Id: I49ed73312aea1627a9543890431e2e379e3fb3ec
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-16 14:08:33 +00:00
hjk
dfd4ad8c2d ProjectExplorer: Simplify IRunConfigurationFactory::clone() use
Change-Id: I005d6c87142d26dfc7ae1349329737a68f54c427
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-14 10:58:30 +00:00
hjk
5ca90a4a5e ProjectExplorer: Fix copying of RunConfigurationAspects
Moving aspect data closer to real Value semantics fixes
the regression introduced by 890c1906e.

Task-number: QTCREATORBUG-19186
Task-number: QTCREATORBUG-19192
Change-Id: Ieaeef3995ae06a817f266c1e2514f9e5793bd4e8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-10 15:09:59 +00:00
Christian Kandeler
3116d901ee QbsProjectManager: Show executable path in run config widget
This appears to have broken in a recent refactoring.

Change-Id: Ice186197329b3b22635a8aca6d9bb4bb6e3418c5
Reviewed-by: hjk <hjk@qt.io>
2017-10-16 09:14:13 +00:00
Christian Kandeler
79d11ed740 QbsProjectManager: Fix run config names
After 890c1906e6, all the run configurations had generic names, because
the initialize() function did not call the base class implementation.

Change-Id: I2eff43f7c40214bcc1167d596fe2328a4b3c122a
Reviewed-by: hjk <hjk@qt.io>
2017-10-16 09:05:25 +00:00
Orgad Shaneh
a8410721be Qbs: Add variable chooser to Run Configuration widget
Change-Id: I8b52b4021e640232e722f33ce20229fe4c7280c7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-09-26 14:09:31 +00:00
hjk
890c1906e6 ProjectExplorer: Re-organize RunConfiguration constructors
The idea is to massage the setup in a way to make implementation
of new configurations less error prone by identifying recurring patterns
and sharing repetitive code that tends to be forgotten (see Android cloning).

The former two lines of constructors (owner-and-id, owner-and-source)
are split into a simple, shared, constructor and new setId() and
copyFrom() functions.

The change is mostly mechanical, some multiple calls to fromMap
have been removed, though, some consts added.

Otherwise, to keep the patch small it temporarily introduces two
helper templates in IRunConfigurationFactory. Also, setId() signatures
have not been unified yet. These won't be needed in the final setup.

Change-Id: I8c0734496caae744a9883fe6d92c1d8f8e0234ea
Reviewed-by: hjk <hjk@qt.io>
2017-09-13 09:24:26 +00:00
Tobias Hunger
366ada9fea RunConfiguration: Centralize enabled state handling
Centralize handling of enabled state of RunConfiguration widgets.

Remove code that does the same thing in all the different run configuration
widgets.

Change-Id: I175d7e19d031bd28a2b19cd825e0b6568da19bc3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-28 17:26:10 +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
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
Orgad Shaneh
687466ac47 Merge remote-tracking branch 'origin/4.3'
Change-Id: I126f3a05212a3d5df78812e66285bc9e8078360b
2017-06-20 11:32:02 +03:00
hjk
f047e1a2a2 ProjectExplorer: Simplify standard run control construction
A lot of the target-and-tool specific run controls nowadays
have something like a single main RunWorker. This patch
removes the need to have user-implemented RunControlFactories
in those cases and adjusts local run, remote linux,
python and nim to take advantage.

There's more potential use downstream.

Change-Id: Ie2d2f839b8be1fad2be3b79e21de3c0e475d88cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-20 08:04:33 +00:00
Christian Stenger
bde8ebc56c QbsPM: Re-introduce uniqueProductName()
This patch prepares for enhancing information stored inside
buildSystemTarget.

Change-Id: I5d81fd01ab6b06c162f47fd9536de697ddfd24a3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-19 08:14:39 +00:00
Christian Kandeler
6754514489 QbsProjectManager: Re-introduce install step
... in a modified variant. The install root is now taken from the build
step to ensure consistency.
A dedicated deploy step can be useful on Windows if one wants to rebuild
while the application is running.

Task-number: QTCREATORBUG-17958
Change-Id: I93bc59b0e6d954d61d84bcfc81576cdb4fac1216
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-16 07:19:22 +00:00
Christian Kandeler
dacf13948e QbsProjectManager: Fix updating of run environment
When the build environment was changed, the run environment widget would
not update.

Change-Id: I8a318d86b5ac56ca9233cf4c694ca3c9f88870ed
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-02 10:08:44 +00:00
Christian Kandeler
8c6021ef7e QbsProjectManager: Add widget for setting the install root
... in the build settings. This makes it much easier for users to
properly set the installation directory. In turn, remove the dedicated
install step, which does not know about qbs.installRoot and has not had
sensible functionality ever since that property was introduced.

Task-number: QTCREATORBUG-17198
Change-Id: Id968672f4365e75da437f73ec15bb5e32599bda3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-15 09:00:00 +00:00
Tobias Hunger
e8b4e180cd RunConfiguration: Introduce buildSystemTarget()
Introduce a method that maps a RunConfiguration to the build system target
that created the executable.

Implement the method in all RunConfigurations where that makes sense (e.g.
no CustomExecutables).

Change-Id: Ifaac859c2cd9b2806a0d7c185b2239312a67752a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-30 13:27:16 +00:00
Christian Kandeler
0b3abfcf6a Update qbs submodule
To HEAD of master branch. Also do the necessary API adaptations in
QbsProjectManager.

Change-Id: I4709b7a0f35537f5b6f9fd04f4d95be16aef2c8d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-11 09:06:54 +00:00
Ulf Hermann
15fbfaf2e9 Move icons to Utils
This way we can use them from libraries, not only from plugins.

Change-Id: Ic35cfd5f04d638d87606bf272b2c00ded1267c1b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-08-05 10:52:53 +00:00
Eike Ziller
57c2c595ca Merge remote-tracking branch 'origin/4.0' into 4.1
Conflicts:
	src/shared/qbs

Change-Id: Id363df58f4f9bda5128a486e942f14179160cb86
2016-07-05 11:15:19 +02:00
Christian Kandeler
fdb764b24b QbsProjectManager: Fix crash on Kit update
Before accessing qbs::Project methods, we need to check whether this
object is valid.

Change-Id: I6c54f5b1118a3960b4814af647d81f5786fa452d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-04 09:36:21 +00:00
Orgad Shaneh
bb331566bd QbsPM: Support qtcRunnable property to filter out peripheral products
... by default.

Similar to qmake qtc_runnable.

Apply in app.qbs.

Change-Id: I8d43027f683ef18fc5a2745afe9775eb14075e69
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-05-01 04:31:40 +00:00
Christian Kandeler
e6a64d40ef Update qbs submodule.
And adapt to API change.

Task-number: QBS-952
Change-Id: I668d6830187f7954e7391f09ff8522422fd0d44d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-08 10:56:29 +00:00
hjk
f56363f07b ProjectExplorer: Avoid recently introduced crash when switching kits
LocalEnvironmentAspect needs to take care of being cloned.

Task-number: QTCREATORBUG-15700
Change-Id: Id040a2a150dbc1cd3e407aa3d7dfc2728d7bb3db
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-02 11:53:34 +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
9ae2ce7629 ProjectExplorer: Drop LocalApplicationRunConfiguration
The functionality can be provided by producing a suitable Runnable
in the derived classes directly.

Change-Id: I7b8e8fe33fffd2b00176b6cf6633eca4e152e466
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-26 10:09:29 +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
hjk
049ffa2c10 QbsProjectManager: Modernize qbsrunconfiguration.{h,cpp}
Qt 5 connects, some auto, remove unused members, etc.

Change-Id: Ic9daaf0356d9a9e29f55467360674edc66be83ee
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-07 10:47:07 +00:00
Orgad Shaneh
cb501d4824 ProjectExplorer: Use FileName in WorkingDirectoryAspect
+ use native separators for user visible strings

Change-Id: Id6e4e27db369314f70e355a395cfddca12b8ea90
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-06 14:29:23 +00:00
Orgad Shaneh
e724380951 Qbs: Avoid double call to a virtual function
Change-Id: If0bae8b2c8cce6542cbd6fd8df867fc200feb37d
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2016-01-05 16:46:57 +00:00
Alessandro Portale
033862f305 Themed Icons: Introduce Utils::Icon
Instead of describing icons via file name or in the themed icons case
via
a string that is a list of mask/color pairs, we have now a class for it.

Icons are now listed in per-plugin *icons.h headers.

RunControl::m_icon was The only place left where an icon property was in
fact a string. This patch changes that member to be a Utils::Icon.

Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-25 12:30:52 +00:00
Alessandro Portale
b8bdc6f669 Icon refresh: First step towards the new Qt Creator themes
http://blog.qt.io/blog/author/didesous/ announced new designs/themes
for Qt Creator. This patch replaces many of the existing toolbar icons
with recolorizable masks for better theming support.

Change-Id: I557aa485205fe2624f33724226f698c303342b40
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-10-23 16:04:52 +00:00
Christian Kandeler
5f3b9dd89c QbsProjectManager: Fix working directory handling.
Commit 2dbc5b1032 introduced usage of WorkingDirectoryAspect into the
qbs run configurations for Desktop targets. However, the design of that
class was not suitable for the way our working directory logic works:
There typically is a user-provided value and, as a fallback if the user
does not provide anything, a default value managed by (build system
specific) code. The WorkingDirectoryAspect class could not differentiate
between these two values and so the value stayed forever at the initial
default if the user did not override it, instead of adapting to the
location of the executable.
This patch makes the necessary changes to the WorkingDirectoryAspect
class so that it matches the actual use case.

Task-number: QTCREATORBUG-14891
Change-Id: I7555d0a9cb4b04b75c9215a988278db32eb1ca10
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-08-24 12:42:42 +00:00
Christian Kandeler
8bef635980 QbsProjectManager: Update the run config widget after a build.
The "executable" field in the local run configuration widget stayed at
"unknown" directly after a build, because the widget was not informed of
that information being available now.

Change-Id: Iadd86ad3d36250f5a54277707fbf1d8bd2df1232
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-08-24 09:37:32 +00:00
hjk
039a29d50d Qbs: Use TerminalAspect in QbsRunConfiguration
Change-Id: I6f1ddec10abda39149dd3743bdff1d0186d1de31
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-05-18 12:52:56 +00:00
hjk
2dbc5b1032 Qbs: Use WorkingDirectoryAspect in QbsRunConfiguration
Change-Id: I65811ff8afb5c8a637c68d5b0dba81ccee71c462
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-05-12 10:50:21 +00:00