Commit Graph

36 Commits

Author SHA1 Message Date
Thorbjørn Lindeijer
d94dd392cb Reuse the function argument widget when possible
Now that we're showing this thing instantly, we can no longer rely on
the thing hiding cause of a focus change.

(cherry picked from commit 5a0a084c31)

Conflicts:

	src/plugins/cpptools/cppcodecompletion.cpp
2009-02-16 18:34:56 +01:00
Thorbjørn Lindeijer
100a6254f6 More intelligent function argument widget
Now it shows immediately when there is only a single signature of a
given method/constructor.

(cherry picked from commit 8b9dd766c8)

Conflicts:

	src/plugins/cpptools/cppcodecompletion.cpp
2009-02-16 15:15:43 +01:00
Thorbjørn Lindeijer
9aa86f9135 Completion for constructors used on initialization
Deals with cases like "QString s(", but for the moment doesn't handle
yet "QString const s(".

Done with Roberto Raggi.

(cherry picked from commit fca3ec1f32)
2009-02-16 15:08:38 +01:00
Thorbjørn Lindeijer
e539a9375b Avoid inserting characters that are already there
When completing, don't insert "();" characters when they're already
there. Skip them instead.

(cherry picked from commit 86427ecf62)

Conflicts:

	src/plugins/cpptools/cppcodecompletion.cpp
2009-02-16 14:54:41 +01:00
Thorbjørn Lindeijer
7c71b1bf38 Fixed crash on updating function argument widget
Crashed for example in the case of template instantiation. To make sure
the Function* stays valid, we need to not only keep around the Snapshot
but the whole LookupContext.

Done with Roberto Raggi.
2009-02-16 11:20:11 +01:00
Roberto Raggi
180233e7af Fixes: Do not activate member completion when class names are used as base of a DOT or ARROW expression. 2009-02-04 10:57:32 +01:00
Roberto Raggi
f1a40d304b Fixes: Member completion when the symbol's type is ClassTy.
For example,

struct {
  int a, b
} foo;

int main() {
  foo.  <-
}
2009-02-03 12:50:53 +01:00
Thorbjørn Lindeijer
63a5f15f9d Don't replace . with -> in case of primitive types
Reviewed-by: Roberto Raggi
2009-02-03 11:53:54 +01:00
hjk
1969b2ebc0 Fixes: some less caching of the ICore singleton pointer 2009-01-28 13:56:10 +01:00
Thorbjørn Lindeijer
8c59160792 Fix SIGNAL/SLOT completion with spaces after opening brace
Spaces after the opening brace would cause SIGNAL/SLOT completion to be
disabled along with function completion. Now function completion is
checked at a later stage.
2009-01-26 15:55:57 +01:00
Roberto Raggi
df56b1069d Don't add the objc++ keywords to the completion box. 2009-01-14 12:35:55 +01:00
Daniel Molkentin
59affcfffc Bump year in licence header. 2009-01-13 19:22:14 +01:00
Friedemann Kleint
71ef39629c Windows compile warning 2009-01-13 17:55:02 +01:00
Thorbjørn Lindeijer
34cc807b36 Fixed crash in function argument widget
It didn't make sure its Function* stayed valid. Now it does, by keeping
a copy of the list of CppDocuments (the snapshot) around.
2009-01-13 13:18:26 +01:00
Thorbjørn Lindeijer
171a3bb8d2 Fixed compilation problem with gcc 3.3
Reviewed-by: Roberto Raggi
2009-01-08 15:09:21 +01:00
Roberto Raggi
85babacb5a Replace a. with a[0]. when `a' has type array of T. 2009-01-05 15:25:44 +01:00
Roberto Raggi
f0ac751f4a Completion for typedef of pointer to struct. 2008-12-31 10:57:27 +01:00
Roberto Raggi
c7b023c0e1 Renamed SymbolsForDotAccess to ResolveClass. 2008-12-30 12:03:49 +01:00
Roberto Raggi
12ee869eda Simple typedef support for T_ARROW member access. 2008-12-30 11:45:41 +01:00
Roberto Raggi
f6f0c81021 Improved CppCodeCompletion::completeScope(). Added simple support for typedefs. 2008-12-30 11:35:30 +01:00
Roberto Raggi
a985b59d40 Initial support for typedefs. 2008-12-29 11:53:40 +01:00
Roberto Raggi
e325aa38d9 Nicer implementation of CPlusPlus::Macro. 2008-12-22 13:55:42 +01:00
dt
3ba192af7e Merge branch '0.9.1-beta' 2008-12-17 14:21:03 +01:00
hjk
da3cb14483 chancge Nokia GPL exception version from 1.2 to 1.3 2008-12-16 17:20:00 +01:00
Thorbjørn Lindeijer
9cf4074504 Added option to disable completion of common prefix
Some people don't like this.
2008-12-16 16:58:29 +01:00
Thorbjørn Lindeijer
78f1fca9aa Added configuration options for code completion
It is now possible to choose between case-sensitive or case-insensitive
completion. Also, you can now disable the automatic insertion of braces.
2008-12-15 11:42:43 +01:00
Roberto Raggi
0145a3dea9 Look at the signed/unsigned specifiers when checking function return types. 2008-12-12 10:40:25 +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
4679f38a87 Fixed code completion when using macros in the expression's code (e.g. in qApp->). 2008-12-11 11:28:29 +01:00
hjk
4a552ead9f use QTC_ASSERT instead of Q_ASSERT 2008-12-09 15:25:01 +01:00
Thorbjørn Lindeijer
bf7486c011 Don't keep around references to old documents
The code completion was keeping around references to old documents after
the completion finished. This caused documents to stay in memory when
unloading projects, up until the next time you used the completion.
2008-12-08 13:05:44 +01:00
Roberto Raggi
310d50fd07 Use Macros. 2008-12-08 12:59:57 +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