summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cppcodeformatter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CPlusPlus: Add support for coroutinesChristian Kandeler2023-03-061-0/+2
| | | | | | | | | Also fix some concept-related bugs uncovered by the test case. Change-Id: Ia67c971026bcd85d9cc252f46cd4f56c2865d432 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | 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>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-1/+1
| | | | | | | | | | | | | | 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>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | 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>
* CppEditor: Remove foreach / Q_FOREACH usageArtem Sokolovskii2022-05-061-2/+2
| | | | | | Task-number: QTCREATORBUG-27464 Change-Id: I9915cf2c07bdcc570efc20601752d60f2ec82f34 Reviewed-by: David Schulz <david.schulz@qt.io>
* CppEditor: Fix indentation for structured bindingGPery2022-03-291-0/+1
| | | | | | | | | | Structured bindings were parsed as lambdas instead Fixes: QTCREATORBUG-27183 Change-Id: I3c88dc1012e55edfe417504c17f6138e3356651c Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppEditor: Prevent indenting inside all variants of raw string literalsChristian Kandeler2022-03-281-2/+5
| | | | | | | | Fixes: QTCREATORBUG-27244 Change-Id: Icda903bf572081278af34078e4f6243747a7b7ab Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CppEditor: Fix indentation problem with raw string literalsChristian Kandeler2021-12-131-0/+3
| | | | | | | | | Pass the necessary context information in and out of the SimpleLexer. Task-number: QTCREATORBUG-26211 Change-Id: I8063b03f4c9734991f15b5c0e7b58ee52e3cfc52 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* Merge CppTools into CppEditorChristian Kandeler2021-09-011-0/+1709
There was no proper separation of responsibilities between these plugins. In particular, CppTools had lots of editor-related functionality, so it's not clear why it was separated out in the first place. In fact, for a lot of code, it seemed quite arbitrary where it was put (just one example: switchHeaderSource() was in CppTools, wheras switchDeclarationDefinition() was in CppEditor). Merging the plugins will enable us to get rid of various convoluted pseudo-abstractions that were only introduced to keep up the artificial separation. Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a Reviewed-by: Christian Stenger <christian.stenger@qt.io>