1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00
cdt/core
Andrew Eidsness 1b42998e47 Bug 422841: Add IQMethod to the QtIndex
This adds support for Qt slots, signals, and invokables to the QtIndex.

This does not yet generate PDOM references for QObject::connection
function calls and the Content Assistant is not contributed yet.

This also fixes a problem in the GNUCPPSourceParser class (internal to
cdt.core).  The class has a protected method that accepts an inner enum
as a parameter.  That enum was marked as private, meaning the method
could not actually be used by subclasses.  I've updated the enum to
match the visibility of the method.

There are three big areas needed to support Qt methods:

1) Slot and signal regions must be identified in the C++ class
definition.  These regions are introduced with special macros and the
region extends to the next region or to the next visibility label.

   Single methods can also be marked with (different) special macros.
This only applies outside of a slot/signal region.

   I've created QtASTClass which examines the input class spec in order
to identify all such regions.  This information is used when creating
the QtPDOM nodes for these methods.

2) Some places in Qt use type information embedded as macro expansion
parameters.  The values are lost by the standard C++ parser (since they
are just text in the expansion).  I've added an extension to the
GNUCPPSourceParser that accepts an input string (the macro expansion
parameter) and produces an appropriate IASTNode if possible.

3) The Qt moc follows specific and non-standard rules when matching
method signatures inside of QObject::connect function calls.  I've added
a utility that creates the same signature using the CDT AST as input.

   I learned the rules used by the moc by observing it's output for
significant cases.  Those cases have been put into a test case that is
included in this patch.

Change-Id: If812558db315abec637653cc974abf1c0c13d95b
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19672
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2013-12-11 20:59:16 -05:00
..
org.eclipse.cdt.alltests Cosmetics. 2013-12-03 18:05:48 -08:00
org.eclipse.cdt.core Bug 422841: Add IQMethod to the QtIndex 2013-12-11 20:59:16 -05:00
org.eclipse.cdt.core.aix Bug 406479 - Some "org.eclipse.cdt.core" fragments are missing an 2013-09-26 11:37:38 -04:00
org.eclipse.cdt.core.linux Fixed parent pom version to reference 2013-08-27 15:16:24 -04:00
org.eclipse.cdt.core.linux.ia64 Fixed parent pom version to reference 2013-08-27 15:16:24 -04:00
org.eclipse.cdt.core.linux.ppc Bug 406479 - Some "org.eclipse.cdt.core" fragments are missing an 2013-09-26 11:37:38 -04:00
org.eclipse.cdt.core.linux.ppc64 Bug 406479 - Some "org.eclipse.cdt.core" fragments are missing an 2013-09-26 11:37:38 -04:00
org.eclipse.cdt.core.linux.x86 Fixed parent pom version to reference 2013-08-27 15:16:24 -04:00
org.eclipse.cdt.core.linux.x86_64 Fixed parent pom version to reference 2013-08-27 15:16:24 -04:00
org.eclipse.cdt.core.macosx Fixed parent pom version to reference 2013-08-27 15:16:24 -04:00
org.eclipse.cdt.core.qnx Bug 314504 ProcessList leaks file descriptors during #getProcessList() 2010-05-27 10:01:52 +00:00
org.eclipse.cdt.core.solaris Fixed parent pom version to reference 2013-08-27 15:16:24 -04:00
org.eclipse.cdt.core.tests Bug 423396 - Indexer can't evaluate operator value 2013-12-09 14:34:00 -05:00
org.eclipse.cdt.core.win32 Fixed parent pom version to reference 2013-08-27 15:16:24 -04:00
org.eclipse.cdt.core.win32.x86 Fixed parent pom version to reference 2013-08-27 15:16:24 -04:00
org.eclipse.cdt.core.win32.x86_64 Fixed parent pom version to reference 2013-08-27 15:16:24 -04:00
org.eclipse.cdt.ui Added ICElement.EMPTY_ARRAY constant. 2013-12-11 15:29:22 -08:00
org.eclipse.cdt.ui.tests Bug 423126 - Extract Function refactoring misses additional occurrences 2013-12-03 18:16:43 -08:00