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>
It's never used, and actually there wouldn't be any sensible thing to do
with it.
Change-Id: Id8a8df18c7db4b98e5abbc034240bb90dc1dcaa9
Reviewed-by: hjk <hjk@qt.io>
Some printer seem to return an empty page rect for some configuration
which results in an invalide page count and a freezing ui. Do not print
anything and return in that case.
Fixes: QTCREATORBUG-24110
Change-Id: I42349bc97734e3f6a67502482d2b02959e865665
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If the selection foregound color is undefined do not overwrite the
already applied highlighting.
Fixes: QTCREATORBUG-24656
Change-Id: Ia125e8e6b9efba73d5a13facc2446a793d59f5c3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Adapt to QStringRef and QAbstractItemView::viewOptions() removal
Task-number: QTCREATORBUG-24098
Change-Id: Ia2d446312f68bd60143796284d31f5bba56aa0ed
Reviewed-by: David Schulz <david.schulz@qt.io>