Last use was eliminated with
commit b6e12f4a1c
Convert macros from plain QByteArray to a vector of structs
Change-Id: I512524839199bc5c8b64f739636e9caebc37c7d0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Create an interface to get the ability to use
another FollowSymbol implementation
Change-Id: I5802f62523ff3ee47b8a14e487adf43edcb6c9b1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
The old code model expected the macros as C++ formatted text
("#define Foo 42) but newer targets like the Clang codemodel expect key
value arguments like "-DFoo=42". So instead of parsing the text again and
again we use an abstract data description.
Task-number: QTCREATORBUG-17915
Change-Id: I0179fd13c48a581e91ee79bba9d42d501c26f19f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
...when typing more arguments:
struct Foo {};
void f(int, int);
void f(Foo, Foo);
void f(char, char);
void c()
{
f( // 1. Trigger completion with Ctrl+Space
// 2. Chose item "f(Foo, Foo)"
// 3. Type: Foo(),
// OK, signature hint "f(Foo, Foo)" is displayed again
}
FunctionHintProposalWidget and IFunctionHintProposalModel are
instantiated for each calculation, so remember the selected hint in the
CodeAssist. Keep the latest 20 entries.
Task-number: QTCREATORBUG-11688
Change-Id: I579fc6d8a35dd8fa398e4b3170ddc05a85252d1a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
... to reuse this position in backend (instead of
searching the function start again)
Change-Id: I02818dce4fc37ed6e7ecfb533191dbfe60610204
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
We already share same classes there which has nothing to do with IPC and
I want to more for sharing. So we should use a name which fits better.
Change-Id: Idfb12b6de714206117b92634ad719c6a0e290e78
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
By using the new QTCREATOR_COPYRIGHT_YEAR variable
Task-number: QTCREATORBUG-18612
Change-Id: I3bcf0319660d210436d3130c00f43325c460a66c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Since
Clang: Provide highlighting for identifier under cursor
commit ca72c29462
the LocalUseMap, used for some refactoring actions, was not updated
anymore. Fall back to the built-in implementation for the LocalUseMap
because it contains pointers to built-in AST that clang obviously can't
provide.
Task-number: QTCREATORBUG-18607
Change-Id: I08762fe457835d4d83aca719febcb3497ee9696b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Invoke follow symbol in clang backend
if env variable QTC_CLANG_FOLLOW_SYMBOL is 1.
Does not include backend implementation.
Change-Id: Ia20a677830ebdd7f24800af5c5d6e8b1bf579205
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Limit the cases when paren is not added
after function name completion
Task-number: QTCREATORBUG-18656
Change-Id: Ibdf1e9c1d7d7b400c1c853e0bb81622e52729cfa
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This should have been adapt in
commit 33a2288c7d
Clang: Fix extra space before left paren
Change-Id: I68fe7cbbdcb9432a7dce6aede00a3190cce1cd4d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The two cases in which the UI might be blocked are:
* Invocation of the editor context menu
* Rename Symbol Under Cursor
Cancel the future if the backend is restarted and on the other side,
check whether the future is cancelled.
Change-Id: If2315da1f66f15eab1531fcd8da1dff851a9a4e6
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reducing display of unwanted line annotations while typing in small
files.
Change-Id: I51864bbc3056ad792d5ee4b96f63e954dfba79dd
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Backport the master commit (cherry-pick).
Apply clang fix to the old code model
Do not replace the text after cursor if
the proposal does not contain it or
if proposal matches 100% the text after it
Task-number: QTCREATORBUG-18471
Change-Id: I10c90580d46d2d2c899dc1ed8fe4d7df0531691a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
When navigating to headers that are not part of the project, avoid
showing the inline diagnostics. In most cases, these files can't be
changed.
This helps also for the session-load case where files are opened/parsed
when no project information is available yet.
Change-Id: I7fce24af78b3b1efbf64dd27d8ca2a053e02d4ec
Reviewed-by: David Schulz <david.schulz@qt.io>
Displaying short descriptive text of a TextMark at line end.
Currently implemented for ClangTextMark and BookMark.
Change-Id: Idc6b579bda0382ad94b2e236b715696396b10460
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
...otherwise an already destructed QTextDocument might be accessed in
the ClangCodeModel::Internal::IpcReceiver::references.
Task-number: QTCREATORBUG-18459
Change-Id: I1868b2fd3a64341794f83eea6c4eeb7c2c1af812
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Moving defaultToolTip and color from TextMarkRegistry to TextMark.
Allowing every instance of a TextMark object to define these
information.
Change-Id: Iec1794372cf902b34d343402074e3999e7f9faf7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This reduces the overhead when a new message needs to be added.
Change-Id: I5bb2833af2f06f2a8e101cfb03f75ffc2927bf68
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
The called function uses already static state.
Change-Id: I22c6cceea6c0c779c4b8ca94b74e0828e27b1f4e
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Check completed functions for preceding & and
don't add parantheses in that case
Task-number: QTCREATORBUG-17578
Change-Id: I21b1e2c9ffb9d288f3267146e9afd575e6fef30b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
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>
Let CppUseSelectionsUpdater delegate the work to
*EditorDocumentProcessor so that the clang code model can also provide
results.
Change-Id: I6872afbfeea1a5c4a64fdf19fcb1992f134dde08
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Fix templates highlight and completion on Windows
Add UI to turn on/off delayed parsing (off by default)
Task-number: QTCREATORBUG-17222
Change-Id: I0cd5e0bcfff2789cd938e4096829f777ff15957a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Handle all enum values that can be reported for clang highlighting
marks.
Change-Id: I07eec789902f36d70fa15f26cad0b151e2adff6e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
libClang categorizes these as keywords, so we need to check
if a keyword is actually a primitive type, and use that.
Task-number: QTCREATORBUG-17867
Change-Id: I354bb0422505ed7732a0799d9c86d3acfdeb0785
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Complete includes when one choice exists.
Fix complete in the middle.
Task-number: QTCREATORBUG-15710
Change-Id: Iec794c17aabc8de47f981382f4b4286b9325827d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Correct columns in clang diagnostics and completion
Task-number: QTCREATORBUG-16775
Change-Id: I7260a0e52007fe261e83492dca5d457c34476497
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Fix invalid include text selection.
Task-number: QTCREATORBUG-15471
Change-Id: Ifbe00a7215f2307648e815cb283691496d02c4d0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
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>