Linked by Thom Holwerda on Tue 21st Sep 2010 21:32 UTC, submitted by diegocg
Qt After many months of designing, coding, reviewing, testing and documenting, Qt 4.7.0 is finally ready for the big time. Although it's a little more than nine months since Qt's last feature release (4.6.0 on December 1, 2009), the seeds of some of the new stuff in 4.7 were sown much earlier. Indeed, many of the ideas behind the biggest new feature in Qt 4.7.0, Qt Quick, were born more than two years ago, not long after Qt 4.4 was released
Thread beginning with comment 442464
To view parent comment, click here.
To read all comments associated with this story, please click here.
mart
Member since:
2005-11-17


It's not. The Signals And Slots mechanism requires the MOC.


that is in turn pure c++
now one can debate if auto generated code is a good thing or not, but if you open a moc file you'll find nothing but perfectly valid c++

Reply Parent Score: 2

axilmar Member since:
2006-03-20

"
It's not. The Signals And Slots mechanism requires the MOC.


that is in turn pure c++
now one can debate if auto generated code is a good thing or not, but if you open a moc file you'll find nothing but perfectly valid c++
"

You didn't get it. Qt is not pure C++ because it requires an external tool other than the compiler itself.

Reply Parent Score: 2

anda_skoa Member since:
2005-07-07

You didn't get it. Qt is not pure C++ because it requires an external tool other than the compiler itself.


No, mart is right. All code necessary for Qt applications are pure C++, compilable with basically all C++ compilers available today.

It also comes with a set of tools that allow developers to automate certain tasks or avoid having to write boilerplate code again and again.

These code generators, e.g. qmake, moc or uic, take an input file which is easier to write, read and maintain than the code which is actually required.

qmake takes a simple text based project file and generates platform specific makefiles or even IDE project files. While writing Makefiles might still be possible manually (or writing shell scripts that contain all compiler invocations), this would be pretty difficult for IDE project files.

moc doesn't require an additional input file, it gets its input from the usual source and header files and generates C++ code. Again these can obviously also be written manually, but that would be quite boring.

uic takes XML bases files which describe UI forms and, again generates C++ code. Doing that manually is again possible, but doing UI visually is gives a developer an early impression on how it will look like and even allows non-developers (e.g. designers) to work on UI parts.

Tools that help development by generating code of some sort are quite common. Almost no build is done manually but through a build system with an easier input format (aside from qmake, e.g. cmake, autotools, ant/maven).

My guess is that this is why developers usually don't talk about compilers as stand alone entities but as part of their tool chain.
Because it is just so common that more than one tool is involved in building software

Edit: trying to fix quoting

Edited 2010-09-24 13:06 UTC

Reply Parent Score: 2

Morty Member since:
2005-07-06

"[q] It's not. The Signals And Slots mechanism requires the MOC.
that is in turn pure c++ now one can debate if auto generated code is a good thing or not, but if you open a moc file you'll find nothing but perfectly valid c++ " You didn't get it. Qt is not pure C++ because it requires an external tool other than the compiler itself. [/q]
Since you are not requred to use MOC to utilize the Qt libraries, it's by your own reasoning pure C++. Since nothing stops you from manually write the pure C++ code that MOC generates, rather than having MOC generate it for you. That it would be a totally stupid and pointless thing to do, is another issue altogheter. Much like arguing against Qt on grounds of it not being "pure" C++.

Reply Parent Score: 2

mart Member since:
2005-11-17

You didn't get it. Qt is not pure C++ because it requires an external tool other than the compiler itself.

requiring a tool to generate code and being another language is a tad different.
everything that the programmer writes validates perfectly, and that for me closes it.

Reply Parent Score: 1