Commit Graph

210 Commits

Author SHA1 Message Date
hjk
8536504caa ProjectExplorer: Upstream CMake's handling of outdated builds
This is mainly there to make the local runconfiguration implementations
more uniform. Both qmake and qbs will drop runconfigs for builds that
are not available anymore, so that's a no-op for them.

Change-Id: I8aa32d779f67cce7a4d4733cfbe0c9a136bfd3f7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-22 12:35:14 +00:00
hjk
ea9dad4719 ProjectExplorer: Introduce Target::buildTarget(buildKey)
A convenience wrapper for

   applicationTargets().buildTargetInfo(buildKey),

the only context using the BuildTargetInfoList member.

Also, only one of the free comparison functions is ever used,
only in one place. Inline it there.

Change-Id: I7565e9d51d429af34352649e235243e5b3328fe9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-02-20 11:27:16 +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
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
32ba65c7f8 ProjectExplorer: Remove IRunConfigurationAspect::runConfiguration
... and adapt constructors to not take the now-unneeded
RunConfiguration pointer.

Change-Id: I53ff338f51334ff7b0c22d4bed92bfcfc8225ea7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-13 12:09:39 +00:00
hjk
5bc0b6ce33 ProjectExplorer: Make WorkingDirectoryAspect less dependent on runconfig
This was one of the genuine users of the run config pointer in the
aspect base class. Instead of using that stored pointer to retrieve
the relevant environment aspect pointer later, pass and store this
env aspect pointer at construction time.

Change-Id: Icbdeb9ad0fe341e4003fb544c542064801aa170f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-10 11:14:47 +00:00
hjk
06b6fff25e ProjectExplorer: Simplify LocalEnvspect's BaseEnvironmentModifier
The run configuration is known at setup time, and fixed.

Change-Id: Iad7837bf39fb5eeed49bd71b7f14b9692014ea9d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-06 12:12:53 +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
25400751a4 ProjectExplorer: Remove RunConfiguration::fillConfigurationLayout
Instead of using a hard-coded list of well-known (optional) aspects,
add all aspects, so there is no need for special treatment of
RunConfiguration with unusual/custom aspects needed.

Price and benefit is that the individual run configs are again
responsible for the aspect display order which is determined
from the aspect construction order.

Change-Id: Iff2656b2e358c0f0f789d4c006a5c44d0a1536a5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-09-04 11:02:49 +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
hjk
397de4ff30 Tie SimpleTargetRunner desktop usages to individual RunConfigurations
This avoids the "catch all" that leads to conflicts with more specific
setups like the AppManagerRunConfig, and consequently lets us remove
the priorities in the RunWorkerFactories.

Change-Id: I382f00ca7f759eef995ac6fe749bb371ab027020
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-31 10:17:23 +00:00
hjk
4ec4f111cb CMake: Do not store the "title" in the run configuration
This has been superseded by other items, most notably the buildKey.

Incidentally, even Creator 4.6 is robust enough to handle .user files
without the CMakeProjectManager.CMakeRunConfiguation.Title key without
problem.

Change-Id: Iaecb2c15b31ebfb78146c0bec8b955ae821e4499
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-26 12:52:54 +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
d269e9a492 ProjectExplorer: Factor out some common code in runconfigurations
DesktopQmake, CMake, Qbs, Nim, RemoteLinux and Qnx now have a common
understanding what should be in a runnable and how their
configuration widget should be set up. So move them over to
using shared code, too.

Several others runconfigs only lack a one or two more aspects
to follow suit in later patches.

Change-Id: Ia862c95c97d63bd0a0f2dc303435775a2fc530d3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-24 05:58:48 +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
a06514c365 ProjectExplorer: Start unifing visual appearance of run config widgets
Margins and layout style widely differ so far. Start moving everything
to a QFormLayout with the same margin and growth policy.

Change-Id: I0bd1d8b2ec9830be56354be1376a2a24eebb8845
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-10 08:41:16 +00:00
hjk
8c713d45a8 CMake: Use new ExecutableAspect
Change-Id: Ic880351802c52b61c53c6730d23dfe3f124ebc44
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-29 14:27:14 +00:00
hjk
798d115a5c Consolidate some run configuration widget boilerplate
This removes the outermost layer of widget-vbox and moves some
common code into a helper function.

The pattern repeats (with variations) a few more times, that's
left for later patches.

Change-Id: I8c98229cf41d03d5330c896ec9fa0965bfc65602
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-22 09:44:49 +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
hjk
9f81129417 CMake: Restrict CMakeRunConfigurationFactory to local setups
Anything remote is being taken care of by the target specific factories,
having CMakeRunConfigurationFactory accept everything too leads to
unhelpful duplicated entries.

Change-Id: I7e509593f6eaed8ee75ef0acef1703a877b1f011
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 09:38:14 +00:00
hjk
a5d6fe33cb Partially decouple local CMakeRunConfiguration from CMakeProject
Funnel all relevant data through target.applicationTargets() as
done for the non-local CMake-supporting setups and QBS already.

There is cleanup potential left for later changes.

Change-Id: I49ed6abd98c058a7fd1545e41b3bcd6ecb758a8b
Task-number: QTCREATORBUG-19985
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-13 15:02:54 +00:00
hjk
eece1be316 CMake: Re-add RunConfiguration display name
Amends 6f04ca646 for QTCREATORBUG-19762?

Task-number: QTCREATORBUG-19954
Change-Id: I5da8bf15b5b62500fd0936d15451dfefd878b57b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-13 12:12:03 +00:00
Eike Ziller
0b10ecc718 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakeproject.h
	src/plugins/debugger/debuggerplugin.cpp
	src/plugins/ios/iosrunfactories.cpp
	src/plugins/nim/project/nimproject.h
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
	src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp
	src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
	src/plugins/qmlprojectmanager/qmlproject.h
	src/plugins/qnx/qnxrunconfigurationfactory.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/winrt/winrtrunfactories.cpp

Change-Id: Ib029fdbaa65270426332f5edd6e90264be5fb539
2018-03-13 11:25:38 +01: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
6e419d642a RunConfigurationFactories: Fix crash opening non-qmake based projects
Make sure the Qnx RCs only get triggered for qmake-based projects and defend
against broken set-ups using QTC_ASSERT.

Task-number: QTCREATORBUG-19755
Change-Id: If64b73de49b0199308f767151d68909dc8b1bc53
Reviewed-by: hjk <hjk@qt.io>
2018-03-07 14:35:15 +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
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
6f04ca6463 CMake: Do not override the displayname/defaultdisplayname
Do not override the displayname/default displayname when restoring
CMakeRunConfigurations.

Task-number: QTCREATORBUG-19762
Change-Id: Idf5e90e017a363444387e9c22812ad501aabc75b
Reviewed-by: hjk <hjk@qt.io>
2018-02-09 09:34:19 +00:00
Tobias Hunger
d5cd95c702 CMake: Fix warning about unused parameter
Change-Id: I008a9e6193503a2d2761675921b6bc673ea5333d
Reviewed-by: hjk <hjk@qt.io>
2018-02-07 13:21:46 +00:00
Tobias Hunger
e1409ae50f IRunConfiguration: Remove BuildTargetInfo from the RC factory APIs
Change-Id: I1d77d22a1c1ce1cbcfca8af7855ae7b935ac1c2c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-02-06 09:01:32 +00:00
Tobias Hunger
b3abe8cbe3 CMakeRunConfiguration: Fix warning about unused lambda capture
Change-Id: Ib40a40ff77f9473aafe94b176e8309ff7e3a4e12
Reviewed-by: hjk <hjk@qt.io>
2018-01-17 09:12:16 +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
1f3ba4ce15 QmakeAndroidSupport: Move AndroidPackageInstallationStep to Android plugin
There's nothing Qmake related in there (anymore?).

Change-Id: I8842d4824065cf3cba61d50b6f333ec3b52e3851
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-12-12 16:05:20 +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
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
Tobias Hunger
3b86d90266 CMake: Add QT_INSTALL_BINS to PATH on windows
Add QT_INSTALL_BINS to PATH on windows in the CMake RunConfiguration.

This should fix cmake applications using Qt not being able to get
started after they were built.

Unfortunately this patch is not a great solution: This should be configurable,
similar to the "Add libraries to LD_LIBRARY_PATH" checkbox we have for other
OSes and build systems. Such a change is unfortunately not acceptable at this
stage of the 4.5 branch though.

Task-number: QTCREATORBUG-19354
Change-Id: Ic2d568d965e41e3eb875fed8c2e5dd2ba15d2db1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-23 15:00:58 +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
28fda42c62 CMake: Use Standard RunConfiguration::initialize(Id) signature
Change-Id: I66b534df216552d129d4605148ff3b4eff543d11
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-15 16:36:49 +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
Tobias Hunger
9ca74997d5 CMake: Use QtOutputFormatter for CMakeRunConfigurations
Use QtOutputFormatter for CMake run configurations that belong to targets
with Qt configured.

Task-number: QTCREATORBUG-18586
Change-Id: Iedb6d7079649022b2ba6dabef37b79c0d33b8635
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-07 09:51:22 +00:00
Tobias Hunger
cac9db78df CMake: Make conditions in disabledReason and updateEnabledState match
Change-Id: I7c218b20e15c1e7b2dcca7dd80b226536cfa650b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-29 10:17:03 +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
22e053b86f CMake: Show executable in Run Configuration
Task-number: QTCREATORBUG-18173
Change-Id: If512991873121151e18b56781729f6b841796549
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-07-25 14:29:58 +00:00