Commit Graph

14 Commits

Author SHA1 Message Date
hjk
87543118d5 CppTools: Apply 'static' pattern to StringTable
This also fixes a crash on loading (some?) projects introduced
in 577bf7c08a.

Change-Id: Ie35d466fa3b84b183118fe93f55393a4c59755de
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-02-07 13:32:08 +00:00
hjk
b16019c95b CppTools: Remove an unused declaration
Change-Id: I165f32678d61e3731fff68982bdb3f5c1791b1f0
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-07 11:10:45 +00:00
Ivan Donchevskii
7666db896d CppTools: move locators ownership to ModelManager
Move locator and find filters ownership and initialization
to ModelManager. Initialize builtin filters by default and
provide methods to set them from plugins.

Change-Id: I4cc82ecff3415329a5f97b1be9dcc45e6103bf5a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-01-17 11:33:24 +00:00
Andre Hartmann
b2aa1b9845 Locator: Cleanup and modernize Locator and filters
* 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>
2017-12-30 18:58:25 +00:00
hjk
39a38d5679 Wholesale conversion to #pragma once
Kudos to cgmb and https://github.com/cgmb/guardonce

Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 15:20:19 +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
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Erik Verbruggen
2b0954ca7d C++: Remove class/function/enum extraction from CppLocatorData.
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>
2014-06-18 11:05:02 +02:00
Erik Verbruggen
17febac88b C++: Rename ModelItemInfo to IndexInfo.
And move it into its own header and source files.

Change-Id: I37401badd819e028e1d767425759dc0ff27afe31
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-06-16 12:08:12 +02:00
Erik Verbruggen
20c4f523ab C++: pass ModelItemInfo around wrapped in a QSharedPointer.
Change-Id: I36162ea589ad01cf2ba79fc931732422fc1e6983
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-06-02 16:22:17 +02:00
Erik Verbruggen
a870c29a71 C++: use a global string table for SearchSymbols.
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>
2014-05-28 15:54:38 +02:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Nikolai Kosjar
fc731a3a67 CppTools: Introduce LocatorData
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>
2013-08-30 16:42:26 +02:00