The hiding is not persistent, so on the next Qt Creator start all
annotations are visible again. This is meant to quickly get rid of
annotations if there are to many irrelevant of a specific kind.
Change-Id: I4862e56e0f5624f30aadda26efc9dea672ab1f57
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
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>
The location marker is updated very regularly and especially while
stepping moves one line at a time. Resizing this marker when it enters a
line that already contains a marker is visually distracting. To prevent
this paint the marker over all other markers in that line.
Change-Id: I63ad72384e77eeae4dc6d2e2c2ac77c88da92c56
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Since we are now requiring macOS 10.14 we can remove our local
implementation of optional and use std::optional for macOS too.
Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
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>
When generating a lot of text marks we do not need to update the
document for every mark and every property that changes.
Change-Id: Ibba80138f6ebcbbe30a4f741979df69ad62608c1
Reviewed-by: hjk <hjk@qt.io>
Only remove and add the text mark to the text block user data if the
priority changed. In all other cases a layout update is sufficient.
Amends a8cad01887
Change-Id: I9f8552e766838917c0e296cc7f7c7730669c45cd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Calculate the correct width for the annotation and decide inside
TextMark whether it can be painted or not. This will also
make sure that all annotation rectangles are correctly saved in
TextEditorWidgetPrivate::updateLineAnnotation.
Change-Id: I7e6c606e615b1673a34000618e106efb14184b10
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Ensures an update for the markers editor widget after any of the
information displayed in the annotation has changed
Change-Id: I845e05f5103ee1615cfc3d7760cdfc2bbf510f32
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... from text marks.
Direct calls appear to be unsafe, possibly because text marks are
transient.
Fixes: QTCREATORBUG-25623
Change-Id: I929ff6310c9d93b677f66acc8869e7aeceb5564b
Reviewed-by: David Schulz <david.schulz@qt.io>
In case users don't find the icon self-explanatory.
Task-number: QTCREATORBUG-25150
Change-Id: I481b1ea7f510f065f83badcb91e127ac1c81f5a1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
... to TextMarks more easily by allowing callbacks in addition to
fixed values.
Change-Id: Ica9e7d54dd1a53a59dc11812857402d0b7594d6c
Reviewed-by: David Schulz <david.schulz@qt.io>
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.
Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Move it from language client utils to a static function inside
the text document.
Change-Id: I91bc72d0e978c1d843082e12bb8a0fa60a1bbc5e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
...as selecting text in the tooltip was difficult and eventually got
disabled due to other problems - see
d58c0a9ac8.
This adds support for actions in TextMarks. They are displayed as
QToolButtons in a dedicated column in the tooltip.
Change-Id: I84ee3c3e4af573a80953786881d1333b00e4200c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Request an update covering the complete annotation
rectangle if it is not part of the event rectangle
and Correctly calculate the position for the gradients.
Task-number: QTCREATORBUG-18855
Change-Id: I68b61459e6fd94949baebba25f965226f9d5e441
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
TextMarks with empty file names are not added, no reason to remove them.
Change-Id: I8647deaa1136294d2f7c3c63337d967afea675c2
Reviewed-by: David Schulz <david.schulz@qt.io>
Coverity was complaining about these, in some places even rightly so:-)
Change-Id: Ia85cdd2c74f05edba6f0d4534aa9f2ee2a750595
Reviewed-by: David Schulz <david.schulz@qt.io>
Displaying short descriptive text of a TextMark at line end.
Currently implemented for ClangTextMark and BookMark.
Change-Id: Idc6b579bda0382ad94b2e236b715696396b10460
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Moving defaultToolTip and color from TextMarkRegistry to TextMark.
Allowing every instance of a TextMark object to define these
information.
Change-Id: Iec1794372cf902b34d343402074e3999e7f9faf7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The registry is an implementation detail and doesn't need to be exported
so move it to the textmark.cpp file.
Change-Id: Ic103b122cb20063fa4bc220bdc90cecff27054aa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The text marks are added to the document from their ctor. The document
then uses the widthFactor to calculate the space needed for them. If the
widthFactor is only set afterwards, the calculated space is wrong.
Change-Id: Ic7d24f99cc78d1bf084b2b1cfdf6b955496072f3
Task-number: QTCREATORBUG-17833
Reviewed-by: hjk <hjk@qt.io>