[PATCH] Fix KApplication for non-gui apps

Clarence Dang dang at kde.org
Thu Feb 17 10:13:39 GMT 2005


On Thu, 17 Feb 2005 01:40 pm, 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?

-  QPixmap aIconPixmap;
-  QPixmap aMiniIconPixmap;
+  mutable QPixmap *aIconPixmap;
+  mutable QPixmap *aMiniIconPixmap;
+  char unused[sizeof(QPixmap)*2 - sizeof(QPixmap*)*2];

Aren't you making an assumption that the padding between the 2 QPixmap's is 
equal to that between the 2 QPixmap *'s?




More information about the kde-core-devel mailing list