Commit Graph

298 Commits

Author SHA1 Message Date
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
Christian Stenger
f5bd330277 Qbs: Update some qbs files
List respective tr files and while at it shuffle some
of the listed files to match common sort order.

Change-Id: I73845ad1dae5e8c86d3741067f40b7b2b37e2a6e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-02-08 14:37:03 +00:00
Jarek Kobus
b177f925d1 Remove unneeded includes of QFutureWatcher/Interface
Change-Id: I1069b1dbd9fe1754afef0009d4f18cedeeecec1e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-01 13:02:50 +00:00
David Schulz
471e67d1a6 Python: collect pip package info in another thread
Change-Id: I70a9066fddf812ce9bde5467913bb2bad98e2d0e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-27 06:27:35 +00:00
David Schulz
e592e0e83f Python: remove outdated pyls install toolbar earlier
Change-Id: I9ba67bffcff159523eb44b4f486c11fc37085fa8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-20 12:51:07 +00:00
hjk
118b84ffd6 Use simpler Plugin::initialize() when feasible
Change-Id: I567965d266f20526bda9f823e31a04b354d53fb1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-20 12:13:10 +00:00
David Schulz
f0f0cf129a Python: add interpreter selector to editor toolbar
Fixes: PYSIDE-2154
Change-Id: If5e90f5bf2923b61af37ebbfcd35c512b3b07db4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-20 10:16:36 +00:00
David Schulz
f7f9d5d405 Python: Fix crash on switching interpreters in run configuration
This happens if the project contains ui files, pyside with pyside uic
and the python language server is installed. It is caused by pointers to
already deleted extra compilers in the pyls language client.

Change-Id: I877f20292c9c850c151fa94149b5a46d4836c3de
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-16 13:13:01 +00:00
hjk
c5f7f5ab0a ProjectExplorer: Tr::tr
Change-Id: I8f1b463c5cc7a53627f7a9ad261998b92f13e56a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-16 12:10:24 +00:00
hjk
e7c536011f Prefix Tr::tr contexts with ::
To make outliers better visible in Linguist

Change-Id: Ic35ea2a858b7e3576d9a416fb494fddb616eaaa1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-13 12:00:17 +00:00
Jarek Kobus
c99ce1f455 ExtraCompiler: Expose TaskItem for compile task
This is an intermediate state before employing one common TaskTree
inside CppProjectUpdater. Use multiple one-task TaskTrees for now.

Refactor ExtraCompiler so that there is only one pure virtual method
to be implemented (taskItem()) instead of two (2 run() overloads).
Use TaskTree inside ExtraCompiler for running the compilation process.

Change-Id: I6884934508e043594589d117f6d3f0aed94b84c2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-11 15:22:56 +00:00
hjk
4ddd28ae22 Utils: Rename QtcProcess::readAllStandard* to readAllRawStandard*
... and re-use the old QtcProcess::readAllStandard* names for
a QString-returning 'decoded' version.

For now, only use that in 'full Utf8' cases, to stay bug-compatible,
the plan is, however, to employ the QTextCodecs we have already
in the channel buffers. That will be one-by-one, though.

Change-Id: Id209e0671920d4ea4197918e872f441254112d52
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-10 12:08:53 +00:00
hjk
f08b5727dc ProjectExplorer: Introduce and use convenience factory class
... to create SimpleTargetRunner runners for a single run config.

Change-Id: I8af3d7cdcaf54f0584af948aa6e0fa015d1a3077
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-10 12:02:51 +00:00
hjk
66c08a824d Utils: Rename most FilePath::{from,to}Variant uses to {from,to}Settings
Specifies the main purpose more clearly. The remaining ones a "true"
(internal) variants in models and as action data.

Change-Id: I8dd3c846e419f29d88283c2f48268ef6685b19fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-10 09:00:30 +00:00