pyzhangxiang / moc-ng Goto Github PK
View Code? Open in Web Editor NEWThis project forked from woboq/moc-ng
License: GNU General Public License v3.0
This project forked from woboq/moc-ng
License: GNU General Public License v3.0
moc-ng: a replacement for Qt's moc that is using clang libraries This is really two project: * A plugin for clang which removes the needs of running moc if your code is compiled with this plugin. * A replacement for moc that aim to be compatible with qt's moc, but uses the clang libraries for the parsing step. Read the blog post: http://woboq.com/blog/moc-with-clang.html BROWSE SOURCE CODE ONLINE: http://code.woboq.org/mocng/src/ COMPILE: You need llvm and clang (3.2 or 3.3). Then run cmake and make (adapt your paths) cmake . -DCMAKE_CXX_COMPILER=/opt/llvm/bin/clang++ -DLLVM_CONFIG_EXECUTABLE=/opt/llvm/bin/llvm-config make USE: * As a binary: replace the moc provided by Qt by the one which is in src/moc * As a clang plugin: Tell your build system not to run moc, and add this to the CXXFLAGS -Xclang -load -Xclang /path/to/src/libmocng_plugin.so -Xclang -add-plugin -Xclang moc PROBLEMS? Make sure that the Qt include paths (and other include paths) are correctly passed to moc via the -I option Report bugs on github: https://github.com/woboq/moc-ng/issues TESTS: Replace the moc binary in the builddir (qtbase/bin/moc) and run the tests. Known issue: * FAIL! : tst_QObject::normalize() 'object.connect(&object, SIGNAL(unsignedlongintSignal(unsigned long int)), SLOT(unsignedlongintSlot(unsigned long int)))' returned FALSE. () Because unsigned long int don't have the right metatype according to Qt. And clang looses the "int" in "long int" * tst_qmetaobjectbuilder reimplements its own metaobject but still is Q_OBJECT_CHECK which we use to detect it is a QObject (if moc is in the paths:) * FAIL! : tst_Moc::warnings FAIL! : tst_Moc::warnOnExtraSignalSlotQualifiaction FAIL! : tst_Moc::warnOnMultipleInheritance FAIL! : tst_Moc::forgottenQInterface FAIL! : tst_Moc::defineMacroViaCmdline FAIL! : tst_Moc::warnOnPropertyWithoutREAD FAIL! : tst_Moc::warnOnVirtualSignal FAIL! : tst_Moc::notifyError The wording of the warnings is not the same with moc ng (it is better) * FAIL! : tst_Moc::ignoreOptionClashes Small difference in the handling of the options * FAIL! : tst_Moc::frameworkSearchPath Not implemented * FAIL! : tst_Moc::templateGtGt() the header don't include QObject * FAIL! : tst_Moc::unterminatedFunctionMacro() moc -E to preprocess nehave differently
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.