Commit Graph

89 Commits

Author SHA1 Message Date
hjk
bd63a47d67 iOS: Use new central RunConfiguration::update
Change-Id: If19926aac16b501aee7a1117c7915f915af061fc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-04 10:16:34 +00:00
hjk
d79c76eb11 ProjectExplorer: Make enabled state updating part of runconfig updates
RunConfiguration::update() is becoming a central place acting on
requests to act on interesting changes, triggering notifications
to "the outside" from there is natural.

Change-Id: I159cb548c159a607e2628a178362987fb37b59e3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-04 09:43:51 +00:00
hjk
2758682723 ProjectExplorer: Move BuildSystem owership to BuildConfiguration
... or Target.

This patch moves build system from conceptually "one per project"
to "one per target (i.e. per project-and-kit)" or "per
BuildConfigurations" for targets where the builds differ
significantly.

Building requires usually items from the kit (Qt version, compiler,
...) so a target-agnostic build is practically almost always wrong.

Moving the build system to the target also has the potential
to solve issues caused by switching targets while parsing, that
used Project::activeTarget() regularly, with potentially different
results before and after the switch.

This patch might create performance/size regressions when several
targets are set up per project as the build system implementation's
internal data are duplicated in this case.

The idea is to fix that by sharing per-project pieces again in
the project implementation once these problems occur.

Change-Id: I87f640ce418b93175b5029124eaa55f3b8721dca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-19 11:05:52 +00:00
Christian Kandeler
efa9832912 LayoutBuilder: Allow for more compact code at calling sites
Change-Id: I12bb6dbfc138e03138b9a74d36e864d8ea36092f
Reviewed-by: hjk <hjk@qt.io>
2019-11-07 11:53:37 +00:00
hjk
6eaf239777 ProjectExplorer: Prepare more flexibility to aspect layouting
This hides the explicit use of a QFormLayout from the aspect
interface in a new LayoutBuilder class. That currently works
only on a QFormLayout in the back, but opens the possibility
to use e.g. a QGridLayout as use on the Kits and some option
pages.

The aspects now only announce sub-widgets they like to add,
actuall positioning is does by a new LayoutBuilder class,
also cramming several widgets in an hbox in the right column
of the QFormLayout is done there.

Change-Id: I2b788192c465f2ab82261849d34e514697c5a491
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-10-18 12:24:39 +00:00
hjk
335ea0c831 iOS: Avoid double-indirection between DeviceTypeAspect and run config
No need to leave the aspect context.

Change-Id: I96a93f7c85d8bbb1fdc28352a4c70a29bc510e4c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 07:11:45 +00:00
hjk
1ca91b16a0 iOS: Remove unused qtsupport includes
Change-Id: I0f5c867e712d152377d05c3e4105e7705e7a4547
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-08-14 08:37:49 +00:00
hjk
fcffb5f2fc Utils/all: Create an OutputFormatterFactory
Essentially following the scheme used for the various project
configurations. This makes it possible to construct OutputFormatters
by Id only, potentially reducing hard plugin dependencies and
opening the road to have several output formatters per
RunConfiguration/Outputpane/...

Change-Id: I4b5fb6fb6be8b0d9a0859f178bb0effc3398b09e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-13 13:07:06 +00:00
Eike Ziller
dcc47f2587 iOS: Share code for simulator display name
Change-Id: Iecfaa43aefc7ed783d4149dec008330ee5c124e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-08-12 08:37:12 +00:00
Alessandro Portale
0933c20de8 connect() to ambiguous signals/slots: Replace static_cast with QOverload
Change-Id: I473d7a2a16509cee944a2a21b022a3f6f02cfd8d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 14:07:03 +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
166cb39709 iOS: More FileName::appendPath -> pathAppended changes
Change-Id: I3db6b1778e6e47e26e243fb2609c481651aa91fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-17 09:26:57 +00:00
hjk
36f4b9a81e Ios: Remove direct compile time dependency of IosRunConfig on qmake
Change-Id: Ieb0cbc71b525972afb66883b010cbf389657c406
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-06 08:37:31 +00:00
hjk
c1c3f74dee ProjectExplorer: Remove RunConfiguration::canRunForNode()
All implementations that were returning true effectively did that
in case of node->buildKey() == rc->buildKey(), either directly or
in disguise of qmake's projectPath, so this is the check that is
used now in the two places where this is used.

The new global has the theoretical potential of return true in
cases where it did not before.

Change-Id: Ic5829de5fef0f9a04d516a3d9207685055823775
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-26 08: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
hjk
c58da42bab QmakeProjectManager et al: Reduce use of qmake specific logic
Change-Id: I8f7e5d822ccb27e3ec241b814ec67aed7fe7539f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-12-14 12:08:39 +00:00
Alessandro Portale
39400381b3 iOS: Modernize
modernize-*

Change-Id: I64d2bb4320c9b444bc13e90099600628eac1f5a6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-11-13 15:44:34 +00:00
hjk
1c9410e353 ProjectExplorer: Rename 'extraAspect' to 'aspect'
Using aspects is the standard pattern nowadays, there's nothing 'extra'
to them anymore.

Change-Id: I446f9d7b1db58a4899e5e44df33ce51f655e7be4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-02 08:32:51 +00:00
hjk
e0dcb645cd iOS: Remove unused IosRunConfiguration::deployStep
Change-Id: I5e2ceacf02c0f19b605d134a0e7f0a13d5426fa2
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-09-26 06:14:32 +00:00
hjk
ad7d37cc36 iOS: Move towards more aspect use
Put the remaining device related pieces into a new IosDeviceTypeAspect.

Change-Id: Ia1ce2002edebedc2d409edc1144ade0ffe24a084
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-09-26 06:13:07 +00:00
hjk
ddd46e18f3 iOS: Use an aspect for the executable
More standard pattern nowadays.

Change-Id: I1237555b44fb0a9a6faca086254c49b70c39c3b6
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-09-11 07:53:07 +00:00
hjk
4192d7d62f ProjectExplorer: Compactify runconfiguration aspect creation
Change-Id: I12394d3df8deb7666be6ac3f112082f915454e82
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-09-04 12:45:21 +00:00
hjk
98f3b961c6 Unify key names for various fields in stored RunConfigurations
This replaces various versions of the key name of the arguments,
working directory, use terminal and use dyld image suffix fields
by unified versions ("RunConfiguration.Arguments",
"RunConfiguration.WorkingDirectory", "RunConfiguration.UseTerminal",
"RunConfiguration.UseDyldImageSuffix").

The different names for the fields are technically not needed
(as proven by several cases that already now used the same key),
partially outdated ("Qt4ProjectManager.MaemoRunConfiguration.Arguments")
make RunConfiguration constructors less uniform and more complex
than needed.

The "RunConfiguration." prefix in the new names is not needed, but used
by several other settings, so having it there looks more uniform now.

In (the unexpected case) that different keys would ever be necessary,
the default key name could still be overridden by using setSettingsKey
from user code.

Change-Id: Ifb74ad74e0a9c724c8bf5e71e1bb2424d5d1831b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:00:46 +00:00
Vikas Pachdha
5cd1bb6f73 iOS: Fix incorrect device type in run configuration
Task-number: QTCREATORBUG-20413
Change-Id: I5b96273161401e83567da80770f0f1c3482b7311
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-16 07:08:27 +00:00
hjk
e6d583913e iOS: Use run arguments more directly
This also treats the arguments list as an arguments list for running,
not as a single argument.

Change-Id: Ia95e02c6324947081147b8bf8084cdd3a7d1eaf0
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-08 16:18:02 +00:00
hjk
900cbf857b iOS: Remove RunConfigWidget base from IosRunConfigurationWidget
Despite its name, it's not the base for RunConfig (main) widgets, but
one for the "true" extra aspects (debugger, valgrind, perf, ...)

Change-Id: I45f3339ab2620fe4c55d77bd464f7770b51c30dd
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-08 16:17:11 +00:00
hjk
447befac61 iOS: Remove dependency on QmakeBuildConfiguration in run config
The base ProjectExplorer::BuildConfiguration carries enough information
nowadays.

Change-Id: Ia5ce243aef68a109e70809f385c2c2ce2f072c2a
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-08 16:01:02 +00:00
hjk
366be94ad9 Pass id to RunConfiguration constructor
It's what the base class requires, and opens the possibility to
have several factories creating the same type of run configuration.

Also move ios, winrt and android factories closer to their products,
it's the predominant pattern nowadays.

Change-Id: Iad48152f02a248d22cb18dd435a2fc34d73c7077
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-04-25 15:06:11 +00:00
hjk
def04e88a2 Simplify runconfiguration aspect addTo... interface
The parent widget is always given by the layout, no need to pass
it as separate parameter.

Change-Id: I9e7ed3a89eb63b78a549471d839060131737ff78
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-24 07:26:22 +00:00
hjk
83c6a4916c ProjectExplorer: Streamline OutputFormatter creation a bit
Note that the concept of a single monolithic OutputFormatter per
RunConfiguration (and why RunConfiguration, not RunControl to start
with?) is unchanged and suboptimal as one cannot easily combine
existing use cases, e.g. Python_and_Qt.

Change-Id: Ibeb8191020387324f22ed313230293597f96e36a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-04-13 11:55:31 +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
116f7db28c iOS: Use base method to list run configurations
The base method is good enough nowadays.

Change-Id: I1affc678a2168d002ed8f627a56f172e30c1c0be
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-03-27 12:31:45 +00:00
hjk
e20d620043 ProjectExplorer: Let RunConfiguration declare what nodes it belongs to
This feature in question is the availability of the "Run" button in the
context menu of certain project nodes in the project tree to run
something presumably related to/build from that (sub)project.

Previously, the decision was made for certain qmake based projects
(those targeting Desktop, iOS and VxWorks) by some indirection
through the corresponding RunConfigurationFactories.

The patch lets the RunConfigurations decide themselves directly
and removes the indirection, potentially opening the feature for
other qmake based RCs, as well as other combinations (e.g.
PythonRunConfiguration could be associated with its .py file,
without the need to have a dummy project)

Change-Id: Ic489bd1dfa25fcd9102ffa4fa30125565dd2e40e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-16 09:55:03 +00:00
hjk
3f7f5b9a95 Use the .pro file path as buildSystemTarget in qmake based RunConfigs
That's what it is documented to be: It is set up from a
BuildTargetInfo::targetName containing the .pro file name.

Change-Id: Iabd1061960897125e1b09902d55661d42f481e26
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-01-12 11:04:01 +00:00
hjk
280b7e2109 Ios: Use device types as restrictions on project configurations
Change-Id: I3c31f14eba9d9f68a333a814bea800a3da38d4a2
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-12-19 09:16:45 +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
hjk
da08c911c9 Ios: standardize IosRunConfiguration::initialize() signature
Most other signatures look like RunConfiguration::initialize(Core::Id),
this here is part of unifying them completely.

Change-Id: I7cd2acc8ebe6ec8cef05272f18f0fa5ded94f930
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-11-15 10:08:39 +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
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
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
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
Tobias Hunger
8f0697e33d qmake: Unify TargetInformation and TargetParserInformation again
Change-Id: I00fc6e99e55684e67e5240c539002b13f4541286
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-02-22 13:19:20 +00:00
Vikas Pachdha
b2a33d3118 iOS: Extend the information cached for simulator
Change-Id: Ia2bc421b2af7d1e82d48bbd9d7914f177fef30d0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-02-14 14:57:20 +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
Eike Ziller
02a39c013f Merge remote-tracking branch 'origin/4.1' into 4.2
Conflicts:
	src/plugins/ios/iostoolhandler.cpp
	src/shared/qbs
	src/tools/3rdparty/iossim/iossim.qbs
	src/tools/3rdparty/iossim_1_8_2/main.mm

Change-Id: Ied9cafec4f1ee93d9e524f095f5c6b1480b2f054
2016-10-17 16:16:07 +02:00
Vikas Pachdha
2b0daf42ce iOS: Replaces ios_sim tool with simctl
Task-number: QTCREATORBUG-16947
Change-Id: Ia28d5e4f9f220d566bd64da73989e8c24ef3eb37
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-10-17 13:46:34 +00:00
Orgad Shaneh
79d889ca47 Ios: Fix translatable string context
The widget doesn't have tr

Change-Id: I8f49b67d169b6a44f3e970ffefa413e0f21cf5ac
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-23 07:49:18 +00:00
Tobias Hunger
f32a1b1e4c ProjectExplorer: Add some more functions to buildsteplist
Use those functions instead of repeating code all over the place.

Change-Id: I03161663b4d5c538fb2ea667353ab7846373ad81
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-04-20 12:16:25 +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
0983c7cc1a Ios: use ArgumentsAspect in IosRunConfiguration
Change-Id: I9f2f0eacf5fca155912eb4417d2ac89afcf64901
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2016-01-19 14:04:23 +00:00