[Qt-interest] Can you spot my mistake.

Scott Aron Bloom Scott.Bloom at sabgroup.com
Mon Aug 24 01:40:20 CEST 2009


Well... I beat the 60 seconds by about 55.. Ive been burned by it once..
and so I know what to look for...
Scott
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of
william.crocker at analog.com
Sent: Sunday, August 23, 2009 4:13 PM
Cc: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Can you spot my mistake.


> Your myapp constructor doenst take in a reference to argc
>

That is correct.
Easy to miss and of dire consequences.

> Scott
> 
> -----Original Message----
>
> Hello list:
> 
> This is a test.
> 
> There is a user error in the following code.
> The run-time behavior (on Linux/X11) was
> especially insidious.
> 
> You have 60 seconds to find my mistake.
> It took me 6 hours, but it was embedded
> in the other 100K lines of code in my app
> and the bad behavior did not appear until
> days after the mistake, so I am excused.  :-)
> 
> Good luck. GO.
> 
> Bill
> 
> ---------------------------------------
> 
> #include <QtGui>
> 
> class MyApp : public QApplication {
>    Q_OBJECT
>    public:
>      MyApp( int argc, char **argv ) : QApplication(argc,argv) { }
> } ;
> 
> int
> main( int argc, char **argv ) {
>      MyApp myapp(argc,argv);
>      /* rest of the app here. */
>      return 0;
> }
> 
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
> 
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list