Commit Graph

311 Commits

Author SHA1 Message Date
hjk
691c8148a3 ProjectExplorer/RemoteLinux: Consolidate X11ForwardingAspect handling
Change-Id: I7e74f58ab50c84c74ba65f9f64aaa4d0ea73bbb6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-26 10:48:08 +00:00
David Schulz
fd04d6afa4 ProjectExplorer: always map working directory path to command device
Change-Id: I0d2d54df118b70c2874b77b4ec2792fb8e114416
Reviewed-by: hjk <hjk@qt.io>
2023-06-23 12:06:36 +00:00
hjk
4a17a26a6d Python: Allow redirecting the display for remote setups
Change-Id: I83baa9c74a1586590147668c9fea661018101776
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-06-23 12:06:22 +00:00
Christian Kandeler
cf6bd7e012 Fix occurrences of the contains/insert anti-pattern
Introduce and make use of Utils::insert() for QSet with a return value
that indicates whether insertion actually happened.

Change-Id: I655e4bc3553b74fea5ae8956205e4d8070118d63
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-23 09:51:54 +00:00
Leena Miettinen
7da84e1734 Python: Use double quotes for emphasis
And write Python with an initial capital letter and UI with
all caps.

Change-Id: I5c7a85aa4ae9e5af1f4cc66e8705db126fbec23b
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-06-19 09:53:51 +00:00
David Schulz
80e66ed172 Python: preserve sorted state of project files
Change-Id: I77cd9d9bac93a04d0e30beda8541862a1cd5371f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-06-15 06:16:17 +00:00
David Schulz
4f01ac4bdf Python: exclude the project file from the list of files to save
Amends 8d733f95e6

Change-Id: Ia9d1f29dd85a9560f4fe4e808cba625f1b24ad2c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-06-14 11:21:09 +00:00
Eike Ziller
a6f2ee5b8c Python: Tr fixes
Add missing colons, quotes and full stops, and don't use book style
capitalization for labels.

Change-Id: If338922c7221eac498612ad5a152f24cd921e884
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-06-13 13:46:09 +00:00
David Schulz
1916f42690 Python: allow remote browsing for python interpreter
Change-Id: I4d8c92d4fa63b90b95bea454198d33839485868e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-06-09 11:37:34 +00:00
David Schulz
8d733f95e6 Python: simplify project file saving
use QJsonDocument to save the new style project files. This improves the
formatting and prevents replacing the newly introduced qml import path
field. Also used FilePath::fileContents/writeFileContents to support
remote projects.

Fixes: QTCREATORBUG-28541
Change-Id: Ie614726b6775dad2361437dc5d410438c7d01141
Reviewed-by: hjk <hjk@qt.io>
2023-06-09 11:37:26 +00:00
David Schulz
45acf2d49e Python: Use FilePath for absolute paths to project files
Change-Id: Ied4db237fe6a3b9532fced7c575a8a3717b405fc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-06-09 11:37:20 +00:00
David Schulz
d548c973cf Python: use the system environment of the project dir
to expand variables in the python project files.

Change-Id: Iff8d2445bad9a7ae15e720b65ac5c894c8efdb02
Reviewed-by: hjk <hjk@qt.io>
2023-06-09 11:37:12 +00:00
David Schulz
4fa65c4a34 Python: unify reading project files
Also support remote file paths for old style project files and do not
change order of files in the new project file.

Change-Id: I49b0781b26ca33b605aef674a04ee676f1848986
Reviewed-by: hjk <hjk@qt.io>
2023-06-09 11:37:06 +00:00
David Schulz
d617b046c6 Python: support remote file paths when loading projects
Change-Id: I94f709275d3b226685439ac55d58b029d3323d12
Reviewed-by: hjk <hjk@qt.io>
2023-06-06 10:55:06 +00:00
David Schulz
beaf86f9de Python: filepathify python project path for saving
Change-Id: Ibcea9de6c8844cb826b61aa40357890153923854
Reviewed-by: hjk <hjk@qt.io>
2023-06-06 10:42:13 +00:00
hjk
629e6ab945 Use a few more explicit FilePathAspects
Change-Id: I97431306754af3ea7a803021db7b876c31abc940
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-01 15:33:47 +00:00
Eike Ziller
0b863af8a1 Tr/Python: Fix translation issues
- Use parametrization
- Split message that relied on sentence structure of the language

Change-Id: I5c0cca684bc9c94219e740fe0292e358a91714da
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-01 06:26:06 +00:00
Eike Ziller
14fe48dff7 Tr/Python: Simplify UI text for translation
Parametrize link target, and use markdown for simpler link syntax.

Change-Id: I6d1bae0431aa4e5bd7c7ad39b1219289eda40391
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-30 07:28:24 +00:00
Eike Ziller
f2c1455025 Tr: Wrap file paths with ""
Change-Id: Iee0e941ff503ff485e8e9c0d9fe3e52eea9042d5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-05-26 13:50:07 +00:00
hjk
320064f431 Utils: Allow more finegrained subaspect ownership in AspectContainer
Currently this luckily conincides with the register/addAspect schism
but that's not necessarily true in the future.

Change-Id: I05a59d74182dbdf81193ebd790d6f9bab2d30439
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-25 11:41:50 +00:00
hjk
6c66b900db ProjectExplorer: Merge LocalEnvironmentAspect into EnvironmentAspect
This still has some not quite orthogonal features in one blob function,
but at least it's not a separate class anymore.

A step forward to remote support in places where it could make sense.

Change-Id: Ia02003e4340eb2b5ee92bd48c00006a487527828
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-25 08:30:33 +00:00
hjk
b2c69b947f Python: Adapt PySideBuildStep to recent FilePath{Aspect} changes
Change-Id: I866b49733f3007e4f029fb25f8519a1c5b690370
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-24 07:28:59 +00:00
hjk
49b0238446 Python: Move PySideBuildConfiguration to .cpp
Not publicly needed and closer to the generic pattern.

Change-Id: I886f95c24b957b8d3943cd115814bceb6a76b651
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-24 07:27:17 +00:00
hjk
42a162c9af Python: Use FilePath::searchInPath instead of Environment::findInPath
That's the last remaining users.

Change-Id: I14ce380b9c96b2197e478600a46ca725ed1acfbf
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-24 07:00:28 +00:00
Alessandro Portale
5975657e77 Utils: Centralize style-related property names as constants
This introduces string constants in Utils::StyleHelper. They are used by
code all over in Qt Creator to tell ManhattanStyle how to paint certain
widgets.

Change-Id: Iecca36103f80084cd5fe93fcb6b18b8fbb3a32bb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-10 13:25:10 +00:00
Marcus Tillmanns
e6081aaa0a Utils: Add TerminalMode::Detached
Change-Id: Ic36845d3469719e17f24602ce80f3e6cfc984fbf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-04 10:43:36 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-04 05:52:16 +00:00
hjk
50084f6b0e Layouting: Handle attach types via setter
Change-Id: I862f5cd109db3582b4f029787ec0cded2da39ce6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-03 13:44:19 +00:00
Jarek Kobus
a3a5b8f806 Utils: Rename asynctask.{cpp,h} -> async.{cpp,h}
Follows AsyncTask -> Async rename.

Change-Id: I37f18368ab826c9960a24087b52f6691bb33f225
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 13:24:20 +00:00
Jarek Kobus
c67dc5e8d4 All Plugins: Use global future synchronizer
Instead of using plugin's own synchronizers. The global
synchronizer does the synchronization just before all the
plugins' destructors run (in sync), so this should be
the right equivalent.

Change-Id: I8d09c9ea4a11b7a703684ad5319191ce310d992e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-25 13:45:39 +00:00
hjk
8cf500c5bc Utils: Make Layouting a top level namespace
The whole machinery is now almost only layoutbuilder.{h,cpp},
mostly independent of the rest of Utils. Idea is to finish the
separation to make it stand-alone usable also outside creator.

Change-Id: I958aa667d17ae26b21209f22412309c5307a579c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-25 13:31:25 +00:00
hjk
69d53245f2 Python: Avoid IOptionPageWidget::widget() in settings
This is planned to become inaccessible for user code.

Change-Id: I2530a6ccf9f46cedff68ae62e8ac3d42d6792e0a
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-21 08:14:49 +00:00
Eike Ziller
2bc37de42b Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/python/pipsupport.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/qtsupport/examplesparser.cpp
	tests/auto/examples/tst_examples.cpp

Change-Id: I00273622423fa99d41621969f6ecbbdaa0e18664
2023-04-13 15:59:08 +02:00
David Schulz
f5c41a7f83 Python: Allow installing multiple pip packages in one task
Change-Id: If6cc1373cd38c07b29ac48fa51bf0ed35d6f104b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-06 04:44:55 +00:00
Jarek Kobus
da7009ac16 Python: Remove unneeded mutex
The mutex may potentially block concurrent calls to
Pip::infoImpl().

Make infoImpl() a static method in cpp.

Change-Id: I06e2de08674b5669e58684743d67a569da43d662
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-04 18:50:33 +00:00
Jarek Kobus
031f51794a Python: Don't leak running futures on shutdown
This patch fixes the following assert on shutdown:
"Shutting down while process /testenv/bin/python is running\"\n".

Change-Id: I4c32ead5e4952b69ffc6037739fd417a632eda1a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-04 13:20:06 +00:00
hjk
305ccfe259 Utils: Replace FilePath::onDevice() by new FilePath::withMappedPath()
Basically a.onDevice(b) == b.withNewMappedPath(a), matching the order
of b.withNewPath(a).

Whether the (curretly docker-specific) path mapping is useful /there/, and
whether some of the calls are needed at all is dubious. I added some
FIXME and changed a few cases directly.

Change-Id: I7514736ce922f632f1f737bc496f6783389a42b6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 06:56:55 +00:00
Eike Ziller
7fc0dcec0d Fix lots of tr.h files not being mentioned in CMakeLists.txt
Change-Id: I63d364ac50d9587339b10a5571870cb9a81c54ee
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-04-01 04:25:17 +00:00
hjk
746f0f93be ProjectExplorer: Inline BuildStepInfo
Was a more or less arbitrary subset of BuildStepFactory data.

Change-Id: Ie37735532da8a15a22d5f92e1b45d6ed5f7758fc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-28 10:19:28 +00:00
David Schulz
eb8c996f49 Python: add create venv option to the wizard
and optimize layouting

Fixes: PYSIDE-2152
Change-Id: If3ecb76c4bac885840f54fd382471ac22a06dee3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-27 08:13:14 +00:00
Christian Stenger
7014376aaa Python: Tweak handling of python project files
Improves the handling of the preferred python project
file (*.pyproject) and makes use of the json support.

Change-Id: I24d6e2c1d10899efacec0fc9b03660bb8f25dfe7
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-22 12:18:39 +00:00
David Schulz
7d4f123842 Python: add create venv action
The action can be triggered from the interpreter chooser of the editor
toolbar.

Change-Id: Ie23b68a3790525ea02883ef359b357a0d317b2f5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-21 05:39:48 +00:00
David Schulz
dea3ea2262 Python: remove unused function
Change-Id: Iceee91f761e080dcdd329375638f883261c0a319
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-17 12:17:32 +00:00
David Schulz
0b92ba92b2 Python: Remove dead code
Change-Id: I31aa1610b548b37f30f3daa353627f9c6418c3c8
Reviewed-by: hjk <hjk@qt.io>
2023-03-14 10:19:01 +00:00
David Schulz
1811c31490 Python: add interpreter selector to the python project wizard
Change-Id: I7ea1df34fa0096a84a0d611b401f991508c826c1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-14 05:44:46 +00:00
Jarek Kobus
3fae8fdc36 Python: Use QtConcurrent invocation for async run
Change-Id: I26254d5c78c3b6ea06ed9baec8e52b988a6e9608
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-10 07:20:18 +00:00
hjk
3e7d93c788 ProjectExplorer: Move some not-fully-session related bits
... out of SessionManager.

The idea is to later move SessionManager into the Core plugin,
which both is sensible conceptually and also prerequisite to
merge the Bookmark plugin into TextEditor plugin.

Currently, only the interface is split, as the load/save
implemetations are non-mechanical to disentangle.

Change-Id: I31631db3094ea192825a2ccaa6add6188662940b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-01 09:26:50 +00:00
Alessandro Portale
e27f82b49e Translations: Merge "OpenWith::Editors" into "QtC::Core"
Change-Id: I241ccc53afa11fa3faa1f1ca9363421827081812
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-02-20 08:00:37 +00:00
Alessandro Portale
9f2f2f3390 Translations: Change translation context prefix from "::" to "QtC::"
lupdate would be confused by translation contexts starting with ::

Change-Id: Ie95e73436fd3cafc80a8e89f908efadc747e644c
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 16:27:55 +00:00