Mercurial > projects > qtd
changeset 39:a5cba313c924
network and webkit are wrapped now
author | eldar |
---|---|
date | Sun, 17 May 2009 01:44:06 +0000 |
parents | 08631ce8e46a |
children | a5cc4ada07f5 |
files | CMakeLists.txt Makefile build/core.makefile build/core.txt build/network.makefile build/network.txt build/opengl.txt build/webkit.makefile build/webkit.txt build/xml.makefile changelog.txt generator/abstractmetalang.cpp generator/cppimplgenerator.cpp generator/dgenerator.cpp generator/typesystem_core.xml generator/typesystem_network-common.xml generator/typesystem_network-java.java generator/typesystem_network-java.xml generator/typesystem_network.xml generator/typesystem_webkit-java.xml generator/typesystem_webkit.xml qt/QGlobal.d |
diffstat | 22 files changed, 335 insertions(+), 103 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Sat May 16 21:34:54 2009 +0000 +++ b/CMakeLists.txt Sun May 17 01:44:06 2009 +0000 @@ -12,7 +12,7 @@ option(BUILD_EXAMPLES "Build examples" "ON") option(GENERATE_DI_FILES "Generate *.di files with DC -H command" "OFF") -set(all_packages Core Gui OpenGL Xml Svg) ## TODO: Loading. +set(all_packages Core Gui OpenGL Xml Svg Network WebKit) ## TODO: Loading. ## Strip utility.
--- a/Makefile Sat May 16 21:34:54 2009 +0000 +++ b/Makefile Sun May 17 01:44:06 2009 +0000 @@ -53,7 +53,7 @@ NAME_PREFIX = qtd endif ifndef $(PACKAGES) -PACKAGES = core gui opengl xml svg +PACKAGES = core gui endif LIB_PREFIX = lib CC_INCLUDE += include $(QTDIR_INC) $(QTDIR_INC)$(SL)Qt $(QTDIR_INC)$(SL)QtCore $(QTDIR_INC)$(SL)QtGui $(QTDIR_INC)$(SL)QtOpenGL $(QTDIR_INC)$(SL)QtSvg @@ -135,7 +135,7 @@ cd generator && qmake && $(MAKE) dgen: make_gen - cd generator && $(GEN) $(GEN_OPT) --d-target=$(D_TARGET) --output-directory=../ qtjambi_masterinclude.h build_svg.txt + cd generator && $(GEN) $(GEN_OPT) --d-target=$(D_TARGET) --output-directory=../ qtjambi_masterinclude.h build_gui.txt ## DGenerator ## end mkdir:
--- a/build/core.makefile Sat May 16 21:34:54 2009 +0000 +++ b/build/core.makefile Sun May 17 01:44:06 2009 +0000 @@ -69,4 +69,5 @@ QTextDecoder \ QTimeLine \ QAbstractFactory \ - QAbstractListModel \ No newline at end of file + QAbstractListModel \ + QCryptographicHash \ No newline at end of file
--- a/build/core.txt Sat May 16 21:34:54 2009 +0000 +++ b/build/core.txt Sun May 17 01:44:06 2009 +0000 @@ -50,5 +50,6 @@ QTimeLine QAbstractFactory QAbstractListModel + QCryptographicHash )
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build/network.makefile Sun May 17 01:44:06 2009 +0000 @@ -0,0 +1,49 @@ +## Qt Lib name. +qt_network_name = QtNetwork + +## Libraries linked to the cpp part (is active only when CPP_SHARED == true). +network_link_cpp += qtdcore_cpp $(qt_core_lib_name) + +## Libraries linked to the d part (is active only when CPP_SHARED == true).. +network_link_d += qtdcore + +## Module specific cpp files. +network_cpp_files += + +## Module specific d files. +network_d_files += + +## Classes. +## TODO: use list that generated by dgen. +network_classes = \ +ArrayOps \ +QAbstractSocket \ +QAuthenticator \ +QFtp \ +QHostAddress \ +QHostInfo \ +QHttpHeader \ +QHttpRequestHeader \ +QHttpResponseHeader \ +QHttp \ +QIPv6Address \ +QLocalServer \ +QLocalSocket \ +QNetworkAccessManager \ +QNetworkAddressEntry \ +QNetworkCookieJar \ +QNetworkCookie \ +QNetworkInterface \ +QNetworkProxy \ +QNetworkReply \ +QNetworkRequest \ +QSslCertificate \ +QSslCipher \ +QSslConfiguration \ +QSslError \ +QSslKey \ +QSslSocket \ +QTcpServer \ +QTcpSocket \ +QUdpSocket \ +QUrlInfo \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build/network.txt Sun May 17 01:44:06 2009 +0000 @@ -0,0 +1,33 @@ +set(required Core) +set(classes + QAbstractSocket + QAuthenticator + QFtp + QHostAddress + QHostInfo + QHttpHeader + QHttpRequestHeader + QHttpResponseHeader + QHttp + QIPv6Address + QLocalServer + QLocalSocket + QNetworkAccessManager + QNetworkAddressEntry + QNetworkCookieJar + QNetworkCookie + QNetworkInterface + QNetworkProxy + QNetworkReply + QNetworkRequest + QSslCertificate + QSslCipher + QSslConfiguration + QSslError + QSslKey + QSslSocket + QTcpServer + QTcpSocket + QUdpSocket + QUrlInfo + )
--- a/build/opengl.txt Sat May 16 21:34:54 2009 +0000 +++ b/build/opengl.txt Sun May 17 01:44:06 2009 +0000 @@ -10,4 +10,4 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL Windows AND D_IS_MARS) set(link_example opengl32 glu32) install(FILES ${link_example} DESTINATION lib) -endif(${CMAKE_SYSTEM_NAME} STREQUAL Windows AND D_IS_MARS) +endif(${CMAKE_SYSTEM_NAME} STREQUAL Windows AND D_IS_MARS) \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build/webkit.makefile Sun May 17 01:44:06 2009 +0000 @@ -0,0 +1,27 @@ +## Qt Lib name. +qt_webkit_name = QtWebkit + +## Libraries linked to the cpp part (is active only when CPP_SHARED == true). +webkit_link_cpp += qtdcore_cpp $(qt_core_lib_name) $(qt_gui_lib_name) $(qt_network_lib_name) + +## Libraries linked to the d part (is active only when CPP_SHARED == true).. +webkit_link_d += qtdcore + +## Module specific cpp files. +webkit_cpp_files += + +## Module specific d files. +webkit_d_files += + +## Classes. +## TODO: use list that generated by dgen. +webkit_classes = \ + ArrayOps \ + QWebFrame \ + QWebHistoryInterface \ + QWebHistoryItem \ + QWebHistory \ + QWebHitTestResult \ + QWebPage \ + QWebSettings \ + QWebView \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build/webkit.txt Sun May 17 01:44:06 2009 +0000 @@ -0,0 +1,12 @@ +set(required Core Gui Network) + +set(classes + QWebFrame + QWebHistoryInterface + QWebHistoryItem + QWebHistory + QWebHitTestResult + QWebPage + QWebSettings + QWebView + ) \ No newline at end of file
--- a/build/xml.makefile Sat May 16 21:34:54 2009 +0000 +++ b/build/xml.makefile Sun May 17 01:44:06 2009 +0000 @@ -1,5 +1,5 @@ ## Qt Lib name. -qt_svg_name = QtXml +qt_xml_name = QtXml ## Libraries linked to the cpp part (is active only when CPP_SHARED == true). xml_link_cpp += qtdcore_cpp $(qt_core_lib_name)
--- a/changelog.txt Sat May 16 21:34:54 2009 +0000 +++ b/changelog.txt Sun May 17 01:44:06 2009 +0000 @@ -3,6 +3,8 @@ * lots of bugs fixed * brand new signals implementation by Max Samukha * switch to Qt 4.5 + * support for ldc (both X86 and X86-64) * all imports inside Qt are public to avoid import hell * API dealing with containers is now wrapped - * building system now uses cmake to be crossplatform and more flexible \ No newline at end of file + * building system is now based on CMake to be crossplatform and more flexible + * all classes from Gui, OpenGL, Xml, Svg, Network and Webkit packages are wrapped \ No newline at end of file
--- a/generator/abstractmetalang.cpp Sat May 16 21:34:54 2009 +0000 +++ b/generator/abstractmetalang.cpp Sun May 17 01:44:06 2009 +0000 @@ -2024,6 +2024,7 @@ m_instance->data["out"] = "_out"; m_instance->data["scope"] = "_scope"; m_instance->data["default"] = "_default"; + m_instance->data["body"] = "_body"; } QString ArgumentReplace::translate(QString arg)
--- a/generator/cppimplgenerator.cpp Sat May 16 21:34:54 2009 +0000 +++ b/generator/cppimplgenerator.cpp Sun May 17 01:44:06 2009 +0000 @@ -943,7 +943,7 @@ s << d_name + "_ConcreteWrapper" + QString(d_type->indirections(),'*'); } else - s << translateType(d_type, EnumAsInts); + s << translateType(d_type, EnumAsInts, d_export); } else s << "void*"; @@ -3190,6 +3190,7 @@ cls_name.remove("_ConcreteWrapper"); s << endl + << INDENT << "{" << endl // qtd2 hack, additional scope for avoiding duplicating of "i" << INDENT; switch (type->type()) { @@ -3235,7 +3236,8 @@ s << INDENT << "qtd_assign_" << cls_name << "_array_element(" << java_name << ", i, __java_tmp);" << endl; s << INDENT << "++i;" << endl; } - s << INDENT << "}" << endl; + s << INDENT << "}" << endl + << INDENT << "}" << endl; } else if (type->type() == ContainerTypeEntry::PairContainer) { QList<AbstractMetaType *> args = java_type->instantiations(); @@ -3651,7 +3653,10 @@ || java_type->isTargetLangChar()) { return d_name; } else if (java_type->isArray()) { - return java_type->arrayElementType()->name() + "*"; + if (d_export) + return java_type->arrayElementType()->name() + "*"; + else + return java_type->arrayElementType()->typeEntry()->qualifiedCppName() + "*"; } else if (java_type->isIntegerEnum() || java_type->isIntegerFlags() || ((option & EnumAsInts) && (java_type->isEnum() || java_type->isFlags()))) { return "int";
--- a/generator/dgenerator.cpp Sat May 16 21:34:54 2009 +0000 +++ b/generator/dgenerator.cpp Sun May 17 01:44:06 2009 +0000 @@ -72,7 +72,7 @@ << "signed short" << "Array" << "GLuint" << "GLenum" << "GLint" << "unsigned long" << "ulong" << "long" << "QByteRef" << "QStringList" << "QList" << "QVector" << "QPair" - << "QSet" << "QStringRef"; + << "QSet" << "QStringRef" << "quintptr"; } QString DGenerator::fileNameForClass(const AbstractMetaClass *d_class) const @@ -1831,7 +1831,7 @@ if (!m_isRecursive) s << "module " << d_class->package() << "." << d_class->name() <<";" << endl << endl; - +/* s << "// some type info" << endl; QString hasVirtuals = d_class->hasVirtualFunctions() ? "has" : "doesn't have"; QString isFinal = d_class->isFinal() ? "is" : "is not"; @@ -1844,7 +1844,7 @@ << "// " << d_class->hasProtectedFunctions() << endl << "// " << d_class->hasFieldAccessors() << endl << "// " << d_class->typeEntry()->isObject() << endl; - +*/ const ComplexTypeEntry *ctype = d_class->typeEntry(); if (!ctype->addedTo.isEmpty() && !m_isRecursive) {
--- a/generator/typesystem_core.xml Sat May 16 21:34:54 2009 +0000 +++ b/generator/typesystem_core.xml Sun May 17 01:44:06 2009 +0000 @@ -104,7 +104,7 @@ <primitive-type name="unsigned __int64" java-name="long" preferred-conversion="no" jni-name="jlong"/> <primitive-type name="unsigned long long" java-name="ulong" preferred-conversion="no" jni-name="jlong"/> <primitive-type name="long long" java-name="long" preferred-conversion="no" jni-name="jlong"/> - <primitive-type name="quintptr" preferred-conversion="no" java-name="ulong" jni-name="jlong" /> + <primitive-type name="quintptr" preferred-conversion="no" java-name="quintptr" jni-name="quintptr" /> <primitive-type name="short" preferred-conversion="no" java-name="short" jni-name="jchar"/> <primitive-type name="short" preferred-java-type="no" java-name="short" jni-name="jshort" /> @@ -1939,13 +1939,13 @@ </value-type> <object-type name="QCryptographicHash"> - <inject-code> +<!-- <inject-code> <import-file name="typesystem_core-java.java" quote-after-line="class QCryptographicHash___" quote-before-line="}// class"/> </inject-code> <modify-function signature="addData(const char*,int)"> <access modifier="private"/> </modify-function> - +--> </object-type> <object-type name="QLibraryInfo"/> <object-type name="QMutex"/>
--- a/generator/typesystem_network-common.xml Sat May 16 21:34:54 2009 +0000 +++ b/generator/typesystem_network-common.xml Sun May 17 01:44:06 2009 +0000 @@ -3,7 +3,9 @@ <include file-name="qssl.h" location="global" /> </namespace-type> + <enum-type name="QNetworkProxy::Capability" flags="QNetworkProxy::Capabilities" /> <enum-type name="QAbstractSocket::NetworkLayerProtocol" /> + <enum-type name="QNetworkProxyQuery::QueryType" /> <enum-type name="QAbstractSocket::SocketError" /> <enum-type name="QAbstractSocket::SocketState" /> <enum-type name="QAbstractSocket::SocketType" /> @@ -35,6 +37,29 @@ <enum-type name="QNetworkRequest::CacheLoadControl" /> <enum-type name="QNetworkRequest::KnownHeaders" /> + <object-type name="QAbstractNetworkCache" /> + <object-type name="QNetworkDiskCache"> + <modify-function signature="insert(QIODevice*)"> + <modify-argument index="1"> + <reference-count action="ignore" /> <!-- function only has effect on devices retrieved using prepare() --> + </modify-argument> + </modify-function> + </object-type> + <value-type name="QNetworkCacheMetaData"> + <modify-function signature="operator=(QNetworkCacheMetaData)" remove="all" /> + </value-type> + + <object-type name="QNetworkProxyFactory"> + <modify-function signature="setApplicationProxyFactory(QNetworkProxyFactory*)"> + <modify-argument index="1"> + <define-ownership class="java" owner="c++" /> + </modify-argument> + </modify-function> + </object-type> + <value-type name="QNetworkProxyQuery" > + <modify-function signature="operator=(QNetworkProxyQuery)" remove="all" /> + </value-type> + <object-type name="QAbstractSocket" /> <object-type name="QFtp" /> @@ -56,6 +81,16 @@ <define-ownership class="java" owner="c++" /> </modify-argument> </modify-function> + <modify-function signature="setCache(QAbstractNetworkCache*)"> + <modify-argument index="1"> + <reference-count action="ignore" /> + </modify-argument> + </modify-function> + <modify-function signature="setProxyFactory(QNetworkProxyFactory*)"> + <modify-argument index="1"> + <define-ownership class="java" owner="c++" /> + </modify-argument> + </modify-function> </object-type> <object-type name="QNetworkCookieJar" /> <object-type name="QNetworkReply" />
--- a/generator/typesystem_network-java.java Sat May 16 21:34:54 2009 +0000 +++ b/generator/typesystem_network-java.java Sun May 17 01:44:06 2009 +0000 @@ -1,37 +1,38 @@ /**************************************************************************** ** -** Copyright (C) 1992-2008 Nokia. All rights reserved. +** Copyright (C) 1992-2009 Nokia. All rights reserved. ** ** This file is part of Qt Jambi. ** -** * Commercial Usage -* Licensees holding valid Qt Commercial licenses may use this file in -* accordance with the Qt Commercial License Agreement provided with the -* Software or, alternatively, in accordance with the terms contained in -* a written agreement between you and Nokia. -* -* -* GNU General Public License Usage -* Alternatively, this file may be used under the terms of the GNU -* General Public License versions 2.0 or 3.0 as published by the Free -* Software Foundation and appearing in the file LICENSE.GPL included in -* the packaging of this file. Please review the following information -* to ensure GNU General Public Licensing requirements will be met: -* http://www.fsf.org/licensing/licenses/info/GPLv2.html and -* http://www.gnu.org/copyleft/gpl.html. In addition, as a special -* exception, Nokia gives you certain additional rights. These rights -* are described in the Nokia Qt GPL Exception version 1.2, included in -* the file GPL_EXCEPTION.txt in this package. -* -* Qt for Windows(R) Licensees -* As a special exception, Nokia, as the sole copyright holder for Qt -* Designer, grants users of the Qt/Eclipse Integration plug-in the -* right for the Qt/Eclipse Integration to link to functionality -* provided by Qt Designer and its related libraries. -* -* -* If you are unsure which license is appropriate for your use, please -* contact the sales department at qt-sales@nokia.com. +** Commercial Usage +Licensees holding valid Qt Commercial licenses may use this file in +accordance with the Qt Commercial License Agreement provided with the +Software or, alternatively, in accordance with the terms contained in +a written agreement between you and Nokia. + +GNU Lesser General Public License Usage +Alternatively, this file may be used under the terms of the GNU Lesser +General Public License version 2.1 as published by the Free Software +Foundation and appearing in the file LICENSE.LGPL included in the +packaging of this file. Please review the following information to +ensure the GNU Lesser General Public License version 2.1 requirements +will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. + +In addition, as a special exception, Nokia gives you certain +additional rights. These rights are described in the Nokia Qt LGPL +Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +package. + +GNU General Public License Usage +Alternatively, this file may be used under the terms of the GNU +General Public License version 3.0 as published by the Free Software +Foundation and appearing in the file LICENSE.GPL included in the +packaging of this file. Please review the following information to +ensure the GNU General Public License version 3.0 requirements will be +met: http://www.gnu.org/copyleft/gpl.html. + +If you are unsure which license is appropriate for your use, please +contact the sales department at qt-sales@nokia.com. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE @@ -41,8 +42,8 @@ package generator; -import qt.*; -import qt.network.*; +import com.trolltech.qt.*; +import com.trolltech.qt.network.*; class QHostInfo___ extends QHostInfo { /** @@ -56,10 +57,10 @@ * @param receiver The object on which the method will be called. * @param methodName The name of a method which takes a single <code>QHostInfo</code> argument. */ - public static int lookupHost(String name, qt.core.QObject receiver, String methodName) + public static int lookupHost(String name, com.trolltech.qt.core.QObject receiver, String methodName) { - methodName = qt.internal.QtJambiInternal.SlotPrefix + methodName + "(QHostInfo)"; - return lookupHost(name, receiver, qt.QNativePointer.createCharPointer(methodName)); + methodName = com.trolltech.qt.internal.QtJambiInternal.SlotPrefix + methodName + "(QHostInfo)"; + return lookupHost(name, receiver, com.trolltech.qt.QNativePointer.createCharPointer(methodName)); } /** @@ -74,16 +75,16 @@ * argument, and must be contained in a <code>QObject</code> * subclass. */ - public static int lookupHost(String name, qt.QSignalEmitter.Signal1<QHostInfo> signal) + public static int lookupHost(String name, com.trolltech.qt.QSignalEmitter.Signal1<QHostInfo> signal) { - if (!(signal.containingObject() instanceof qt.core.QObject)) { + if (!(signal.containingObject() instanceof com.trolltech.qt.core.QObject)) { throw new IllegalArgumentException("Only signals contained in QObject subclasses are supported. " + "Signal's class is '" + signal.containingObject().getClass() + "'."); } - String methodName = qt.internal.QtJambiInternal.SignalPrefix + signal.name() + "(QHostInfo)"; - return lookupHost(name, (qt.core.QObject)signal.containingObject(), - qt.QNativePointer.createCharPointer(methodName)); + String methodName = com.trolltech.qt.internal.QtJambiInternal.SignalPrefix + signal.name() + "(QHostInfo)"; + return lookupHost(name, (com.trolltech.qt.core.QObject)signal.containingObject(), + com.trolltech.qt.QNativePointer.createCharPointer(methodName)); } }// class @@ -108,11 +109,11 @@ } } - public final void connectToHost(String host, int port, qt.core.QIODevice.OpenMode mode) { + public final void connectToHost(String host, int port, com.trolltech.qt.core.QIODevice.OpenMode mode) { connectToHost(host, (char) port, mode); } - public final void connectToHost(String host, int port, qt.core.QIODevice.OpenModeFlag ... mode) { + public final void connectToHost(String host, int port, com.trolltech.qt.core.QIODevice.OpenModeFlag ... mode) { connectToHost(host, (char) port, mode); } @@ -120,11 +121,11 @@ connectToHost(host, (char) port); } - public final void connectToHost(QHostAddress host, int port, qt.core.QIODevice.OpenMode mode) { + public final void connectToHost(QHostAddress host, int port, com.trolltech.qt.core.QIODevice.OpenMode mode) { connectToHost(host, (char) port, mode); } - public final void connectToHost(QHostAddress host, int port, qt.core.QIODevice.OpenModeFlag ... mode) { + public final void connectToHost(QHostAddress host, int port, com.trolltech.qt.core.QIODevice.OpenModeFlag ... mode) { connectToHost(host, (char) port, mode); } @@ -133,11 +134,11 @@ connectToHost(host, (char) port); } - protected void connectToHostImplementation(String host, int port, qt.core.QIODevice.OpenMode mode) { + protected void connectToHostImplementation(String host, int port, com.trolltech.qt.core.QIODevice.OpenMode mode) { connectToHostImplementation(host, (char) port, mode); } - protected void connectToHostImplementation(String host, int port, qt.core.QIODevice.OpenModeFlag ... mode) { + protected void connectToHostImplementation(String host, int port, com.trolltech.qt.core.QIODevice.OpenModeFlag ... mode) { connectToHostImplementation(host, (char) port, mode); } @@ -166,11 +167,11 @@ class QSslSocket___ extends QSslSocket { - protected void connectToHostImplementation(String host, int port, qt.core.QIODevice.OpenMode mode) { + protected void connectToHostImplementation(String host, int port, com.trolltech.qt.core.QIODevice.OpenMode mode) { connectToHostImplementation(host, (char) port, mode); } - protected void connectToHostImplementation(String host, int port, qt.core.QIODevice.OpenModeFlag ... mode) { + protected void connectToHostImplementation(String host, int port, com.trolltech.qt.core.QIODevice.OpenModeFlag ... mode) { connectToHostImplementation(host, (char) port, mode); } @@ -227,11 +228,11 @@ this(hostname, (char) port); } - public QHttp(String hostname, int port, qt.core.QObject parent) { + public QHttp(String hostname, int port, com.trolltech.qt.core.QObject parent) { this(hostname, (char) port, parent); } - public QHttp(java.lang.String hostname, qt.network.QHttp.ConnectionMode mode) { + public QHttp(java.lang.String hostname, com.trolltech.qt.network.QHttp.ConnectionMode mode) { this(hostname, mode, '\0'); } @@ -239,7 +240,7 @@ this(hostname, mode, (char) port); } - public QHttp(String hostname, QHttp.ConnectionMode mode, int port, qt.core.QObject parent) { + public QHttp(String hostname, QHttp.ConnectionMode mode, int port, com.trolltech.qt.core.QObject parent) { this(hostname, mode, (char) port, parent); } @@ -272,7 +273,7 @@ } public final boolean listen() { - return listen(new qt.network.QHostAddress(qt.network.QHostAddress.SpecialAddress.Any)); + return listen(new com.trolltech.qt.network.QHostAddress(com.trolltech.qt.network.QHostAddress.SpecialAddress.Any)); } public final int serverPort() { @@ -355,11 +356,11 @@ } public final int writeDatagram(byte data[], QHostAddress address, int port) { - QNativePointer np = qt.internal.QtJambiInternal.byteArrayToNativePointer(data); + QNativePointer np = com.trolltech.qt.internal.QtJambiInternal.byteArrayToNativePointer(data); return (int) writeDatagram(np, data.length, address, (char) port); } - public final int writeDatagram(qt.core.QByteArray data, QHostAddress address, int port) { + public final int writeDatagram(com.trolltech.qt.core.QByteArray data, QHostAddress address, int port) { return (int) writeDatagram(data, address, (char) port); }
--- a/generator/typesystem_network-java.xml Sat May 16 21:34:54 2009 +0000 +++ b/generator/typesystem_network-java.xml Sun May 17 01:44:06 2009 +0000 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<typesystem package="qt.network" default-superclass="qt.QtJambiObject"> +<typesystem package="qt.network" default-superclass="QtDObject"> <inject-code> qt.Utilities.loadQtLibrary("QtNetwork"); </inject-code>
--- a/generator/typesystem_network.xml Sat May 16 21:34:54 2009 +0000 +++ b/generator/typesystem_network.xml Sun May 17 01:44:06 2009 +0000 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<typesystem package="qt.network" default-superclass="qt.QtJambiObject"> +<typesystem package="qt.network" default-superclass="QtDObject"> <inject-code> qt.Utilities.loadQtLibrary("QtNetwork"); </inject-code> @@ -18,7 +18,9 @@ <include file-name="qssl.h" location="global"/> </namespace-type> + <enum-type name="QNetworkProxy::Capability" flags="QNetworkProxy::Capabilities"/> <enum-type name="QAbstractSocket::NetworkLayerProtocol"/> + <enum-type name="QNetworkProxyQuery::QueryType"/> <enum-type name="QAbstractSocket::SocketError"/> <enum-type name="QAbstractSocket::SocketState"/> <enum-type name="QAbstractSocket::SocketType"/> @@ -50,8 +52,31 @@ <enum-type name="QNetworkRequest::CacheLoadControl"/> <enum-type name="QNetworkRequest::KnownHeaders"/> + <object-type name="QAbstractNetworkCache"/> + <object-type name="QNetworkDiskCache"> + <modify-function signature="insert(QIODevice*)"> + <modify-argument index="1"> + <reference-count action="ignore"/> <!-- function only has effect on devices retrieved using prepare() --> + </modify-argument> + </modify-function> + </object-type> + <value-type name="QNetworkCacheMetaData"> + <modify-function signature="operator=(QNetworkCacheMetaData)" remove="all"/> + </value-type> + + <object-type name="QNetworkProxyFactory"> + <modify-function signature="setApplicationProxyFactory(QNetworkProxyFactory*)"> + <modify-argument index="1"> + <define-ownership class="java" owner="c++"/> + </modify-argument> + </modify-function> + </object-type> + <value-type name="QNetworkProxyQuery"> + <modify-function signature="operator=(QNetworkProxyQuery)" remove="all"/> + </value-type> + <object-type name="QAbstractSocket"> - <inject-code> +<!-- <inject-code> <import-file name="typesystem_network-java.java" quote-after-line="class QAbstractSocket___" quote-before-line="}// class"/> </inject-code> <inject-code class="constructors"> @@ -62,35 +87,39 @@ <access modifier="private"/> <rename to="proxyAuthenticationRequiredPrivate"/> </modify-function> - <modify-function signature="connectToHostImplementation(QString, unsigned short, QFlags<QIODevice::OpenModeFlag>)" access="private"/> + <modify-function signature="connectToHostImplementation(QString, unsigned short, QFlags<QIODevice::OpenModeFlag>)" access="private"/>virtual-slot="yes" <modify-function signature="localPort()const" access="private" rename="localPort_private"/> <modify-function signature="peerPort()const" access="private" rename="peerPort_private"/> <modify-function signature="setLocalPort(unsigned short)" access="private"/> <modify-function signature="setPeerPort(unsigned short)" access="private"/> <modify-function signature="connectToHost(QString, unsigned short, QFlags<QIODevice::OpenModeFlag>)" access="private"/> <modify-function signature="connectToHost(QHostAddress, unsigned short, QFlags<QIODevice::OpenModeFlag>)" access="private"/> - +--> + <modify-function signature="connectToHostImplementation(QString, unsigned short, QFlags<QIODevice::OpenModeFlag>)" virtual-slot="yes"/> + <modify-function signature="error()const"> + <rename to="error_"/> + </modify-function> <modify-function signature="abort()" access="non-final"/> <modify-function signature="disconnectFromHostImplementation()" access="non-final"/> <modify-function signature="flush()" access="non-final"/> <modify-function signature="setReadBufferSize(long long)" access="non-final"/> - <modify-function signature="setSocketDescriptor(int,QAbstractSocket::SocketState,QFlags<QIODevice::OpenModeFlag>)" access="non-final"/> + <modify-function signature="setSocketDescriptor(int,QAbstractSocket::SocketState,QFlags<QIODevice::OpenModeFlag>)" access="non-final"/> <modify-function signature="waitForConnected(int)" access="non-final"/> <modify-function signature="waitForDisconnected(int)" access="non-final"/> </object-type> <object-type name="QFtp"> - <modify-function signature="read(char*,long long)"> +<!-- <modify-function signature="read(char*,long long)"> <access modifier="private"/> </modify-function> <inject-code> <insert-template name="network.read_char*_long_long"/> - </inject-code> + </inject-code> --> </object-type> <object-type name="QHttp"> <modify-function signature="closeConnection()" remove="all"/> - + <!-- <inject-code> <import-file name="typesystem_network-java.java" quote-after-line="class QHttp___" quote-before-line="}// class"/> </inject-code> @@ -127,13 +156,13 @@ </modify-function> <inject-code> <insert-template name="network.read_char*_long_long"/> - </inject-code> + </inject-code> --> <modify-function signature="setSocket(QTcpSocket*)"> <modify-argument index="1"> <reference-count action="set" variable-name="__rcSocket"/> </modify-argument> </modify-function> - +<!-- <modify-function signature="setHost(QString, unsigned short)" access="private"> <modify-argument index="2"> <remove-default-expression/> @@ -144,15 +173,13 @@ <remove-default-expression/> </modify-argument> </modify-function> - +--> </object-type> <object-type name="QTcpServer"> - <inject-code> +<!-- <inject-code> <import-file name="typesystem_network-java.java" quote-after-line="class QTcpServer___" quote-before-line="}// class"/> </inject-code> - <extra-includes> - <include file-name="qt.QNativePointer" location="java"/> - </extra-includes> + <modify-function signature="listen(QHostAddress,unsigned short)" access="private"> <modify-argument index="1"> <remove-default-expression/> @@ -175,17 +202,17 @@ <remove-default-expression/> </modify-argument> </modify-function> - +--> </object-type> <object-type name="QTcpSocket"> - <inject-code class="constructors"> +<!-- <inject-code class="constructors"> proxyAuthenticationRequired.connect(this, "emitProxyAuthenticationRequiredPrivate(QNetworkProxy, QAuthenticator)", qt.core.Qt.ConnectionType.DirectConnection); AbstractSignal sig = (AbstractSignal) qt.GeneratorUtilities.fetchField(this, QAbstractSocket.class, "proxyAuthenticationRequiredPrivate"); sig.connect(this, "emitProxyAuthenticationRequired(QNetworkProxy,QNativePointer)", qt.core.Qt.ConnectionType.DirectConnection); - </inject-code> + </inject-code> --> </object-type> <object-type name="QUdpSocket"> - <inject-code> +<!-- <inject-code> <import-file name="typesystem_network-java.java" quote-after-line="class QUdpSocket___" quote-before-line="}// class"/> </inject-code> <inject-code class="constructors"> @@ -220,14 +247,14 @@ <access modifier="private"/> </modify-function> - <modify-function signature="writeDatagram(QByteArray, QHostAddress, unsigned short)" access="private"/> + <modify-function signature="writeDatagram(QByteArray, QHostAddress, unsigned short)" access="private"/>--> </object-type> <object-type name="QHttpHeader"> <modify-function signature="operator=(QHttpHeader)" remove="all"/> </object-type> <object-type name="QLocalServer"> - <inject-code> +<!-- <inject-code> <import-file name="typesystem_network-java.java" quote-after-line="class QLocalServer___" quote-before-line="}// class"/> </inject-code> <modify-function signature="waitForNewConnection(int,bool*)"> @@ -239,15 +266,30 @@ <remove-default-expression/> </modify-argument> </modify-function> + --> </object-type> - <object-type name="QLocalSocket"/> + <object-type name="QLocalSocket"> + <modify-function signature="error()const"> + <rename to="error_"/> + </modify-function> + </object-type> <object-type name="QNetworkAccessManager"> <modify-function signature="setCookieJar(QNetworkCookieJar*)"> <modify-argument index="1"> <define-ownership class="java" owner="c++"/> </modify-argument> </modify-function> - + <modify-function signature="setCache(QAbstractNetworkCache*)"> + <modify-argument index="1"> + <reference-count action="ignore"/> + </modify-argument> + </modify-function> + <modify-function signature="setProxyFactory(QNetworkProxyFactory*)"> + <modify-argument index="1"> + <define-ownership class="java" owner="c++"/> + </modify-argument> + </modify-function> + <!-- <inject-code> <import-file name="typesystem_network-java.java" quote-after-line="class QNetworkAccessManager___" quote-before-line="}// class"/> </inject-code> @@ -267,10 +309,14 @@ authenticationRequired.connect(this, "emitAuthenticationRequiredPrivate(QNetworkReply, QAuthenticator)", qt.core.Qt.ConnectionType.DirectConnection); authenticationRequiredPrivate.connect(this, "emitAuthenticationRequired(QNetworkReply, QNativePointer)", qt.core.Qt.ConnectionType.DirectConnection); </inject-code> + --> </object-type> <object-type name="QNetworkCookieJar"/> - <object-type name="QNetworkReply"/> - + <object-type name="QNetworkReply"> + <modify-function signature="error()const"> + <rename to="error_"/> + </modify-function> + </object-type> <value-type name="QHostAddress"> <modify-function signature="QHostAddress(unsigned char*)" remove="all"/> <modify-function signature="setAddress(unsigned char*)" remove="all"/> @@ -280,11 +326,11 @@ <value-type name="QHostInfo"> <modify-function signature="operator=(QHostInfo)" remove="all"/> - <modify-function signature="lookupHost(QString,QObject*,const char*)" access="private"/> +<!-- <modify-function signature="lookupHost(QString,QObject*,const char*)" access="private"/> <inject-code class="java"> <import-file name="typesystem_network-java.java" quote-after-line="class QHostInfo___" quote-before-line="}// class"/> - </inject-code> + </inject-code> --> </value-type> <value-type name="QHttpRequestHeader"> @@ -305,7 +351,7 @@ <value-type name="QNetworkProxy"> <modify-function signature="operator=(QNetworkProxy)" remove="all"/> - + <!-- <inject-code> <import-file name="typesystem_network-java.java" quote-after-line="class QNetworkProxy___" quote-before-line="}// class"/> </inject-code> @@ -318,7 +364,7 @@ </modify-argument> </modify-function> <modify-function signature="setPort(unsigned short)" access="private"/> - <modify-function signature="port()const" access="private" rename="port_private"/> + <modify-function signature="port()const" access="private" rename="port_private"/>--> </value-type> <value-type name="QUrlInfo"> @@ -360,16 +406,23 @@ </value-type> <value-type name="QSslCertificate"> <modify-function signature="operator=(QSslCertificate)" remove="all"/> + <modify-function signature="version()const"> + <rename to="version_"/> + </modify-function> </value-type> <value-type name="QSslConfiguration"> <modify-function signature="operator=(QSslConfiguration)" remove="all"/> </value-type> <object-type name="QSslSocket"> - <inject-code> + <modify-function signature="sslErrors()const"> + <rename to="error_"/> + </modify-function> +<!-- <inject-code> <import-file name="typesystem_network-java.java" quote-after-line="class QSslSocket___" quote-before-line="}// class"/> </inject-code> <modify-function signature="connectToHostImplementation(QString, unsigned short, QFlags<QIODevice::OpenModeFlag>)" access="private"/> +--> </object-type> <suppress-warning text="*unmatched parameter type 'sockaddr const*"/>
--- a/generator/typesystem_webkit-java.xml Sat May 16 21:34:54 2009 +0000 +++ b/generator/typesystem_webkit-java.xml Sun May 17 01:44:06 2009 +0000 @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<typesystem package="qt.webkit" default-superclass="qt.QtJambiObject"> +<typesystem package="qt.webkit" default-superclass="QtDObject"> <inject-code> qt.Utilities.loadQtLibrary("QtGui"); qt.Utilities.loadQtLibrary("QtNetwork");
--- a/generator/typesystem_webkit.xml Sat May 16 21:34:54 2009 +0000 +++ b/generator/typesystem_webkit.xml Sun May 17 01:44:06 2009 +0000 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<typesystem package="qt.webkit" default-superclass="qt.QtJambiObject"> +<typesystem package="qt.webkit" default-superclass="QtDObject"> <inject-code> qt.Utilities.loadQtLibrary("QtGui"); qt.Utilities.loadQtLibrary("QtNetwork"); @@ -34,12 +34,13 @@ <object-type name="QWebHistory"/> <object-type name="QWebSettings"/> <object-type name="QWebPage"> - <inject-code class="java"> +<!-- <inject-code class="java"> <import-file name="typesystem_webkit-java.java" quote-after-line="class QWebPage___" quote-before-line="}// class"/> </inject-code> <modify-function signature="javaScriptPrompt(QWebFrame*,QString,QString,QString*)"> <access modifier="private"/> </modify-function> + --> <modify-function signature="setView(QWidget*)"> <modify-argument index="1"> <reference-count action="set" variable-name="__rcView"/>
--- a/qt/QGlobal.d Sat May 16 21:34:54 2009 +0000 +++ b/qt/QGlobal.d Sun May 17 01:44:06 2009 +0000 @@ -75,6 +75,17 @@ alias long qint64; /* 64 bit signed */ alias ulong quint64; /* 64 bit unsigned */ +version (X86) +{ + alias quint32 quintptr; + alias qint32 qptrdiff; +} +else version (X86_64) +{ + alias quint64 quintptr; + alias qint64 qptrdiff; +} + const byte QT_POINTER_SIZE = 8; alias int QNoImplicitBoolCast;