comparison generator/typesystem_core-java.java @ 90:ba63040afbf2

wrapping of QBuffer and QProcess, fixed #9
author eldar
date Wed, 27 May 2009 13:02:13 +0000
parents d5a6b6269f44
children 39921f499a22
comparison
equal deleted inserted replaced
89:8a4e85876ea8 90:ba63040afbf2
111 111
112 class QCoreApplication___ extends QCoreApplication { 112 class QCoreApplication___ extends QCoreApplication {
113 113
114 protected static QCoreApplication m_instance = null; 114 protected static QCoreApplication m_instance = null;
115 115
116 this(char[][] args) 116 this(in string[] args)
117 { 117 {
118 // if (m_instance != null) 118 // if (m_instance != null)
119 // throw new RuntimeException("QCoreApplication can only be initialized once"); 119 // throw new RuntimeException("QCoreApplication can only be initialized once");
120 120
121 argc = args.length; 121 argc = args.length;
487 487
488 class QBuffer___ extends QBuffer { 488 class QBuffer___ extends QBuffer {
489 489
490 // retain a reference to avoid gc 490 // retain a reference to avoid gc
491 private Object strongDataReference = null; 491 private Object strongDataReference = null;
492 492 public final void setBuffer(QByteArray byteArray) {
493 public QBuffer(QByteArray byteArray, QObject parent) { 493 setBuffer_private(byteArray);
494 this(byteArray.nativePointer(), parent);
495 strongDataReference = byteArray; 494 strongDataReference = byteArray;
496 } 495 }
497 496
498 public QBuffer(QByteArray byteArray) {
499 this(byteArray, null);
500 }
501
502 public final void setBuffer(QByteArray byteArray) {
503 setBuffer(byteArray.nativePointer());
504 strongDataReference = byteArray;
505 }
506
507 public final void setData(byte data[]) { 497 public final void setData(byte data[]) {
508 QNativePointer np = qt.internal.QtJambiInternal.byteArrayToNativePointer(data); 498 setData(cast(char*)data.ptr, data.length);
509 setData(np, data.length);
510 } 499 }
511 500
512 }// class 501 }// class
513 502
514 class QSignalMapper___ extends QSignalMapper { 503 class QSignalMapper___ extends QSignalMapper {