Splitting the paintEvent method into various sub routines to increase
the maintainability.
Change-Id: I4aa7a52aa6e20279654784b55f92053d6ede00be
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
The container is used to initialize and group data that
is relevant during a paint event.
This conatiner will be used in follow up patches as an argument
to subroutines.
Change-Id: I00c8bafff526e2d90776e7ea75621fc5e4c2981f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Width is not zero-based.
Task-number: QTCREATORBUG-19091
Change-Id: I32134727bed204f6bb10748cd067a775f673b89b
Reviewed-by: David Schulz <david.schulz@qt.io>
The rectangle of an annotation is cached after it was painted. If just a
part of an editor was updated all annotations were removed but only
redrawn annotations were added to the cache again.
This behavior is replaced by removing annotations that are not visible
and those which got redrawn. So annotations that are still visible but
were not redrawn are kept in the cache.
Change-Id: I9246f1347b8f795284fb4fc9aabe11f251d16c25
Reviewed-by: Christian Stenger <christian.stenger@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>
Paint an annotation only if the event rectangle
contains the block for that specific annotation
Change-Id: I5f992f916da25268dd2c9e6b4703701934c8551d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Allows to use this header without texteditor dependency.
Change-Id: I706f42799c3ea42473a716fa9ef9f3cfbef6fdd4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
When using our text editor in a normal panel, we want to turn on the
frame again. Make sure that the extra text editor area does not overlap
the frame, and also make sure that there is no extra area shown at all
if all its features are turned off.
This fixes the painting of the input fields in the Clang Query advanced
search.
Task-number: QTCREATORBUG-18815
Change-Id: Ie74f87ddc576c02cd5ea7650f2632fe91df143eb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
... that do not define their own completion assist provider
Change-Id: I8edb65647a55178d4388b26c95cdeb301ff9f3fa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If you hover a diagnostics in for a clang query you get now a simple tool
tip.
Change-Id: I6352dd3d4b9a33c183e69037eac903469b90eea4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Coverity was complaining about these, in some places even rightly so:-)
Change-Id: Ia85cdd2c74f05edba6f0d4534aa9f2ee2a750595
Reviewed-by: David Schulz <david.schulz@qt.io>
Do not check whether a refactoring marker is visible, but always provide
enough space to display one.
Change-Id: I3f9dbb973b9067bd8177773d6fc878b47427232e
Reviewed-by: Christian Stenger <christian.stenger@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>
In checkToolTip(), the call to decorateToolTip() is not needed since it
does not affect the priority.
In showToolTip(), we can assume that checkToolTip() was called and thus
avoid a call to identifyMatch().
TextEditorWidgetPrivate::processTooltipRequest() is the only caller of
checkToolTip() and showToolTip().
Change-Id: I362c697754b6a29c9c0b34f85d3022f00e3e1031
Reviewed-by: David Schulz <david.schulz@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>
This allows to define a color for each highlight, and not just for
groups.
Change-Id: Ia027f1fb42a96c431b5889ec132a59b16ae41fbb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Allow users without physical MenuKey to open the context menu
Change-Id: Id886a5614e26d614cba6ceb3b08a9df6148e9655
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
All text editor actions were disabled. We want the actions to be enabled
when the focus is in the text editor widget in the Android manifest
editor.
For this the text editor action handler must differentiate between the
_editor_ and the _context_ that it handles. The one for the text based
manifest editor handles the manifest editor, but the context is specific
to the text editor part.
Change-Id: Ib91cc763cb27333a7d5b6e5b036dfead33961871
Reviewed-by: David Schulz <david.schulz@qt.io>
It was not possible to set custom comment styles.
Also simplifies the code for the predefined styles.
Change-Id: Id7f345d65b747bfac5a15e3eb15cd2beb106b281
Reviewed-by: David Schulz <david.schulz@qt.io>
Q*Application classes have unusually many static functions. In many
cases in our code, these functions are unnecessarily called as instance
functions, using the qApp helper.
This patch replaces many occurencies of qApp with the according
Q*Application classname.
Change-Id: I6099a419fa7bf969891269c37ed7a9e817ef5124
Reviewed-by: hjk <hjk@qt.io>