Commit Graph

11 Commits

Author SHA1 Message Date
Nikolai Kosjar
5643a45a83 Clang: Fallback to global completion if function call completion fails
We can not offer proper constructor completion with libclang <= 3.6, so
fall back to normal/global completion.

Change-Id: I90bb8d981ae20ed4c228f829ad4267221b92f8a1
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-23 11:18:55 +00:00
Nikolai Kosjar
889237f962 Clang: Mini refactorings in ClangCompletionAssistProcessor
The renames will improve the readability of the follo-up change.

Change-Id: If1f5ae2a2798c13ce7268e436dae1b3963f01d5e
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-23 11:18:50 +00:00
Marco Bubke
c267a34b09 Clang: Use the CodeCompletion getter directly
Casting from a Qvariant is expensive and it happens here very often.

Change-Id: If524412f314bb8ac9e9e5e4335c7e32ff7a9ce40
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-20 14:50:24 +00:00
Nikolai Kosjar
91ee695c71 Clang: Extract a function
Change-Id: I3041e019c2c65d9d988d31c47823e29955cd1c51
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-20 13:19:58 +00:00
Marco Bubke
7b8f5d9815 Clang: Improve conversion of QHash to QList
Change-Id: I5bea89d9a432240a131311b5fed537a46b3be967
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-20 13:19:38 +00:00
Nikolai Kosjar
7e7e79dedc Clang: Send modified file content only once
This introduces some

  SOFT ASSERT: "!"Got TranslationUnitDoesNotExistCommand"" in file
    clangbackendipcintegration.cpp, line 154

e.g. for include path completion. This will be addressed by a follow-up
change.

Change-Id: I97a50f5b8a44744e1379d77fc042d5e65cb191c9
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-20 12:55:22 +00:00
Nikolai Kosjar
420bc69739 CppTools: Use project part ids instead of file paths
File paths are not unique since e.g. each qbs group in a file is mapped
to a project part.

Change-Id: I7df3f224dd23046b869f2588b8a34eb26cfc0b1a
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-20 09:49:14 +00:00
Marco Bubke
336501943e Clang: Add tooltip for clang snippets
Change-Id: Ifccfd72c52910c6e1086d6c782552c60fbb89f5f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-16 12:54:48 +00:00
Marco Bubke
945c0fbc71 Clang: Add code completion for keyword snippets from clang
Change-Id: I91f7af74d811769424928bce1c586a30b5794d6f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-14 16:24:30 +00:00
Marco Bubke
dd89d731cf Clang: Extract and test action sequence
Change-Id: I66f8f29d7b17be67a55560bdcc0b0a3aeb1ce480
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-08 12:29:20 +00:00
Marco Bubke
ed27414f48 Clang: Split clangcompletion.[h|cpp]
First step for refactor them.

Change-Id: If9de084e39ddf31317035ccbbc1fd57d7797d193
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-07-06 12:41:01 +00:00