That is what it actually is, wrt how Qt API calls it.
Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The color is not configurable, but on dark backgrounds, the color is now
dark magenta, rather than magenta.
Task-number: QTCREATORBUG-9025
Change-Id: I9925e598b30a13c8b9691d6e0e576c0087df38da
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This change
* Removes IMode::type, ModeManager::activateModeType, and
IEditor::preferredModeType, and adds IEditor::isDesignModePreferred
instead
* Adapts the mode switching code in EditorManager to handle multiple
windows, for example switching to edit mode should only happen if
the editor/view is in the main window. Otherwise the editor window
should be raised and focused
* Renames EditorManager::NoActivate --> DoNotChangeCurrentEditor
* Reverts the EditorManager::ModeSwitch logic to switch mode or
make the current editor visible by default, introducing
DoNotMakeVisible flag instead
* Fixes a few instances where EditorManager::ModeSwitch should have been
used
One non-trivial problem left: If you open a .ui file and switch to an
external editor window, edit mode is activated, because the current
editor no longer is a .ui file, which means that the design mode gets
deactivated.
Change-Id: I76c5c2391eb4090143b778fb103acff3a5a1ff41
Reviewed-by: David Schulz <david.schulz@digia.com>
More sensible place, gotoLine is a method in IEditor anyhow.
Change-Id: I420a6bf17060c16e6f1a4f45e0bef89379fb6bf8
Reviewed-by: David Schulz <david.schulz@digia.com>
In addition rename int start -> startPosition and int end -> endPosition
to avoid a name clash with QTextBlock start inside
BaseTextEditorWidget::createMimeDataFromSelection().
Change-Id: I7f54e4046913b5d5d9ddd3c07fd2747b4ca6f3fb
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
It's better to initialize m_isSortingAllowed by true
in both constructors (patch to commit where
m_isSortingAllowed appears)
Change-Id: I3d04d4dcd5afdd45a7bc7e05b2de6799d3f5c82d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Introduces ITextEditorDocument. This is part of a more general "use
documents instead of editors whereever possible". It will allow to move
to e.g. ITextEditor::openedTextDocumentContents() instead of
ITextEditor::openedTextEditorsContents().
Change-Id: I5ebceaa257a0d2c3e8ac4ac51b9b08b6faa42487
Reviewed-by: David Schulz <david.schulz@digia.com>
The file encoding is shown next to the current line in the toolbar. If
the label is clicked a dialog for encoding selection is shown.
Task-number: QTCREATORBUG-8376
Change-Id: I9adee76a31929de5f698d14fe5ca5abce3cc4633
Reviewed-by: David Schulz <david.schulz@digia.com>
You can write definition of function, type Alt+Enter, as usual,
and select not only public but also other possible sections
like private, public slots and so on.
Change-Id: I2faefc3833c6f05c9e2e5a2a41328bcdbe17ba14
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
It was causing troubles while scrolling. Replace it with
\n and hack selection. Simplify the code. Now every line
is a separate block. Prepare for expanding skipped lines.
Change-Id: I8d305681c575abdaaf9cdbf26de864dd3a906d3a
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
The L of "Line ..." and the right frame of the previous combo box are
glued together without any spacing which looks not good. Added half
spacing to save space and make the label good looking.
Change-Id: Id930171be7a2f7885ab633eec8082057bc726227
Reviewed-by: David Schulz <david.schulz@digia.com>
So when doing ctrl-/cmd-click mouse navigation, this will prevent the
mouse cursor from disappearing.
Change-Id: I147332c47a8946ce69ddd719ac73b6132d5816db
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Steps to reproduce the crash:
1. Open some long file, e.g. botan.cpp
2. Trigger completion and close editor immediately
The IDocument pointer was only used to reference the file name. Instead
of passing an IDocument* to the IAssistInterface, pass the file name.
Change-Id: Iafce9b818806a77968a10541114bc9b7c8665f11
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Currently, pressing Ctrl + Shift + Up/Down with a commented block of
text selected will indent that block if the line two lines above the
block is indented. This is undesirable, because the indenting for that
block is incorrect when it is uncommented. See the following example:
Step 1:
void f()
{
int x;
// int y;
}
Step 2 - After Ctrl + Shift + Up:
void f()
{
int x;
// int y;
}
Step 3 - After uncommenting the block:
void f()
{
int x;
int y;
}
This patch tells the CPP and QmlJs editors not to indent commented
blocks when moving them. Blocks that are not entirely within comments
(excluding whitespace) are not affected.
Tested with (C++ and JavaScript, respectively):
http://paste.kde.org/688778/http://paste.kde.org/688784/
Change-Id: I35414e6dfd5a1084fd997594e711ea9932231981
Reviewed-by: David Schulz <david.schulz@digia.com>
solve problems depending on the destructor sequence:
- avoid setting code style to a destroyed code style
- avoid hiding a potentially destroyed pane
(which will be cleared in any case)
Task-number: QTCREATORBUG-8818
Change-Id: Idd7817d99bf4ff04c5e152b00857f6e35825fd37
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Cleanup code and added shortcuts and menu entries for
- open header/source in next split
- follow symbol under cursor in next split
- open declaration/definition in next split
Change-Id: I2c4347749d26669d88b7c2968f30f60710f442b1
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Removes the "Add/Remove UTF-8 BOM" entry in the context menu
of the project file editor. Also ignores the setting
"Add If Encoding Is UTF-8" under
Options -> Text Editor -> Behavior -> File Encodings.
Task-number: QTCREATORBUG-8501
Change-Id: I368966b5235ee60011f2051ebdb82f9fe09bc4cc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This changes current behavior while opening links. Link is now opened in
next split by default. If you use CTRL+Click to open links, it will also
open in next split. However, by using CTRL+ALT+click it will open in
current split.
There are two new checkboxes in Tools/Options/Text Editor/Display:
- "Open Links in New Split" - if it is checked, links will not be opened
in current split. However, if document with link is already opened, it
will be used to open the split
- "Force open links in next split" - Links will always open in next
split, even if their document is already opened somewhere else.
Task-number: QTCREATORBUG-8117
Change-Id: Ib99075b55d9e9683ed2c2386767227457de0a3fc
Reviewed-by: David Schulz <david.schulz@digia.com>
Moving it to line end scrolls right with long lines
Change-Id: I1fb0cb072a6c57b7e7e53b258567f6842b845fb0
Reviewed-by: David Schulz <david.schulz@digia.com>
#!/usr/bin/env ruby
Dir.glob('**/*.cpp') { |file|
# skip ast (excluding paste, astpath, and canv'ast'imer)
next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
s = File.read(file)
next if s.include?('qlalr')
orig = s.dup
s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
res = $&
if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
res
else
res.gsub!('} else', 'else')
res.gsub!(/\n +} *\n/m, "\n")
res.gsub(/ *{$/, '')
end
}
s.gsub!(/ *$/, '')
File.open(file, 'wb').write(s) if s != orig
}
Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
Currently, pressing Ctrl+Shift+Enter to insert a line above the current
line does not work consistently when the current line is the first in
the document. For example, if the cursor (|) is not on the first line:
1. #include <QDebug>
2.|#include <QTest>
becomes
1. #include <QDebug>
2.|
3. #include <QTest>
after Ctrl+Shift+Enter. When the cursor is on the first line, however:
1.|#include <QDebug>
2. #include <QTest>
becomes
1. #include <QDebug>
2.|
3. #include <QTest>
after Ctrl+Shift+Enter. This patch corrects the above result:
1. |
2. #include <QDebug>
3. #include <QTest>
This is also in line with Eclipse's behaviour, for example.
Change-Id: I542050b6090ed0cfdf613bf67bbd2651eb99ec9d
Reviewed-by: David Schulz <david.schulz@digia.com>
Only start dragging, when a draggable marker was clicked.
Reset drag after releasing mouse button.
Change-Id: I2dc275fc108b55d84b9ff5c69847b116c3307c41
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>