Commit Graph

9 Commits

Author SHA1 Message Date
Jarek Kobus
0e7774e75d Refactor CppElementEvaluator
Separate the use of CppElementEvaluator for CppHoverHandler from
the use for CppTypeHierarchyWidget. They are in fact much
different things.

Fix CppHoverHandler (enabled when ClangCodeModel plugin is disabled)
showing tooltips for symbols other than class or template.
Fix CppHoverHandler showing full template arguments for typedefs.

Change-Id: I5c44016014749d0d958b91a9a1ee9b35d3ea5eaa
Reviewed-by: hjk <hjk@qt.io>
2021-01-13 07:13:27 +00:00
Jarek Kobus
72f850df3a Open type hierarchy from Type Hierarchy editor
Make it possible to open type hierarchy for different
class selected from Type Hierarchy editor.
Make it available under context menu or on double click
on class name (single click opens the class in cpp editor window
as before). Double click doesn't expand / collapse items anymore
(expanding available when pressing the visual arrow).
Make navigation to editor more up to date - e.g. when linked location
changed in meantime (source file was edited), it tries to find
linked symbol quickly again (we introduce a small delay, up to
100-200 ms, depending on source file).

Change-Id: Ifb4fd58e853589a17cd14be465b3a7695fa48193
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-01-04 13:58:47 +00:00
Jarek Kobus
c400923308 Modernize Type Hierarchy
Don't freeze UI on request for show Type Hierarchy.
Move the lookup code into a separate thread.
Don't clear tree hierarchy when waiting for new one.
Show progress indicator on top of old hierarchy instead.
Add a task to ProgressManager when working on a new hierarchy.
Handle canceling the process of showing Type Hierarchy.
Implement simple progress reporting for this process.
Optimize a bit DerivedHierarchyVisitor.

Change-Id: I3894ac6ed3f4834831831f083f718f8385ca346f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-12-07 14:04:50 +00:00
hjk
7ab6783e24 Standardize on int for line and column values
Recently tons of warnings show up for presumably "problematic"
singned <-> unsigned and size conversions.

The Qt side uses 'int', and that's the biggest 'integration surface'
for us, so instead of establishing some internal boundary between
signed and unsigned areas, push that boundary out of creator core code,
and use 'int' everywhere.

Because it reduces friction further, also do it in libcplusplus.

Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-07-26 09:23:48 +00:00
Eike Ziller
dabeb0aa1e Move Help item from text editor to core
The functionality is not text editor specific.

Change-Id: Iee531572f14673e75129f4bfbb64a1437899d31e
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-25 09:46:21 +00:00
Alessandro Portale
1d3d18a969 CppTools: modernize
Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-21 09:00:18 +00:00
Eike Ziller
711ac6602f Fix C++ type hierarchy
Dynamic casts between library boundaries tend to fail. Add an "explicit
cast" to CppClass via virtual functions as a quickfix.
This is a recurring issue, e.g. d2769f3003, 3f11ef9216 and
2ffd0e2d0d to name just a few...

This was introduced in 5e861d2be6

Task-number: QTCREATORBUG-20001
Change-Id: Ie5a89a028d587e4e9d1ecec920a7c7d17497dbde
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-09 08:21:07 +00:00
Nikolai Kosjar
3ea921c216 CppTools: Move some decls from header to source
...as there is no client using them.

Change-Id: I2fbbe247e6f4bad537644a9574ddcc0606bfa13e
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 14:25:33 +00:00
Nikolai Kosjar
5e861d2be6 CppTools: Move CppHoverHandler to CppTools
This is in preparation for clang code model to provide its own hover
handler.

Change-Id: Ifbdd96f427989bd5d1fbc4badb9c38108485c2f2
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-16 08:31:11 +00:00