PDA

View Full Version : Qt Quarterly mistake



munna
15th June 2006, 15:06
Hi,

I was going through this (http://doc.trolltech.com/qq/qq17-ratecontrol.html) example and I think there is a mistake. Can some one please confirm this?

In the class RateController a QTimer object called stopWatch is declared. But in the function transfer() it is used to find the elapsed time. Shouldn't this object be "QTime stopWatch" ?

Thanks for your time.

wysota
15th June 2006, 15:16
Looks that you're right.

bits
20th June 2006, 19:08
In Qt Quarterly no. 8:

In Signal Multiplexer (http://doc.trolltech.com/qq/qq08-action-multiplexer.html#updatingactions)

There is a slight typo.



class DocumentObject
{
public:
virtual DocumentObject() {}
virtual void emitAllSignals() = 0;
};


I think they mean a virtual destructor. '~' is missing in virtual DocumentObject() {}