Adding a way to create multiple cursors that can insert/remove text at
arbitrary positions in the document. Adding cursors is done by pressing
alt + up/down or by clicking into the editor while holding the alt key.
Fixes: QTCREATORBUG-16013
Change-Id: I495d27d95a3d277220946616ef30efc241da0120
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
... after updating the parenthesis in the layout
Task-number: QTCREATORBUG-26183
Change-Id: I346046fbc3932b94227c1ac5bee6b0d7c44651e1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... for the context of the code assist instead of using a callback from
the text editor.
Change-Id: I636b1b267a944895d4ff732e3c0a8811332ec14f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
That is, don't just ask one random hover handler, but try all of them
and use the best one.
Change-Id: I38d0a90e96090c56240314a90f0f428c88fd222c
Reviewed-by: David Schulz <david.schulz@qt.io>
After the TextEditorWidgetPrivate's d'tor has finished,
compiler starts destructing all the member fields of
TextEditorWidgetPrivate before calling base QObject d'tor.
Some d'tors of some members may still emit signals which
are connected to TextEditorWidgetPrivate's slots. In this
case we may start operating on corrupted internals.
Fixes: QTCREATORBUG-26001
Change-Id: I865cad16601b278fe7f7cf95145557310bb83126
Reviewed-by: David Schulz <david.schulz@qt.io>
Note that we temporarily lose the ability to hover over an include and
get the full path of the header file. This is a valuable feature that we
need to restore, preferably by fixing clangd itself.
Fixing the remaining few test failures would likely require more
complicated code as well as additional LSP round-trips, and as of now
I'm not convinced it is worth the effort.
Change-Id: I08c72c4bd1268bbd67baeb57bbfd29d9b11303a5
Reviewed-by: David Schulz <david.schulz@qt.io>
The KSyntaxHighlighter Definitions provide single and multiline comment
markers. So check against those when trying to automatically fold the
first license header instead of assuming that '#' and "/*" are comment
markers.
Task-number: QTCREATORBUG-25882
Change-Id: I3a84cfc45445caad3b40feb996cfb781a5fb3190
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... 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>
... so we can re-use the "follow symbol" test cases with clangd.
Call Creator like this (clangd needs to be version 12 or later):
$ QTC_CLANGD=<path to clangd> qtcreator -test
'CppEditor,*Follow*,*Switch*' -test 'ClangCodeModel,*dummy*'
During testing, some invalid code in the test cases was uncovered and
fixed.
Change-Id: I9dc650fdba2a27600e6a550420ee873f6fb31d23
Reviewed-by: David Schulz <david.schulz@qt.io>
Only take text marks with icons into account when looking for the three
textmarks with the highest priority to be drawn next to the line number.
Fixes: QTCREATORBUG-25427
Change-Id: I9c0b9cac2e34134e59071a4e2357585b3071c303
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
Split out the snippet functionality into a new derived
overlay implementation.
Change-Id: I2d7fffabe16ce6348ed067eb52ff221420a23285
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Qt Creator required Qt 5.14 or higher. Let's removed the #idef-ed code
for building against lower Qt versions.
Add a comment in porting.h where we still need such code for sdktool.
Change-Id: Ib330275208eec4a2f285b4b9f480530c171f538a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This updates the tab settings to the correct one for the specific
language like C++ or QML. Only observable if the file is not part of a
project. Otherwise the project code style settings will set the language
specific tab settings.
Fixes: QTCREATORBUG-25485
Change-Id: I736646557a213369903fe495e3b5a3a950141961
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Use QCoreApplication::instance() as a context object for the
IAssistProposal deleter.
Change-Id: Idf8cd1955dca146a500da1ea036298455c8a5da1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
And implement it in the clang-format plugin to use the ColumnLimit from
the style. This would be quite useful if you're working on different
projects with a different ColumnLimit. This way you get an visual
representation and do not only have to rely on clang-format.
Change-Id: Ib0258e3fba6f45f0f46ce612f806527a47868ad9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
FakeVim needs some notification even in cases where the
duplication is triggered outside the EditorManager as in
QmlDesigner's qml-editor.
Fixes: QTCREATORBUG-22344
Change-Id: Ia4950ff4b02d3f89779f03ff4c106a07ccff2106
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Courtesy of readability-static-accessed-through-instance
Amends: b2a766a79a
Round #2: This time done with Qt Creator's Analyzer, which
found other occurences than run-clang-tidy.py
Change-Id: I479e280c7abcf2d24baccbb0af69ae4bda05198e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This does not work with text wrapping since there are multiple
QTextLines inside a block but we can not adjust the line hight inside a
block. This needs to be addressed inside Qt.
This reverts commit dc64f3207b.
Change-Id: If6c28056da9891eeeb75f5939a42f08360013a80
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Also compare the anchor when looking for the selection. Otherwise we
might get a selection highlight that expands on adjacent extra
selections like code model warnings.
Change-Id: Ib8460c1089ed69d14b7a408ca70e7ac1f8642f6e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>