[Qt-interest] Qt 4.5.0 upgrade issues
R. Reucher
rene.reucher at batcom-it.net
Thu Apr 9 19:00:38 CEST 2009
On Thu April 9 2009 18:43:44 Cecilia Castillo wrote:
> We recently upgraded to Qt 4.5.0 and we are not getting some warning
> messages which we did not get before. They do not seem to cause
> problems but I am wondering if there is a way to prevent or supress
> these messages or if they indicate some problem which we need to
> handle.
>
> We sometimes get the following message:
> Cannot have negative number of samples per pixel -16777216
You seem to be getting complementary values, like in case of a signed
(24-bit?) integer. I'd assume this is a bug and you should take a look at
your code...
If you want "suppress" those warnings, you may use something like this (I do
not recommend to really suppress them, but perhaps you want them not to
irritate your users, so you should consider writing them to some debug output
file perhaps!?):
...
void myQtMessageHandler(QtMsgType type, const char *msg)
{
switch ( type ) {
case QtDebugMsg:
myLogFunction("QtDebugMsg: " + QString(msg));
break;
case QtWarningMsg:
myLogFunction("QtWarningMsg: " + QString(msg));
break;
case QtCriticalMsg:
myLogFunction("QtCriticalMsg: " + QString(msg));
break;
case QtFatalMsg:
myLogFuntion("QtFatalMsg: " + QString(msg));
break;
default:
break;
}
}
...
int main(int argc, char *argv[])
{
...
// install message handler
qInstallMsgHandler(myQtMessageHandler);
...
}
...
> And we always get this message when running on the Mac (10.4)
>
> 2009-04-02 12:43:23.319 draco[6036] WARNING:
> _wrapRunLoopWithAutoreleasePoolHandler got kCFRunLoopExit, but there
> are no autorelease pools in the stack.
Sorry, I have no idea on this one...
HTH, René
--
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/
Marriage is the only adventure open to the cowardly.
-- Voltaire
More information about the Qt-interest-old
mailing list