Commit Graph

336 Commits

Author SHA1 Message Date
David Schulz
01cac8299b ProjectExplorer: fix Interpreter::changed emits
Only emit changed if the current interpreter changes.
This is more in line with the other aspects.

This fixes the pyside detection since the changed signal was not
emitted in all relevant code paths.

Change-Id: I53409b17f260b35914e39de894b48d7bd1ce27c0
Reviewed-by: hjk <hjk@qt.io>
2023-08-15 10:44:53 +00:00
hjk
017d7c0e47 ProjectExplorer: Rename kitinformation.{h,cpp} to kitaspects.{h,cpp}
Change-Id: I069bddeb457366210d339edcbb8ffb359a40fab8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 07:31:03 +00:00
hjk
bcb083bd99 Python: Use a connect that will remain valid
... after a StringAspect/FileAspect split, instead of relying on
the  current inheritance.

Change-Id: I7dd91f402636d35a15e9d1618b73c0981777b06e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-26 10:00:51 +00:00
Eike Ziller
a419670ff5 Build: Change plugin json.in files to CMake style
They were still using variables in qmake style.
Directly use CMake variables in the json.in files and remove the no
longer needed escaping of quotes.

Adds a fatal message if it detects the old style in a .json.in file for
easier porting.

Change-Id: I8de88d8db2da55781f0e9d72eda03f943723188e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-07-25 13:21:16 +00:00
hjk
b14b7b1a5f Replace a few more Aspect::value() calls with operator() uses
Change-Id: I9343e74bfb51af41df02a411976b82b9260be2fb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-20 09:31:09 +00:00
Jarek Kobus
47ac604aea AbstractProcessStep: Use task tree for all subclasses
Introduce AbstractProcessStep::runRecipe() virtual method
with the default implementation.

Task-number: QTCREATORBUG-29168
Change-Id: Iac75f4c38f8ee91ad8ac9324bb27881a3722911f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-07-14 06:48:58 +00:00
Jarek Kobus
4d2b4d0ab1 PySideBuildStep: Employ task tree for running
Task-number: QTCREATORBUG-29168
Change-Id: Ia665e8eb79f41e5cbb0bdd1394d7dbf9b85fea14
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-07-14 06:44:11 +00:00
hjk
4cf878aecf Python: Base MainScriptAspect on FilePathAspect
Instead of StringAspect.

Change-Id: Idc5cbe4a28ece5b053eee9f260be9a5f22912f81
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-13 10:21:57 +00:00
Eike Ziller
77c7e26779 Tasks: Show tool tips with information about the categories
When hovering an entry in the filter menu in the Issues view.
Also remove some categories that shouldn't be there.

Change-Id: Ifb367d69b9396c2fdc45b83ec5ffd88ac2f0eda7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-07-13 06:09:27 +00:00
Eike Ziller
cd1b6a669b Tasks: Create a container class for category data
Reduce the number of arguments that need to be passed around.

Change-Id: I9fbfdcdf7b20f8f26e35f435bf8d65ba483e4114
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-07-12 06:34:25 +00:00
hjk
62795df12a Python: Use aspects more directly in PythonRunConfiguration
Change-Id: Id85348473236bc01ddcc65ec5302c0537c98c526
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-11 07:13:10 +00:00
David Schulz
0822f28998 Python: improve python interpreter wizard page
Change-Id: I38215f1aaefbccc4e8c22957bf85c01e68df3c1a
Reviewed-by: hjk <hjk@qt.io>
2023-07-07 12:57:17 +00:00
hjk
b3df9a4fcf Python: Centralize interpreter specific function in the aspect
... and expose that instead of the PythonRunConfiguration.

This makes the PythonRunConfiguration more the container of aspects,
similar to where the other runconfigs move.

Change-Id: Ibc76b706f2d4d334640ea8f3b91343f9e7c0f566
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-07-07 05:20:48 +00:00
David Schulz
e7e3da0893 Python: Fix updating the python venv chooser state label
Change-Id: I45aa1495388dc58b541814430d1b4dfbd80ec677
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-07-06 13:00:42 +00:00
hjk
135a7682f5 ProjectExplorer: Make more aspects directly usable in AspectContainers
Change-Id: I6634c27c8d516411ad84e6cb7c361262ead53124
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-06 05:23:04 +00:00
hjk
739f835ef1 ProjectExplorer: Remove unusual {Arguments,WorkingDir}Aspect
Follows suite to 2cc4967 to have the user side code more uniform.
Most of the extra verbosity (setMacroExpander) can go away again
when distributing the expander via the "owning" AspectContainer.

Change-Id: I9e80cb235f0a4a9ebee601dd638aefbaa41efc1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-07-05 12:55:31 +00:00
Tim Jenssen
d9910058a3 Merge remote-tracking branch 'origin/qds/dev'
Change-Id: I91d9877ef6637d21e1106d6d363275295e6b55a3
2023-07-04 20:36:03 +02:00
hjk
d0d1e1af1f A few more direct FilePathAspect value accesses
Task-number: QTCREATORBUG-29167
Change-Id: I8eba582303c16dddbdb5cea5bce43f048bac06b7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-04 13:08:00 +00:00
hjk
914bc626e7 Python: Use a separate PythonInterpreterAspect
... and move interpreter related code there.

Change-Id: I108a4bdfa7c3f2078da164ce13e897a18ebdadde
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-07-04 12:28:40 +00:00
David Schulz
5c7cbe802a Python: reduce the timeout of version check commands
Task-number: QTCREATORBUG-29363
Change-Id: Id7583c876dc2a8c92eae4dd68bda47dffafd6e3d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-04 11:59:12 +00:00
hjk
8e257dca2c Utils: Replace StringAspect::setFilePath()
... by FilePathAspect::setValue().

Closer to the intented uniform API.

Task-number: QTCREATORBUG-29167
Change-Id: Ife26046eaeef2e49108e42a31a2d32e453883e3c
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-07-04 11:41:31 +00:00
Eike Ziller
26e96bfad8 Merge remote-tracking branch 'origin/11.0'
Conflicts:
	src/plugins/debugger/debuggeritemmanager.cpp

Change-Id: I9d99d13feff9315f52eacbd84857c63cb69bf804
2023-07-03 10:24:09 +02:00
hjk
379e7f906e Utils: Rework aspect implementation
This avoids some repetition and could be a step towards
having type storage in (or rather accessible from) the base,
so we can have aspects for more complex data (treemodels...)
that are not easily converted to QVariant.

Change-Id: I9797b3d5646195705212db1830d2b415291ac651
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-06-29 11:25:44 +00:00
hjk
184403ddf2 Python: Implement PythonSettings::keywords()
Avoids instantiation of the widget when searchings using the search box
only to find nothing.

Change-Id: Id335de7f6cc2168d38905afe42b07e509c70f791
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-29 08:37:39 +00:00
hjk
41fcca5cdd Python: Hide some internals from PythonRunConfiguration API
Change-Id: Ibed21265bf7099b06ea61751fb487b78e8071f34
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-06-27 09:09:32 +00:00
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