> On Saturday, 24 de September de 2011 13:33:43 Peter Kuemmel wrote: > > With Qt5 it is possible to introduce new features which make > > things possible which are impossible with Qt4. > > And such a new feature would be moc-generated headers. > > Yes, we could do that. I just don't like it. >
Template based code always looks different, but connect(ptr, SIGNAL(...), receiver, SLOT(...))) also looks alien to C++ purists. > > I know, most C++-purists don't like it, and at the moment there > > is the idea to make Qt5 more C++/std-only. But Qt will always > > need the moc preprocessor, and this is because of the lack of > > some features in C++. > > > > C++ is a multi-paradigm programming language, and moc only adds > > another paradigm. So why not introducing more code-generation by > > supporting moc-generated headers? I'm sure this will simplify > > things in future, and makes new things possible, because with the > > C-preprocessor and templates not all ideas could be implemented. > > Uic does exactly that: it produces code you're supposed to #include and > use in > your own code. Some other code generators do the same thing. > > As for moc doing the same... why would we need it? What is the need? I > pointed > out the flaw in your design, but I still don't like the new syntax. We're > still > trying to keep source compatibility... > Old QObject::connect code for source compatibility, new code for typed connects, why should this be a problem? > What's more, if this is an *installed* header, we need to make sure that > the > output from moc stays binary compatible on all compilers until Qt 6. We've > done changes to moc several times during the 4.x lifetime. > Then the generated header should only changed binary compatible. I don't see a problem there. When there is any chance for generated headers I try complete by demo code. Peter -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de _______________________________________________ Qt5-feedback mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
