The mouse cursor is hidden unconditionally in Qt, so do not give the
impression that this can be disabled. Also we have a bunch of bug
reports that claim that the cursor does not come back if the mouse is
moved after typing. This might be caused by the double hide of Qt
Creator, Qt and the moon phase.
Fixes: QTCREATORBUG-27572
Change-Id: I11b39cac6cd8eb0717fca00d1812a4e052223f21
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... after split in new window.
Fixes: QTCREATORBUG-27748
Change-Id: Idc6270e3bbc39a5c1e679357ba0fbd840e5312c7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
To increase the usefullness of the function, this change
adds the current search settings to the find() call.
This way the "case sensitive" and "whole words only" is taken
into account when searching for the next occurrence of the
selected text.
Change-Id: Ia4b28e84c39b9298d2dcbfa381ccf19d8137bfc6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Since we might get a result for a hover request after Qt Creator lost
focus we need to prevent showing tool tips for a Qt Creator in the
background.
Change-Id: Iaa0eafdfe9340d2623fc4632dfc685463fd0d53a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This will allow us to request assistance for a specific selection
instead of just the position.
Change-Id: Ib8e5b32d4a8f2936e5a6f1b7ac968d7f1d8d9de6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Similar to the InfoBar.
The only thing that an editor implementation needs to do is to set a
settings group and the possible info bars in the document constructor.
And later call document->minimizableInfoBars()->setInfoVisible(id,
visible) to manage the state.
Change-Id: I23afb3639b70b1bfccd424579da018280a7fe2cb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
It improve in the situations where the mouse move slightly between press
and release event, this should be mostly notable for trackpad users.
Fixes: QTCREATORBUG-26595
Change-Id: I36ef7d23c80c09b9248abd8313c040993ece92a4
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Adds an Action to select the next occurrence(s) of the currently selected text.
Change-Id: I37e23a3c2d1651ec4898fac53d75044d92ed7079
Reviewed-by: David Schulz <david.schulz@qt.io>
Instead make sure that the widget is updated after the current line
changes.
Task-number: QTCREATORBUG-26812
Change-Id: I9fc754255891ec29d3499da0ee23aa56b1f285aa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... inside the paint event. We should always make sure to call an
explicit update when we add, remove or change annotations via text
marks.
Task-number: QTCREATORBUG-26812
Change-Id: I5afbdad5e1916e99665b5cb1b1cd2a0bbf7335c3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Calculate the correct width for the annotation and decide inside
TextMark whether it can be painted or not. This will also
make sure that all annotation rectangles are correctly saved in
TextEditorWidgetPrivate::updateLineAnnotation.
Change-Id: I7e6c606e615b1673a34000618e106efb14184b10
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Since it is a selection the shift modifier should be part off the
shortcuts and the old block selection also required both modifiers.
Additionally this prevents creating a block selection by accident when
there are no items in the editor history since alt + arrow left is
mapped to go back in history by default.
Change-Id: I46b0753a737f1e1b3c980d2e959bcf7b4733d790
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
- configure with QTC_USE_NEW_MIMEDATABASE to switch to the new one in
utils/mimetypes2/
- added utils/mimeutils.h header for the Qt Creator specific static
wrappers, that also includes the "public" headers for MimeType et al
from the new or old implementation, depending on configuration
- change all utils/mimetypes/ includes to utils/mimeutils.h
- move the implementation for the wrappers to
utils/mimetypes(2)/mimeutils.cpp
- also move the MimeDatabase declaration in the "old" implementation
back to utils/mimetypes/mimedatabase.h
Change-Id: Ie8de229c035d6cd9a5e4739dc0fa78d9c17228e3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
The default implementation configures the generic highlighter based on
the documents file name and content. Add a way to force the highlighter
to use a highlight definition for a specific mime type.
Change-Id: I1c6fca1be9bcb5c4276b5aa2dbb724680fe98ddc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This reverts commit 5a3648c895.
Reason for revert: breaks other shortcuts like shift+del to cut the current line under the cursor
Change-Id: I5313c66df9dfa4283cc3f84ce9e7fd5464d0f73e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Do not eat all ShortcutOverride events. Let the rest of the class &
widget hierarchy know about them too.
Fixes: QTCREATORBUG-26764
Change-Id: I7e2f42183bc9cb3931aca3669a6703c83e39b4bc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Only select the lines if the cursor has no selection. If we have
multiple cursors with a selection the user most probably want to copy or
remove this selection.
Fixes: QTCREATORBUG-26761
Change-Id: Idbf36a878e3d56ea34542b5de390c547bd8bcd6b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Prevent scrolling to the end of the document after triggering select
all.
Fixes: QTCREATORBUG-26736
Change-Id: I744dddee87ac16ae2399d37483552fc6b535df46
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Do not include lines into the block selection that are shorter than the
block selection start column.
Task-number: QTCREATORBUG-26548
Change-Id: I6e4e26e1c498fb02dd0ebc8b78b8907c23f356b8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>