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>
To avoid repeating the 'MimeDatabase mdb; mdb.something(); ' mantra
all over the place.
Change-Id: I4bfef62e73275a991455141671d6071162788e9d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Change VcsBaseEditorParameterWidget to add actions/widgets to an
existing toolbar, instead of being a widget itself.
The class is renamed in a follow-up commit.
Task-number: QTCREATORBUG-14934
Change-Id: I473a439d12a096f4cbb64f06faa0598ee72000de
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
New TextEditor action for duplicating current selection.
Extended version of this feature creates commented duplications.
Possible use cases:
1. No selection, cursor anywhere in text - Duplicity line
2. Simple selection - Duplicity selection
3. Block selection, without columns - Duplicity lines
4. Block selection, with columns - Duplicity selection
Cursor position and selection stays unchanged. Works well with Undo
action.
First use case with no selection looks similar as copyLineDown, but
difference is that copyLineDown moves current cursor position and select
created line. This feature don't change cursor position. Because of this
difference it is not possible to integrate this additions with
copyLineDown.
Quick intro: https://youtu.be/Fv6WdCnCLpo
Change-Id: I7c36fca6e17de030cbd22cfa103c2ed672deabbc
Reviewed-by: David Schulz <david.schulz@qt.io>
* Show/hide the error indicator button instead of enabling/disabling it.
* Use "Minimize" instead of "Do Not Show Again" in the info bar button
and use a custom setting to save this. The current info bar API does
not signal addition/removal of global suppression ids which would be
needed to update all editor widgets properly. We are the only client
and it feels wrong to add this API there at the moment.
* Remove not needed code anymore.
Change-Id: I2bb872522b7410434f060cc359a3b62dfed0af4d
Reviewed-by: David Schulz <david.schulz@qt.io>
Remove automatically inserted characters only when the cursor wasn't
explicitly moved or the editor hasn't lost the focus after the
completion.
Change-Id: I9e995dc4ce79194b073b1bce3fa4dbc025a09a94
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This means you can skip automatically inserted characters as long as you
don't explicitly move the text cursor and the editor doesn't lose the
focus. This will be visualized by highlighting the automatically
inserted character as long as you can perform the skipping.
This will reduce unexpected skipping in the case a cursor was explicitly
placed before an closing brace and a closing brace is typed.
Change-Id: I28e29e79ba10c9c48e8bc8817405fea630cca9bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
The cursor position is adjusted when the content of the editor changes
during the animation.
Change-Id: I6792841aca4babd6969a268c5b7cc318d7d4d4b1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Keep the highlight as long as the cursor is directly behind the closing
character and the editor is the focus widget.
Change-Id: Ic1d4bac263e9d2f395791dad7ecdceb9d69635c5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
- Correct marker position for QFusionStyle
- Don't repeat the "s->metaObject()->className()" call
- Re-use existing triangle drawing code for OxygenStyle
Change-Id: Ie203571a9053e115ab51ea9bdbf1b7376951e771
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
The original implementation had several issues with HighDPI.
Also, the gradient looked a bit dated in the now flatter UI.
Let's just fill a rectangle.
Change-Id: I80c3d5f1f8be89e81ea07113a691e69b01ec6272
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Don't disable all aspects of the AutoCompleter, but just skip the auto
completion when text is inserted in overwrite mode.
Change-Id: I3f1e25882130817446c80623369ab882abaf915d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This gives a clear hint that something has changed.
And gets the attention of the author in the case he didn't
expect some kind of automatic brace or quote completion.
Change-Id: I33e383db9a1e797ecb285a407e46671f41be7051
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This reverts commit 2be30c27ac.
The above patch puts limitations on the use of the API, while
being a questionable optimization. There is no reason why it
should not be possible to use lvalues for setting the various
creators. And MSVC2013 even thinks that actual functions
are lvalues for std::function objects.
Change-Id: Ia4daa7c3367b51bd613e1ff840f0ee617d36f54b
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
To allow enabling/disabling both features separately.
Change-Id: Ica154e3b400823de7cf22daf006958802d751c64
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>