Commit Graph

265 Commits

Author SHA1 Message Date
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
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
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
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
David Schulz
2d0456f085 LSP: Support remote LSP file paths
Change-Id: If3cf1b8d675ef091427dbcd703c7d14b384a1b3a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-15 09:49:48 +00:00
Jarek Kobus
834f89acf2 Remove unused variables
Change-Id: I653f6fa71bb04e049d4e1848a7e38a606692e678
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-12-09 13:01:53 +00:00
Jarek Kobus
c021fb5179 Don't call non-const methods on temporary QList
Otherwise it may unnecessarily detach. Either store a local
const reference or call const equivalent (e.g. constFirst()).

Change-Id: I96d665487cf28c17e72bea17f1b8f164ce06cc70
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-08 10:21:57 +00:00
hjk
ba80985769 Python: Replace one use of QDirCurrentPath()
Change-Id: I88a04930b8c62a68ee1adb73e1cdd3c433eea4e3
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-21 13:09:43 +00:00
Eike Ziller
ea79027e20 Merge remote-tracking branch 'origin/9.0'
Change-Id: Idd9c2b1bf787040b7b415b7cda29035227ca1011
2022-11-21 08:57:14 +01:00
Jarek Kobus
02f384115e Remove unused includes of QBoxLayout
Change-Id: I74204eaf70dbcb31a8bd13609bef35459c8c6b5f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-11-18 15:29:29 +00:00
Jarek Kobus
bf0d716b51 Remove unused includes of QGridLayout
Change-Id: Ia0823fe1dbadb7c68efc431c3bf0f1ba621a9484
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-11-18 15:29:15 +00:00
hjk
5688c84fcf Python: Initialize settings in the pimpl
Change-Id: I172136851c3002bf785d9b8f378c0cccc408e0e2
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-18 14:51:17 +00:00
hjk
dc620e987d Python: Avoid flashing a separate widget when opening settings
Change-Id: Id0518c222ffa91bc8791cfa71edb9b715ce65cde
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-18 08:39:12 +00:00
Jarek Kobus
1a70403f94 Remove unused includes of QFormLayout
Change-Id: Ia877cb57037342f2a7b332b29d9cb45e9b01c4bc
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>
2022-11-18 07:33:29 +00:00
Eike Ziller
10dca6b37f Merge remote-tracking branch 'origin/9.0'
Change-Id: Ie069f3b2a1200b3e665341b1d56ce836024b0d29
2022-11-10 13:22:43 +01:00
Marcus Tillmanns
129448d61d QmlJS: Fix Follow under cursor
When trying to jump to a symbol in a qml file the Qml Model may find
the location in a generated .qml file in the build folder.
QtCreator searches in all generated .qrc files to try and find
the source file so it can jump to it instead.

Previously not all auto-generated ".rcc" folders would be found
as only the folders of targets (executables) were searched.
Plugins or Static Libraries were not searched.

With this fix, all projects nodes are searched for the ".rcc" folder
and therefore also finds them for Dynamic / Static libraries and
plugins.

Fixes: QTCREATORBUG-27173
Change-Id: Ic51ac8fbc82c15785cbefd76787942a512ecf3db
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-11-08 09:54:10 +00:00
Tim Jenssen
aa33927651 Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
	src/plugins/qmldesigner/components/stateseditornew/propertychangesmodel.cpp
	src/plugins/qmldesigner/components/stateseditornew/propertymodel.cpp
	src/plugins/qmldesigner/qmldesignerprojectmanager.cpp
	src/plugins/qmldesigner/qmldesignerprojectmanager.h

Change-Id: Ib029a830ee99190bc4ea2ad75d9300bfa86b42d9
2022-10-25 19:02:15 +02:00
Jarek Kobus
866a658b42 Get rid of unneeded includes of RunControl
Removed also some other includes that were marked
with yellow triangles. In some cases includes of
runcontrol.h were substituted with other includes,
like qtcassert.h.

Change-Id: Ica40f68198c7f8f70e6047acb2eddc8ef017e43d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-25 09:49:13 +00:00
David Schulz
af7b0802a8 Python: fix PySide project tool detection
The tool moved to the PySide6-Essentials module.

Change-Id: I204d2025bc51b6c5cffe82cba66878d077f03b72
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 09:17:46 +00:00
David Schulz
89e16e8b8c Python: map building directory to pyside project device
Change-Id: If261483864a5e4a13554fdefbf3d9076b7d1f687
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-20 12:47:05 +00:00
David Schulz
f012f1b245 Python: try to find interpreter on device for run configuration
If the default interpreter is not on the run device of the kit try to
find any interpreter on that device and use it as the default
interpreter for this run configuration.

Change-Id: I52985281f0f1d2ac88759169400d64121299f95d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-20 12:46:44 +00:00
David Schulz
c81a5c0644 Python: trigger parse in build system creator
Otherwise we do not have any app targets for the python run
configuration after a kit setup.

Change-Id: Ib7648a72280a1d68246c11139775a23366fda286
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-20 12:46:37 +00:00
David Schulz
89e90f31f1 Python: Do not remove unreachable interpreter on startup
A device might be not reachable at Qt Creator startup so do not filter
out remote python interpreters after loading the settings.

Change-Id: I3ac4f2baaca882e699f2210f6f5a92523891b0ca
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-18 06:49:17 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
David Schulz
c7d3f48508 Python: remove settings object from objects pool
Change-Id: I4f21688f887c1ad99facb3ffe3a85b5918dd7daf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-09-06 12:33:48 +00:00
David Schulz
a634833720 Docker: detect python in docker images
Change-Id: I841cdb7ce1cb8f34565a5e6993c5c825937e3eab
Reviewed-by: hjk <hjk@qt.io>
2022-09-06 08:47:01 +00:00
David Schulz
407082bcb2 Python: restructure settings
Change-Id: I32b3bed5581e06e981863b561b9b2f2bb125b82e
Reviewed-by: hjk <hjk@qt.io>
2022-09-06 08:46:56 +00:00
hjk
1567d24980 Utils: Replace PathChooser::{fileP,p}athChanged signals
... by a new PathChooser::textChanged signal.

They were both emitted in reaction to the underlying line edit's
textChanged() signal.

Use 'textChanged()' as name to mimic/match the Qt side. This also
makes it more clear on the user code side, when this happens.

Some textChanged() consumers should probably use editingFinished()
instead, but that's left for later changes.

Change-Id: Ib07347f616cbf1c5d09bc2f8671ca860d185d1f9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-06 05:01:51 +00:00
David Schulz
497b20ade7 Python: use consistent pyls naming in settings
Change-Id: I8a36e4089812802c3629ac52ce52499dde53eba8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-05 10:57:54 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Eike Ziller
64247bf571 Merge remote-tracking branch 'origin/8.0'
Reverts/comments out parts of 45f93a817a,
which needs to be resolved in a follow-up commit.

 Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp
	src/plugins/clangcodemodel/clangmodelmanagersupport.cpp
	src/plugins/cmakeprojectmanager/cmakesettingspage.cpp
	src/plugins/python/pythoneditor.cpp
	src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
	src/plugins/scxmleditor/common/colorsettings.cpp

Change-Id: I7f0f7b7120e75a9fc3a8886bc57c17345cbb501b
2022-08-19 12:48:27 +02:00
David Schulz
9fe3aa6612 Python: Fix detecting python ls for reopened files
Change-Id: Icc601fa43c7b1432d0bf12fae2f65e0c914262ac
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-08 11:30:03 +00:00
hjk
7950a038b4 Merge remote-tracking branch 'origin/8.0'
Change-Id: I1dc664137eeecb7dd69f29af7a08164683d51077
2022-08-03 17:51:42 +02:00
David Schulz
0a2510edcb Python: skip root on venv detection
Virtual environments on the root level are uncommon and can cause issues
on some linux distros.

Fixes: QTCREATORBUG-27976
Change-Id: I266f1b321c1c2d2b4b416acf3f34ce8c1d686219
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-03 10:55:30 +00:00
hjk
072489829d Utils: Make port.h slimmer
Fix the fallout. Also make comparisons hidden friends.

Change-Id: Ib16a294391f5732f94f9f411a48220b497691de2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-27 12:07:59 +00:00
hjk
b97c495d2b Utils: Make the second parameter to LayoutBuilder::attach() an enum
More explicit and more potential options (e.g. "treat grid as form")
than a bool.

Change-Id: I89413efe30410160c38b0e524ba64288dde2332e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-26 11:52:16 +00:00