Commit Graph

14 Commits

Author SHA1 Message Date
Nikolai Kosjar
602ad72d42 CppTools: Refactor ProjectPartBuilder
...and add some basic tests.

Introduce the abstractions ProjectInterface and ToolChainInterface in
order to break the dependency to the ProjectExplorer. Also, some simple
logic can go there to simplify the (Base)ProjectPartBuilder.

Change-Id: I6c50a1804ce62098b87109931eb171f5c2542937
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-12-13 08:33:04 +00:00
Nikolai Kosjar
4580e88cbe CppTools: Extract ProjectFileCategorizer
Change-Id: Ib7a5c3c61b0ea172cbc6a3ac7c94e77ffabc0db4
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-12-08 08:35:34 +00:00
Nikolai Kosjar
b0a49ca1c1 Clang: Fix parsing MSVC's crtdefs.h for 64 Bit
...by specifying the word width, as for the Clang Static Analyzer.

This has gone unnoticed so far because it looks like that the error diagnostic
from the bug report can be extracted with libclang (as shown in the info bar),
but is not printed from libclang or clang.exe itself.

Task-number: QTCREATORBUG-17130
Change-Id: Ia7a5ee3825c7211cdf80c2166a9eb454ce48cac1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-10-18 15:03:52 +00:00
Francois Ferrand
7b2c09a118 C++: Disable C++ keywords in C files
In some (legacy) C files, new and delete may be used for regular identifier.

There are some limitations:
* Header files have no 'implicit' type, and may be parsed as C++ or ObjC depending on the
other files in the project.
* QMakeProject use a single ProjectPart for C and C++ files, so there will still be the issue.

Change-Id: Iec11687b35f7ccf1e7c0d091b143ae90d950e440
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-08-23 12:35:04 +00:00
Tobias Hunger
7ab2ed5730 Pass C or Cxx toolchain to code model
Pass the C toolChain to the code model for all the C-versions creator
supports.

Change-Id: I0300a19d35861fcee76fb92ce14c6e04996bac7f
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:33 +00:00
Tobias Hunger
cb14fb0d71 Kits: Save several ToolChains per kit
BREAKS BACKWARD COMPATIBILITY OF TOOLCHAIN SETTINGS!

* Convert old ToolChainKitInformation to new version
* Store several toolchains in one kit (one per language)

Change-Id: Ia59a2ad067c57971ec34ce9b2e43758344443755
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:06 +00:00
Nikolai Kosjar
77a77b954e Clang: Do not use run configuration for determining toolchain type
Change-Id: I9d09dd800043b88925fad4873759f6c4f8638981
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-04-21 10:15:16 +00:00
Nikolai Kosjar
4e0b55f673 Clang: Undefine language features as fix for MSVC2015/clang-3.8.0
This applies the following change for the clang code model, too.

  commit d13d179524
  Clang Static Analyzer: Workaround analyzing MSVC2015 projects with clang 3.8.0 II

Change-Id: Ia229d7e8b24c2e1c0a83d9a53c623ea1f79c4a06
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-04-12 14:54:06 +00:00
Nikolai Kosjar
276f4c489c Clang: Explicitly set the target triple
As for the analyzer, this makes us independent of the default triple and will
most likely reduce the maintenance - e.g. the target implies certain internal
command line arguments, we will profit from added ones.

This fixes parsing of mingw headers with the clang code model.

Change-Id: I722b981125a80fac5f62a7af40a83ecdd7bbf811
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-04-11 10:16:34 +00:00
Nikolai Kosjar
32842e754d CppTools: Reduce calls to mime database.
...by removing the unneeded ProjectFileAdder. Its job is already done
earlier, so use the results.

Change-Id: Ifd865e6203ed6162a0d852c2128fb6d30208a52b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-02-24 17:30:34 +00:00
Christian Kandeler
537125155d QbsProjectManager: Reduce calls to mime database.
Qbs already has some definite information about file types.

Change-Id: I024feeae3e6df5ec5462924ffedc7332e585f6b7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-02-24 16:21:16 +00:00
Marco Bubke
e42bf6ebc6 CppTools: Remove all references to the tool chain in the project part
Change-Id: I5fd55eadf94c8a185c2082b93b27bf4432e5cabf
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-02-01 13:13:32 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Marco Bubke
1ae509541c CppTools: Moving ProjectPartBuilder in its own header
Change-Id: I0aa65ec6c80dcd437f13ff70021388b0da57ccfd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-13 14:47:11 +00:00