Commit Graph

992 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
30b5534667 Fix "Apply function signature change" for boost::shared_ptr
Problem was with nested template type(in this case shared_ptr<T> is nested template type)
Task-number: QTCREATORBUG-6784

Change-Id: I8ea9203f2b1fbde73d9ac4e6c8cdeb2b6e0afcef
Reviewed-by: David Schulz <david.schulz@digia.com>
2012-10-02 07:47:02 +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
Eike Ziller
a55d47544a Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.qbp
	src/plugins/qtsupport/baseqtversion.cpp
	src/tools/tools.pro

Change-Id: I43c391328ae747b3dc566f9db2384fedc1a6d0a5
2012-09-26 10:01:04 +02:00
Orgad Shaneh
9ef97873d8 CPlusPlus: Avoid reversing results for call lookup
Task-number: QTCREATORBUG-5876

Change-Id: Ia94f4aa67af2b79862acd7869a3952f6a44932cb
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-24 11:05:03 +02:00
Christian Kandeler
938612c35e Do not use QAbstractItemModel::reset().
Change-Id: Ie49bdf576a6d3543aef6df133b27c8827775c935
Rationale:
    a) It is conceptually cleaner to do the changes to the model
       in between calls to beginResetModel() and endResetModel,
       respectively.
    b) The function is deprecated in Qt 5, for exactly that reason.
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-20 11:11:45 +02:00
Eike Ziller
b947861c59 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.qbp
	src/libs/QtcLibrary.qbs
	src/plugins/QtcPlugin.qbs
	src/tools/QtcTool.qbs

Change-Id: I3acea26888febe8f96d2131932266ed88b9f55f5
2012-09-19 18:02:46 +02:00
Christian Kamm
aa645254a2 C++11: More (expression-list) or brace-init-list.
This time in the 'new' expression. Changed it to make
new C(1, abc...) and new C{1, abc}
work.

Change-Id: I7232798fd083b653ee04ef9ede386d6536133e16
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 12:23:18 +02:00
Christian Kamm
83da5f68be C++11: Allow for typename Foo<T>{}, Foo{} and int{}.
As a postfix expression.

Change-Id: I65cae0571080a9fb699af61c661328ef06f97890
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 12:21:31 +02:00
Christian Kamm
9bd86e7d68 C++11: Allow brace-init-list in range-for statement.
Also drop the unused 'initializer' member from
RangeBasedForStatementAST.

Change-Id: I078ebbc85cafa643af4bfe62d698bf7de71360e4
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 11:54:50 +02:00
Christian Kamm
b9f6f1bcf7 C++11: Allow uniform initialization in ctor init lists.
So
class C { C() : _x{12}, _y({12}) {} };
now parses correctly.

Change-Id: I4281dcb0541a86b550e74630cad6ae0a59fef1b4
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 11:47:49 +02:00
Nikolai Kosjar
2f88a46e4e C++: Fix memory leak in preprocessor.
This addresses the main memory leak revealed in QTCREATORBUG-7645.
The other leaks seem to have their origin in Qt.

Task-Number: QTCREATORBUG-7645.
Change-Id: I77f45449416c143b222ed5f5c905cba9674f95bb
Reviewed-by: Christian Kamm <kamm@incasoftware.de>
2012-09-19 11:10:00 +02:00
Christian Kandeler
6d17da175f Fix qbs build for Qt 5.
Make sure newly deprecated stuff is still available.

Change-Id: I9ebdfcd9a5ecee125a3c73f5f3254ae319d8b282
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-17 17:29:16 +02:00
Christian Kamm
23a11e2ddb C++: Rename NewPlacementAST to ExpressionListParenAST.
It'll be reused as the initializer expression for declarators
that are followed by "( expression-list )".

Change-Id: I6c76a76641941874ef1ed21daa7b6e057c6d170f
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-17 14:53:20 +02:00
Oswald Buddenhagen
e730e2bb8a Merge remote-tracking branch 'gerrit/2.6'
Conflicts:
	src/libs/utils/environment.cpp
	src/plugins/android/androidtoolchain.cpp
	src/plugins/projectexplorer/gcctoolchain.cpp
	src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
	src/plugins/qtsupport/baseqtversion.cpp
	src/shared/proparser/qmakeevaluator.cpp

Change-Id: I554e96445a4d2b9ba0cc173ecd766091ee921aa2
2012-09-12 17:27:37 +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
cd6b440a18 C++: Fine tune behavior of "expand macros" flag
Even if "expand funcion-like macros" is unset we still
perform the expansion in the case it's already doing
so - when it originally started from an object-like macro.

Task-number: QTCREATORBUG-7712
Change-Id: Ie2a24de227f757d195146477d48246472082d28a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-11 17:05:10 +02:00
Eike Ziller
5ac721dd58 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.pri
	qtcreator.qbp
	src/libs/utils/utils.pro

Change-Id: I6f0aba746f915d8c51dcf9372f7d9f593562fc2b
2012-09-11 14:02:03 +02:00
Leandro Melo
d1b65bbf83 C++: Discard comments in macro definitions
Task-number: QTCREATORBUG-7815

Change-Id: Id3e6b018bfd58b0f0072c637d69721a4bde1603a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-09-05 16:35:33 +02:00
Leandro Melo
c5097ed183 C++: Fix crash in auto deducing mechanism
There was an inconsistency, since the AST used in ResolveExpression
was not really the same previously computed. In the particular issue
below a crash could occur, for example, when using auto in a for
range loop.

Task-number: QTCREATORBUG-7828
Change-Id: I02958f434c3cf3b50609546003fc141674ee78d5
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-09-05 14:34:59 +02:00
Eike Ziller
887456e38a Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemoglobal.cpp
	src/plugins/madde/maemoinstalltosysrootstep.cpp
	src/plugins/madde/maemopublisherfremantlefree.cpp
	src/plugins/madde/qt4maemodeployconfiguration.cpp
	src/plugins/qt4projectmanager/librarydetailscontroller.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
	src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
	src/plugins/qt4projectmanager/qt4project.cpp
	src/plugins/qtsupport/baseqtversion.cpp
	src/plugins/remotelinux/abstractremotelinuxdeployservice.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp
	src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
	src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp

Change-Id: I2560b528596f284e7b45a2260d8d3037891c5d17
2012-09-04 18:04: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
Christian Kamm
c4b9cff324 C++: Fix dumpers when symbol has no identifier.
Change-Id: I0e094f7c9f718d228f8a3ec9295fcedd930151c2
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2012-09-04 07:49:38 +02:00
Leandro Melo
d87835cc90 C++: Always skip unknown preprocessor "directives"
Task-number: QTCREATORBUG-7780

Change-Id: Ie93704feff17ad8229e50fb1133048f2c7598dea
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-29 16:07:40 +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
hjk
5ff302d87d C++: Escape strings before using them in CppRewriter regexps
Change-Id: Ia2aaf91c71e8406944085c5137b67317331cc898
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-24 13:37:32 +02:00
hjk
a110c98d08 C++: Use soft asserts in CppRewriter
While a "real" C++ type rarely contains parantheses or other
characters that are "special" for a regexp, gdb happily
sprinkles in things like "(anonymous namespace)::".

Killing Creator while trying to beautify such a name
is inaccpetable.

This should be followed up by patches handling the known
problematic cases properly.

Change-Id: I8cc8509f1d7df0a8780876cdba556e1cf7ec4a95
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-24 08:55:57 +02:00
Eike Ziller
bc67246432 Merge remote-tracking branch 'origin/2.6' 2012-08-23 15:52:15 +02:00
Leandro Melo
009d6b1e2f C++: Handle C++ style comments in macro expansion
Notice that a similar problem still exists for which we
need to fix the lexer when there's a C style commend which
 ends with a backslash-newline.

Task-number: QTCREATORBUG-7713

Change-Id: I0f6d561703984f917fa5ed29de020ad0bdc5aaf0
Reviewed-by: David Schulz <david.schulz@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-23 15:00:53 +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
b53d562816 C++: Take multiline strings into account when preprocessing
It was creating extra line(s)...

Change-Id: If28a9ccf16195c71747479db838a5589ea6683a0
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-08-23 14:35:53 +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
c685abebaf typeprettyprinter: fix handling of _ at start of identifiers
This broke e.g. 'AddDefinition' for 'int foo(int const * const _x)'.
resulting in 'foo(const int *const_x)'

Change-Id: I6aae6c4a47e127de109b5fbefdf202ca050a391f
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-08-23 10:56:33 +02:00
Tobias Hunger
8da8d21c18 Remove some unused member variables
Change-Id: I4b1bcfe8da32bd48c601d1efdb7c3aac1d39cbce
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-08-22 16:18:54 +02:00
Kai Koehne
5064933944 Avoid adding the same DEFINE multiple times to the command line
E.g. on MSVC, QT_CREATOR was passed 14 times ...

Change-Id: Ife39267b0d6f2def1706b823abfd0226325437ae
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-08-21 11:57:22 +02:00
Francois Ferrand
9c7b96c663 Fix display of templates in outline.
Change-Id: I8b099c8234fac55ef0de17b014c89fbe02534bf4
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-08-21 08:58:52 +02:00
Eike Ziller
b3e465c9d4 Merge remote-tracking branch 'origin/2.6' 2012-08-17 09:09:00 +02:00
hjk
e481b1ad27 libs/cplusplus: remove unneeded #includes
Change-Id: Iadd8ace8a3870a9b0046dc65bf00d7e702e15b97
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-15 13:30:23 +02:00
Eike Ziller
a54f9f1c54 Merge remote-tracking branch 'origin/2.6' 2012-08-15 12:11:26 +02:00
Leandro Melo
a1b6a4749e C++: Fix finding of destructor in outlined definitions
Task-number: QTCREATORBUG-7323

Change-Id: I92a42a30d156de2d8006f1df8da86d808a1a518d
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2012-08-08 16:01:57 +02:00
Eike Ziller
aa411b7cc8 Merge remote-tracking branch 'origin/2.6' 2012-08-07 16:11:22 +02:00
Christian Kamm
41e140da04 C++: Fix line number information after multiline comments.
Task-number: QTCREATORBUG-7702
Change-Id: I0ec2e1eb9bf1c556b0a426d4405df1c48b5653ed
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-08-07 11:31:06 +02:00
Christian Kamm
605acda9ae C++: Expand object-like macros in fast preprocessing mode again.
Task-number: QTCREATORBUG-7512
Change-Id: I59898a0449f1f6997963e0f31c47293358a773f6
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-08-07 07:35:34 +02:00
Eike Ziller
efefa2eb17 Merge remote-tracking branch 'origin/2.6' 2012-08-06 16:19:35 +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
Sergey Shambir
95c5ab2746 Added support for override/final and enum classes
Change-Id: I6dfe9dd606781046ff5a1ed61315741d2f332cb8
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2012-07-30 09:42:30 +02:00
Eike Ziller
42f4595e37 Merge remote-tracking branch 'origin/2.5'
Conflicts:
	src/libs/cplusplus/cplusplus-lib.pri

Change-Id: I430ec8c6dda4afad3aedb1bc47d3af64537cfe66
2012-07-24 14:17:33 +02:00
Christian Kamm
23777da0e8 C++: Add dumpers for common datatypes to simplify debugging.
Change-Id: I03f907dd0e8d9d63f0dfd38499c98296b5c7871a
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2012-07-23 07:19:17 +02:00