Commit Graph

213 Commits

Author SHA1 Message Date
Tim Jenssen
50a350f0a3 QmlProject: move/rename MainQmlFileAspect to QmlMainFileAspect
Will be used later in LocalQmlPreviewSupport so add also
export and dependencies in the build system files.

Change-Id: Ie5d26e7b89342c3ae3ff682a73194f240b71c21a
Reviewed-by: hjk <hjk@qt.io>
2020-01-08 09:55:29 +00:00
Eike Ziller
267946d100 Merge remote-tracking branch 'origin/4.11'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/boot2qt/qdbrunconfiguration.cpp
	src/plugins/boot2qt/qdbrunconfiguration.h
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
	src/plugins/qnx/qnxrunconfiguration.cpp
	src/plugins/remotelinux/remotelinuxrunconfiguration.h

Change-Id: I17c8e1bf300bb75d7317ccf7749dd3cc07709c21
2019-12-16 16:19:44 +01:00
Tim Jenssen
f265257d55 QmlProject: use qobject_cast instead of static_cast
Change-Id: I0a75c18eec64404b8689ad27ad35a8d65d69711f
Reviewed-by: hjk <hjk@qt.io>
2019-12-16 09:08:03 +00:00
Orgad Shaneh
49f6b0146a Merge remote-tracking branch 'origin/4.11'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/mcusupport/mcusupportrunconfiguration.cpp
	src/plugins/python/pythonproject.cpp
	src/plugins/qmakeprojectmanager/qmakestep.cpp
	src/plugins/qmlprojectmanager/qmlproject.cpp
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: I22507be28fd80c49c9fee0dff5937a40db176a82
2019-12-07 18:39:54 +02:00
Thomas Hartmann
88103453f2 QmlDesigner: Add option forceFreeType to qmlproject
This option enforces the usage of FreeType even on Windows
for the form editor and live preview.
This can be useful when developing for Linux devices.

The option can be eanbled by adding
'forceFreeType: true'
to the .qmlproject file.

Task-number: QDS-1143
Change-Id: I7e749e95584e23202536596ee4f7cdaa09d3a371
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-12-06 10:05:46 +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
76a85d9af4 QmlProject: Clean up RunConfiguration
Change-Id: I635b86c53ca72e82a52cf0002b9269ee15e1958e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-11-21 07:38:56 +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
Tobias Hunger
550c51c75e QmlProject: Ignore generated files
Do not bother to look at generated files. Currently this makes no
big difference, considering that there usually are no generated files
in QmlProjects. That might change in the future with asset
conditioning though.

Change-Id: Ia773f09343efe5ebb006c69e4f41d724bba42d86
Reviewed-by: hjk <hjk@qt.io>
2019-08-22 10:34:48 +00:00
hjk
583cf69391 QtSupport: Move qmlsceneCommand down to BaseQtVersion
This had already accessors to all kind of commands, having also
qmlsceneCommand there makes it more consistent and lets us un-export
DesktopQtVersion.

Change-Id: I3ba5a840125b2b1197abb1564b7906571230f2c4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-20 10:37:40 +00:00
hjk
596a54f645 RemoteLinux: Move EmbeddeLinuxQtVersion to QtSupport
The class uses only one ID from RL at compile time, and after the
move RL does not hard-depend on QtSupport anymore.

Change-Id: I9f8aa6782e45fe998d83ddcc5323c396964bf1fe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-16 06:10:43 +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
hjk
7ebe005206 ProjectExplorer: Replace RunConfiguration::executable
... by a RunConfiguration::commandLine().

That's what is typically consumed, and removes the need for some
custom runnable() implementations.

Change-Id: I7700b12cdd0965802a0add977b432314734a5a72
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-12 12:30:23 +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
Christian Kandeler
a9d2e14dca ProjectExplorer: Add executable() accessor to RunConfiguration
Amends f6c276daf0, which was a quick fix for 4.9.

Change-Id: I94281af6a9a0d0bfe197ce836488f708d5bd677d
Reviewed-by: hjk <hjk@qt.io>
2019-05-24 09:12:42 +00:00
Eike Ziller
4545c81e57 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	doc/src/howto/creator-sidebar-views.qdoc
	doc/src/howto/creator-ui.qdoc
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/autotest/testresultmodel.cpp
	src/plugins/autotest/testresultmodel.h

Change-Id: I24cc585ca7782cb1d9cb0b8b73b46892b41937fd
2019-05-08 12:41:25 +02:00
Christian Stenger
ff500cbec7 QmlProjectManager: Fix using history completer
Avoid a soft assert and allow using the history completer when
specifying the QmlScene or qmlviewer.

Change-Id: Ibf1ff7f07b9280d211902f6510505fff2bc63abf
Reviewed-by: hjk <hjk@qt.io>
2019-05-06 07:41:28 +00:00
Thomas Hartmann
f8202239d6 QmlProject: Implement basic support for QmlFileSelector
This patch adds support for QmlFileSelector for
QmlProject and Qt Quick Designer.

Task-number: QDS-590
Change-Id: I0cc043d3ec9578008ec879b36fe834b70fb8c5ad
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-04-25 13:55:29 +00:00
hjk
d34eb692fe QmlProject: Do not crash on project creation
Task-number: QTCREATORBUG-22244
Change-Id: I38c6527269ba553c0e4734c437f5a6918da729a3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2019-04-05 15:10:44 +00:00
hjk
1bc10248c0 ProjectExplorer: Introduce a SimpleRunWorkerFactory template
... and use in as replacement for RunConfiguration::addRunWorkerFactory.

It is still convenient to have a simple way to set up run worker
factories for the typical "just run for this configuration" case,
but it's even better if it follows the nowadays predominant pattern
of keeping factories in the plugin's pimpl.

Also, it turned out there were two copies of
QmlProjectRunconfigurationFactory code, one is enough.

Change-Id: I0b28c4ea18d0f52165a49f6133dc8687a3b9c7cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-19 15:56:17 +00:00
hjk
164ae1428e ProjectExplorer: Move RunControl related classes to separate file pair
Change-Id: I5da56f80336673d595907abcc797f628be680cd5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-13 14:44:46 +00:00
hjk
6faaea8d0c ProjectExplorer: Split EnvironmentAspect
... at least logically a bit more into hunks responsible for
one of the possible choices of base environments.

This makes it possible to move code that modifies individual
cases closer to the only place that uses it.

Change-Id: I1c87bb869e04e44b92ff097b0bf25274f93808be
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-11 12:40:51 +00:00
hjk
ac1b0facc0 ProjectExplorer: De-virtualize EnvironmentAspect::baseEnvironment
Will help to streamline *EnvironmentAspect constructor signature,
which in turn will help to have a generic cloning mechanism to
clone aspect data, which in turn will help to finally execute on
the idea that RunControls should be re-runnable in their original
setup and also resilient to changes in the setup while they are
running.

Change-Id: Ibdaca487c1f7ce043e675fd014fe923a70273639
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-07 16:06:46 +00:00
hjk
014789d994 QmlProjectManager: Fix QmlProjectRunConfiguration::updateEnabledState
Amends 8536504caa.

Change-Id: I20d26dd326dc50609f25de1f04f99a5f1ec186a6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-04 13:12:02 +00:00
hjk
6f37348b4c Replace static_casts by QOverload where possible
Mainly to get rid of the QProcess::finished deprecation warning.

Also adjust coding style in the surrounding connects when needed.

Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-26 15:18:14 +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
Alessandro Portale
adea8467f4 Fix warning: "Don't call QHash::operator[]() on temporary"
[-Wclazy-detaching-temporary]

Change-Id: Ide503c9260af285fa1dbedb63f7819c8ad616db6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-01-17 10:04:11 +00:00
Alessandro Portale
0bff017616 QmlProjectManager: Modernize
modernize-*

Change-Id: Ic47c32c3fbf96d36f0d64e331eccc8c8e8aef6d2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-11-30 16:51:15 +00:00
Robert Loehning
8e54095d07 QmlProject: Capitalize consistently
Change-Id: I61c5db4008adf0dead0421a2d223a9d4d2586966
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-22 09:08:06 +00:00
hjk
f18176d6c0 ProjectExplorer: Remove Run{Control,Configuration}::abi
Unused now, and arguably not a valid concept anymore.
A run control may consist of different runworkers,
'operating' on different systems.

Since the removed RunConfiguration::abi() implementation uses
only public Target ABI, user code could revive that locally
in case it was needed again.

Change-Id: I658c6e88b4a1aec18bf4de91fc86230552bc0710
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-16 08:13:38 +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
d421bc2fe3 ProjectExplorer: Split IRunConfigurationAspect
... into items that can be used generically in project configurations
(ProjectConfigurationAspect) and items that have a choice between
global and project settings (GlobalOrProjectAspect)

Change-Id: I94831237bdbb18c339eb76eba131bf7f928933d6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-18 06:13:21 +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
f66770cde1 ProjectExplorer: Pass macro expander to ArgumentsAspect::arguments
To remove the last user of IRCAspect::runConfiguration.

Change-Id: I1390166730112008a4050877f96bb29f274e7ef1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-13 07:32:22 +00:00
hjk
679576b511 QmlProject: Pass project to MainQmlFileAspect ctor
This avoids four uses of IRunConfigurationAspect::runConfiguration()
which is meant to be removed soon.

Change-Id: I7a8f0a09b0a90042b0855b18e5be875bd343268c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-12 07:06:21 +00:00
hjk
0d687b7292 QmlProjectManager: Pass target to QmlProjectEnvironmentAspect ctor
This avoids one use of IRunConfigurationAspect::runConfiguration()
which is meant to be removed soon.

Change-Id: Ib394a71b6bb7a6c028fc533656454b94895f6451
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-11 07:45:17 +00:00
hjk
907767b89b QmlProject: Use IRunConfiguration's changed() signal
... instead of directly accessing the owning runconfig.

The removes two uses of IRCAspect::runConfiguration()
which is meant to be removed soon.

Change-Id: Ia713864f2544e3c6741482b2663ee54fd2ee80e1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-11 07:12:41 +00:00
hjk
097de6c5d0 QmlProjectManager: Aspect-ify runconfiguration
Split the remaining manually managed data into a standard ArgumentsAspect
and a new MainQmlFileAspect.

Change-Id: I8a8fe3f4a08d602a7b6e9c9463d3d7de257b6e6c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-10 10:18:27 +00:00
Ulf Hermann
2d93a20bb6 QmlProject: Allow different QML viewers per project
Change-Id: I7ca136fe1cf51b8335a15b1b2b7ea838e4859f78
Reviewed-by: hjk <hjk@qt.io>
2018-09-05 07:55:33 +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
0fbb2839f9 Remove ApplicationLauncher::Mode
The actual remaining use was to pop up a terminal in some
setups where Mode == Console, with a default of Gui meaning
"no console". In some downstream uses it was used set to
Console (probably to mean "this helper process does not need
a gui") but then luckily ignored when actually starting the
helper processes.

All cases where the console is useful and requested are
nowadays RunWorkers belonging to RunConfigurations with
a TerminalAspect, so they can directly get the relevant bit
from their RunConfiguration without having it part of
all StandardRunnables.

Change-Id: I1368d5968da5cf672656aebf200ccac8d45335d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-05 15:08:29 +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
36b835ff0a Finish merging Runnable and StandardRunnable
As all Runnables are known to be StandardRunnables, this here
essentially replaces all .is<StandardRunnable> by 'true'.
.as<StandardRunnable> by no-op, and fixes the fallout.

Change-Id: I1632f8e164fa0a9dff063df47a9e191fdf7bbb2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-23 08:48:36 +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
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
11336fb604 QmlProject: Move RunConfigurationFactory close to RunConfiguration
No need to have a dozen lines of code in a separate translation
unit and more in line with what others do nowadays.

Change-Id: I765535d1484805bc3005fe23bfd4992a96a80e9c
Reviewed-by: hjk <hjk@qt.io>
2018-04-09 08:49:09 +00:00
hjk
3bce4b9af2 QmlProject: Use new helper function to create run configuration widgets
Change-Id: I471fe60d25bb3d8ca3ebf2d2abe8e725bc7daa56
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-03-27 12:33:51 +00:00
Thomas Hartmann
0474216e2f QmlProject: Fix import paths for code model
This fixes a regression introduced by
30638df441.

Custom import paths have to be absolute for the code model.

Change-Id: I232229fa58c3900fe684ca4529b2ed08bf93e8be
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-02-26 13:31:23 +00:00