Mercurial > projects > qtd
comparison qt/core/QTypeInfo.d @ 296:5173835bb372 signals
iteration over QList with opApply
author | eldar |
---|---|
date | Sun, 22 Nov 2009 20:43:10 +0000 |
parents | 463563fc9e17 |
children | bc783e20da2b |
comparison
equal
deleted
inserted
replaced
295:463563fc9e17 | 296:5173835bb372 |
---|---|
7 The catch-all template. | 7 The catch-all template. |
8 */ | 8 */ |
9 import std.traits; | 9 import std.traits; |
10 | 10 |
11 import qt.qtd.MetaMarshall; | 11 import qt.qtd.MetaMarshall; |
12 import qt.core.QString; | |
12 | 13 |
13 bool qIsDetached(T)(ref T) { return true; } | 14 bool qIsDetached(T)(ref T) { return true; } |
14 | 15 |
15 template isBasicType(T) | 16 template isBasicType(T) |
16 { | 17 { |
17 enum isBasicType = isNumeric!T || is(T == bool); | 18 enum isBasicType = isNumeric!T || is(T == bool); |
18 } | 19 } |
19 | 20 |
20 template QTypeInfo(T) | 21 template QTypeInfo(T) |
21 { | 22 { |
22 static if(isBasicType!T) | 23 static if(is(T == string)) |
24 { | |
25 alias QString.QTypeInfo QTypeInfo; | |
26 } | |
27 else static if(isBasicType!T) | |
23 { | 28 { |
24 public enum | 29 public enum |
25 { | 30 { |
26 isPointer = false, | 31 isPointer = false, |
27 isComplex = false, | 32 isComplex = false, |