comparison qt/d1/qt/core/QVariant.d @ 254:34a37904ff77

(none)
author maxter
date Sun, 30 Aug 2009 10:59:56 +0000
parents 37eed70de029
children 17b5e13364b7
comparison
equal deleted inserted replaced
253:073b9153ed8a 254:34a37904ff77
1 module qt.core.QVariant; 1 module qt.core.QVariant;
2 2
3 public import qt.QGlobal; 3 public import qt.QGlobal;
4 private import qt.QtDObject; 4 private import qt.QtdObject;
5 private import qt.core.QMetaType; 5 private import qt.core.QMetaType;
6 6
7 // automatic imports------------- 7 // automatic imports-------------
8 private import qt.core.QSizeF; 8 private import qt.core.QSizeF;
9 private import qt.core.QPoint; 9 private import qt.core.QPoint;
31 import tango.text.convert.Utf; 31 import tango.text.convert.Utf;
32 import tango.core.Traits; 32 import tango.core.Traits;
33 } 33 }
34 34
35 35
36 public class QVariant : QtDObject 36 public class QVariant : QtdObject
37 { 37 {
38 enum Type { 38 enum Type {
39 Invalid = 0, 39 Invalid = 0,
40 40
41 Bool = 1, 41 Bool = 1,
91 91
92 UserType = 127, 92 UserType = 127,
93 93
94 LastType = 0xffffffff // need this so that gcc >= 3.4 allocates 32 bits for Type 94 LastType = 0xffffffff // need this so that gcc >= 3.4 allocates 32 bits for Type
95 } 95 }
96 96
97 // Functions 97 // Functions
98 98
99 private template getMetaId() 99 private template getMetaId()
100 { 100 {
101 const char[] getMetaId = " 101 const char[] getMetaId = "
102 int i = qtd_MetatypeId(toStringz(name)); 102 int i = qtd_MetatypeId(toStringz(name));
103 if(i <= 0) 103 if(i <= 0)
104 i = qRegisterMetaType!(T)(name);"; 104 i = qRegisterMetaType!(T)(name);";
105 } 105 }
106 106
107 static public QVariant fromValue(T)(T obj) 107 static public QVariant fromValue(T)(T obj)
108 { 108 {
109 QVariant var; 109 QVariant var;
110 static if (is(T == class) || is(T == interface)) 110 static if (is(T == class) || is(T == interface))
111 { 111 {
129 *data = obj; 129 *data = obj;
130 var = new QVariant(i, cast(void*)(data)); 130 var = new QVariant(i, cast(void*)(data));
131 } 131 }
132 return var; 132 return var;
133 } 133 }
134 134
135 static public QVariant opCall(T)(T obj) 135 static public QVariant opCall(T)(T obj)
136 { 136 {
137 return fromValue(obj); 137 return fromValue(obj);
138 } 138 }
139 139
142 super(__qt_return_value); 142 super(__qt_return_value);
143 } 143 }
144 144
145 145
146 public this(QDataStream s) { 146 public this(QDataStream s) {
147 void* __qt_return_value = qtd_QVariant_QVariant_QDataStream(s is null ? null : s.nativeId); 147 void* __qt_return_value = qtd_QVariant_QVariant_QDataStream(s is null ? null : s.__nativeId);
148 super(__qt_return_value); 148 super(__qt_return_value);
149 } 149 }
150 150
151 151
152 public this(Qt.GlobalColor color) { 152 public this(Qt.GlobalColor color) {
160 super(__qt_return_value); 160 super(__qt_return_value);
161 } 161 }
162 162
163 163
164 public this(QBitArray bitarray) { 164 public this(QBitArray bitarray) {
165 void* __qt_return_value = qtd_QVariant_QVariant_QBitArray(bitarray is null ? null : bitarray.nativeId); 165 void* __qt_return_value = qtd_QVariant_QVariant_QBitArray(bitarray is null ? null : bitarray.__nativeId);
166 super(__qt_return_value); 166 super(__qt_return_value);
167 } 167 }
168 168
169 169
170 public this(QByteArray bytearray) { 170 public this(QByteArray bytearray) {
171 void* __qt_return_value = qtd_QVariant_QVariant_QByteArray(bytearray is null ? null : bytearray.nativeId); 171 void* __qt_return_value = qtd_QVariant_QVariant_QByteArray(bytearray is null ? null : bytearray.__nativeId);
172 super(__qt_return_value); 172 super(__qt_return_value);
173 } 173 }
174 174
175 175
176 public this(QDate date) { 176 public this(QDate date) {
177 void* __qt_return_value = qtd_QVariant_QVariant_QDate(date is null ? null : date.nativeId); 177 void* __qt_return_value = qtd_QVariant_QVariant_QDate(date is null ? null : date.__nativeId);
178 super(__qt_return_value); 178 super(__qt_return_value);
179 } 179 }
180 180
181 181
182 public this(QDateTime datetime) { 182 public this(QDateTime datetime) {
183 void* __qt_return_value = qtd_QVariant_QVariant_QDateTime(datetime is null ? null : datetime.nativeId); 183 void* __qt_return_value = qtd_QVariant_QVariant_QDateTime(datetime is null ? null : datetime.__nativeId);
184 super(__qt_return_value); 184 super(__qt_return_value);
185 } 185 }
186 186
187 187
188 public this(string str) { 188 public this(string str) {
202 super(__qt_return_value); 202 super(__qt_return_value);
203 } 203 }
204 204
205 205
206 public this(QLocale locale) { 206 public this(QLocale locale) {
207 void* __qt_return_value = qtd_QVariant_QVariant_QLocale(locale is null ? null : locale.nativeId); 207 void* __qt_return_value = qtd_QVariant_QVariant_QLocale(locale is null ? null : locale.__nativeId);
208 super(__qt_return_value); 208 super(__qt_return_value);
209 } 209 }
210 210
211 211
212 public this(QPoint pt) { 212 public this(QPoint pt) {
232 super(__qt_return_value); 232 super(__qt_return_value);
233 } 233 }
234 234
235 235
236 public this(QRegExp regExp) { 236 public this(QRegExp regExp) {
237 void* __qt_return_value = qtd_QVariant_QVariant_QRegExp(regExp is null ? null : regExp.nativeId); 237 void* __qt_return_value = qtd_QVariant_QVariant_QRegExp(regExp is null ? null : regExp.__nativeId);
238 super(__qt_return_value); 238 super(__qt_return_value);
239 } 239 }
240 240
241 241
242 public this(QSize size) { 242 public this(QSize size) {
250 super(__qt_return_value); 250 super(__qt_return_value);
251 } 251 }
252 252
253 253
254 public this(QTime time) { 254 public this(QTime time) {
255 void* __qt_return_value = qtd_QVariant_QVariant_QTime(time is null ? null : time.nativeId); 255 void* __qt_return_value = qtd_QVariant_QVariant_QTime(time is null ? null : time.__nativeId);
256 super(__qt_return_value); 256 super(__qt_return_value);
257 } 257 }
258 258
259 259
260 public this(QUrl url) { 260 public this(QUrl url) {
261 void* __qt_return_value = qtd_QVariant_QVariant_QUrl(url is null ? null : url.nativeId); 261 void* __qt_return_value = qtd_QVariant_QVariant_QUrl(url is null ? null : url.__nativeId);
262 super(__qt_return_value); 262 super(__qt_return_value);
263 } 263 }
264 264
265 265
266 public this(QVariant other) { 266 public this(QVariant other) {
267 void* __qt_return_value = qtd_QVariant_QVariant_QVariant(other is null ? null : other.nativeId); 267 void* __qt_return_value = qtd_QVariant_QVariant_QVariant(other is null ? null : other.__nativeId);
268 super(__qt_return_value); 268 super(__qt_return_value);
269 } 269 }
270 270
271 /* 271 /*
272 public this(char* str) { 272 public this(char* str) {
312 312
313 private final bool canConvertImpl(string name) 313 private final bool canConvertImpl(string name)
314 { 314 {
315 int i = qtd_MetatypeId(toStringz(name)); 315 int i = qtd_MetatypeId(toStringz(name));
316 assert(i > 0); 316 assert(i > 0);
317 return qtd_QVariant_canConvert(nativeId, i); 317 return qtd_QVariant_canConvert(__nativeId, i);
318 } 318 }
319 319
320 public final bool canConvert(Type)() { 320 public final bool canConvert(Type)() {
321 static if ( is(Type == QBitArray) ) 321 static if ( is(Type == QBitArray) )
322 return canConvertImpl("QBitArray"); 322 return canConvertImpl("QBitArray");
357 else static if ( is(Type == string) ) 357 else static if ( is(Type == string) )
358 return canConvertImpl("QString"); 358 return canConvertImpl("QString");
359 else static if ( is(Type == QTime) ) 359 else static if ( is(Type == QTime) )
360 return canConvertImpl("QTime"); 360 return canConvertImpl("QTime");
361 else static if ( is(Type == uint) ) 361 else static if ( is(Type == uint) )
362 return canConvertImpl("unsigned int"); // TODO: 362 return canConvertImpl("unsigned int"); // TODO:
363 else static if ( is(Type == ulong) ) 363 else static if ( is(Type == ulong) )
364 return canConvertImpl("unsigned long long"); // TODO: 364 return canConvertImpl("unsigned long long"); // TODO:
365 else static if ( is(Type == QUrl) ) 365 else static if ( is(Type == QUrl) )
366 return canConvertImpl("QUrl"); 366 return canConvertImpl("QUrl");
367 else 367 else
368 { 368 {
369 static if( is( Type == class ) || is( Type == interface ) ) 369 static if( is( Type == class ) || is( Type == interface ) )
370 { 370 {
371 Object object = cast(Object)qtd_QVariant_data(nativeId); 371 Object object = cast(Object)qtd_QVariant_data(__nativeId);
372 if(object) 372 if(object)
373 return cast(Type)(object) !is null; 373 return cast(Type)(object) !is null;
374 return false; 374 return false;
375 } 375 }
376 else static if (isDynamicArrayType!(Type) || isStaticArrayType!(Type) ) 376 else static if (isDynamicArrayType!(Type) || isStaticArrayType!(Type) )
377 { 377 {
378 auto array = cast(DArrayToC*)qtd_QVariant_data(nativeId); 378 auto array = cast(DArrayToC*)qtd_QVariant_data(__nativeId);
379 return cast(Type)(array.array) !is null; 379 return cast(Type)(array.array) !is null;
380 } 380 }
381 else 381 else
382 { 382 {
383 int i = qtd_MetatypeId(toStringz(typeid(Type).toString)); 383 int i = qtd_MetatypeId(toStringz(typeid(Type).toString));
384 return qtd_QVariant_canConvert(nativeId, i); 384 return qtd_QVariant_canConvert(__nativeId, i);
385 } 385 }
386 } 386 }
387 } 387 }
388 388
389 public final Type value(Type)() { 389 public final Type value(Type)() {
390 static if ( is(Type == QBitArray) ) 390 static if ( is(Type == QBitArray) )
391 return toBitArra; 391 return toBitArra;
392 else static if ( is(Type == bool) ) 392 else static if ( is(Type == bool) )
393 return toBool; 393 return toBool;
394 else static if ( is(Type == QByteArray) ) 394 else static if ( is(Type == QByteArray) )
395 return toByteArray; 395 return toByteArray;
396 else static if ( is(Type == QDate) ) 396 else static if ( is(Type == QDate) )
397 return toDate; 397 return toDate;
398 else static if ( is(Type == QDateTime) ) 398 else static if ( is(Type == QDateTime) )
399 return toDateTime; 399 return toDateTime;
400 else static if ( is(Type == double) ) 400 else static if ( is(Type == double) )
401 return toDouble; 401 return toDouble;
402 else static if ( is(Type == int) ) 402 else static if ( is(Type == int) )
403 return toInt; 403 return toInt;
404 else static if ( is(Type == QLine) ) 404 else static if ( is(Type == QLine) )
405 return toLine; 405 return toLine;
406 else static if ( is(Type == QLineF) ) 406 else static if ( is(Type == QLineF) )
407 return toLineF; 407 return toLineF;
408 else static if ( is(Type == QLocale) ) 408 else static if ( is(Type == QLocale) )
409 return toLocale; 409 return toLocale;
410 else static if ( is(Type == long) ) 410 else static if ( is(Type == long) )
411 return toLongLong; 411 return toLongLong;
412 else static if ( is(Type == QPoint) ) 412 else static if ( is(Type == QPoint) )
413 return toPoint; 413 return toPoint;
414 else static if ( is(Type == QPointF) ) 414 else static if ( is(Type == QPointF) )
415 return toPointF; 415 return toPointF;
416 else static if ( is(Type == QRect) ) 416 else static if ( is(Type == QRect) )
417 return toRect; 417 return toRect;
418 else static if ( is(Type == QRectF) ) 418 else static if ( is(Type == QRectF) )
433 return toULongLong; 433 return toULongLong;
434 else static if ( is(Type == QUrl) ) 434 else static if ( is(Type == QUrl) )
435 return toUrl; 435 return toUrl;
436 else static if( is( Type == class ) || is( Type == interface ) ) 436 else static if( is( Type == class ) || is( Type == interface ) )
437 { 437 {
438 Object object = cast(Object)qtd_QVariant_data(nativeId); 438 Object object = cast(Object)qtd_QVariant_data(__nativeId);
439 if(object) 439 if(object)
440 return cast(Type)(object); 440 return cast(Type)(object);
441 return null; 441 return null;
442 } 442 }
443 else static if (isDynamicArrayType!(Type) || isStaticArrayType!(Type) ) 443 else static if (isDynamicArrayType!(Type) || isStaticArrayType!(Type) )
444 { 444 {
445 auto array = cast(DArrayToC*)qtd_QVariant_data(nativeId); 445 auto array = cast(DArrayToC*)qtd_QVariant_data(__nativeId);
446 return cast(Type)(array.array); 446 return cast(Type)(array.array);
447 } 447 }
448 else 448 else
449 { 449 {
450 return *cast(Type*)qtd_QVariant_data(nativeId); 450 return *cast(Type*)qtd_QVariant_data(__nativeId);
451 } 451 }
452 } 452 }
453 453
454 public final void clear() { 454 public final void clear() {
455 qtd_QVariant_clear(nativeId); 455 qtd_QVariant_clear(__nativeId);
456 } 456 }
457 457
458 protected final bool cmp(QVariant other) { 458 protected final bool cmp(QVariant other) {
459 return qtd_QVariant_cmp_QVariant(nativeId, other is null ? null : other.nativeId); 459 return qtd_QVariant_cmp_QVariant(__nativeId, other is null ? null : other.__nativeId);
460 } 460 }
461 461
462 protected final void create(int type, void* copy) { 462 protected final void create(int type, void* copy) {
463 qtd_QVariant_create_int_nativepointervoid(nativeId, type, copy); 463 qtd_QVariant_create_int_nativepointervoid(__nativeId, type, copy);
464 } 464 }
465 465
466 public final bool isNull() { 466 public final bool isNull() {
467 return qtd_QVariant_isNull(nativeId); 467 return qtd_QVariant_isNull(__nativeId);
468 } 468 }
469 469
470 public final bool isValid() { 470 public final bool isValid() {
471 return qtd_QVariant_isValid(nativeId); 471 return qtd_QVariant_isValid(__nativeId);
472 } 472 }
473 473
474 public final void load(QDataStream ds) { 474 public final void load(QDataStream ds) {
475 qtd_QVariant_load_QDataStream(nativeId, ds is null ? null : ds.nativeId); 475 qtd_QVariant_load_QDataStream(__nativeId, ds is null ? null : ds.__nativeId);
476 } 476 }
477 477
478 public final void writeTo(QDataStream s) { 478 public final void writeTo(QDataStream s) {
479 qtd_QVariant_writeTo_QDataStream(nativeId, s is null ? null : s.nativeId); 479 qtd_QVariant_writeTo_QDataStream(__nativeId, s is null ? null : s.__nativeId);
480 } 480 }
481 481
482 public final QVariant operator_assign(QVariant other) { 482 public final QVariant operator_assign(QVariant other) {
483 void* __qt_return_value = qtd_QVariant_operator_assign_QVariant(nativeId, other is null ? null : other.nativeId); 483 void* __qt_return_value = qtd_QVariant_operator_assign_QVariant(__nativeId, other is null ? null : other.__nativeId);
484 return new QVariant(__qt_return_value, true); 484 return new QVariant(__qt_return_value, QtdObjectFlags.nativeOwnership);
485 } 485 }
486 486
487 private final bool operator_equal(QVariant v) { 487 private final bool operator_equal(QVariant v) {
488 return qtd_QVariant_operator_equal_QVariant(nativeId, v is null ? null : v.nativeId); 488 return qtd_QVariant_operator_equal_QVariant(__nativeId, v is null ? null : v.__nativeId);
489 } 489 }
490 490
491 public final void readFrom(QDataStream s) { 491 public final void readFrom(QDataStream s) {
492 qtd_QVariant_readFrom_QDataStream(nativeId, s is null ? null : s.nativeId); 492 qtd_QVariant_readFrom_QDataStream(__nativeId, s is null ? null : s.__nativeId);
493 } 493 }
494 494
495 public final void save(QDataStream ds) { 495 public final void save(QDataStream ds) {
496 qtd_QVariant_save_QDataStream(nativeId, ds is null ? null : ds.nativeId); 496 qtd_QVariant_save_QDataStream(__nativeId, ds is null ? null : ds.__nativeId);
497 } 497 }
498 498
499 public final QBitArray toBitArray() { 499 public final QBitArray toBitArray() {
500 void* __qt_return_value = qtd_QVariant_toBitArray(nativeId); 500 void* __qt_return_value = qtd_QVariant_toBitArray(__nativeId);
501 return new QBitArray(__qt_return_value, false); 501 return new QBitArray(__qt_return_value);
502 } 502 }
503 503
504 public final bool toBool() { 504 public final bool toBool() {
505 return qtd_QVariant_toBool(nativeId); 505 return qtd_QVariant_toBool(__nativeId);
506 } 506 }
507 507
508 public final QByteArray toByteArray() { 508 public final QByteArray toByteArray() {
509 void* __qt_return_value = qtd_QVariant_toByteArray(nativeId); 509 void* __qt_return_value = qtd_QVariant_toByteArray(__nativeId);
510 return new QByteArray(__qt_return_value, false); 510 return new QByteArray(__qt_return_value);
511 } 511 }
512 512
513 public final QDate toDate() { 513 public final QDate toDate() {
514 void* __qt_return_value = qtd_QVariant_toDate(nativeId); 514 void* __qt_return_value = qtd_QVariant_toDate(__nativeId);
515 return new QDate(__qt_return_value, false); 515 return new QDate(__qt_return_value);
516 } 516 }
517 517
518 public final QDateTime toDateTime() { 518 public final QDateTime toDateTime() {
519 void* __qt_return_value = qtd_QVariant_toDateTime(nativeId); 519 void* __qt_return_value = qtd_QVariant_toDateTime(__nativeId);
520 return new QDateTime(__qt_return_value, false); 520 return new QDateTime(__qt_return_value);
521 } 521 }
522 522
523 public final double toDouble(bool* ok = null) { 523 public final double toDouble(bool* ok = null) {
524 return qtd_QVariant_toDouble_nativepointerbool(nativeId, ok); 524 return qtd_QVariant_toDouble_nativepointerbool(__nativeId, ok);
525 } 525 }
526 526
527 public final int toInt(bool* ok = null) { 527 public final int toInt(bool* ok = null) {
528 return qtd_QVariant_toInt_nativepointerbool(nativeId, ok); 528 return qtd_QVariant_toInt_nativepointerbool(__nativeId, ok);
529 } 529 }
530 530
531 public final QLine toLine() { 531 public final QLine toLine() {
532 return qtd_QVariant_toLine(nativeId); 532 return qtd_QVariant_toLine(__nativeId);
533 } 533 }
534 534
535 public final QLineF toLineF() { 535 public final QLineF toLineF() {
536 return qtd_QVariant_toLineF(nativeId); 536 return qtd_QVariant_toLineF(__nativeId);
537 } 537 }
538 538
539 public final QLocale toLocale() { 539 public final QLocale toLocale() {
540 void* __qt_return_value = qtd_QVariant_toLocale(nativeId); 540 void* __qt_return_value = qtd_QVariant_toLocale(__nativeId);
541 return new QLocale(__qt_return_value, false); 541 return new QLocale(__qt_return_value);
542 } 542 }
543 543
544 public final long toLongLong(bool* ok = null) { 544 public final long toLongLong(bool* ok = null) {
545 return qtd_QVariant_toLongLong_nativepointerbool(nativeId, ok); 545 return qtd_QVariant_toLongLong_nativepointerbool(__nativeId, ok);
546 } 546 }
547 547
548 public final QPoint toPoint() { 548 public final QPoint toPoint() {
549 return qtd_QVariant_toPoint(nativeId); 549 return qtd_QVariant_toPoint(__nativeId);
550 } 550 }
551 551
552 public final QPointF toPointF() { 552 public final QPointF toPointF() {
553 return qtd_QVariant_toPointF(nativeId); 553 return qtd_QVariant_toPointF(__nativeId);
554 } 554 }
555 555
556 public final QRect toRect() { 556 public final QRect toRect() {
557 return qtd_QVariant_toRect(nativeId); 557 return qtd_QVariant_toRect(__nativeId);
558 } 558 }
559 559
560 public final QRectF toRectF() { 560 public final QRectF toRectF() {
561 return qtd_QVariant_toRectF(nativeId); 561 return qtd_QVariant_toRectF(__nativeId);
562 } 562 }
563 563
564 public final QRegExp toRegExp() { 564 public final QRegExp toRegExp() {
565 void* __qt_return_value = qtd_QVariant_toRegExp(nativeId); 565 void* __qt_return_value = qtd_QVariant_toRegExp(__nativeId);
566 return new QRegExp(__qt_return_value, false); 566 return new QRegExp(__qt_return_value);
567 } 567 }
568 568
569 public final QSize toSize() { 569 public final QSize toSize() {
570 return qtd_QVariant_toSize(nativeId); 570 return qtd_QVariant_toSize(__nativeId);
571 } 571 }
572 572
573 public final QSizeF toSizeF() { 573 public final QSizeF toSizeF() {
574 return qtd_QVariant_toSizeF(nativeId); 574 return qtd_QVariant_toSizeF(__nativeId);
575 } 575 }
576 576
577 public final string toString() { 577 public final string toString() {
578 string res; 578 string res;
579 qtd_QVariant_toString(nativeId, &res); 579 qtd_QVariant_toString(__nativeId, &res);
580 return res; 580 return res;
581 } 581 }
582 582
583 public final QTime toTime() { 583 public final QTime toTime() {
584 void* __qt_return_value = qtd_QVariant_toTime(nativeId); 584 void* __qt_return_value = qtd_QVariant_toTime(__nativeId);
585 return new QTime(__qt_return_value, false); 585 return new QTime(__qt_return_value);
586 } 586 }
587 587
588 public final uint toUInt(bool* ok = null) { 588 public final uint toUInt(bool* ok = null) {
589 return qtd_QVariant_toUInt_nativepointerbool(nativeId, ok); 589 return qtd_QVariant_toUInt_nativepointerbool(__nativeId, ok);
590 } 590 }
591 591
592 public final ulong toULongLong(bool* ok = null) { 592 public final ulong toULongLong(bool* ok = null) {
593 return qtd_QVariant_toULongLong_nativepointerbool(nativeId, ok); 593 return qtd_QVariant_toULongLong_nativepointerbool(__nativeId, ok);
594 } 594 }
595 595
596 public final QUrl toUrl() { 596 public final QUrl toUrl() {
597 void* __qt_return_value = qtd_QVariant_toUrl(nativeId); 597 void* __qt_return_value = qtd_QVariant_toUrl(__nativeId);
598 return new QUrl(__qt_return_value, false); 598 return new QUrl(__qt_return_value);
599 } 599 }
600 600
601 public final char* typeName() { 601 public final char* typeName() {
602 return qtd_QVariant_typeName(nativeId); 602 return qtd_QVariant_typeName(__nativeId);
603 } 603 }
604 604
605 public final Type type() { 605 public final Type type() {
606 return cast(Type)qtd_QVariant_type(nativeId); 606 return cast(Type)qtd_QVariant_type(__nativeId);
607 } 607 }
608 608
609 public final int userType() { 609 public final int userType() {
610 return qtd_QVariant_userType(nativeId); 610 return qtd_QVariant_userType(__nativeId);
611 } 611 }
612 // Field accessors 612 // Field accessors
613 613
614 public this(void* native_id, bool no_real_delete = false) { 614 public this(void* native_id, QtdObjectFlags flags = QtdObjectFlags.none) {
615 super(native_id, no_real_delete); 615 super(native_id, flags);
616 } 616 }
617 617
618 618 protected override void __deleteNative() {
619 ~this() { 619 qtd_QVariant_destructor(__nativeId);
620 if(!__no_real_delete)
621 __free_native_resources();
622 }
623
624 protected void __free_native_resources() {
625 qtd_QVariant_destructor(nativeId());
626 } 620 }
627 621
628 // Injected code in class 622 // Injected code in class
629 } 623 }
630 extern (C) void qtd_QVariant_destructor(void *ptr); 624 extern (C) void qtd_QVariant_destructor(void *ptr);