mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
![]() 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> |
||
---|---|---|
.. | ||
org.eclipse.cdt.alltests | ||
org.eclipse.cdt.core | ||
org.eclipse.cdt.core.aix | ||
org.eclipse.cdt.core.linux | ||
org.eclipse.cdt.core.linux.ia64 | ||
org.eclipse.cdt.core.linux.ppc | ||
org.eclipse.cdt.core.linux.ppc64 | ||
org.eclipse.cdt.core.linux.x86 | ||
org.eclipse.cdt.core.linux.x86_64 | ||
org.eclipse.cdt.core.macosx | ||
org.eclipse.cdt.core.qnx | ||
org.eclipse.cdt.core.solaris | ||
org.eclipse.cdt.core.tests | ||
org.eclipse.cdt.core.win32 | ||
org.eclipse.cdt.core.win32.x86 | ||
org.eclipse.cdt.core.win32.x86_64 | ||
org.eclipse.cdt.ui | ||
org.eclipse.cdt.ui.tests |