Q_PROPERTY is c++ macros?
-
Hi.
See following useful links
"moc":http://qt-project.org/doc/qt-5/metaobjects.html#meta-object-system
Hope this helps.
-
Please keep in mind that Qt is already quite old. Chances are, that if it were designed from the ground up today, it would not come up with moc again. However, back in the day, template support in C++ was still in its infancy, and Qt has needed to support compilers for lots of different platforms over the years, some of which with quite old toolchains. Also, computers were less powerfull back then.
So, it might be possible that if Qt were designed today, the issues that moc is now solving would have been approached differently, perhaps with templates. Or not.
There is even experimental work around that basically replaces moc with Clang extensions. Extremely cool. Clang allows you to augment the actual compiler, and so it becomes possible to define your own keywords and insert code based on this. Last I heard from it, it produces working code... But as we cannot all rely on Clang, and other compilers that Qt is supporting don't offer the same functionality yet, I think we're going to be stuck with moc for a while longer.
-
I recommend to look at here is what kind of tools:
http://clang.llvm.org/docs/ClangTools.htmlUse then if new api lost backward compatibility