diff qt/qtd/MetaMarshall.d @ 323:7a3c43424dca signals

make all examples compile with new signals/slots
author eldar_ins@eldar-laptop
date Mon, 28 Dec 2009 16:28:55 +0500
parents 894d40eb89b6
children 4e31cbd9e20c
line wrap: on
line diff
--- a/qt/qtd/MetaMarshall.d	Sun Dec 27 21:13:38 2009 +0500
+++ b/qt/qtd/MetaMarshall.d	Mon Dec 28 16:28:55 2009 +0500
@@ -77,7 +77,7 @@
 string convertSignalArgument(T)(string arg)
 {
     static if (isQObjectType!T || isObjectType!T)
-        return "&" ~ arg ~ ".__nativeId";
+        return arg ~ " ? " "&" ~ arg ~ ".__nativeId : cast(void**) &" ~ arg; // since it is a pointer type check arg for null
     else static if (isValueType!T)
         return arg ~ ".__nativeId";
     else static if (isStringType!T)