Hi Trenton,

Is this fix included in Qt4.5 RC1? Or only in the latest snapshot 
(qt-all-commercial-src-4.5.0-snapshot-20090205.tar.gz)?

Also I assume the RC1 Mac libraries were built with carbon framework by default 
and I would have to rebuild with -cocoa. Please confirm.

Thanks,
--Niti
 
------------------------------

Message: 2
Date: Thu, 5 Feb 2009 15:03:50 +0100
From: Trenton Schulz <[email protected]>
Subject: Re: [Qt4-preview-feedback] Qt 4.5 Cocoa EXEC_BAD_ACCESS
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 2009-02-03 20:30:57 +0100, Niti Hantaweepant <[email protected]> said:

> 
> Hi everyone,
> 
> I've built Qt 4.5 on Mac Leopard with -arch cocoa flag. With the built Qt f=
> ramework using the Cocoa framework, without changing any code I got the sig=
> nal "EXEC_BAD_ACCESS" at QPaintEngine::setSystemClip when running my applic=
> ation.
> 
> The call stack is attached below. Basically the following line is the code =
> in main.cpp.
> 
> 
>  result =3D app->exec();  // app is QApplication object
> 
> 
> Before running into this EXEC_BAD_ACCESS, the program tried to create a new=
>  QScrollArea/QWidget as a child to QMainWindow, the following are the code =
> executed before:
> 
> 
> 
> DocWindow *AppWindow::createDocWindow()   // AppWindow is a class inherited=
>  from QMainWindow
> 
> {
> 
> DocWindow *child =3D new DocWindow(this);   // DocWindow is an object of cl=
> ass inherited from QScrollArea
> 
> 
> 
> workspace->addWindow(child);              // workspace is a pointer to QWor=
> kspace object
> 
> connect(child, SIGNAL( aboutToClose( DocWindow* ) ), this, SLOT( docWindowC=
> losing( DocWindow* ) ));
> 
> }
> 
> DocWindow::DocWindow( AppWindow* appWin ):
>                 fAGMArea( new AGMArea( this ) )
> {
> 
>       setAttribute(Qt::WA_DeleteOnClose);
> 
>       setAttribute(Qt::WA_InputMethodEnabled );
> 
>       setWidget( &(*fAGMArea) );    // fAGMArea is an object of class inher=
> ited from QWidget
> }
> 
> Can you please advise what could go wrong here and if I need to change my c=
> ode to use the new Qt with Cocoa framework? Note that this code works fine =
> with Qt 4.4.3 using Carbon framework. Qt support suggested the code should =
> work in the same way with Qt 4.4 and I should send this query to this list.

Hi Niti,

I believe this was fixed late last week. Basically, you have a widget 
that returns a null paint engine and we weren't taking care of that 
situation in the Cocoa port. I'd advise trying the lastest snapshot and 
seeing if that solves your problem.

-- Trenton



_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to