[PATCH] Fix KApplication for non-gui apps

Waldo Bastian bastian at kde.org
Thu Feb 17 11:09:01 GMT 2005


On Thursday 17 February 2005 03:40, George Staikos wrote:
>    This evening, on the second most lousy flight I've ever been on (Air
> Canada can really suck sometimes), I got a chance to implement this patch
> for KApplication that Lars and I (well, mostly Lars) came up with.  It
> should fix the problems with creating a pixmap in non-gui mode.  It seems
> to be binary compatible, but it needs testing on different platforms.  Any
> comments?

I think it can fail to be BC when you have different alignment constraints. 
You can have padding between the two QPixmaps, between the two pointers and 
between the pointer and the char[] array.

Something like:

  struct oldPixmapType { QPixmap a; QPixmap b; };
  union {
     struct { QPixmap *icon; QPixmap *miniIcon; } pm;
     char padding[sizeof(oldPixmapType)];
  } aIconPixmap;

seems more reliable imho.

Cheers,
Waldo
-- 
bastian at kde.org   |   Free Novell Linux Desktop 9 Evaluation Download
bastian at suse.com  |   http://www.novell.com/products/desktop/eval.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050217/dd4d9ff3/attachment.sig>


More information about the kde-core-devel mailing list