Mercurial > projects > qtd
diff qt/d2/qt/core/QModelIndex.d @ 248:7664de4a55e5
Fixed #23.
QtD_QObjectEntity is not created dynamically for shell classes any more.
Class initialization is now performed by static constructors.
When wrapping QObjects returned from functions, their run-time types are now taken into account.
QObjects are allocated on GC heap, a doubly-linked list is used to prevent them from been collected (arguably a better solution than allocating on C heap and adding GC ranges)
Minor changes (including unnecessary).
author | maxter |
---|---|
date | Thu, 20 Aug 2009 14:47:17 +0000 |
parents | 08318bfd6833 |
children | 37eed70de029 |
line wrap: on
line diff
--- a/qt/d2/qt/core/QModelIndex.d Fri Jul 31 11:05:22 2009 +0000 +++ b/qt/d2/qt/core/QModelIndex.d Thu Aug 20 14:47:17 2009 +0000 @@ -1,7 +1,7 @@ module qt.core.QModelIndex; public import qt.QGlobal; -private import qt.QtDObject; +private import qt.core.QObject; // automatic imports------------- private import qt.core.QVariant; @@ -17,7 +17,7 @@ mi.p = mi.m = null; return mi; } - + public final QModelIndex child(int row, int column) { return __qtd_QModelIndex_child_int_int(&this, row, column); } @@ -28,7 +28,7 @@ public final QVariant data(int role = 0) { void* __qt_return_value = __qtd_QModelIndex_data_int(&this, role); - return new QVariant(__qt_return_value, false); + return new QVariant(__qt_return_value); } public final int flags() { @@ -57,7 +57,7 @@ void* __qt_return_value = m; if (__qt_return_value is null) return null; - void* d_obj = __QObject_entity(__qt_return_value); + void* d_obj = qtd_get_d_qobject(__qt_return_value); return cast(QAbstractItemModel) d_obj; }