CppTools: Ignore generated symbols in SearchSymbols

...e.g. qt_metacall() etc from the Q_OBJECT macro.

This affects the results of the cpp locator and find filters.

Change-Id: I2f9ff1210f3705baddadd486d700ee8be9a44a20
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-08-16 12:09:50 +02:00
parent 86f9a2b7e6
commit b4a121a90a
2 changed files with 5 additions and 1 deletions

View File

@@ -292,7 +292,7 @@ void SearchSymbols::appendItem(const QString &symbolName, const QString &symbolT
const QString &symbolScope, ModelItemInfo::ItemType itemType, const QString &symbolScope, ModelItemInfo::ItemType itemType,
Symbol *symbol) Symbol *symbol)
{ {
if (!symbol->name()) if (!symbol->name() || symbol->isGenerated())
return; return;
QString path = m_paths.value(symbol->fileId(), QString()); QString path = m_paths.value(symbol->fileId(), QString());

View File

@@ -1,9 +1,13 @@
// Copyright header // Copyright header
#define GENERATE_FUNC void myFunctionGenerated() {}
// //
// Symbols in a global namespace // Symbols in a global namespace
// //
GENERATE_FUNC
int myVariable; int myVariable;
int myFunction(bool yesno, int number) {} int myFunction(bool yesno, int number) {}