summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/snippets/snippetoverlay.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Merge remote-tracking branch 'origin/9.0'Eike Ziller2023-01-051-0/+5
|\ | | | | | | | | | | | | Conflicts: src/plugins/qtsupport/qtoptionspage.cpp Change-Id: Ic8ada9fd47f5eb62e751b6188a45b95ddb36122d
| * Editor: fix crashing on updating snippet selectionsDavid Schulz2023-01-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | The final selection is not tracked in m_selections and needs to be handled explicitly. Also add an assert preventing unconditionally accessing an out of bounds element of m_selections. Fixes: QTCREATORBUG-28631 Change-Id: I1898418b1126bdaffccbdf0e483e2c659d191917 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Don't call non-const methods on temporary QListJarek Kobus2022-12-081-2/+2
|/ | | | | | | | 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>
* 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>
* Editor: Fix crash when select last snippetDavid Schulz2021-10-141-4/+4
| | | | | | | | The first variable index might not be zero. Fixes: QTCREATORBUG-26406 Change-Id: I54a9575da61d770ba82f3ddb9b1e8b0128ae51dd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Editor: merge SnippetOverlay::mangle, ::clear and ::hideDavid Schulz2021-06-111-1/+3
| | | | | | | | ... into SnippetOverlay::accept. We currently have no need for just applying the mangling without closing the overlay. Change-Id: I98b2f023253f3676d1aed21438251998be1e509c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Snippets: Allow defining a final snippet tabstopDavid Schulz2021-05-281-1/+21
| | | | | Change-Id: I8b9704f66c9f0ac33dfb9d8f5e970a85bbcf143e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: Fix snippet variable index overflowDavid Schulz2021-05-041-1/+1
| | | | | Change-Id: Ifd224c33d5ffe56e22b85d8c1959448154d550b1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* TextEditor: Fix compile with Qt6Christian Stenger2021-05-041-10/+7
| | | | | | | | toStdList() has been removed in Qt6. Amends a2dadb3d0bf4f8850cc0da. Change-Id: Id2032d7e0a0c3345614bc56d98152c41f199af07 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* TextEditor: Snippet ranges refactoringDavid Schulz2021-05-031-53/+105
| | | | | | | | | | | | | | | Parsed snippets are now reported in chunks of texts and variables. A variable has a index that can be used to identify matching variables and maybe a mangler that can be used to modify the variable when applying the snippet. This effictively moves the variable matching logic from the overlay to the parser of the snippet, which is needed to implement the LSP snippet parser. Task-number: QTCREATORBUG-22406 Change-Id: I6999554c6c6d0f1887c98bf732473f01aa1f230c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: move snippet overlay into own cpp fileDavid Schulz2021-05-031-0/+112
Change-Id: I3343d9abf19e4edc7bd88077bf8fe6666a901e1b Reviewed-by: Christian Stenger <christian.stenger@qt.io>