Mercurial > projects > qtd
changeset 299:87db643519a4 signals
missing bits prior to getting it compiled on windows
author | eldar |
---|---|
date | Sun, 06 Dec 2009 22:20:23 +0000 |
parents | adae77fdc1ea |
children | c2c70e501860 |
files | qt/core/QList.d |
diffstat | 1 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/qt/core/QList.d Sun Dec 06 17:26:37 2009 +0000 +++ b/qt/core/QList.d Sun Dec 06 22:20:23 2009 +0000 @@ -427,7 +427,6 @@ free(x); } - void append(const T t) // fix to const ref for complex types TODO { detach(); @@ -457,7 +456,7 @@ } else { - const (T) at(int i) const + const (T) at(int i) const // DMD BUG { assert(i >= 0 && i < p.size(), "QList!T.at(): index out of range"); return (cast(Node*)(p.at(i))).t(); @@ -601,6 +600,21 @@ } } +alias QList!string QStringList; + +QList!T toQList(T)(T[] src) +{ + auto res = QList!T.opCall(); + foreach(elem; src) + res.append(elem); + return res; +} + +QList!T qList(T)() +{ + return QList!T.opCall(); +} + extern(C) void qtd_create_QList(void *nativeId); extern(C) void qtd_create_QList_double(void *nativeId);