Commit Graph

7 Commits

Author SHA1 Message Date
Erik Verbruggen
f3a3bf78c0 C++: Fixed crash.
Change-Id: Idec56cfced6e6eb2e0a78c4f242e7c81fec08692
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-23 10:33:38 +01:00
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
Leandro Melo
8e3c88f02b C++: Share symbol finder across editor instances
Change-Id: I75880597d237bbbe1393dd02153cedba1165bed6
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-24 11:41:49 +01:00
Leandro Melo
efe9bca20c C++: Replace non-absolute-critical asserts for soft ones
Change-Id: I021074a78d90929b4e83b8aff9db1ae7995e8c6a
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-24 09:58:59 +01:00
Leandro Melo
35bcccb500 C++: Remaining fixes in symbol finder
Should have gone in the previous fix commit...

Change-Id: Ibca55cbd6fd58caee7d61f5e8f8c37f67391c597
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-01-23 21:00:43 +01:00
Leandro Melo
b97b45a341 C++: Fix "reference" file in symbol finder
Througout the initial review the singleton was transformed into an
ordinary class, but a error was introduced: The "reference" file was
incorrectly assumed to be the editors file, which is wrong, since
it should be the declaration file.

Change-Id: Iad3e25a690fa8bd07a18184b24b10f8dea965332
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-23 17:17:00 +01:00
Leandro Melo
466ea4842c C++: Improve file accuracy when finding symbols
This patch introduces a priority-based mechanism when searching for certains
symbols in the snapshot. The priority corresponds to how similar the file path
from the "reference" symbol is to the file path from the "candidate" symbol.
This solves a variety of issues when matching "equivalent" symbols but that
are in another file/project, such as when following a function declaration,
a forward class declaration, or adding a definition through a quickfix.

There's now a symbol finder which will compute the "best" search order and cache
the most recent results. A consequence is that following symbols in some cases
is slower, but not apparently significatly.

Note: The "find" functions were moved from the Snapshot to the new SymbolFinder
class.

Task-number: QTCREATORBUG-6697
Task-number: QTCREATORBUG-6792

Change-Id: Ia518f014275fec1f4d0cb3224bd4e06a9df6d557
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-23 11:34:44 +01:00