[PATCH]QT_WIN32_3_3_BRANCH-GDI Leak

REGAT-BARREL Aurelien arbvtk at yahoo.fr
Tue Dec 14 17:00:06 CET 2004


Hi,
Yes qmake can generate VC++ project files, I don't know if it can generate VC++ >= 7 solutions (a solution = a project of projects). But I don't know how to tell it to qmake (-t vcapp) from the .bat files.
Yes Trolltech is indefensible since they released the GPL version for Mac. Windows users are considered as cash cow :-(
 
Regards

Chris January <chris at atomice.net> wrote:
I thought I'd also saw the problem even when I disabed the window procedures (and hence all painting) but maybe that's my imagination.
 
I thought qmake could generate VC++ project files but maybe I'm wrong there. Personally I use Borland CBuilderX since the Borland incremental linker is much faster than the Microsoft or GNU one.
 
The Trolltech position of this port is unknown. They know it exists and they've never complained about it. They have said they won't release a GPL version of Qt/Win32 but their reasoning has become indefensible since they released the GPL Mac OS X version.
As for legal issues - there are none we are aware of. We do have to be careful no code slips on from the commercial version of Qt (or any other imcompatibly licensed product for that matter).
 
Chris


---------------------------------
From: REGAT-BARREL Aurélien [mailto:arbvtk at yahoo.fr] 
Sent: 14 December 2004 13:49
To: kde-cygwin at kde.org
Subject: RE: [PATCH]QT_WIN32_3_3_BRANCH-GDI Leak



Hi,
Sorry, I didn't subscribe to the ml, I didn't find a link to do it from the project page.
Yes, the problem you describe is what I found. This behaviour (widgets become dark/black, whole screen becomes corrupted...) is typically due to a GDI leak. I ran this tool:
http://msdn.microsoft.com/msdnmag/issues/03/01/GDILeaks/
and it appeared that it was a GDI pen leak (hundreds of pens no freed). So I looked for CreatePen and quickly found the guilty. Now it works fine (after removing this 2 lines).
There is another problem with erasing. I didn't find why it causes flickering. There are other problems too (mouse moves cause flickering too, etc...). I can't spend much time, for now, but later I will try to help you. I use Visual C++ 2003 and I was unable to create VC++ project files with qmake & .pro files. It is annoying because without the debuger & source code navigation I am lost :-) Is there a trick ?
What is the position of Trolltech about this port ? Can we use it without worry ?
 
Regards.
 
    Thanks for this. Can you explain exactly what problems you were seeing with
    painting?
     
    There is a long-standing problem with example programs such as scrollview
    (resize the window few time to see what I mean) where painting in the window
    and even the whole screen becomes corrupted. I think I've narrowed this down
    to the window hierachy but maybe you have some ideas that could help?
     
    Chris
    Hi,
    This is my first post to this ml so excuse me if I am doing something wrong
    :-)
    I downloaded and tried qt-3 QT_WIN32_3_3_BRANCH. It quickly appeared that
    there was a problem with painting. I ran GDI leaks detection tools and found
    a problem with pens. The problem is in kernel/qpainter_win.cpp, line 2887:
            HPEN pen = CreatePen (PS_SOLID, 1, RGB (0, 0, 0));
            SelectObject (hdc, hpen);
    note the use of pen with CreatePen and hpen with SelectObject. I simply
    removed this 2 lines, and it works better now.
    I hope this helps.



Aurelien REGAT-BARREL 




		
---------------------------------
 Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail

  Avec Yahoo! faites un don et soutenez le Téléthon !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-cygwin/attachments/20041214/d7e34999/attachment-0001.html


More information about the kde-cygwin mailing list