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>
This enables macros in snippets as well as if/else to select/deselect
lines to have in the snippet.
Change-Id: Ic88fb3277a0f5ac803bcab486b245c688c00822a
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
The tool tip never has focus, so it cannot become the IContext that is
checked for context help. So, integrate the help id into Utils::ToolTip
and check the tool tip first when checking for context help.
As a side effect the [F1] button and help id for the tool tip is now also
available for use outside of the text editors.
Task-number: QTCREATORBUG-5345
Change-Id: Id975703caf161d1183c247e8ad8bb693b90fd306
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Fixes building up of sluggishness when hovering text while keeping
Ctrl pressed.
To make sure link clicks are handled correctly, an immediate update
is forced in case of mouse press.
Task-number: QTCREATORBUG-12573
Task-number: QTCREATORBUG-9008
Change-Id: Ieb85d9f2a1e82167dd9a9245e4bc48766d71ae93
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Made indentation work for block selection mode the same way it does in default mode:
1. delete text if any selected
2. indent block if no text selected
3. indent last line if cursor in first column (QTCREATORBUG-12697)
Task-number: QTCREATORBUG-12697
Change-Id: I1f6b218b389f3fdc5232ec02857aa76f5ccbaaf0
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Fixes case 2 and 3 of QTCREATORBUG-14633.
Task-number: QTCREATORBUG-14633
Change-Id: I19bf3c81c26f8a89a508591b0e7264251e0e6254
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
... by using Core::Ids instead of ExtraSelectionKind enum.
Change-Id: I664ff2a4a03eddd8fe1150929203a1727c12dc84
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Extend drop support with variant values. A drop may be a file drop or a
value drop or both.
Rename Utils::FileDropSupport to Utils::DropSupport and add methods to
add not only files but any QVariant value to the mime data. Project
explorer adds dragged nodes (which will be needed for future ModelEditor
plugin).
Change-Id: I799542c60fdecb3e64af0d3ba47b6caa9adbcfd7
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
For non-editor documents it currently is not used, but for editors it
makes more sense to have that on the document instead of the editor.
Most actual implementations of "open" were done in the documents already
anyhow, because it is needed for reloading.
Change-Id: I29d4df2078995cbe80172b51a9bebeecb3afad3c
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
To allow invoking it from BaseTextFind.
Task-number: QTCREATORBUG-14300
Change-Id: Id9f553d166f7b929e00238327e22d6a915957b77
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reducing the number of calls to findLinkAt() when hovering over
text.
Task-number: QTCREATORBUG-12573
Change-Id: I679ee7d9599071e1e3ea20cc028440df6dad0d25
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
... that are currently visible on the screen.
Change-Id: I6c56f376f1a34a7314584df057cf03a8e5387a08
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This avoids unnecessary detaches of the Qt container data.
The mismatches where detected by defining QT_STRICT_ITERATORS;
however, this define violates the ODR (causing linker errors),
and therefore is not added permanently.
Change-Id: Idd336a9c8b394214a820437ef1b92d2101f6101c
GPush-Base: 62b0848b9c
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>