Commit Graph

300 Commits

Author SHA1 Message Date
Oswald Buddenhagen
66a3553107 make library and plugin dependencies declarative
instead of directly including the respective pri files in
*_dependencies.pri, set variables and let qtcreator.pri resolve
them to includes.
this will allow us to re-use the dependency info elsewhere.

Change-Id: Iaa33924e428ac0409660f42df2f98a7978452d3e
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-03 14:37:45 +02:00
Oswald Buddenhagen
7923032022 fix include style relating to cplusplus libraries
... and adjust INCLUDEPATH accordingly.

while i'm at messing with include statements, also re-order the include
blocks according to policy and sort them within bigger blocks.

Change-Id: I7762abfd7c4ecf59432b99db2f424e4fa25733a5
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-03 13:40:39 +02:00
Oswald Buddenhagen
001a26a4bb include qttest.pri centrally
Change-Id: I05e85dac15e7de52ad04bde899dcc3cb8e603d3e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-02 17:11:37 +02:00
Oswald Buddenhagen
5ad0908087 remove redundant cpptools.pri include
Change-Id: I09bc8a20a3608b52784de2b262b2f06ac7f217bf
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-02 17:11:02 +02:00
Oswald Buddenhagen
cf5937a8ef remove redundant INCLUDEPATHs
src/plugins and src/libs are included by qtcreator.pri

Change-Id: I15ec19856366661bfa74d00e6278f4eb3854acb2
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-02 17:10:07 +02:00
Nikolai Kosjar
e088541c0d C++: Temporary fix for dangling pointers in ResolveExpression
Task-number: QTCREATORBUG-8974

Change-Id: Iac114881741bdf8fd477541b28e4d31b7a1760f0
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-03-22 08:57:53 +01:00
Nikolai Kosjar
ceb314b3ec C++: Tests: More lexer tests for doxygen comments
Change-Id: Ib031eb791f0a089376d02cc75a62fcc7d1f859cb
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-03-12 09:04:07 +01:00
Nikolai Kosjar
47d60ae89a C++: Consider '^//[/!][^\n]*' as doxygen comment
Now everything following '///' or '//!' is a doxygen comment.

This simplification fixes also the bug ('\n' was considered as part of
the doxygen comment and led to strange highlighting).

Task-number: QTCREATORBUG-8921

Change-Id: I6dae3b80ec11400f2f623897257782a80860a7f3
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-03-12 08:31:05 +01:00
Nikolai Kosjar
29055f9f43 C++: Fix crash due to dangling pointer
ResolveExpression used the wrong Control object, which was deleted by
~LookupContext() in TypeOfExpression::operator()). ~Control() led to the
dangling pointer.

Task-number: QTCREATORBUG-8890
Done-with: Erik Verbruggen <erik.verbruggen@digia.com>

Change-Id: Ic07947ee54087446b730e4d3ec4bef29defa4495
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-03-12 08:29:48 +01:00
Erik Verbruggen
4cf1ccd161 C++: Fix semantic highlighter and tests.
Fixed the chunk size calculation, made the sorting more stable, and
fixed the tests.

Change-Id: I81fcffbf2ce9b63dd81f1a0e251200a31220db88
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-03-04 13:16:50 +01:00
Jan Kundrát
4250b86a73 Fix build error (missing Q_DECLARE_METATYPE)
Change-Id: Iaba3ebbb3960dc6fe07b8382be29071ce7af5bfb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-03-04 10:25:52 +01:00
Nikolai Kosjar
61460951ce C++: Fix highlighting of doxygen's "///"
The color scheme changed for "///\n" lines:

 "///\n"       - "Doxygen Comment" (was "Comment")
 "/// hello\n" - "Doxygen Comment" (as before)
 "////...\n"   - "Comment" (as before)

Change-Id: I6bdaf471760bb05547385fd4821eded6cefed4d7
Reviewed-by: Knut Petter Svendsen <knutpett@pvv.org>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-02-19 10:17:55 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Przemyslaw Gorszkowski
ffba28d26a C++: Fix code compl. for instantiation of template specialization
It works for full specialization. Instantiate of the partial
specialization has to be implemented(finding appropriate partial
specialization-on going)

Added unit test.

Change-Id: I8ef5ea963e7c665e0d67d390b3a833486773dab0
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-01-30 18:49:25 +01:00
Przemyslaw Gorszkowski
421ea2afa4 C++: Test for nested class of enclosing template
Added additional test for change:
23844410fd

Change-Id: I9ddd23b0e852bf88105fef87fae82620da29c0b6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-01-30 08:09:21 +01:00
Przemyslaw Gorszkowski
7db3b660b6 C++ editor: Highlight member variable
Highlight member variable when there is also
enum value with the same name

Task-number: QTCREATORBUG-7525
Change-Id: I0990844a20fdf9e87a807fde10708344b9c3497b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-01-29 17:33:42 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Przemyslaw Gorszkowski
7fcc52bf47 C++ editor: Highlighting static variables
Fix highlighting, find usages, marking for static variables.

Task-number: QTCREATORBUG-6822
Change-Id: I0c97c93c6c1024550907eec3820496df22a94e85
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-01-29 14:01:11 +01:00
Nikolai Kosjar
370acaf502 C++: Tests: Add basic tests for CheckSymbols
CheckSymbols is the "data provider" for the semantic highlighter which
does not have any tests yet.

Change-Id: I868aca32d44570457a984b8ce74695c381c58bed
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-01-29 09:09:15 +01:00
Nikolai Kosjar
8c3794f9d1 C++: Add star binding to TypePrettyPrinter
Now we can specify if we want to print a whitespace before and/or after
'*'/'&' when printing pointer and reference types.

Task-number: QTCREATORBUG-6169

Change-Id: Ida1b035aa4fd79be9108934b75f236db9f7238af
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-01-23 14:30:39 +01:00
Przemyslaw Gorszkowski
23844410fd C++ editor: support nested class of enclosing template
Fixing:
* highlighting
* tooltips
* find usage
* selecting

Task-number: QTCREATORBUG-8245
Change-Id: I6e900799e43126706125b7e424567fca2b2c223e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-01-22 11:35:25 +01:00
Erik Verbruggen
dada2614d5 C++: add include-guard tracking.
Track the typical #ifndef/#define/#endif usage in header files to see if
the macro is an include guard. If so, store it in the Document. No
behavioural change, just recording the name.

This can be used in the future to track if a file needs to be re-parsed
when a macro changes: if it was used in the file, and not defined in it
nor being the include-guard, a file should be re-preprocessed and
re-parsed.

It can also be used to check if two files have the same include guard.

Change-Id: I2715f529997a7b24a11bdbc6150652e2669f1a46
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-01-18 14:58:07 +01:00
Francois Ferrand
4c43655cec C++: fix macro calls with comment before arguments
When in 'keep comments' mode, the preprocessor does not properly handle macro calls with
comments between the macro name and the opening parenthesis: "FOO /*something to say*/
(45)".

Change-Id: I6fe733242e4d2ccff2985d17399d0a084917415a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-01-18 14:56:47 +01:00
Francois Ferrand
5e8c3f4be7 C++: fix constructor definition parsing.
When a constructor is defined with a single, unnamed argument of a custom type without
extra type specifiers (const...), then the constructor was not identified as such.
There was an heuristic in case the constructor was in the class definition, but not if the
the constructor was defined later.

Examples:

class Arg;
class Other;

class Foo {
  Foo(Arg /*arg*/);               // working
  Foo(const Arg /*arg*/);         // working
  Foo(int /*arg*/);               // working
  Foo(Other /*arg*/)         {}   // working
};

Foo::Foo(Arg /*arg*/)        {}   // used not to work, fixed
Foo::Foo(Arg arg){}               // working
Foo::Foo(const Arg /*arg*/)  {}   // working
Foo::Foo(int arg)            {}   // working

Change-Id: I741e4ba62672ddc99a837fdcdc27996fba5ae6c7
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 13:36:43 +01:00
Erik Verbruggen
cab6ed5e51 Fix: no scope walking for name resolving after MemAccess operator
Change-Id: Ic093079fa65d8d749911fd9f5b0f629e9fe68a1e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>

Conflicts:
	tests/auto/cplusplus/findusages/tst_findusages.cpp

Change-Id: I87d305e2d68582aa00b92f9599368615cd76ec74
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-11-22 16:39:47 +01:00
Erik Verbruggen
8cbf0e7045 Fix: no scope walking for name resolving after MemAccess operator
Change-Id: Ic093079fa65d8d749911fd9f5b0f629e9fe68a1e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2012-11-21 14:38:00 +01:00
Eike Ziller
fe74a9a722 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/fakevim/fakevimhandler.cpp
	src/plugins/qtsupport/baseqtversion.cpp
	tests/auto/cplusplus/cxx11/cxx11.pro
	tests/auto/cplusplus/cxx11/tst_cxx11.cpp
	tests/auto/icheckbuild/icheckbuild.pro

Change-Id: I3c8351ad35617f56d15b788c8a46d8a6f453ef70
2012-11-09 11:20:10 +01:00
Nikolai Kosjar
492ca1cbcf Tests: C++: Make tests run from shadow builds.
For shadow builds some tests couldn't find their test data. Solved by
using the same pattern as in Qt tests: Inject $$PWD as SRCDIR via a
DEFINES statement.

Note: It was considered to use QFINDTESTDATA for Qt5, but this was
rejected due to:
 1) It's Qt5 only (would mean to introduce some wrapper...)
 2) As the doc states, it will not work with QTEST_APPLESS_MAIN tests.

Change-Id: Ie6cf59570fe61725b7f6f83b7da650331ddb38fc
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-11-07 14:10:24 +01:00
Nikolai Kosjar
9f38f7bfbc C++: Store lambda captures in the code model.
Done-with: Erik Verbruggen
Task-number: QTCREATORBUG-7968
Task-number: QTCREATORBUG-7949

Change-Id: I0cf727052d0a3536ed96ee894b18768c9538c213
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-11-07 13:36:20 +01:00
Eike Ziller
0a1bdf4257 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/share.qbs
	tests/auto/icheckbuild/icheckbuild.pro

Change-Id: I13bc737c981aaeb615ab1a3571cc8a18f60a7cd6
2012-10-25 10:45:58 +02:00
Nikolai Kosjar
6481deb8c8 C++: Fix crashes in tests with Qt5.
tst_Semantic and tst_CodeFormatter crash with QTEST_APPLESS_MAIN since
they need to access some font settings via QTextDocument /
Q*Application. Use QTEST_MAIN instead.

Change-Id: Id85228acb6006cfaee41c634c6a32b6c23a70105
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-10-23 14:07:35 +02:00
Nikolai Kosjar
5d730be06e C++: Compile fixes in tests and tools.
After some refactorings not all usages, especially in tests and tools,
were adapted.

Change-Id: I7ed24bb1c8e55e55ed74eda3a8fd7610e725f4cb
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-23 12:26:47 +02:00
Erik Verbruggen
e72be772c5 C++: added some notes regarding QTCREATORBUG-7968
Change-Id: Ia7a0e4b416ba6ef768d76595d8576262a828ae78
Reviewed-by: David Schulz <david.schulz@digia.com>
2012-10-11 08:53:51 +02:00
Eike Ziller
086dd684ab Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/coreplugin/fileiconprovider.cpp
	src/plugins/cppeditor/cppplugin.cpp
	tests/auto/qml/qmldesigner/coretests/coretests.pro

Change-Id: I0e83becf661ded9316ce6766786c9ef4c2f897a7
2012-10-09 14:27:29 +02:00
Eike Ziller
1504ca67fb More Nokia -> Digia/QtProject changes
Change-Id: If52505dbc95ee48ac3467cdfbbea91629c11089c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-09 12:24:24 +02:00
Eike Ziller
6fd252b0a5 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessageloghandler.h
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemodeployconfigurationwidget.h
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentinfo.h
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/ichecklib_global.h
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h
	tests/manual/ssh/tunnel/tunnel.h

Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
2012-10-05 21:20:50 +02:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Christian Kamm
47d2558f6f C++11: Fix bug with parsing ctor initializers.
Task-number: QTCREATORBUG-7919

Change-Id: I12307c3fb6c20424c8b5aaf564a031924c755d25
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-25 11:03:18 +02:00
Christian Kamm
a81389356e C++11: Fix and add test for simple decltype uses.
Change-Id: I7f843fa96e33671ecb135b9db6f68d9f2cbf2fac
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-24 12:08:25 +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
2aa27e6d22 C++11: Make expression-list expand to initializer-list.
This will fix a couple more places where brace-init-lists and
pack expansions are allowed but are not currently accepted by
the parser. For example:

foo(abc...);

now parses correctly.

Change-Id: I93710cef35154fea8437329f3174e4a2d56637b8
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 12:20:58 +02:00
Christian Kamm
0c3acb80c8 C++11: Allow brace-init-list in default argument declaration.
Change-Id: Iab707d855f98982697365f9a4cd7832877e64d17
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 12:20:15 +02:00
Christian Kamm
392c80c6e4 C++11: Fix use of >> in template arguments.
Change-Id: Ic99ca897e7a3b9c82cf8c5093a90bf9c88dbb0ed
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 11:58:34 +02:00
Christian Kamm
44c9cef30a C++11: Make 'enum struct', enum-base and opaque enum decls work.
For declarations like:
enum struct Foo : long int;

Change-Id: Id813efdbc31c8d70a4b40bb0101dc33a8dd2556a
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 11:57:23 +02:00
Christian Kamm
8711121197 C++11: Parse alias declarations.
The parser no longer fails declarations like:
using Foo = std::vector<int>::iterator;

Change-Id: Ib3a552ebbe0147fa138db6448a52cdba8f9b9207
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 11:56:33 +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
ecd54059d3 C++11: Add alignof() expression.
Change-Id: Id3fb30b9a16ea724bab0d5b05e8cbddb0064e6eb
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 11:53:46 +02:00
Christian Kamm
1aed32d866 C++11: Fix indent of brace initializers in ctor lists.
Change-Id: Ib784df9e17ff2fe6bb249dcf8c2fee7310340f50
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 11:52:40 +02:00
Christian Kamm
8c1a45565c C++11: Accept ref-qualifiers in function declarators.
Means
void foo() const &; void bar() &&;
and the corresponding pointer-to-member declarators
now parse.

Change-Id: Idbf295bd4f51cd5d9e38efcac1940b8cc2e32fce
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 11:51:48 +02:00