Commit Graph

428 Commits

Author SHA1 Message Date
Eike Ziller
38e005692e Plugin meta data: Add full stop to descriptions
Where they were missing. The text is shown as a paragraph in the
extension manager.

Change-Id: I6e15c89fe4023b222e9c476f4312e13fcb0905c0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-06-28 06:46:52 +00:00
Eike Ziller
b94c51995d Python: Fix translatable string
Word arithmetic does not work across languages. Provide explicit strings
for the combinations.

Change-Id: I95399f5d528405971d630a464e67a89766351162
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-06-27 06:03:23 +00:00
Leena Miettinen
6cd7aed8eb Add long descriptions to some plugins
Edited the short descriptions to answer the question
"What can I do with this extension" to help users decide
whether they need it.

In long descriptions, tell users what else they need to
be able to use the plugin.

Change-Id: Iefce7505b61fc77cf38cc915f1f7dbd25c9cb570
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-31 06:42:53 +00:00
Alessandro Portale
7bc65cf9f3 PluginSpecs: Change URLs from http:// to https://
Avoid the redirect that is inevitable nowerdays.

Also, change necessitas.kde.org to www.qt.io, since the orgininal page
is offline.

Change-Id: Ib1823f0df97d2df87822fd2bb7552e2f2c7e971e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2024-05-28 20:13:29 +00:00
hjk
971938421c Use LayoutBuilder V2
This puts the implementation introduced in acf1ecb47f into use, after
significant simplifications in the class hierarchy. CRTP is not used
anymore, and the new tag based dispatch is also used for Layout::addItem,
effectively reducing the number of different code paths.

The Lua based settings access is disabled for now.

Change-Id: Idb6d1a25675378757c5267bdb630bcd4c1f52d34
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-27 12:38:48 +00:00
Jarek Kobus
982ad24243 CommandLine: Reuse new c'tor
Change-Id: Id154881b4f5d8c488e5c1f5e0f843d36bf838759
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-22 09:13:41 +00:00
Jarek Kobus
d857af4cec Python: Add missing include
Otherwise getting:
invalid application of ‘sizeof’ to incomplete type
‘ProjectExplorer::BuildSystem’

Amends 85cb3f7651

Change-Id: Ie423bfb05dd852735fb5fa64a19cc1c4f9780e0b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-22 07:56:58 +00:00
Eike Ziller
85cb3f7651 PythonRunConfiguration: Clean up includes
Change-Id: I2cfef759e4b3fc773184691a9b19fc132cf3be03
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-05-22 06:19:30 +00:00
Eike Ziller
eb45240649 Remove PluginManager::futureSynchronizer()
Use the global synchronizer from Utils::futureSynchronizer() directly

Change-Id: Ic8843bc1ff7951c041529a258f36117f08ec4b35
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-05-21 13:02:46 +00:00
Eike Ziller
c676ec825f AsyncTask: Centralize setting global future synchronizer
Move the global FutureSynchronizer to Utils and use it
by default for AsyncTask (if that is in the main thread).
This way setting a synchronizer is less prone to be forgotten.
Individual uses can still override this.

Change-Id: I1a12bf4d7f4cb5be99668bf0a4797108c2fe6448
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-05-21 09:56:32 +00:00
Jarek Kobus
53de9701f4 CommandLine: Use more 1-arg c'tor
Change-Id: If52c4094f94859d51e31862d913b1756e333e512
Reviewed-by: hjk <hjk@qt.io>
2024-05-16 12:45:42 +00:00
David Schulz
546f25c3de Python: offer to install python-lsp-server updates
Change-Id: I4068da0783b0a8e2becfcd04d480c6ad2e2f5b7c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-05-03 06:14:18 +00:00
Eike Ziller
d2afb4e8af Merge remote-tracking branch 'origin/13.0'
Change-Id: I4817ff528f92dcb2ffb00c92ca1039f1ae31c7f1
2024-05-02 14:47:43 +02:00
David Schulz
5920d9cb9e Python: remove rope_completion language server setting
Rope is not part of the default installation of the python-lsp-server
pypi package and enabling it by default results in an error at startup.

Fixes: QTCREATORBUG-30757
Change-Id: I975ac98d9f4c5b25f5be085461e5b626d3a93fbc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-05-02 06:25:38 +00:00
David Schulz
620f6fd39b Python: offer to install pyside also in qml files
This shwos the same editor toolbar as in the python editor that offers
to install pyside, if the qml file can be associated to a python project
and the configured python for that project does not contain a valid
pyside.

Change-Id: Id05a2621aec9d78c4a22e61830813cd261eda4fc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-04-22 11:36:12 +00:00
Eike Ziller
7f8adab0d0 Translations: Fix various \n, full stops, spaces
Add missing full stops, remove space at beginning and end, remove end
lines at end

Change-Id: I4ce28f578e13e100dcfbd8ef70630462faf407fc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-04-18 06:06:45 +00:00
David Schulz
411100b037 TextEditor: remove text editor action handler
Give each editor a context and register editor actions individually for
that context. This removes the need to tell the action handler the
current editor. Additionally all actions are now available in editor
widgets outside of the EditorManager.

Change-Id: I0109866b180889762f8bd8aa07874d8d7c55bfa6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-04-09 10:52:26 +00:00
Eike Ziller
c19f97bd23 Merge remote-tracking branch 'origin/13.0'
Conflicts:
	src/plugins/cmakeprojectmanager/cmaketool.cpp
	src/plugins/python/pythonutils.cpp
	src/plugins/qtsupport/baseqtversion.cpp

Change-Id: Ia3e35c763ff9475d17ad922718b54152209893b8
2024-03-14 11:35:07 +01:00
Jarek Kobus
84166b4eaf PyLSConfigureWidget: Don't leak the editor
Change-Id: Idc283b2cfabfcd1120520c5bbb4258b085c410a0
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-03-13 07:47:17 +00:00
Marcus Tillmanns
4e8bdd610b Utils: Remove PresistentStoreCache
It turns out caching the information is unreliable due to a variety of reasons.
We remove the cache for now as its less dangerous than trying to fix each
use case.

Change-Id: I8238166486a2fb29c101f700af1c8d7e4ad7a172
Reviewed-by: hjk <hjk@qt.io>
2024-03-12 14:24:05 +00:00
Eike Ziller
6c2df76737 Merge remote-tracking branch 'origin/13.0'
Conflicts:
	src/plugins/android/androidsettingswidget.cpp

Change-Id: Ifcb16aa16c7bc2792de25d0ee7a22cf0e39a05f8
2024-02-29 12:44:58 +01:00
Eike Ziller
5af531cd39 Utils: Fix build with MSVC with C++20
Rename process.h back to qtcprocess.h

MSVC's "threads" standard header includes <process.h>, and that ends up
including our process.h from Utils.

There already was a hacky workaround in place for a similar issue with
MINGW, but that doesn't work with MSVC because that doesn't have

Simply use a name that doesn't conflict.

Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3
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>
2024-02-28 08:09:05 +00:00
Leena Miettinen
fdb1fa2a3b Python: Fix capitalization of Python in UI text
Change-Id: I55beeb658eb583a74c4d79f3dc2f121010080101
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-02-27 16:00:48 +00:00
Eike Ziller
44f6bbf260 Python: Wrap some file paths and kit name with quotes
Change-Id: If147eae864013d410239d69184cdb9a4bc4479eb
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-02-26 09:05:34 +00:00
Jarek Kobus
f1f4422dce PythonSettings: Reuse Tasking::nullItem
Change-Id: I50675730fa7a7e228b151213610996456a8eacf4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-16 06:21:59 +00:00
Jarek Kobus
d95fa019d4 PythonSettings: Don't leak running watchers
Detected by memory analyzer.
When shutdown comes while pythonsFromRegistry() or
pythonsFromPath() is still running, the corresponding
QFutureWatcher is leaked.

Employ TaskTreeRunner instead. It handles the cancellation
of the running tasks automatically on its destruction.

Make pythonsFromRegistry() and pythonsFromPath() cancelable,
by providing QPromise as a parameter and check for canceled
state on every iteration.

Change-Id: Iae7c7d1ed764646b8203bd7ca8b9580cb999b80c
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-16 06:21:44 +00:00
Jarek Kobus
8bcc78a044 Various plugins: Fix some more C++20 warnings about [=] captures
Change-Id: If20aac4320c84096a07d67cc137886638286acf8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-06 08:34:44 +00:00
hjk
ca2a4f771f Python: Remove pluginInstance() and convert users
Change-Id: I43179961cdee855b710fc082568a7d0d9a0f0719
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-05 08:54:23 +00:00
hjk
df71c6a1f0 Python: Use setup function for remaining plugin items
... and remove the now-empty plugin pimpl.

Change-Id: I0db27757e832a0e3ac52b938a4d6ad820adfc195
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-02-05 07:06:30 +00:00
hjk
2288637668 Python: Use setup functions for run related items
Change-Id: Iefbeda433b0f7eaaf3c429dbc853e0c8578ceb3a
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-01 14:18:34 +00:00
hjk
2a29acdbaf Python: Use setup function for build related factories
Change-Id: I3b1faad8a5f3ead1332941d31509c3efd3806f78
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-01 13:49:58 +00:00
hjk
62aa35ee39 ProjectExplorer: Remove OutputFormatterFactory hierarchy
It never gained traction, was only used in thee places, and
the class(-hierarchy) is not really needed and only complicates
the code when the formatter creation is handled in free functions.

Also adapt the users.

Change-Id: Ieef7199f5a36f244b2f38cffef71a5fe0606065c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-02-01 13:23:35 +00:00
David Schulz
8499240544 Python: Remove now unused interpreter aspect
Change-Id: I107ca665cf2fa2b707dba46917ce45f240d15654
Reviewed-by: hjk <hjk@qt.io>
2024-02-01 13:18:29 +00:00
Marcus Tillmanns
92996b74ae Python: Don't needlessly store default value
Task-number: QTCREATORBUG-24762
Change-Id: I3ca495b2696747d5323cc7eea4aac4d99e3adfd1
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-01 07:15:07 +00:00
Eike Ziller
acedf93ba3 Remove CommandButton
The same can be achieve with a factory method in `Command`, similar to
the existing ones for actions and buttons which synchronize their tool
tips with the shortcut.

Change-Id: I7e17654706b902dfa14f37b958fc2a60705d5cb5
Reviewed-by: hjk <hjk@qt.io>
2024-01-26 12:25:26 +00:00
David Schulz
d9404208da ProjectExplorer: declare only relevant aspects as features
This will disable python kits for all Wizards that require a valid Qt.

Change-Id: I4a8d6dd60629ddb556e49c067200acba8ef080d2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-26 11:27:32 +00:00
Marcus Tillmanns
a25bbf23c6 Utils: Fix error prone default value of appendOrSet
It was not readily clear that Environment::appendOrSet/prependOrSet
needed a value for "sep", otherwise it would just concat the values without separator. This got apparent when looking at usages of
appendOrSet.

Instead there are now three options, "Auto", "Colon" or "Semicolon"
with the default being "Auto", which determines the separator based on
the Environment::OsType.

Usages of appendOrSet and prependOrSet are also fixed with this commit.

Change-Id: I868e14ce38f50be9cd07292fe3f22663a62d116d
Reviewed-by: hjk <hjk@qt.io>
2024-01-26 10:10:03 +00:00
Jarek Kobus
10ff747a0f Use more std::chrono and std::chrono_literals namespaces
Change-Id: Ib8c83988d7afe35d81b87ff8c5c87eef2082f12d
Reviewed-by: hjk <hjk@qt.io>
2024-01-23 09:32:43 +00:00
Jarek Kobus
afc67468e6 Process: Get rid of setTimeoutS()
Add an extra arg to runBlocking() function instead.
Use std::chrono::seconds for timeout.

Change-Id: I7c3c21e8f26a2ccbed157d15083d6ef0b4cd2f7e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 20:27:51 +00:00
Jarek Kobus
b02e708b6d PythonUtils: Remove code repetition
Introduce isUsableHelper() and use it from venvIsUsable()
and pipIsUsable().

Change-Id: I29c869f544e28d0962bc0e357399db66f48ba3d1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-22 07:40:28 +00:00
David Schulz
45ef64f4f9 Python: fix venv check
FilePath::contains only checks whether the passed string is inside the
path, and not whether the path contains a folder or file with the passed
string.

Change-Id: I20a1a9a52a9f9a436433848ac2eccd38666274d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-17 13:33:47 +00:00
Dominik Holland
c81efc39c8 Create RunConfiguration specific DebugWorkerFactories
Instead of relying on the DebuggerRunWorkerFactory to match for all
RunConfiguration, every plugin needs to create a WorkerFactory for
its own RunConfiguration.

Similar to the SimpleTargetRunnerFactory there is now a
SimpleDebugRunnerFactory which makes the setup easy.

Change-Id: I25aaabcd70f7ac649baeab4eb4c7e88d53dac91e
Reviewed-by: hjk <hjk@qt.io>
2024-01-17 10:17:41 +00:00
hjk
9c8e5d4cdb Python: Simplify PyLSConfigureAssistant setup
Change-Id: Icdd8d0017a8fe71f579af6f19fa2b870f0677efc
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-16 10:43:28 +00:00
hjk
5de41fb40d Python: Use new plugin items setup pattern for PythonEditor
Change-Id: Ie8516960a106ddeff415b6412d9af66f7d2f0f36
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-16 10:43:06 +00:00
hjk
1992efddfc Python: Move plugin class definition to .cpp
The plugin classes partially changed there purpose, they are no more
meant to provide internal utility functionality.

Change-Id: I9b9200995eaa95dcd924c94dcedb28e6d5db0be9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-16 10:42:45 +00:00
David Schulz
fb2fd513be Python: disable generateKit button after clicking
The button should only be enabled if no kit can be associated with the
currently selected python interpreter.

Change-Id: I0357bf999c8abd2bc11b4ac5b2e79a10a0d94f01
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-16 08:52:04 +00:00
David Schulz
d67379481c Python: optimize venv and pip checks
Checking for the venv and pip module can take some time. Since this is
done now whenever the kits are validated this has performance
implications for multiple actions. For example showing the target
selector wizard page or opening/switching sessions.

Use a cache to reduce the number of python processes started to check
the existence of the modules, and if the module can be found store that
info in a persistent store to avoid checking it again after a restart.

Change-Id: Ib899da0e6b2da28fbee2b5baff7f923e4595260a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-16 08:51:47 +00:00
hjk
052ea6d231 Python: Move highlighter and indenter class definitions to .cpp
Change-Id: Ib71d520977034ca66bd84c9188ffed5fe74e1ba0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-12 06:53:40 +00:00
David Schulz
76b61a7993 Python: register python infos to the kits macro expander
... and use the name in the autogenerated kits display name

Change-Id: I928533e6f8238189d64350463897a86ff5512ae7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-10 05:32:23 +00:00
David Schulz
4f857711c2 Python: install lsp into tempdir for remote interpreters
Change-Id: I4b0b1a47c73742cc14f68d80b9116fcd51224bd1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-08 10:42:48 +00:00