The reasoning in 1b4766e26c did not take into account that the scope
of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with
f70905448f6 in Qt base.
Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Fix that the invocations
CppLocatorData::onDocumentUpdated(Document{"bla.cpp", revision=5}),
CppLocatorData::onDocumentUpdated(Document{"bla.cpp", revision=3}),
would add two entries in m_pendingDocuments. The document from the
latter invocation should be ignored due to its outdated revision.
Change-Id: I5e9eb4de77f59633d5525d808bd60ca1259f894d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This also fixes a crash on loading (some?) projects introduced
in 577bf7c08a.
Change-Id: Ie35d466fa3b84b183118fe93f55393a4c59755de
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Omit QLatin1{Char|String}
* Use member initialization
* Use range-based-for
(and fixed the cases with non-const Qt container)
* Sort includes to common style
Change-Id: Ibc33a732bb153862efd6d5febfac758229cb61d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Bug was exhibited by running e.g.
./qtcreator -test CppEditor,test_quickfix_MoveFuncDefOutside_FreeFuncToCppNS \
-test CppTools,test_cpplocatorfilters_CppLocatorFilter:CppFunctionsFilter-WithNamespacePrefix
Change-Id: I57d96a8f7bf0aea6eb11cb68d1b981808533ce41
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The symbols of these files do not provide much value.
Change-Id: Ie81b12dc795c068742600e272807f9e6a87609ea
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
With every single change in a document the corresponding IndexItem
elements were extracted and put into an vector. The locator filters
then used these lists to iterate over and filter them.
This change removes that extraction, and the filtering now directly
iterates over the IndexItem elements with a callback.
The exception is the current document filter, because it also queries
for all declarations. Adding this to the model would result in a higher
memory usage, while that information is only used by this filter.
Change-Id: Ibe445cc11e9f68b5d807348fd46c7cac4aff4c85
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
And move it into its own header and source files.
Change-Id: I37401badd819e028e1d767425759dc0ff27afe31
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This string table uniques strings, so that multiple identical strings
share their contents. It is used by the locator and the symbol searcher,
and will later be used by the class view.
Change-Id: Ib8b50f69bbf994d0d7a39b66dc8caf1a3d9bfb42
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Until now the locator filters CppLocatorFilter, CppClassesFilter and
CppFunctionsFilter used unnecessarily their own SearchSymbols instance.
The results were also saved separately, which was unfavorable since e.g.
the functions and classes data could be shared.
Starting with this patch an instance of LocatorData will serve all
mentioned filters.
This saves about 20MB of memory after indexing the Qt Creator project.
Change-Id: I8a34b67eb9fe0e5c68ba6e7c8f576389c78efc6f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>