Commit Graph

21 Commits

Author SHA1 Message Date
Nikolai Kosjar
2992653a4d CppTools: Remove workaround for quotes in defines
...since by now we get the defines in the correct format from
QMakeProject.

See the change this one depends on.

Tested with:

    Qbs:   cpp.defines: [ 'PATH1="/some/path"', "PATH2=\"/some/path\"" ]
    QMake: DEFINES += PATH1=\\\"/some/path\\\" "PATH2=\\\"/some/path\\\""
    CMake: add_definitions(-DPATH1="/some/path" "-DPATH2=\"/some/path\"")

All these lines translate to

    #define PATH1 "/some/path"
    #define PATH2 "/some/path"

for the code model.

Change-Id: Ifc3d3acff3abab6897ccbd0c5fafd5c415dfb53c
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-02-04 09:05:58 +00:00
Christian Kandeler
b6a0dbeec7 CppTools: Make CompilerOptionsBuilder hide intrinsics.
Change-Id: I8b677fc82672ca5fd36bae18480467ef95201dcc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-03 15:19:18 +00:00
Christian Kandeler
f567565d26 CppTools: Filter out "bad" symbols when collecting compiler defines.
Not all defines make sense for non-compilation purposes.

Change-Id: I7c5dd5aaa6de5c8916dfc10eb54ae49efa22959d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-29 12:12:42 +00:00
Christian Kandeler
e7a18108e1 CppTools: Fix macro collection.
"#define XYZ" does not correspond to "-DXYZ" (which means
"#define XYZ 1"), but to "-DXYZ=".

Change-Id: I3ed44e1457b3df52dc9bdb930ba8f4a04784d207
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-27 15:25:23 +00:00
Christian Kandeler
ea1efad6f1 CppTools: Support MSVC in CompilerOptionsBuilder.
Needed for clang static analyzer.

Change-Id: I0221b7e87f7b52a4aa5ebf7f4b26c19e584d63e7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-26 17:01:40 +01:00
Eike Ziller
b5b47f7df2 Merge remote-tracking branch 'origin/3.3'
Conflicts:
	src/plugins/cppeditor/cppdocumentationcommenthelper.cpp

Change-Id: I2cf25eba1de149765a6c44ad354d606ce9de512d
2015-01-08 10:38:20 +01:00
Nikolai Kosjar
a5e2b4b149 CppTools: Check for valid active target
The active target might be 0 if e.g. there are not kits and a project is
imported.

Task-number: QTCREATORBUG-13730
Change-Id: I48ade507fefc555d1d3f8230ba82c00270fa457b
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-06 10:19:03 +01:00
Nikolai Kosjar
205170a9e5 CppTools: Create ProjectInfos explicitly
...instead of going through CppModelManager::projectInfo().

Now CppModelManager::projectInfo() returns an invalid ProjectInfo in
case there is no valid data for the given Project.

Change-Id: I11908bf2ddf865b1d3d71ff176eaf4139292b21c
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-12-19 10:16:37 +01:00
Christian Stenger
38c08abde5 ProjectPartBuild: Fix framework paths
Task-number: QTCREATORBUG-13137
Change-Id: I71a222a4048db65db462da07726ea5d6b917da8d
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-11-20 15:06:19 +01:00
Nikolai Kosjar
e510c80c92 CppTools: Provide whether a sub project is selected for building
Analyzers can use this to rule out irrelevant (sub) projects.

Change-Id: I5a9eb66f06156f0619dc639f6f4080a8fc761ee6
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2014-11-07 12:10:22 +01:00
Nikolai Kosjar
33359a7922 CppTools: Add API to set/query compiler call data
...and make some comparison functions public.

Change-Id: If4c9a95031dece32073ce111484a890230190688
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
2014-11-07 10:27:17 +01:00
Nikolai Kosjar
5a1ffe6f1c CppTools: Remove ProjectInfo::operator bool()
This one does not buy us much...

Change-Id: I1d6c4667c038d319d2c16166505a386653a9f066
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
2014-11-06 16:45:24 +01:00
Nikolai Kosjar
c183386144 CppTools: Remove un-used function
Change-Id: Ib346359487cb06c0fc95ff5796e9dd6f220b9d16
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-10-30 10:03:31 +01:00
Nikolai Kosjar
f07b876a93 Move some functions from ClangCodeModel to CppTools
Most of the functions were quite generic and not specific to clang.

Change-Id: I160cfeb7eca5b69ad6a8932a4f76db5bf5c1d42d
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-10-20 13:11:08 +02:00
Eike Ziller
9c7019f0b2 License update.
Change-Id: I0acde2c3b995693de682679471f03af85bdd0a61
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-15 15:19:55 +02:00
Erik Verbruggen
990cedeb1b C++: remove C/C++ distinction from ProjectPart fields.
.. because they now hold only files for a single language+extensions
combination.

Task-number: QTCREATORBUG-11709
Task-number: QTCREATORBUG-12818
Change-Id: If294f6de07d60126be733d98de12b89b8af3efce
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-09-16 17:01:35 +02:00
Erik Verbruggen
7290c43da1 C++: update project info once after finishing adding all project parts.
So that recalculating the information is not O(n^2) but linear.

Change-Id: I69903e0b5ad321d071804d782ad634a3f300e71a
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-09-12 17:42:32 +02:00
Erik Verbruggen
cc70b603d3 C++: Change QStringList to QSet<QString> to prevent conversions.
This eliminates a bunch of list->set->list conversions. Especially the
ProjectInfo::appendProjectPart takes lots of time converting for every
part added.

Change-Id: Ib3c8cd4b0ad6c012ccbeed12ebedd46b9b6cca95
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-09-04 15:59:40 +02:00
Erik Verbruggen
8b2cff4b8b C++: introduce the unique ProjectPart::id()
And change the code-model inspector dialog to use them in the
ProjectParts tab to sync the master/details view, and in the
CppPreProcessorDialog to save/reload the selected part.

Change-Id: I7cc8ac1c21d31122f8650985d0b85177ebabdfb8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-08-28 18:58:26 +02:00
Erik Verbruggen
876ea282d2 GenericProject: put different languages into separate project parts.
This is in preparation for changes to the ProjectParts, where one part
can only hold files for 1 language.

Change-Id: I5e9a1a803ecc3ecbb36added0d0094df63922549
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-08-21 13:11:03 +02:00
Nikolai Kosjar
6b5298faf9 CppTools: Move Project{Part,Info} to new cppprojects.{h,cpp}
Change-Id: Ieff216017b9da1e6a12121688ea9572bdd81fd9b
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-08-20 10:28:35 +02:00