Mercurial > projects > qtd
diff d2/qt/core/QList.d @ 372:a032df77b6ab
Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
author | Max Samukha <maxter@spambox.com> |
---|---|
date | Thu, 08 Jul 2010 17:19:05 +0300 |
parents | 9784459f0750 |
children | e67ce7c21758 |
line wrap: on
line diff
--- a/d2/qt/core/QList.d Sun Jul 04 14:17:49 2010 +0100 +++ b/d2/qt/core/QList.d Thu Jul 08 17:19:05 2010 +0300 @@ -345,7 +345,7 @@ else static if (isValueType!T) { void* ptr = cast(void*)(isLarge!T() || isStatic!T() ? v : &this); - return new T(ptr, QtdObjectFlags.nativeOwnership); + return new T(ptr, QtdObjectInitFlags.nativeOwnership); } else { @@ -482,14 +482,14 @@ static if (isValueType!T) { if (isLarge!T() || isStatic!T()) // TODO should be static if - n.v = T.__constructNativeCopy(t.__nativeId); // n.v = new T(t); + n.v = T.__constructNativeCopy(t.qtdNativeId); // n.v = new T(t); else if (isComplex!T()) - T.__constructPlacedNativeCopy(t.__nativeId, n); // new (n) T(t); + T.__constructPlacedNativeCopy(t.qtdNativeId, n); // new (n) T(t); else - T.__constructPlacedNativeCopy(t.__nativeId, n); // TODO should be *cast(T*)(n) = cast(T)(t); as it is a primitive type. fix when they are implemented with structs + T.__constructPlacedNativeCopy(t.qtdNativeId, n); // TODO should be *cast(T*)(n) = cast(T)(t); as it is a primitive type. fix when they are implemented with structs } else // in case of QObject or Object Qt types we place a pointer to a native object in the node - n = cast(Node*) t.__nativeId; + n = cast(Node*) t.qtdNativeId; } else static if (is(T == string)) { @@ -543,7 +543,7 @@ for(int i = 0; i < res.length; ++i) { static if (isValueType!T) - res[i] = new T(T.__constructNativeCopy(this.at(i).__nativeId)); // Node should probably provide a ptr method to directly extract pointer to the native value stored in the list to avoid creating a dummy D object in t() + res[i] = new T(T.__constructNativeCopy(this.at(i).qtdNativeId)); // Node should probably provide a ptr method to directly extract pointer to the native value stored in the list to avoid creating a dummy D object in t() else res[i] = this.opIndex(i); }