convertPosition change was introduced in 931ec39f64.
It changed 0-based column to 1-based which is how it
naturally is in Qt Creator.
This fixed some usages but broke many more. This is an
attempt to fix the remaining use cases.
Fixes CppEditor auto-tests.
Change-Id: Ia8d14da0ebb035cd2fdd6da4ff6ec89c1c5121a8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Disallow text selection for the code model tool tips because dragging
the selection somewhere crashes.
Task-number: QTCREATORBUG-21430
Change-Id: I3aed4e16bf429162258d2dfafaa45fff25ba700a
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
QEvent dumper will now show an additional [type] field with the enum
name representing the event type (aka the value of QEvent::type()).
For example: 'QEvent::KeyPress (0x0006)'.
QKeyEvent dumper will now show a value similar to:
"Pressed 'F' (key:70 vKey:3 mods:Shift)" as the initial non-expanded
value.
A new additional field called [Qt::Key] will show the enum value
of the key pressed, for example: Qt::Key_F (0x0046)
Change-Id: Id91431d0e3d3adeb89d6b74ea341a335ff37efdc
Reviewed-by: hjk <hjk@qt.io>
The bitpos value returned by lldb is the bit offset relative to the
beginning of the type, there is no need to do an extra modulus
operation.
Adjust dumper test to add the previously failing case.
The failing case happens when the class containing the bitfield has
more members in front of the bitfield.
Change-Id: I93678f78e6799843558ec53342a0ed49cac74f48
Reviewed-by: hjk <hjk@qt.io>
And remove UI for default code style settings because
it does not affect anything when ClangFormat plugin is
enabled.
Change-Id: Ie348b7d2691b09ea2b4868da987f2a27347ea0f3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Limit the range of text which is indented to the last
non-empty character inside the block.
Fixes: QTCREATORBUG-21385
Change-Id: If9bc271e7ecf81482cb682efd0f09770e6fa02f5
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
When using the clang code model the operator '.' does no
more automatically change to '->' before applying a proposal.
Instead it points out whether a proposal requires to change
the operator when applying.
So, adapt the test and losen some condition to be able to
keep this test generic and maintainable.
Change-Id: I215fba9bfa98d5d056cd9493d7aa7192fb7a963f
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
1. Create some Qt Console Application from the wizard
2. Open Tools > Options > C++ > Code Model
2.1 Click "Manage..." and create a custom configuration "custom" and
finish with OK.
2.2 Set "custom" as diagnostic config.
3. Analyze > "Clang-Tidy and Clazy..."
3.1 Use "Custom Settings"
3.2 Click "Manage..." and remove "custom" ==> Crash
The crash happened because the code model used an invalid diagnostic
config id. The invalid id came from the settings, which were not
correctly upated.
Fixes: QTCREATORBUG-21273
Change-Id: I5242f7c92e121eec8558fa7923139bb3d759c676
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
The diagnostic id might not match any diagnostic configuration in the
settings as Qt Creator prior version 4.8 could have written it
inconsistently. We need to correct this case.
Task-number: QTCREATORBUG-21273
Change-Id: Ic9e21f70bca94da6d9afb30f0b2bfd5024d16fdd
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We don't need the directory id any more. It's not used widely any way.
Task-number: QTCREATORBUG-21443
Change-Id: Ia95ea4c72fe9530ac56262f61f17faca04d313ba
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Remove some last Qt Quick 1.0 left overs.
Task-number: QTCREATORBUG-20368
Change-Id: Ic559db21f754fcef6294e1d158e3c35b03851c38
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Highlight definitions might have a case with recursive context call.
Trivial example:
<context name="foo" fallthroughContext="bar">
<context name="bar" fallthroughContext="#pop">
This leads to infinite recursion call or infinite while loop in
Highlighter::highlightBlock. Some safety measures should
be implemented, like Kate does.
Implementation should detect recursion call and stop processing current
line. I.e. when iterateThroughRules() was already called with exactly
the same current context and progress->offset().
This patch implements recursion detection in ProgressData instance.
Task-number: QTCREATORBUG-21411
Change-Id: I4e1ba13ce40b7ba0f64ec655f8ce4b6e406ccf97
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
This patch amends 3056105c66. This patch fixes
handling of output while debugging and appending
to the "real" output if the user interacts with
the output while the test is running.
Change-Id: I1db54382f1df3e2b9a5a860002aac8fb208ee5b9
Reviewed-by: David Schulz <david.schulz@qt.io>
... and (re)create it on demand. That covers the case of a restart
of the debugger engine in which case the original switcher was
destroyed together with the toolbar of the original perspective.
Change-Id: I6180411a37aea46438809a5ff65e5526f9db2a03
Reviewed-by: Christian Stenger <christian.stenger@qt.io>