Commit Graph

229 Commits

Author SHA1 Message Date
Thomas Hartmann
4a4e124b07 QmlProject: Add simple way to change between Qt6/Qt5 kits
The feature is only available in QDS mode.
This adds a combobox to the run configuration which allows
the easy selection of a Qt 5 or Qt 6 kit.


Task-number: QDS-4733
Change-Id: I53fae9fe4bc415e5b1e8d385ef85ed81b8010b3a
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-08-03 20:24:31 +00:00
Tim Jenssen
22121885fe baseqtversion: commands are FilePathes
also renamed the qmlscene* qmlRuntime*

Change-Id: Ifd522e21f5ce30aaa54060fdcebee2cd8b9463c4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-14 09:50:01 +00:00
Tim Jenssen
453f4996db use "qml" as QML runtime
Since Qt 6.2 qmlscene is deprecated by Qt.

This patch also removes QMLViewer as a last
QtQuick 1 artifact in external tools.

Task-number: QDS-639
Task-number: QDS-4535
Task-number: QTCREATORBUG-22385
Change-Id: I5f67040954f8ef438961f7166a53bd96d5b73f4d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-13 15:38:46 +00:00
hjk
b52f2d198a QtSupport: FilePathify BaseQtVersion::qmlsceneCommand()
Change-Id: Ia0bc3fcb40bbda31cd114503ab599b65d7597e70
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-01 07:37:00 +00:00
hjk
f2f40efa03 Utils: Move process arguments class out of QtcProcess
The main QtcProcess interface is nowadays a CommandLine, with no
explicit references left to QtcProcess::Arguments and related static
helper functions, so it only clutters the QtcProcess class interface

So move these items out of QtcProcess, later potentially to a separate
file pair.

Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-11 09:45:24 +00:00
hjk
09d24face0 QmlProject: Use new RunConfiguration::setRunnableModifier
Change-Id: Idb729996b979effc96d97bfe7220668dfb904bb2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-21 06:24:06 +00:00
Christian Kandeler
29ddb3bcdb ProjectExplorer: Allow to schedule a build/run during a project parse
Once we parsed the project initially, subsequent parses typically do not
change things in a major way, so we can expect e.g. run configurations to
stay intact.
It therefore makes sense to allow users to schedule an
application run not only during a build (see 4b92b7ac60), but also
during a parse. Arguably, this is even more relevant, as parsing is
usually not triggered directly by the user, but happens as a side effect
of editing a document or switching a branch. It is then annoying for
users to have to wait until the respective buttons get enabled again.

Fixes: QTCREATORBUG-24986
Change-Id: I1081ccde668eee794c39b96cd0bad5c3aaa580bc
Reviewed-by: hjk <hjk@qt.io>
2020-12-11 15:17:05 +00:00
hjk
cec468d78a Utils/ProjectExplorer: Move re-usabled bits of aspects to Utils
Classes involved are BaseAspect and some derived classes,
LayoutBuilder and VariableChooser.

This is mostly mechanical, with various include/using changes
to make it compile.

Change-Id: I624a457f3555f102e541c4c71e33a9423af32250
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-23 07:44:42 +00:00
hjk
61bfd32438 ProjectExplorer: Introduce a ProjectConfiguration::kit() function
For convenience, and use it in some places.

Change-Id: I8f7cb502b37b2fbf4cf2d17cac9c6299558332dc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-09 06:27:21 +00:00
hjk
51e7bce109 ProjectExplorer: Rename Base*Aspect to *Aspect
In most cases they are used directly, so there's not much Base* in that.

Added the old name as alias as porting help for a while.

Change-Id: I494a8a560b8996bcf74915ea3570b504df6a6b4c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-08-14 07:35:43 +00:00
Tim Jenssen
4fe5b923cd Merge remote-tracking branch 'origin/qds-1.59' into 4.13
Change-Id: Ic720f3adab305c5ef8cd10e713ccabf510eff0c0
2020-08-13 06:39:40 +00:00
Tim Jenssen
bde420f7b7 qmlproject: rename lastUsedLanguage -> currentLocale
removed the connection from plugin to
QmlMultiLanguageAspect::setCurrentLocale
but calling it directly in QmlPreviewPlugin::setLocale

Does not matter which method is called it will change the right
thing only once because it is checking if it already have the
set locale.

Change-Id: I6cb4b115788adc103481dcda45e3214a0cd73401
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-23 09:14:31 +00:00
Tim Jenssen
2fc89375c6 qmlproject: act on disabling multiLanguageAspect
Change-Id: I2f13090f8708a5cb46bf21fb0e855d8ca9d906e7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-07-20 16:56:04 +00:00
hjk
e1c88116b3 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 11:15:18 +00:00
Tim Jenssen
52316578f8 qml: introduce QmlMultiLanguageAspect
This aspect is only available if the special multilanguage
plugin is available.
Translation changes in that plugin changes this aspect,
which results in environment variables which activate the use
of a multilanguage created sqlite to provide the translations.

Change-Id: I38250b69165eb7ec3e4f82dc34b3cc4ba0a33f8f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-18 13:02:37 +00:00
hjk
f4769d7931 QmlProjectManager: De-export QmlProjectRunConfiguration
Change-Id: I728c4f40f9cc4b559e18fcef10289eddcd5e87bf
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-02-11 12:39:15 +00:00
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