We can't just add widgets after the first action of the toolbar.
The first action might not have a widget and will assert for that reason
in Qt.
Change-Id: Ib69c7d6d91bd56f25023aaebf961fef15cdcf008
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
If the cursor is positioned at a word boundary the action behaves
incorrect. Copy the behavior of QWidgetTextControlPrivate::keyPressEvent
which feels more natural.
Fixes: QTCREATORBUG-8977
Fixes: QTCREATORBUG-7056
Change-Id: I9dc0102023bb6234dcfa82619a976c723bc37a05
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Renaming the auto indent function triggered by Ctrl+I to make room
for a real format action.
Change-Id: If5731353311030d66a20f1093a7fdd300703ebbc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This avoids showing the option for example in git log or blame views.
The user also should not be able to actually change the line ending
style of read-only editors.
Fixes: QTCREATORBUG-23276
Change-Id: Ifa5cc9f663539928b4d5422b020e348b439684fa
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Marius Sincovici <smaryus@gmail.com>
The link is updated on the release anyway. Reset the press state of
the link now after a mouse move event.
Fixes: QTCREATORBUG-21848
Change-Id: Ice7a9873b1635a1b59ba7b8f2a266bf14e28c112
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
And use that in the Include and Type Hierarchy
panels to allow resizing the panels smaller.
Fixes: QTCREATORBUG-23197
Change-Id: Ia4b39e610c7a4be4df564dc69573f4748d7634a5
Reviewed-by: David Schulz <david.schulz@qt.io>
If the paint event rect does not contain the complete line, request an
update with the full line width also for editable editors. This fixes
current line highlight issues in the commit reword editor.
Change-Id: I6b93230a47bdd61248c1aa9631208606cbbae7c8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Check whether an editor already contains the hover handler before adding
to the list of handlers. Also remove the handler when a document is
deactivated for a specific client.
Change-Id: Iec1d3a0fd1dc3f02c8dd50b8968ff063efe2508a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
We should not force the tool tip text to HTML when help content is
available or when adding the F1 icon.
Instead add help content and F1 icon into the tool tip layout.
Change-Id: Ibe2d4fa2fb81bcda4e5aeb0d7d86dbf63fcf3ce6
Reviewed-by: David Schulz <david.schulz@qt.io>
Instead of just the editor with the info bar that was triggering the
download action or none editor if the action was triggered from the
settings dialog.
Change-Id: I4158eeb7fdb0a763d082c6d801b400e8635c7f38
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
by renaming it to Download Definitions and adding a tooltip stating that it
collects all definitions that are missing or were updated after the release and
downloads it to the ksyntax highlighting user folder.
Also adding a separate reload definitions button in the settings behind
the user path.
Change-Id: I059cc98e33147cae910fa4fdb35631d1dca81448
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
see QWidgetTextControl::processEvent and
QInputControl::isCommonTextEditShortcut. This will break assigning
shortcuts to for example Shift+a.
Change-Id: I4f97c27a47e2a7a44bf06b3ca949a6de74d4bb64
Fixes: QTCREATORBUG-22854
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Add into the text editor toolbar a combo box which allows to change
the line endings for an open document.
The supported line endings are LF and CRLF.
Change-Id: I029ba7867e0087b162edba7aba1bd1d1e966fd69
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Use it for search and replace functions as well as for Locator.
The camel case navigation can be switched on / off with
the existing menu Options > Text Editor > Behavior >
Enable Build-in camel case navigation.
Fixes: QTCREATORBUG-21140
Change-Id: I3f2dcafff231366b3c8f08c14514dd8940cca2a0
Reviewed-by: Eike Ziller <eike.ziller@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>
When using the 'windowsvista' style the folding markers are blue when
hovered. This color is almost invisible on the default folding range
background color. Use the tested folding markers of the fusion style,
because it is already used when device pixel ratio != 1.0
Change-Id: I23659cce71a2eb101692597a1d256d43f6426920
Fixes: QTCREATORBUG-21702
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This restores a feature of older Qt Creator versions: typing "over"
closing punctuation. For instance, if my cursor is at | and I have
something like this:
if (statement|)
... and I type the ) character, older versions of Qt Creator would not
end up with )). With newer versions of Qt Creator, this behavior is
limited to the case where an autocompletion has just happened (i.e. if I
typed the opening ( character, the closing ) is auto inserted and
highlighted - and if I type it myself, it won't add a second one).
Task-number: QTCREATORBUG-16946
Change-Id: I45af3ac139d5e7c76e5f0a8a9d66762f9209a525
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
Instead of the first visible block we need to check the last invisible
block whether we should add the folding end text to the fold
replacement.
Introduced in b6b756e737
Change-Id: Id93403a14145c09069281d32d5b622bad80c4ae6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Add a button to the multiple definition found info that saves the
definition of the current highlighter for the open document.
Change-Id: I04b1b7571a864d781747547a1d315ec25bb6b5a1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Mainly to get rid of the QProcess::finished deprecation warning.
Also adjust coding style in the surrounding connects when needed.
Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Recent adaptations to Qt 5.13's API deprecations require using APIs
which were introduces in Qt 5.11.
Change-Id: I6c077d824c9ce716e019543b290c355a5d512fad
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If we do not have a hover handler, or that did not produce any result,
use the word under cursor and try with that.
This adds at least some help fallback mechanism to all text editors,
e.g. we get some context help (though a bit crude) for Pyside
"for free".
Change-Id: I1b6d91ad6f46bfd12e242b1aec9f4fcadae23403
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Do not use functions that are not supported with
the minimum supported Qt for building QC.
Partially reverts 963dc84cc5.
Change-Id: Ife03143a7cf5a8f428754040e7004efe42d70a8a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Show an editor info bar when multiple highlight definitions can be found
for a single file or mime type. Add a combo box to the info that allows
the user to choose between them.
Change-Id: I07278d065e19d4e04fba24a6d789c8b6c9f55d60
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
removes the need of public function and member carrying the
information whether a highlight definition was found.
Change-Id: I8a0f24c9b376c01246116b502f5bbc06b3c65d21
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
updating the info bar only makes sense after trying to set
a generic highlighter, otherwise the member capturing the
information whether a highlight definition for the current
file is available might be uninitialized.
Change-Id: I5cce70ecf1df0ba34f43eeb01743c1fae729cc6b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>