Mercurial > projects > qtd
comparison 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 |
comparison
equal
deleted
inserted
replaced
322:7c2cf27391c4 | 323:7a3c43424dca |
---|---|
75 | 75 |
76 // converts an argument from D to C++ in a signal emitter | 76 // converts an argument from D to C++ in a signal emitter |
77 string convertSignalArgument(T)(string arg) | 77 string convertSignalArgument(T)(string arg) |
78 { | 78 { |
79 static if (isQObjectType!T || isObjectType!T) | 79 static if (isQObjectType!T || isObjectType!T) |
80 return "&" ~ arg ~ ".__nativeId"; | 80 return arg ~ " ? " "&" ~ arg ~ ".__nativeId : cast(void**) &" ~ arg; // since it is a pointer type check arg for null |
81 else static if (isValueType!T) | 81 else static if (isValueType!T) |
82 return arg ~ ".__nativeId"; | 82 return arg ~ ".__nativeId"; |
83 else static if (isStringType!T) | 83 else static if (isStringType!T) |
84 return "&_qt" ~ arg; | 84 return "&_qt" ~ arg; |
85 else static if (isNativeType!T) | 85 else static if (isNativeType!T) |