There are no symbol queries for the locator filters. The signature
generation is still not implemented but for simple cases it should work.
Change-Id: Ic6b04fbe1e7e057892f194ac139615c47d6ec33f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Creator is distinguishing enumerations and records, so we should do too.
Change-Id: I114cfd207464abd9afd96c26c7504cf8a3a1cb8c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Build the tree in only one loop.
clangbackend generates tokens almost as fast as it
did before (about 10% slower in general).
Broken documents are more affected and take much more
time (about 300%) but it's better to have this time spent
on backend side then in QtC itself.
Task-number: QTCREATORBUG-20205
Change-Id: I34c58bca30c4494005a029abd82c7e612ecd6fb9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Add extra data to Keyword tokens.
Does not affect highlighting.
Change-Id: I206499ea35ee4ece5fe442665c904090cf5d90fc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Not used anymore inside Qt Creator.
If 3rd party code really relies on this function, it can use the
function locally, or, likely switch to the still supported
getObjectByName or getObject.
Change-Id: I041877b3e0630e6b257055dec5e10baf68c83546
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We were not reset a statement if we got an exception. There are now test
for it.
Change-Id: Ife7b4437fece9369767605ba7387bd0564c1bb8d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
An unique index is prevent double locations in the database.
Change-Id: I167cafe1a707dd8a8a9754b8d69790a8382f4eea
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
we must not add the llvm libdir if it's a system path. this was already
done in some places, but not in others.
while we're at it, re-shuffle some pre-existing conditionals to make
things consistent.
Task-number: QTCREATORBUG-20178
Change-Id: Ib7e5a81705494e4cf2f83a4782ecd0832b91e511
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The patch is mostly mechanical, but contains also a few spurious changes
from values references for some local variables, foreach -> ranged for
etc that I coulnd't resist.
Change-Id: I58f0bd972546895eb318607cbfbd7ac35caf3f23
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
The reformatter used to remove the quotes that wraps the property name
in object literals. This causes problem when the name is not a
valid identifier, resulting in that valid code become invalid after
reformatting.
This patch forces wrapping of property's name in quotes: in this way,
the reformatted code is consistent and it never get invalidated.
However the resulting formatted code is not consisted with the one
formatted by previous versions.
Task-number: QTCREATORBUG-17455
Change-Id: I1e361102819055de210d6c81020f204c08aaa253
Reviewed-by: Markus Maier <markus.maier.sw@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
So we don't recompile them again and again.
Change-Id: I54c95e9d81df86f4944b9e3d45a7277f93f37312
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
It can be happen that the entry is written by an other connection after
we tried to read and before we write. This would lead to a double entry
which be prevented by the unique index in the database. In that case we
simply try again and read the id from the database.
Change-Id: I6c9d94e95ae11556bb446813f64be0855be4ddbe
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
It can be happen if different connections try to write and read at the
same time.
Change-Id: I30e9120fdb8f6963f5440eed48e2cfdf8803b2be
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This can be always happen for write statements. It fixes the wrong behavior
of the transaction that it tried to rollback if begin fails. If begin fails
the transaction never started so there is nothing to rollback.
Change-Id: I8a03162257fa22a0bb66ccb844f90c6afbc7db64
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We now distinguish between the the top external headers which are used for
the PCH and all external includes which are used for watching. Adding
indirect external includes can lead to errors because some are not
protected by a header guard.
Change-Id: I01576fcf1ad25e7a6e3efc252eabbd23d5c0e727
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This is providing more security that there will be no double entries in
the database. Instead you will get an exception if you try to corrupt the
database.
Change-Id: I162dc8ddd270b86afdf12ba4d55686637b2c09ef
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
The small string control block moved to the beginning, so it is more cache
local. The control block is cleanup too, so it should be easier to read.
The alignment is removed because it is creating to big holes.
Change-Id: I401aeb9d55455cbaa5e722dd8192e54b525ddc40
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This patch removes all references to QtQuick1 in qml library,
plugin, designer, profiler and tests.
Change-Id: Ie286fad96060299caae3ef328330597cf53e90d3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The file name id must be unique for very entry, so the directory id must be
incorporated too. Now there is always one unique integer id for every
file path. The directory id is there to access and compare the directory
much faster but not provide any data to the uniqueness of the id.
Change-Id: I0f9a2ca70bc9dda0ce32ebc45eb7b082821eb909
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We add the infrastructure to compute the SymbolKind and SymbolTags in the
indexer. Later we have to add more for templates, virtual functions etc..
Change-Id: I9203c5cfbfffed3065337292010de5fce5736453
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
ClangStaticAnalyzer is only one of the tools that
we can use and it will stay inside ClangTools plugin.
Change-Id: I74278e3fd12b792ab127d352db05d856c964968c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
As generating the AST is quite expensive it would be very useful to cache
the not changed include. So we generate PCHs for include outside of a
project part. With this change this PCHs are used by the indexer.
For that they are save to the symbol database by the PCH manager and when
fetched by the symbol indexer.
Change-Id: I7a5b07cfb32d72d50dc52d2b108cd41727a7bfc7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
I need the #include <wchar.h> after a recent upgrade.
Change-Id: I59790d6c92b14f42df8b5ece7227c406f2810c8b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Make the hex display work with LLDB, fix GDB and LLDB test.
Change-Id: I529b5cdc908dbcba7270bc4574fa59a012fcacad
Reviewed-by: David Schulz <david.schulz@qt.io>
It is important to know then the PCH generation started, so we can compare
the header file time stamps against it.
Change-Id: Id8ee91e886c153d9d4a37cc0438c682f2098f7fa
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Do not remove QT_USE_FAST_OPERATOR_PLUS and QT_USE_FAST_CONCATENATION
in QtcAutotest, but in the two tests that won't build with it.
In the qmake build the defines are not removed from json.pro, because
this file does not include qttest.pri.
Change-Id: I97d173528ca2a02bac1bfae30709a959e6b69375
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Creator only selects the filename now, the
extension will be left unchanged by default.
Task-number: QTCREATORBUG-20057
Change-Id: I66bbbb5b95e1d487c2087efa596a87a240721e44
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Fix take unit tests to actually test the correct template instance,
add more unit tests for takeDefault.
Change-Id: I51f5b17b6478a8c1388a91840edfb9c702697b28
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The strings remember in which file they were created/assigned.
However, this used a non-counting reference to a ProFile, which could
become dangling. If a subsequent ProFile re-used the exact same address,
a string's source would be mis-identified, which would be fatal in
conjunction with discard_from().
Since we actually need only a unique id for comparison, let's use an
integer for that.
comment on cherry-pick: this is actually a lot more than a cherry-pick,
because the file ids need to be aware of the dual VFS which was
concurrently introduced on the qtc side.
Started-by: Simon Hausmann <simon.hausmann@qt.io>
Change-Id: I395153afaf7c835d0119690ee7f4b915e6f90d4a
(cherry picked from qtbase/190aa94be7f5e146bef44862b974d733755cec85)
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This reverts commits 47355608db
and 6cc61be23b.
Task-number: QTCREATORBUG-19717
Change-Id: I052ff84ab33a5c483c11b66eaf55a175cc34c28d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Add a new algorithmn to take the first match in a container out of the container.
It takes a pointer to something and will try to match against a smart pointer
stored in the container. Besides that it also accepts the usual like a predicate,
member variable or member function.
Change-Id: I4aabd4d43aa076a534da6488d0f9c3695ba79c09
Reviewed-by: Eike Ziller <eike.ziller@qt.io>