Commit Graph

17 Commits

Author SHA1 Message Date
Miklós Márton
aeb7ef6b37 Remove duplicated code
Merge QtOutputFormatter::linkFormat and
PythonOutputFormatter::linkFormat to OutputFormatter::linkFormat because
these two functions were identical.

Fixes: QTCREATORBUG-23562
Change-Id: I1337b2fd66fc7d7b6742eb5e9c1a2caf1dc6b5bd
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-05 08:22:53 +00:00
David Schulz
eebbd1ebc8 Python: Add option to disable buffered output
Fixes: QTCREATORBUG-23539
Change-Id: I1679642f470bd7ec2a478b41e942935a6e7ba027
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-03 07:48:02 +00:00
hjk
b1474dc5ef ProjectExplorer: Replace RunConfiguration::doAdditionalSetup
... by an explicit update() call. This is what effectively done in
most cases, and should be harmless and reasonably cheap in most other
cases.

Change-Id: I323112ec7cdbccf19050ac54466d8e1d97a0516e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-17 16:29:45 +00:00
hjk
684d3e40a7 Python: use new runconfiguration aspect update mechanism
Change-Id: I60807350460e75172bf4744beeb1474755ff4187
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-27 08:07:04 +00:00
Eike Ziller
4e6142c932 Merge remote-tracking branch 'origin/4.11'
Conflicts:
	src/plugins/autotest/testresultspane.cpp
	src/plugins/cmakeprojectmanager/cmaketool.cpp

Change-Id: Iade695ac9cab8bf3e3a1abd6e2c71f4a19132ac0
2019-11-21 22:18:35 +02:00
hjk
c2127c9ec4 ProjectExplorer: Introduce and use a Target::buildSystemUpdated signal
Change-Id: I497d46866146600a1ed9162bd720c574ee4d4769
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-21 13:08:06 +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
David Schulz
b2e1499782 Python: Use native separator in user visible path
Change-Id: I7ef46a2cae7744162a6f9da92a4736d74a029705
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-11-15 14:05:50 +00:00
David Schulz
40612bceee Python: Fix python run configuration
Add the WorkingDirectoryAspect to prevent running the
main script in an unpredictable location.

Change-Id: I1be206261b7983e933b53ccd57c93089154d8417
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-11-15 14:05:38 +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
Eike Ziller
04bd6e39c8 Merge remote-tracking branch 'origin/4.11'
Conflicts:
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quick3dnodeinstance.cpp

Change-Id: I8ea57eba526ab830608fd928c28771c5441749f8
2019-11-01 15:31:19 +01:00
David Schulz
6664d78ded Python: detect virtual environments for documents and projects
After opening a document or project the directory hierarchy is looked up
for a Scripts/(activate && python.exe) on windows or bin/(activate &&
python) on unix. This is the usual structure of python virtual
environments. If such a folder is found add the python from that folder
to the list of configured interpreters in the settings, set it as the
current interpreter for the project and try to open the corresponding
language server.

Change-Id: I038c309ea2988f9370194330d250d1515beac0a0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-30 08:46:12 +00:00
Eike Ziller
bea3a8fa6f Merge remote-tracking branch 'origin/4.11'
Change-Id: I66389d88d5a60c6c86547b93cca945af42aa807b
2019-10-28 11:48:31 +01:00
David Schulz
10c94994db Python: close all info bars after language server setup
Change-Id: I607f7cb5a31f3db0c7d7d77011860a1ea87eb8d2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-25 12:50:24 +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
David Schulz
c8ccfea225 Python: Switch pyls on interpreter change
Change-Id: I458b635986a55003a1e7254e27e2df9667704273
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-18 05:23:10 +00:00
David Schulz
a90c9c6409 Python: extract PythonRunConfiguration and PythonProject
Change-Id: I4ff0f43fdb8beb9a7f2f7816197de0c796da8d89
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-17 06:56:51 +00:00