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>
...otherwise the same tooltip will be created over and over again,
leading to a "moving tooltip widget".
Change-Id: I1704bc34c458ebe1aec664d5295418ab1d2b5082
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Implement selection expanding / shrinking, that is aware of C++
semantics, thus giving smart selection changing.
Change-Id: I1386a20597fa6bb85c3aa0d8ddfb87cdb3fd7c38
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Hover handlers now have a priority which is used to determine which
handler's tooltip is shown. The handler with the highest priority is
used, or, in the case of equal rankings, the first registered handler.
The base handler implements a default basic priority system based on the
diagnostic and help properties. Derived handlers can manually set the
ranking value as part of the identifyMatch() call.
A new checkToolTip() method is added so the handler can analyze whether a
tooltip is valid without it being shown.
Change-Id: I9d82fb9cc52f1d3cd53a8b197d75cd923651b79d
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
When we get fine-grained scroll events we shouldn't zoom 10% on every
event but scale zooming so they add up to 10% for every wheel click.
Task-number: QTBUG-49024
Change-Id: I08ac728bf1421148680de8fbbc76054ba2cce884
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>