aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor
Commit message (Collapse)AuthorAgeFilesLines
...
| * FunctionDeclDefLinkFinder: Ensure the old futures are synchronizedJarek Kobus2024-02-231-2/+7
| | | | | | | | | | Change-Id: I68b271f85d2bb319230529d4b0b074c05c12ba4c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * FunctionDeclDefLinkFinder: Don't delete the watcher from its signal handlerJarek Kobus2024-02-232-7/+6
| | | | | | | | | | | | | | Use std::unique_ptr instead, as QScopedPointer doesn't offer release(). Change-Id: Ifbe42dca5b266930e1000a50441995023b89b802 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * CppEditor: Fix indentation with inline namespacesChristian Kandeler2024-02-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | After encountering the namespace keyword, we have to backtrack the state change introduced by the inline keyword. Fixes: QTCREATORBUG-22071 Change-Id: I543976622d1a56b2c61d68da6ec3eee8b6d0d5b3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
| * CppUseSelectionsUpdater: Ensure the old futures are synchronizedJarek Kobus2024-02-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | When scheduling a new async run (via FindUses::find()), keep track for the canceled futures, otherwise they may still be running after the shutdown. So, add all new futures into the future synchronizer (without canceling them). Task-number: QTCREATORBUG-30401 Change-Id: I83a82f706175060f7f29886b57c69c77667a0805 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
| * SemanticHighlighter: Add internal FutureSynchronizerJarek Kobus2024-02-202-12/+7
| | | | | | | | | | | | | | | | | | | | | | As it's not clear whether canceled future may continue to run when the SemanticHighlighter instance is destructed, add internal FutureSynchronizer that ensures that all old, canceled futures are finished from the SemanticHighlighter's d'tor. Change-Id: I3128999f1250d666fcc3aa04599bb4a9c675ca3e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * CppEditor: Do not access document manager when gathering local symbolsChristian Kandeler2024-02-2010-47/+77
| | | | | | | | | | | | | | | | | | | | As it turns out, that code runs in a dedicated thread. Task-number: QTCREATORBUG-30401 Change-Id: I66236fa00b8ddb55276d822357517fdccb0e61df Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * SemanticHighlighter: Simplify disconnecting from the watcherJarek Kobus2024-02-202-24/+6
| | | | | | | | | | Change-Id: I92c78f71a209ac428354284649e0f4b6522a947f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * CppUseSelectionsUpdater: Don't delete the watcher from its signal handlerJarek Kobus2024-02-202-7/+5
| | | | | | | | | | | | | | | | | | | | Use std::unique_ptr instead, as QScopedPointer doesn't offer release(). Task-number: QTCREATORBUG-30401 Change-Id: If8f922fb52363a2e866cfacf770f617a00aa7fe5 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * SemanticHighlighter: Don't delete the watcher from its signal handlerJarek Kobus2024-02-192-7/+7
| | | | | | | | | | | | | | | | Use std::unique_ptr instead, as QScopedPointer doesn't offer release(). Change-Id: I8e885e477d1aeb8ce9462e8fd249a5196424df18 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | CppEditor: Fix indentation of function call argumentsChristian Kandeler2024-02-261-1/+1
| | | | | | | | | | | | | | | | ... following an argument with an array subscript operator. Fixes: QTCREATORBUG-29225 Change-Id: Iba38043d94be718efee30ce50f5b55aac4ba6ecd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | CppEditor: Refactor CppCodeModelSettingsChristian Kandeler2024-02-265-209/+123
| | | | | | | | | | | | | | | | Preparation for per-project settings. Change-Id: I78ecf0cde6150e40353c4aea6a98717d119f05c7 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | CppEditor: Un-export CppProjectUpdaterhjk2024-02-222-35/+23
| | | | | | | | | | | | | | Does not seem to be used outside. Change-Id: I9ed27e20ebb23ffd59b7f557b1ff56dbcadd6a2d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | CppEditor: Remove unused signalChristian Kandeler2024-02-221-1/+0
| | | | | | | | | | | | | | Amends 760cf632afddbdbc6cf1ded0655e8286ccbffd1f. Change-Id: I4b5b1c74549d293a3664825bee461c9a3cfbd342 Reviewed-by: David Schulz <david.schulz@qt.io>
* | CppEditor: Use Utils::Store in CppCodeModelSettingsChristian Kandeler2024-02-212-44/+53
| | | | | | | | | | | | | | Preparation for introducing a per-project variant. Change-Id: I40897f3ad5261e0d28e6c1332a6951f61f5e749b Reviewed-by: David Schulz <david.schulz@qt.io>
* | CppEditor: Do not store default values for code model settingsChristian Kandeler2024-02-212-43/+39
| | | | | | | | | | | | Change-Id: I707135c4256953457ca2f6a4abc3245e45d8b5eb Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | CppEditor: Make check for clangd more fine-grainedChristian Kandeler2024-02-218-13/+28
| | | | | | | | | | | | | | | | | | | | | | ... in the quickfix factories. We want to be able to offer or not offer certain quickfixes based on the current clangd version. Change-Id: I7dca69ff990ab9f1a691785cd72e633f7882ae3d Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-02-192-2/+1
|\| | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs Change-Id: I2a3d92a14e4dd16897d19f7d8a8c7b0ec30d14a5
| * CppEditor: Do not duplicate minimum clangd versionChristian Kandeler2024-02-161-1/+1
| | | | | | | | | | | | | | | | | | Amends 55161882900b459da6bc76e2d5c48e3c32ea4b34. Change-Id: I1de7249c06c0e262d0c36f980cc687f0e792f755 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Clangd: Fix version check to use (remote) executableMarcus Tillmanns2024-02-152-2/+1
| | | | | | | | | | | | Fixes: QTCREATORBUG-30374 Change-Id: I4a98a82ea24bb55a2ab3eed72f13d3d6f648df8a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | CppEditor: Add curly braces for more control statementsChristian Kandeler2024-02-154-46/+166
| | | | | | | | | | | | | | | | Fixes: QTCREATORBUG-24542 Change-Id: I3e0893e1c736730d94e2c9ab2baa0aa580393fe4 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-02-148-35/+64
|\| | | | | | | Change-Id: Iaf7373d449668bba57e53810858b58e2ec83dcc0
| * CppEditor: Re-add function decl/def switch handlerChristian Kandeler2024-02-131-0/+4
| | | | | | | | | | | | | | | | Was accidentally removed in 3771eb196b066314d427d7343cb1d4c6e2c5d6a4. Fixes: QTCREATORBUG-30363 Change-Id: Ifef1266b144d2eb5b7b69ff3e721f781b4455e96 Reviewed-by: hjk <hjk@qt.io>
| * CppEditor: Use a hidden friend to compare ↵hjk2024-02-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * CppEditorOutline: Remove unused methodJarek Kobus2024-02-082-8/+0
| | | | | | | | | | | | | | | | 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>
| * ModelManagerSupport: Remove unused PtrJarek Kobus2024-02-081-6/+0
| | | | | | | | | | | | Change-Id: Ibdc81d1c6fecb808cbd7ca91f56a4869b6e26dc1 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * QuickFix: Fix add definition for templated function in namespaceArtem Sokolovskii2024-02-072-3/+37
| | | | | | | | | | | | | | | | | | - 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>
| * CppEditor: Support wrapping strings in QByteArrayLiteral()Christian Kandeler2024-02-071-14/+19
| | | | | | | | | | | | | | Fixes: QTCREATORBUG-12995 Change-Id: I9c0136b93fcfde0d2326bbd2bd6dbd5e75ae97a8 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | ClangCodeModel: Let users configure the clangd index locationChristian Kandeler2024-02-123-13/+106
| | | | | | | | | | | | | | | | | | Fixes: QTCREATORBUG-27346 Change-Id: I9bc59f759682e70b761c0f22a011868008fc0360 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> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | CppEditor: Add quickfix for converting a function callChristian Kandeler2024-02-074-25/+267
|/ | | | | | | | ... to a Qt meta-method invocation. Fixes: QTCREATORBUG-15972 Change-Id: Id84c83c5832cef32a877a451b0931ec47d2afe9d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Tasking: Fix some C++20 warnings about [=] capturesJarek Kobus2024-02-071-2/+2
| | | | | | | 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>
* LookupContext: Replace QSharedPointer with std::shared_ptrJarek Kobus2024-02-064-16/+16
| | | | | | | | According to https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews QSharedPointer impl is poor and it's going to be removed from Qt 7. Change-Id: Ia7ec4b427c5971d6bd375659b291a9aad2ead253 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Various plugins: Fix some more C++20 warnings about [=] capturesJarek Kobus2024-02-062-8/+9
| | | | | | Change-Id: If20aac4320c84096a07d67cc137886638286acf8 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CppEditor: Move some factory class definitions to .cpphjk2024-02-0511-85/+101
| | | | | Change-Id: Icceae7f93ac52fe371813608ecec0de1feed317b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* FunctionDeclDefLinkFinder: Replace QSharedPointer with std::shared_ptrJarek Kobus2024-02-056-22/+21
| | | | | | | | | According to https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews QSharedPointer impl is poor and it's going to be removed from Qt 7. Change-Id: I41b753f52d06bb35988d1a57478e06daaec04f31 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppElementEvaluator: Remove not very useful methodJarek Kobus2024-02-053-8/+2
| | | | | | Change-Id: I73545f6366e0f8ca856e15dc4ea28603351a93f1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* CppElementEvaluator: Replace QSharedPointer with std::shared_ptrJarek Kobus2024-02-054-41/+39
| | | | | | | | | According to https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews QSharedPointer impl is poor and it's going to be removed from Qt 7. Change-Id: Id82e0908f4084e06531bba47f4f17138e5878f3e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* CppEditor: Move some items from cpptoolsettings to cppeditoroutlinehjk2024-02-053-40/+31
| | | | | | | | These are only used once. Change-Id: I7b6ca19ba1ef483d1e4cae34661e7d78e72eff67 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppEditor: Move ClangdSettingsWidget definition to .cpphjk2024-02-022-147/+134
| | | | | | | ... and de-pimpl there. Change-Id: Ie205ce68de0513184b87b5bf7b6b338435b6a4de Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppEditor: Hide most of LineForNewIncludeDirective implementationhjk2024-02-024-116/+129
| | | | | Change-Id: Ic70d28beb057359fcd028aca2ab49ecb66dd990d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Delay-create TaskHubhjk2024-02-021-1/+1
| | | | | | | Effectively only by a few lines. Change-Id: Ieb548d0a2f5ced033881106c76adc9a5e3e16663 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* CppEditor: Don't needlessly store default valuesMarcus Tillmanns2024-02-012-37/+85
| | | | | | | Task-number: QTCREATORBUG-24762 Change-Id: I171a7c6bd8f7f62cb4871b3d6c1828ff7edd53ab Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* TextEditor: Merge Base- and ThreadedSyntaxHighlighterRunnerDavid Schulz2024-01-313-5/+5
| | | | | Change-Id: I38ad01a895eabba99b2e554f3ae9bef85f32bb3b Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
* CppEditor: Fix & simplify "extract function" quickfixChristian Kandeler2024-01-301-26/+8
| | | | | | | | | No need to fiddle with whitespace manually (and make potentially invalid assumptions about previously inserted code). RefactoringFile takes care of formatting these days. Change-Id: I6e566e6e4cd2a90b73c29365483b92f94e8c58ce Reviewed-by: David Schulz <david.schulz@qt.io>
* Merge remote-tracking branch 'origin/12.0'Eike Ziller2024-01-301-1/+3
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/cppeditor/cppfilesettingspage.cpp src/plugins/haskell/haskellplugin.h Change-Id: I880693c2e4986853b7aa600a5b7d6c09ad14634e
| * CppEditor: Fix restoring per-project cpp file name settingsChristian Kandeler2024-01-241-1/+3
| | | | | | | | | | | | | | | | | | | | Another victim of Utils::Store. Also add missing initialization of "is global" state. Change-Id: I3d20e1403795366044d3b2df552f2a5947ba8c98 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>
* | CppEditor: Fix compilation without testsOrgad Shaneh2024-01-301-17/+17
| | | | | | | | | | Change-Id: I9a621871d9235652618fa2c295db7e39ca6118f1 Reviewed-by: hjk <hjk@qt.io>
* | Various plugins: Replace QMap with QHashJarek Kobus2024-01-291-1/+1
| | | | | | | | | | | | | | The key is a pointer, so use QHash. Change-Id: Iad633b9e599d653606d386371b71b002baac6371 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Various plugins: Remove unused variablesJarek Kobus2024-01-291-2/+0
| | | | | | | | | | | | Change-Id: Ie2e5eb38d81a7582c5715654f09f28deb4ab11c5 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | TextEditor: Use new setup pattern for PlainTextEditorFactoryhjk2024-01-291-2/+1
| | | | | | | | | | | | Change-Id: Iad3b8574a51db3baf6db74353e58968a2f6a4315 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | CppEditor: Move CppHeaderSource implementation and test to same fileshjk2024-01-2618-387/+384
| | | | | | | | | | | | | | ... and remove the now-empty cppeditorplugin.h Change-Id: Ia28b180c280ba7b10ce0f2826f2ac69d128a453c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>