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>
Constructing a QKeySequence with the string "Cmd+Opt+Shift+V" leads
to an invalid, non-empty QKeySequence when compiling Design Studio
on macOS. This triggers an assertion later in the code path.
Using “Ctrl+Alt+Shift+V” instead works as expected.
Change-Id: I7cb185d18f9ffbb7454c61f28a93cdd307121882
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The coreplugin/id.h header is kept for downstream for now.
Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Instead of just enable actions that were disabled from the beginning you
can no disable optional actions.
Change-Id: I986b8a72523a8aeec9f4ccf76cd4921018ffc003
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Use an additional action mask to enable actions like find usage and
rename symbol per editor instance.
Change-Id: Iabee1820d0f3c156ad30ba760bfce9f6181045e6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
So far it was only possible to combine TextEditorFactory, BaseTextEditor
and TextEditorWidget directly.
That TextEditorWidget is also directly a QPlainTextEdit made it
impossible to "decorate" the text editor widget with something else
without a lot of effort.
Make it possible to create a text editor factory that returns an
arbitrary widget, as long as it can be "cast" to a TextEditorWidget with
either qobject_cast or Aggregation::query. That way the TextEditorWidget
instance can be attached to the editor widget via Aggregation.
Adapt other code that accesses TextEditorWidget from editors
accordingly. Introduce a common method how to do that.
Change-Id: I72b8721f3a8a8d8281c39af75253e9c80cbe1250
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Renaming the auto indent function triggered by Ctrl+I to make room
for a real format action.
Change-Id: If5731353311030d66a20f1093a7fdd300703ebbc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
In preperation for supporting find usages by the language client plugin
Task-number: QTCREATORBUG-21577
Change-Id: I7a6da3a9d53478c1d486e0ddc5829c9ea09a2a20
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Also, add context to connect() expressions where we are or were
capturing "this".
Change-Id: I6e006ba6f83d532478018550d148ee93eca59605
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Avoids creating subclasses just for implementing a single method.
Change-Id: I813a0a20eaba8fefa004b74f92d48a9a9c4bfcc1
Reviewed-by: David Schulz <david.schulz@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>
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>
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>
Will be used as that in the end, we can be clear about
its true nature.
Change-Id: I8928678eba12ecdbd32c291f3c02c5c89700ff76
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
... and some of the related implementation details
Change-Id: I1f03aa5acf2d3fb2cfc2a6a7845f3d3578b0408d
Reviewed-by: David Schulz <david.schulz@digia.com>
Replace all* remaining deprecated Qt 4 functions with
their Qt 5 counterparts. This means we no longer need to
define the QT_DISABLE_DEPRECATED_BEFORE macro.
This patch is relatively small because most source-compatible
changes of this kind have been done before.
* The one exception is the QmlDesigner, which uses QWeakPointer
in a deprecated way all over the place.
Change-Id: Id4b839c6685f3b5bdf2b89137f95231758ec53c7
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>