This applies for all project managers, except qmake. The qmake project
manager will make use of this in follow up changes.
Before, "foo.h" was always recognized as a CXXHeader. Now, it depends on
the other files. E.g. in a file list {"foo.h", "foo.c"} foo.h is now a
CHeader. In {"foo.h", "foo.c", "bar.cpp"} the file "foo.h" is ambiguous
and we will create two project parts, one where it is a CHeader, the
other where it is a CXXHeader.
Change-Id: I50505163368742584b1380c284d42cbe07cb4fc9
Reviewed-by: David Schulz <david.schulz@qt.io>
These are remnants of the time when we had only one snapshot.
Change-Id: I6ff4db645d1065a0ef195834890e0774e2e2c60e
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
...and thus avoid reading the file.
The other candidate was "text/x-matlab".
Change-Id: Ifb36b817cda654bcda37b7d675c2df4e60525a2b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
No need to require the project managers to do this. Also, it is easy to
forget.
Change-Id: I96f7a5e5547418678af9653e5753c372f0880e5a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
- Objective C/C++ was not enabled in highlighter.
- QMake project part for Objective C/C++ did not have ObjectiveC extension enabled.
- As languageFeatures.objCEnabled is a bitfield, it was actually always set to 0.
- Highlight ObjC class & protocol declarations.
- Highlight ObjC message passing.
Change-Id: I64d12c9509058d05f7adce94598cb7ce91727ac8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This makes it more consistent with the other find filters.
Change-Id: I39ad144d66091c3ccc5e4452009cc236165915ea
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
We need multi line support, multi text range support. This is only adding
enablers and adds later the multi line and multi text support because this
triggers larger changes because you have to know the text document.
Change-Id: I44e46d9d80d7d73b2650c69cc83657c20c85bfae
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
On project loading ExtraCompiler objects are created that might read the
already existing ui_*.h files in the build directory. In this case,
ExtraCompiler::setContent() is called, which will emit a signal about
the modified content.
Now GeneratedCodeModelSupport is a client of this signal and it forwards
the changed contents to the clang code model. However,
GeneratedCodeModelSupport objects might be created later and miss the
initial signal emission, thus leaving the code model unaware of some
unsaved files.
Fix by notifying the code model at construction time of
GeneratedCodeModelSupport.
Change-Id: I7311867ad7f534920357801647bd2d0c82bb4edb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Define an operator << that accepts a raw pointer for the list of
QuickFixOperation::Ptr instead.
Fixes MSVC 17 warnings
src/corelib/tools/qlist.h(423): warning C4661: 'QVector<T> QList<T>::toVector(void) const': no suitable definition provided for explicit template instantiation request ]
src/corelib/tools/qlist.h(389): note: see declaration of 'QList<TextEditor::QuickFixOperation::Ptr>::toVector'
src/corelib/tools/qlist.h(423): warning C4661: 'QSet<T> QList<T>::toSet(void) const': no suitable definition provided for explicit template instantiation request
src/corelib/tools/qlist.h(390): note: see declaration of 'QList<TextEditor::QuickFixOperation::Ptr>::toSet'
src/corelib/tools/qlist.h(423): warning C4661: 'QList<TextEditor::QuickFixOperation::Ptr> QList<TextEditor::QuickFixOperation::Ptr>::fromVector(const QVector<T> &)': no suitable definition provided for explicit template instantiation request
...
Task-number: QTBUG-57086
Change-Id: I879511656c39eb7a3eae54ea7daca3eca8ebe8d7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Clang query is mechanism to use AST matcher to search for code. Think
about regular expression but in the context of AST. So you get a semantic
search tool for C++.
Change-Id: I72e882c5b53a0c52f352a3664847c4c3e4f6fc2e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Emit the signal only if we are not canceled.
Task-number: QTCREATORBUG-17249
Change-Id: I5082a5fe7554eecdc7ec5d148150c1b169002f6d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Get rid of the need to manage a map of QFutureWatcher -> SearchResult
Change-Id: I1a87eccfff9149f2ddfdd2f72bb5e4b07ee81ce3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
...for -std=gnu++0x.
Define the unknown identifier/type "__float128" so at least the headers can be
parsed successfully. Of course this does not help for parsing client code
referencing that identifier, but this should be the less common case.
Task-number: QTCREATORBUG-17126
Change-Id: Id321311713029d8aa77e068b02361d86debfada6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Same as for the Clang Static Analyzer, so move the implementation into the base
class and use it.
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.
Change-Id: I5b714ba374c5fdefe234faf012a3515e96c9a08c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
...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>
...because it might suggest to append a new line.
Change-Id: I8d5701a1d20c9d94ee528383227a6e3b446b4ff2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
...otherwise e.g. MSVC's "/I" option will be converted to "\I".
Change-Id: Ia01519ee5c942d0f3cdd32c4302055d0e58fb865
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Show/hide the error indicator button instead of enabling/disabling it.
* Use "Minimize" instead of "Do Not Show Again" in the info bar button
and use a custom setting to save this. The current info bar API does
not signal addition/removal of global suppression ids which would be
needed to update all editor widgets properly. We are the only client
and it feels wrong to add this API there at the moment.
* Remove not needed code anymore.
Change-Id: I2bb872522b7410434f060cc359a3b62dfed0af4d
Reviewed-by: David Schulz <david.schulz@qt.io>
Ignore the include path for intrinsics coming from the toolchain. The
clang static analyzer comes with its own intrinsics and does not cope
well with intrinsics from other clang versions.
Move the relevant implementation from LibClangOptionsBuilder into the
base class so that ClangStaticAnalyzer profits from this, too.
Task-number: QTCREATORBUG-17102
Change-Id: Id9a28ddebb889c862939332dce888a80b3bb7e63
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
...because those errors can lead to a substantial performance/functional
regression.
The actual diagnostics (possibly with children) are shown as details in
the info bar.
The info bar can be hidden with the "Do Not Show Again" button.
Re-enabling the info bar is possible with the new editor tool bar
button.
Change-Id: I03394ff8e3c84127946b0b791930b28a385f5a46
Reviewed-by: David Schulz <david.schulz@qt.io>
Parsing happens rotationally on the translation units.
The recently parsed translation unit is used for completion jobs while
the older version is used for parse jobs.
Advantages:
A1. A completion job cannot be blocked anymore by currently running
parse job.
A2. Faster triggering of parse jobs. A reparse was triggered about
1650ms after the last keystroke. This is down to 500ms now since we
do not have a blocking translation unit for the completion anymore.
Disadvantages:
D1. Memory consumption is doubled for an edited document.
This could be addressed by suspending the second translation unit
after some time of inactivity.
D2. Setup of the supportive translation unit takes some time.
Change-Id: I958c883c01f274530f5482c788c15cd38d6f4c3e
Reviewed-by: David Schulz <david.schulz@qt.io>
This is necessary for themable + HighDPI icons in the options dialog.
Change-Id: I8e3ff87a24591af40bb76b39cd970443d7678fae
Reviewed-by: hjk <hjk@qt.io>
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>
For unknown reasons tab order in listed UI files was set incorrectly and
behave unexpectedly. Now tab order behave naturally.
Changes made for listed objects and touches only UI.
Change-Id: I057b95eb21943ddb29b108682618382661db7be9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>