Commit Graph

14 Commits

Author SHA1 Message Date
Marco Bubke
56b01f7463 Clang: Minimize reindexing
We optimal indexer is only reindexing if the index would be changed. This
patch is a step in that direction. We only reindex now if the file or
project has changed. It fixes some typos too.

Task-number: QTCREATORBUG-21150
Change-Id: I6ea1c13282fbcd70253b9b2939aed37580dbd160
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-04-02 13:08:44 +00:00
Nikolai Kosjar
9e17bd1bf0 Clang: Avoid multi-line display name for completion items
These come directly from clang. If converting for display in the
completion list widget, skip new line chunks.

Fixes: QTCREATORBUG-21600
Change-Id: I83749ed73fa68658ec073d97177768f59a87cebf
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-12-07 13:43:09 +00:00
hjk
cf4dbb4bb6 ClangSupport: Use simpler structures in some cases
The patch is mostly mechanical, but contains also a few spurious changes
from values references for some local variables, foreach -> ranged for
etc that I coulnd't resist.

Change-Id: I58f0bd972546895eb318607cbfbd7ac35caf3f23
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-06 12:55:23 +00:00
Ivan Donchevskii
33a2288c7d Clang: Fix extra space before left paren
Do not add space before left paren in function
because it must not be there

Task-number: QTCREATORBUG-14878
Change-Id: I0fd0e650aeeee59af7bbc157c2fae652109763bc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-14 13:06:47 +00:00
Nikolai Kosjar
64ec695566 Clang: Show function signature hint for constructors and functors
For "foo(|" [1] we requested a completion from libclang with the cursor
position just before "foo" and then filtered the function declarations
for functions matching the name "foo". This worked fine for ordinary
functions, but obviously not for constructors and functors.

Recent versions of libclang support proper function call completion with
XCursor_OverloadCandidate, so make use of that.

[1] '|' represents the cursor position

Task-number: QTCREATORBUG-14882
Task-number: QTCREATORBUG-14884
Change-Id: I9d31b3960ccff6a8b9440dbcb7ff9f5ca9f61266
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-11 11:54:09 +00:00
David Schulz
525317d5a4 Clang: Fix compile warnings
Change-Id: Ie8f3f2a8c08855b555d59dbf4ac6ac8b18fe70f6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-24 12:55:02 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Friedemann Kleint
f8d4e4954b Fix const-ness of ClangCodeModel::Internal::CompletionChunksToTextConverter::inDesiredTextFormat(().
Change-Id: I622b65d7d8fd90d67863282fe85b867acf16b899
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-19 14:55:33 +00:00
Nikolai Kosjar
2324db9d41 Clang: Fix html code in completion list item
E.g. "dynamic_cast&lt&gt;()" showed up as item.

Let CompletionChunksToTextConverter default to plain text format and
explicitly request HTML where needed.

Change-Id: Iebce85cb888a5bd697ffdce364118b6dc65a435d
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-01-19 13:37:06 +00:00
Nikolai Kosjar
a071e52b94 Clang: Extract duplicate code
Change-Id: I476916f825ab475f77f918127217dfc33eb4f388
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-01-19 13:27:55 +00:00
Nikolai Kosjar
c0e1b1581b Clang: Fix displaying template parameters II
...in the function call completion tooltip.

Task-number: QTCREATORBUG-15286
Change-Id: Ie24576f98ee4ba8f954de394f3596093323a2c35
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-12-16 15:38:36 +00:00
Nikolai Kosjar
4382274ba4 Clang: Fix emphasizing current parameter in function signature tooltip
...when completing function calls.

Task-number: QTCREATORBUG-15108
Change-Id: If55effe117774f3ec5debb03a9c7889981ea27d2
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-12-16 15:36:47 +00:00
Marco Bubke
8d6c10b241 Clang: Flatten code completion chunks
Avoid the sub vector for performance reason and use an flag for every
optional argument because there can be no recursion.

Change-Id: Iae1eaa1f164e4129e30358a1719582e5231f0385
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-12-16 12:16:08 +00:00
Nikolai Kosjar
1410bf3faf Clang: Use "clang" prefix plugin files
...for consistency and to avoid future file name clashes.

Change-Id: If595c8debfa1ceb01a1bb0ed34649fa513660503
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-11-30 11:04:07 +00:00