Commit Graph

166 Commits

Author SHA1 Message Date
Przemyslaw Gorszkowski
fbb756cdcc Fix crashes when cyclic inheritance
Task-number: QTCREATORBUG-7933

Change-Id: I98469a092ff3ff0acc69800e9aade4ebb268332a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-10-02 14:59:52 +02:00
Przemyslaw Gorszkowski
7e9913f0f5 Fix crashes when typing code
Problem was with cyclic recurrence.
To solve it we need to check if derived class is different class than its base class.
Keep completion corrected.
Include some unit tests when base class has the same name as derived.

Task-number: QTCREATORBUG-7887
Change-Id: I7973c0b06e3b62d2da3d06048f4327d18a0b8011
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-28 14:54:52 +02:00
Leandro Melo
845886852b C++: Fix endless recursion in base template lookup
When the template and base template are actually the same.

Task-number: QTCREATORBUG-7830
Change-Id: Ibf8ab5f5ee8da544ec768a078bd272500d2dc604
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2012-09-11 18:35:16 +02:00
Leandro Melo
6750a1c829 C++: Fix crash when deducing auto (with invalid ids)
Task-number: QTCREATORBUG-7801

Change-Id: I61436148ed1428a50a6840ba9109310a57dabaa4
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-09-04 15:35:01 +02:00
Leandro Melo
903c3cafe8 C++: Improve lookup - collect more valid items
There was a fix for QTCREATORBUG-7730 in the case of nested
forward declarations in commit 74a458bca0.
However, it introduced regressions and actually didn't solve
the issue, since the behavior was hidden by another error fixed later.

The patch should properly fix the issue and the regression pointed
in QTCREATORBUG-7777.

Task-number: QTCREATORBUG-7730
Task-number: QTCREATORBUG-7777
Change-Id: I27397fefdc7cc9a60111761df1f76a01407886f7
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2012-09-04 10:09:16 +02:00
Leandro Melo
2342fbb32c C++: Fix duplicate base classes in lookup
Previously we detected the duplicates by name and then processed
the missing ones, but this was not handling qualification properly.
Now we process the bases and only after lookup (making sure we
are talking about the *same* types) we add then if necessary.

Change-Id: Ic318b174d2174e24c24a4f2f1b612fbcb3f20491
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-08-28 15:19:38 +02:00
Leandro Melo
250b8e4934 C++: Fix base template argument/param matching
Change-Id: I8c6be9e023a757c43eb4b8669ca8c37239ab579d
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-27 13:18:28 +02:00
Leandro Melo
74a458bca0 C++: Improve completion when forward declarations present
This fixes one of the issues mentioned in the report below.
THe other part will come in a separate patch.

Task-number: QTCREATORBUG-7730

Change-Id: I9f56a9bcec8a881dab3ab60f40c5b71f296466da
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-08-23 14:36:01 +02:00
Leandro Melo
11f6ae4a14 C++: Completion for templates as base classes
This fixes a variety of issues regarding class completion
when templates are used as base classes. The test cases
show examples.

Task-number: QTCREATORBUG-4357
Change-Id: I764d5ce817a78e1b19336e5beab758ca9e10f34b
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-08-23 14:31:42 +02:00
hjk
6a7cf405bd rename QtDebug to QDebug
More uniform.

Change-Id: I1c6057981f4c2b3170a4e69f0674fe4caf1143a2
Reviewed-by: Robert Loehning <robert.loehning@nokia.com>
2012-08-06 14:55:08 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
Roberto Raggi
5fb624b1db Fix semantic of C++ 11 inline namespaces.
Add the declaring `inline' namespace to the `using list' of its
enclosing namespace symbol. This should be enough to ensure
the correct visibility of the symbols declarated in the inlined
namespace.

Change-Id: Id4de74577c498fe439a49709a306ef0deb145988
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-02-03 15:37:17 +01:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
Christian Kamm
2f58fb95bc C++: Fix completion for namespace aliases at global or namespace scope.
Task-number: QTCREATORBUG-166
Change-Id: Ic0fe4067caad37e51f7e253fd6678a6680350870
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-11-22 14:14:11 +01:00
Leandro Melo
cb45971778 C++: Better resolution for typedef when resolving expr.
Example:
struct Bar { int m; };
typedef Bar *pBar;
pBar b;
b-> // completes correctly now

Change-Id: I97cc67579b955fe47c68ab6c35be9a054b6d1be9
Done-by: ckamm
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-11-17 13:57:49 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
Christian Kamm
0021c4c3ee C++ insert def: Fix bug when minimizing name.
Constructors would not get the correct name before. Now rewriting the
function's name is not done by going through the 'rewrite type' func-
tionality but rather by minimizing the symbol's name directly.

Task-number: QTCREATORBUG-6223
Change-Id: I3c25e414337937f5dd0f54570c899ca2ca21d2ef
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-10-31 14:00:27 +01:00
Christian Kamm
d8c053b525 C++: Fix completion for typedefs for templates in namespaces.
Change-Id: Ib96551388c94731d97eb8f9728613b120b0b86a9
Reviewed-on: http://codereview.qt.nokia.com/3262
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-08-19 14:24:05 +02:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
con
b1bcf081d8 Merge branch '2.1'
Conflicts:
	src/plugins/coreplugin/basemode.cpp
	src/plugins/coreplugin/basemode.h
	src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp
	src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h
	src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp
	src/plugins/debugger/debuggeragents.cpp
	src/plugins/debugger/debuggeruiswitcher.cpp
	src/plugins/debugger/debuggeruiswitcher.h
	src/plugins/projectexplorer/buildconfigdialog.cpp
	src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp
	src/plugins/qmldesigner/components/propertyeditor/colorwidget.h
	src/plugins/qmldesigner/designercore/include/enumeratormetainfo.h
	src/plugins/qmldesigner/designercore/include/modelutilities.h
	src/plugins/qmldesigner/designercore/include/nodeinstance.h
	src/plugins/qmldesigner/designercore/include/propertymetainfo.h
	src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.h
	src/plugins/qmldesigner/designercore/instances/graphicsviewnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.h
	src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/qmlviewnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.h
	src/plugins/qmldesigner/designercore/metainfo/enumeratormetainfo.cpp
	src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp
	src/plugins/qmldesigner/designercore/model/modelutilities.cpp
	src/plugins/snippets/inputwidget.cpp
	src/plugins/snippets/snippetscompletion.cpp
	src/plugins/snippets/snippetscompletion.h
	src/plugins/snippets/snippetspec.cpp
	src/plugins/snippets/snippetsplugin.cpp
	src/plugins/snippets/snippetswindow.cpp
	src/plugins/snippets/snippetswindow.h
	src/plugins/texteditor/snippetsparser.cpp
	src/tools/qml/qmldom/main.cpp
	tests/manual/trk/runner.cpp
	tests/manual/trk/trkolddevice.cpp
	tests/manual/trk/trkolddevice.h
	tests/manual/trk/trkserver.cpp
2010-12-17 17:00:53 +01:00
con
04e32b0049 License headers. 2010-12-17 16:03:42 +01:00
Roberto Raggi
f7f3539786 Skip using namespace directives when searching for declarations. 2010-12-03 11:26:31 +01:00
Roberto Raggi
189311816c Resolve local using namespace directives.
Reviewed-by: Erik Verbruggen
2010-10-05 14:22:05 +02:00
Roberto Raggi
c12866a467 Merge CPlusPlus::NameId and CPlusPlus::Identifier. 2010-09-02 12:51:01 +02:00
Roberto Raggi
05f2fd6669 Renamed Symbol::scope() to Symbol::enclosingScope(). 2010-08-26 16:16:22 +02:00
Roberto Raggi
b2baaee4b6 Search for symbols in the template prototype. 2010-08-12 12:34:23 +02:00
Roberto Raggi
2ebaf3fe5b Get rid of the #warning directives. 2010-08-11 15:48:40 +02:00
Roberto Raggi
a14016bfe6 Process the template symbol. 2010-08-11 15:25:19 +02:00
Roberto Raggi
41b4af0501 Get rid of the prefix findOrInsert for the functions in CPlusPlus::Control. 2010-08-11 15:25:19 +02:00
Roberto Raggi
6618a3cd67 Removed TemplateParameters. 2010-08-11 15:25:19 +02:00
Roberto Raggi
354b9712e4 Merged ScopedSymbol and Scope. 2010-08-11 15:25:18 +02:00
Roberto Raggi
4ff3ee2ff0 Use Prototype instead of Function. 2010-08-05 17:53:14 +02:00
Roberto Raggi
9aa991d636 Refactored CPlusPlus::Function. 2010-08-05 17:53:14 +02:00
Roberto Raggi
6905b6a5af Get rid of the member ClassOrNamespace::_instantiations. 2010-08-04 13:07:59 +02:00
Erik Verbruggen
3bc473c0c2 Temporary fix to get at least some name back. 2010-07-27 15:58:27 +02:00
Roberto Raggi
50875ff0da Fixed LookupContext::fullyQualifiedName()
Now the method can be used to get the fully qualified name of
destructors, operator-ids and conversion-function-ids.
2010-07-21 12:50:24 +02:00
Erik Verbruggen
5e68a31d0b Fixed fully-qualified-name for destructors. 2010-07-21 10:40:18 +02:00
Roberto Raggi
c4ede7263d Get rid of the those ugly warnings. 2010-07-19 15:10:06 +02:00
Erik Verbruggen
f7a8c5f05d Fixed lookup to skip over friend declarations. 2010-07-16 16:04:58 +02:00
Roberto Raggi
fff4203a46 Introduced helpers to rewrite types and names.
Done-with: Erik Verbruggen
2010-07-16 11:04:52 +02:00
Roberto Raggi
06c7cb9b88 Disable Create declaration from definition quickfix. 2010-07-12 15:10:00 +02:00
Roberto Raggi
adfdb51660 Recursive definition of CPlusPlus::QualifiedNameId.
Done-with: Erik Verbruggen
2010-07-12 15:10:00 +02:00
Erik Verbruggen
9135c8ccb1 Quickfix for adding a declaration to a class from a definition. 2010-07-12 09:53:58 +02:00
Roberto Raggi
5751f4f1c5 Reenabled the old `deprecated' template instantiation.
I hate this commit, but unfortunately, I don't have time right now
to finish the new template instantion algorithm so I have to
enable the old way of doing instantiations.
2010-07-09 10:17:28 +02:00
Christian Kamm
e1a0f5abef C++: Make 'follow symbol' work with forward declared classes.
If it encounters a forward declaration, it tries to find the class
declaration globally now.

Task-number: QTCREATORBUG-20
2010-06-16 15:37:39 +02:00
Roberto Raggi
cceaffca5b Keep the Control around for as long needed. 2010-06-04 17:58:29 +02:00
Roberto Raggi
ed501b9bc3 Look at the injected class name. 2010-06-01 14:00:02 +02:00