https://bugs.kde.org/show_bug.cgi?id=354854

--- Comment #4 from Milian Wolff <m...@milianw.de> ---
Git commit 0474b1a0063c32abc9d89143bc2343db4d21b7f7 by Milian Wolff.
Committed on 24/01/2016 at 18:28.
Pushed by mwolff into branch '5.0'.

Mark Qt signals and slots as such in the DUChain.

This is a first step towards bringing back the old KDevelop 4 level
of support for Qt. There is a lot of work left to be done though.

This patch so far only marks class function declarations that are
Qt slots or signals as such. The main idea here is taken from the
Qt Creator clang code model, so credit where credit is due: Good
job!

When a TU is parsed that contains a system include path that ends with
/QtCore we prepend the include paths to our "wrappedQtHeaders" folder.
This so far only contains "QtCore/qobjectdefs.h" which includes the
real "qobjectdefs.h" via `#include_next`. Then we redefine the MOC
macros for signals and slots to inject __attribute__((annotate())
tokens with qt_slot/qt_signal contents where appropriate. This can
then be looked up when traversing the AST via CXCursor_AnnotateAttr
cursors.

M  +6    -0    languages/clang/duchain/CMakeLists.txt
M  +24   -0    languages/clang/duchain/builder.cpp
M  +24   -2    languages/clang/duchain/parsesession.cpp
A  +57   -0    languages/clang/duchain/wrappedQtHeaders/QtCore/qobjectdefs.h   
 [License: GPL (v3)]
M  +62   -0    languages/clang/tests/test_duchain.cpp
M  +1    -0    languages/clang/tests/test_duchain.h

http://commits.kde.org/kdevelop/0474b1a0063c32abc9d89143bc2343db4d21b7f7

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to