Commit Graph

72811 Commits

Author SHA1 Message Date
hjk
354f50f258 CppEditor: Use a hidden friend to compare BaseEditorDocumentParser::Configuration
Posh, and avoids an upcoming warning with C++20:

/data/dev/creator/src/plugins/clangcodemodel/clangdclient.cpp:907:40: warning: C++20 says that these are ambiguous, even though the second is reversed:
In file included from /data/dev/creator/src/plugins/clangcodemodel/clangdclient.h:6,
                 from /data/dev/creator/src/plugins/clangcodemodel/clangdclient.cpp:4:
/data/dev/creator/src/plugins/cppeditor/baseeditordocumentparser.h:37:14: note: candidate 1: 'bool CppEditor::BaseEditorDocumentParser::Configuration::operator==(const CppEditor::BaseEditorDocumentParser::Configuration&)'
/data/dev/creator/src/plugins/cppeditor/baseeditordocumentparser.h:37:14: note: candidate 2: 'bool CppEditor::BaseEditorDocumentParser::Configuration::operator==(const CppEditor::BaseEditorDocumentParser::Configuration&)' (reversed)
/data/dev/creator/src/plugins/cppeditor/baseeditordocumentparser.h:37:14: note: try making the operator a 'const' member function

Change-Id: I98ed9d907b673b9353f540bab2ff7239e018b4f2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-02-12 09:51:06 +00:00
Christian Kandeler
4d9fe5572d Fix qbs build
Include MsvcToolchain unconditionally, as in the CMake build.

Change-Id: I01c9642ee74bb8f4476ba318512f4f441a823b93
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-02-12 09:31:21 +00:00
Artem Sokolovskii
6db8067821 ClangFormat: Fix warning readability message on dark theme
Fixes: QTCREATORBUG-30339
Change-Id: I57291907656b379468a066a09e767b886f17d7a0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-12 08:46:26 +00:00
Christian Stenger
46fd19591f Squish: Fix missing impl for deleting shared scripts
The action has been present for some time, but so far it had been
unimplemented

Change-Id: I798a144116ffeba60fb368430b30705ffc9b3f1c
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-12 08:42:25 +00:00
Eike Ziller
7a055a2f0a OutputWindow: Add "Save Contents" to context menu
And give individual output windows the option to set a default file name.

Change-Id: If3090063055c1b37f4f2d63b971fe0476f11806e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp>
2024-02-12 07:44:19 +00:00
Andre Hartmann
c22471d316 Git: Disable upstream status for Detached HEAD
It was always zero as Detached HEAD is a special
branch that is not actively queried. It can be
enabled later, but the quick fix is to disable it.

Change-Id: Ib191e1b5551a13bc4911184e12e06a0b4dc28ddf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-11 19:26:18 +00:00
Andre Hartmann
d9eeddfad1 Git: Fix upstream status for untracked branches
Using HEAD is wrong as soon as the branch is not
checked out. Instead the branch name must be used.

Amends 960ac1adf4

Change-Id: Id10b4012455ccb9b393404413a369f241edc098e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-11 11:27:58 +00:00
hjk
0b44cc5589 Vcs: Hide topic cache in new IVersionControl pimpl
Potentially more stable api long-term. Also simplifies the
user side code a bit.

Change-Id: I6913e27e2a5dc14907e72f252081cdbed34842a3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-09 16:00:56 +00:00
Marcus Tillmanns
5a643b1c0a QtSupport: Mark remote Qt Versions
Adds a postfix " (on ...)" to the default name of qt versions
if they are located on a remote device.

Makes it easier to distinguish Qt Versions

Change-Id: I02208f49d5a1b6b22294b8cc29348455808f342f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-09 14:07:18 +00:00
Ali Kianian
c584cf67ea QmlDesigner: Remove potentially excessive values from dataStore records
Change-Id: Ib2606fc50662b7724ae2ba11d21264334638bec9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-02-09 12:35:16 +00:00
Cristian Adam
0d40cc5093 CMakePM: Fix conan generators path using backslashes
This can cause issues with CMake, since CMake uses slashes as directory
separator.

Fixes: QTCREATORBUG-30326
Change-Id: I0c03b3bcd32bddc99fb361eb8e6aaffd0b1f10b6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-02-09 10:41:59 +00:00
hjk
4e5692d628 Vcs: Use QString and Id in editor parameters instead of char *
... and use it to simplify the translation setup.

Change-Id: Ibd386ede3ecfc351316bed53bc184954adbcaa74
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-09 10:27:01 +00:00
Marcus Tillmanns
a020c13e10 Filepath: Fix operator<()
Previously a QMap with FilePath as key would return wrong
entries when comparing paths with and without scheme/host.

Change-Id: Icc5d119a18c1b7a2fdab9c89f162c48859926523
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-02-09 10:21:11 +00:00
Christian Stenger
f18dcf2202 TextEditor: Fix capitalization
Change-Id: I220426e01c97eceab607e3b5c31bd8e294f48273
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-09 08:01:21 +00:00
David Schulz
971bcb1a5a TextEditor: fix multi text cursor unindent via backspace
Change-Id: Iec2e9251b977ccbd7433009ac3e706a9327c704c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-02-09 07:53:48 +00:00
Marcus Tillmanns
e073c54d01 Terminal: Fix opening terminals on remote devices
When the active project is on a remote device the working directory
is set to its root directory. In this case we need to find the right shell
binary from the remote device.

Change-Id: I6b541273d23a8de5442ac041b28d81984ed5ef65
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-09 07:40:59 +00:00
David Schulz
5328674479 TextEditor: simplify SyntaxHighlighterRunner interface
Change-Id: I6c8d51d8dccc91514c89267eac2cea66c87a871a
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-02-09 03:37:22 +00:00
Cristian Adam
7454f84901 CMakePM: When using presets only use presets for candidates
Since the CMake presets is built upon Imports, when loading the presets
it's better to only use the candidates from preset Kits and not any
matching Kit that could handle the build directory.

This makes working with CMake Presets a bit easier.

Task-number: QTCREATORBUG-29535
Change-Id: I895e2e9162763e4cf3af5cdef5c9d5b228211fab
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-02-08 17:36:22 +00:00
Andre Hartmann
98acd22734 DiffEditor: Init some more members to nullptr
Change-Id: Ia08c0ce5d6641533fe08f0a500f7439ec79882d8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-08 17:35:34 +00:00
Miikka Heikkinen
99f5b8a0af EffectComposer: Clear deleted effect if it is currently open
Fixes: QDS-11787
Change-Id: Iecd177a153e88a49476dbea0241c31726d05a6a8
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-02-08 15:12:54 +00:00
Miikka Heikkinen
c673e6aa20 QmlDesigner: Update extended View3D icons
Change-Id: If1aac862a3e62e518d321e61ddf3e7c25e30efb7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-02-08 14:57:48 +00:00
Miikka Heikkinen
b1362ddda6 QmlDesigner: Do not register Effects for item library
Fixes: QDS-11925
Change-Id: I981853d1c02d99cfb391209a9a7e568bf52401cf
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2024-02-08 14:26:41 +00:00
David Schulz
0422374e04 TextEditor: remove unused function of syntax highlighter
Change-Id: I9debd22730fcf2c9423beaaa5666ce282ed0bbe0
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-02-08 14:24:38 +00:00
David Schulz
e3bbace665 TextEditor: fix double delete in synchronous syntax highlighter
Change-Id: Ic4b9b78e5464613b9982814d771925d41f88bb25
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-02-08 14:24:31 +00:00
Artem Sokolovskii
cf7f9dffd5 Android: Fix Segfault when cancelling Android SDK installation
Fixes: QTCREATORBUG-30246
Change-Id: I929779e4cd8c37c9d69bd7aaffe9ae5b9acb7435
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-02-08 13:46:04 +00:00
David Schulz
1cddc3d0b6 TextEditor: fix applying empty list of format changes
The block might have had some highlighting before the update, so compare
the new ranges against the one from the layout and update the layout if
the format ranges differ.

Change-Id: Ia6a0025e74fa8941b1cccc00baa93d3d37cb9ff9
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-02-08 13:32:06 +00:00
Marcus Tillmanns
7b65432688 Wizard: Allow wizards to choose remote path
Change-Id: Ia7b0184452e2c4e86d727fbc3880b2e27285ef5d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-02-08 13:24:47 +00:00
Marcus Tillmanns
70e013fd25 Git: Cleanup gitExecutable()
Using expected removes a bunch of handling code.

Change-Id: Id524912d82aa693fbb39c7e7fa34abd77153f92e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-08 13:24:38 +00:00
Orgad Shaneh
31ca46ef2f VCS: Remove trailing dot in "running" message
The command should be copyable.

Change-Id: Id44e8af81f32de3d9899293de504070011f896c2
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2024-02-08 12:36:39 +00:00
Jarek Kobus
ba9ecc9b85 CppEditorOutline: Remove unused method
Remove also unused include and forward declaration.

Change-Id: I67d9ea45bc1073653b17faa3433f132a5e43f924
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-02-08 10:07:20 +00:00
Jarek Kobus
6deddd15c0 ModelManagerSupport: Remove unused Ptr
Change-Id: Ibdc81d1c6fecb808cbd7ca91f56a4869b6e26dc1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-02-08 10:07:11 +00:00
Christian Kandeler
228f77afd1 QbsProjectManager: Support completion via qbs' LSP server
Task-number: QBS-395
Change-Id: I2571dc46c9fb2867daeb3a5d00709337b12a750b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-08 09:52:58 +00:00
Dominik Holland
ecc3879cf4 AppMan: Only allow Debugging/Profiling with a Linux kit
Change-Id: I196fe6cc85065c3d9965f5fbb342f377bd221d95
Reviewed-by: hjk <hjk@qt.io>
2024-02-07 15:52:22 +00:00
hjk
3b2a4fd3f2 Vcs: Remove VcsBaseEditorPrivate::m_describeFunc
Use the new copy inside m_parameters instead.

Change-Id: I85cddfd598fe8fc95af99c7c89dfdb5af49b137e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-07 15:29:30 +00:00
Cristian Adam
b9f546cf1b ProjectExplorer: Add kitFilterText virtual method to ProjectImporter
This way a project importer implementation can modify the filterText edit
field from the Project setup page.

Task-number: QTCREATORBUG-29535
Change-Id: I22b3d613ff84111b918c4a4447cd5656d7c593b9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-02-07 15:19:54 +00:00
Artem Sokolovskii
44c9074c0b ClangFormat: Move clangformat output to infolabel
Move clangformat output to infolabel in clangformatconfigwidget
to reduce noiziness in cli and to enhance the convenience of editing
the .clang-format file.

Fixes: QTCREATORBUG-30269
Change-Id: I78053bde9791122172f1d3d4ba712a9954ea9c4e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-07 15:14:02 +00:00
Artem Sokolovskii
8ee97b1e02 QuickFix: Fix add definition for templated function in namespace
- Fix add definition for templated/not templated function in templated
class inside namespace

Fixes: QTCREATORBUG-22076
Change-Id: I565cbdc8c6ab8d09727b4cd6f1c8fb45741c213f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-02-07 15:13:47 +00:00
Christian Kandeler
e2756fde8b CppEditor: Add quickfix for converting a function call
... to a Qt meta-method invocation.

Fixes: QTCREATORBUG-15972
Change-Id: Id84c83c5832cef32a877a451b0931ec47d2afe9d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-02-07 15:01:42 +00:00
hjk
2d37a7421f VCS: Simplify VcsEditor setup
Create the editor parameter structures in-place, and also
include the other two parameters in the struct to simplify
the signature of the c'tor.

Change-Id: Iff7d5ddf3096f4a3ed18e53265ae74806823af32
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-07 14:49:02 +00:00
hjk
be33c807a6 ProjectExplorer: Remove PEPlugin::finishedInitialization() signal
It was only used once in the debugger, connect more directly there.

Change-Id: I96923a308adfd343daeab6574e097f24bf0654d5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-02-07 14:23:46 +00:00
Christian Kandeler
91e72756fb CppEditor: Support wrapping strings in QByteArrayLiteral()
Fixes: QTCREATORBUG-12995
Change-Id: I9c0136b93fcfde0d2326bbd2bd6dbd5e75ae97a8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-02-07 14:21:56 +00:00
Marcus Tillmanns
5ae401b923 Aspect: Don't try to change value more than once
When our window loses focus the editingFinished signal is triggered.
This can happen multiple times (QTBUG-121983) if the result of the edit
is a modal dialog and the user clicks outside our application.

This would call editingFinished again, resulting in multiple message
boxes being opened. (Easiest to reproduce is changing the build
directory of a project which displays a message box confirming the
change)

This patch checks, via a recursion Guard, that the slot is not already
in the process of being called.

Change-Id: I5e61e1b57680f0b1f2483a81682e791bfb5c0867
Reviewed-by: hjk <hjk@qt.io>
2024-02-07 13:05:37 +00:00
Eike Ziller
ef6f8df26d Merge remote-tracking branch 'origin/13.0'
Change-Id: Ica486867e95e4cfc98272cd34781ce770690fa17
2024-02-07 12:53:07 +01:00
hjk
738b654396 Subversion: More direct access to client singleton
Change-Id: I4263b07da9970101dbbc798dbf64359c1da5199b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-07 11:42:46 +00:00
hjk
87f1114d21 Mercurial: Use more direct access to the client singleton
Change-Id: I32711a893bc5d5d655cf92637defaaf149f3f108
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-07 11:42:39 +00:00
Jarek Kobus
ff1aa20892 QmlDesigner: Fix remaining C++20 warnings about [=] captures
Change-Id: Ia54208e5e72016f6ca22e0b005d479aac8f49929
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-07 11:20:13 +00:00
Jarek Kobus
48bdf883dd Tasking: Fix some C++20 warnings about [=] captures
Change-Id: Ic49c9f393155acd16a2c116672fe73361f5c874d
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>
2024-02-07 11:20:04 +00:00
Thomas Hartmann
87dd0096b4 QmlDesigner: Disable share button in open source version
Task-number: QDS-11627
Change-Id: I3eb21fa84b6993aa783713ef5fa3beba1e3e030e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-07 10:44:11 +00:00
hjk
69caca1561 Vcs: Use const ref/copy to editor parameters instead of pointer
Will be propagated to the calling code further.

The minor inefficiency here is in my opinion outweighed by the more
common setup. The structure is small and we don't have thousands of
VcsEditors.

Change-Id: Ifc0d6e4acd5ef206d5fcadf55f9eb28bd567967c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-02-07 10:33:18 +00:00
hjk
fe251201fb ProjectExplorer: Hide a few factories behind a setup function
Change-Id: I2b688cee072d9983fbceb536063454a97dea3e60
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-02-07 10:33:03 +00:00