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>
The highlighting in the editor was still done with QRegExp,
so if you used Perl regular expression features, highlighting in
the editor was incorrect.
Fixes: QTCREATORBUG-21940
Change-Id: I785f0b2413a291d9f06de5877b18067a30d58588
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
We claimed to support the move action, so on Windows the user could drag
files away to e.g. the Desktop or the Explorer. This resulted in
inconsistent state, because we do not (cannot?) handle an "external
drop" in any of our build system managers.
Instead, we now support only the copy action, which leaves our project
sources untouched. This is also more likely to be what the user wants.
Fixes: QTCREATORBUG-14494
Change-Id: Ie327780768f1ac68d6dbe95c3daa4aa4dc3f0f41
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Fix that triggering a diagnostic tooltip from the diagnostic
location/range itself (underlined text) did not show the icon on the
left and the actions/toolbuttons on the right in the tooltip.
Instead of showing the tooltip content itself, request the tooltip for
the corresponding text mark to get the extra decoration and actions.
Change-Id: I5e94aca117a761f7a798d4f4b33db6e386e54d84
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Use one row instead of two for showing "Other annotations" and the
separator line.
Change-Id: I25234fc2fb49ccb71125a1cf762c89b668032b77
Reviewed-by: David Schulz <david.schulz@qt.io>
Context help should take the HelpItem from the tool tip if it was set,
even if it isn't valid.
Similarly, if the help item was set on the text editor, it should not
ask the hover handlers (again), even if that is invalid
Change-Id: I481f8ad73c3cf8fdbb90f737ab36b4e380467026
Reviewed-by: David Schulz <david.schulz@qt.io>
Save the HelpItem directly in the tooltip instead of the help ID which
would need to be looked up again.
Change-Id: I107e82e89d9ea26cad9d6532ad4c687d1ac8f1ec
Reviewed-by: David Schulz <david.schulz@qt.io>
Sometimes it's imnportant where the cursor currently is
to properly format the code without affecting the current line.
Change-Id: I8b1fb11d2303adb5f960c7cb80a0ed2e6e45010f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Ctrl+I with the new check will reformat the selected code or
the current line instead.
Change-Id: Ia5a72c4a09621034d0dfe463f669fe1ca36b0b5f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
It no longer takes an ID but a HelpItem.
Change-Id: I0aa738549fea4fcfd0151adc2dfd642c63f0f60d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Context help would first query the database with potential IDs, and
afterwards the help plugin would look up the links for the resulting ID
again.
Pass the HelpItem (which potentially contains the cached links) directly
to context help.
Change-Id: I73bddcd3cd4eacaea412b98d53c5e5354a31f3d5
Reviewed-by: David Schulz <david.schulz@qt.io>
Allows to trigger actions without adding specific handling into the
editor.
Change-Id: Ia63d65d3feca37bcefca1b6322ade039027a92d8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We do not build texteditor files in unit-tests so some tricks
were required to make ClangFormatIndenter available.
First simple unit-test proofs it builds and runs.
Change-Id: I81d5ea099bd27fd1c1ed8b5b7877299dcc62a67f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>