Commit Graph

16 Commits

Author SHA1 Message Date
Nikolai Kosjar
0a4073ef90 TextEditor: Return hover handler priority by callback
...to get rid of the asynchronous code path.

Change-Id: I56377510440631b0be712333b2a4018717c86389
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-01-19 13:57:57 +00:00
Nikolai Kosjar
76c25bcd6a Clang: Provide tooltips
This includes also the query data for the help system (F1) for an
identifier under cursor.

Regressions (libclang changes necessary):
 - Function signatures do not contain default values.
 - Aliases are not resolved for/at:
   - template types
   - qualified name of a type

Fixes/Improvements:
 - Resolve "auto"
 - On a template type, show also the template parameter.
 - For a typedef like
     typedef long long superlong;
   the tooltip was "long long superlong", which was confusing.
   Now, "long long" is shown.

New:
 - Show first or \brief paragraph of a documentation comment.
 - Show size of a class at definition.
 - Show size of a field member in class definition.

Task-number: QTCREATORBUG-11259
Change-Id: Ie1a07930d0e882015d07dc43e35bb81a685cdeb8
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-01-16 15:32:15 +00:00
Nikolai Kosjar
d7409e01a7 CppTools: Fix showing main help sentence in tooltip
Mouse hover on e.g. "QString" is supposed to show

   QString
   The QString class provides...

The sentence was removed unintentionally by

  commit a7e8406ced
  TextEditor: Remove unneeded functions in BaseHoverHandler

Change-Id: I356e66c0c21c528822c0f2e37f8058fa7b7d89bf
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-01-16 08:31:19 +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
Thorbjørn Lindeijer
1efe71992b Moved the CppHoverHandler to the CppEditor plugin
It used to be in CppTools, but since the hover handler only makes sense
in the context of the C++ editor, this is a better place.
2008-12-16 12:27:13 +01:00
mae
364a869e38 check for !doc 2008-12-12 12:08:02 +01:00
Roberto Raggi
bab60d14b3 Introduced CPlusPlus::Snapshot, it contains a snap shot of the indexer's current state.
This change removes a number of wrong usages of the CppModelManager::documents()/document().
2008-12-12 10:07:58 +01:00
Roberto Raggi
d454607264 Implemented tooltip and lookat for #include directives. 2008-12-10 17:21:28 +01:00
Thorbjørn Lindeijer
037a9bb579 Set the help id for macros to their name
Enables F1 for opening their help pages. Seems to work nicely.
2008-12-10 12:09:17 +01:00
Thorbjørn Lindeijer
a6c6b2c4ae Fixed macro tooltip overriding type information
The macro tooltip is supposed to be a fallback, since otherwise you
won't be able to see type information for macro parameters.

Reviewed-by: Roberto Raggi
2008-12-10 12:09:17 +01:00
Roberto Raggi
20e36cc364 tooltip for macro definitions. 2008-12-09 15:24:26 +01:00
Patrick Star
c37f4d05d8 Fixes: - missing F1 in tooltip on first IDE start 2008-12-04 13:44:15 +01:00
hjk
df7aacd637 more file cosmetics 2008-12-02 15:08:31 +01:00
hjk
ab83dcd87c off-by-one in headers 2008-12-02 14:20:25 +01:00
hjk
8a43d9b9f3 end-of-line whitespace correction of the new headers 2008-12-02 14:17:16 +01:00
con
05c35356ab Initial import 2008-12-02 12:01:29 +01:00