Previously RefactoringFiles were usually passed around by value.
However, since a RefactoringFile may sometimes own a QTextDocument
(when it was read from a file), that's not great and caused the
file to be reread after every copy.
With this change RefactoringFile becomes noncopyable and is always
owned by a shared pointer.
This change also allowed having const RefactoringFiles which is
useful because they can be safely used from other threads. See
CppRefactoringChanges::fileNoEditor.
Change-Id: I9045921d6d0f6349f9558ff2a3d8317ea172193b
Reviewed-on: http://codereview.qt.nokia.com/3084
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Adds a new smart backspace behavior option. Now it's also possible
to simply unindent (like a backtab). This is particularly useful
when the cursor is not inside an "indentation area" but the user
still wants to go backwards by indent levels when possible (for
example before a comment that appears after the code line). The
option also allows the user to reach a new indent level which has
not been seen so far in previous lines.
The original follows indentation user setting will be lost with this
patch, but we consider this ok for not very "significant" settings.
Change-Id: I49efb6b0309d9b7d7ff2a589413446bc16fb753c
Reviewed-on: http://codereview.qt.nokia.com/3105
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
When you close the search pane it will remove the highlight, even if the
find tool bar is open with a different search, though.
Task-number: QTCREATORBUG-2606
Change-Id: I7defe15c844d37ae80ab66c6b9e68e1ef1afdf92
Reviewed-on: http://codereview.qt.nokia.com/2786
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Provide directly TabSettings instead.
This will be used for indenting a text for which
there is no editor instance.
Change-Id: Ia5f11a481f42464cf4820efdf2c7c4c32166f55e
Reviewed-on: http://codereview.qt.nokia.com/2622
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
On Mac in debug mode, right-clicking on extra text area would first open
the markers menu, and after that the menu where you select which debug
widgets to show (like Stack or Locals and Expressions).
Opening the markers menu in a context menu event on the extra area is
both the more sensible thing to do, and works around the Mac
inconsistency.
Task-number: QTCREATORBUG-4699
Change-Id: I38efaffac80a98773deeeada3d0e3ef4f872c03b
Reviewed-on: http://codereview.qt.nokia.com/2434
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
Previously, there was a gab between the text and the sidebar which
contained the folding markers. This is disturbing for some users.
Change-Id: Ib3c90d9cb01de533d16049bc1a0f5f10f1f7847a
Task-number: QTCREATORBUG-2915
Reviewed-on: http://codereview.qt.nokia.com/355
Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
They are not really necessary. This workaround is used in quite a few
places. Also, the commit message which introduces them
(230445996816eafaa43e40341f382bf63d9d73a8) is already explanatory.
Change-Id: Idb94ab77b47008e7867b9fba21843778aeaaebb7
Reviewed-on: http://codereview.qt.nokia.com/72
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This is a re-work of our completion engine. Primary goals are:
- Allow the computation to run in a separate thread so the GUI is not locked.
- Support a model-based approach. QStrings are still needed (filtering, etc), but
internal structures are free to use more efficient representations.
- Unifiy all kinds of *assist* into a more reusable and extensible framework.
- Remove unnecessary dependencies on the text editor so we have more generic
and easily "plugable" components (still things to be resolved).
the info about the bars is now stored in the IFile, not in the
EditorView. this is somewhat more expensive for the bars which
identically apply to all editors of one type, but fixes consistency
issues between views.
additionally, it is now possible to set several simultaneous
info bars per file, which ensures that no information is lost.
Co-authored-by: mae
The right-click event that is handled by the extra text area for the
marker menu needs to be accepted, so it's not propagated further as a
context menu event.
Reviewed-by: Friedemann Kleint
ITextMark is not abstract anymore and has an icon and a priority.
This means separate breakpoint and location marker classes that
are only "plain" marks with icons and priorities are not needed.
BaseTextMark directly inherits from ITextMark, instead of owning
an ITextMark derived InternalMark.
Also, there is now ITextMark::paint() to make it a bit more flexible
then icon()[->paint()]
Change the key binding for the copy line operation
introduced at 8ae4317394
to Ctrl+Ins. We already use Shift+Del for the cut line
operation, so this would be CUA consistent.
When only one line is selected when press the TAB key, should delete
the selected contents, then perform indent.
It like other more editor behavior.
Reviewer notes: Indeed this seems to be a common behavior in other
editors (for example Visual Studio, Code Blocks, Eclipse). But in
order to preserve the indentation consistent with the multiple-line
case it would be nice an approach like Eclipse's: If the single
line is completely selected, do the indentation as usual. Otherwise
remove the selected text.
The author of the request is not able to revise this minor change
because he claims to be busy (and actually asked for the help). So
I will keep this patch in the original state and implement the
detail I mentioned above in a following commit.
Merge-request: 252
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
For example when changing options in the git blame editor, the label
would resize since it took into account the block count, which is
temporarily 0 while the blame is calculated.
Done-with: Tobias Hunger
Extend text editor tooltips by a 'widget content', making
it possible to show any widget utilizing the fact that the
QTipLabel actually is a frame (and thus a container).
Introduce concept of 'interactive' tooltips and modify
the tooltip-closing mechanism such that simple interaction
is possible. Emit the base text editor's tooltip signals
with the correct position and add API to calculate the tooltip
position from the cursor position.
Add API for pinning tooltips to the text editor (by removing
them from the QTipLabel layout).
Modify the Debugger's tooltipmanager not to manage tooltips
under TextEditor control and to take over control only once
tooltips are pinned.
Rubber-stamped-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Introduce CompletionPolicy enum, use 'TextCompletion' for the new plain
text completion, and 'SemanticCompletion' or 'QuickFixCompletion' for
the existing cases.
Reviewed-by: Erik Verbruggen
Creator got a feature that pressing cursor keys without effect did not
clear the selection. E.g. Left at position 0, or End at the end of a
block. This was not in sync with other editors. Pressing the cursor keys
without selection modifier should ALWAYS clear the selection.
Task-number: QTCREATORBUG-3327