From 4f1eb28fe8eec06e658da67f1044a01599bcde53 Mon Sep 17 00:00:00 2001 From: "Dr. Peter Droste" Date: Sat, 17 Feb 2024 17:22:09 +0100 Subject: [PATCH] QtJambi 6.6.2 #185 --- LICENSE | 2 +- LICENSE.GPL3 | 2 +- LICENSE.GPLv3 | 2 +- LICENSE.LGPL | 2 +- LICENSE.LGPLv21 | 2 +- README.md | 16 +- antfiles/autotests.xml | 71 +- antfiles/clean.xml | 30 + antfiles/generator.xml | 30 + antfiles/java.xml | 30 + antfiles/native.xml | 37 +- build.xml | 57 +- releases.properties | 18 +- src/cpp/QtJambi.pro | 31 + src/cpp/QtJambi/AboutToPaint | 2 +- src/cpp/QtJambi/Cast | 2 +- src/cpp/QtJambi/ContainerAPI | 2 +- src/cpp/QtJambi/CoreAPI | 2 +- src/cpp/QtJambi/DebugAPI | 2 +- src/cpp/QtJambi/FunctionPointer | 2 +- src/cpp/QtJambi/FunctionalBase | 2 +- src/cpp/QtJambi/Global | 2 +- src/cpp/QtJambi/GuiAPI | 2 +- src/cpp/QtJambi/JNIEnvironment | 2 +- src/cpp/QtJambi/JObjectWrapper | 2 +- src/cpp/QtJambi/JavaAPI | 2 +- src/cpp/QtJambi/MetaInfo | 2 +- src/cpp/QtJambi/QmlAPI | 2 +- src/cpp/QtJambi/QtJambi | 2 +- src/cpp/QtJambi/QtJambi.pro | 38 +- src/cpp/QtJambi/QtJambiAPI | 2 +- src/cpp/QtJambi/RegistryAPI | 2 +- src/cpp/QtJambi/TestAPI | 2 +- src/cpp/QtJambi/ThreadAPI | 2 +- src/cpp/QtJambi/TypeTests | 2 +- src/cpp/QtJambi/applicationdata.cpp | 2 +- src/cpp/QtJambi/cast.cpp | 31 + src/cpp/QtJambi/configure.pri | 70 +- src/cpp/QtJambi/containeraccess.cpp | 31 + src/cpp/QtJambi/containeraccess.h | 2 +- src/cpp/QtJambi/containeraccess_hash.cpp | 31 + src/cpp/QtJambi/containeraccess_hash.h | 2 +- src/cpp/QtJambi/containeraccess_iterator.cpp | 31 + .../QtJambi/containeraccess_linkedlist.cpp | 31 + src/cpp/QtJambi/containeraccess_linkedlist.h | 2 +- src/cpp/QtJambi/containeraccess_list.cpp | 193 +- src/cpp/QtJambi/containeraccess_list.h | 2 +- src/cpp/QtJambi/containeraccess_map.cpp | 31 + src/cpp/QtJambi/containeraccess_map.h | 2 +- src/cpp/QtJambi/containeraccess_multihash.cpp | 31 + src/cpp/QtJambi/containeraccess_multihash.h | 2 +- src/cpp/QtJambi/containeraccess_multimap.cpp | 31 + src/cpp/QtJambi/containeraccess_multimap.h | 2 +- src/cpp/QtJambi/containeraccess_p.h | 2 +- src/cpp/QtJambi/containeraccess_pair.cpp | 31 + src/cpp/QtJambi/containeraccess_pair.h | 2 +- src/cpp/QtJambi/containeraccess_set.cpp | 31 + src/cpp/QtJambi/containeraccess_set.h | 2 +- src/cpp/QtJambi/containeraccess_vector.cpp | 31 + src/cpp/QtJambi/containeraccess_vector.h | 2 +- src/cpp/QtJambi/containerapi.h | 2 +- src/cpp/QtJambi/containers.cpp | 2 +- src/cpp/QtJambi/convert.cpp | 370 ++- src/cpp/QtJambi/coreapi.cpp | 2 +- src/cpp/QtJambi/coreapi.h | 2 +- src/cpp/QtJambi/debug.cpp | 19 +- src/cpp/QtJambi/debugapi.h | 6 +- src/cpp/QtJambi/enums.cpp | 2 +- src/cpp/QtJambi/events.cpp | 2 +- src/cpp/QtJambi/exception.cpp | 2 +- src/cpp/QtJambi/exception.h | 2 +- src/cpp/QtJambi/fileengine.cpp | 8 +- src/cpp/QtJambi/functionalbase.cpp | 2 +- src/cpp/QtJambi/functionalbase.h | 2 +- src/cpp/QtJambi/functionpointer.cpp | 2 +- src/cpp/QtJambi/functionpointer.h | 2 +- src/cpp/QtJambi/future.cpp | 4 +- src/cpp/QtJambi/global.h | 2 +- src/cpp/QtJambi/guiapi.h | 2 +- src/cpp/QtJambi/java.cpp | 13 +- src/cpp/QtJambi/java_p.h | 35 +- src/cpp/QtJambi/javaapi.h | 10 +- src/cpp/QtJambi/javaarrays.cpp | 2 +- src/cpp/QtJambi/javaarrays.h | 2 +- src/cpp/QtJambi/javabuffers.cpp | 2 +- src/cpp/QtJambi/javabuffers.h | 2 +- src/cpp/QtJambi/javainvalidate.cpp | 2 +- src/cpp/QtJambi/javainvalidate.h | 2 +- src/cpp/QtJambi/javastrings.cpp | 2 +- src/cpp/QtJambi/javastrings.h | 2 +- src/cpp/QtJambi/javautils.h | 2 +- src/cpp/QtJambi/jna.cpp | 75 +- src/cpp/QtJambi/jni_classanalyser.cpp | 2 +- src/cpp/QtJambi/jni_deployer.cpp | 2 +- src/cpp/QtJambi/jni_enum.cpp | 2 +- src/cpp/QtJambi/jni_metaobjecttools.cpp | 2 +- src/cpp/QtJambi/jni_metatype.cpp | 2 +- src/cpp/QtJambi/jni_native.cpp | 2 +- src/cpp/QtJambi/jni_nativepointer.cpp | 2 +- src/cpp/QtJambi/jni_reflection.cpp | 2 +- src/cpp/QtJambi/jni_signals.cpp | 2 +- src/cpp/QtJambi/jni_test.cpp | 2 +- src/cpp/QtJambi/jni_utilities.cpp | 10 +- src/cpp/QtJambi/jnienvironment.cpp | 2 +- src/cpp/QtJambi/jnienvironment.h | 2 +- src/cpp/QtJambi/jobjectwrapper.cpp | 15 +- src/cpp/QtJambi/jobjectwrapper.h | 2 +- src/cpp/QtJambi/messagehandler.cpp | 37 +- src/cpp/QtJambi/metainfo.cpp | 2 +- src/cpp/QtJambi/metainfo.h | 2 +- src/cpp/QtJambi/objectdata.cpp | 2 +- src/cpp/QtJambi/paint.cpp | 2 +- src/cpp/QtJambi/paint.h | 2 +- src/cpp/QtJambi/plugin.cpp | 66 +- src/cpp/QtJambi/qmlapi.cpp | 2 +- src/cpp/QtJambi/qmlapi.h | 6 +- src/cpp/QtJambi/qtjambi_cast.h | 2 +- src/cpp/QtJambi/qtjambi_cast_array.h | 2 +- src/cpp/QtJambi/qtjambi_cast_impl.h | 2 +- .../QtJambi/qtjambi_cast_impl_arithmetic.h | 2 +- src/cpp/QtJambi/qtjambi_cast_impl_array.h | 2 +- .../qtjambi_cast_impl_container_associative.h | 2 +- .../qtjambi_cast_impl_container_iterator.h | 31 + .../qtjambi_cast_impl_container_sequential.h | 2 +- src/cpp/QtJambi/qtjambi_cast_impl_enum.h | 2 +- src/cpp/QtJambi/qtjambi_cast_impl_jnitype.h | 2 +- .../QtJambi/qtjambi_cast_impl_smartpointer.h | 2 +- src/cpp/QtJambi/qtjambi_cast_impl_template1.h | 19 +- src/cpp/QtJambi/qtjambi_cast_impl_template2.h | 2 +- src/cpp/QtJambi/qtjambi_cast_impl_template3.h | 2 +- src/cpp/QtJambi/qtjambi_cast_impl_template4.h | 2 +- src/cpp/QtJambi/qtjambi_cast_impl_template5.h | 31 + src/cpp/QtJambi/qtjambi_cast_impl_util.h | 2 +- src/cpp/QtJambi/qtjambi_cast_type_p.h | 2 +- src/cpp/QtJambi/qtjambi_functionpointer2.h | 2 +- src/cpp/QtJambi/qtjambi_pch.h | 2 +- src/cpp/QtJambi/qtjambiapi.cpp | 92 +- src/cpp/QtJambi/qtjambiapi.h | 2 +- src/cpp/QtJambi/qtjambilink.cpp | 48 +- src/cpp/QtJambi/qtjambilink_p.h | 17 +- src/cpp/QtJambi/qtjambimetaobject.cpp | 2 +- src/cpp/QtJambi/qtjambimetaobject_p.h | 2 +- src/cpp/QtJambi/qtjambishell.cpp | 90 +- src/cpp/QtJambi/qtjambishell.h | 4 +- src/cpp/QtJambi/qtjambishell_p.h | 2 +- src/cpp/QtJambi/registry.cpp | 525 +++- src/cpp/QtJambi/registryapi.h | 10 +- src/cpp/QtJambi/registryutil_p.h | 34 +- src/cpp/QtJambi/scope.cpp | 2 +- src/cpp/QtJambi/scope.h | 2 +- src/cpp/QtJambi/setup.cpp | 7 +- src/cpp/QtJambi/supertypeinfo.cpp | 81 +- src/cpp/QtJambi/supertypeinfo_p.h | 9 +- src/cpp/QtJambi/testapi.h | 2 +- src/cpp/QtJambi/thread.cpp | 2 +- src/cpp/QtJambi/threadapi.h | 2 +- src/cpp/QtJambi/threadutils_p.h | 2 +- src/cpp/QtJambi/typeentry.cpp | 41 +- src/cpp/QtJambi/typeentry_p.h | 2 +- src/cpp/QtJambi/typemanager.cpp | 2 +- src/cpp/QtJambi/typemanager_p.h | 2 +- src/cpp/QtJambi/typetests.h | 2 +- src/cpp/QtJambi/utils.cpp | 2 +- src/cpp/QtJambi/utils.h | 2 +- src/cpp/QtJambi/utils_p.h | 4 +- src/cpp/QtJambi/variant.cpp | 2 +- .../QtJambi3DAnimation/QtJambi3DAnimation.pro | 31 + src/cpp/QtJambi3DAnimation/hashes.h | 2 +- src/cpp/QtJambi3DCore/QtJambi3DCore.pro | 31 + src/cpp/QtJambi3DExtras/QtJambi3DExtras.pro | 31 + src/cpp/QtJambi3DInput/QtJambi3DInput.pro | 31 + src/cpp/QtJambi3DInput/hashes.h | 2 +- src/cpp/QtJambi3DLogic/QtJambi3DLogic.pro | 31 + src/cpp/QtJambi3DQuick/QtJambi3DQuick.pro | 31 + .../QtJambi3DQuickExtras.pro | 31 + .../QtJambi3DQuickScene2D.pro | 31 + src/cpp/QtJambi3DRender/QtJambi3DRender.pro | 31 + src/cpp/QtJambi3DRender/hashes.h | 2 +- src/cpp/QtJambiActiveX/QtJambiActiveX.pro | 31 + src/cpp/QtJambiBluetooth/QtJambiBluetooth.pro | 31 + src/cpp/QtJambiBluetooth/hashes.h | 2 +- src/cpp/QtJambiBluetooth/utils.cpp | 2 +- src/cpp/QtJambiBluetooth/utils_p.h | 2 +- src/cpp/QtJambiCharts/QtJambiCharts.pro | 31 + .../QtJambiConcurrent/QtJambiConcurrent.pro | 31 + src/cpp/QtJambiConcurrent/impl.cpp | 20 +- src/cpp/QtJambiCore/QHash_shell.cpp | 2 +- src/cpp/QtJambiCore/QIterator_shell.cpp | 2 +- src/cpp/QtJambiCore/QLinkedList_shell.cpp | 2 +- src/cpp/QtJambiCore/QList_shell.cpp | 6 +- src/cpp/QtJambiCore/QMap_shell.cpp | 2 +- src/cpp/QtJambiCore/QSet_shell.cpp | 2 +- src/cpp/QtJambiCore/QVector_shell.cpp | 2 +- src/cpp/QtJambiCore/QtJambiCore.pro | 31 + src/cpp/QtJambiCore/future.cpp | 32 +- src/cpp/QtJambiCore/hashes.h | 102 +- src/cpp/QtJambiCore/impl.cpp | 109 +- src/cpp/QtJambiCore/pch_p.h | 2 +- src/cpp/QtJambiCore/plugins.cpp | 2 +- src/cpp/QtJambiCore/utils.cpp | 8 +- src/cpp/QtJambiCore/utils_p.h | 22 +- src/cpp/QtJambiDBus/QtJambiDBus.pro | 31 + src/cpp/QtJambiDBus/impl.cpp | 24 +- .../QtJambiDataVisualization.pro | 31 + src/cpp/QtJambiDataVisualization/hashes.h | 2 +- src/cpp/QtJambiDataVisualization/impl.cpp | 31 + src/cpp/QtJambiDesigner/QtJambiDesigner.pro | 31 + src/cpp/QtJambiDesigner/impl.cpp | 2 +- src/cpp/QtJambiDesigner/utils_p.h | 2 +- src/cpp/QtJambiGenerator/QtJambiGenerator.pro | 31 + .../QtJambiGenerator/abstractgenerator.cpp | 23 +- src/cpp/QtJambiGenerator/asttoxml.cpp | 2 +- .../QtJambiGenerator/bufferedoutputstream.cpp | 6 + .../QtJambiGenerator/bufferedoutputstream.h | 2 +- src/cpp/QtJambiGenerator/cppgenerator.cpp | 355 +-- src/cpp/QtJambiGenerator/cppgenerator.h | 4 +- .../QtJambiGenerator/cppheadergenerator.cpp | 57 +- src/cpp/QtJambiGenerator/cppheadergenerator.h | 2 +- src/cpp/QtJambiGenerator/cppimplgenerator.cpp | 2013 ++++++------- src/cpp/QtJambiGenerator/cppimplgenerator.h | 26 +- src/cpp/QtJambiGenerator/debuglog.h | 31 + .../QtJambiGenerator/docindex/docclass.cpp | 31 + src/cpp/QtJambiGenerator/docindex/docclass.h | 31 + .../QtJambiGenerator/docindex/docelement.cpp | 31 + .../QtJambiGenerator/docindex/docelement.h | 31 + src/cpp/QtJambiGenerator/docindex/docenum.cpp | 31 + src/cpp/QtJambiGenerator/docindex/docenum.h | 31 + .../QtJambiGenerator/docindex/docfunction.cpp | 31 + .../QtJambiGenerator/docindex/docfunction.h | 31 + .../docindex/docindexreader.cpp | 31 + .../docindex/docindexreader.h | 31 + .../QtJambiGenerator/docindex/docmodel.cpp | 31 + src/cpp/QtJambiGenerator/docindex/docmodel.h | 31 + .../docindex/docnamespace.cpp | 31 + .../QtJambiGenerator/docindex/docnamespace.h | 31 + .../QtJambiGenerator/docindex/docproperty.cpp | 31 + .../QtJambiGenerator/docindex/docproperty.h | 31 + .../QtJambiGenerator/docindex/doctypedef.cpp | 31 + .../QtJambiGenerator/docindex/doctypedef.h | 31 + .../QtJambiGenerator/docindex/docvariable.cpp | 31 + .../QtJambiGenerator/docindex/docvariable.h | 31 + src/cpp/QtJambiGenerator/executable.pro | 36 +- src/cpp/QtJambiGenerator/generator.cpp | 6 +- src/cpp/QtJambiGenerator/generator.h | 2 +- src/cpp/QtJambiGenerator/javagenerator.cpp | 2567 +++++++++-------- src/cpp/QtJambiGenerator/javagenerator.h | 2 +- src/cpp/QtJambiGenerator/library.pro | 61 +- src/cpp/QtJambiGenerator/metabuilder.cpp | 783 ++++- src/cpp/QtJambiGenerator/metabuilder.h | 12 +- .../QtJambiGenerator/metainfogenerator.cpp | 30 +- src/cpp/QtJambiGenerator/metainfogenerator.h | 2 +- src/cpp/QtJambiGenerator/metalang.cpp | 282 +- src/cpp/QtJambiGenerator/metalang.h | 43 +- src/cpp/QtJambiGenerator/parser/ast.h | 1 + src/cpp/QtJambiGenerator/parser/binder.cpp | 103 +- src/cpp/QtJambiGenerator/parser/binder.h | 3 +- src/cpp/QtJambiGenerator/parser/codemodel.cpp | 35 +- src/cpp/QtJambiGenerator/parser/codemodel.h | 19 +- .../parser/declarator_compiler.cpp | 2 +- .../parser/declarator_compiler.h | 2 +- src/cpp/QtJambiGenerator/parser/lexer.cpp | 18 + .../QtJambiGenerator/parser/name_compiler.cpp | 2 +- src/cpp/QtJambiGenerator/parser/parser.cpp | 362 +-- src/cpp/QtJambiGenerator/parser/parser.h | 2 + .../QtJambiGenerator/parser/rpp/pp-cctype.h | 2 +- .../parser/rpp/pp-engine-bits.cpp | 171 +- .../parser/rpp/pp-engine-bits.h | 151 +- .../parser/rpp/pp-environment.cpp | 21 +- .../parser/rpp/pp-environment.h | 2 +- src/cpp/QtJambiGenerator/parser/rpp/pp-fwd.h | 2 +- .../QtJambiGenerator/parser/rpp/pp-internal.h | 2 +- .../parser/rpp/pp-macro-expander.cpp | 2 +- .../parser/rpp/pp-macro-expander.h | 2 +- .../parser/rpp/pp-qt-configuration | 4 + .../parser/rpp/preprocessor.cpp | 2 +- src/cpp/QtJambiGenerator/parser/rpp/rpp.pri | 31 + src/cpp/QtJambiGenerator/parser/rxx.pri | 30 + src/cpp/QtJambiGenerator/parser/tokens.cpp | 1 + src/cpp/QtJambiGenerator/parser/tokens.h | 1 + src/cpp/QtJambiGenerator/preprocesshandler.h | 31 + src/cpp/QtJambiGenerator/prigenerator.cpp | 2 +- src/cpp/QtJambiGenerator/reporthandler.h | 2 +- src/cpp/QtJambiGenerator/targets/all.h | 27 +- src/cpp/QtJambiGenerator/targets/all.qml | 2 +- src/cpp/QtJambiGenerator/targets/graphs.h | 2 +- src/cpp/QtJambiGenerator/targets/graphs.qml | 2 +- src/cpp/QtJambiGenerator/typeparser.cpp | 2 +- src/cpp/QtJambiGenerator/typeparser.h | 2 +- .../typesystem/java/QtJambi3DCore.java | 2 +- .../typesystem/java/QtJambiCharts.java | 2 +- .../typesystem/java/QtJambiConcurrent.java | 2 +- .../typesystem/java/QtJambiCore.java | 442 +-- .../typesystem/java/QtJambiGui.java | 6 +- .../typesystem/java/QtJambiHttpServer.java | 2 +- .../typesystem/java/QtJambiLocation.java | 2 +- .../typesystem/java/QtJambiMultimedia.java | 2 +- .../typesystem/java/QtJambiNetwork.java | 75 +- .../typesystem/java/QtJambiPositioning.java | 2 +- .../typesystem/java/QtJambiQml.java | 2 +- .../typesystem/java/QtJambiQuick.java | 14 +- .../typesystem/java/QtJambiQuickTest.java | 2 +- .../typesystem/java/QtJambiRemoteObjects.java | 2 +- .../typesystem/java/QtJambiScxml.java | 256 +- .../typesystem/java/QtJambiTest.java | 2 +- .../java/QtJambiWebEngineQuick.java | 2 +- .../typesystem/java/QtJambiWidgets.java | 2 +- .../typesystem/java/QtJambiWinExtras.java | 2 +- .../typesystem/java/QtJambiXml.java | 2 +- .../typesystem/modification.h | 24 +- .../typesystem/qml/Qt3DAnimation.qml | 2 +- .../typesystem/qml/Qt3DCore.qml | 4 +- .../typesystem/qml/Qt3DExtras.qml | 2 +- .../typesystem/qml/Qt3DInput.qml | 2 +- .../typesystem/qml/Qt3DLogic.qml | 2 +- .../typesystem/qml/Qt3DQuick.qml | 2 +- .../typesystem/qml/Qt3DQuickExtras.qml | 2 +- .../typesystem/qml/Qt3DQuickRender.qml | 2 +- .../typesystem/qml/Qt3DQuickScene2D.qml | 2 +- .../typesystem/qml/Qt3DRender.qml | 71 +- .../typesystem/qml/QtActiveX.qml | 2 +- .../typesystem/qml/QtBluetooth.qml | 2 +- .../typesystem/qml/QtBodymovin.qml | 2 +- .../typesystem/qml/QtCharts.qml | 8 +- .../typesystem/qml/QtConcurrent.qml | 2 +- .../typesystem/qml/QtCore.qml | 1711 ++++++++--- .../typesystem/qml/QtDBus.qml | 2 +- .../typesystem/qml/QtDataVisualization.qml | 2 +- .../typesystem/qml/QtDesigner.qml | 2 +- .../typesystem/qml/QtGamepad.qml | 2 +- .../typesystem/qml/QtGraphs.qml | 151 +- .../typesystem/qml/QtGrpc.qml | 2 +- .../QtJambiGenerator/typesystem/qml/QtGui.qml | 378 ++- .../typesystem/qml/QtGuiQpa.qml | 2 +- .../typesystem/qml/QtGuiRhi.qml | 105 +- .../typesystem/qml/QtHelp.qml | 2 +- .../typesystem/qml/QtHttpServer.qml | 2 +- .../typesystem/qml/QtLocation.qml | 2 +- .../typesystem/qml/QtMacExtras.qml | 2 +- .../typesystem/qml/QtMultimedia.qml | 16 +- .../typesystem/qml/QtMultimediaWidgets.qml | 2 +- .../typesystem/qml/QtNetwork.qml | 1513 +++++++++- .../typesystem/qml/QtNetworkAuth.qml | 126 +- .../QtJambiGenerator/typesystem/qml/QtNfc.qml | 2 +- .../typesystem/qml/QtOpenGL.qml | 22 +- .../typesystem/qml/QtOpenGLWidgets.qml | 2 +- .../QtJambiGenerator/typesystem/qml/QtPdf.qml | 6 +- .../typesystem/qml/QtPdfWidgets.qml | 2 +- .../typesystem/qml/QtPositioning.qml | 2 +- .../typesystem/qml/QtPrintSupport.qml | 2 +- .../typesystem/qml/QtProtobuf.qml | 2 +- .../typesystem/qml/QtPurchasing.qml | 2 +- .../QtJambiGenerator/typesystem/qml/QtQml.qml | 15 +- .../typesystem/qml/QtQuick.qml | 310 +- .../typesystem/qml/QtQuick3D.qml | 2 +- .../typesystem/qml/QtQuickControls2.qml | 2 +- .../typesystem/qml/QtQuickTest.qml | 2 +- .../typesystem/qml/QtQuickWidgets.qml | 2 +- .../typesystem/qml/QtRemoteObjects.qml | 2 +- .../typesystem/qml/QtScript.qml | 2 +- .../typesystem/qml/QtScriptTools.qml | 2 +- .../typesystem/qml/QtScxml.qml | 686 ++++- .../typesystem/qml/QtSensors.qml | 2 +- .../typesystem/qml/QtSerialBus.qml | 2 +- .../typesystem/qml/QtSerialPort.qml | 84 +- .../typesystem/qml/QtSpatialAudio.qml | 2 +- .../QtJambiGenerator/typesystem/qml/QtSql.qml | 2 +- .../typesystem/qml/QtStateMachine.qml | 2 +- .../QtJambiGenerator/typesystem/qml/QtSvg.qml | 67 +- .../typesystem/qml/QtSvgWidgets.qml | 12 +- .../typesystem/qml/QtTest.qml | 46 +- .../typesystem/qml/QtTextToSpeech.qml | 114 +- .../typesystem/qml/QtUiTools.qml | 2 +- .../typesystem/qml/QtVirtualKeyboard.qml | 2 +- .../typesystem/qml/QtWebChannel.qml | 2 +- .../typesystem/qml/QtWebChannelQuick.qml | 2 +- .../typesystem/qml/QtWebEngine.qml | 2 +- .../typesystem/qml/QtWebEngineCore.qml | 141 +- .../typesystem/qml/QtWebEngineQuick.qml | 2 +- .../typesystem/qml/QtWebEngineWidgets.qml | 95 +- .../typesystem/qml/QtWebSockets.qml | 2 +- .../typesystem/qml/QtWebView.qml | 2 +- .../typesystem/qml/QtWidgets.qml | 102 +- .../typesystem/qml/QtWinExtras.qml | 2 +- .../typesystem/qml/QtX11Extras.qml | 4 +- .../QtJambiGenerator/typesystem/qml/QtXml.qml | 2 +- .../typesystem/qml/QtXmlPatterns.qml | 2 +- .../QtJambiGenerator/typesystem/qml/ui4.qml | 2 +- .../typesystem/qml_abstractobject.cpp | 31 + .../typesystem/qml_abstractobject.h | 31 + .../typesystem/qml_include.cpp | 31 + .../QtJambiGenerator/typesystem/qml_include.h | 31 + .../typesystem/qml_injectcode.cpp | 31 + .../typesystem/qml_injectcode.h | 31 + .../typesystem/qml_loadtypesystem.cpp | 31 + .../typesystem/qml_loadtypesystem.h | 31 + .../typesystem/qml_modify.cpp | 83 + .../QtJambiGenerator/typesystem/qml_modify.h | 70 + .../typesystem/qml_suppressedwarning.cpp | 31 + .../typesystem/qml_suppressedwarning.h | 31 + .../typesystem/qml_template.cpp | 31 + .../typesystem/qml_template.h | 31 + .../QtJambiGenerator/typesystem/qml_types.cpp | 109 + .../QtJambiGenerator/typesystem/qml_types.h | 84 + .../typesystem/qml_typesystem.cpp | 31 + .../typesystem/qml_typesystem.h | 31 + .../typesystem/qmltypesystemreader.cpp | 425 +-- .../typesystem/typedatabase.cpp | 2 +- .../typesystem/typedatabase.h | 2 +- .../QtJambiGenerator/typesystem/typeentry.cpp | 654 ++++- .../QtJambiGenerator/typesystem/typeentry.h | 720 ++--- src/cpp/QtJambiGenerator/typesystem/utils.cpp | 2 +- src/cpp/QtJambiGenerator/typesystem/utils.h | 2 +- .../typesystem/xmltoqmlconverter.cpp | 2 +- .../typesystem/xmltypesystemreader.cpp | 40 +- src/cpp/QtJambiGraphs/QtJambiGraphs.pro | 31 + src/cpp/QtJambiGraphs/hashes.h | 2 +- src/cpp/QtJambiGrpc/QtJambiGrpc.pro | 31 + src/cpp/QtJambiGrpc/channel.cpp | 31 + src/cpp/QtJambiGrpc/hashes.h | 2 +- src/cpp/QtJambiGrpc/impl.cpp | 31 + src/cpp/QtJambiGrpc/utils_p.h | 2 +- src/cpp/QtJambiGui/QtJambiGui.pro | 31 + src/cpp/QtJambiGui/hashes.h | 24 +- src/cpp/QtJambiGui/impl.cpp | 2 +- src/cpp/QtJambiGui/pch_p.h | 2 +- src/cpp/QtJambiGui/qtmatrixes.cpp | 2 +- src/cpp/QtJambiGui/qtmatrixes.h | 2 +- src/cpp/QtJambiGui/utils_p.h | 2 +- src/cpp/QtJambiGuiQpa/QtJambiGuiQpa.pro | 31 + src/cpp/QtJambiGuiQpa/impl.cpp | 31 + src/cpp/QtJambiGuiRhi/QtJambiGuiRhi.pro | 31 + src/cpp/QtJambiGuiRhi/hashes.h | 2 +- src/cpp/QtJambiHelp/QtJambiHelp.pro | 31 + src/cpp/QtJambiHelp/hashes.h | 2 +- .../QtJambiHttpServer/QtJambiHttpServer.pro | 31 + src/cpp/QtJambiHttpServer/impl.cpp | 2 +- src/cpp/QtJambiLauncher/QtJambiLauncher.pro | 33 +- src/cpp/QtJambiLauncher/main.cpp | 2 +- src/cpp/QtJambiLocation/QtJambiLocation.pro | 31 + src/cpp/QtJambiLocation/hashes.h | 2 +- src/cpp/QtJambiLocation/impl.cpp | 2 +- src/cpp/QtJambiLocation/utils_p.h | 2 +- .../QtJambiMultimedia/QtJambiMultimedia.pro | 31 + src/cpp/QtJambiMultimedia/hashes.h | 2 +- src/cpp/QtJambiMultimedia/impl.cpp | 4 +- src/cpp/QtJambiMultimedia/utils_p.h | 2 +- .../QtJambiMultimediaWidgets.pro | 31 + src/cpp/QtJambiNetwork/hashes.h | 2 +- src/cpp/QtJambiNetwork/impl.cpp | 30 +- src/cpp/QtJambiNetwork/pch_p.h | 2 +- src/cpp/QtJambiNetwork/utils_p.h | 2 +- .../QtJambiNetworkAuth/QtJambiNetworkAuth.pro | 31 + src/cpp/QtJambiNfc/QtJambiNfc.pro | 31 + src/cpp/QtJambiNfc/hashes.h | 2 +- src/cpp/QtJambiNfc/impl.cpp | 2 +- src/cpp/QtJambiOpenGL/QtJambiOpenGL.pro | 31 + src/cpp/QtJambiOpenGL/hashes.h | 2 +- src/cpp/QtJambiOpenGL/impl.cpp | 2 +- .../QtJambiOpenGLWidgets.pro | 31 + src/cpp/QtJambiPdf/QtJambiPdf.pro | 31 + src/cpp/QtJambiPdf/hashes.h | 2 +- .../QtJambiPdfWidgets/QtJambiPdfWidgets.pro | 31 + src/cpp/QtJambiPlugin/QtJambiPlugin.pro | 40 +- src/cpp/QtJambiPlugin/plugin.cpp | 2 +- .../QtJambiPositioning/QtJambiPositioning.pro | 31 + src/cpp/QtJambiPositioning/hashes.h | 2 +- src/cpp/QtJambiPositioning/impl.cpp | 2 +- src/cpp/QtJambiPositioning/utils_p.h | 2 +- .../QtJambiPrintSupport.pro | 31 + src/cpp/QtJambiProtobuf/QtJambiProtobuf.pro | 31 + src/cpp/QtJambiQml/QtJambiQml.pro | 31 + src/cpp/QtJambiQml/hashes.h | 31 + src/cpp/QtJambiQml/impl.cpp | 25 +- src/cpp/QtJambiQml/utils_p.h | 2 +- src/cpp/QtJambiQuick/QtJambiQuick.pro | 31 + src/cpp/QtJambiQuick/hashes.h | 2 +- src/cpp/QtJambiQuick/impl.cpp | 21 +- src/cpp/QtJambiQuick/utils_p.h | 8 +- src/cpp/QtJambiQuick3D/QtJambiQuick3D.pro | 31 + src/cpp/QtJambiQuick3D/hashes.h | 2 +- src/cpp/QtJambiQuick3D/impl.cpp | 2 +- src/cpp/QtJambiQuick3D/utils_p.h | 2 +- .../QtJambiQuickControls2.pro | 31 + src/cpp/QtJambiQuickTest/QtJambiQuickTest.pro | 31 + src/cpp/QtJambiQuickTest/impl.cpp | 2 +- .../QtJambiQuickWidgets.pro | 31 + .../QtJambiRemoteObjects.pro | 31 + src/cpp/QtJambiRemoteObjects/hashes.h | 2 +- src/cpp/QtJambiRemoteObjects/impl.cpp | 10 +- src/cpp/QtJambiRemoteObjects/utils_p.h | 2 +- src/cpp/QtJambiScript/hashes.h | 2 +- src/cpp/QtJambiScxml/QtJambiScxml.pro | 31 + src/cpp/QtJambiScxml/impl.cpp | 79 +- src/cpp/QtJambiSensors/QtJambiSensors.pro | 31 + src/cpp/QtJambiSensors/impl.cpp | 2 +- src/cpp/QtJambiSensors/utils_p.h | 2 +- src/cpp/QtJambiSerialBus/QtJambiSerialBus.pro | 31 + src/cpp/QtJambiSerialBus/hashes.h | 2 +- src/cpp/QtJambiSerialBus/impl.cpp | 2 +- src/cpp/QtJambiSerialBus/utils_p.h | 2 +- .../QtJambiSerialPort/QtJambiSerialPort.pro | 31 + .../QtJambiSpatialAudio.pro | 31 + src/cpp/QtJambiSql/QtJambiSql.pro | 31 + src/cpp/QtJambiSql/hashes.h | 2 +- src/cpp/QtJambiSql/impl.cpp | 2 +- .../QtJambiStateMachine.pro | 31 + src/cpp/QtJambiSvg/QtJambiSvg.pro | 31 + .../QtJambiSvgWidgets/QtJambiSvgWidgets.pro | 31 + src/cpp/QtJambiTest/QtJambiTest.pro | 31 + src/cpp/QtJambiTest/impl.cpp | 2 +- src/cpp/QtJambiTest/utils_p.h | 2 +- .../QtJambiTextToSpeech.pro | 31 + src/cpp/QtJambiTextToSpeech/hashes.h | 2 +- src/cpp/QtJambiTextToSpeech/impl.cpp | 47 +- src/cpp/QtJambiTextToSpeech/utils_p.h | 12 +- src/cpp/QtJambiUIC/QtJambiUIC.pro | 31 + src/cpp/QtJambiUIC/impl.cpp | 2 +- src/cpp/QtJambiUiTools/QtJambiUiTools.pro | 31 + .../QtJambiVirtualKeyboard.pro | 31 + .../QtJambiWebChannel/QtJambiWebChannel.pro | 31 + .../QtJambiWebChannelQuick.pro | 31 + .../QtJambiWebEngineCore.pro | 31 + src/cpp/QtJambiWebEngineCore/hashes.h | 2 +- .../QtJambiWebEngineQuick.pro | 31 + src/cpp/QtJambiWebEngineQuick/impl.cpp | 2 +- .../QtJambiWebEngineWidgets.pro | 31 + src/cpp/QtJambiWebEngineWidgets/hashes.h | 2 +- .../QtJambiWebSockets/QtJambiWebSockets.pro | 31 + src/cpp/QtJambiWebSockets/hashes.h | 2 +- src/cpp/QtJambiWebView/QtJambiWebView.pro | 31 + src/cpp/QtJambiWidgets/QtJambiWidgets.pro | 31 + src/cpp/QtJambiWidgets/hashes.h | 2 +- src/cpp/QtJambiWidgets/impl.cpp | 2 +- src/cpp/QtJambiWidgets/pch_p.h | 2 +- src/cpp/QtJambiWidgets/utils_p.h | 2 +- src/cpp/QtJambiWinExtras/impl.cpp | 2 +- src/cpp/QtJambiWinExtras/utils_p.h | 2 +- src/cpp/QtJambiX11Extras/QtJambiX11Extras.pro | 2 +- src/cpp/QtJambiXml/QtJambiXml.pro | 31 + src/cpp/QtJambiXml/hashes.h | 2 +- src/cpp/QtJambiXml/impl.cpp | 2 +- src/cpp/QtJambiXml/pch_p.h | 2 +- src/cpp/QtJambiXml/utils_p.h | 2 +- src/cpp/QtJambiXmlPatterns/hashes.h | 2 +- src/cpp/autotests/autotests.h | 2 +- src/cpp/autotests/autotests.qml | 2 +- src/cpp/autotests/flagsandenumtest.cpp | 2 +- src/cpp/autotests/flagsandenumtest.h | 2 +- src/cpp/autotests/general.h | 18 +- src/cpp/autotests/global.cpp | 29 + .../autotests/propertyandmethodcalltest.cpp | 10 +- .../BindingSetterFunction.pro | 33 +- .../BindingSetterFunction/impl.cpp | 31 + .../DoubleToDoubleFunction.pro | 31 + .../DoubleToDoubleFunction/impl.cpp | 31 + .../FloatToFloatFunction.pro | 31 + .../FloatToFloatFunction/impl.cpp | 31 + .../Generic1Function/Generic1Function.pro | 31 + .../Generic1Function/impl.cpp | 31 + .../Generic2Function/Generic2Function.pro | 31 + .../Generic2Function/impl.cpp | 31 + .../Generic3Function/Generic3Function.pro | 31 + .../Generic3Function/impl.cpp | 31 + .../Generic4Function/Generic4Function.pro | 31 + .../Generic4Function/impl.cpp | 31 + .../Generic5Function/Generic5Function.pro | 31 + .../Generic5Function/impl.cpp | 31 + .../Generic6Function/Generic6Function.pro | 31 + .../Generic6Function/impl.cpp | 31 + .../GenericFunction/GenericFunction.pro | 31 + .../functionpointers/GenericFunction/impl.cpp | 31 + .../MakeBindingFunction.pro | 33 +- .../MakeBindingFunction/impl.cpp | 31 + .../MetaTypeFunction/MetaTypeFunction.pro | 33 +- .../MetaTypeFunction/impl.cpp | 31 + .../PluginMetaDataFunction.pro | 31 + .../PluginMetaDataFunction/impl.cpp | 31 + .../PropertyBindingWrapperFunction.pro | 33 +- .../PropertyBindingWrapperFunction/impl.cpp | 31 + .../QmlTypeCreatorFunction.pro | 33 +- .../QmlTypeCreatorFunction/impl.cpp | 31 + .../VariantDataFunction.pro | 31 + .../VariantDataFunction/impl.cpp | 31 + src/cpp/functionpointers/functionpointers.pri | 98 +- src/cpp/functionpointers/functionpointers.pro | 31 + src/cpp/jarimport/jarimport.pro | 40 +- src/cpp/jarimport/lib.cpp | 2 +- src/cpp/modules.pro | 31 + .../qt/tools/ant/AbstractInitializeTask.java | 49 +- src/java/ant/io/qt/tools/ant/AidlTask.java | 4 +- src/java/ant/io/qt/tools/ant/AntUtil.java | 2 +- src/java/ant/io/qt/tools/ant/Constants.java | 3 +- .../ant/CreateFunctionPointerQrcTask.java | 36 +- .../tools/ant/CreateNativeDeploymentTask.java | 579 ++-- src/java/ant/io/qt/tools/ant/Dirent.java | 2 +- src/java/ant/io/qt/tools/ant/Exec.java | 6 +- src/java/ant/io/qt/tools/ant/FileDirent.java | 2 +- .../ant/io/qt/tools/ant/FindCompiler.java | 55 +- .../io/qt/tools/ant/ForeachVersionTask.java | 138 +- .../ant/io/qt/tools/ant/GeneratorTask.java | 4 +- .../io/qt/tools/ant/InitializeBuildTask.java | 418 +-- .../ant/io/qt/tools/ant/InitializeTask.java | 2 +- .../io/qt/tools/ant/InstallNameToolTask.java | 2 +- src/java/ant/io/qt/tools/ant/MakeTask.java | 20 +- .../qt/tools/ant/ModifyTestResultsTask.java | 10 +- src/java/ant/io/qt/tools/ant/OSInfo.java | 341 ++- src/java/ant/io/qt/tools/ant/QMakeTask.java | 14 +- .../ant/io/qt/tools/ant/ResolvePathTask.java | 2 +- .../ant/io/qt/tools/ant/StreamConsumer.java | 2 +- src/java/ant/io/qt/tools/ant/Util.java | 22 +- src/java/ant/io/qt/tools/ant/ant-qtjambi.xml | 2 +- .../autotests/io/qt/autotests/Accessor.java | 2 +- .../qt/autotests/ApplicationInitializer.java | 2 +- .../autotests/io/qt/autotests/Deployment.java | 2 +- .../io/qt/autotests/DeploymentSql.java | 2 +- .../io/qt/autotests/DisposeCounter.java | 2 +- .../io/qt/autotests/MemoryManagement.java | 2 +- .../autotests/io/qt/autotests/MyQObject.java | 2 +- .../autotests/io/qt/autotests/RunTests.java | 2 +- .../io/qt/autotests/TestActiveX.java | 2 +- .../io/qt/autotests/TestApplicationArgs.java | 2 +- .../io/qt/autotests/TestAuthInterfaces.java | 2 +- .../io/qt/autotests/TestBluetooth.java | 2 +- .../qt/autotests/TestBluetoothDiscovery.java | 2 +- .../TestBluetoothInjectedCodeQt5.java | 2 +- .../TestBluetoothInjectedCodeQt6.java | 2 +- .../autotests/io/qt/autotests/TestCharts.java | 2 +- .../qt/autotests/TestClassFunctionality.java | 2 +- .../TestClassFunctionalityProblem.java | 2 +- .../autotests/TestClassFunctionalityXpm.java | 2 +- .../io/qt/autotests/TestClipboard.java | 2 +- .../io/qt/autotests/TestCloneable.java | 2 +- .../io/qt/autotests/TestCloneableQt5.java | 2 +- .../io/qt/autotests/TestCollator.java | 2 +- .../io/qt/autotests/TestConcurrent.java | 2 +- .../io/qt/autotests/TestConnections.java | 2 +- .../io/qt/autotests/TestConstruction.java | 2 +- .../io/qt/autotests/TestContainers.java | 2 +- .../autotests/TestContainersModification.java | 2 +- .../io/qt/autotests/TestContainersQt5.java | 2 +- .../autotests/io/qt/autotests/TestDBus.java | 2 +- .../io/qt/autotests/TestDBusConnect.java | 2 +- .../qt/autotests/TestDanglingPointers1.java | 2 +- .../qt/autotests/TestDanglingPointers2.java | 2 +- .../qt/autotests/TestDanglingPointers3.java | 2 +- .../qt/autotests/TestDanglingPointers4.java | 2 +- .../io/qt/autotests/TestDataVis.java | 2 +- .../io/qt/autotests/TestDefaultSignals.java | 2 +- .../io/qt/autotests/TestDeployer.java | 2 +- .../io/qt/autotests/TestDeployerSql.java | 2 +- .../io/qt/autotests/TestDesignerHelp.java | 2 +- .../qt/autotests/TestDesignerMultimedia.java | 2 +- .../io/qt/autotests/TestDestruction.java | 2 +- .../io/qt/autotests/TestExceptions.java | 2 +- .../io/qt/autotests/TestExceptions2.java | 2 +- .../io/qt/autotests/TestFileEngine.java | 4 +- .../io/qt/autotests/TestFileEngineQt63.java | 126 + .../autotests/TestFlagsAndEnumParameters.java | 2 +- .../io/qt/autotests/TestFunctionalQt6.java | 62 + .../autotests/io/qt/autotests/TestFuture.java | 6 +- .../autotests/TestGLVersionFunctionsQt5.java | 2 +- .../autotests/io/qt/autotests/TestGraphs.java | 4 +- .../io/qt/autotests/TestHelpCloneable.java | 2 +- .../autotests/io/qt/autotests/TestI18N.java | 2 +- .../autotests/TestInitializationActiveX.java | 2 +- .../TestInitializationBluetooth.java | 2 +- .../autotests/TestInitializationCharts.java | 2 +- .../TestInitializationConcurrent.java | 2 +- .../qt/autotests/TestInitializationCore.java | 2 +- .../qt/autotests/TestInitializationDBus.java | 2 +- .../TestInitializationDataVisualization.java | 2 +- .../autotests/TestInitializationDesigner.java | 2 +- .../autotests/TestInitializationGamepad.java | 2 +- .../autotests/TestInitializationGraphs.java | 2 +- .../qt/autotests/TestInitializationGui.java | 2 +- .../TestInitializationGuiRhiQt66.java | 47 + .../qt/autotests/TestInitializationHelp.java | 2 +- .../TestInitializationHttpServer.java | 2 +- .../autotests/TestInitializationLocation.java | 2 +- .../TestInitializationMacExtras.java | 2 +- .../TestInitializationMultimedia.java | 2 +- .../TestInitializationMultimediaWidgets.java | 2 +- .../autotests/TestInitializationNetwork.java | 2 +- .../TestInitializationNetworkAuth.java | 2 +- .../qt/autotests/TestInitializationNfc.java | 2 +- .../autotests/TestInitializationOpenGL.java | 2 +- .../TestInitializationOpenGLWidgets.java | 2 +- .../qt/autotests/TestInitializationPdf.java | 2 +- .../TestInitializationPdfWidgets.java | 2 +- .../TestInitializationPositioning.java | 2 +- .../TestInitializationPrintSupport.java | 2 +- .../TestInitializationPurchasing.java | 2 +- .../qt/autotests/TestInitializationQml.java | 2 +- .../TestInitializationQt3DAnimation.java | 2 +- .../autotests/TestInitializationQt3DCore.java | 2 +- .../TestInitializationQt3DExtras.java | 2 +- .../TestInitializationQt3DInput.java | 2 +- .../TestInitializationQt3DLogic.java | 2 +- .../TestInitializationQt3DQuick.java | 2 +- .../TestInitializationQt3DQuickExtras.java | 2 +- .../TestInitializationQt3DQuickScene2D.java | 2 +- .../TestInitializationQt3DRender.java | 2 +- .../qt/autotests/TestInitializationQuick.java | 2 +- .../autotests/TestInitializationQuick3D.java | 2 +- .../TestInitializationQuickControls.java | 2 +- .../TestInitializationQuickTest.java | 2 +- .../TestInitializationQuickWidgets.java | 2 +- .../TestInitializationRemoteObjects.java | 2 +- .../autotests/TestInitializationScript.java | 2 +- .../TestInitializationScriptTools.java | 2 +- .../qt/autotests/TestInitializationScxml.java | 2 +- .../autotests/TestInitializationSensors.java | 2 +- .../TestInitializationSerialBus.java | 2 +- .../TestInitializationSerialPort.java | 2 +- .../TestInitializationSpatialAudio.java | 2 +- .../qt/autotests/TestInitializationSql.java | 2 +- .../TestInitializationStatemachine.java | 2 +- .../qt/autotests/TestInitializationSvg.java | 2 +- .../TestInitializationSvgWidgets.java | 2 +- .../qt/autotests/TestInitializationTest.java | 2 +- .../TestInitializationTextToSpeech.java | 2 +- .../autotests/TestInitializationUITools.java | 2 +- .../TestInitializationVirtualKeyboard.java | 2 +- .../TestInitializationWebChannel.java | 2 +- .../TestInitializationWebEngine.java | 2 +- .../TestInitializationWebEngineCore.java | 2 +- .../TestInitializationWebEngineQuick.java | 35 +- .../TestInitializationWebEngineWidgets.java | 10 +- .../TestInitializationWebSockets.java | 2 +- .../autotests/TestInitializationWebView.java | 2 +- .../autotests/TestInitializationWidgets.java | 2 +- .../TestInitializationWinExtras.java | 2 +- .../TestInitializationX11Extras.java | 2 +- .../qt/autotests/TestInitializationXml.java | 2 +- .../TestInitializationXmlPatterns.java | 2 +- .../io/qt/autotests/TestInjectedCode.java | 6 +- .../io/qt/autotests/TestInjectedCodeQt5.java | 2 +- .../io/qt/autotests/TestInjectedCodeQt6.java | 4 +- .../io/qt/autotests/TestInterfaces.java | 2 +- .../qt/autotests/TestItemEditorCreator.java | 2 +- .../io/qt/autotests/TestIterators.java | 2 +- .../autotests/TestLocationInjectedCode.java | 2 +- ...tMemoryManagementNonPolymorphicObject.java | 2 +- ...ryManagementNonPolymorphicOwnedObject.java | 2 +- ...TestMemoryManagementPolymorphicObject.java | 2 +- ...ManagementPolymorphicObjectInterfaces.java | 2 +- ...emoryManagementPolymorphicOwnedObject.java | 2 +- ...ementPolymorphicOwnedObjectInterfaces.java | 2 +- .../TestMemoryManagementQObjectType.java | 2 +- ...MemoryManagementQObjectTypeInterfaces.java | 2 +- ...yManagementSharedNonPolymorphicObject.java | 2 +- ...moryManagementSharedPolymorphicObject.java | 2 +- ...mentSharedPolymorphicObjectInterfaces.java | 2 +- ...TestMemoryManagementSharedQObjectType.java | 2 +- ...ManagementSharedQObjectTypeInterfaces.java | 2 +- .../TestMemoryManagementValueType.java | 2 +- .../io/qt/autotests/TestMetaObject.java | 2 +- .../autotests/TestMetaObjectQtMetaCast.java | 2 +- .../io/qt/autotests/TestMetaProgramming.java | 3 +- .../qt/autotests/TestMetaProgrammingQt5.java | 2 +- .../qt/autotests/TestMetaProgrammingQt6.java | 2 +- .../io/qt/autotests/TestMetaType.java | 6 +- .../io/qt/autotests/TestMetaTypeQt6.java | 2 +- .../io/qt/autotests/TestMultiSignals.java | 2 +- .../autotests/TestMultimediaCloneableQt5.java | 2 +- .../autotests/TestMultimediaCloneableQt6.java | 2 +- .../TestMultimediaInjectedCodeQt5.java | 2 +- .../autotests/TestMultimediaServicesQt5.java | 2 +- .../io/qt/autotests/TestNamespace.java | 2 +- .../qt/autotests/TestNativeInterfacesQt6.java | 2 +- .../io/qt/autotests/TestNativePointer.java | 2 +- .../io/qt/autotests/TestNetworkCloneable.java | 2 +- .../qt/autotests/TestNetworkCloneableQt5.java | 2 +- .../qt/autotests/TestNetworkConnections.java | 2 +- .../qt/autotests/TestNetworkInjectedCode.java | 2 +- .../autotests/TestNetworkThreadAffinity.java | 2 +- .../qt/autotests/TestNonVirtualOverride.java | 2 +- .../io/qt/autotests/TestNullPointers.java | 2 +- .../io/qt/autotests/TestOpenGLCloneable.java | 2 +- .../TestOpenGLVersionFunctionsQt6.java | 2 +- .../io/qt/autotests/TestOverrideCursor.java | 2 +- .../io/qt/autotests/TestOwnedDestruction.java | 2 +- .../io/qt/autotests/TestPaintEngine.java | 10 +- .../io/qt/autotests/TestPaintOnWidget.java | 2 +- .../io/qt/autotests/TestPaintOnWidgetQt5.java | 2 +- .../io/qt/autotests/TestPaintOnWidgetQt6.java | 2 +- .../autotests/io/qt/autotests/TestPlugin.java | 2 +- .../qt/autotests/TestPluginImageFormats.java | 2 +- .../io/qt/autotests/TestPolymorphicTypes.java | 2 +- .../io/qt/autotests/TestPrivateSignals.java | 2 +- .../autotests/TestPropertyAndMethodCall.java | 2 +- .../io/qt/autotests/TestQBindableQt65.java | 2 +- .../io/qt/autotests/TestQDataStream.java | 2 +- .../autotests/io/qt/autotests/TestQFlags.java | 2 +- .../io/qt/autotests/TestQFunctionPointer.java | 12 +- .../autotests/io/qt/autotests/TestQImage.java | 2 +- .../io/qt/autotests/TestQLayout.java | 2 +- .../io/qt/autotests/TestQMessageHandler.java | 2 +- .../io/qt/autotests/TestQObject.java | 2 +- .../qt/autotests/TestQObjectPropertyQt6.java | 2 +- .../autotests/io/qt/autotests/TestQPair.java | 2 +- .../io/qt/autotests/TestQPdfWidgets.java | 2 +- .../io/qt/autotests/TestQPermissionQt65.java | 2 +- .../io/qt/autotests/TestQPropertyQt6.java | 2 +- .../io/qt/autotests/TestQQmlListProperty.java | 2 +- .../io/qt/autotests/TestQScriptEngine.java | 2 +- .../io/qt/autotests/TestQScriptValue.java | 2 +- .../io/qt/autotests/TestQSettings.java | 2 +- .../io/qt/autotests/TestQSslSocket.java | 2 +- .../autotests/io/qt/autotests/TestQTest.java | 2 +- .../io/qt/autotests/TestQTextStream.java | 2 +- .../io/qt/autotests/TestQThread.java | 2 +- .../io/qt/autotests/TestQThreadPool.java | 2 +- .../io/qt/autotests/TestQTransform.java | 2 +- .../io/qt/autotests/TestQVariant.java | 20 +- .../io/qt/autotests/TestQVariantQt5.java | 2 +- .../io/qt/autotests/TestQXmlPatterns.java | 2 +- .../autotests/io/qt/autotests/TestQml.java | 2 +- .../autotests/io/qt/autotests/TestQml2.java | 2 +- .../io/qt/autotests/TestQmlInterfacesQt5.java | 2 +- .../io/qt/autotests/TestQmlMultimedia.java | 2 +- .../io/qt/autotests/TestQmlPlugin.java | 5 +- .../autotests/io/qt/autotests/TestQmlQt6.java | 6 +- .../qt/autotests/TestQmlThreadAffinity.java | 2 +- .../io/qt/autotests/TestQmlTypes.java | 2 +- .../io/qt/autotests/TestQmlTypesQt6.java | 2 +- .../io/qt/autotests/TestQmlVariantQt6.java | 229 ++ .../io/qt/autotests/TestQt3DCore.java | 2 +- .../io/qt/autotests/TestQtJambiInternal.java | 2 +- .../io/qt/autotests/TestQuick3D.java | 2 +- .../TestQuickFramebufferObjectQt5.java | 2 +- .../TestQuickFramebufferObjectQt6.java | 2 +- .../qt/autotests/TestQuickInjectedCode.java | 23 +- .../qt/autotests/TestQuickPaintItemQt5.java | 2 +- .../qt/autotests/TestQuickPaintItemQt6.java | 2 +- .../io/qt/autotests/TestQuickQt5.java | 2 +- .../io/qt/autotests/TestQuickQt6.java | 2 +- .../qt/autotests/TestQuickTextureD3DQt6.java | 2 +- .../autotests/TestQuickTextureMetalQt6.java | 2 +- .../autotests/TestQuickTextureOpenGLQt6.java | 2 +- .../autotests/TestQuickTextureVulkanQt6.java | 4 +- .../qt/autotests/TestQuickThreadAffinity.java | 2 +- .../io/qt/autotests/TestQuickWidgetsQt5.java | 2 +- .../io/qt/autotests/TestQuickWidgetsQt6.java | 2 +- .../TestQuickWidgetsThreadAffinity.java | 2 +- .../qt/autotests/TestReferenceCounting.java | 2 +- .../TestReferenceCountingContainers.java | 2 +- .../TestReferenceCountingQGraphicsWidget.java | 2 +- .../TestReferenceCountingQLayout.java | 2 +- .../TestReferenceCountingQWidget.java | 2 +- .../io/qt/autotests/TestRemoteObjects.java | 2 +- .../TestRemoteObjectsInjectedCodeQt5.java | 2 +- .../io/qt/autotests/TestRetroHelper.java | 2 +- .../io/qt/autotests/TestRhiQt66.java | 47 + .../qt/autotests/TestSQLInjectedCodeQt5.java | 2 +- .../io/qt/autotests/TestScriptCloneable.java | 2 +- .../autotests/io/qt/autotests/TestScxml.java | 30 +- .../io/qt/autotests/TestSensorsQt5.java | 2 +- .../io/qt/autotests/TestSharedMemory.java | 2 +- .../io/qt/autotests/TestSharedPointer.java | 2 +- .../qt/autotests/TestSignalCrossThread.java | 2 +- .../io/qt/autotests/TestSignalMapperQt5.java | 2 +- .../io/qt/autotests/TestSignalOnDispose.java | 2 +- .../io/qt/autotests/TestSignalSlotGC.java | 2 +- .../TestSignalSlotWithCustomTypes.java | 2 +- .../io/qt/autotests/TestSignals.java | 2 +- .../qt/autotests/TestSlotSameMethodName.java | 2 +- .../autotests/io/qt/autotests/TestSql.java | 2 +- .../io/qt/autotests/TestSqlCloneable.java | 2 +- .../qt/autotests/TestSqlInjectedCodeQt6.java | 2 +- .../qt/autotests/TestStringConverterQt6.java | 2 +- .../autotests/io/qt/autotests/TestSwap.java | 2 +- .../io/qt/autotests/TestSwapQt5.java | 2 +- .../io/qt/autotests/TestTableModel.java | 2 +- .../io/qt/autotests/TestTestlib.java | 2 +- .../io/qt/autotests/TestThreadAffinity.java | 10 +- .../io/qt/autotests/TestThreads.java | 2 +- .../autotests/io/qt/autotests/TestUIC.java | 2 +- .../io/qt/autotests/TestUtilities.java | 2 +- .../io/qt/autotests/TestUtilitiesQt5.java | 2 +- .../io/qt/autotests/TestUtilitiesQt6.java | 2 +- .../io/qt/autotests/TestVirtualFunctions.java | 2 +- .../io/qt/autotests/TestVirtualKeyboard.java | 2 +- .../qt/autotests/TestWebEngineQuickQt5.java | 2 +- .../qt/autotests/TestWebEngineQuickQt6.java | 2 +- .../io/qt/autotests/TestWebEngineWidgets.java | 2 +- .../io/qt/autotests/TestWebView.java | 2 +- .../io/qt/autotests/TestWidgets.java | 2 +- .../qt/autotests/TestWidgetsWithShutdown.java | 2 +- .../autotests/TestWidgetsWithoutShutdown.java | 2 +- .../autotests/TestWinExtrasInjectedCode.java | 2 +- .../autotests/io/qt/autotests/TestXml.java | 2 +- .../io/qt/autotests/TestXmlCloneable.java | 2 +- .../io/qt/autotests/TestXmlInjectedCode.java | 2 +- .../qt/autotests/TestXmlInjectedCodeQt5.java | 2 +- .../autotests/TestXmlpatternsCloneable.java | 2 +- src/java/autotests/io/qt/autotests/Utils.java | 2 +- src/java/modules/modules.xml | 76 +- src/java/modules/qtjambi.activex/build.xml | 30 + src/java/modules/qtjambi.bluetooth/build.xml | 30 + src/java/modules/qtjambi.charts/build.xml | 30 + src/java/modules/qtjambi.concurrent/build.xml | 30 + .../qtjambi.datavisualization/build.xml | 30 + src/java/modules/qtjambi.dbus/build.xml | 30 + .../io/qt/dbus/QDBusMetaType.java | 2 +- .../io/qt/dbus/QDBusPendingReply.java | 2 +- .../io/qt/dbus/QDBusPendingReply2.java | 2 +- .../io/qt/dbus/QDBusPendingReply3.java | 2 +- .../io/qt/dbus/QDBusPendingReply4.java | 2 +- .../io/qt/dbus/QDBusPendingReply5.java | 2 +- .../io/qt/dbus/QDBusPendingReply6.java | 2 +- .../io/qt/dbus/QDBusPendingReply7.java | 2 +- .../io/qt/dbus/QDBusPendingReply8.java | 2 +- .../qtjambi.dbus/io/qt/dbus/QDBusReply.java | 2 +- src/java/modules/qtjambi.deployer/build.xml | 30 + .../io/qt/qtjambi/deployer/AppGenerator.java | 17 +- .../qt/qtjambi/deployer/BundleGenerator.java | 53 +- .../io/qt/qtjambi/deployer/Main.java | 141 +- .../qt/qtjambi/deployer/PluginGenerator.java | 39 +- .../io/qt/qtjambi/deployer/QMLGenerator.java | 50 +- .../modules/qtjambi.deployer/module-info.java | 2 +- src/java/modules/qtjambi.designer/build.xml | 30 + .../designer/util/CustomWidgetInterface.java | 2 +- src/java/modules/qtjambi.gamepad/build.xml | 30 + src/java/modules/qtjambi.generator/build.xml | 30 + .../io/qt/qtjambi/generator/Main.java | 2 +- .../qtjambi.generator/module-info.java | 2 +- src/java/modules/qtjambi.graphs/build.xml | 30 + src/java/modules/qtjambi.help/build.xml | 30 + src/java/modules/qtjambi.httpserver/build.xml | 30 + src/java/modules/qtjambi.location/build.xml | 30 + src/java/modules/qtjambi.macextras/build.xml | 32 +- src/java/modules/qtjambi.multimedia/build.xml | 30 + .../qtjambi.multimediawidgets/build.xml | 30 + src/java/modules/qtjambi.network/build.xml | 30 + .../io/qt/network/QTimeoutException.java | 2 +- .../modules/qtjambi.networkauth/build.xml | 30 + src/java/modules/qtjambi.nfc/build.xml | 30 + src/java/modules/qtjambi.opengl/build.xml | 30 + .../modules/qtjambi.openglwidgets/build.xml | 30 + src/java/modules/qtjambi.pdf/build.xml | 30 + src/java/modules/qtjambi.pdfwidgets/build.xml | 30 + .../modules/qtjambi.positioning/build.xml | 30 + .../modules/qtjambi.printsupport/build.xml | 30 + src/java/modules/qtjambi.purchasing/build.xml | 30 + src/java/modules/qtjambi.qml/build.xml | 30 + .../io/qt/qml/QQmlListProperty.java | 2 +- .../io/qt/qml/QmlClassInfoProvider.java | 2 +- .../qt/qml/util/QmlAddedInMinorVersion.java | 2 +- .../io/qt/qml/util/QmlAddedInVersion.java | 2 +- .../io/qt/qml/util/QmlAnonymous.java | 2 +- .../io/qt/qml/util/QmlAttached.java | 2 +- .../io/qt/qml/util/QmlElement.java | 2 +- .../io/qt/qml/util/QmlExtended.java | 2 +- .../io/qt/qml/util/QmlExtraVersion.java | 2 +- .../io/qt/qml/util/QmlForeign.java | 2 +- .../qtjambi.qml/io/qt/qml/util/QmlImport.java | 2 +- .../io/qt/qml/util/QmlImportMajorVersion.java | 2 +- .../io/qt/qml/util/QmlInterface.java | 2 +- .../util/QmlListPropertyAssignBehavior.java | 2 +- .../io/qt/qml/util/QmlNamedElement.java | 2 +- .../qml/util/QmlNoMajorVersionException.java | 2 +- .../qt/qml/util/QmlRemovedInMinorVersion.java | 2 +- .../io/qt/qml/util/QmlRemovedInVersion.java | 2 +- .../qt/qml/util/QmlSequencialContainer.java | 2 +- .../io/qt/qml/util/QmlSingleton.java | 2 +- .../util/QmlTypeRegistrationException.java | 2 +- .../qtjambi.qml/io/qt/qml/util/QmlTypes.java | 2 +- .../io/qt/qml/util/QmlUnavailable.java | 2 +- .../io/qt/qml/util/QmlUncreatable.java | 2 +- .../io/qt/qml/util/QmlValueType.java | 2 +- .../qt/qml/util/QtJambi_LibraryUtilities.java | 2 +- .../modules/qtjambi.qt3danimation/build.xml | 30 + src/java/modules/qtjambi.qt3dcore/build.xml | 30 + src/java/modules/qtjambi.qt3dextras/build.xml | 30 + src/java/modules/qtjambi.qt3dinput/build.xml | 30 + src/java/modules/qtjambi.qt3dlogic/build.xml | 30 + src/java/modules/qtjambi.qt3dquick/build.xml | 30 + .../modules/qtjambi.qt3dquickextras/build.xml | 30 + .../qtjambi.qt3dquickscene2d/build.xml | 30 + src/java/modules/qtjambi.qt3drender/build.xml | 30 + src/java/modules/qtjambi.quick/build.xml | 30 + .../io/qt/quick/QSGSimpleMaterial.java | 2 +- .../QSGSimpleMaterialComparableMaterial.java | 2 +- .../io/qt/quick/QSGSimpleMaterialShader.java | 2 +- src/java/modules/qtjambi.quick3d/build.xml | 30 + .../modules/qtjambi.quickcontrols/build.xml | 30 + src/java/modules/qtjambi.quicktest/build.xml | 30 + .../modules/qtjambi.quickwidgets/build.xml | 30 + .../QRemoteObjectPendingReply.java | 2 +- .../QRemoteObjectPendingReply.java | 2 +- .../modules/qtjambi.remoteobjects/build.xml | 30 + src/java/modules/qtjambi.script/build.xml | 30 + .../modules/qtjambi.scripttools/build.xml | 30 + src/java/modules/qtjambi.scxml/build.xml | 30 + src/java/modules/qtjambi.sensors/build.xml | 30 + src/java/modules/qtjambi.serialbus/build.xml | 30 + .../io/qt/serialbus/QCanBusException.java | 2 +- src/java/modules/qtjambi.serialport/build.xml | 30 + .../modules/qtjambi.spatialaudio/build.xml | 30 + .../Qt5/io/qt/sql/QSqlRelationalDelegate.java | 2 +- .../Qt6/io/qt/sql/QSqlRelationalDelegate.java | 2 +- src/java/modules/qtjambi.sql/build.xml | 30 + .../main/io/qt/sql/QSqlDriverCreator.java | 2 +- .../modules/qtjambi.statemachine/build.xml | 30 + src/java/modules/qtjambi.svg/build.xml | 30 + src/java/modules/qtjambi.svgwidgets/build.xml | 30 + src/java/modules/qtjambi.test/build.xml | 30 + .../modules/qtjambi.texttospeech/build.xml | 30 + src/java/modules/qtjambi.uic/build.xml | 30 + .../io/qt/uic/ClassInfoEntries.java | 2 +- .../qtjambi.uic/io/qt/uic/ClassInfoEntry.java | 2 +- .../qtjambi.uic/io/qt/uic/Comparators.java | 2 +- .../io/qt/uic/ConnectionSyntax.java | 2 +- .../io/qt/uic/CustomWidgetsInfo.java | 2 +- .../qtjambi.uic/io/qt/uic/DatabaseInfo.java | 2 +- .../modules/qtjambi.uic/io/qt/uic/Driver.java | 2 +- .../qtjambi.uic/io/qt/uic/Encoding.java | 2 +- .../modules/qtjambi.uic/io/qt/uic/Main.java | 2 +- .../modules/qtjambi.uic/io/qt/uic/Option.java | 2 +- .../qtjambi.uic/io/qt/uic/SignalSlot.java | 2 +- .../qtjambi.uic/io/qt/uic/TreeWalker.java | 2 +- .../modules/qtjambi.uic/io/qt/uic/Uic.java | 2 +- .../modules/qtjambi.uic/io/qt/uic/Utils.java | 2 +- .../qtjambi.uic/io/qt/uic/Validator.java | 2 +- .../io/qt/uic/WriteIncludesBase.java | 2 +- .../io/qt/uic/java/WriteClass.java | 2 +- .../io/qt/uic/java/WriteDeclaration.java | 2 +- .../io/qt/uic/java/WriteImports.java | 2 +- .../io/qt/uic/java/WriteInitialization.java | 2 +- .../io/qt/uic/kotlin/WriteClass.java | 2 +- .../io/qt/uic/kotlin/WriteDeclaration.java | 2 +- .../io/qt/uic/kotlin/WriteImports.java | 2 +- .../io/qt/uic/kotlin/WriteInitialization.java | 2 +- src/java/modules/qtjambi.uitools/build.xml | 30 + .../modules/qtjambi.virtualkeyboard/build.xml | 30 + src/java/modules/qtjambi.webchannel/build.xml | 30 + .../modules/qtjambi.webchannelquick/build.xml | 30 + src/java/modules/qtjambi.webengine/build.xml | 30 + .../modules/qtjambi.webenginecore/build.xml | 30 + .../modules/qtjambi.webenginequick/build.xml | 30 + .../qtjambi.webenginewidgets/build.xml | 30 + src/java/modules/qtjambi.websockets/build.xml | 30 + src/java/modules/qtjambi.webview/build.xml | 30 + src/java/modules/qtjambi.winextras/build.xml | 35 +- src/java/modules/qtjambi.x11extras/build.xml | 35 +- src/java/modules/qtjambi.xml/build.xml | 30 + .../modules/qtjambi.xmlpatterns/build.xml | 30 + .../qtjambi/Qt5-JDK21/io/qt/core/QStack.java | 2 +- .../qtjambi/Qt5-JDK8/io/qt/core/QStack.java | 2 +- .../qtjambi/Qt5/io/qt/core/QLinkedList.java | 2 +- .../modules/qtjambi/Qt5/io/qt/core/QList.java | 2 +- .../qtjambi/Qt5/io/qt/core/QVector.java | 2 +- .../internal/AbstractMetaObjectUtility.java | 2 +- .../qtjambi/Qt6-JDK21/io/qt/core/QStack.java | 2 +- .../qtjambi/Qt6-JDK8/io/qt/core/QStack.java | 2 +- .../qtjambi/Qt6.0/io/qt/core/QBindable.java | 2 +- .../Qt6.0/io/qt/core/QBooleanBindable.java | 2 +- .../Qt6.0/io/qt/core/QByteBindable.java | 2 +- .../Qt6.0/io/qt/core/QCharBindable.java | 2 +- .../Qt6.0/io/qt/core/QDoubleBindable.java | 2 +- .../Qt6.0/io/qt/core/QFloatBindable.java | 2 +- .../Qt6.0/io/qt/core/QIntBindable.java | 2 +- .../Qt6.0/io/qt/core/QLongBindable.java | 2 +- .../Qt6.0/io/qt/core/QShortBindable.java | 2 +- .../qtjambi/Qt6.5/io/qt/core/QBindable.java | 2 +- .../Qt6.5/io/qt/core/QBooleanBindable.java | 2 +- .../Qt6.5/io/qt/core/QByteBindable.java | 2 +- .../Qt6.5/io/qt/core/QCharBindable.java | 2 +- .../Qt6.5/io/qt/core/QDoubleBindable.java | 2 +- .../Qt6.5/io/qt/core/QFloatBindable.java | 2 +- .../Qt6.5/io/qt/core/QIntBindable.java | 2 +- .../Qt6.5/io/qt/core/QLongBindable.java | 2 +- .../Qt6.5/io/qt/core/QShortBindable.java | 2 +- .../qtjambi/Qt6/io/qt/QtPropertyBindable.java | 2 +- .../io/qt/core/QAbstractPropertyAlias.java | 2 +- .../Qt6/io/qt/core/QBooleanProperty.java | 2 +- .../Qt6/io/qt/core/QBooleanPropertyAlias.java | 2 +- .../io/qt/core/QBooleanPropertyBinding.java | 2 +- .../Qt6/io/qt/core/QBooleanPropertyData.java | 2 +- .../qtjambi/Qt6/io/qt/core/QByteProperty.java | 2 +- .../Qt6/io/qt/core/QBytePropertyAlias.java | 2 +- .../Qt6/io/qt/core/QBytePropertyBinding.java | 2 +- .../Qt6/io/qt/core/QBytePropertyData.java | 2 +- .../qtjambi/Qt6/io/qt/core/QCharProperty.java | 2 +- .../Qt6/io/qt/core/QCharPropertyAlias.java | 2 +- .../Qt6/io/qt/core/QCharPropertyBinding.java | 2 +- .../Qt6/io/qt/core/QCharPropertyData.java | 2 +- .../Qt6/io/qt/core/QDoubleProperty.java | 2 +- .../Qt6/io/qt/core/QDoublePropertyAlias.java | 2 +- .../io/qt/core/QDoublePropertyBinding.java | 2 +- .../Qt6/io/qt/core/QDoublePropertyData.java | 2 +- .../Qt6/io/qt/core/QFloatProperty.java | 2 +- .../Qt6/io/qt/core/QFloatPropertyAlias.java | 2 +- .../Qt6/io/qt/core/QFloatPropertyBinding.java | 2 +- .../Qt6/io/qt/core/QFloatPropertyData.java | 2 +- .../qtjambi/Qt6/io/qt/core/QFuture.java | 2 +- .../Qt6/io/qt/core/QFutureInterface.java | 2 +- .../qtjambi/Qt6/io/qt/core/QIntProperty.java | 2 +- .../Qt6/io/qt/core/QIntPropertyAlias.java | 2 +- .../Qt6/io/qt/core/QIntPropertyBinding.java | 2 +- .../Qt6/io/qt/core/QIntPropertyData.java | 2 +- .../modules/qtjambi/Qt6/io/qt/core/QList.java | 2 +- .../qtjambi/Qt6/io/qt/core/QLongProperty.java | 2 +- .../Qt6/io/qt/core/QLongPropertyAlias.java | 2 +- .../Qt6/io/qt/core/QLongPropertyBinding.java | 2 +- .../Qt6/io/qt/core/QLongPropertyData.java | 2 +- .../qtjambi/Qt6/io/qt/core/QPromise.java | 2 +- .../qtjambi/Qt6/io/qt/core/QProperty.java | 2 +- .../Qt6/io/qt/core/QPropertyAlias.java | 2 +- .../Qt6/io/qt/core/QPropertyBinding.java | 2 +- .../io/qt/core/QPropertyChangeHandler.java | 2 +- .../qtjambi/Qt6/io/qt/core/QPropertyData.java | 2 +- .../Qt6/io/qt/core/QPropertyNotifier.java | 2 +- .../Qt6/io/qt/core/QShortProperty.java | 2 +- .../Qt6/io/qt/core/QShortPropertyAlias.java | 2 +- .../Qt6/io/qt/core/QShortPropertyBinding.java | 2 +- .../Qt6/io/qt/core/QShortPropertyData.java | 2 +- .../internal/AbstractMetaObjectUtility.java | 2 +- .../Qt6/io/qt/internal/PropertyInfo.java | 2 +- .../io/qt/internal/RetroHelper.java | 6 +- .../io/qt/internal/RetroHelper.java | 2 +- src/java/modules/qtjambi/build.xml | 30 + .../modules/qtjambi/jsr305/io/qt/NonNull.java | 2 +- .../qtjambi/jsr305/io/qt/Nullable.java | 2 +- .../qtjambi/jsr305/io/qt/StrictNonNull.java | 2 +- .../qtjambi/main/io/qt/InternalAccess.java | 2 +- .../qtjambi/main/io/qt/MemberAccess.java | 2 +- .../qtjambi/main/io/qt/NativeAccess.java | 2 +- .../qt/QClassCannotBeSubclassedException.java | 2 +- .../main/io/qt/QConnectionException.java | 2 +- .../main/io/qt/QDanglingPointerException.java | 2 +- .../modules/qtjambi/main/io/qt/QFlags.java | 2 +- ...QInterfaceCannotBeSubclassedException.java | 2 +- .../main/io/qt/QLibraryNotFoundError.java | 2 +- .../main/io/qt/QLibraryNotLoadedError.java | 2 +- .../io/qt/QMisfittingSignatureException.java | 2 +- .../QMissingVirtualOverridingException.java | 2 +- .../qtjambi/main/io/qt/QNativePointer.java | 2 +- .../main/io/qt/QNoDefaultValueException.java | 2 +- .../io/qt/QNoImplementationException.java | 2 +- .../io/qt/QNoNativeResourcesException.java | 2 +- .../main/io/qt/QNoSuchEnumValueException.java | 2 +- .../main/io/qt/QNoSuchMethodException.java | 2 +- .../main/io/qt/QNoSuchSignalException.java | 2 +- .../main/io/qt/QNoSuchSlotException.java | 2 +- .../io/qt/QNonVirtualOverridingException.java | 2 +- .../io/qt/QPropertyDeclarationException.java | 2 +- .../main/io/qt/QSignalAccessException.java | 2 +- .../io/qt/QSignalDeclarationException.java | 2 +- .../io/qt/QSignalInitializationException.java | 2 +- .../io/qt/QSignalInvocationException.java | 2 +- .../main/io/qt/QThreadAffinityException.java | 2 +- .../main/io/qt/QUninvokableSlotException.java | 2 +- .../qt/QUnsuccessfulInvocationException.java | 2 +- .../main/io/qt/QtAbstractEnumerator.java | 2 +- .../main/io/qt/QtAbstractFlagEnumerator.java | 2 +- .../qtjambi/main/io/qt/QtAllowedTypeSet.java | 2 +- .../qtjambi/main/io/qt/QtAllowedTypeSets.java | 2 +- .../qtjambi/main/io/qt/QtArgument.java | 2 +- .../qtjambi/main/io/qt/QtAsGadget.java | 2 +- .../qtjambi/main/io/qt/QtByteEnumerator.java | 2 +- .../main/io/qt/QtByteFlagEnumerator.java | 2 +- .../qtjambi/main/io/qt/QtClassInfo.java | 2 +- .../qtjambi/main/io/qt/QtClassInfos.java | 2 +- .../qtjambi/main/io/qt/QtDeclaredFinal.java | 2 +- .../qtjambi/main/io/qt/QtEnumerator.java | 2 +- .../qtjambi/main/io/qt/QtExtensibleEnum.java | 2 +- .../qtjambi/main/io/qt/QtFinalOverride.java | 2 +- .../qtjambi/main/io/qt/QtFlagEnumerator.java | 2 +- .../modules/qtjambi/main/io/qt/QtGadget.java | 2 +- .../qtjambi/main/io/qt/QtInvokable.java | 2 +- .../qtjambi/main/io/qt/QtLongEnumerator.java | 2 +- .../main/io/qt/QtLongFlagEnumerator.java | 2 +- .../qtjambi/main/io/qt/QtMetaType.java | 2 +- .../modules/qtjambi/main/io/qt/QtObject.java | 2 +- .../qtjambi/main/io/qt/QtObjectInterface.java | 2 +- .../qtjambi/main/io/qt/QtPointerType.java | 2 +- .../qtjambi/main/io/qt/QtPrimitiveType.java | 2 +- .../qtjambi/main/io/qt/QtPrivateOverride.java | 2 +- .../main/io/qt/QtPropertyConstant.java | 2 +- .../main/io/qt/QtPropertyDesignable.java | 2 +- .../qtjambi/main/io/qt/QtPropertyMember.java | 2 +- .../qtjambi/main/io/qt/QtPropertyNotify.java | 2 +- .../qtjambi/main/io/qt/QtPropertyReader.java | 2 +- .../main/io/qt/QtPropertyRequired.java | 2 +- .../main/io/qt/QtPropertyResetter.java | 2 +- .../main/io/qt/QtPropertyScriptable.java | 2 +- .../qtjambi/main/io/qt/QtPropertyStored.java | 2 +- .../qtjambi/main/io/qt/QtPropertyUser.java | 2 +- .../qtjambi/main/io/qt/QtPropertyWriter.java | 2 +- .../qtjambi/main/io/qt/QtReferenceType.java | 2 +- .../qtjambi/main/io/qt/QtRejectedEntries.java | 2 +- .../qtjambi/main/io/qt/QtResources.java | 2 +- .../qtjambi/main/io/qt/QtShortEnumerator.java | 2 +- .../main/io/qt/QtShortFlagEnumerator.java | 2 +- .../main/io/qt/QtSignalBlockerInterface.java | 2 +- .../main/io/qt/QtSignalEmitterInterface.java | 2 +- .../main/io/qt/QtThreadAffineInterface.java | 2 +- .../qtjambi/main/io/qt/QtUninvokable.java | 2 +- .../qtjambi/main/io/qt/QtUnlistedEnum.java | 2 +- .../qtjambi/main/io/qt/QtUtilities.java | 2 +- .../qt/core/AbstractAssociativeContainer.java | 2 +- .../main/io/qt/core/AbstractContainer.java | 2 +- .../main/io/qt/core/AbstractIterator.java | 2 +- .../qtjambi/main/io/qt/core/AbstractList.java | 2 +- .../AbstractMultiAssociativeContainer.java | 2 +- .../qt/core/AbstractSequentialContainer.java | 2 +- .../io/qt/core/QAssociativeConstIterator.java | 2 +- .../main/io/qt/core/QAssociativeIterator.java | 2 +- .../main/io/qt/core/QDeclarableSignals.java | 2 +- .../qtjambi/main/io/qt/core/QException.java | 2 +- .../main/io/qt/core/QFunctionPointerUtil.java | 2 +- .../main/io/qt/core/QGenericArgument.java | 2 +- .../main/io/qt/core/QGenericArgumentType.java | 2 +- .../main/io/qt/core/QGenericReturnType.java | 2 +- .../qtjambi/main/io/qt/core/QHash.java | 2 +- .../io/qt/core/QInstanceMemberSignals.java | 2 +- .../qtjambi/main/io/qt/core/QLogging.java | 2 +- .../modules/qtjambi/main/io/qt/core/QMap.java | 2 +- .../qtjambi/main/io/qt/core/QMetaObject.java | 9 +- .../qtjambi/main/io/qt/core/QMultiHash.java | 2 +- .../qtjambi/main/io/qt/core/QMultiMap.java | 2 +- .../qtjambi/main/io/qt/core/QPair.java | 2 +- .../qtjambi/main/io/qt/core/QPointer.java | 2 +- .../qtjambi/main/io/qt/core/QQueue.java | 2 +- .../qtjambi/main/io/qt/core/QScope.java | 2 +- .../qtjambi/main/io/qt/core/QScopeGuard.java | 2 +- .../main/io/qt/core/QScopedArrayPointer.java | 2 +- .../main/io/qt/core/QScopedPointer.java | 2 +- .../io/qt/core/QSequentialConstIterator.java | 2 +- .../main/io/qt/core/QSequentialIterator.java | 2 +- .../modules/qtjambi/main/io/qt/core/QSet.java | 2 +- .../main/io/qt/core/QStaticMemberSignals.java | 2 +- .../main/io/qt/core/QUnhandledException.java | 2 +- .../qtjambi/main/io/qt/core/QWeakPointer.java | 2 +- .../qtjambi/main/io/qt/core/StackDeque.java | 2 +- .../io/qt/core/internal/QtPluginMetaData.java | 2 +- .../QPaintingOutsidePaintEventException.java | 2 +- .../qtjambi/main/io/qt/gui/gl/GLsync.java | 2 +- .../main/io/qt/internal/AccessUtility.java | 2 +- .../io/qt/internal/ClassAnalyzerUtility.java | 210 +- .../main/io/qt/internal/CoreUtility.java | 2 +- .../main/io/qt/internal/Dependency.java | 2 +- .../main/io/qt/internal/DeployerUtility.java | 2 +- .../main/io/qt/internal/EnumUtility.java | 4 +- .../main/io/qt/internal/ExceptionUtility.java | 2 +- .../main/io/qt/internal/LibraryBundle.java | 2 +- .../main/io/qt/internal/LibraryUtility.java | 547 ++-- .../io/qt/internal/MetaObjectUtility.java | 44 +- .../main/io/qt/internal/MetaTypeUtility.java | 2 +- .../main/io/qt/internal/NativeUtility.java | 10 +- .../main/io/qt/internal/ReferenceUtility.java | 131 +- .../io/qt/internal/ReflectionUtility.java | 2 +- .../main/io/qt/internal/ResourceUtility.java | 60 +- .../main/io/qt/internal/SignalUtility.java | 2 +- .../main/io/qt/internal/TestUtility.java | 2 +- .../main/io/qt/internal/ThreadUtility.java | 2 +- .../io/qt/widgets/QItemEditorCreator.java | 2 +- .../widgets/QStandardItemEditorCreator.java | 2 +- .../qtjambi/non-jsr305/io/qt/NonNull.java | 2 +- .../qtjambi/non-jsr305/io/qt/Nullable.java | 2 +- .../non-jsr305/io/qt/StrictNonNull.java | 2 +- src/java/plugins/customwidgets/build.xml | 30 + src/java/plugins/helpwidgets/build.xml | 30 + src/java/plugins/multimediawidgets/build.xml | 30 + src/java/plugins/plugins.xml | 75 +- .../io/qt/sql/jdbc/QJdbcSqlVariantUtil.java | 2 +- .../io/qt/sql/jdbc/QJdbcSqlVariantUtil.java | 2 +- src/java/plugins/qsqljdbc/build.xml | 30 + .../qsqljdbc/main/io/qt/sql/jdbc/QJdbc.java | 2 +- .../main/io/qt/sql/jdbc/QJdbcSqlDriver.java | 2 +- .../main/io/qt/sql/jdbc/QJdbcSqlResult.java | 2 +- .../main/io/qt/sql/jdbc/QJdbcSqlUtil.java | 2 +- src/java/qml/qml.xml | 94 +- src/java/qml/testcar/build.xml | 30 + .../qml/testcar/io/qt/test/car/Engine.java | 2 +- .../testcar/io/qt/test/car/package-info.java | 2 +- src/java/qml/testcar/module-info.java | 2 +- src/java/qml/testgarage/build.xml | 30 + .../testgarage/io/qt/test/garage/Garage.java | 2 +- .../io/qt/test/garage/package-info.java | 2 +- src/java/qml/testgarage/module-info.java | 2 +- www/Android.md | 12 +- www/Characteristics-of-QtJambi.md | 55 +- www/How-to-bundle-Qt-libraries.md | 4 +- www/How-to-debug.md | 2 +- www/How-to-deploy-QtJambi-applications.md | 30 +- www/How-to-develop-Qt-in-Java.md | 16 +- www/Modules.md | 66 +- www/Whats-New.md | 21 +- 1291 files changed, 23565 insertions(+), 8700 deletions(-) create mode 100644 src/java/autotests/io/qt/autotests/TestFileEngineQt63.java create mode 100644 src/java/autotests/io/qt/autotests/TestFunctionalQt6.java create mode 100644 src/java/autotests/io/qt/autotests/TestInitializationGuiRhiQt66.java create mode 100644 src/java/autotests/io/qt/autotests/TestQmlVariantQt6.java create mode 100644 src/java/autotests/io/qt/autotests/TestRhiQt66.java diff --git a/LICENSE b/LICENSE index 18134b4d..cdb927e0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ GNU LESSER GENERAL PUBLIC LICENSE QtJambi is Copyright (C) 1992-2009 Nokia. All rights reserved. - Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. + Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. You may use, distribute and copy QtJambi under the terms of GNU Lesser General Public License version 2.1, which is displayed below. diff --git a/LICENSE.GPL3 b/LICENSE.GPL3 index a76308ef..80c12b36 100644 --- a/LICENSE.GPL3 +++ b/LICENSE.GPL3 @@ -1,7 +1,7 @@ GNU GENERAL PUBLIC LICENSE QtJambi is Copyright (C) 1992-2009 Nokia. All rights reserved. - Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. + Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. You may use, distribute and copy QtJambi under the terms of GNU Lesser General Public License version 3. That license references diff --git a/LICENSE.GPLv3 b/LICENSE.GPLv3 index a76308ef..80c12b36 100644 --- a/LICENSE.GPLv3 +++ b/LICENSE.GPLv3 @@ -1,7 +1,7 @@ GNU GENERAL PUBLIC LICENSE QtJambi is Copyright (C) 1992-2009 Nokia. All rights reserved. - Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. + Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. You may use, distribute and copy QtJambi under the terms of GNU Lesser General Public License version 3. That license references diff --git a/LICENSE.LGPL b/LICENSE.LGPL index 18134b4d..cdb927e0 100644 --- a/LICENSE.LGPL +++ b/LICENSE.LGPL @@ -1,7 +1,7 @@ GNU LESSER GENERAL PUBLIC LICENSE QtJambi is Copyright (C) 1992-2009 Nokia. All rights reserved. - Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. + Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. You may use, distribute and copy QtJambi under the terms of GNU Lesser General Public License version 2.1, which is displayed below. diff --git a/LICENSE.LGPLv21 b/LICENSE.LGPLv21 index 18134b4d..cdb927e0 100644 --- a/LICENSE.LGPLv21 +++ b/LICENSE.LGPLv21 @@ -1,7 +1,7 @@ GNU LESSER GENERAL PUBLIC LICENSE QtJambi is Copyright (C) 1992-2009 Nokia. All rights reserved. - Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. + Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. You may use, distribute and copy QtJambi under the terms of GNU Lesser General Public License version 2.1, which is displayed below. diff --git a/README.md b/README.md index 0d4c6d88..312e4615 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ would simply add the corresponding Java libraries (.jar files) to their Java pro QtJambi is available for Java 8 or 11 and higher using Qt5.15 and Qt6 in Java on Windows, Android Linux and macOS. Most Qt modules are available as QtJambi module as [listed here](www/Modules.md). All modules are published as Maven Artifact. **The native components for Windows available on Maven require Qt binaries for MSVC (msvc2019_64). Mingw Qt is not compatible with QtJambi unless you build it from scratch with Mingw.** +**By default, the native components of only essential modules are made available on Maven. Please make a request via [/issues](Issues) if you require native components not yet available.** ## Support @@ -43,6 +44,7 @@ Make yourself familiar with [developing applications with QtJambi](www/How-to-de * XCode command line tools (macOS only) When building for Android all required SDK and NDK components are downloaded automatically. +QtJambi build system has been tested on Linux (Ubuntu x64 and arm64, OpenSUSE x64, Fedora x64), Windows (with MSVC2022 for x64 and amd64), macOS (x64 and amd64) and FreeBSD (x64). ### Building QtJambi @@ -143,7 +145,7 @@ to your project: $VERSION ``` -(exchange `$VERSION` either by `5.15.18`, by `6.5.4` or by `6.6.1`). +(exchange `$VERSION` either by `5.15.19`, by `6.5.5` or by `6.6.2`). Otherwise, download QtJambi JAR file from [Maven Central Repository](https://search.maven.org/artifact/io.qtjambi/qtjambi/). @@ -163,7 +165,7 @@ public class Test { Compile the file: ``` powershell -javac -cp qtjambi-6.5.4.jar Test.java +javac -cp qtjambi-6.5.5.jar Test.java ``` ### Execute Example @@ -181,15 +183,15 @@ By default, on Windows Qt libraries are located in `bin` directory and on Linux The example program can be executed this way on Windows: ``` powershell -java -cp qtjambi-6.5.4.jar;. -Djava.library.path=C:\Qt\6.5.3\msvc2019_64\bin Test +java -cp qtjambi-6.5.5.jar;. -Djava.library.path=C:\Qt\6.5.3\msvc2019_64\bin Test ``` On Linux it looks this way: ``` bash -java -cp qtjambi-6.5.4.jar:. -Djava.library.path=/Qt/6.5.3/gcc_64/lib Test +java -cp qtjambi-6.5.5.jar:. -Djava.library.path=/Qt/6.5.3/gcc_64/lib Test ``` On macOS you additionally need to use the start parameter `-XstartOnFirstThread`: ``` bash -java -cp qtjambi-6.5.4.jar:. -Djava.library.path=/Qt/6.5.3/macos/lib -XstartOnFirstThread Test +java -cp qtjambi-6.5.5.jar:. -Djava.library.path=/Qt/6.5.3/macos/lib -XstartOnFirstThread Test ``` On Linux of your distribution provides Qt (of correct version) as system library you don't need to specify library path at all. @@ -209,7 +211,7 @@ Instead of starting your program with a java command as shown above you can depl GNU LESSER GENERAL PUBLIC LICENSE QtJambi is Copyright (C) 1992-2009 Nokia. All rights reserved. - Copyright (C) 2009-2023 Dr. Peter Droste, + Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. @@ -221,7 +223,7 @@ Instead of starting your program with a java command as shown above you can depl GNU GENERAL PUBLIC LICENSE QtJambi is Copyright (C) 1992-2009 Nokia. All rights reserved. - Copyright (C) 2009-2023 Dr. Peter Droste, + Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. diff --git a/antfiles/autotests.xml b/antfiles/autotests.xml index b7eaf4dd..0faad2bb 100644 --- a/antfiles/autotests.xml +++ b/antfiles/autotests.xml @@ -1,7 +1,33 @@ - + @@ -15,7 +41,16 @@ - + + + + + + + + + + @@ -23,13 +58,24 @@ + + + + + + + + + - + + + @@ -143,6 +189,9 @@ + + + @@ -378,7 +427,7 @@ - + @@ -414,12 +463,8 @@ - - - - @@ -673,7 +718,7 @@ - + @@ -905,7 +950,7 @@ - + diff --git a/antfiles/clean.xml b/antfiles/clean.xml index 6fe3f481..df9b7238 100644 --- a/antfiles/clean.xml +++ b/antfiles/clean.xml @@ -1,3 +1,33 @@ + - + @@ -85,13 +100,7 @@ - - - - - - - + @@ -227,7 +236,7 @@ - + @@ -245,7 +254,7 @@ - + diff --git a/releases.properties b/releases.properties index 55a4197d..3f0c6489 100644 --- a/releases.properties +++ b/releases.properties @@ -1,9 +1,9 @@ -5.15=18 -6.0=2 -6.1=2 -6.2=13 -6.3=7 -6.4=5 -6.5=4 -6.6=1 -6.7=0 \ No newline at end of file +5.15.0=0 +6.0.0=2 +6.1.0=2 +6.2.0=2 +6.3.0=5 +6.4.0=10 +6.5.0=14 +6.6.0=17 +current=19 \ No newline at end of file diff --git a/src/cpp/QtJambi.pro b/src/cpp/QtJambi.pro index 98762d2b..2c629dfd 100644 --- a/src/cpp/QtJambi.pro +++ b/src/cpp/QtJambi.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + TEMPLATE = subdirs SUBDIRS = functionpointers QtJambi modules diff --git a/src/cpp/QtJambi/AboutToPaint b/src/cpp/QtJambi/AboutToPaint index 671d29b2..9506764e 100644 --- a/src/cpp/QtJambi/AboutToPaint +++ b/src/cpp/QtJambi/AboutToPaint @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/Cast b/src/cpp/QtJambi/Cast index 955bf27f..fabc1922 100644 --- a/src/cpp/QtJambi/Cast +++ b/src/cpp/QtJambi/Cast @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/ContainerAPI b/src/cpp/QtJambi/ContainerAPI index ddd6d9fd..a6947c5e 100644 --- a/src/cpp/QtJambi/ContainerAPI +++ b/src/cpp/QtJambi/ContainerAPI @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/CoreAPI b/src/cpp/QtJambi/CoreAPI index 0ff74b03..0cf3af67 100644 --- a/src/cpp/QtJambi/CoreAPI +++ b/src/cpp/QtJambi/CoreAPI @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/DebugAPI b/src/cpp/QtJambi/DebugAPI index d9282a74..034bc5a4 100644 --- a/src/cpp/QtJambi/DebugAPI +++ b/src/cpp/QtJambi/DebugAPI @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/FunctionPointer b/src/cpp/QtJambi/FunctionPointer index 68370306..b165c75d 100644 --- a/src/cpp/QtJambi/FunctionPointer +++ b/src/cpp/QtJambi/FunctionPointer @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/FunctionalBase b/src/cpp/QtJambi/FunctionalBase index 5500991f..c0489768 100644 --- a/src/cpp/QtJambi/FunctionalBase +++ b/src/cpp/QtJambi/FunctionalBase @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/Global b/src/cpp/QtJambi/Global index af3dc6c4..eaba54f3 100644 --- a/src/cpp/QtJambi/Global +++ b/src/cpp/QtJambi/Global @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/GuiAPI b/src/cpp/QtJambi/GuiAPI index 1a690336..e15a2b9d 100644 --- a/src/cpp/QtJambi/GuiAPI +++ b/src/cpp/QtJambi/GuiAPI @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/JNIEnvironment b/src/cpp/QtJambi/JNIEnvironment index 0047b9b0..eeac41cd 100644 --- a/src/cpp/QtJambi/JNIEnvironment +++ b/src/cpp/QtJambi/JNIEnvironment @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/JObjectWrapper b/src/cpp/QtJambi/JObjectWrapper index 0dda6885..45631dcb 100644 --- a/src/cpp/QtJambi/JObjectWrapper +++ b/src/cpp/QtJambi/JObjectWrapper @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/JavaAPI b/src/cpp/QtJambi/JavaAPI index f4e99f1b..a8eec548 100644 --- a/src/cpp/QtJambi/JavaAPI +++ b/src/cpp/QtJambi/JavaAPI @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/MetaInfo b/src/cpp/QtJambi/MetaInfo index 6bd8408d..0fff8503 100644 --- a/src/cpp/QtJambi/MetaInfo +++ b/src/cpp/QtJambi/MetaInfo @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/QmlAPI b/src/cpp/QtJambi/QmlAPI index 0fbee4e4..38f0476c 100644 --- a/src/cpp/QtJambi/QmlAPI +++ b/src/cpp/QtJambi/QmlAPI @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/QtJambi b/src/cpp/QtJambi/QtJambi index 8acdee07..5e26053c 100644 --- a/src/cpp/QtJambi/QtJambi +++ b/src/cpp/QtJambi/QtJambi @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/QtJambi.pro b/src/cpp/QtJambi/QtJambi.pro index 3428709c..b8b0c05c 100644 --- a/src/cpp/QtJambi/QtJambi.pro +++ b/src/cpp/QtJambi/QtJambi.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(configure.pri) SOURCES += \ @@ -157,6 +188,7 @@ greaterThan(QT_MAJOR_VERSION, 5):{ RESOURCES = $$QTJAMBI_PLATFORM_BUILDDIR/QtJambi/functionpointers-$$member(QTJAMBICONF,0).qrc } } +QMAKE_RESOURCE_FLAGS += -no-compress !ios:{ PRECOMPILED_HEADER = qtjambi_pch.h @@ -176,16 +208,16 @@ win32-g++* { android:LIBS += -landroid -linux-g++*:{ +linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc*:{ LIBS += -ldl QMAKE_RPATHDIR = $ORIGIN/. } -linux-g++* | freebsd-g++* | macx | ios | android | win32-g++* { +linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc* | macx | ios | android | win32-g++* { QMAKE_CXXFLAGS += -ftemplate-depth=20000 } -linux-g++* | freebsd-g++* | macx | ios | win32-g++* { +linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc* | macx | ios | win32-g++* { QMAKE_CXXFLAGS += -Wall -fexceptions -fnon-call-exceptions } diff --git a/src/cpp/QtJambi/QtJambiAPI b/src/cpp/QtJambi/QtJambiAPI index e45145fb..10131596 100644 --- a/src/cpp/QtJambi/QtJambiAPI +++ b/src/cpp/QtJambi/QtJambiAPI @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/RegistryAPI b/src/cpp/QtJambi/RegistryAPI index 695235b0..a996c1d3 100644 --- a/src/cpp/QtJambi/RegistryAPI +++ b/src/cpp/QtJambi/RegistryAPI @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/TestAPI b/src/cpp/QtJambi/TestAPI index 3252e876..577e0f54 100644 --- a/src/cpp/QtJambi/TestAPI +++ b/src/cpp/QtJambi/TestAPI @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/ThreadAPI b/src/cpp/QtJambi/ThreadAPI index c1397ddd..ea2f6eb6 100644 --- a/src/cpp/QtJambi/ThreadAPI +++ b/src/cpp/QtJambi/ThreadAPI @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/TypeTests b/src/cpp/QtJambi/TypeTests index 045fba90..4cf0bf34 100644 --- a/src/cpp/QtJambi/TypeTests +++ b/src/cpp/QtJambi/TypeTests @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/applicationdata.cpp b/src/cpp/QtJambi/applicationdata.cpp index 325230ac..1056ebbc 100644 --- a/src/cpp/QtJambi/applicationdata.cpp +++ b/src/cpp/QtJambi/applicationdata.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/cast.cpp b/src/cpp/QtJambi/cast.cpp index 7465de00..009fb861 100644 --- a/src/cpp/QtJambi/cast.cpp +++ b/src/cpp/QtJambi/cast.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include QT_WARNING_DISABLE_DEPRECATED #include diff --git a/src/cpp/QtJambi/configure.pri b/src/cpp/QtJambi/configure.pri index 1718d360..dc9f9830 100644 --- a/src/cpp/QtJambi/configure.pri +++ b/src/cpp/QtJambi/configure.pri @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + !android:{ JAVA_HOME_TARGET = $$(JAVA_HOME_TARGET) isEmpty(JAVA_HOME_TARGET):{ @@ -99,21 +130,29 @@ macx | ios:{ greaterThan(QT_MAJOR_VERSION, 6) | greaterThan(QT_MINOR_VERSION, 1):{ QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64 } + }else{ + CONFIG += c++17 } } else { !android:INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include) win32 { INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/win32) } - solaris-g++ | solaris-cc { - INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/solaris) - } - linux-g++* { + linux-* { INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/linux) } - freebsd-g++* { + freebsd-* { INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/freebsd) } + netbsd-* { + INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/netbsd) + } + openbsd-* { + INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/openbsd) + } + solaris-* { + INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/solaris) + } } contains(QT_CONFIG, release):contains(QT_CONFIG, debug) { @@ -144,6 +183,8 @@ ios:{ android:{ CONFIG += rtti exceptions + CONFIG -= android_install + TARGET = $${TARGET}_$${QT_ARCH} QMAKE_CXXFLAGS_EXCEPTIONS_ON += -fexceptions QMAKE_CXXFLAGS += -fexceptions -frtti -funwind-tables QMAKE_LFLAGS += -Wl,--export-dynamic -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libunwind.a -Wl,--exclude-libs,libgcc.a -lunwind @@ -153,17 +194,22 @@ GENERATED_SOURCES_BASE = $$clean_path($$PWD/../../../$$VERSION/build/generator/c SOURCES_BASE = $$clean_path($$dirname(_PRO_FILE_)/..) # gcc reports some functions as unused when they are not. -linux-g++* | freebsd-g++* | win32-g++* { +linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc* | win32-g++* { QMAKE_CXXFLAGS_WARN_OFF += -Wdollar-in-identifier-extension -Woverloaded-virtual QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF + CONFIG += rtti exceptions + QMAKE_CXXFLAGS += -fexceptions -frtti -funwind-tables PREFIXMAP += -fdebug-prefix-map=$$SOURCES_BASE/= PREFIXMAP += -fdebug-prefix-map=$$QTJAMBI_PLATFORM_BUILDDIR/$$QTJAMBI_PROJECT=../sources/ PREFIXMAP += -fdebug-prefix-map=../../../generator/cpp/= QMAKE_CXXFLAGS_DEBUG += $$PREFIXMAP QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$PREFIXMAP + lessThan(QT_MAJOR_VERSION, 6):{ + QMAKE_CXXFLAGS += -fno-sized-deallocation + } } macx{ @@ -174,9 +220,6 @@ macx{ QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$PREFIXMAP } -linux-g++* : lessThan(QT_MAJOR_VERSION, 6):{ - QMAKE_CXXFLAGS += -fno-sized-deallocation -} win32-arm64-msvc* | win32-msvc* { CONFIG += embed_manifest_dll force_embed_manifest @@ -233,13 +276,12 @@ exists($$GENERATOR_PRI): include($$GENERATOR_PRI) } else { INSTALLS += INSTALL_HEADERS LIBS += -L$$QTJAMBI_LIB_PATH - linux-g++*: QMAKE_RPATHDIR = $ORIGIN/. + linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc*:{ + QMAKE_RPATHDIR = $ORIGIN/. + } android:{ - armeabi-v7a: LIBS += -l$$member(QTJAMBI_LIB_NAME, 0)_armeabi-v7a - arm64-v8a: LIBS += -l$$member(QTJAMBI_LIB_NAME, 0)_arm64-v8a - x86: LIBS += -l$$member(QTJAMBI_LIB_NAME, 0)_x86 - x86_64: LIBS += -l$$member(QTJAMBI_LIB_NAME, 0)_x86_64 + LIBS += -l$${QTJAMBI_LIB_NAME}_$${QT_ARCH} }else{ LIBS += -l$$QTJAMBI_LIB_NAME } diff --git a/src/cpp/QtJambi/containeraccess.cpp b/src/cpp/QtJambi/containeraccess.cpp index 42e58cd7..1810a575 100644 --- a/src/cpp/QtJambi/containeraccess.cpp +++ b/src/cpp/QtJambi/containeraccess.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include QT_WARNING_DISABLE_DEPRECATED #include diff --git a/src/cpp/QtJambi/containeraccess.h b/src/cpp/QtJambi/containeraccess.h index 0efe386c..8f74523c 100644 --- a/src/cpp/QtJambi/containeraccess.h +++ b/src/cpp/QtJambi/containeraccess.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/containeraccess_hash.cpp b/src/cpp/QtJambi/containeraccess_hash.cpp index bf956d4f..d2956d38 100644 --- a/src/cpp/QtJambi/containeraccess_hash.cpp +++ b/src/cpp/QtJambi/containeraccess_hash.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qtjambiapi.h" #include #include diff --git a/src/cpp/QtJambi/containeraccess_hash.h b/src/cpp/QtJambi/containeraccess_hash.h index 4184e0e6..6e74999a 100644 --- a/src/cpp/QtJambi/containeraccess_hash.h +++ b/src/cpp/QtJambi/containeraccess_hash.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/containeraccess_iterator.cpp b/src/cpp/QtJambi/containeraccess_iterator.cpp index 8bb38354..50b0df66 100644 --- a/src/cpp/QtJambi/containeraccess_iterator.cpp +++ b/src/cpp/QtJambi/containeraccess_iterator.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qtjambiapi.h" #include #include diff --git a/src/cpp/QtJambi/containeraccess_linkedlist.cpp b/src/cpp/QtJambi/containeraccess_linkedlist.cpp index f2832f48..4ceb2843 100644 --- a/src/cpp/QtJambi/containeraccess_linkedlist.cpp +++ b/src/cpp/QtJambi/containeraccess_linkedlist.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include QT_WARNING_DISABLE_DEPRECATED diff --git a/src/cpp/QtJambi/containeraccess_linkedlist.h b/src/cpp/QtJambi/containeraccess_linkedlist.h index f8154023..8c7b220b 100644 --- a/src/cpp/QtJambi/containeraccess_linkedlist.h +++ b/src/cpp/QtJambi/containeraccess_linkedlist.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/containeraccess_list.cpp b/src/cpp/QtJambi/containeraccess_list.cpp index 9397b1e8..59f8c096 100644 --- a/src/cpp/QtJambi/containeraccess_list.cpp +++ b/src/cpp/QtJambi/containeraccess_list.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qtjambiapi.h" #include #include @@ -1918,66 +1949,6 @@ void AutoListAccess::detachAndGrow(QArrayDataPointer* p, QArrayData::Growt reallocateAndGrow(p, where, n, old); } -QArrayDataPointer AutoListAccess::allocateGrow(const QArrayDataPointer &from, qsizetype n, QArrayData::GrowthPosition position) -{ - // calculate new capacity. We keep the free capacity at the side that does not have to grow - // to avoid quadratic behavior with mixed append/prepend cases - - // use qMax below, because constAllocatedCapacity() can be 0 when using fromRawData() - qsizetype minimalCapacity = qMax(from.size, from.constAllocatedCapacity()) + n; - // subtract the free space at the side we want to allocate. This ensures that the total size requested is - // the existing allocation at the other side + size + n. - minimalCapacity -= (position == QArrayData::GrowsAtEnd) ? freeSpaceAtEnd(&from) : freeSpaceAtBegin(&from); - qsizetype capacity = from.detachCapacity(minimalCapacity); - const bool grows = capacity > from.constAllocatedCapacity(); - QArrayData *header; - void *dataPtr = QArrayData::allocate(&header, m_elementMetaType.sizeOf(), - qMax(m_elementMetaType.alignOf(), alignof(QArrayData)), - capacity, - grows ? QArrayData::Grow : QArrayData::KeepSize); -#if !defined(Q_OS_ANDROID) && __has_builtin(__builtin_assume_aligned) - switch(m_elementMetaType.alignOf()){ - case 1: - dataPtr = __builtin_assume_aligned(dataPtr, qMax(size_t(1), Q_ALIGNOF(QArrayData))); - break; - case 2: - dataPtr = __builtin_assume_aligned(dataPtr, qMax(size_t(2), Q_ALIGNOF(QArrayData))); - break; - case 3: - dataPtr = __builtin_assume_aligned(dataPtr, qMax(size_t(3), Q_ALIGNOF(QArrayData))); - break; - case 4: - dataPtr = __builtin_assume_aligned(dataPtr, qMax(size_t(4), Q_ALIGNOF(QArrayData))); - break; - case 8: - dataPtr = __builtin_assume_aligned(dataPtr, qMax(size_t(8), Q_ALIGNOF(QArrayData))); - break; - } -#endif - const bool valid = header != nullptr && dataPtr != nullptr; - if (!valid) - return QArrayDataPointer(reinterpret_cast*>(header), reinterpret_cast(dataPtr)); - - // Idea: * when growing backwards, adjust pointer to prepare free space at the beginning - // * when growing forward, adjust by the previous data pointer offset - char* cdataPtr = reinterpret_cast(dataPtr); - cdataPtr += ((position == QArrayData::GrowsAtBeginning) - ? n + qMax(0, (header->alloc - from.size - n) / 2) - : freeSpaceAtBegin(&from)) * m_offset; - dataPtr = cdataPtr; - header->flags = from.flags(); - return QArrayDataPointer(reinterpret_cast*>(header), reinterpret_cast(dataPtr)); -} - -void AutoListAccess::reallocate(QArrayDataPointer* p, qsizetype capacity, QArrayData::AllocationOption option){ - QPair pair = - QArrayData::reallocateUnaligned(p->d, p->ptr, m_elementMetaType.sizeOf(), capacity, option); - Q_CHECK_PTR(pair.second); - Q_ASSERT(pair.first != nullptr); - p->d = reinterpret_cast*>(pair.first); - p->ptr = reinterpret_cast(pair.second); -} - void AutoListAccess::reallocateAndGrow(QArrayDataPointer* p, QArrayData::GrowthPosition where, qsizetype n, QArrayDataPointer *old) { if(m_elementMetaType.flags() & QMetaType::RelocatableType && size_t(m_elementMetaType.alignOf()) <= alignof(std::max_align_t)) { @@ -2042,6 +2013,79 @@ void AutoListAccess::reallocateAndGrow(QArrayDataPointer* p, QArrayData::G dp.ptr = nullptr; } +QArrayDataPointer AutoListAccess::allocateGrow(const QArrayDataPointer &from, qsizetype n, QArrayData::GrowthPosition position) +{ + // calculate new capacity. We keep the free capacity at the side that does not have to grow + // to avoid quadratic behavior with mixed append/prepend cases + + // use qMax below, because constAllocatedCapacity() can be 0 when using fromRawData() + qsizetype minimalCapacity = qMax(from.size, from.constAllocatedCapacity()) + n; + // subtract the free space at the side we want to allocate. This ensures that the total size requested is + // the existing allocation at the other side + size + n. + minimalCapacity -= (position == QArrayData::GrowsAtEnd) ? freeSpaceAtEnd(&from) : freeSpaceAtBegin(&from); + qsizetype capacity = from.detachCapacity(minimalCapacity); + const bool grows = capacity > from.constAllocatedCapacity(); + QArrayData *header; + void *dataPtr = QArrayData::allocate(&header, m_elementMetaType.sizeOf(), + qMax(m_elementMetaType.alignOf(), alignof(QArrayData)), + capacity, + grows ? QArrayData::Grow : QArrayData::KeepSize); +#if __has_builtin(__builtin_assume_aligned) + switch(m_elementMetaType.alignOf()){ + case 1: + if constexpr (Q_ALIGNOF(QArrayData)>1){ + dataPtr = __builtin_assume_aligned(dataPtr, Q_ALIGNOF(QArrayData)); + }else{ + dataPtr = __builtin_assume_aligned(dataPtr, 1); + } + break; + case 2: + if constexpr (Q_ALIGNOF(QArrayData)>2){ + dataPtr = __builtin_assume_aligned(dataPtr, Q_ALIGNOF(QArrayData)); + }else{ + dataPtr = __builtin_assume_aligned(dataPtr, 2); + } + break; + case 4: + if constexpr (Q_ALIGNOF(QArrayData)>4){ + dataPtr = __builtin_assume_aligned(dataPtr, Q_ALIGNOF(QArrayData)); + }else{ + dataPtr = __builtin_assume_aligned(dataPtr, 4); + } + break; + case 8: + if constexpr (Q_ALIGNOF(QArrayData)>8){ + dataPtr = __builtin_assume_aligned(dataPtr, Q_ALIGNOF(QArrayData)); + }else{ + dataPtr = __builtin_assume_aligned(dataPtr, 8); + } + break; + } +#endif + const bool valid = header != nullptr && dataPtr != nullptr; + if (!valid) + return QArrayDataPointer(reinterpret_cast*>(header), reinterpret_cast(dataPtr)); + + // Idea: * when growing backwards, adjust pointer to prepare free space at the beginning + // * when growing forward, adjust by the previous data pointer offset + char* cdataPtr = reinterpret_cast(dataPtr); + cdataPtr += ((position == QArrayData::GrowsAtBeginning) + ? n + qMax(0, (header->alloc - from.size - n) / 2) + : freeSpaceAtBegin(&from)) * m_offset; + dataPtr = cdataPtr; + header->flags = from.flags(); + return QArrayDataPointer(reinterpret_cast*>(header), reinterpret_cast(dataPtr)); +} + +void AutoListAccess::reallocate(QArrayDataPointer* p, qsizetype capacity, QArrayData::AllocationOption option){ + QPair pair = + QArrayData::reallocateUnaligned(p->d, p->ptr, m_elementMetaType.sizeOf(), capacity, option); + Q_CHECK_PTR(pair.second); + Q_ASSERT(pair.first != nullptr); + p->d = reinterpret_cast*>(pair.first); + p->ptr = reinterpret_cast(pair.second); +} + void AutoListAccess::detach(QArrayDataPointer* p, QArrayDataPointer *old) { if(p->needsDetach()) @@ -2071,22 +2115,35 @@ QArrayDataPointer AutoListAccess::allocate(qsizetype capacity, QArrayData: qMax(m_elementMetaType.alignOf(), alignof(QArrayData)), capacity, option); -#if !defined(Q_OS_ANDROID) && __has_builtin(__builtin_assume_aligned) +#if __has_builtin(__builtin_assume_aligned) switch(m_elementMetaType.alignOf()){ case 1: - dataPtr = __builtin_assume_aligned(dataPtr, qMax(size_t(1), Q_ALIGNOF(QArrayData))); + if constexpr (Q_ALIGNOF(QArrayData)>1){ + dataPtr = __builtin_assume_aligned(dataPtr, Q_ALIGNOF(QArrayData)); + }else{ + dataPtr = __builtin_assume_aligned(dataPtr, 1); + } break; case 2: - dataPtr = __builtin_assume_aligned(dataPtr, qMax(size_t(2), Q_ALIGNOF(QArrayData))); - break; - case 3: - dataPtr = __builtin_assume_aligned(dataPtr, qMax(size_t(3), Q_ALIGNOF(QArrayData))); + if constexpr (Q_ALIGNOF(QArrayData)>2){ + dataPtr = __builtin_assume_aligned(dataPtr, Q_ALIGNOF(QArrayData)); + }else{ + dataPtr = __builtin_assume_aligned(dataPtr, 2); + } break; case 4: - dataPtr = __builtin_assume_aligned(dataPtr, qMax(size_t(4), Q_ALIGNOF(QArrayData))); + if constexpr (Q_ALIGNOF(QArrayData)>4){ + dataPtr = __builtin_assume_aligned(dataPtr, Q_ALIGNOF(QArrayData)); + }else{ + dataPtr = __builtin_assume_aligned(dataPtr, 4); + } break; case 8: - dataPtr = __builtin_assume_aligned(dataPtr, qMax(size_t(8), Q_ALIGNOF(QArrayData))); + if constexpr (Q_ALIGNOF(QArrayData)>8){ + dataPtr = __builtin_assume_aligned(dataPtr, Q_ALIGNOF(QArrayData)); + }else{ + dataPtr = __builtin_assume_aligned(dataPtr, 8); + } break; } #endif diff --git a/src/cpp/QtJambi/containeraccess_list.h b/src/cpp/QtJambi/containeraccess_list.h index 4bbb9c8e..a52d3bc0 100644 --- a/src/cpp/QtJambi/containeraccess_list.h +++ b/src/cpp/QtJambi/containeraccess_list.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/containeraccess_map.cpp b/src/cpp/QtJambi/containeraccess_map.cpp index 25ab9edc..6e65441e 100644 --- a/src/cpp/QtJambi/containeraccess_map.cpp +++ b/src/cpp/QtJambi/containeraccess_map.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qtjambiapi.h" #include #include diff --git a/src/cpp/QtJambi/containeraccess_map.h b/src/cpp/QtJambi/containeraccess_map.h index 029b190a..714ac1b8 100644 --- a/src/cpp/QtJambi/containeraccess_map.h +++ b/src/cpp/QtJambi/containeraccess_map.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/containeraccess_multihash.cpp b/src/cpp/QtJambi/containeraccess_multihash.cpp index 392c0c69..54db05dc 100644 --- a/src/cpp/QtJambi/containeraccess_multihash.cpp +++ b/src/cpp/QtJambi/containeraccess_multihash.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qtjambiapi.h" #include #include diff --git a/src/cpp/QtJambi/containeraccess_multihash.h b/src/cpp/QtJambi/containeraccess_multihash.h index e2fdb3a3..8151a52f 100644 --- a/src/cpp/QtJambi/containeraccess_multihash.h +++ b/src/cpp/QtJambi/containeraccess_multihash.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/containeraccess_multimap.cpp b/src/cpp/QtJambi/containeraccess_multimap.cpp index eef6e6c5..433fc19b 100644 --- a/src/cpp/QtJambi/containeraccess_multimap.cpp +++ b/src/cpp/QtJambi/containeraccess_multimap.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qtjambiapi.h" #include #include diff --git a/src/cpp/QtJambi/containeraccess_multimap.h b/src/cpp/QtJambi/containeraccess_multimap.h index 5e6779d1..4b99ff52 100644 --- a/src/cpp/QtJambi/containeraccess_multimap.h +++ b/src/cpp/QtJambi/containeraccess_multimap.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/containeraccess_p.h b/src/cpp/QtJambi/containeraccess_p.h index 660aa591..c72f8867 100644 --- a/src/cpp/QtJambi/containeraccess_p.h +++ b/src/cpp/QtJambi/containeraccess_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/containeraccess_pair.cpp b/src/cpp/QtJambi/containeraccess_pair.cpp index 0ec5ddfd..c84a14b0 100644 --- a/src/cpp/QtJambi/containeraccess_pair.cpp +++ b/src/cpp/QtJambi/containeraccess_pair.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qtjambiapi.h" #include #include diff --git a/src/cpp/QtJambi/containeraccess_pair.h b/src/cpp/QtJambi/containeraccess_pair.h index f1de4a98..ed6742e8 100644 --- a/src/cpp/QtJambi/containeraccess_pair.h +++ b/src/cpp/QtJambi/containeraccess_pair.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/containeraccess_set.cpp b/src/cpp/QtJambi/containeraccess_set.cpp index 4c46b560..d7dbcee7 100644 --- a/src/cpp/QtJambi/containeraccess_set.cpp +++ b/src/cpp/QtJambi/containeraccess_set.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qtjambiapi.h" #include #include diff --git a/src/cpp/QtJambi/containeraccess_set.h b/src/cpp/QtJambi/containeraccess_set.h index 1458c29b..0474f8fb 100644 --- a/src/cpp/QtJambi/containeraccess_set.h +++ b/src/cpp/QtJambi/containeraccess_set.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/containeraccess_vector.cpp b/src/cpp/QtJambi/containeraccess_vector.cpp index 7fb9791b..621a32bb 100644 --- a/src/cpp/QtJambi/containeraccess_vector.cpp +++ b/src/cpp/QtJambi/containeraccess_vector.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qtjambiapi.h" #include #include diff --git a/src/cpp/QtJambi/containeraccess_vector.h b/src/cpp/QtJambi/containeraccess_vector.h index 5c7e9564..ef8e089a 100644 --- a/src/cpp/QtJambi/containeraccess_vector.h +++ b/src/cpp/QtJambi/containeraccess_vector.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/containerapi.h b/src/cpp/QtJambi/containerapi.h index 0c0aea15..650a0d50 100644 --- a/src/cpp/QtJambi/containerapi.h +++ b/src/cpp/QtJambi/containerapi.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/containers.cpp b/src/cpp/QtJambi/containers.cpp index f7603e93..db6844c7 100644 --- a/src/cpp/QtJambi/containers.cpp +++ b/src/cpp/QtJambi/containers.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/convert.cpp b/src/cpp/QtJambi/convert.cpp index e7299003..40acbb1c 100644 --- a/src/cpp/QtJambi/convert.cpp +++ b/src/cpp/QtJambi/convert.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -148,12 +148,12 @@ void *QtJambiAPI::convertQNativePointerToNative(JNIEnv *env, jobject java_object if (!java_object) return nullptr; Q_ASSERT(Java::QtJambi::QNativePointer::isInstanceOf(env, java_object)); // check the java object is right type - int object_indirections = Java::QtJambi::QNativePointer::indirections(env, java_object); + /*int object_indirections = Java::QtJambi::QNativePointer::indirections(env, java_object); // What is this != test doing ? if (object_indirections != indirections) { JavaException::raiseIllegalArgumentException(env, "Illegal number of indirections" QTJAMBI_STACKTRACEINFO ); return nullptr; - } + }*/ return reinterpret_cast(Java::QtJambi::QNativePointer::pointer(env,java_object)); } @@ -413,7 +413,12 @@ jobject QtJambiAPI::convertQVariantToJavaObject(JNIEnv *env, const QVariant &qt_ } else if (metaType == QMetaType::fromType()) { JIteratorWrapper wrapper = qt_variant.value(); return env->NewLocalRef(wrapper.object()); - } else { +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + } else if (isNativeWrapperMetaType(metaType)) { + JObjectWrapper wrapper = qt_variant.value(); + return env->NewLocalRef(wrapper.object()); +#endif + } else { QString qtType = QLatin1String(metaType.name()); QString javaType = QtJambiTypeManager::getExternalTypeName(env, qtType, metaType); // Find usage pattern @@ -708,7 +713,7 @@ bool trivialConverter(const void *src, void *target) { return true; }; -void registerConverterVariant(JNIEnv *env, QMetaType metaType, QString qtName, const QString& fullJavaName, jclass clazz){ +void registerConverterVariant(JNIEnv *env, QMetaType metaType, QString qtName, const QString& fullJavaName, jclass clazz, QMetaType nativeWrapperType){ QMetaType jObjectWrapperType = QMetaType::fromType(); if(metaType.isValid() && metaType!=jObjectWrapperType){ if(Java::QtCore::QObject::isAssignableFrom(env, clazz)){ @@ -741,100 +746,219 @@ void registerConverterVariant(JNIEnv *env, QMetaType metaType, QString qtName, c QMetaType::registerConverterFunction([](const void *src, void *target) -> bool { if(JniEnvironment env{200}){ jobject object = QtJambiAPI::convertQObjectToJavaObject(env, *reinterpret_cast(src)); - new (target)JObjectWrapper(env, object); + *reinterpret_cast(target) = JObjectWrapper(env, object); return true; } return false; }, metaType, jObjectWrapperType); }else{ - if(!QMetaType::hasRegisteredConverterFunction(jObjectWrapperType, metaType)){ - ExternalToInternalConverter converter = QtJambiTypeManager::tryGetExternalToInternalConverter(env, clazz, qtName, metaType); - clazz = getGlobalClassRef(env, clazz); - if(converter){ - QMetaType::registerConverterFunction([clazz, metaType, converter](const void *src, void *target) -> bool { + if(isJObjectWrappedMetaType(metaType)){ + if(!QMetaType::hasRegisteredConverterFunction(jObjectWrapperType, metaType)){ + JObjectWrapper classWrapper(env, clazz); + QMetaType::registerConverterFunction([classWrapper](const void *src, void *target) -> bool { if(src){ - if(JniEnvironment env{500}){ - const JObjectWrapper * wrapper = reinterpret_cast(src); - if(!wrapper->object() || env->IsInstanceOf(wrapper->object(), clazz)){ - if(!target) - metaType.construct(target, nullptr); - if(!wrapper->object()){ - return true; - }else{ - JniLocalFrame __jniLocalFrame(env, 200); - jvalue val; - val.l = wrapper->object(); - return converter(env, nullptr, val, target, jValueType::l); - } + jobject value = reinterpret_cast(src)->object(); + if(value!=nullptr){ + if(JniEnvironment env{200}){ + if(!env->IsInstanceOf(value, jclass(classWrapper.object()))) + return false; } } + new (target)JObjectWrapper(*reinterpret_cast(src)); + }else{ + new (target)JObjectWrapper(); } - return false; + return true; }, jObjectWrapperType, metaType); - }else{ - QMetaType::registerConverterFunction([clazz, metaType, qtName, converter](const void *src, void *target) mutable -> bool { + } + if(!QMetaType::hasRegisteredConverterFunction(metaType, jObjectWrapperType)){ + QMetaType::registerConverterFunction([](const void *src, void *target) -> bool { if(src){ - if(JniEnvironment env{500}){ + new (target)JObjectWrapper(*reinterpret_cast(src)); + }else{ + new (target)JObjectWrapper(); + } + return true; + }, metaType, jObjectWrapperType); + } + if(!QMetaType::hasRegisteredConverterFunction(metaType, QMetaType::fromType())) + QMetaType::registerConverterFunction([](const void *src, void *target) -> bool { + const JObjectWrapper* wrapper = reinterpret_cast(src); + *reinterpret_cast(target) = wrapper->toString(); + return true; + }, metaType, QMetaType::fromType()); + }else{ + if(!QMetaType::hasRegisteredConverterFunction(jObjectWrapperType, metaType)){ + ExternalToInternalConverter converter = QtJambiTypeManager::tryGetExternalToInternalConverter(env, clazz, qtName, metaType); + clazz = getGlobalClassRef(env, clazz); + if(converter){ + QMetaType::registerConverterFunction([clazz, metaType, converter](const void *src, void *target) -> bool { + if(src){ + if(JniEnvironment env{500}){ + const JObjectWrapper * wrapper = reinterpret_cast(src); + if(!wrapper->object() || env->IsInstanceOf(wrapper->object(), clazz)){ + if(!target) + metaType.construct(target, nullptr); + if(!wrapper->object()){ + return true; + }else{ + JniLocalFrame __jniLocalFrame(env, 200); + jvalue val; + val.l = wrapper->object(); + return converter(env, nullptr, val, target, jValueType::l); + } + } + } + } + return false; + }, jObjectWrapperType, metaType); + }else{ + QMetaType::registerConverterFunction([clazz, metaType, qtName, converter](const void *src, void *target) mutable -> bool { + if(src){ + if(JniEnvironment env{500}){ + if(!converter){ + converter = QtJambiTypeManager::getExternalToInternalConverter(env, clazz, qtName, metaType); + Q_ASSERT(converter); + } + const JObjectWrapper * wrapper = reinterpret_cast(src); + if(!wrapper->object() || env->IsInstanceOf(wrapper->object(), clazz)){ + if(!target) + metaType.construct(target, nullptr); + if(!wrapper->object()){ + return true; + }else{ + JniLocalFrame __jniLocalFrame(env, 200); + jvalue val; + val.l = wrapper->object(); + return converter(env, nullptr, val, target, jValueType::l); + } + } + } + } + return false; + }, jObjectWrapperType, metaType); + } + } + if(!QMetaType::hasRegisteredConverterFunction(metaType, jObjectWrapperType)){ + InternalToExternalConverter converter = QtJambiTypeManager::tryGetInternalToExternalConverter(env, qtName, metaType, clazz); + if(converter){ + QMetaType::registerConverterFunction([converter](const void *src, void *target) -> bool { + if(!src){ + *reinterpret_cast(target) = JObjectWrapper(); + return true; + }else if(JniEnvironment env{500}){ + jvalue val; + val.l = nullptr; + if(converter(env, nullptr, src, val, true)){ + *reinterpret_cast(target) = JObjectWrapper(env, val.l); + return true; + } + } + return false; + }, metaType, jObjectWrapperType); + }else{ + clazz = getGlobalClassRef(env, clazz); + QMetaType::registerConverterFunction([converter, qtName, metaType, clazz](const void *src, void *target) mutable -> bool { + if(!src){ + *reinterpret_cast(target) = JObjectWrapper(); + return true; + }else if(JniEnvironment env{500}){ if(!converter){ - converter = QtJambiTypeManager::getExternalToInternalConverter(env, clazz, qtName, metaType); + converter = QtJambiTypeManager::getInternalToExternalConverter(env, qtName, metaType, clazz); Q_ASSERT(converter); } - const JObjectWrapper * wrapper = reinterpret_cast(src); - if(!wrapper->object() || env->IsInstanceOf(wrapper->object(), clazz)){ - if(!target) - metaType.construct(target, nullptr); - if(!wrapper->object()){ - return true; - }else{ - JniLocalFrame __jniLocalFrame(env, 200); - jvalue val; - val.l = wrapper->object(); - return converter(env, nullptr, val, target, jValueType::l); - } + jvalue val; + val.l = nullptr; + if(converter(env, nullptr, src, val, true)){ + *reinterpret_cast(target) = JObjectWrapper(env, val.l); + return true; } } - } - return false; - }, jObjectWrapperType, metaType); + return false; + }, metaType, jObjectWrapperType); + } } } - if(!QMetaType::hasRegisteredConverterFunction(metaType, jObjectWrapperType)){ - InternalToExternalConverter converter = QtJambiTypeManager::tryGetInternalToExternalConverter(env, qtName, metaType, clazz); - if(converter){ - QMetaType::registerConverterFunction([converter](const void *src, void *target) -> bool { - if(!src){ - new (target)JObjectWrapper(); + } + if(nativeWrapperType.isValid()){ + if(nativeWrapperType.flags().testFlag(QMetaType::PointerToQObject)){ + if(!QMetaType::hasRegisteredConverterFunction(nativeWrapperType, jObjectWrapperType)) + QMetaType::registerConverterFunction([](const void *src, void *target) -> bool { + const JQObjectWrapper* wrapper = reinterpret_cast(src); + if(JniEnvironment env{200}){ + *reinterpret_cast(target) = wrapper->javaObject(env); return true; - }else if(JniEnvironment env{500}){ - jvalue val; - val.l = nullptr; - if(converter(env, nullptr, src, val, true)){ - new (target)JObjectWrapper(env, val.l); - return true; - } } return false; - }, metaType, jObjectWrapperType); - }else{ - clazz = getGlobalClassRef(env, clazz); - QMetaType::registerConverterFunction([converter, qtName, metaType, clazz](const void *src, void *target) mutable -> bool { - if(!src){ - new (target)JObjectWrapper(); + }, nativeWrapperType, jObjectWrapperType); + if(!QMetaType::hasRegisteredConverterFunction(nativeWrapperType, QMetaType::fromType())) + QMetaType::registerConverterFunction([](const void *src, void *target) -> bool { + const JQObjectWrapper* wrapper = reinterpret_cast(src); + *reinterpret_cast(target) = QVariant::fromValue(wrapper->qobject()).toString(); + return true; + }, nativeWrapperType, QMetaType::fromType()); + if(!QMetaType::hasRegisteredConverterFunction(nativeWrapperType, metaType)){ + if(Java::Runtime::Class::isInterface(env, clazz)){ + if(const std::type_info* interfaceTypeId = getTypeByJavaName(fullJavaName)){ + QMetaType::registerConverterFunction([interfaceTypeId](const void *src, void *target) -> bool { + const JQObjectWrapper* wrapper = reinterpret_cast(src); + if(QSharedPointer link = wrapper->link()){ + *reinterpret_cast(target) = link->typedPointer(*interfaceTypeId); + return true; + } + return false; + }, nativeWrapperType, metaType); + } + }else{ + QMetaType::registerConverterFunction([](const void *src, void *target) -> bool { + const JQObjectWrapper* wrapper = reinterpret_cast(src); + *reinterpret_cast(target) = wrapper->qobject(); return true; - }else if(JniEnvironment env{500}){ - if(!converter){ - converter = QtJambiTypeManager::getInternalToExternalConverter(env, qtName, metaType, clazz); - Q_ASSERT(converter); - } - jvalue val; - val.l = nullptr; - if(converter(env, nullptr, src, val, true)){ - new (target)JObjectWrapper(env, val.l); - return true; - } + }, nativeWrapperType, metaType); + } + } + }else{ + if(!QMetaType::hasRegisteredConverterFunction(nativeWrapperType, jObjectWrapperType)) + QMetaType::registerConverterFunction([](const void *src, void *target) -> bool { + const JObjectWrapper* wrapper = reinterpret_cast(src); + *reinterpret_cast(target) = *wrapper; + return true; + }, nativeWrapperType, jObjectWrapperType); + if(!QMetaType::hasRegisteredConverterFunction(nativeWrapperType, QMetaType::fromType())) + QMetaType::registerConverterFunction([](const void *src, void *target) -> bool { + const JObjectWrapper* wrapper = reinterpret_cast(src); + bool ok = false; + *reinterpret_cast(target) = wrapper->toString(&ok); + return ok; + }, nativeWrapperType, QMetaType::fromType()); + if(!QMetaType::hasRegisteredConverterFunction(nativeWrapperType, metaType) && metaType.flags().testFlag(QMetaType::IsPointer)){ + if(Java::Runtime::Class::isInterface(env, clazz)){ + if(const std::type_info* interfaceTypeId = getTypeByJavaName(fullJavaName)){ + QMetaType::registerConverterFunction([interfaceTypeId](const void *src, void *target) -> bool { + const JObjectWrapper* wrapper = reinterpret_cast(src); + if(JniEnvironment env{200}){ + if (QSharedPointer link = QtJambiLink::findLinkForJavaInterface(env, wrapper->object())){ + *reinterpret_cast(target) = link->typedPointer(*interfaceTypeId); + return true; + } + } + return false; + }, nativeWrapperType, metaType); } - return false; - }, metaType, jObjectWrapperType); + }else{ + const QSharedPointer& (*findLinkForJavaObject)(JNIEnv*,jobject) + = Java::QtJambi::NativeUtility$Object::isAssignableFrom(env, clazz) ? QtJambiLink::findLinkForJavaObject : QtJambiLink::findLinkForJavaInterface; + QMetaType::registerConverterFunction([findLinkForJavaObject](const void *src, void *target) -> bool { + const JObjectWrapper* wrapper = reinterpret_cast(src); + if(JniEnvironment env{200}){ + if (QSharedPointer link = findLinkForJavaObject(env, wrapper->object())){ + *reinterpret_cast(target) = link->pointer(); + return true; + } + } + return false; + }, nativeWrapperType, metaType); + } } } } @@ -857,14 +981,12 @@ void registerConverterVariant(JNIEnv *env, QMetaType metaType, QString qtName, c } } if(!_metaType.isValid() && _qtName.endsWith("*") && interfaceTypeId){ - _metaType = qtjambiRegisterMetaType(env, clazz, _qtName.toUtf8(), registeredOriginalMetaObject(*interfaceTypeId), false); + _metaType = qtjambiRegisterMetaType(env, interfaceClass, _qtName.toUtf8(), registeredOriginalMetaObject(*interfaceTypeId), false); } if(_metaType.isValid()){ if(!QMetaType::hasRegisteredConverterFunction(metaType, _metaType)){ if(metaType==jObjectWrapperType -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) || JObjectValueWrapper::isValueType(metaType) -#endif || isJObjectWrappedMetaType(metaType)){ interfaceClass = getGlobalClassRef(env, interfaceClass); const QSharedPointer& (*findLinkForJavaObject)(JNIEnv*,jobject) @@ -925,21 +1047,21 @@ void registerConverterVariant(JNIEnv *env, QMetaType metaType, QString qtName, c } } } - registerConverterVariant(env, _metaType, _qtName, _fullJavaName, interfaceClass); + registerConverterVariant(env, _metaType, _qtName, _fullJavaName, interfaceClass, nativeWrapperType); } } } } if(!Java::Runtime::Class::isInterface(env, clazz)){ - if(jclass _clazz = env->GetSuperclass(clazz)){ - if(!Java::QtJambi::QtObject::isSameClass(env, _clazz) - && !Java::Runtime::Object::isSameClass(env, _clazz) - && env->GetArrayLength(Java::Runtime::Class::getTypeParameters(env, _clazz))==0){ - QString _fullJavaName = QtJambiAPI::getClassName(env, _clazz).replace(".", "/"); - QString _qtName = QtJambiTypeManager::getInternalTypeName(env, _clazz, false); + if(jclass superClazz = env->GetSuperclass(clazz)){ + if(!Java::QtJambi::QtObject::isSameClass(env, superClazz) + && !Java::Runtime::Object::isSameClass(env, superClazz) + && env->GetArrayLength(Java::Runtime::Class::getTypeParameters(env, superClazz))==0){ + QString _fullJavaName = QtJambiAPI::getClassName(env, superClazz).replace(".", "/"); + QString _qtName = QtJambiTypeManager::getInternalTypeName(env, superClazz, false); QMetaType _metaType = QMetaType::fromName(_qtName.toLatin1()); if(!_metaType.isValid()){ - if(jclass _object_class = JavaAPI::resolveClosestQtSuperclass(env, _clazz)){ + if(jclass _object_class = JavaAPI::resolveClosestQtSuperclass(env, superClazz)){ _fullJavaName = QtJambiAPI::getClassName(env, _object_class).replace(".", "/"); QString __fullJavaName = QtJambiAPI::getClassName(env, _object_class).replace(".", "/"); QString __qtName = QtJambiTypeManager::getInternalTypeName(env, _object_class, false); @@ -952,31 +1074,29 @@ void registerConverterVariant(JNIEnv *env, QMetaType metaType, QString qtName, c } const std::type_info* superTypeId = getTypeByJavaName(_fullJavaName); if(!superTypeId){ - if(jclass _object_class = JavaAPI::resolveClosestQtSuperclass(env, _clazz)){ - _clazz = _object_class; + if(jclass _object_class = JavaAPI::resolveClosestQtSuperclass(env, superClazz)){ + superClazz = _object_class; _fullJavaName = QtJambiAPI::getClassName(env, _object_class).replace(".", "/"); superTypeId = getTypeByJavaName(_fullJavaName); } } - if(!_metaType.isValid() && _qtName.endsWith("*") && !superTypeId){ - _metaType = qtjambiRegisterMetaType(env, clazz, _qtName.toUtf8(), registeredOriginalMetaObject(*superTypeId), Java::QtCore::QObject::isAssignableFrom(env, _clazz)); + if(!_metaType.isValid() && _qtName.endsWith("*") && superTypeId){ + _metaType = qtjambiRegisterMetaType(env, superClazz, _qtName.toUtf8(), registeredOriginalMetaObject(*superTypeId), Java::QtCore::QObject::isAssignableFrom(env, superClazz)); } if(_metaType.isValid()){ if(!QMetaType::hasRegisteredConverterFunction(metaType, _metaType)){ if(metaType==jObjectWrapperType -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) || JObjectValueWrapper::isValueType(metaType) -#endif || isJObjectWrappedMetaType(metaType)){ - _clazz = getGlobalClassRef(env, _clazz); + superClazz = getGlobalClassRef(env, superClazz); const QSharedPointer& (*findLinkForJavaObject)(JNIEnv*,jobject) - = Java::QtJambi::NativeUtility$Object::isAssignableFrom(env, _clazz) ? QtJambiLink::findLinkForJavaObject : QtJambiLink::findLinkForJavaInterface; + = Java::QtJambi::NativeUtility$Object::isAssignableFrom(env, superClazz) ? QtJambiLink::findLinkForJavaObject : QtJambiLink::findLinkForJavaInterface; if(_qtName.endsWith("*")){ - QMetaType::registerConverterFunction([_clazz, findLinkForJavaObject](const void *src, void *target) -> bool { + QMetaType::registerConverterFunction([superClazz, findLinkForJavaObject](const void *src, void *target) -> bool { if(JniEnvironment env{200}){ if(src){ const JObjectWrapper* wrapper = reinterpret_cast(src); - if(!wrapper->object() || env->IsInstanceOf(wrapper->object(), _clazz)){ + if(!wrapper->object() || env->IsInstanceOf(wrapper->object(), superClazz)){ void* object = nullptr; if(QSharedPointer link = findLinkForJavaObject(env, wrapper->object())) object = link->pointer(); @@ -990,11 +1110,11 @@ void registerConverterVariant(JNIEnv *env, QMetaType metaType, QString qtName, c return false; }, metaType, _metaType); }else{ - QMetaType::registerConverterFunction([_clazz, findLinkForJavaObject, _metaType](const void *src, void *target) -> bool { + QMetaType::registerConverterFunction([superClazz, findLinkForJavaObject, _metaType](const void *src, void *target) -> bool { if(JniEnvironment env{200}){ if(src){ const JObjectWrapper* wrapper = reinterpret_cast(src); - if(env->IsInstanceOf(wrapper->object(), _clazz)){ + if(env->IsInstanceOf(wrapper->object(), superClazz)){ void* object = nullptr; if(QSharedPointer link = findLinkForJavaObject(env, wrapper->object())) object = link->pointer(); @@ -1013,7 +1133,7 @@ void registerConverterVariant(JNIEnv *env, QMetaType metaType, QString qtName, c QMetaType::registerConverterFunction(&trivialConverter, metaType, _metaType); } } - registerConverterVariant(env, _metaType, _qtName, _fullJavaName, _clazz); + registerConverterVariant(env, _metaType, _qtName, _fullJavaName, superClazz, nativeWrapperType); } } } @@ -1034,9 +1154,7 @@ void registerConverterVariant(JNIEnv *env, QMetaType metaType, QString qtName, c if(_metaType.isValid()){ if(!QMetaType::hasRegisteredConverterFunction(metaType, _metaType)){ if(metaType==jObjectWrapperType -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) || JObjectValueWrapper::isValueType(metaType) -#endif || isJObjectWrappedMetaType(metaType)){ if(_qtName.endsWith("*")){ interfaceClass = getGlobalClassRef(env, interfaceClass); @@ -1617,6 +1735,11 @@ QVariant internal_convertJavaObjectToQVariant(JNIEnv *env, jobject java_object, // Do the slightly slower fallback... QString fullJavaName = QtJambiAPI::getClassName(env, object_class).replace(".", "/"); + if(Java::Runtime::Class::isSynthetic(env, object_class)){ + object_class = JavaAPI::resolveClass(env, qPrintable(fullJavaName)); + }else{ + object_class = getGlobalClassRef(env, object_class, fullJavaName.toLatin1()); + } // may it allow enum and flags? QString qtName = QtJambiTypeManager::getInternalTypeName(env, object_class, false); @@ -1675,12 +1798,21 @@ QVariant internal_convertJavaObjectToQVariant(JNIEnv *env, jobject java_object, } #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) QMetaType type = QMetaType::fromName(qPrintable(qtName)); - if(!type.isValid() && qtName.endsWith("*")){ - const std::type_info* typeId = getTypeByJavaName(fullJavaName); - type = qtjambiRegisterMetaType(env, object_class, qtName.toUtf8(), - typeId ? registeredOriginalMetaObject(*typeId) : nullptr, - Java::QtCore::QObject::isAssignableFrom(env, object_class)); - }else if(type.isValid() && isJObjectWrappedMetaType(type)){ + if(!type.isValid()){ + if(qtName.endsWith("*")){ + const std::type_info* typeId = getTypeByJavaName(fullJavaName); + type = qtjambiRegisterMetaType(env, object_class, qtName.toUtf8(), + typeId ? registeredOriginalMetaObject(*typeId) : nullptr, + Java::QtCore::QObject::isAssignableFrom(env, object_class)); + }else if(qtName.isEmpty()){ + //const SuperTypeInfos& infos = SuperTypeInfos::fromClass(env, object_class); + //if(!infos.isEmpty()){ + type = QMetaType(CoreAPI::registerMetaType(env, object_class, nullptr)); + qtName = type.name(); + //} + } + } + if(type.isValid() && isJObjectWrappedMetaType(type)){ JObjectWrapper wrapper(env, java_object); return QVariant(type, &wrapper); } @@ -1702,8 +1834,28 @@ QVariant internal_convertJavaObjectToQVariant(JNIEnv *env, jobject java_object, bool findConverter = !qtName.endsWith("*") || !convert; if(!findConverter){ if (QSharedPointer link = QtJambiLink::findLinkForJavaInterface(env, java_object)){ - if(link->ownership()!=QtJambiLink::Ownership::Java) + switch(link->ownership()){ + case QtJambiLink::Ownership::Java: +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + if(convert){ + QMetaType ntype = getNativeWrapperType(type); + if(ntype.isValid()){ + registerConverterVariant(env, type, qtName, fullJavaName, object_class, ntype); + if(type.flags().testFlag(QMetaType::PointerToQObject)){ + JQObjectWrapper wrapper(env, std::move(link)); + return QVariant(FROM_META_TYPE(ntype), &wrapper); + }else{ + JObjectWrapper wrapper(env, java_object); + return QVariant(FROM_META_TYPE(ntype), &wrapper); + } + } + } +#endif + break; + default: findConverter = true; + break; + } }else if(Java::QtJambi::QtObjectInterface::isInstanceOf(env, java_object)){ Java::QtJambi::QNoNativeResourcesException::throwNew(env, QStringLiteral("Incomplete object of type: %1").arg(QtJambiAPI::getObjectClassName(env, java_object).replace("$", ".")) QTJAMBI_STACKTRACEINFO ); } diff --git a/src/cpp/QtJambi/coreapi.cpp b/src/cpp/QtJambi/coreapi.cpp index 08fd3993..d9d884d0 100644 --- a/src/cpp/QtJambi/coreapi.cpp +++ b/src/cpp/QtJambi/coreapi.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/coreapi.h b/src/cpp/QtJambi/coreapi.h index ef1b98aa..d49bb3b2 100644 --- a/src/cpp/QtJambi/coreapi.h +++ b/src/cpp/QtJambi/coreapi.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/debug.cpp b/src/cpp/QtJambi/debug.cpp index 33ba026b..cb819e4d 100644 --- a/src/cpp/QtJambi/debug.cpp +++ b/src/cpp/QtJambi/debug.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -30,6 +30,9 @@ #include "qtjambilink_p.h" #include "debugapi.h" #include "java_p.h" +#if defined(QTJAMBI_DEBUG_TOOLS) || defined(QTJAMBI_LINK_NAME) +#include "qtjambishell_p.h" +#endif #include @@ -321,7 +324,7 @@ void printWithType(bool isEnter, MethodPrint::Type callType, const void* pointer } } -struct MethodPrintWithTypePrivate{ +class MethodPrintWithTypePrivate{ MethodPrint::Type m_callType; const void* m_pointer; const char* m_method; @@ -340,17 +343,17 @@ struct MethodPrintWithTypePrivate{ } public: ~MethodPrintWithTypePrivate(){ - printWithType(false, m_callType, m_pointer, m_method, type_name, m_file, m_line, m_function); + printWithType(false, m_callType, m_pointer, m_method, m_type, m_file, m_line, m_function); } static MethodPrintWithTypePrivate* create(MethodPrint::Type callType, const char* method, const QtJambiShell* shell, const char* file, int line, const char *function){ if(enabledMethodTracePrints() && callType!=MethodPrint::Disabled){ const char* type_name = nullptr; const void* pointer = nullptr; - if(QSharedPointer link = static_cast(shell)->link()){ + if(QSharedPointer link = reinterpret_cast(shell)->link()){ type_name = link->qtTypeName(); pointer = link->pointer(); } - printWithType(true, callType, pointer, method, type_name, m_file, m_line, m_function); + printWithType(true, callType, pointer, method, type_name, file, line, function); return new MethodPrintWithTypePrivate(callType, pointer, method, type_name, file, line, function); }else{ return nullptr; @@ -358,7 +361,7 @@ struct MethodPrintWithTypePrivate{ } static MethodPrintWithTypePrivate* create(MethodPrint::Type callType, const void* pointer, const char* method, const char* type_name, const char* file, int line, const char *function){ if(enabledMethodTracePrints() && callType!=MethodPrint::Disabled){ - printWithType(true, callType, pointer, method, type_name, m_file, m_line, m_function); + printWithType(true, callType, pointer, method, type_name, file, line, function); return new MethodPrintWithTypePrivate(callType, pointer, method, type_name, file, line, function); }else{ return nullptr; @@ -367,11 +370,11 @@ struct MethodPrintWithTypePrivate{ }; MethodPrintWithType::MethodPrintWithType(MethodPrint::Type callType, const char* method, const QtJambiShell* shell, const char* file, int line, const char *function) : - d(MethodPrintWithTypePrivate::create(callType, method, shell, file, line, function)){} + d(MethodPrintWithTypePrivate::create(callType, method, shell, file, line, function)){ } MethodPrintWithType::MethodPrintWithType(MethodPrint::Type callType, const void* pointer, const char* method, const char* type_name, const char* file, int line, const char *function) : - d(MethodPrintWithTypePrivate::create(callType, pointer, method, type_name, file, line, function)){} + d(MethodPrintWithTypePrivate::create(callType, pointer, method, type_name, file, line, function)){ } MethodPrintWithType::~MethodPrintWithType(){ diff --git a/src/cpp/QtJambi/debugapi.h b/src/cpp/QtJambi/debugapi.h index 857cd7df..ee9bacaa 100644 --- a/src/cpp/QtJambi/debugapi.h +++ b/src/cpp/QtJambi/debugapi.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -111,8 +111,8 @@ DebugAPI::MethodPrint __debug_method_print(DebugAPI::MethodPrint::ConstructorCal namespace DebugAPI{ class QTJAMBI_EXPORT MethodPrintWithType { public: - MethodPrintWithType(Type callType, const char* method, const QtJambiShell* shell, const char* file, int line, const char *function); - MethodPrintWithType(Type callType, const void* pointer, const char* method, const char* type_name, const char* file, int line, const char *function); + MethodPrintWithType(MethodPrint::Type callType, const char* method, const QtJambiShell* shell, const char* file, int line, const char *function); + MethodPrintWithType(MethodPrint::Type callType, const void* pointer, const char* method, const char* type_name, const char* file, int line, const char *function); ~MethodPrintWithType(); private: class MethodPrintWithTypePrivate* d; diff --git a/src/cpp/QtJambi/enums.cpp b/src/cpp/QtJambi/enums.cpp index 4bbc90ab..2c26c7df 100644 --- a/src/cpp/QtJambi/enums.cpp +++ b/src/cpp/QtJambi/enums.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/events.cpp b/src/cpp/QtJambi/events.cpp index 6f757380..e6508344 100644 --- a/src/cpp/QtJambi/events.cpp +++ b/src/cpp/QtJambi/events.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/exception.cpp b/src/cpp/QtJambi/exception.cpp index cec553f7..a7b63968 100644 --- a/src/cpp/QtJambi/exception.cpp +++ b/src/cpp/QtJambi/exception.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/exception.h b/src/cpp/QtJambi/exception.h index 07f49e0e..522e5c3e 100644 --- a/src/cpp/QtJambi/exception.h +++ b/src/cpp/QtJambi/exception.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/fileengine.cpp b/src/cpp/QtJambi/fileengine.cpp index ce4730bb..f5cb136e 100644 --- a/src/cpp/QtJambi/fileengine.cpp +++ b/src/cpp/QtJambi/fileengine.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -265,7 +265,7 @@ QStringList QJarEntryEngine::entryList(QDir::Filters filters, const QStringList if(JniEnvironment env{600}){ Java::QtJambi::ResourceUtility$JarResource::entryList(env, m_myJarFile.object(), qtjambi_cast(env, &result), - qtjambi_cast(env, filters), + jint(int(filters)), qtjambi_cast(env, filterNames), qtjambi_cast(env, m_name)); } @@ -333,7 +333,9 @@ QString QJarEntryEngine::fileName(FileName file) const{ QDateTime QJarEntryEngine::fileTime(FileTime t) const{ if(JniEnvironment env{600}){ - return qtjambi_cast(env, Java::QtJambi::ResourceUtility$JarResource::fileTime(env, m_myJarFile.object(), m_entry.object(), jint(t))); + jlong time = Java::QtJambi::ResourceUtility$JarResource::fileTime(env, m_myJarFile.object(), m_entry.object(), t==BirthTime, t==AccessTime, t==MetadataChangeTime || t==ModificationTime); + if(time>=0) + return QDateTime::fromMSecsSinceEpoch(time); } return QDateTime(); } diff --git a/src/cpp/QtJambi/functionalbase.cpp b/src/cpp/QtJambi/functionalbase.cpp index 2118a405..96c030aa 100644 --- a/src/cpp/QtJambi/functionalbase.cpp +++ b/src/cpp/QtJambi/functionalbase.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/functionalbase.h b/src/cpp/QtJambi/functionalbase.h index 7fbdb32a..fe12fa8a 100644 --- a/src/cpp/QtJambi/functionalbase.h +++ b/src/cpp/QtJambi/functionalbase.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/functionpointer.cpp b/src/cpp/QtJambi/functionpointer.cpp index 8a123e28..6c79f800 100644 --- a/src/cpp/QtJambi/functionpointer.cpp +++ b/src/cpp/QtJambi/functionpointer.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/functionpointer.h b/src/cpp/QtJambi/functionpointer.h index 6ee9533a..4814b1ff 100644 --- a/src/cpp/QtJambi/functionpointer.h +++ b/src/cpp/QtJambi/functionpointer.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/future.cpp b/src/cpp/QtJambi/future.cpp index 68b40adc..2718dca3 100644 --- a/src/cpp/QtJambi/future.cpp +++ b/src/cpp/QtJambi/future.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -371,13 +371,11 @@ QFutureInterfaceBase& QtJambiAPI::getQFutureInterfaceFromQFuture(const QFuture& sourceFuture){ if(dynamic_cast*>(sourceFuture.get())) return true; -#if defined(Q_OS_ANDROID) QFutureInterfaceBase* sourceObject = sourceFuture.get(); QByteArray sourceFutureTypeName = QtJambiAPI::typeName(typeid(*sourceObject)); if(sourceFutureTypeName=="QFutureInterface" || sourceFutureTypeName=="QFutureInterface_shell") return true; -#endif return false; } diff --git a/src/cpp/QtJambi/global.h b/src/cpp/QtJambi/global.h index 1b0786f5..857e1fad 100644 --- a/src/cpp/QtJambi/global.h +++ b/src/cpp/QtJambi/global.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/guiapi.h b/src/cpp/QtJambi/guiapi.h index 2d619b10..44655ff4 100644 --- a/src/cpp/QtJambi/guiapi.h +++ b/src/cpp/QtJambi/guiapi.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/java.cpp b/src/cpp/QtJambi/java.cpp index 09fc1bbf..1f8b58e1 100644 --- a/src/cpp/QtJambi/java.cpp +++ b/src/cpp/QtJambi/java.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -1261,11 +1261,11 @@ QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/internal,ResourceUtility, QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/internal,ResourceUtility$JarResource, QTJAMBI_REPOSITORY_DEFINE_METHOD(getJarEntry,(Ljava/lang/String;)Ljava/util/jar/JarEntry;) QTJAMBI_REPOSITORY_DEFINE_METHOD(getInputStream,(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;) - QTJAMBI_REPOSITORY_DEFINE_METHOD(fileTime,(Ljava/util/zip/ZipEntry;I)Lio/qt/core/QDateTime;) + QTJAMBI_REPOSITORY_DEFINE_METHOD(fileTime,(Ljava/util/zip/ZipEntry;ZZZ)J) QTJAMBI_REPOSITORY_DEFINE_METHOD(getName,()Ljava/lang/String;) QTJAMBI_REPOSITORY_DEFINE_METHOD(getOrReopen,()I) QTJAMBI_REPOSITORY_DEFINE_METHOD(put,()V) - QTJAMBI_REPOSITORY_DEFINE_METHOD(entryList,(Ljava/util/List;Lio/qt/core/QDir$Filters;Ljava/util/Collection;Ljava/lang/String;)V) + QTJAMBI_REPOSITORY_DEFINE_METHOD(entryList,(Ljava/util/List;ILjava/util/Collection;Ljava/lang/String;)V) ) QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/internal,LibraryUtility, @@ -1280,6 +1280,13 @@ QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/internal,EnumUtility, QTJAMBI_REPOSITORY_DEFINE_STATIC_METHOD(getEnumForQFlags,(Ljava/lang/Class;)Ljava/lang/Class;) ) +QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/internal,ReferenceUtility, + QTJAMBI_REPOSITORY_DEFINE_STATIC_METHOD(copyReferenceCount,(Lio/qt/QtObjectInterface;Ljava/lang/Class;Ljava/lang/String;Lio/qt/QtObjectInterface;)V) + QTJAMBI_REPOSITORY_DEFINE_STATIC_METHOD(setReferenceCount,(Lio/qt/QtObjectInterface;Ljava/lang/Class;Ljava/lang/String;ZZLjava/lang/Object;)V) + QTJAMBI_REPOSITORY_DEFINE_STATIC_METHOD(addAllReferenceCount,(Lio/qt/QtObjectInterface;Ljava/lang/Class;Ljava/lang/String;ZZLjava/util/Collection;)V) + QTJAMBI_REPOSITORY_DEFINE_STATIC_METHOD(addReferenceCount,(Lio/qt/QtObjectInterface;Ljava/lang/Class;Ljava/lang/String;ZZLjava/lang/Object;)V) + QTJAMBI_REPOSITORY_DEFINE_STATIC_METHOD(putReferenceCount,(Lio/qt/QtObjectInterface;Ljava/lang/Class;Ljava/lang/String;ZZLjava/lang/Object;Ljava/lang/Object;)V) + ) QTJAMBI_REPOSITORY_DEFINE_CLASS_SC(io/qt/internal,ReferenceUtility$RCList) QTJAMBI_REPOSITORY_DEFINE_CLASS_SC(io/qt/internal,ReferenceUtility$RCSet) QTJAMBI_REPOSITORY_DEFINE_CLASS_SC(io/qt/internal,ReferenceUtility$RCMap) diff --git a/src/cpp/QtJambi/java_p.h b/src/cpp/QtJambi/java_p.h index 3697fa1a..110a5468 100644 --- a/src/cpp/QtJambi/java_p.h +++ b/src/cpp/QtJambi/java_p.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef JAVA_P_H #define JAVA_P_H @@ -319,7 +350,7 @@ namespace Java{ QTJAMBI_REPOSITORY_DECLARE_STATIC_LONG_METHOD(nativeIdInterface) ) QTJAMBI_REPOSITORY_DECLARE_CLASS(NativeUtility$Object, - QTJAMBI_REPOSITORY_DECLARE_OBJECT_FIELD(nativeLink)) + QTJAMBI_REPOSITORY_DECLARE_OBJECT_FIELD(nativeLink)) QTJAMBI_REPOSITORY_DECLARE_CLASS(MetaTypeUtility, QTJAMBI_REPOSITORY_DECLARE_STATIC_VOID_METHOD(debugObject) QTJAMBI_REPOSITORY_DECLARE_STATIC_VOID_METHOD(writeSerializableJavaObject) @@ -367,7 +398,7 @@ namespace Java{ QTJAMBI_REPOSITORY_DECLARE_CLASS(ResourceUtility$JarResource, QTJAMBI_REPOSITORY_DECLARE_OBJECT_METHOD(getJarEntry) QTJAMBI_REPOSITORY_DECLARE_OBJECT_METHOD(getInputStream) - QTJAMBI_REPOSITORY_DECLARE_OBJECT_METHOD(fileTime) + QTJAMBI_REPOSITORY_DECLARE_LONG_METHOD(fileTime) QTJAMBI_REPOSITORY_DECLARE_STRING_METHOD(getName) QTJAMBI_REPOSITORY_DECLARE_INT_METHOD(getOrReopen) QTJAMBI_REPOSITORY_DECLARE_VOID_METHOD(put) diff --git a/src/cpp/QtJambi/javaapi.h b/src/cpp/QtJambi/javaapi.h index 369a9ec2..8fa36bf3 100644 --- a/src/cpp/QtJambi/javaapi.h +++ b/src/cpp/QtJambi/javaapi.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -773,6 +773,14 @@ QTJAMBI_REPOSITORY_DECLARE_EMPTY_CLASS(QtObject) QTJAMBI_REPOSITORY_DECLARE_CLASS(QtObjectInterface, QTJAMBI_REPOSITORY_DECLARE_VOID_METHOD(dispose) QTJAMBI_REPOSITORY_DECLARE_BOOLEAN_METHOD(isDisposed)) + +QTJAMBI_REPOSITORY_DECLARE_CLASS(ReferenceUtility, + QTJAMBI_REPOSITORY_DECLARE_STATIC_VOID_METHOD(setReferenceCount) + QTJAMBI_REPOSITORY_DECLARE_STATIC_VOID_METHOD(addAllReferenceCount) + QTJAMBI_REPOSITORY_DECLARE_STATIC_VOID_METHOD(addReferenceCount) + QTJAMBI_REPOSITORY_DECLARE_STATIC_VOID_METHOD(putReferenceCount) + QTJAMBI_REPOSITORY_DECLARE_STATIC_VOID_METHOD(copyReferenceCount) + ) } #ifdef Q_OS_ANDROID diff --git a/src/cpp/QtJambi/javaarrays.cpp b/src/cpp/QtJambi/javaarrays.cpp index f5889d49..94324402 100644 --- a/src/cpp/QtJambi/javaarrays.cpp +++ b/src/cpp/QtJambi/javaarrays.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/javaarrays.h b/src/cpp/QtJambi/javaarrays.h index 3ad9eab0..def05f17 100644 --- a/src/cpp/QtJambi/javaarrays.h +++ b/src/cpp/QtJambi/javaarrays.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/javabuffers.cpp b/src/cpp/QtJambi/javabuffers.cpp index 0053bf2d..c0b199a3 100644 --- a/src/cpp/QtJambi/javabuffers.cpp +++ b/src/cpp/QtJambi/javabuffers.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/javabuffers.h b/src/cpp/QtJambi/javabuffers.h index 50e118b2..6b47dced 100644 --- a/src/cpp/QtJambi/javabuffers.h +++ b/src/cpp/QtJambi/javabuffers.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/javainvalidate.cpp b/src/cpp/QtJambi/javainvalidate.cpp index b5999c27..2ef46938 100644 --- a/src/cpp/QtJambi/javainvalidate.cpp +++ b/src/cpp/QtJambi/javainvalidate.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/javainvalidate.h b/src/cpp/QtJambi/javainvalidate.h index 870a99b8..273ad476 100644 --- a/src/cpp/QtJambi/javainvalidate.h +++ b/src/cpp/QtJambi/javainvalidate.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/javastrings.cpp b/src/cpp/QtJambi/javastrings.cpp index 81e2a37f..9eb2d686 100644 --- a/src/cpp/QtJambi/javastrings.cpp +++ b/src/cpp/QtJambi/javastrings.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/javastrings.h b/src/cpp/QtJambi/javastrings.h index a8bcb70a..9a3fde74 100644 --- a/src/cpp/QtJambi/javastrings.h +++ b/src/cpp/QtJambi/javastrings.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/javautils.h b/src/cpp/QtJambi/javautils.h index 8525ef42..fc6e40ce 100644 --- a/src/cpp/QtJambi/javautils.h +++ b/src/cpp/QtJambi/javautils.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/jna.cpp b/src/cpp/QtJambi/jna.cpp index 177b87b2..62f05286 100644 --- a/src/cpp/QtJambi/jna.cpp +++ b/src/cpp/QtJambi/jna.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -40,9 +40,24 @@ #include "qtjambi_cast.h" Q_GLOBAL_STATIC_WITH_ARGS(QReadWriteLock, gPointerLock, (QReadWriteLock::Recursive)) -typedef QHash> ObjectsByFunctionPointer; +typedef QHash> ObjectsByFunctionPointer; Q_GLOBAL_STATIC(ObjectsByFunctionPointer, gObjectsByFunctionPointer) +void clearObjectsByFunctionPointerAtShutdown(JNIEnv* env){ + ObjectsByFunctionPointer objectsByFunctionPointer; + if(!gObjectsByFunctionPointer.isDestroyed()){ + QWriteLocker locker(gPointerLock()); + gObjectsByFunctionPointer->swap(objectsByFunctionPointer); + } + if(env){ + for(QList& objects : objectsByFunctionPointer){ + for(jobject o : objects){ + env->DeleteGlobalRef(o); + } + } + } +} + static int MAX_NARGS = 256; struct ffi_type { @@ -200,7 +215,7 @@ void convertArgumentList(QVector>& cleaners, QVector ); { QWriteLocker locker(gPointerLock()); - (*gObjectsByFunctionPointer())[quintptr(ptr)] << JObjectWrapper(__jni_env, val); + (*gObjectsByFunctionPointer())[quintptr(ptr)] << __jni_env->NewGlobalRef(val); } Java::QtCore::QFunctionPointerUtil$CppToJavaInvocationHandler::set_peer(__jni_env, ih, peer); Java::QtCore::QFunctionPointerUtil::registerCleanup(__jni_env, val, ih); @@ -1745,7 +1760,7 @@ jobject CoreAPI::invokeFunctionPointer(JNIEnv * __jni_env, QFunctionPointer __qt __ffi_type.elements = &element; void* ptr; bool isAllocated = false; -#ifdef Q_OS_WINDOWS +#if defined(Q_OS_WINDOWS)// && !defined(Q_PROCESSOR_ARM_64) && !defined(Q_PROCESSOR_ARM_32) __ffi_type.size += (__ffi_type.size % 8) + 1; ptr = operator new(__ffi_type.size); isAllocated = true; @@ -1826,10 +1841,10 @@ jobject CoreAPI::invokeFunctionPointer(JNIEnv * __jni_env, QFunctionPointer __qt { QReadLocker locker(gPointerLock()); if(gObjectsByFunctionPointer->contains(quintptr(fp))){ - QList& objects = (*gObjectsByFunctionPointer())[quintptr(fp)]; - for(JObjectWrapper& wrapper : objects){ - if(__jni_env->IsInstanceOf(wrapper.object(), returnClassType)){ - result = __jni_env->NewLocalRef(wrapper.object()); + QList& objects = (*gObjectsByFunctionPointer())[quintptr(fp)]; + for(jobject o : objects){ + if(__jni_env->IsInstanceOf(o, returnClassType)){ + result = __jni_env->NewLocalRef(o); resolved = true; } } @@ -1848,7 +1863,7 @@ jobject CoreAPI::invokeFunctionPointer(JNIEnv * __jni_env, QFunctionPointer __qt QtJambiLink::Ownership::Java ); QWriteLocker locker(gPointerLock()); - (*gObjectsByFunctionPointer())[quintptr(fp)] << JObjectWrapper(__jni_env, result); + (*gObjectsByFunctionPointer())[quintptr(fp)] << __jni_env->NewGlobalRef(result); } }else{ void* _ptr = ptr; @@ -2153,7 +2168,7 @@ jobject CoreAPI::convertFunctionPointerReturn(JNIEnv * __jni_env, jobject return ); { QWriteLocker locker(gPointerLock()); - (*gObjectsByFunctionPointer())[quintptr(fp)] << JObjectWrapper(__jni_env, result); + (*gObjectsByFunctionPointer())[quintptr(fp)] << __jni_env->NewGlobalRef(result); } Java::QtCore::QFunctionPointerUtil$CppToJavaInvocationHandler::set_peer(__jni_env, ih, peer); Java::QtCore::QFunctionPointerUtil::registerCleanup(__jni_env, result, ih); @@ -2956,10 +2971,10 @@ void CoreAPI::convertFunctionPointerParameters(JNIEnv * __jni_env, jobjectArray { QReadLocker locker(gPointerLock()); if(gObjectsByFunctionPointer->contains(quintptr(fp))){ - QList& objects = (*gObjectsByFunctionPointer())[quintptr(fp)]; - for(JObjectWrapper& wrapper : objects){ - if(__jni_env->IsInstanceOf(wrapper.object(), argClassType)){ - convertedValue = __jni_env->NewLocalRef(wrapper.object()); + QList& objects = (*gObjectsByFunctionPointer())[quintptr(fp)]; + for(jobject o : objects){ + if(__jni_env->IsInstanceOf(o, argClassType)){ + convertedValue = __jni_env->NewLocalRef(o); resolved = true; } } @@ -2978,7 +2993,7 @@ void CoreAPI::convertFunctionPointerParameters(JNIEnv * __jni_env, jobjectArray QtJambiLink::Ownership::Java ); QWriteLocker locker(gPointerLock()); - (*gObjectsByFunctionPointer())[quintptr(fp)] << JObjectWrapper(__jni_env, convertedValue); + (*gObjectsByFunctionPointer())[quintptr(fp)] << __jni_env->NewGlobalRef(convertedValue); } }else{ void* _ptr = ptr; @@ -3171,16 +3186,16 @@ jobject CoreAPI::castFunctionPointer(JNIEnv * env, jobject function, jclass func { QReadLocker locker(gPointerLock()); if(gObjectsByFunctionPointer->contains(quintptr(ptr))){ - QList& objects = (*gObjectsByFunctionPointer())[quintptr(ptr)]; - for(JObjectWrapper& wrapper : objects){ - if(env->IsInstanceOf(wrapper.object(), functionalInterface)) - return env->NewLocalRef(wrapper.object()); + QList& objects = (*gObjectsByFunctionPointer())[quintptr(ptr)]; + for(jobject o : objects){ + if(env->IsInstanceOf(o, functionalInterface)) + return env->NewLocalRef(o); } } } jobject result = QtJambiAPI::convertNativeToJavaObjectAsCopy(env, &ptr, *targetTypeId); QWriteLocker locker(gPointerLock()); - (*gObjectsByFunctionPointer())[quintptr(ptr)] << JObjectWrapper(env, result); + (*gObjectsByFunctionPointer())[quintptr(ptr)] << env->NewGlobalRef(result); return result; }else{ Java::Runtime::ClassCastException::throwNew(env, QStringLiteral("Unable to convert object of type %1 to function pointer.").arg(QtJambiAPI::getObjectClassName(env, function)) QTJAMBI_STACKTRACEINFO ); @@ -3214,10 +3229,10 @@ jobject CoreAPI::castFunctionPointer(JNIEnv * env, jobject function, jclass func { QReadLocker locker(gPointerLock()); if(gObjectsByFunctionPointer->contains(quintptr(ptr))){ - QList& objects = (*gObjectsByFunctionPointer())[quintptr(ptr)]; - for(JObjectWrapper& wrapper : objects){ - if(env->IsInstanceOf(wrapper.object(), functionalInterface)) - return env->NewLocalRef(wrapper.object()); + QList& objects = (*gObjectsByFunctionPointer())[quintptr(ptr)]; + for(jobject o : objects){ + if(env->IsInstanceOf(o, functionalInterface)) + return env->NewLocalRef(o); } } } @@ -3240,7 +3255,7 @@ jobject CoreAPI::castFunctionPointer(JNIEnv * env, jobject function, jclass func QtJambiLink::Ownership::Java ); QWriteLocker locker(gPointerLock()); - (*gObjectsByFunctionPointer())[quintptr(ptr)] << JObjectWrapper(env, result); + (*gObjectsByFunctionPointer())[quintptr(ptr)] << env->NewGlobalRef(result); return result; } }else{ @@ -3268,10 +3283,10 @@ jobject CoreAPI::castFunctionPointer(JNIEnv * env, jobject function, jclass func { QReadLocker locker(gPointerLock()); if(gObjectsByFunctionPointer->contains(quintptr(*ptr))){ - QList& objects = (*gObjectsByFunctionPointer())[quintptr(*ptr)]; - for(JObjectWrapper& wrapper : objects){ - if(env->IsInstanceOf(wrapper.object(), functionalInterface)) - return env->NewLocalRef(wrapper.object()); + QList& objects = (*gObjectsByFunctionPointer())[quintptr(*ptr)]; + for(jobject o : objects){ + if(env->IsInstanceOf(o, functionalInterface)) + return env->NewLocalRef(o); } } } @@ -3294,7 +3309,7 @@ jobject CoreAPI::castFunctionPointer(JNIEnv * env, jobject function, jclass func QtJambiLink::Ownership::Java ); QWriteLocker locker(gPointerLock()); - (*gObjectsByFunctionPointer())[quintptr(*ptr)] << JObjectWrapper(env, result); + (*gObjectsByFunctionPointer())[quintptr(*ptr)] << env->NewGlobalRef(result); return result; } } diff --git a/src/cpp/QtJambi/jni_classanalyser.cpp b/src/cpp/QtJambi/jni_classanalyser.cpp index 5302ae17..ca6b668a 100644 --- a/src/cpp/QtJambi/jni_classanalyser.cpp +++ b/src/cpp/QtJambi/jni_classanalyser.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/jni_deployer.cpp b/src/cpp/QtJambi/jni_deployer.cpp index 3cf60694..79d7f7cc 100644 --- a/src/cpp/QtJambi/jni_deployer.cpp +++ b/src/cpp/QtJambi/jni_deployer.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/jni_enum.cpp b/src/cpp/QtJambi/jni_enum.cpp index 65ba08f8..b0cf8574 100644 --- a/src/cpp/QtJambi/jni_enum.cpp +++ b/src/cpp/QtJambi/jni_enum.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/jni_metaobjecttools.cpp b/src/cpp/QtJambi/jni_metaobjecttools.cpp index 3a0e744b..7086e6ae 100644 --- a/src/cpp/QtJambi/jni_metaobjecttools.cpp +++ b/src/cpp/QtJambi/jni_metaobjecttools.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/jni_metatype.cpp b/src/cpp/QtJambi/jni_metatype.cpp index 67dc7778..f6e574b1 100644 --- a/src/cpp/QtJambi/jni_metatype.cpp +++ b/src/cpp/QtJambi/jni_metatype.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/jni_native.cpp b/src/cpp/QtJambi/jni_native.cpp index 52fcfd0c..de49f34e 100644 --- a/src/cpp/QtJambi/jni_native.cpp +++ b/src/cpp/QtJambi/jni_native.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/jni_nativepointer.cpp b/src/cpp/QtJambi/jni_nativepointer.cpp index 42112dfb..9a667bb6 100644 --- a/src/cpp/QtJambi/jni_nativepointer.cpp +++ b/src/cpp/QtJambi/jni_nativepointer.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/jni_reflection.cpp b/src/cpp/QtJambi/jni_reflection.cpp index ca5ddd77..63eb512e 100644 --- a/src/cpp/QtJambi/jni_reflection.cpp +++ b/src/cpp/QtJambi/jni_reflection.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/jni_signals.cpp b/src/cpp/QtJambi/jni_signals.cpp index 61dfbe98..de81a135 100644 --- a/src/cpp/QtJambi/jni_signals.cpp +++ b/src/cpp/QtJambi/jni_signals.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/jni_test.cpp b/src/cpp/QtJambi/jni_test.cpp index e00ba63e..75aaee87 100644 --- a/src/cpp/QtJambi/jni_test.cpp +++ b/src/cpp/QtJambi/jni_test.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/jni_utilities.cpp b/src/cpp/QtJambi/jni_utilities.cpp index 2b62d24f..c377f166 100644 --- a/src/cpp/QtJambi/jni_utilities.cpp +++ b/src/cpp/QtJambi/jni_utilities.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -32,7 +32,7 @@ #include "metainfo.h" #include #include -#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS)) && !defined(Q_OS_ANDROID) +#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS) || defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_SOLARIS)) && !defined(Q_OS_ANDROID) #include #include #include @@ -209,7 +209,7 @@ QTJAMBI_FUNCTION_PREFIX(Java_io_qt_QtUtilities_threadCheck)(JNIEnv *env, jclass, } } -#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS)) && !defined(Q_OS_ANDROID) +#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS) || defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_SOLARIS)) && !defined(Q_OS_ANDROID) #if defined(signals) #undef signals #endif @@ -229,7 +229,7 @@ struct SignalCache : public QtJambiObjectData{ extern "C" Q_DECL_EXPORT bool JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_QtUtilities_saveUnixSignalHandlers)(JNIEnv *env, jclass) { -#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS)) && !defined(Q_OS_ANDROID) +#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS) || defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_SOLARIS)) && !defined(Q_OS_ANDROID) try{ QThread* mainThread = QCoreApplicationPrivate::theMainThread.loadRelaxed(); if(!mainThread){ @@ -263,7 +263,7 @@ QTJAMBI_FUNCTION_PREFIX(Java_io_qt_QtUtilities_saveUnixSignalHandlers)(JNIEnv *e extern "C" Q_DECL_EXPORT bool JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_QtUtilities_restoreUnixSignalHandlers)(JNIEnv *env, jclass) { -#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS)) && !defined(Q_OS_ANDROID) +#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS) || defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_SOLARIS)) && !defined(Q_OS_ANDROID) try{ if(QThread* mainThread = QCoreApplicationPrivate::theMainThread.loadRelaxed()){ std::unique_ptr cache{nullptr}; diff --git a/src/cpp/QtJambi/jnienvironment.cpp b/src/cpp/QtJambi/jnienvironment.cpp index 4befaf6e..5271b13d 100644 --- a/src/cpp/QtJambi/jnienvironment.cpp +++ b/src/cpp/QtJambi/jnienvironment.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/jnienvironment.h b/src/cpp/QtJambi/jnienvironment.h index a6a7db7e..f3805338 100644 --- a/src/cpp/QtJambi/jnienvironment.h +++ b/src/cpp/QtJambi/jnienvironment.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/jobjectwrapper.cpp b/src/cpp/QtJambi/jobjectwrapper.cpp index adb9a04d..d9d318e6 100644 --- a/src/cpp/QtJambi/jobjectwrapper.cpp +++ b/src/cpp/QtJambi/jobjectwrapper.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -53,7 +53,7 @@ void reference_cleanup(jobject object){ try{ if(object && !QCoreApplication::closingDown()){ DEREF_JOBJECT; - if(DefaultJniEnvironment env{200}){ + if(DefaultJniEnvironment env{0}){ jthrowable throwable = nullptr; if(env->ExceptionCheck()){ throwable = env->ExceptionOccurred(); @@ -62,6 +62,7 @@ void reference_cleanup(jobject object){ (env->*Cleanup::DeleteRef)(typename Cleanup::RefType(object)); if(throwable){ env->Throw(throwable); + env->DeleteLocalRef(throwable); } } } @@ -1235,12 +1236,14 @@ JObjectArrayWrapper& JObjectArrayWrapper::operator=(JObjectArrayWrapper &&wrappe jsize JObjectArrayWrapper::length() const { if(JniEnvironment env{16}){ - return env->GetArrayLength(object()); + return object() ? env->GetArrayLength(object()) : 0; } return 0; } jobject JObjectArrayWrapper::at(JNIEnv *env, jsize index) const{ + if(!object()) + JavaException::raiseIndexOutOfBoundsException(env, QString::number(index) QTJAMBI_STACKTRACEINFO); jobject value = env->GetObjectArrayElement(object(), index); JavaException::check(env QTJAMBI_STACKTRACEINFO ); return value; @@ -1248,6 +1251,8 @@ jobject JObjectArrayWrapper::at(JNIEnv *env, jsize index) const{ JObjectWrapper JObjectArrayWrapper::operator[](jsize index) const{ if(JniEnvironment env{500}){ + if(!object()) + JavaException::raiseIndexOutOfBoundsException(env, QString::number(index) QTJAMBI_STACKTRACEINFO); jobject value = env->GetObjectArrayElement(object(), index); JavaException::check(env QTJAMBI_STACKTRACEINFO ); return JObjectWrapper(env, value); @@ -1257,7 +1262,7 @@ JObjectWrapper JObjectArrayWrapper::operator[](jsize index) const{ JObjectWrapperRef JObjectArrayWrapper::operator[](jsize index){ if(JniEnvironment env{500}){ - if(index>=0 && index < env->GetArrayLength(object())){ + if(index>=0 && object() && index < env->GetArrayLength(object())){ return JObjectWrapperRef(*this, index); }else{ JavaException::raiseIndexOutOfBoundsException(env, QString::number(index) QTJAMBI_STACKTRACEINFO); @@ -1271,7 +1276,7 @@ QString JObjectArrayWrapper::toString(bool * ok) const{ *ok = true; QString result = QLatin1String("["); if(JniEnvironment env{500}){ - jsize length = env->GetArrayLength(object()); + jsize length = object() ? env->GetArrayLength(object()) : 0; for(jsize i=0; i0) result += QLatin1String(","); diff --git a/src/cpp/QtJambi/jobjectwrapper.h b/src/cpp/QtJambi/jobjectwrapper.h index 1984bd06..ce7ac6d4 100644 --- a/src/cpp/QtJambi/jobjectwrapper.h +++ b/src/cpp/QtJambi/jobjectwrapper.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/messagehandler.cpp b/src/cpp/QtJambi/messagehandler.cpp index 8b3ca8db..019b0cee 100644 --- a/src/cpp/QtJambi/messagehandler.cpp +++ b/src/cpp/QtJambi/messagehandler.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -37,7 +37,7 @@ Q_GLOBAL_STATIC(QReadWriteLock, gMessageHandlerLock) Q_GLOBAL_STATIC(QSet, gEnabledMessages) -Q_GLOBAL_STATIC(JObjectWrapper, gMessageHandler) +Q_GLOBAL_STATIC(jobject, gMessageHandler) static bool messageHandlerInstalled = false; void qtjambi_messagehandler_proxy(QtMsgType type, const QMessageLogContext & context, const QString & message) @@ -51,7 +51,7 @@ void qtjambi_messagehandler_proxy(QtMsgType type, const QMessageLogContext & con jobject msgType = qtjambi_cast(env, type); jobject _context = qtjambi_cast(env, &context); jobject msg = qtjambi_cast(env, message); - Java::QtCore::QtMessageHandler::accept(env, gMessageHandler->object(), msgType, _context, msg); + Java::QtCore::QtMessageHandler::accept(env, *gMessageHandler, msgType, _context, msg); InvalidateAfterUse::invalidate(env, _context); }catch(const JavaException& exn){ __exnHandler.handle(env, exn, nullptr); @@ -91,7 +91,7 @@ jobject CoreAPI::installMessageHandler(JNIEnv *env, jobject supportedMessageType } messageHandlerInstalled = handler!=nullptr; QtMessageHandler oldHandler; - jobject result; + jobject result{nullptr}; if(gEnabledMessages->size()==5){ QtMessageHandler messageHandler = qtjambi_cast(env, handler, "QtMessageHandler"); oldHandler = qInstallMessageHandler(messageHandler); @@ -102,20 +102,26 @@ jobject CoreAPI::installMessageHandler(JNIEnv *env, jobject supportedMessageType link->setCppOwnership(env); } if(oldHandler==&qtjambi_messagehandler_proxy){ - result = env->NewLocalRef(gMessageHandler->object()); - *gMessageHandler = JObjectWrapper(); + if(*gMessageHandler){ + result = env->NewLocalRef(*gMessageHandler); + env->DeleteGlobalRef(*gMessageHandler); + *gMessageHandler = nullptr; + } }else{ result = qtjambi_cast(env, oldHandler); } }else{ - *gMessageHandler = JObjectWrapper(env, handler); + if(*gMessageHandler){ + env->DeleteGlobalRef(*gMessageHandler); + *gMessageHandler = nullptr; + } + *gMessageHandler = env->NewGlobalRef(handler); oldHandler = qInstallMessageHandler(&qtjambi_messagehandler_proxy); if(oldHandler==&qtjambi_messagehandler_proxy){ - result = env->NewLocalRef(gMessageHandler->object()); + result = handler; }else{ result = qtjambi_cast(env, oldHandler); } - *gMessageHandler = JObjectWrapper(env, handler); } if (QSharedPointer link = QtJambiLink::findLinkForJavaInterface(env, result)) { if(link->isShell() && link->ownership()!=QtJambiLink::Ownership::Java) @@ -131,12 +137,15 @@ void clearMessageHandlerAtShutdown(JNIEnv *env){ gEnabledMessages->clear(); QtMessageHandler oldHandler = qInstallMessageHandler(nullptr); if(oldHandler==&qtjambi_messagehandler_proxy){ - jobject result = env->NewLocalRef(gMessageHandler->object()); - *gMessageHandler = JObjectWrapper(); messageHandlerInstalled = false; - if (QSharedPointer link = QtJambiLink::findLinkForJavaInterface(env, result)) { - if(link->isShell() && link->ownership()!=QtJambiLink::Ownership::Java) - link->setJavaOwnership(env); + if(*gMessageHandler){ + jobject result = env->NewLocalRef(*gMessageHandler); + env->DeleteGlobalRef(*gMessageHandler); + *gMessageHandler = nullptr; + if (QSharedPointer link = QtJambiLink::findLinkForJavaInterface(env, result)) { + if(link->isShell() && link->ownership()!=QtJambiLink::Ownership::Java) + link->setJavaOwnership(env); + } } } } diff --git a/src/cpp/QtJambi/metainfo.cpp b/src/cpp/QtJambi/metainfo.cpp index 6f213152..7827a6f2 100644 --- a/src/cpp/QtJambi/metainfo.cpp +++ b/src/cpp/QtJambi/metainfo.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/metainfo.h b/src/cpp/QtJambi/metainfo.h index b12a0e0e..e5a16322 100644 --- a/src/cpp/QtJambi/metainfo.h +++ b/src/cpp/QtJambi/metainfo.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/objectdata.cpp b/src/cpp/QtJambi/objectdata.cpp index d5219d22..bb804b73 100644 --- a/src/cpp/QtJambi/objectdata.cpp +++ b/src/cpp/QtJambi/objectdata.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/paint.cpp b/src/cpp/QtJambi/paint.cpp index 8ce0dfcc..e53a93ee 100644 --- a/src/cpp/QtJambi/paint.cpp +++ b/src/cpp/QtJambi/paint.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/paint.h b/src/cpp/QtJambi/paint.h index 9d058400..f133f278 100644 --- a/src/cpp/QtJambi/paint.h +++ b/src/cpp/QtJambi/paint.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/plugin.cpp b/src/cpp/QtJambi/plugin.cpp index 93e7a73e..42867f6b 100644 --- a/src/cpp/QtJambi/plugin.cpp +++ b/src/cpp/QtJambi/plugin.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -115,7 +115,9 @@ QObject* createPluginInstance(QueryMetadata qt_plugin_query_metadata){ QJsonObject pluginMetaData; if (err.error == QCborError::NoError && metadata.isMap()) { QCborValue cbClassName = metadata[qint64(QtPluginMetaDataKeys::ClassName)]; - QCborValue cbPluginName = metadata[qint64(0x0CAFEBABE0L)]; + QCborValue cbPluginName = metadata[qint64(0x0CAFE0L)]; + if(cbPluginName.isInvalid()) + cbPluginName = metadata[qint64(0x0CAFEBABE0L)]; QString className = cbClassName.toString().replace("::", "."); QString pluginName = cbPluginName.toString(); if(JniEnvironment env{500}){ @@ -132,60 +134,20 @@ QObject* createPluginInstance(QueryMetadata qt_plugin_query_metadata){ return nullptr; } -typedef QHash JarimportHash; -Q_GLOBAL_STATIC(JarimportHash, gJarimports) -Q_GLOBAL_STATIC_WITH_ARGS(QReadWriteLock, gJarimportsLock, (QReadWriteLock::Recursive)) - -void clearJarImportersAtShutdown(JNIEnv *){ - QHash jarimports; - if(!gJarimports.isDestroyed()){ - QWriteLocker wlocker(gJarimportsLock()); - gJarimports->swap(jarimports); - } - for(QObject* o : jarimports.values()){ - if(!o->thread() || o->thread()==QThread::currentThread()) - delete o; - else - o->deleteLater(); - } - jarimports.clear(); -} - QObject* createJarImport(QueryMetadata ptr){ - quintptr val = quintptr(ptr); - if(!gJarimports.isDestroyed()){ - QObject* result; - { - QReadLocker rlocker(gJarimportsLock()); - result = gJarimports->value(val); - } - if(!result){ - QString path = getFunctionLibraryPath(reinterpret_cast(ptr)); - if(JniEnvironment env{300}){ - try{ - jobject obj = Java::QtQml::Internal::QmlTypes$JarImport::newInstance(env, qtjambi_cast(env, path)); - if(QSharedPointer link = QtJambiLink::findLinkForJavaObject(env, obj)){ - if(link->isQObject()){ - link->setCppOwnership(env); - result = link->qobject(); - { - QWriteLocker wlocker(gJarimportsLock()); - QObject* _result = gJarimports->value(val); - if(_result){ - delete result; - return _result; - }else{ - gJarimports->insert(val, result); - } - } - } - } - }catch(const JavaException& exn){ - exn.report(env); + QString path = getFunctionLibraryPath(reinterpret_cast(ptr)); + if(JniEnvironment env{300}){ + try{ + jobject obj = Java::QtQml::Internal::QmlTypes$JarImport::newInstance(env, qtjambi_cast(env, path)); + if(QSharedPointer link = QtJambiLink::findLinkForJavaObject(env, obj)){ + if(link->isQObject()){ + link->setCppOwnership(env); + return link->qobject(); } } + }catch(const JavaException& exn){ + exn.report(env); } - return result; } return nullptr; } diff --git a/src/cpp/QtJambi/qmlapi.cpp b/src/cpp/QtJambi/qmlapi.cpp index ae38ddef..62d3df9c 100644 --- a/src/cpp/QtJambi/qmlapi.cpp +++ b/src/cpp/QtJambi/qmlapi.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qmlapi.h b/src/cpp/QtJambi/qmlapi.h index 0d6df1a8..2124bd2f 100644 --- a/src/cpp/QtJambi/qmlapi.h +++ b/src/cpp/QtJambi/qmlapi.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -40,8 +40,12 @@ namespace QmlAPI{ typedef void (*QmlReportDestruction)(QObject * obj); +typedef bool (*QmlIsJavaScriptOwnership)(QObject * obj); + QTJAMBI_EXPORT void setQmlReportDestruction(QmlReportDestruction fct); +QTJAMBI_EXPORT void setQmlIsJavaScriptOwnership(QmlIsJavaScriptOwnership fct); + typedef QObject* (* CreateQmlErrorDummyObject) (const QMetaObject* metaObject, void* placement, int vsCast, int viCast); QTJAMBI_EXPORT void registerCreateQmlErrorDummyObjectFunction(CreateQmlErrorDummyObject createQmlErrorDummyObject); diff --git a/src/cpp/QtJambi/qtjambi_cast.h b/src/cpp/QtJambi/qtjambi_cast.h index c779a287..26b100ef 100644 --- a/src/cpp/QtJambi/qtjambi_cast.h +++ b/src/cpp/QtJambi/qtjambi_cast.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_array.h b/src/cpp/QtJambi/qtjambi_cast_array.h index 303532a9..cad18a82 100644 --- a/src/cpp/QtJambi/qtjambi_cast_array.h +++ b/src/cpp/QtJambi/qtjambi_cast_array.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_impl.h b/src/cpp/QtJambi/qtjambi_cast_impl.h index 721cb033..779c333f 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_arithmetic.h b/src/cpp/QtJambi/qtjambi_cast_impl_arithmetic.h index 8813c63c..4d286798 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_arithmetic.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_arithmetic.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_array.h b/src/cpp/QtJambi/qtjambi_cast_impl_array.h index 9f31c2aa..5acefcf2 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_array.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_array.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_container_associative.h b/src/cpp/QtJambi/qtjambi_cast_impl_container_associative.h index 322a01a2..06de3982 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_container_associative.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_container_associative.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_container_iterator.h b/src/cpp/QtJambi/qtjambi_cast_impl_container_iterator.h index 84b91209..ecebb792 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_container_iterator.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_container_iterator.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef QTJAMBI_CAST_IMPL_CONTAINER_ITERATOR_H #define QTJAMBI_CAST_IMPL_CONTAINER_ITERATOR_H diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_container_sequential.h b/src/cpp/QtJambi/qtjambi_cast_impl_container_sequential.h index 1217370f..ae5f0483 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_container_sequential.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_container_sequential.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_enum.h b/src/cpp/QtJambi/qtjambi_cast_impl_enum.h index 60ed47f8..7ec5fc60 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_enum.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_enum.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_jnitype.h b/src/cpp/QtJambi/qtjambi_cast_impl_jnitype.h index 51a841cf..518a776a 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_jnitype.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_jnitype.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_smartpointer.h b/src/cpp/QtJambi/qtjambi_cast_impl_smartpointer.h index a412d47f..62ae0382 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_smartpointer.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_smartpointer.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_template1.h b/src/cpp/QtJambi/qtjambi_cast_impl_template1.h index c4d84276..1436e7a7 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_template1.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_template1.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -1562,7 +1562,6 @@ struct qtjambi_jnitype_template1_cast to %1.").arg(QLatin1String(QtJambiAPI::typeName(typeid(NativeType)))) QTJAMBI_STACKTRACEINFO ); }else{ QString baseType = QLatin1String(QtJambiAPI::typeName(typeid(*base))); -#if defined(Q_OS_ANDROID) if(baseType==QLatin1String("QFutureInterface") || baseType==QLatin1String("QFutureInterface_shell")){ QFutureInterface* futureInterface = reinterpret_cast*>(base); @@ -1577,9 +1576,7 @@ struct qtjambi_jnitype_template1_castsetFuture(QFuture(futureInterface)); return _watcher; - }else -#endif - if(baseType==QLatin1String("QFutureInterfaceBase") + }else if(baseType==QLatin1String("QFutureInterfaceBase") || baseType==QLatin1String("QFutureInterfaceBase_shell")){ JavaException::raiseIllegalArgumentException(env, QStringLiteral("Cannot cast QFutureWatcher to %1.").arg(QLatin1String(QtJambiAPI::typeName(typeid(NativeType)))) QTJAMBI_STACKTRACEINFO ); }else if(baseType.startsWith(QLatin1String("QFutureInterface<"))){ @@ -1667,7 +1664,6 @@ struct qtjambi_jnitype_template1_cast") || baseType==QLatin1String("QFutureInterface_shell")){ QFutureInterface* futureInterface = reinterpret_cast*>(base); @@ -1680,9 +1676,7 @@ struct qtjambi_jnitype_template1_cast").arg(QLatin1String(QtJambiAPI::typeName(typeid(T))))){ return *reinterpret_cast*>(promisePtr); - }else -#endif - if(baseType==QLatin1String("QFutureInterfaceBase") + }else if(baseType==QLatin1String("QFutureInterfaceBase") || baseType==QLatin1String("QFutureInterfaceBase_shell")){ JavaException::raiseIllegalArgumentException(env, QStringLiteral("Cannot cast QPromise to %1.").arg(QLatin1String(QtJambiAPI::typeName(typeid(QPromise)))) QTJAMBI_STACKTRACEINFO ); }else if(baseType.startsWith(QLatin1String("QFutureInterface<"))){ @@ -1719,7 +1713,6 @@ struct qtjambi_jnitype_template1_cast") || baseType==QLatin1String("QFutureInterface_shell")){ QFutureInterface* futureInterface = reinterpret_cast*>(base); @@ -1736,9 +1729,7 @@ struct qtjambi_jnitype_template1_cast* promiseContent = reinterpret_cast*>(promise); scope->addDeletion(promiseContent); return *promise; - }else -#endif - if(baseType==QLatin1String("QFutureInterfaceBase") + }else if(baseType==QLatin1String("QFutureInterfaceBase") || baseType==QLatin1String("QFutureInterfaceBase_shell")){ JavaException::raiseIllegalArgumentException(env, QStringLiteral("Cannot cast QPromise to %1.").arg(QLatin1String(QtJambiAPI::typeName(typeid(QPromise)))) QTJAMBI_STACKTRACEINFO ); }else if(baseType.startsWith(QLatin1String("QFutureInterface<"))){ @@ -1905,7 +1896,6 @@ struct qtjambi_jnitype_template1_cast::cast(env, futureInterface, nullptr, scope); QFutureInterface* future = dynamic_cast*>(base); -#if defined(Q_OS_ANDROID) if(!future){ QString baseType = QLatin1String(QtJambiAPI::typeName(typeid(*base))); if(baseType==QLatin1String("QFutureInterface") @@ -1913,7 +1903,6 @@ struct qtjambi_jnitype_template1_cast*>(base); } } -#endif QFutureInterface tpromise = convert_future_interface(future, "QFuture"); QFuture ft = tpromise.future(); return create_container_pointer::create(env, scope, &ft); diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_template2.h b/src/cpp/QtJambi/qtjambi_cast_impl_template2.h index f902095b..fb9cca4e 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_template2.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_template2.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_template3.h b/src/cpp/QtJambi/qtjambi_cast_impl_template3.h index 4f2ddd35..3b02081b 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_template3.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_template3.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_template4.h b/src/cpp/QtJambi/qtjambi_cast_impl_template4.h index f6e35917..2fccedb4 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_template4.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_template4.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_template5.h b/src/cpp/QtJambi/qtjambi_cast_impl_template5.h index 76483b40..2d63bb82 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_template5.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_template5.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef QTJAMBI_CAST_IMPL_TEMPLATE5_H #define QTJAMBI_CAST_IMPL_TEMPLATE5_H diff --git a/src/cpp/QtJambi/qtjambi_cast_impl_util.h b/src/cpp/QtJambi/qtjambi_cast_impl_util.h index cc69ef74..ada86fa4 100644 --- a/src/cpp/QtJambi/qtjambi_cast_impl_util.h +++ b/src/cpp/QtJambi/qtjambi_cast_impl_util.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_cast_type_p.h b/src/cpp/QtJambi/qtjambi_cast_type_p.h index 559ffb94..15f5de24 100644 --- a/src/cpp/QtJambi/qtjambi_cast_type_p.h +++ b/src/cpp/QtJambi/qtjambi_cast_type_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_functionpointer2.h b/src/cpp/QtJambi/qtjambi_functionpointer2.h index 3777ce71..5d10c664 100644 --- a/src/cpp/QtJambi/qtjambi_functionpointer2.h +++ b/src/cpp/QtJambi/qtjambi_functionpointer2.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambi_pch.h b/src/cpp/QtJambi/qtjambi_pch.h index adcb6174..41c835c0 100644 --- a/src/cpp/QtJambi/qtjambi_pch.h +++ b/src/cpp/QtJambi/qtjambi_pch.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambiapi.cpp b/src/cpp/QtJambi/qtjambiapi.cpp index 56da44d7..2fbec525 100644 --- a/src/cpp/QtJambi/qtjambiapi.cpp +++ b/src/cpp/QtJambi/qtjambiapi.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -498,7 +498,7 @@ bool enabledDanglingPointerCheck(JNIEnv * env){ return b; } -#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS)) && !defined(Q_OS_ANDROID) +#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS) || defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_SOLARIS)) && !defined(Q_OS_ANDROID) #include #include @@ -512,7 +512,7 @@ struct bad_typeid : std::bad_typeid{ const std::type_info* checkedGetTypeInfo(TypeInfoSupplier typeInfoSupplier, const void* ptr){ Q_ASSERT(typeInfoSupplier); -#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS)) && !defined(Q_OS_ANDROID) +#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS) || defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_SOLARIS)) && !defined(Q_OS_ANDROID) static QThreadStorage isSigSegv; struct sigaction sa; struct sigaction sa_old; @@ -599,7 +599,7 @@ const std::type_info* checkedGetTypeInfo(TypeInfoSupplier typeInfoSupplier, cons const std::type_info* tryGetTypeInfo(JNIEnv *env, TypeInfoSupplier typeInfoSupplier, const void* ptr){ Q_ASSERT(typeInfoSupplier); -#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS)) && !defined(Q_OS_ANDROID) +#if (defined(Q_OS_LINUX) || defined(Q_OS_MACOS) || defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_SOLARIS)) && !defined(Q_OS_ANDROID) if(enabledDanglingPointerCheck(env)){ return checkedGetTypeInfo(typeInfoSupplier, ptr); } @@ -1274,6 +1274,8 @@ void QtJambiAPI::setQQmlListPropertyElementType(JNIEnv *env, jobject list, jobje #if defined(Q_CC_CLANG) # define COMPILERS_NAME __VERSION__ +#elif defined(Q_CC_GHS) +# define COMPILER_STRING "GHS " QT_STRINGIFY(__GHS_VERSION_NUMBER) #elif defined(Q_CC_GNU) # define COMPILERS_NAME "GCC " __VERSION__ #elif defined(Q_CC_MSVC) @@ -1297,8 +1299,70 @@ void QtJambiAPI::setQQmlListPropertyElementType(JNIEnv *env, jobject list, jobje # define DEBUG_STRING "debug" #endif +#if defined(Q_PROCESSOR_ARM_64) +# define ARCH_PROCESSOR "arm64" +#elif defined(Q_PROCESSOR_ARM_32) +# define ARCH_PROCESSOR "arm" +#elif defined(Q_PROCESSOR_X86_32) +# define ARCH_PROCESSOR "i386" +#elif defined(Q_PROCESSOR_X86_64) +# define ARCH_PROCESSOR "x86_64" +#else +# define ARCH_PROCESSOR "unknown" +#endif + +#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN +# define ARCH_ENDIANNESS "little_endian" +#elif Q_BYTE_ORDER == Q_BIG_ENDIAN +# define ARCH_ENDIANNESS "big_endian" +#endif + +#if defined(Q_OS_WIN64) +# define ARCH_POINTER "llp64" +#elif defined(__LP64__) || QT_POINTER_SIZE - 0 == 8 +# define ARCH_POINTER "lp64" +#else +# define ARCH_POINTER "ilp32" +#endif + +#ifdef QT_COORD_TYPE_STRING +# define ARCH_COORD_TYPE "-qreal_" QT_COORD_TYPE_STRING +#else +# define ARCH_COORD_TYPE "" +#endif + +#if defined(__ARM_EABI__) || defined(__mips_eabi) +# define ARCH_ABI1 "-eabi" +#elif defined(_MIPS_SIM) +# if _MIPS_SIM == _ABIO32 +# define ARCH_ABI1 "-o32" +# elif _MIPS_SIM == _ABIN32 +# define ARCH_ABI1 "-n32" +# elif _MIPS_SIM == _ABI64 +# define ARCH_ABI1 "-n64" +# elif _MIPS_SIM == _ABIO64 +# define ARCH_ABI1 "-o64" +# endif +#else +# define ARCH_ABI1 "" +#endif +#if defined(__ARM_PCS_VFP) || defined(__mips_hard_float) +// Use "-hardfloat" for platforms that usually have no FPUs +// (and for the platforms which had "-hardfloat" before we established the rule) +# define ARCH_ABI2 "-hardfloat" +#elif defined(_SOFT_FLOAT) +// Use "-softfloat" for architectures that usually have FPUs +# define ARCH_ABI2 "-softfloat" +#else +# define ARCH_ABI2 "" +#endif + +#define ARCH_ABI ARCH_ABI1 ARCH_ABI2 + +#define ARCH_FULL ARCH_PROCESSOR "-" ARCH_ENDIANNESS "-" ARCH_POINTER ARCH_COORD_TYPE ARCH_ABI + QTJAMBI_EXPORT const char* qtjambi_build(){ - return "QtJambi " CONCAT(QT_VERSION_MAJOR, QT_VERSION_MINOR, QTJAMBI_PATCH_VERSION) " (" DEBUG_STRING " build; by " COMPILERS_NAME ")"; + return "QtJambi " CONCAT(QT_VERSION_MAJOR, QT_VERSION_MINOR, QTJAMBI_PATCH_VERSION) " (" ARCH_FULL " " DEBUG_STRING " build; by " COMPILERS_NAME ")"; } namespace PrivateFields{ @@ -1358,14 +1422,16 @@ void QtJambiAPI::registerDependency(JNIEnv *env, jobject dependentObject, QtJamb } return [](JNIEnv *, jobject, const QSharedPointer&){}; }(env); - JObjectWrapper _dependentObject(env, dependentObject, false); - _ownerLink->addFinalization([_dependentObject](JNIEnv* _env){ - jobject buffer = _env->NewLocalRef(_dependentObject.object()); - if(!_env->IsSameObject(buffer, nullptr)){ - truncateBuffer(_env, buffer); - _env->DeleteLocalRef(buffer); - } - }); + _ownerLink->addFinalization(env->NewWeakGlobalRef(dependentObject), + [](JNIEnv* _env, void* data){ + jobject buffer = _env->NewLocalRef(reinterpret_cast(data)); + if(!_env->IsSameObject(buffer, nullptr)){ + truncateBuffer(_env, buffer); + _env->DeleteLocalRef(buffer); + } + }, [](JNIEnv* _env, void* data){ + _env->DeleteWeakGlobalRef(reinterpret_cast(data)); + }); directByteBufferConnector(env, dependentObject, _ownerLink); } } diff --git a/src/cpp/QtJambi/qtjambiapi.h b/src/cpp/QtJambi/qtjambiapi.h index 25500f0b..ce965bbe 100644 --- a/src/cpp/QtJambi/qtjambiapi.h +++ b/src/cpp/QtJambi/qtjambiapi.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambilink.cpp b/src/cpp/QtJambi/qtjambilink.cpp index ed9983f9..a20f94fb 100644 --- a/src/cpp/QtJambi/qtjambilink.cpp +++ b/src/cpp/QtJambi/qtjambilink.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -2861,7 +2861,7 @@ DependencyManagerUserData::DependencyManagerUserData() : QtJambiObjectData() { DependencyManagerUserData::~DependencyManagerUserData(){ QSet> dependentObjects; - QList> finalizations; + QHash> finalizations; { QWriteLocker locker(QtJambiLinkUserData::lock()); dependentObjects.swap(m_dependentObjects); @@ -2876,7 +2876,7 @@ DependencyManagerUserData::~DependencyManagerUserData(){ void DependencyManagerUserData::clear(JNIEnv* env){ QSet> dependentObjects; - QList> finalizations; + QHash> finalizations; { QWriteLocker locker(QtJambiLinkUserData::lock()); dependentObjects.swap(m_dependentObjects); @@ -2885,15 +2885,17 @@ void DependencyManagerUserData::clear(JNIEnv* env){ clear(env, dependentObjects, finalizations); } -void DependencyManagerUserData::clear(JNIEnv* env, QSet>& dependentObjects, QList>& finalizations){ +void DependencyManagerUserData::clear(JNIEnv* env, QSet>& dependentObjects, QHash>& finalizations){ for(const QWeakPointer& weakLink : qAsConst(dependentObjects)){ if(QSharedPointer link = weakLink.toStrongRef()){ link->invalidate(env); } } dependentObjects.clear(); - for(const std::function& f : qAsConst(finalizations)){ - f(env); + for(auto iter = finalizations.constKeyValueBegin(); iter!=finalizations.constKeyValueEnd(); ++iter){ + iter->second.first(env, iter->first); + if(iter->second.second) + iter->second.second(env, iter->first); } finalizations.clear(); } @@ -2928,8 +2930,15 @@ void DependencyManagerUserData::removeDependentObject(const QSharedPointer&& finalization){ - m_finalizations << std::move(finalization); +void DependencyManagerUserData::addFinalization(void* data, FinalizationExecutor executor, FinalizationDeleter deleter){ + m_finalizations[data] = {executor, deleter}; +} + +void DependencyManagerUserData::removeFinalization(JNIEnv* env, void* data){ + QPair fun = m_finalizations[data]; + if(m_finalizations.remove(data) && fun.second){ + fun.second(env, data); + } } bool DependencyManagerUserData::hasDependencies() const{ @@ -2954,7 +2963,7 @@ DependencyManagerUserData* DependencyManagerUserData::instance(const QObject* ob Q_GLOBAL_STATIC_WITH_ARGS(QReadWriteLock, gDependencyLock, (QReadWriteLock::Recursive)) typedef QMultiHash, QWeakPointer> DependencyHash; Q_GLOBAL_STATIC(DependencyHash, gDependencies) -typedef QMultiHash, std::function> FinalizationHash; +typedef QHash, QHash>> FinalizationHash; Q_GLOBAL_STATIC(FinalizationHash, gFinalizations) void QtJambiLink::registerDependentObject(const QObject* object, const QSharedPointer& link){ @@ -2981,23 +2990,24 @@ void QtJambiLink::unregisterDependentObject(const QObject* object, const QShared } } -void QtJambiLink::addFinalization(const QObject* object, std::function&& finalization){ +void QtJambiLink::addFinalization(const QObject* object, void* data, FinalizationExecutor executor, FinalizationDeleter deleter){ if(object){ if(DependencyManagerUserData* dm = DependencyManagerUserData::instance(object)){ - dm->addFinalization(std::move(finalization)); + dm->addFinalization(data, executor, deleter); } } } -void QtJambiLink::addFinalization(std::function&& finalization){ +void QtJambiLink::addFinalization(void* data, FinalizationExecutor executor, FinalizationDeleter deleter){ if(isQObject()){ - addFinalization(qobject(), std::move(finalization)); + addFinalization(qobject(), data, executor, deleter); }else{ if(!m_flags.testFlag(Flag::HasDependencies)) m_flags.setFlag(Flag::HasDependencies); QWriteLocker locker(gDependencyLock()); Q_UNUSED(locker) - gFinalizations->insert(m_this, std::move(finalization)); + QHash>& container = (*gFinalizations)[m_this]; + container[data] = {executor, deleter}; } } @@ -3049,13 +3059,13 @@ void QtJambiLink::invalidateDependentObjects(JNIEnv *env) }else{ if(m_flags.testFlag(Flag::HasDependencies)){ QList> dependentObjects; - QList> finalizations; + QHash> finalizations; { QWriteLocker locker(gDependencyLock()); Q_UNUSED(locker) dependentObjects = gDependencies->values(m_this); gDependencies->remove(m_this); - finalizations = gFinalizations->values(m_this); + finalizations = (*gFinalizations)[m_this]; gFinalizations->remove(m_this); } for(const QWeakPointer& weakLink : qAsConst(dependentObjects)){ @@ -3063,8 +3073,10 @@ void QtJambiLink::invalidateDependentObjects(JNIEnv *env) link->invalidate(env); } } - for(const std::function& f : qAsConst(finalizations)){ - f(env); + for(auto iter = finalizations.constKeyValueBegin(); iter!=finalizations.constKeyValueEnd(); ++iter){ + iter->second.first(env, iter->first); + if(iter->second.second) + iter->second.second(env, iter->first); } } } diff --git a/src/cpp/QtJambi/qtjambilink_p.h b/src/cpp/QtJambi/qtjambilink_p.h index 8b4fc9f4..a7151333 100644 --- a/src/cpp/QtJambi/qtjambilink_p.h +++ b/src/cpp/QtJambi/qtjambilink_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -92,6 +92,8 @@ enum class AquireSources : quint8 { #define LINK_NAME_META_TYPE_ARG(META_TYPE) #endif +typedef void (*FinalizationExecutor)(JNIEnv* env, void* data); +typedef void (*FinalizationDeleter)(JNIEnv* env, void* data); class SuperTypeInfos; @@ -131,16 +133,17 @@ struct DependencyManagerUserData : public QtJambiObjectData ~DependencyManagerUserData() override; void addDependentObject(const QSharedPointer& dependent); void removeDependentObject(const QSharedPointer& dependent); - void addFinalization(std::function&& finalization); + void addFinalization(void* data, FinalizationExecutor executor, FinalizationDeleter deleter); + void removeFinalization(JNIEnv* env, void* data); bool hasDependencies() const; void clear(JNIEnv* env); static DependencyManagerUserData* instance(const QObject* object, bool forceConstruction = true); QTJAMBI_OBJECTUSERDATA_ID_DECL private: Q_DISABLE_COPY_MOVE(DependencyManagerUserData) - void clear(JNIEnv* env, QSet>& dependentObjects, QList>& finalizations); + void clear(JNIEnv* env, QSet>& dependentObjects, QHash>& finalizations); QSet> m_dependentObjects; - QList> m_finalizations; + QHash> m_finalizations; }; class DependentLink{ @@ -471,11 +474,13 @@ class QtJambiLink{ virtual void* typedPointer(const std::type_info& qtType) const; void registerDependentObject(const QSharedPointer& link); - void addFinalization(std::function&& finalization); + void addFinalization(void* data, FinalizationExecutor executor, FinalizationDeleter deleter); + void removeFinalization(void* data); void unregisterDependentObject(const QSharedPointer& link); static void registerDependentObject(const QObject* object, const QSharedPointer& link); static void unregisterDependentObject(const QObject* object, const QSharedPointer& link); - static void addFinalization(const QObject* object, std::function&& finalization); + static void addFinalization(const QObject* object, void* data, FinalizationExecutor executor, FinalizationDeleter deleter); + static void removeFinalization(const QObject* object, void* data); #if defined(QTJAMBI_DEBUG_TOOLS) || defined(QTJAMBI_LINK_NAME) || !defined(QT_NO_DEBUG) const char* qtTypeName() const; diff --git a/src/cpp/QtJambi/qtjambimetaobject.cpp b/src/cpp/QtJambi/qtjambimetaobject.cpp index 0181d494..7ea8a5ef 100644 --- a/src/cpp/QtJambi/qtjambimetaobject.cpp +++ b/src/cpp/QtJambi/qtjambimetaobject.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambimetaobject_p.h b/src/cpp/QtJambi/qtjambimetaobject_p.h index 4754613a..f9939554 100644 --- a/src/cpp/QtJambi/qtjambimetaobject_p.h +++ b/src/cpp/QtJambi/qtjambimetaobject_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/qtjambishell.cpp b/src/cpp/QtJambi/qtjambishell.cpp index f5ae300c..edb66e47 100644 --- a/src/cpp/QtJambi/qtjambishell.cpp +++ b/src/cpp/QtJambi/qtjambishell.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -724,7 +724,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -749,7 +749,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, return; }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -788,7 +788,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -812,7 +812,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, ocurredException.raise(); }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -887,7 +887,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, const SuperTypeInfo& info = superTypeInfos[i]; jvalue* args = i==0 ? arguments : nullptr; void* iptr = reinterpret_cast(quintptr(ptr) + info.offset()); - constructorFunctions.at(i)(iptr, env, object, args); + constructorFunctions.at(i)(iptr, env, object, args, constructorFunction!=constructorFunctions.at(i)); if(!info.hasShell()) shell->constructed(info.typeId()); } @@ -949,7 +949,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -974,7 +974,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, return; }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -1013,7 +1013,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -1038,7 +1038,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, return; }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -1113,7 +1113,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, const SuperTypeInfo& info = superTypeInfos[i]; jvalue* args = i==0 ? arguments : nullptr; void* iptr = reinterpret_cast(quintptr(ptr) + info.offset()); - constructorFunctions.at(i)(iptr, env, object, args); + constructorFunctions.at(i)(iptr, env, object, args, constructorFunction!=constructorFunctions.at(i)); if(!info.hasShell()) shell->constructed(info.typeId()); } @@ -1197,7 +1197,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -1221,7 +1221,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, ocurredException.raise(); }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -1260,7 +1260,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -1284,7 +1284,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, ocurredException.raise(); }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -1359,7 +1359,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, const SuperTypeInfo& info = superTypeInfos[i]; jvalue* args = i==0 ? arguments : nullptr; void* iptr = reinterpret_cast(quintptr(ptr) + info.offset()); - constructorFunctions.at(i)(iptr, env, object, args); + constructorFunctions.at(i)(iptr, env, object, args, constructorFunction!=constructorFunctions.at(i)); if(!info.hasShell()) shell->constructed(info.typeId()); } @@ -1441,7 +1441,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -1465,7 +1465,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, ocurredException.raise(); }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -1504,7 +1504,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -1528,7 +1528,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, ocurredException.raise(); }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -1603,7 +1603,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, const SuperTypeInfo& info = superTypeInfos[i]; jvalue* args = i==0 ? arguments : nullptr; void* iptr = reinterpret_cast(quintptr(ptr) + info.offset()); - constructorFunctions.at(i)(iptr, env, object, args); + constructorFunctions.at(i)(iptr, env, object, args, constructorFunction!=constructorFunctions.at(i)); if(!info.hasShell()) shell->constructed(info.typeId()); } @@ -1685,7 +1685,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -1709,7 +1709,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, ocurredException.raise(); }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -1748,7 +1748,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -1772,7 +1772,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, ocurredException.raise(); }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -1847,7 +1847,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, const SuperTypeInfo& info = superTypeInfos[i]; jvalue* args = i==0 ? arguments : nullptr; void* iptr = reinterpret_cast(quintptr(ptr) + info.offset()); - constructorFunctions.at(i)(iptr, env, object, args); + constructorFunctions.at(i)(iptr, env, object, args, constructorFunction!=constructorFunctions.at(i)); if(!info.hasShell()) shell->constructed(info.typeId()); } @@ -1907,7 +1907,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -1931,7 +1931,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, ocurredException.raise(); }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -1970,7 +1970,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -1994,7 +1994,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, ocurredException.raise(); }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -2069,7 +2069,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, const SuperTypeInfo& info = superTypeInfos[i]; jvalue* args = i==0 ? arguments : nullptr; void* iptr = reinterpret_cast(quintptr(ptr) + info.offset()); - constructorFunctions.at(i)(iptr, env, object, args); + constructorFunctions.at(i)(iptr, env, object, args, constructorFunction!=constructorFunctions.at(i)); if(!info.hasShell()) shell->constructed(info.typeId()); } @@ -2129,7 +2129,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -2153,7 +2153,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, ocurredException.raise(); }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -2192,7 +2192,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -2216,7 +2216,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, ocurredException.raise(); }else{ try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); }catch(...){ if(link){ link->invalidate(env); @@ -2291,7 +2291,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, const SuperTypeInfo& info = superTypeInfos[i]; jvalue* args = i==0 ? arguments : nullptr; void* iptr = reinterpret_cast(quintptr(ptr) + info.offset()); - constructorFunctions.at(i)(iptr, env, object, args); + constructorFunctions.at(i)(iptr, env, object, args, constructorFunction!=constructorFunctions.at(i)); if(!info.hasShell()) shell->constructed(info.typeId()); } @@ -2349,7 +2349,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, nullptr); + constructorFunction(ptr, env, object, nullptr, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -2384,7 +2384,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, } *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ - constructorFunction(ptr, env, object, nullptr); + constructorFunction(ptr, env, object, nullptr, false); }catch(...){ if(QSharedPointer link = shell->link()){ link->invalidate(env); @@ -2456,7 +2456,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, for(; i>=0; --i){ const SuperTypeInfo& info = superTypeInfos[i]; void* iptr = reinterpret_cast(quintptr(ptr) + info.offset()); - constructorFunctions.at(i)(iptr, env, object, nullptr); + constructorFunctions.at(i)(iptr, env, object, nullptr, constructorFunction!=constructorFunctions.at(i)); if(!info.hasShell()) shell->constructed(info.typeId()); } @@ -2520,7 +2520,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, *reinterpret_cast(quintptr(ptr) + offset) = shell; QtJambiLink::registerQObjectInitialization(ptr, shell->link()); try{ - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); QtJambiLink::unregisterQObjectInitialization(ptr); }catch(...){ QtJambiLink::unregisterQObjectInitialization(ptr); @@ -2554,7 +2554,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, }else{ try{ QtJambiLink::registerQObjectInitialization(ptr, link); - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); QtJambiLink::unregisterQObjectInitialization(ptr); }catch(...){ QtJambiLink::unregisterQObjectInitialization(ptr); @@ -2612,7 +2612,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, *reinterpret_cast(quintptr(ptr) + offset) = shell; try{ QtJambiLink::registerQObjectInitialization(ptr, shell->link()); - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); QtJambiLink::unregisterQObjectInitialization(ptr); }catch(...){ QtJambiLink::unregisterQObjectInitialization(ptr); @@ -2645,7 +2645,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, }else{ try{ QtJambiLink::registerQObjectInitialization(ptr, link); - constructorFunction(ptr, env, object, arguments); + constructorFunction(ptr, env, object, arguments, false); QtJambiLink::unregisterQObjectInitialization(ptr); }catch(...){ QtJambiLink::unregisterQObjectInitialization(ptr); @@ -2731,7 +2731,7 @@ void QtJambiShell::initialize(JNIEnv *env, jclass callingClass, jobject object, const SuperTypeInfo& info = superTypeInfos[i]; jvalue* args = i==0 ? arguments : nullptr; void* iptr = reinterpret_cast(quintptr(ptr) + info.offset()); - constructorFunctions.at(i)(iptr, env, object, args); + constructorFunctions.at(i)(iptr, env, object, args, constructorFunction!=constructorFunctions.at(i)); if(!info.hasShell()) shell->constructed(info.typeId()); } @@ -2969,7 +2969,7 @@ void QtJambiShellImpl::initializeNativeInterface(JNIEnv *env, jclass callingClas for(; i>=0; --i){ const SuperTypeInfo& info = superTypeInfos[i]; void* iptr = reinterpret_cast(quintptr(ptr) + info.offset()); - constructorFunctions.at(i)(iptr, env, object, constructorArguments[i].data()); + constructorFunctions.at(i)(iptr, env, object, constructorArguments[i].data(), true); if(!info.hasShell()) shell->constructed(info.typeId()); } diff --git a/src/cpp/QtJambi/qtjambishell.h b/src/cpp/QtJambi/qtjambishell.h index 3689d32e..9796f63c 100644 --- a/src/cpp/QtJambi/qtjambishell.h +++ b/src/cpp/QtJambi/qtjambishell.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -41,7 +41,7 @@ class AbstractContainerAccess; class QTJAMBI_EXPORT QtJambiShell{ public: - typedef void (*ConstructorFunction)(void*, JNIEnv*, jobject, jvalue*); + typedef void (*ConstructorFunction)(void*, JNIEnv*, jobject, jvalue*, bool); virtual void destructed(const std::type_info& typeId) = 0; virtual void constructed(const std::type_info& typeId) = 0; diff --git a/src/cpp/QtJambi/qtjambishell_p.h b/src/cpp/QtJambi/qtjambishell_p.h index 536fc52f..459895a5 100644 --- a/src/cpp/QtJambi/qtjambishell_p.h +++ b/src/cpp/QtJambi/qtjambishell_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/registry.cpp b/src/cpp/QtJambi/registry.cpp index abbea08a..e7bf411d 100644 --- a/src/cpp/QtJambi/registry.cpp +++ b/src/cpp/QtJambi/registry.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -37,6 +37,8 @@ QT_WARNING_DISABLE_DEPRECATED #include #include #include +#include +#include #include #include @@ -53,6 +55,7 @@ QT_WARNING_DISABLE_DEPRECATED #include "typemanager_p.h" #include "utils_p.h" #include "qmlapi.h" +#include "qtjambilink_p.h" #include "supertypeinfo_p.h" #include "qtjambi_cast.h" @@ -118,6 +121,10 @@ Q_GLOBAL_STATIC(DeleterHash, gDeleterHash) typedef QHash MetaTypeJavaTypeHash; typedef QMultiHash JavaTypeMetaTypesHash; typedef QSet JObjectWrappedMetaTypeHash; +typedef QHash JObjectNativeWrappedMetaTypeHash; +typedef QHash JObjectNativeWrappedMetaTypeReverseHash; +Q_GLOBAL_STATIC(JObjectNativeWrappedMetaTypeHash, gJObjectNativeWrapperMetaTypes) +Q_GLOBAL_STATIC(JObjectNativeWrappedMetaTypeReverseHash, gMetaTypesForJObjectNativeWrappers) #else typedef QHash MetaTypeJavaTypeHash; typedef QMultiHash JavaTypeMetaTypesHash; @@ -971,10 +978,14 @@ void registerMetaTypeID(const std::type_info& typeId, const std::type_info& nonP #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) void registerMetaObjectByMetaTypeInterface(const QtPrivate::QMetaTypeInterface* iface, const QMetaObject* mo){ + QWriteLocker locker(gLock()); + Q_UNUSED(locker) gMetaTypeMetaObjectHash->insert(iface, mo); } const QMetaObject* metaobjectByMetaTypeInterface(const QtPrivate::QMetaTypeInterface* iface){ + QReadLocker locker(gLock()); + Q_UNUSED(locker) return gMetaTypeMetaObjectHash->value(iface); } #endif @@ -1067,6 +1078,12 @@ int QmlAPI::registerQmlMetaType(JNIEnv *env, jclass clazz, return metaType.id(); } +#if QT_VERSION < QT_VERSION_CHECK(6,5,0) +#define QMetaTypeInterface_CurrentRevision 0 +#else +#define QMetaTypeInterface_CurrentRevision QtPrivate::QMetaTypeInterface::CurrentRevision +#endif + QMetaType createMetaType(QByteArrayView typeName, bool copyName, QtPrivate::QMetaTypeInterface::DefaultCtrFn defaultCtr, @@ -1086,7 +1103,7 @@ QMetaType createMetaType(QByteArrayView typeName, const QMetaObject *metaObject, QtPrivate::QMetaTypeInterface::MetaObjectFn metaObjectFn){ QtPrivate::QMetaTypeInterface* metaTypeInterface = new QtPrivate::QMetaTypeInterface{ - /*.revision=*/ 0, + /*.revision=*/ QMetaTypeInterface_CurrentRevision, /*.alignment=*/ align, /*.size=*/ size, /*.flags=*/ uint(flags), @@ -2069,6 +2086,8 @@ FunctionalResolver registeredFunctionalResolver(const std::type_info& typeId){ static QmlAPI::QmlReportDestruction qmlReportDestructionFunction = nullptr; +static QmlAPI::QmlIsJavaScriptOwnership qmlIsJavaScriptOwnership = nullptr; + void QtJambiPrivate::reportDeclarativeObjectDestruction(QObject * obj){ if(qmlReportDestructionFunction) qmlReportDestructionFunction(obj); @@ -2079,6 +2098,15 @@ void QmlAPI::setQmlReportDestruction(QmlReportDestruction fct){ qmlReportDestructionFunction = fct; } +void QmlAPI::setQmlIsJavaScriptOwnership(QmlIsJavaScriptOwnership fct){ + if(!qmlIsJavaScriptOwnership) + qmlIsJavaScriptOwnership = fct; +} + +bool isQmlJavaScriptOwnership(QObject * obj){ + return qmlIsJavaScriptOwnership && qmlIsJavaScriptOwnership(obj); +} + void RegistryAPI::registerMediaControlInfo(const std::type_info& typeId, const char *media_control_iid){ QWriteLocker locker(gLock()); Q_UNUSED(locker) @@ -2131,7 +2159,12 @@ void registerJavaClassForCustomMetaType(JNIEnv *env, QMetaType metaType, jclass QWriteLocker locker(gLock()); Q_UNUSED(locker) QByteArray javaName = QtJambiAPI::getClassName(env, javaClass).toLatin1().replace('.', '/'); - gMetaTypeJavaTypeHash->insert(iface, getGlobalClassRef(env, javaClass, javaName)); + if(Java::Runtime::Class::isSynthetic(env,javaClass)){ + javaClass = JavaAPI::resolveClass(env, javaName); + }else{ + javaClass = getGlobalClassRef(env, javaClass, javaName); + } + gMetaTypeJavaTypeHash->insert(iface, javaClass); gJavaTypeMetaTypesHash->insert(javaName, metaType); if(isJObjectWrapped) gJObjectWrappedMetaTypes->insert(iface); @@ -2142,6 +2175,227 @@ bool isJObjectWrappedMetaType(QMetaType metaType){ return gJObjectWrappedMetaTypes->contains(metaType.iface()); } +bool isNativeWrapperMetaType(QMetaType metaType){ + QReadLocker locker(gLock()); + return gMetaTypesForJObjectNativeWrappers->contains(metaType.iface()); +} + +const QtPrivate::QMetaTypeInterface * getOriginalForNativeWrapperMetaType(const QtPrivate::QMetaTypeInterface *iface){ + const QtPrivate::QMetaTypeInterface *original{nullptr}; + { + QReadLocker locker(gLock()); + original = (*gMetaTypesForJObjectNativeWrappers)[iface]; + } + return original; +} + +QMetaType getNativeWrapperType(const QMetaType& metaType){ + const QtPrivate::QMetaTypeInterface * nativeWrapperType{nullptr}; + if(metaType.flags().testFlags(QMetaType::IsPointer)){ + { + QReadLocker locker(gLock()); + nativeWrapperType = (*gJObjectNativeWrapperMetaTypes)[metaType.id()]; + } + if(!nativeWrapperType){ + bool isQObject = metaType.flags().testFlag(QMetaType::PointerToQObject); + const QtPrivate::QMetaTypeInterface *original{QMetaType(metaType).iface()}; + QByteArray typeName = QByteArray("JObjectWrapper<") + QByteArray(metaType.name()) + ">"; + const char* name = registerMetaTypeName(typeName); + QtPrivate::QMetaTypeInterface* metaTypeInterface; + const QMetaObject *originalMetaObject{nullptr}; + if(isQObject){ + uint flags = QtPrivate::QMetaTypeTypeFlags::Flags; + flags |= QMetaType::PointerToQObject; + if(metaType.flags().testFlag(QMetaType::IsConst)) + flags |= QMetaType::IsConst; + metaTypeInterface = new QtPrivate::QMetaTypeInterface{ + /*.revision=*/ QMetaTypeInterface_CurrentRevision, + /*.alignment=*/ alignof(JQObjectWrapper), + /*.size=*/ sizeof(JQObjectWrapper), + /*.flags=*/ flags, + /*.typeId=*/ QMetaType::UnknownType, + /*.metaObject=*/ original->metaObjectFn, + /*.name=*/ name, + /*.defaultCtr=*/ QtPrivate::QMetaTypeForType::getDefaultCtr(), + /*.copyCtr=*/ QtPrivate::QMetaTypeForType::getCopyCtr(), + /*.moveCtr=*/ QtPrivate::QMetaTypeForType::getMoveCtr(), + /*.dtor=*/ QtPrivate::QMetaTypeForType::getDtor(), + /*.equals=*/ [](const QtPrivate::QMetaTypeInterface *, const void *value1, const void *value2) -> bool{ + const JQObjectWrapper* _value1 = reinterpret_cast(value1); + const JQObjectWrapper* _value2 = reinterpret_cast(value2); + return _value1->qobject()==_value2->qobject(); + }, + /*.lessThan=*/ [](const QtPrivate::QMetaTypeInterface *, const void *value1, const void *value2) -> bool{ + const JQObjectWrapper* _value1 = reinterpret_cast(value1); + const JQObjectWrapper* _value2 = reinterpret_cast(value2); + return _value1->qobject()<_value2->qobject(); + }, + /*.debugStream=*/ original->debugStream ? [](const QtPrivate::QMetaTypeInterface *iface, QDebug &d, const void *value){ + if(const QtPrivate::QMetaTypeInterface *original = getOriginalForNativeWrapperMetaType(iface)){ + const JQObjectWrapper* _value = reinterpret_cast(value); + original->debugStream(original, d, _value->qobject()); + } + } : QtPrivate::QMetaTypeInterface::DebugStreamFn(nullptr), + /*.dataStreamOutFn=*/ original->dataStreamOut ? [](const QtPrivate::QMetaTypeInterface *iface, QDataStream &d, const void *value){ + if(const QtPrivate::QMetaTypeInterface *original = getOriginalForNativeWrapperMetaType(iface)){ + const JQObjectWrapper* _value = reinterpret_cast(value); + original->dataStreamOut(original, d, _value->qobject()); + } + } : QtPrivate::QMetaTypeInterface::DataStreamOutFn(nullptr), + /*.dataStreamInFn=*/ original->dataStreamIn ? [](const QtPrivate::QMetaTypeInterface *iface, QDataStream &d, void *value){ + if(const QtPrivate::QMetaTypeInterface *original = getOriginalForNativeWrapperMetaType(iface)){ + JQObjectWrapper* _value = reinterpret_cast(value); + original->dataStreamIn(original, d, _value->qobject()); + } + } : QtPrivate::QMetaTypeInterface::DataStreamInFn(nullptr), + /*.legacyRegisterOp=*/ nullptr + }; + }else{ + if(original->metaObjectFn) + originalMetaObject = original->metaObjectFn(original); + uint flags = QtPrivate::QMetaTypeTypeFlags::Flags; + if(originalMetaObject) + flags |= QMetaType::IsGadget; + if(metaType.flags().testFlag(QMetaType::IsConst)) + flags |= QMetaType::IsConst; + metaTypeInterface = new QtPrivate::QMetaTypeInterface{ + /*.revision=*/ QMetaTypeInterface_CurrentRevision, + /*.alignment=*/ alignof(JObjectWrapper), + /*.size=*/ sizeof(JObjectWrapper), + /*.flags=*/ flags, + /*.typeId=*/ QMetaType::UnknownType, + /*.metaObject=*/ originalMetaObject ? &metaobjectByMetaTypeInterface : nullptr, + /*.name=*/ name, + /*.defaultCtr=*/ QtPrivate::QMetaTypeForType::getDefaultCtr(), + /*.copyCtr=*/ QtPrivate::QMetaTypeForType::getCopyCtr(), + /*.moveCtr=*/ QtPrivate::QMetaTypeForType::getMoveCtr(), + /*.dtor=*/ QtPrivate::QMetaTypeForType::getDtor(), + /*.equals=*/ [](const QtPrivate::QMetaTypeInterface *, const void *value1, const void *value2) -> bool{ + const JObjectWrapper* _value1 = reinterpret_cast(value1); + const JObjectWrapper* _value2 = reinterpret_cast(value2); + if(JniEnvironment env{200}){ + if (QSharedPointer link1 = QtJambiLink::findLinkForJavaInterface(env, _value1->object())){ + if (QSharedPointer link2 = QtJambiLink::findLinkForJavaInterface(env, _value2->object())){ + return link1->pointer()==link2->pointer(); + } + } + } + return false; + }, + /*.lessThan=*/ [](const QtPrivate::QMetaTypeInterface *, const void *value1, const void *value2) -> bool{ + const JObjectWrapper* _value1 = reinterpret_cast(value1); + const JObjectWrapper* _value2 = reinterpret_cast(value2); + if(JniEnvironment env{200}){ + if (QSharedPointer link1 = QtJambiLink::findLinkForJavaInterface(env, _value1->object())){ + if (QSharedPointer link2 = QtJambiLink::findLinkForJavaInterface(env, _value2->object())){ + return link1->pointer()pointer(); + } + } + } + return false; + }, + /*.debugStream=*/ original->debugStream ? [](const QtPrivate::QMetaTypeInterface *iface, QDebug &d, const void *value){ + if(const QtPrivate::QMetaTypeInterface *original = getOriginalForNativeWrapperMetaType(iface)){ + const JObjectWrapper* _value = reinterpret_cast(value); + if(JniEnvironment env{200}){ + if (QSharedPointer link = QtJambiLink::findLinkForJavaInterface(env, _value->object())){ + original->debugStream(original, d, link->pointer()); + } + } + } + } : QtPrivate::QMetaTypeInterface::DebugStreamFn(nullptr), + /*.dataStreamOutFn=*/ original->dataStreamOut ? [](const QtPrivate::QMetaTypeInterface *iface, QDataStream &d, const void *value){ + if(const QtPrivate::QMetaTypeInterface *original = getOriginalForNativeWrapperMetaType(iface)){ + const JObjectWrapper* _value = reinterpret_cast(value); + if(JniEnvironment env{200}){ + if (QSharedPointer link = QtJambiLink::findLinkForJavaInterface(env, _value->object())){ + original->dataStreamOut(original, d, link->pointer()); + } + } + } + } : QtPrivate::QMetaTypeInterface::DataStreamOutFn(nullptr), + /*.dataStreamInFn=*/ original->dataStreamIn ? [](const QtPrivate::QMetaTypeInterface *iface, QDataStream &d, void *value){ + if(const QtPrivate::QMetaTypeInterface *original = getOriginalForNativeWrapperMetaType(iface)){ + JObjectWrapper* _value = reinterpret_cast(value); + if(JniEnvironment env{200}){ + if (QSharedPointer link = QtJambiLink::findLinkForJavaInterface(env, _value->object())){ + original->dataStreamIn(original, d, link->pointer()); + } + } + } + } : QtPrivate::QMetaTypeInterface::DataStreamInFn(nullptr), + /*.legacyRegisterOp=*/ nullptr + }; + } + { + QWriteLocker locker(gLock()); + if(const QtPrivate::QMetaTypeInterface * iface = (*gJObjectNativeWrapperMetaTypes)[metaType.id()]){ + delete metaTypeInterface; + nativeWrapperType = iface; + }else{ + (*gJObjectNativeWrapperMetaTypes)[metaType.id()] = metaTypeInterface; + (*gMetaTypesForJObjectNativeWrappers)[metaTypeInterface] = original; + if(originalMetaObject){ + QMetaObjectBuilder builder; + builder.setClassName(name); + for(int i=0, l=originalMetaObject->methodCount(); imethod(i); + builder.addMethod(method); + } + for(int i=0, l=originalMetaObject->constructorCount(); iconstructor(i); + builder.addConstructor(constructor); + } + for(int i=0, l=originalMetaObject->propertyCount(); iproperty(i); + builder.addProperty(property); + } + if(isQObject){ + builder.setFlags(PropertyAccessInStaticMetaCall); + builder.setStaticMetacallFunction([](QObject *gadget, QMetaObject::Call call, int argc, void **argv){ + JObjectWrapper* wrapper = reinterpret_cast(gadget); + if(JniEnvironment env{200}){ + if (QSharedPointer link = QtJambiLink::findLinkForJavaObject(env, wrapper->object())){ + Q_ASSERT(link->isQObject()); + link->qobject()->qt_metacall(call, argc, argv); + } + } + }); + }else if(originalMetaObject->d.static_metacall){ + builder.setFlags(PropertyAccessInStaticMetaCall); + builder.setStaticMetacallFunction([](QObject *gadget, QMetaObject::Call call, int argc, void **argv){ + JObjectWrapper* wrapper = reinterpret_cast(gadget); + if(JniEnvironment env{200}){ + if (QSharedPointer link = QtJambiLink::findLinkForJavaObject(env, wrapper->object())){ + QMetaType metaType; + if(PointerToObjectLink* plink = dynamic_cast(link.get())){ + metaType = plink->metaType(); + }else if(jclass object_class = env->GetObjectClass(wrapper->object())){ + QString qtName = QtJambiTypeManager::getInternalTypeName(env, object_class, false); + metaType = QMetaType::fromName(qPrintable(qtName)); + } + if(metaType.metaObject() && metaType.metaObject()->d.static_metacall) + metaType.metaObject()->d.static_metacall(reinterpret_cast(link->pointer()), call, argc, argv); + } + } + }); + } + QMetaObject* mo = builder.toMetaObject(); + mo->d.superdata.direct = nullptr; +#ifdef QT_NO_DATA_RELOCATION + mo->d.superdata.indirect = nullptr; +#endif + gMetaTypeMetaObjectHash->insert(metaTypeInterface, mo); + } + nativeWrapperType = metaTypeInterface; + (void)QMetaType(nativeWrapperType).id(); + } + } + } + } + return QMetaType(nativeWrapperType); +} + jclass registeredJavaClassForCustomMetaType(const QtPrivate::QMetaTypeInterface * metaType){ QReadLocker locker(gLock()); Q_UNUSED(locker) @@ -2378,13 +2632,17 @@ jclass findClass(JNIEnv *env, const char *qualifiedName, jobject classLoader = n return returned; } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) jclass getGlobalClassRef(JNIEnv *env, jclass cls, const char *className){ +#else +jclass getGlobalClassRef(JNIEnv *env, jclass cls, QByteArrayView className){ +#endif #ifndef QTJAMBI_NOCACHE hash_type key; #ifdef QTJAMBI_LOG_CLASSNAMES QString classNameStrg; #endif - if(className){ + if(className!=nullptr){ #ifdef QTJAMBI_LOG_CLASSNAMES classNameStrg = QLatin1String(className); #endif @@ -2393,7 +2651,7 @@ jclass getGlobalClassRef(JNIEnv *env, jclass cls, const char *className){ #ifndef QTJAMBI_LOG_CLASSNAMES QString #endif - classNameStrg = QtJambiAPI::getClassName(env, cls).replace(".", "/"); + classNameStrg = qtjambi_cast(env, Java::Runtime::Class::getName(env, cls)).replace(".", "/"); key = qHash(qPrintable(classNameStrg)); } { @@ -3266,6 +3524,156 @@ void JObjectValueWrapper::serializableDataStreamIn(const QtPrivate::QMetaTypeInt } } +struct JQObjectWrapperPrivate{ + JQObjectWrapperPrivate(QObject*& object, JNIEnv* env, QSharedPointer&& link); + void unref(QObject*& pointer); + void ref(QObject*& pointer); + void exchange(QObject*& pointer, QObject*& byPointer); + QSharedPointer m_link; + QMutex m_mutex; + QSet m_pointers; +private: + ~JQObjectWrapperPrivate(); +}; + +JQObjectWrapperPrivate::JQObjectWrapperPrivate(QObject*& object, JNIEnv* env, QSharedPointer&& link) + : m_link(std::move(link)), m_mutex(), m_pointers() { + Q_ASSERT(!m_link.isNull()); + Q_ASSERT(m_link->ownership()==QtJambiLink::Ownership::Java); + m_link->setCppOwnership(env); + m_pointers.insert(&object); + if(DependencyManagerUserData* dm = DependencyManagerUserData::instance(object)){ + dm->addFinalization(this, + [](JNIEnv*, void* data){ + JQObjectWrapperPrivate* p = reinterpret_cast(data); + QSet pointers; + { + QMutexLocker locker(&p->m_mutex); + p->m_pointers.swap(pointers); + } + for(QObject** pointer : pointers){ + *pointer = nullptr; + } + }, nullptr); + } +} + +void JQObjectWrapperPrivate::unref(QObject*& pointer){ + bool isEmpty; + { + QMutexLocker locker(&m_mutex); + m_pointers.remove(&pointer); + isEmpty = m_pointers.isEmpty(); + } + if(isEmpty) + delete this; +} + +void JQObjectWrapperPrivate::ref(QObject*& pointer){ + { + QMutexLocker locker(&m_mutex); + m_pointers.insert(&pointer); + } +} + +void JQObjectWrapperPrivate::exchange(QObject*& pointer, QObject*& byPointer){ + { + QMutexLocker locker(&m_mutex); + m_pointers.remove(&pointer); + m_pointers.insert(&byPointer); + } +} + +JQObjectWrapperPrivate::~JQObjectWrapperPrivate(){ + try{ + if(QObject* object = m_link->qobject()){ + JniEnvironment env{200}; + try{ + if(DependencyManagerUserData* dm = DependencyManagerUserData::instance(object, false)){ + dm->removeFinalization(env, this); + } + if(!isQmlJavaScriptOwnership(object) && env) + m_link->setJavaOwnership(env); + }catch(const JavaException& exn){ + exn.report(env); + } + } + }catch(...){ + } +} + +JQObjectWrapper::JQObjectWrapper() + : m_qobject(nullptr), p(nullptr) { +} + +JQObjectWrapper::JQObjectWrapper(JNIEnv* env, QSharedPointer&& link) + : m_qobject(link->qobject()), p(new JQObjectWrapperPrivate(m_qobject, env, std::move(link))){ +} + +JQObjectWrapper::~JQObjectWrapper(){ + if(p) + p->unref(m_qobject); + m_qobject = nullptr; + p = nullptr; +} + +JQObjectWrapper::JQObjectWrapper(const JQObjectWrapper& other) + : m_qobject(other.m_qobject), p(other.p){ + if(p) + p->ref(m_qobject); +} + +JQObjectWrapper::JQObjectWrapper(JQObjectWrapper&& other) + : m_qobject(other.m_qobject), p(other.p){ + if(p) + p->exchange(other.m_qobject, m_qobject); + other.p = nullptr; + other.m_qobject = nullptr; +} + +JQObjectWrapper& JQObjectWrapper::operator=(const JQObjectWrapper &other){ + if(other.p!=p){ + if(p) + p->unref(m_qobject); + m_qobject = other.m_qobject; + p = other.p; + if(p){ + p->ref(m_qobject); + } + } + return *this; +} + +JQObjectWrapper& JQObjectWrapper::operator=(JQObjectWrapper &&other){ + if(other.p!=p){ + if(p) + p->unref(m_qobject); + m_qobject = other.m_qobject; + p = other.p; + if(p){ + p->exchange(other.m_qobject, m_qobject); + } + other.p = nullptr; + other.m_qobject = nullptr; + } + return *this; +} + +QSharedPointer JQObjectWrapper::link() const{ + if(p) + return p->m_link; + else + return {}; +} + +jobject JQObjectWrapper::javaObject(JNIEnv* env) const{ + if(p) + return p->m_link->getJavaObjectLocalRef(env); + else + return nullptr; +} + + int QmlAPI::registerMetaType(JNIEnv *env, SequentialContainerType containerType, const QMetaType& elementType){ int result = 0; AbstractListAccess* listAccess = dynamic_cast(AbstractContainerAccess::create(env, containerType, elementType)); @@ -3347,7 +3755,7 @@ int qtjambi_register_enum_meta_type(JNIEnv *env, jclass clazz, const QString& ja typedef typename std::conditional,E>::type EnumOrFlags; typedef typename std::conditional::type Wrapper; QtPrivate::QMetaTypeInterface* metaTypeInterface = new QtPrivate::QMetaTypeInterface{ - /*.revision=*/ 0, + /*.revision=*/ QMetaTypeInterface_CurrentRevision, /*.alignment=*/ alignof(EnumOrFlags), /*.size=*/ sizeof(EnumOrFlags), /*.flags=*/ uint(QtPrivate::QMetaTypeTypeFlags::Flags), @@ -3823,7 +4231,8 @@ int registerMetaType(JNIEnv *env, jclass clazz, jboolean isPointer, jboolean isR }else{ const SuperTypeInfos& superTypes = SuperTypeInfos::fromClass(env, clazz); QByteArray metaTypeName = javaClassName.toUtf8().replace("/", "::").replace("$", "::"); - if(superTypes.isEmpty()){ + if(superTypes.isEmpty()) + { #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) int id; if(Java::QtJambi::QtShortEnumerator::isAssignableFrom(env, clazz) @@ -3898,7 +4307,7 @@ int registerMetaType(JNIEnv *env, jclass clazz, jboolean isPointer, jboolean isR uint flags = QtPrivate::QMetaTypeTypeFlags::Flags; flags |= QMetaType::IsGadget; QtPrivate::QMetaTypeInterface* metaTypeInterface = new QtPrivate::QMetaTypeInterface{ - /*.revision=*/ 0, + /*.revision=*/ QMetaTypeInterface_CurrentRevision, /*.alignment=*/ alignof(JObjectValueWrapper), /*.size=*/ sizeof(JObjectValueWrapper), /*.flags=*/ flags, @@ -3971,7 +4380,8 @@ int registerMetaType(JNIEnv *env, jclass clazz, jboolean isPointer, jboolean isR }else if(Java::Runtime::Map::isAssignableFrom(env, clazz)){ return QMetaType::fromType().id(); } - QMetaType metaType = createMetaType(metaTypeName+"*", + metaTypeName = "JObjectWrapper<" + metaTypeName + ">"; + QMetaType metaType = createMetaType(metaTypeName, true, /*.defaultCtr=*/ QtJambiPrivate::QMetaTypeInterfaceFunctions::defaultCtr, /*.copyCtr=*/ QtJambiPrivate::QMetaTypeInterfaceFunctions::copyCtr, @@ -3993,34 +4403,7 @@ int registerMetaType(JNIEnv *env, jclass clazz, jboolean isPointer, jboolean isR nullptr, &findWrappersMetaObject); int result = metaType.id(); registerJavaClassForCustomMetaType(env, metaType, clazz, true); - if(!QMetaType::hasRegisteredConverterFunction(metaType, QMetaType::fromType())){ - QMetaType::registerConverterFunction([](const void *src, void *target) -> bool { - if(src){ - new (target)JObjectWrapper(*reinterpret_cast(src)); - }else{ - new (target)JObjectWrapper(); - } - return true; - }, metaType, QMetaType::fromType()); - } - if(!QMetaType::hasRegisteredConverterFunction(QMetaType::fromType(), metaType)){ - JObjectWrapper classWrapper(env, clazz); - QMetaType::registerConverterFunction([classWrapper](const void *src, void *target) -> bool { - if(src){ - jobject value = reinterpret_cast(src)->object(); - if(value!=nullptr){ - if(JniEnvironment env{200}){ - if(!env->IsInstanceOf(value, jclass(classWrapper.object()))) - return false; - } - } - new (target)JObjectWrapper(*reinterpret_cast(src)); - }else{ - new (target)JObjectWrapper(); - } - return true; - }, QMetaType::fromType(), metaType); - } + registerConverterVariant(env, metaType, QLatin1String(metaTypeName), javaClassName, clazz); return result; } #endif @@ -4034,7 +4417,7 @@ int registerMetaType(JNIEnv *env, jclass clazz, jboolean isPointer, jboolean isR if(id!=QMetaType::UnknownType){ QMetaType superMetaType(id); if(superMetaType.flags() & QMetaType::IsPointer){ - metaTypeName += "*"; + metaTypeName = metaTypeName + "*"; QMetaType metaType = createMetaType(metaTypeName, true, /*.defaultCtr=*/ superMetaType.iface()->defaultCtr, @@ -4094,7 +4477,7 @@ int registerMetaType(JNIEnv *env, jclass clazz, jboolean isPointer, jboolean isR uint flags = QtPrivate::QMetaTypeTypeFlags::Flags; flags |= QMetaType::IsGadget; QtPrivate::QMetaTypeInterface* metaTypeInterface = new QtPrivate::QMetaTypeInterface{ - /*.revision=*/ 0, + /*.revision=*/ QMetaTypeInterface_CurrentRevision, /*.alignment=*/ alignof(JObjectValueWrapper), /*.size=*/ sizeof(JObjectValueWrapper), /*.flags=*/ flags, @@ -4167,7 +4550,8 @@ int registerMetaType(JNIEnv *env, jclass clazz, jboolean isPointer, jboolean isR }else if(Java::Runtime::Map::isAssignableFrom(env, clazz)){ return QMetaType::fromType().id(); } - QMetaType metaType = createMetaType(metaTypeName+"*", + metaTypeName = "JObjectWrapper<" + metaTypeName + ">"; + QMetaType metaType = createMetaType(metaTypeName, true, /*.defaultCtr=*/ QtJambiPrivate::QMetaTypeInterfaceFunctions::defaultCtr, /*.copyCtr=*/ QtJambiPrivate::QMetaTypeInterfaceFunctions::copyCtr, @@ -4189,34 +4573,7 @@ int registerMetaType(JNIEnv *env, jclass clazz, jboolean isPointer, jboolean isR nullptr, &findWrappersMetaObject); int result = metaType.id(); registerJavaClassForCustomMetaType(env, metaType, clazz, true); - if(!QMetaType::hasRegisteredConverterFunction(metaType, QMetaType::fromType())){ - QMetaType::registerConverterFunction([](const void *src, void *target) -> bool { - if(src){ - new (target)JObjectWrapper(*reinterpret_cast(src)); - }else{ - new (target)JObjectWrapper(); - } - return true; - }, metaType, QMetaType::fromType()); - } - if(!QMetaType::hasRegisteredConverterFunction(QMetaType::fromType(), metaType)){ - JObjectWrapper classWrapper(env, clazz); - QMetaType::registerConverterFunction([classWrapper](const void *src, void *target) -> bool { - if(src){ - jobject value = reinterpret_cast(src)->object(); - if(value!=nullptr){ - if(JniEnvironment env{200}){ - if(!env->IsInstanceOf(value, jclass(classWrapper.object()))) - return false; - } - } - new (target)JObjectWrapper(*reinterpret_cast(src)); - }else{ - new (target)JObjectWrapper(); - } - return true; - }, QMetaType::fromType(), metaType); - } + registerConverterVariant(env, metaType, QLatin1String(metaTypeName), javaClassName, clazz); return result; } }else{ @@ -4225,7 +4582,8 @@ int registerMetaType(JNIEnv *env, jclass clazz, jboolean isPointer, jboolean isR }else if(Java::Runtime::Map::isAssignableFrom(env, clazz)){ return QMetaType::fromType().id(); } - QMetaType metaType = createMetaType(metaTypeName+"*", + metaTypeName = "JObjectWrapper<" + metaTypeName + ">"; + QMetaType metaType = createMetaType(metaTypeName, true, /*.defaultCtr=*/ QtJambiPrivate::QMetaTypeInterfaceFunctions::defaultCtr, /*.copyCtr=*/ QtJambiPrivate::QMetaTypeInterfaceFunctions::copyCtr, @@ -4247,34 +4605,7 @@ int registerMetaType(JNIEnv *env, jclass clazz, jboolean isPointer, jboolean isR nullptr, &findWrappersMetaObject); int result = metaType.id(); registerJavaClassForCustomMetaType(env, metaType, clazz, true); - if(!QMetaType::hasRegisteredConverterFunction(metaType, QMetaType::fromType())){ - QMetaType::registerConverterFunction([](const void *src, void *target) -> bool { - if(src){ - new (target)JObjectWrapper(*reinterpret_cast(src)); - }else{ - new (target)JObjectWrapper(); - } - return true; - }, metaType, QMetaType::fromType()); - } - if(!QMetaType::hasRegisteredConverterFunction(QMetaType::fromType(), metaType)){ - JObjectWrapper classWrapper(env, clazz); - QMetaType::registerConverterFunction([classWrapper](const void *src, void *target) -> bool { - if(src){ - jobject value = reinterpret_cast(src)->object(); - if(value!=nullptr){ - if(JniEnvironment env{200}){ - if(!env->IsInstanceOf(value, jclass(classWrapper.object()))) - return false; - } - } - new (target)JObjectWrapper(*reinterpret_cast(src)); - }else{ - new (target)JObjectWrapper(); - } - return true; - }, QMetaType::fromType(), metaType); - } + registerConverterVariant(env, metaType, QLatin1String(metaTypeName), javaClassName, clazz); return result; } #endif diff --git a/src/cpp/QtJambi/registryapi.h b/src/cpp/QtJambi/registryapi.h index 9c1bbc45..fae5c03c 100644 --- a/src/cpp/QtJambi/registryapi.h +++ b/src/cpp/QtJambi/registryapi.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -102,7 +102,7 @@ struct QTJAMBI_EXPORT FunctionInfo{ }; struct QTJAMBI_EXPORT ConstructorInfo{ - typedef void (*Constructor)(void*, JNIEnv*, jobject, jvalue*); + typedef void (*Constructor)(void*, JNIEnv*, jobject, jvalue*, bool); ConstructorInfo(); ConstructorInfo(const ConstructorInfo& other); ConstructorInfo(Constructor _constructorFunction, const char *_signature); @@ -292,7 +292,7 @@ struct QMetaTypeInterfaceFunctions typedef void (*AfterRegistrationFunction)(int); typedef AbstractContainerAccess*(*NewContainerAccessFunction)(); typedef bool (*PolymorphyHandler)(void *object, qintptr& offset); -typedef jobject(* FunctionalResolver)(JNIEnv*,const void*); +typedef jobject(* FunctionalResolver)(JNIEnv*,const void*,bool*); typedef const std::type_info* (*TypeInfoSupplier)(const void *object); namespace RegistryAPI{ @@ -879,9 +879,7 @@ const std::type_info& registerFunctionalTypeInfo(const char *qt_name, const char registerAlignmentOfType(id, Q_ALIGNOF(T)); registerMetaTypeID(id, qRegisterMetaType(qt_name)); registerSizeOfShell(id, sizeof(Tshell)); - registerFunctionalResolver(id, [](JNIEnv* env, const void* ptr) -> jobject { - return Tshell::resolveFunctional(env, reinterpret_cast(ptr)); - }); + registerFunctionalResolver(id, &Tshell::resolveFunctional); registerConstructorInfos(id, destructor, constructors); registerDeleter(id, deleter); registerFunctionInfos(id, virtualFunctions); diff --git a/src/cpp/QtJambi/registryutil_p.h b/src/cpp/QtJambi/registryutil_p.h index 5d96b27c..cfc5e068 100644 --- a/src/cpp/QtJambi/registryutil_p.h +++ b/src/cpp/QtJambi/registryutil_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -69,7 +69,11 @@ struct OptionalBool{ #define OptionalBool std::optional #endif +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) jclass getGlobalClassRef(JNIEnv *env, jclass cls, const char *className = nullptr); +#else +jclass getGlobalClassRef(JNIEnv *env, jclass cls, QByteArrayView className = {}); +#endif hash_type qHash(const std::type_index& idx, hash_type seed = 0) Q_DECL_NOEXCEPT; hash_type qHash(const char *p, hash_type seed = 0) Q_DECL_NOEXCEPT; @@ -133,6 +137,8 @@ OptionalBool isRegisteredAsStaticType(const std::type_info& typeId); #else void registerJavaClassForCustomMetaType(JNIEnv *env, QMetaType metaType, jclass javaClass, bool isJObjectWrapped = false); bool isJObjectWrappedMetaType(QMetaType metaType); +QMetaType getNativeWrapperType(const QMetaType& metaType); +bool isNativeWrapperMetaType(QMetaType metaType); #endif int registerMetaType(JNIEnv *env, jclass clazz, jboolean isPointer, jboolean isReference); @@ -140,7 +146,7 @@ const QVector* registeredConstructorInfos(const std::type jclass getArrayClass(JNIEnv *env, jclass cls, int arrayDepth); #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) -void registerConverterVariant(JNIEnv *env, QMetaType metaType, QString qtName, const QString& fullJavaName, jclass clazz); +void registerConverterVariant(JNIEnv *env, QMetaType metaType, QString qtName, const QString& fullJavaName, jclass clazz, QMetaType nativeWrapperType = {}); #endif void registerLambdaClass(JNIEnv *env, jclass lambdaClass, const char *className); @@ -186,6 +192,7 @@ bool isQObject(const std::type_info& typeId); #endif // JOBJECT_REFCOUNT #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + struct JObjectValueWrapperPrivate; class JObjectValueWrapper : public JObjectWrapper{ @@ -211,6 +218,7 @@ class JObjectValueWrapper : public JObjectWrapper{ static bool hasCustomDebugStreamOperator(QMetaType metaType); static JObjectValueWrapper create(JNIEnv* env, jobject object, QMetaType metaType); private: + friend JObjectValueWrapperPrivate; JObjectValueWrapper(const JObjectValueWrapperPrivate* methods); JObjectValueWrapper(JNIEnv* env, jobject object, const JObjectValueWrapperPrivate* methods); JObjectValueWrapper(JObjectWrapper&& object, const JObjectValueWrapperPrivate* methods); @@ -226,7 +234,6 @@ class JObjectValueWrapper : public JObjectWrapper{ static void dataStreamIn(const QtPrivate::QMetaTypeInterface *iface, QDataStream &d, void *value); static void serializableDataStreamOut(const QtPrivate::QMetaTypeInterface *iface, QDataStream &d, const void *value); static void serializableDataStreamIn(const QtPrivate::QMetaTypeInterface *iface, QDataStream &d, void *value); - friend JObjectValueWrapperPrivate; const JObjectValueWrapperPrivate* p; }; @@ -248,6 +255,27 @@ QMetaType createMetaType(QByteArrayView typeName, QMetaType::TypeFlags flags, const QMetaObject *metaObject, QtPrivate::QMetaTypeInterface::MetaObjectFn metaObjectFn); + +struct JQObjectWrapperPrivate; + +class JQObjectWrapper{ +private: + QObject* m_qobject; + friend JQObjectWrapperPrivate; + JQObjectWrapperPrivate* p; +public: + JQObjectWrapper(); + JQObjectWrapper(JNIEnv* env, QSharedPointer&& link); + ~JQObjectWrapper(); + JQObjectWrapper(const JQObjectWrapper& other); + JQObjectWrapper(JQObjectWrapper&& other); + JQObjectWrapper& operator=(const JQObjectWrapper &wrapper); + JQObjectWrapper& operator=(JQObjectWrapper &&wrapper); + QSharedPointer link() const; + jobject javaObject(JNIEnv* env) const; + inline QObject* qobject() const { return m_qobject; } +}; + #endif #endif // REGISTRYUTIL_P_H diff --git a/src/cpp/QtJambi/scope.cpp b/src/cpp/QtJambi/scope.cpp index e73fb142..568bd74b 100644 --- a/src/cpp/QtJambi/scope.cpp +++ b/src/cpp/QtJambi/scope.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/scope.h b/src/cpp/QtJambi/scope.h index 9111ccee..e5d8f5fc 100644 --- a/src/cpp/QtJambi/scope.h +++ b/src/cpp/QtJambi/scope.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/setup.cpp b/src/cpp/QtJambi/setup.cpp index 8142471a..192d3a41 100644 --- a/src/cpp/QtJambi/setup.cpp +++ b/src/cpp/QtJambi/setup.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -37,6 +37,7 @@ QT_WARNING_DISABLE_DEPRECATED #include #include #include + #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #include #include @@ -80,8 +81,8 @@ void clearTypeHandlersAtShutdown(JNIEnv *env); void clearMessageHandlerAtShutdown(JNIEnv *env); void clearSuperTypesAtShutdown(JNIEnv *env); void clearMetaObjectsAtShutdown(JNIEnv * env); -void clearJarImportersAtShutdown(JNIEnv * env); void clearFunctionPointersAtShutdown(); +void clearObjectsByFunctionPointerAtShutdown(JNIEnv* env); void registerPointerContainerAccess(); JNIEnv *currentJNIEnvironment(bool initializeJavaThread = true); QObject* connectionSender(const QMetaObject::Connection* connection); @@ -875,11 +876,11 @@ void shutdown(JNIEnv * env) #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QtJambiVariant::unregisterHandler(); #endif //QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - clearJarImportersAtShutdown(env); clearSuperTypesAtShutdown(env); clearMetaObjectsAtShutdown(env); clearTypeHandlersAtShutdown(env); clearFunctionPointersAtShutdown(); + clearObjectsByFunctionPointerAtShutdown(env); if(env){ try{ Java::QtJambi::LibraryUtility::clear(env); diff --git a/src/cpp/QtJambi/supertypeinfo.cpp b/src/cpp/QtJambi/supertypeinfo.cpp index e307025a..59177a10 100644 --- a/src/cpp/QtJambi/supertypeinfo.cpp +++ b/src/cpp/QtJambi/supertypeinfo.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "qtjambiapi.h" #include "java_p.h" @@ -239,10 +240,78 @@ PtrOwnerFunction SuperTypeInfo::ownerFunction() const { } -SuperTypeInfos::SuperTypeInfos(JNIEnv *env, jobject obj) : QVector(), m_interfaceList(env, obj){} +SuperTypeInfos::SuperTypeInfos(JNIEnv *env, jobject obj) : QVector(), m_interfaceList(obj ? env->NewGlobalRef(obj) : nullptr){} + +SuperTypeInfos::SuperTypeInfos(const SuperTypeInfos& other) : QVector(other), m_interfaceList(nullptr){ + if(other.m_interfaceList){ + if(DefaultJniEnvironment env{0}){ + m_interfaceList = env->NewGlobalRef(other.m_interfaceList); + } + } +} + +SuperTypeInfos::SuperTypeInfos(SuperTypeInfos&& other) : QVector(std::move(other)), m_interfaceList(other.m_interfaceList){ + other.m_interfaceList = nullptr; +} + +SuperTypeInfos& SuperTypeInfos::operator=(const SuperTypeInfos& other){ + if(this!=&other){ + QVector& _this = *this; + _this = other; + if(DefaultJniEnvironment env{0}){ + if(m_interfaceList){ + env->DeleteGlobalRef(m_interfaceList); + } + if(other.m_interfaceList){ + m_interfaceList = env->NewGlobalRef(other.m_interfaceList); + }else{ + m_interfaceList = nullptr; + } + } + } + return *this; +} + +SuperTypeInfos& SuperTypeInfos::operator=(SuperTypeInfos&& other){ + if(this!=&other){ + QVector& _this = *this; + _this = std::move(other); + if(m_interfaceList){ + if(DefaultJniEnvironment env{0}){ + env->DeleteGlobalRef(m_interfaceList); + m_interfaceList = nullptr; + } + } + m_interfaceList = other.m_interfaceList; + other.m_interfaceList = nullptr; + } + return *this; +} + +SuperTypeInfos::~SuperTypeInfos(){ + try{ + if(m_interfaceList && !QCoreApplication::closingDown()){ + DEREF_JOBJECT; + if(DefaultJniEnvironment env{0}){ + jthrowable throwable = nullptr; + if(env->ExceptionCheck()){ + throwable = env->ExceptionOccurred(); + env->ExceptionClear(); + } + jobject interfaceList = m_interfaceList; + m_interfaceList = nullptr; + env->DeleteGlobalRef(interfaceList); + if(throwable){ + env->Throw(throwable); + env->DeleteLocalRef(throwable); + } + } + } + }catch(...){} +} jobject SuperTypeInfos::interfaceList(JNIEnv *env) const{ - return env->NewLocalRef(m_interfaceList.object()); + return m_interfaceList ? env->NewLocalRef(m_interfaceList) : nullptr; } void clearSuperTypesAtShutdown(JNIEnv *env){ @@ -255,7 +324,11 @@ void clearSuperTypesAtShutdown(JNIEnv *env){ } if(env){ for(SuperTypeInfos& info : superTypeInfosMap){ - info.m_interfaceList.clear(env); + if(info.m_interfaceList){ + jobject interfaceList = info.m_interfaceList; + info.m_interfaceList = nullptr; + env->DeleteGlobalRef(interfaceList); + } } } } diff --git a/src/cpp/QtJambi/supertypeinfo_p.h b/src/cpp/QtJambi/supertypeinfo_p.h index 0eba078a..9c71435a 100644 --- a/src/cpp/QtJambi/supertypeinfo_p.h +++ b/src/cpp/QtJambi/supertypeinfo_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -83,11 +83,16 @@ void swap(SuperTypeInfo& a, SuperTypeInfo& b) noexcept; class SuperTypeInfos : public QVector{ public: SuperTypeInfos() = default; + SuperTypeInfos(const SuperTypeInfos&); + SuperTypeInfos(SuperTypeInfos&&); SuperTypeInfos(JNIEnv *env, jobject obj); + ~SuperTypeInfos(); + SuperTypeInfos& operator=(const SuperTypeInfos&); + SuperTypeInfos& operator=(SuperTypeInfos&&); jobject interfaceList(JNIEnv *env) const; static const SuperTypeInfos& fromClass(JNIEnv *env, jclass cls); private: - JObjectWrapper m_interfaceList; + jobject m_interfaceList; friend void clearSuperTypesAtShutdown(JNIEnv *env); }; diff --git a/src/cpp/QtJambi/testapi.h b/src/cpp/QtJambi/testapi.h index 45b85574..5c9cff3a 100644 --- a/src/cpp/QtJambi/testapi.h +++ b/src/cpp/QtJambi/testapi.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/thread.cpp b/src/cpp/QtJambi/thread.cpp index 81e71b3c..7afe65fb 100644 --- a/src/cpp/QtJambi/thread.cpp +++ b/src/cpp/QtJambi/thread.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/threadapi.h b/src/cpp/QtJambi/threadapi.h index 2a767a11..e5d55830 100644 --- a/src/cpp/QtJambi/threadapi.h +++ b/src/cpp/QtJambi/threadapi.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/threadutils_p.h b/src/cpp/QtJambi/threadutils_p.h index dd6d1ff1..5fa63de5 100644 --- a/src/cpp/QtJambi/threadutils_p.h +++ b/src/cpp/QtJambi/threadutils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/typeentry.cpp b/src/cpp/QtJambi/typeentry.cpp index 97c681fe..da671386 100644 --- a/src/cpp/QtJambi/typeentry.cpp +++ b/src/cpp/QtJambi/typeentry.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -88,11 +88,32 @@ QtJambiTypeEntryPtr get_type_entry(JNIEnv* env, const std::type_info& typeId, bo } QtJambiTypeEntryPtr result; const char *qt_name = nullptr; + const char *java_name = nullptr; EntryTypes entryType = getEntryType(typeId); + switch(entryType){ + case EntryTypes::Unspecific: + if(qtName && (java_name = getJavaNameByFunctional(qtName))){ + qt_name = qtName; + entryType = EntryTypes::FunctionalTypeInfo; + } + break; + case EntryTypes::FunctionalTypeInfo: + qt_name = getQtName(typeId); + if(qtName){ + if(QLatin1String(qtName)!=QLatin1String(qt_name)){ + qt_name = qtName; + } + } + java_name = getJavaNameByFunctional(qt_name); + break; + default: + qt_name = getQtName(typeId); + java_name = getJavaName(typeId); + break; + } + if(entryType!=EntryTypes::Unspecific){ QTJAMBI_JNI_LOCAL_FRAME(env, 512); - qt_name = getQtName(typeId); - const char *java_name = getJavaName(typeId); if(qtName && entryType==EntryTypes::FunctionalTypeInfo){ if(QLatin1String(qtName)!=QLatin1String(qt_name)){ qt_name = qtName; @@ -101,7 +122,10 @@ QtJambiTypeEntryPtr get_type_entry(JNIEnv* env, const std::type_info& typeId, bo } jclass java_class = JavaAPI::resolveClass(env, java_name); if(!java_class){ - JavaException::raiseError(env, QLatin1String("class %1 cannot be found").arg(QString(java_name).replace('/', '.').replace('$', '.')) QTJAMBI_STACKTRACEINFO ); + if(java_name) + JavaException::raiseError(env, QLatin1String("class %1 cannot be found").arg(QString(java_name).replace('/', '.').replace('$', '.')) QTJAMBI_STACKTRACEINFO ); + else + JavaException::raiseError(env, QLatin1String("class %1 cannot be found").arg(qtName) QTJAMBI_STACKTRACEINFO ); return QtJambiTypeEntryPtr(); } @@ -3816,10 +3840,15 @@ QtJambiTypeEntry::NativeToJavaResult FunctionalTypeEntry::convertToJava(JNIEnv * if(javaType!=jValueType::l) JavaException::raiseIllegalArgumentException(env, "Cannot convert functional type" QTJAMBI_STACKTRACEINFO ); if(m_registered_functional_resolver){ - output.l = m_registered_functional_resolver(env, m_is_std_function ? qt_object : &qt_object); - if(output.l) + bool ok{false}; + output.l = m_registered_functional_resolver(env, m_is_std_function ? qt_object : &qt_object, &ok); + if(ok || output.l) return true; } + if(!qt_object){ + output.l = nullptr; + return true; + } output.l = env->NewObject(creatableClass(), creatorMethod(), nullptr); JavaException::check(env QTJAMBI_STACKTRACEINFO ); return QtJambiLink::createLinkForNativeObject( diff --git a/src/cpp/QtJambi/typeentry_p.h b/src/cpp/QtJambi/typeentry_p.h index 1de3d71a..aee66f09 100644 --- a/src/cpp/QtJambi/typeentry_p.h +++ b/src/cpp/QtJambi/typeentry_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/typemanager.cpp b/src/cpp/QtJambi/typemanager.cpp index 94ce313e..fe2a0685 100644 --- a/src/cpp/QtJambi/typemanager.cpp +++ b/src/cpp/QtJambi/typemanager.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/typemanager_p.h b/src/cpp/QtJambi/typemanager_p.h index 5a8662c5..98ab2b26 100644 --- a/src/cpp/QtJambi/typemanager_p.h +++ b/src/cpp/QtJambi/typemanager_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/typetests.h b/src/cpp/QtJambi/typetests.h index b095995e..4f3380b9 100644 --- a/src/cpp/QtJambi/typetests.h +++ b/src/cpp/QtJambi/typetests.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/utils.cpp b/src/cpp/QtJambi/utils.cpp index 5dfe7be4..d5f2eb8f 100644 --- a/src/cpp/QtJambi/utils.cpp +++ b/src/cpp/QtJambi/utils.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/utils.h b/src/cpp/QtJambi/utils.h index caeaed66..d1063ad3 100644 --- a/src/cpp/QtJambi/utils.h +++ b/src/cpp/QtJambi/utils.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi/utils_p.h b/src/cpp/QtJambi/utils_p.h index fd3d5baf..83d1e5ee 100644 --- a/src/cpp/QtJambi/utils_p.h +++ b/src/cpp/QtJambi/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -46,7 +46,7 @@ bool isLessThan(const QMetaType& keyMetaType, const void * ptr, const void* ptr2 bool isEquals(const QMetaType& keyMetaType, const void * ptr, const void* ptr2); #endif -#ifdef Q_OS_ANDROID +#if defined(Q_OS_ANDROID) || defined(Q_OS_FREEBSD) #define unique_id(id) qHash(QLatin1String((id).name())) #define typeid_equals(t1, t2) unique_id(t1)==unique_id(t2) #define typeid_not_equals(t1, t2) unique_id(t1)!=unique_id(t2) diff --git a/src/cpp/QtJambi/variant.cpp b/src/cpp/QtJambi/variant.cpp index c0dba1cc..e9e0ad83 100644 --- a/src/cpp/QtJambi/variant.cpp +++ b/src/cpp/QtJambi/variant.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi3DAnimation/QtJambi3DAnimation.pro b/src/cpp/QtJambi3DAnimation/QtJambi3DAnimation.pro index 68a4cb54..33988083 100644 --- a/src/cpp/QtJambi3DAnimation/QtJambi3DAnimation.pro +++ b/src/cpp/QtJambi3DAnimation/QtJambi3DAnimation.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core 3danimation diff --git a/src/cpp/QtJambi3DAnimation/hashes.h b/src/cpp/QtJambi3DAnimation/hashes.h index e860ff91..148fc778 100644 --- a/src/cpp/QtJambi3DAnimation/hashes.h +++ b/src/cpp/QtJambi3DAnimation/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi3DCore/QtJambi3DCore.pro b/src/cpp/QtJambi3DCore/QtJambi3DCore.pro index 6526069e..9fccc3ce 100644 --- a/src/cpp/QtJambi3DCore/QtJambi3DCore.pro +++ b/src/cpp/QtJambi3DCore/QtJambi3DCore.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core 3dcore diff --git a/src/cpp/QtJambi3DExtras/QtJambi3DExtras.pro b/src/cpp/QtJambi3DExtras/QtJambi3DExtras.pro index bd5e853b..4df9f352 100644 --- a/src/cpp/QtJambi3DExtras/QtJambi3DExtras.pro +++ b/src/cpp/QtJambi3DExtras/QtJambi3DExtras.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core 3dextras diff --git a/src/cpp/QtJambi3DInput/QtJambi3DInput.pro b/src/cpp/QtJambi3DInput/QtJambi3DInput.pro index faea7cf8..bb5550f9 100644 --- a/src/cpp/QtJambi3DInput/QtJambi3DInput.pro +++ b/src/cpp/QtJambi3DInput/QtJambi3DInput.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core 3dinput diff --git a/src/cpp/QtJambi3DInput/hashes.h b/src/cpp/QtJambi3DInput/hashes.h index 43d339ed..89c8556e 100644 --- a/src/cpp/QtJambi3DInput/hashes.h +++ b/src/cpp/QtJambi3DInput/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambi3DLogic/QtJambi3DLogic.pro b/src/cpp/QtJambi3DLogic/QtJambi3DLogic.pro index 13ce7861..c3a6a77b 100644 --- a/src/cpp/QtJambi3DLogic/QtJambi3DLogic.pro +++ b/src/cpp/QtJambi3DLogic/QtJambi3DLogic.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core 3dlogic diff --git a/src/cpp/QtJambi3DQuick/QtJambi3DQuick.pro b/src/cpp/QtJambi3DQuick/QtJambi3DQuick.pro index 22d9c866..9a7e7b95 100644 --- a/src/cpp/QtJambi3DQuick/QtJambi3DQuick.pro +++ b/src/cpp/QtJambi3DQuick/QtJambi3DQuick.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) greaterThan(QT_MAJOR_VERSION, 5): { diff --git a/src/cpp/QtJambi3DQuickExtras/QtJambi3DQuickExtras.pro b/src/cpp/QtJambi3DQuickExtras/QtJambi3DQuickExtras.pro index 03bf6fda..21949272 100644 --- a/src/cpp/QtJambi3DQuickExtras/QtJambi3DQuickExtras.pro +++ b/src/cpp/QtJambi3DQuickExtras/QtJambi3DQuickExtras.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) greaterThan(QT_MAJOR_VERSION, 5): { diff --git a/src/cpp/QtJambi3DQuickScene2D/QtJambi3DQuickScene2D.pro b/src/cpp/QtJambi3DQuickScene2D/QtJambi3DQuickScene2D.pro index 352dcefe..f1f32fc2 100644 --- a/src/cpp/QtJambi3DQuickScene2D/QtJambi3DQuickScene2D.pro +++ b/src/cpp/QtJambi3DQuickScene2D/QtJambi3DQuickScene2D.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) greaterThan(QT_MAJOR_VERSION, 5): { diff --git a/src/cpp/QtJambi3DRender/QtJambi3DRender.pro b/src/cpp/QtJambi3DRender/QtJambi3DRender.pro index b63c67bc..4190492e 100644 --- a/src/cpp/QtJambi3DRender/QtJambi3DRender.pro +++ b/src/cpp/QtJambi3DRender/QtJambi3DRender.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core 3drender diff --git a/src/cpp/QtJambi3DRender/hashes.h b/src/cpp/QtJambi3DRender/hashes.h index 781cd1b4..5d2de1a5 100644 --- a/src/cpp/QtJambi3DRender/hashes.h +++ b/src/cpp/QtJambi3DRender/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiActiveX/QtJambiActiveX.pro b/src/cpp/QtJambiActiveX/QtJambiActiveX.pro index fc28fc10..9019d40f 100644 --- a/src/cpp/QtJambiActiveX/QtJambiActiveX.pro +++ b/src/cpp/QtJambiActiveX/QtJambiActiveX.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core gui widgets diff --git a/src/cpp/QtJambiBluetooth/QtJambiBluetooth.pro b/src/cpp/QtJambiBluetooth/QtJambiBluetooth.pro index 3ba718fd..a6bd9dcc 100644 --- a/src/cpp/QtJambiBluetooth/QtJambiBluetooth.pro +++ b/src/cpp/QtJambiBluetooth/QtJambiBluetooth.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core bluetooth diff --git a/src/cpp/QtJambiBluetooth/hashes.h b/src/cpp/QtJambiBluetooth/hashes.h index 78ca9d54..282da6a0 100644 --- a/src/cpp/QtJambiBluetooth/hashes.h +++ b/src/cpp/QtJambiBluetooth/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiBluetooth/utils.cpp b/src/cpp/QtJambiBluetooth/utils.cpp index 2dfcc641..c4c5c969 100644 --- a/src/cpp/QtJambiBluetooth/utils.cpp +++ b/src/cpp/QtJambiBluetooth/utils.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiBluetooth/utils_p.h b/src/cpp/QtJambiBluetooth/utils_p.h index 94a6861b..585bf6f8 100644 --- a/src/cpp/QtJambiBluetooth/utils_p.h +++ b/src/cpp/QtJambiBluetooth/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiCharts/QtJambiCharts.pro b/src/cpp/QtJambiCharts/QtJambiCharts.pro index c77e048c..544dd6d8 100644 --- a/src/cpp/QtJambiCharts/QtJambiCharts.pro +++ b/src/cpp/QtJambiCharts/QtJambiCharts.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core gui widgets charts diff --git a/src/cpp/QtJambiConcurrent/QtJambiConcurrent.pro b/src/cpp/QtJambiConcurrent/QtJambiConcurrent.pro index 75d973af..ec79d835 100644 --- a/src/cpp/QtJambiConcurrent/QtJambiConcurrent.pro +++ b/src/cpp/QtJambiConcurrent/QtJambiConcurrent.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) SOURCES += impl.cpp diff --git a/src/cpp/QtJambiConcurrent/impl.cpp b/src/cpp/QtJambiConcurrent/impl.cpp index 08aca299..ec7490d4 100644 --- a/src/cpp/QtJambiConcurrent/impl.cpp +++ b/src/cpp/QtJambiConcurrent/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -612,9 +612,13 @@ struct RunFunctorInvoker<9,PromisePolicy::TypedPromise> : Java::QtConcurrent::Qt }; #endif +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) && (defined(Q_OS_ANDROID) /*|| defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_SOLARIS)*/) +#define HANDLE_EXCEPTION +#endif + template struct RunFunctorInvocationDecider : RunFunctorInvoker{ -#if defined(Q_OS_ANDROID) && QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#if defined(HANDLE_EXCEPTION) static void handleException(QSharedPointer& future, std::exception_ptr exception, Args...){ while(!future->isValid()) QThread::msleep(50); @@ -626,7 +630,7 @@ struct RunFunctorInvocationDecider : RunFunctorInvoker= QT_VERSION_CHECK(6, 0, 0) template struct RunFunctorInvocationDecider&, Args...> : RunFunctorInvoker{ -#ifdef Q_OS_ANDROID +#if defined(HANDLE_EXCEPTION) static void handleException(QSharedPointer&, std::exception_ptr exception, QPromise& promise, Args...){ QFutureInterfaceBase& future = reinterpret_cast(promise); future.reportException(exception); @@ -636,7 +640,7 @@ struct RunFunctorInvocationDecider&, Args...> : RunFunctorInvoker template struct RunFunctorInvocationDecider&, Args...> : RunFunctorInvoker{ -#ifdef Q_OS_ANDROID +#if defined(HANDLE_EXCEPTION) static void handleException(QSharedPointer&, std::exception_ptr exception, QPromise& promise, Args...){ QFutureInterfaceBase& future = reinterpret_cast(promise); future.reportException(exception); @@ -660,11 +664,11 @@ class RunFunctor: public Functor { if(JniEnvironment env{200}){ if(jobject functor = toLocalRef(env, m_functor)){ QtJambiScope scope; -#if defined(Q_OS_ANDROID) && QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#if defined(HANDLE_EXCEPTION) try { #endif RunFunctorInvocationDecider::run(env, functor, qtjambi_cast(env, scope, args)...); -#if defined(Q_OS_ANDROID) && QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#if defined(HANDLE_EXCEPTION) } catch (const JavaException& exn) { RunFunctorInvocationDecider::handleException(future, std::make_exception_ptr(QUnhandledException(std::make_exception_ptr(exn))), args...); } catch (...) { @@ -746,11 +750,11 @@ class CallableFunctor: public Functor { if(jobject functor = toLocalRef(env, m_functor)){ jobject javaResult = nullptr; QtJambiScope scope; -#if defined(Q_OS_ANDROID) && QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#if defined(HANDLE_EXCEPTION) try { #endif javaResult = CallableFunctorInvoker::call(env, functor, qtjambi_cast(env, scope, args)...); -#if defined(Q_OS_ANDROID) && QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#if defined(HANDLE_EXCEPTION) } catch (const JavaException& exn) { RunFunctorInvocationDecider::handleException(future, std::make_exception_ptr(QUnhandledException(std::make_exception_ptr(exn))), args...); } catch (...) { diff --git a/src/cpp/QtJambiCore/QHash_shell.cpp b/src/cpp/QtJambiCore/QHash_shell.cpp index 19286c29..0c390c3f 100644 --- a/src/cpp/QtJambiCore/QHash_shell.cpp +++ b/src/cpp/QtJambiCore/QHash_shell.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiCore/QIterator_shell.cpp b/src/cpp/QtJambiCore/QIterator_shell.cpp index 020ab77c..c36abc53 100644 --- a/src/cpp/QtJambiCore/QIterator_shell.cpp +++ b/src/cpp/QtJambiCore/QIterator_shell.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiCore/QLinkedList_shell.cpp b/src/cpp/QtJambiCore/QLinkedList_shell.cpp index c8a84c29..0f893021 100644 --- a/src/cpp/QtJambiCore/QLinkedList_shell.cpp +++ b/src/cpp/QtJambiCore/QLinkedList_shell.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiCore/QList_shell.cpp b/src/cpp/QtJambiCore/QList_shell.cpp index 616f973a..f14f7a07 100644 --- a/src/cpp/QtJambiCore/QList_shell.cpp +++ b/src/cpp/QtJambiCore/QList_shell.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -955,7 +955,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QL // new QItemSelection(QItemSelection) #if QT_CONFIG(itemmodel) -void __qt_construct_QItemSelection_3(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QItemSelection_QItemSelection(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QItemSelection(const QModelIndex & topLeft, const QModelIndex & bottomRight)") Q_ASSERT(__java_arguments); @@ -982,7 +982,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QI #if QT_CONFIG(itemmodel) jvalue arguments; arguments.l = other; - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QItemSelection_3, sizeof(QItemSelection), typeid(QItemSelection), false, QtJambiPrivate::QListAccess::newInstance(), &arguments); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QItemSelection_QItemSelection, sizeof(QItemSelection), typeid(QItemSelection), false, QtJambiPrivate::QListAccess::newInstance(), &arguments); #else Q_UNUSED(__jni_object) Q_UNUSED(__jni_class) diff --git a/src/cpp/QtJambiCore/QMap_shell.cpp b/src/cpp/QtJambiCore/QMap_shell.cpp index 36c84aa9..232c7354 100644 --- a/src/cpp/QtJambiCore/QMap_shell.cpp +++ b/src/cpp/QtJambiCore/QMap_shell.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiCore/QSet_shell.cpp b/src/cpp/QtJambiCore/QSet_shell.cpp index 5d9cd044..dc28b1c8 100644 --- a/src/cpp/QtJambiCore/QSet_shell.cpp +++ b/src/cpp/QtJambiCore/QSet_shell.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiCore/QVector_shell.cpp b/src/cpp/QtJambiCore/QVector_shell.cpp index 3da15c65..d052b6f2 100644 --- a/src/cpp/QtJambiCore/QVector_shell.cpp +++ b/src/cpp/QtJambiCore/QVector_shell.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiCore/QtJambiCore.pro b/src/cpp/QtJambiCore/QtJambiCore.pro index de2eb625..73e0ca55 100644 --- a/src/cpp/QtJambiCore/QtJambiCore.pro +++ b/src/cpp/QtJambiCore/QtJambiCore.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) HEADERS += \ diff --git a/src/cpp/QtJambiCore/future.cpp b/src/cpp/QtJambiCore/future.cpp index c1f476af..acb1bb7f 100644 --- a/src/cpp/QtJambiCore/future.cpp +++ b/src/cpp/QtJambiCore/future.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -53,21 +53,10 @@ #include #include #include - -#ifdef Q_OS_ANDROID -#define unique_id(id) qHash(QLatin1String((id).name())) -#define typeid_equals(t1, t2) unique_id(t1)==unique_id(t2) -#define typeid_not_equals(t1, t2) unique_id(t1)!=unique_id(t2) -#else -#define unique_id(id) (id).hash_code() -#define typeid_equals(t1, t2) t1==t2 -#define typeid_not_equals(t1, t2) t1!=t2 -#endif +#include #if QT_CONFIG(future) -const std::type_info& typeid_QFutureInterfaceBase_shell(); - template class QFutureInterface_shell : public QFutureInterface, public QtJambiShellInterface { @@ -156,7 +145,7 @@ extern "C" Q_DECL_EXPORT jobject JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core // emitting (writeSignalFunction) // emitting (writeConstructors) // new QFutureInterface(QFutureInterfaceBase::State initialState) -void __qt_construct_QFutureInterface_QVariant__0(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject, jvalue*) +void __qt_construct_QFutureInterface_QVariant__0(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject, jvalue*, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QFutureInterface(QFutureInterfaceBase::State initialState)") #if QT_CONFIG(future) @@ -170,7 +159,7 @@ void __qt_construct_QFutureInterface_QVariant__0(void* __qtjambi_ptr, JNIEnv* __ } // new QFutureInterface(QFutureInterfaceBase::State initialState) -void __qt_construct_QFutureInterface_void__0(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject, jvalue*) +void __qt_construct_QFutureInterface_void__0(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject, jvalue*, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QFutureInterface(QFutureInterfaceBase::State initialState)") #if QT_CONFIG(future) @@ -184,7 +173,7 @@ void __qt_construct_QFutureInterface_void__0(void* __qtjambi_ptr, JNIEnv* __jni_ } // new QFutureInterface(QFutureInterfaceBase::State initialState) -void __qt_construct_QFutureInterface_QVariant__1(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QFutureInterface_QVariant__1(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QFutureInterface(QFutureInterfaceBase::State initialState)") #if QT_CONFIG(future) @@ -202,7 +191,7 @@ void __qt_construct_QFutureInterface_QVariant__1(void* __qtjambi_ptr, JNIEnv* __ } // new QFutureInterface(const QFutureInterface & other) -void __qt_construct_QFutureInterface_QVariant__2(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QFutureInterface_QVariant__2(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QFutureInterface(const QFutureInterface & other)") #if QT_CONFIG(future) @@ -225,7 +214,7 @@ void __qt_construct_QFutureInterface_QVariant__2(void* __qtjambi_ptr, JNIEnv* __ } // new QFutureInterface(QFutureInterfaceBase::State initialState) -void __qt_construct_QFutureInterface_void__1(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QFutureInterface_void__1(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QFutureInterface(QFutureInterfaceBase::State initialState)") #if QT_CONFIG(future) @@ -243,7 +232,7 @@ void __qt_construct_QFutureInterface_void__1(void* __qtjambi_ptr, JNIEnv* __jni_ } // new QFutureInterface(const QFutureInterface & other) -void __qt_construct_QFutureInterface_void__2(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QFutureInterface_void__2(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QFutureInterface(const QFutureInterface & other)") #if QT_CONFIG(future) @@ -581,7 +570,7 @@ void QFutureWatcher_shell::operator delete(void * ptr) noexcept { } // new QFutureWatcher(QObject*) -void __qt_construct_QFutureWatcher_1(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject, jvalue* __java_arguments) +void __qt_construct_QFutureWatcher_1(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QFutureWatcher(QObject*)") #if QT_CONFIG(future) @@ -594,9 +583,10 @@ void __qt_construct_QFutureWatcher_1(void* __qtjambi_ptr, JNIEnv* __jni_env, job jobject jfi = QtJambiAPI::getQFutureInterfaceFromQFuture(env, future); QFutureInterfaceBase* fibase = qtjambi_cast(env, jfi); const std::type_info& fibaseType = typeid(*fibase); + const std::type_info& fibaseshellType = typeid_QFutureInterfaceBase_shell(); if(dynamic_cast*>(fibase) || typeid_equals(fibaseType, typeid(QFutureInterfaceBase)) - || typeid_equals(fibaseType, typeid_QFutureInterfaceBase_shell())){ + || typeid_equals(fibaseType, fibaseshellType)){ watcher->m_isVoid = true; reinterpret_cast*>(base)->setFuture(QFuture(fibase)); }else{ diff --git a/src/cpp/QtJambiCore/hashes.h b/src/cpp/QtJambiCore/hashes.h index 7a3e5010..196d1279 100644 --- a/src/cpp/QtJambiCore/hashes.h +++ b/src/cpp/QtJambiCore/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -604,53 +604,6 @@ inline bool operator==(const QMetaProperty &value1, const QMetaProperty &value2) && value2.propertyIndex()==value2.propertyIndex(); } -#ifdef QTJAMBI_GENERATOR_RUNNING -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) -QDebug operator<<(QDebug out, const QByteArrayView &); - -struct QtJambiItemSelection{ - QtJambiItemSelection(std::initializer_list); - QtJambiItemSelection(); -}; -#endif - -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) -inline bool operator<(const QString &, const QString &) noexcept{return false;} -inline bool operator<(const QChar &, const QChar &) noexcept{return false;} -inline bool operator==(const QChar &, const QChar &) noexcept{return false;} -#endif - -struct QtJambiStringList{ - QtJambiStringList() = delete; -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - QString join(const QString &sep); - QString join(QChar sep); - QStringList filter(const QString &str, Qt::CaseSensitivity cs); - QStringList filter(const QRegularExpression &re); - int removeDuplicates(); - void replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs); - void replaceInStrings(const QRegularExpression &re, const QString &after); - void sort(Qt::CaseSensitivity cs); -#else - QtJambiStringList(std::initializer_list); - QtJambiStringList(QList); - void sort(Qt::CaseSensitivity cs); - qsizetype removeDuplicates(); - QString join(QStringView sep); - QString join(QChar sep); - QStringList filter(const QStringView str, Qt::CaseSensitivity cs); - void replaceInStrings(QStringView before, QStringView after, Qt::CaseSensitivity cs); - bool contains(const QStringView str, Qt::CaseSensitivity cs) noexcept; - #if QT_CONFIG(regularexpression) - QStringList filter(const QRegularExpression &re); - void replaceInStrings(const QRegularExpression &re, const QString &after); - qsizetype indexOf(const QRegularExpression &re, qsizetype from); - qsizetype lastIndexOf(const QRegularExpression &re, qsizetype from); -#endif // QT_CONFIG(regularexpression) -#endif -}; -#endif //QTJAMBI_GENERATOR_RUNNING - #if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) #if QT_CONFIG(permissions) inline size_t qHash(const QBluetoothPermission &, size_t seed = 0) @@ -726,7 +679,8 @@ inline bool operator==(const QPermission &v1, const QPermission &v2){ } return false; } -#endif +#endif // QT_CONFIG(permissions) + #if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) inline bool operator==(const QUuid::Id128Bytes &v1, const QUuid::Id128Bytes &v2){ return memcmp(&v1, &v2, sizeof(QUuid::Id128Bytes))==0; @@ -734,7 +688,55 @@ inline bool operator==(const QUuid::Id128Bytes &v1, const QUuid::Id128Bytes &v2) inline size_t qHash(const QUuid::Id128Bytes &value, size_t seed = 0){ return qHashBits(&value, sizeof(QUuid::Id128Bytes), seed); } +#endif // QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) + +#endif // QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) + +#ifdef QTJAMBI_GENERATOR_RUNNING +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +QDebug operator<<(QDebug out, const QByteArrayView &); + +struct QtJambiItemSelection{ + QtJambiItemSelection(std::initializer_list); + QtJambiItemSelection(); +}; #endif -#endif + +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +inline bool operator<(const QString &, const QString &) noexcept{return false;} +inline bool operator<(const QChar &, const QChar &) noexcept{return false;} +inline bool operator==(const QChar &, const QChar &) noexcept{return false;} +#endif // QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + +struct QtJambiStringList{ + QtJambiStringList() = delete; +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + QString join(const QString &sep); + QString join(QChar sep); + QStringList filter(const QString &str, Qt::CaseSensitivity cs); + QStringList filter(const QRegularExpression &re); + int removeDuplicates(); + void replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs); + void replaceInStrings(const QRegularExpression &re, const QString &after); + void sort(Qt::CaseSensitivity cs); +#else // QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QtJambiStringList(std::initializer_list); + QtJambiStringList(QList); + void sort(Qt::CaseSensitivity cs); + qsizetype removeDuplicates(); + QString join(QStringView sep); + QString join(QChar sep); + QStringList filter(const QStringView str, Qt::CaseSensitivity cs); + void replaceInStrings(QStringView before, QStringView after, Qt::CaseSensitivity cs); + bool contains(const QStringView str, Qt::CaseSensitivity cs) noexcept; +#if QT_CONFIG(regularexpression) + QStringList filter(const QRegularExpression &re); + void replaceInStrings(const QRegularExpression &re, const QString &after); + qsizetype indexOf(const QRegularExpression &re, qsizetype from); + qsizetype lastIndexOf(const QRegularExpression &re, qsizetype from); +#endif // QT_CONFIG(regularexpression) +#endif // QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +}; +#endif //QTJAMBI_GENERATOR_RUNNING #endif // QTJAMBICORE_HASHES_H diff --git a/src/cpp/QtJambiCore/impl.cpp b/src/cpp/QtJambiCore/impl.cpp index b8f72625..51786f5a 100644 --- a/src/cpp/QtJambiCore/impl.cpp +++ b/src/cpp/QtJambiCore/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -1481,11 +1481,27 @@ QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QObject_metaObject) return _result; } +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) +extern "C" Q_DECL_EXPORT jint JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_Qt_00024partial_1ordering_unordered) + (JNIEnv *, jclass) +{ + return jint(QtPrivate::Uncomparable::Unordered); +} +#endif + +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) +QObject* qtjambi_findChild(JNIEnv *, const QObject *__qt_this, QAnyStringView aName, Qt::FindChildOptions options){ +#else QObject* qtjambi_findChild(JNIEnv *, const QObject *__qt_this, const QString& aName, Qt::FindChildOptions options){ +#endif return qt_qFindChild_helper(__qt_this, aName, QObject::staticMetaObject, options); } +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) +QObject* qtjambi_findChild(JNIEnv *env, const QObject *__qt_this, jclass type, QAnyStringView aName, Qt::FindChildOptions options){ +#else QObject* qtjambi_findChild(JNIEnv *env, const QObject *__qt_this, jclass type, const QString& aName, Qt::FindChildOptions options){ +#endif const QMetaObject *metaObject = CoreAPI::metaObjectForClass(env, type); QtJambiAPI::checkNullPointer(env, metaObject); return qt_qFindChild_helper(__qt_this, aName, *metaObject, options); @@ -1494,7 +1510,11 @@ QObject* qtjambi_findChild(JNIEnv *env, const QObject *__qt_this, jclass type, c #if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0) QList qtjambi_findChildren(JNIEnv *, const QObject *__qt_this, Qt::FindChildOptions options){ QList list; - qt_qFindChildren_helper(__qt_this, QObject::staticMetaObject, reinterpret_cast*>(&list), options); + qt_qFindChildren_helper(__qt_this, +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) + QAnyStringView(), +#endif + QObject::staticMetaObject, reinterpret_cast*>(&list), options); return list; } @@ -1502,18 +1522,42 @@ QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, jcla const QMetaObject *metaObject = CoreAPI::metaObjectForClass(env, type); QtJambiAPI::checkNullPointer(env, metaObject); QList list; - qt_qFindChildren_helper(__qt_this, *metaObject, reinterpret_cast*>(&list), options); + qt_qFindChildren_helper(__qt_this, +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) + QAnyStringView(), +#endif + *metaObject, reinterpret_cast*>(&list), options); return list; } #endif +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) +QObject* qtjambi_findChild(JNIEnv *, const QObject *__qt_this, Qt::FindChildOptions options){ + return qt_qFindChild_helper(__qt_this, {}, QObject::staticMetaObject, options); +} + +QObject* qtjambi_findChild(JNIEnv *env, const QObject *__qt_this, jclass type, Qt::FindChildOptions options){ + const QMetaObject *metaObject = CoreAPI::metaObjectForClass(env, type); + QtJambiAPI::checkNullPointer(env, metaObject); + return qt_qFindChild_helper(__qt_this, {}, *metaObject, options); +} +#endif + +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) +QList qtjambi_findChildren(JNIEnv *, const QObject *__qt_this, QAnyStringView aName, Qt::FindChildOptions options){ +#else QList qtjambi_findChildren(JNIEnv *, const QObject *__qt_this, const QString& aName, Qt::FindChildOptions options){ +#endif QList list; qt_qFindChildren_helper(__qt_this, aName, QObject::staticMetaObject, reinterpret_cast*>(&list), options); return list; } +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) +QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, jclass type, QAnyStringView aName, Qt::FindChildOptions options){ +#else QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, jclass type, const QString& aName, Qt::FindChildOptions options){ +#endif const QMetaObject *metaObject = CoreAPI::metaObjectForClass(env, type); QtJambiAPI::checkNullPointer(env, metaObject); QList list; @@ -2974,7 +3018,7 @@ class BindingFunctionVTableHelper : public QtPrivate::BindingFunctionVTable{ }; // new QUntypedPropertyBinding(QMetaType, const BindingFunctionVTable *, void *, const QPropertyBindingSourceLocation &) -void __qt_construct_QUntypedPropertyBinding_2(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QUntypedPropertyBinding_QMetaType_BindingFunctionVTable_QPropertyBindingSourceLocation(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { static_assert (alignof(JObjectWrapper) <= alignof(std::max_align_t), "Bindings do not support overaligned functors!"); QTJAMBI_NATIVE_METHOD_CALL("construct QUntypedPropertyBinding(const QUntypedPropertyBinding & other)") @@ -3046,7 +3090,7 @@ void __qt_construct_QUntypedPropertyBinding_2(void* __qtjambi_ptr, JNIEnv* __jni } // new QUntypedPropertyBinding(QPropertyBindingPrivate *) -void __qt_construct_QUntypedPropertyBinding_3(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QUntypedPropertyBinding_QPropertyBindingPrivate(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QUntypedPropertyBinding(QPropertyBindingPrivate *)") jobject data0 = __java_arguments[0].l; @@ -3111,7 +3155,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QU typeId = &typeid(QUntypedPropertyBinding); } - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QUntypedPropertyBinding_2, sizeof(QUntypedPropertyBinding), *typeId, false, arguments); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QUntypedPropertyBinding_QMetaType_BindingFunctionVTable_QPropertyBindingSourceLocation, sizeof(QUntypedPropertyBinding), *typeId, false, arguments); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END @@ -3159,13 +3203,13 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QU }else{ typeId = &typeid(QUntypedPropertyBinding); } - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QUntypedPropertyBinding_3, sizeof(QUntypedPropertyBinding), *typeId, false, &arguments); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QUntypedPropertyBinding_QPropertyBindingPrivate, sizeof(QUntypedPropertyBinding), *typeId, false, &arguments); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END } -void __qt_construct_QUntypedPropertyBinding_1(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments); +void __qt_construct_QUntypedPropertyBinding_cref_QUntypedPropertyBinding(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool); // QUntypedPropertyBinding::QUntypedPropertyBinding(QUntypedPropertyBinding) extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QUntypedPropertyBinding_initialize_1native__Lio_qt_core_QUntypedPropertyBinding_2Lio_qt_core_QUntypedPropertyBinding_2) @@ -3210,17 +3254,14 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QU }else{ typeId = &typeid(QUntypedPropertyBinding); } - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QUntypedPropertyBinding_1, sizeof(QUntypedPropertyBinding), *typeId, false, &arguments); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QUntypedPropertyBinding_cref_QUntypedPropertyBinding, sizeof(QUntypedPropertyBinding), *typeId, false, &arguments); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END } -void __qt_construct_QUntypedBindable_1(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments); #if QT_VERSION >= QT_VERSION_CHECK(6,5,0) -void __qt_construct_QUntypedBindable_2(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments); -#define BINDABLE_CONSTRUCT __qt_construct_QUntypedBindable_2 - +void __qt_construct_QUntypedBindable_QObject_ptr_cref_QMetaProperty_const_QtPrivate_QBindableInterface_ptr(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool); // QUntypedBindable::QUntypedBindable(QObject*,QMetaProperty,const QtPrivate::QBindableInterface*) extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QUntypedBindable_initialize_1native__Lio_qt_core_QUntypedBindable_2Lio_qt_core_QObject_2Lio_qt_core_QMetaProperty_2Lio_qt_core_QBindableInterface_2) @@ -3268,16 +3309,16 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QU arguments[0].l = obj0; arguments[1].l = property1; arguments[2].l = i2; - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QUntypedBindable_1, sizeof(QUntypedBindable), *typeId, true, arguments); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QUntypedBindable_QObject_ptr_cref_QMetaProperty_const_QtPrivate_QBindableInterface_ptr, sizeof(QUntypedBindable), *typeId, true, arguments); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END } -#else -#define BINDABLE_CONSTRUCT __qt_construct_QUntypedBindable_1 #endif +void __qt_construct_QUntypedBindable_QUntypedPropertyData_ptr_const_QtPrivate_QBindableInterface_ptr(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool); + // QUntypedBindable::QUntypedBindable(QUntypedPropertyData * d, const QtPrivate::QBindableInterface * i) extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QUntypedBindable_initialize_1native__Lio_qt_core_QUntypedBindable_2Lio_qt_core_QUntypedPropertyData_2Lio_qt_core_QBindableInterface_2) (JNIEnv *__jni_env, @@ -3322,7 +3363,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QU }else{ typeId = &typeid(QUntypedBindable); } - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &BINDABLE_CONSTRUCT, sizeof(QUntypedBindable), *typeId, true, arguments); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QUntypedBindable_QUntypedPropertyData_ptr_const_QtPrivate_QBindableInterface_ptr, sizeof(QUntypedBindable), *typeId, true, arguments); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END @@ -4590,10 +4631,10 @@ size_t sizeof_QPropertyObserver_shell(); void __qt_destruct_QPropertyObserver(void* ptr); size_t sizeof_QPropertyObserver_shell(); void __qt_construct_QPropertyObserver_with_ChangeHandler(void* __qtjambi_ptr, void (*changeHandler)(QPropertyObserver*, QUntypedPropertyData *)); -void __qt_construct_QPropertyObserver_1(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments); +void __qt_construct_QPropertyObserver_QUntypedPropertyData_ptr(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool); void deleter_QPropertyObserver(void *ptr, bool); -void __qt_construct_QPropertyChangeHandler(void* __qtjambi_ptr, JNIEnv*, jobject, jvalue*) +void __qt_construct_QPropertyChangeHandler(void* __qtjambi_ptr, JNIEnv*, jobject, jvalue*, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QPropertyChangeHandler()") __qt_construct_QPropertyObserver_with_ChangeHandler(__qtjambi_ptr, [](QPropertyObserver* self, QUntypedPropertyData *){ @@ -4613,7 +4654,7 @@ void __qt_construct_QPropertyChangeHandler(void* __qtjambi_ptr, JNIEnv*, jobject }); } -void __qt_construct_QPropertyNotifier(void* __qtjambi_ptr, JNIEnv*, jobject, jvalue*) +void __qt_construct_QPropertyNotifier(void* __qtjambi_ptr, JNIEnv*, jobject, jvalue*, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QPropertyNotifier()") __qt_construct_QPropertyObserver_with_ChangeHandler(__qtjambi_ptr, [](QPropertyObserver* self, QUntypedPropertyData *){ @@ -4675,7 +4716,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QA }else{ typeId = &typeid(QPropertyObserver); } - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QPropertyObserver_1, sizeof_QPropertyObserver_shell(), *typeId, true, &deleter_QPropertyObserver, &arguments); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QPropertyObserver_QUntypedPropertyData_ptr, sizeof_QPropertyObserver_shell(), *typeId, true, &deleter_QPropertyObserver, &arguments); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END @@ -4724,7 +4765,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_Q# args.jvalMember = val;\ QTJAMBI_TRY{\ QtJambiShell::initialize(__jni_env, __jni_class, __jni_object,\ - [](void* __qtjambi_ptr, JNIEnv*, jobject, jvalue* __java_arguments){\ + [](void* __qtjambi_ptr, JNIEnv*, jobject, jvalue* __java_arguments, bool){\ Q_ASSERT(__java_arguments);\ new(__qtjambi_ptr) QPropertyData(__java_arguments->jvalMember);\ },\ @@ -4799,7 +4840,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QP QMetaType& metaType = qtjambi_cast(__jni_env, __metaType); if(metaType.flags() & QMetaType::IsPointer){ QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, - [](void* __qtjambi_ptr, JNIEnv* env, jobject, jvalue* __java_arguments){ + [](void* __qtjambi_ptr, JNIEnv* env, jobject, jvalue* __java_arguments, bool){ Q_ASSERT(__java_arguments); void* _result; if(__java_arguments[1].l){ @@ -4821,7 +4862,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QP }, args); }else{ QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, - [](void* __qtjambi_ptr, JNIEnv* env, jobject, jvalue* __java_arguments){ + [](void* __qtjambi_ptr, JNIEnv* env, jobject, jvalue* __java_arguments, bool){ Q_ASSERT(__java_arguments); QMetaType& metaType = qtjambi_cast(env, __java_arguments[0].l); if(__java_arguments[1].l){ @@ -5405,7 +5446,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QM } // new QByteArrayView(QByteArray) -void __qt_construct_QByteArrayView_1(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QByteArrayView_QByteArray(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QByteArrayView(QByteArray)") const QByteArray& data = qtjambi_cast(__jni_env, __java_arguments->l); @@ -5426,14 +5467,14 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QB QTJAMBI_TRY{ jvalue argument; argument.l = data; - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QByteArrayView_1, sizeof(QByteArrayView), typeid(QByteArrayView), false, &argument); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QByteArrayView_QByteArray, sizeof(QByteArrayView), typeid(QByteArrayView), false, &argument); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END } // new QByteArrayView(Buffer) -void __qt_construct_QByteArrayView_2(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QByteArrayView_Buffer(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QByteArrayView(Buffer)") void* address = __jni_env->GetDirectBufferAddress(__java_arguments[0].l); @@ -5459,14 +5500,14 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QB argument[0].l = data; argument[1].j = offset; argument[2].j = length; - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QByteArrayView_2, sizeof(QByteArrayView), typeid(QByteArrayView), false, argument); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QByteArrayView_Buffer, sizeof(QByteArrayView), typeid(QByteArrayView), false, argument); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END } // new QByteArrayView(Buffer,qsizetype) -void __qt_construct_QByteArrayView_3(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QByteArrayView_Buffer_qsizetype(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QByteArrayView(Buffer)") JBufferConstData* bufferData = new JBufferConstData(__jni_env, __java_arguments[0].l); @@ -5494,7 +5535,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QB jvalue argument[2]; argument[0].l = data; argument[1].l = pointerOut; - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QByteArrayView_3, sizeof(QByteArrayView), typeid(QByteArrayView), false, argument); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QByteArrayView_Buffer_qsizetype, sizeof(QByteArrayView), typeid(QByteArrayView), false, argument); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END @@ -5512,7 +5553,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QB } // new QByteArrayView(String) -void __qt_construct_QByteArrayView_4(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QByteArrayView_String(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QByteArrayView(String)") J2CStringBuffer* bufferData = new J2CStringBuffer(__jni_env, jstring(__java_arguments[0].l)); @@ -5540,7 +5581,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QB jvalue argument[2]; argument[0].l = data; argument[1].l = pointerOut; - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QByteArrayView_4, sizeof(QByteArrayView), typeid(QByteArrayView), false, argument); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QByteArrayView_String, sizeof(QByteArrayView), typeid(QByteArrayView), false, argument); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END @@ -5558,7 +5599,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QB } // new QByteArrayView(byte[],int) -void __qt_construct_QByteArrayView_5(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QByteArrayView_byte_array_int(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QByteArrayView(byte[])") JByteArrayPointer* bufferData = new JByteArrayPointer(__jni_env, jbyteArray(__java_arguments[0].l)); @@ -5588,7 +5629,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_core_QB argument[1].i = offset; argument[2].i = length; argument[3].l = pointerOut; - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QByteArrayView_5, sizeof(QByteArrayView), typeid(QByteArrayView), false, argument); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QByteArrayView_byte_array_int, sizeof(QByteArrayView), typeid(QByteArrayView), false, argument); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END diff --git a/src/cpp/QtJambiCore/pch_p.h b/src/cpp/QtJambiCore/pch_p.h index 8ad81561..7c11d576 100644 --- a/src/cpp/QtJambiCore/pch_p.h +++ b/src/cpp/QtJambiCore/pch_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiCore/plugins.cpp b/src/cpp/QtJambiCore/plugins.cpp index 15971a42..8d6da66e 100644 --- a/src/cpp/QtJambiCore/plugins.cpp +++ b/src/cpp/QtJambiCore/plugins.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiCore/utils.cpp b/src/cpp/QtJambiCore/utils.cpp index 17c3ca83..0d9ef646 100644 --- a/src/cpp/QtJambiCore/utils.cpp +++ b/src/cpp/QtJambiCore/utils.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -177,6 +177,12 @@ QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/core,QPropertyChangeHandler, QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/core,QPropertyNotifier, QTJAMBI_REPOSITORY_DEFINE_METHOD(invoke,()V)) #endif +QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/core,QString$Predicate, + QTJAMBI_REPOSITORY_DEFINE_METHOD(test,(C)Z) + ) +QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/core,QByteArray$Predicate, + QTJAMBI_REPOSITORY_DEFINE_METHOD(test,(B)Z) + ) QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/core,QCborStreamReader$StringResult, QTJAMBI_REPOSITORY_DEFINE_CONSTRUCTOR(Ljava/lang/Object;Lio/qt/core/QCborStreamReader$StringResultCode;) diff --git a/src/cpp/QtJambiCore/utils_p.h b/src/cpp/QtJambiCore/utils_p.h index d55c605d..f32e7298 100644 --- a/src/cpp/QtJambiCore/utils_p.h +++ b/src/cpp/QtJambiCore/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -48,14 +48,24 @@ struct BigIntegerValue{ BigIntegerValue fromBigInteger(JNIEnv* env, jobject object); jobject toBigInteger(JNIEnv* env, quint64 value, bool isNegative); +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) +QObject* qtjambi_findChild(JNIEnv *env, const QObject *__qt_this, Qt::FindChildOptions options); +QObject* qtjambi_findChild(JNIEnv *env, const QObject *__qt_this, jclass type, Qt::FindChildOptions options); +QObject* qtjambi_findChild(JNIEnv *env, const QObject *__qt_this, QAnyStringView aName, Qt::FindChildOptions options); +QObject* qtjambi_findChild(JNIEnv *env, const QObject *__qt_this, jclass type, QAnyStringView aName, Qt::FindChildOptions options); +QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, QAnyStringView aName, Qt::FindChildOptions options); +QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, jclass type, QAnyStringView aName, Qt::FindChildOptions options); +#else QObject* qtjambi_findChild(JNIEnv *env, const QObject *__qt_this, const QString& aName, Qt::FindChildOptions options); QObject* qtjambi_findChild(JNIEnv *env, const QObject *__qt_this, jclass type, const QString& aName, Qt::FindChildOptions options); +QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, const QString& aName, Qt::FindChildOptions options); +QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, jclass type, const QString& aName, Qt::FindChildOptions options); +#endif + #if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0) QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, Qt::FindChildOptions options); QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, jclass type, Qt::FindChildOptions options); #endif -QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, const QString& aName, Qt::FindChildOptions options); -QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, jclass type, const QString& aName, Qt::FindChildOptions options); QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, const QRegularExpression& regexp, Qt::FindChildOptions options); QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, jclass type, const QRegularExpression& regexp, Qt::FindChildOptions options); #if QT_VERSION < QT_VERSION_CHECK(6,0,0) @@ -63,6 +73,8 @@ QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, cons QList qtjambi_findChildren(JNIEnv *env, const QObject *__qt_this, jclass type, const QRegExp& regexp, Qt::FindChildOptions options); #endif +const std::type_info& typeid_QFutureInterfaceBase_shell(); + namespace Java{ namespace QtCore { @@ -249,6 +261,10 @@ namespace QtCore QTJAMBI_REPOSITORY_DECLARE_CLASS(QPropertyNotifier, QTJAMBI_REPOSITORY_DECLARE_VOID_METHOD(invoke)) #endif + QTJAMBI_REPOSITORY_DECLARE_CLASS(QString$Predicate, + QTJAMBI_REPOSITORY_DECLARE_BOOLEAN_METHOD(test)) + QTJAMBI_REPOSITORY_DECLARE_CLASS(QByteArray$Predicate, + QTJAMBI_REPOSITORY_DECLARE_BOOLEAN_METHOD(test)) } #if QT_VERSION >= QT_VERSION_CHECK(6,2,0) diff --git a/src/cpp/QtJambiDBus/QtJambiDBus.pro b/src/cpp/QtJambiDBus/QtJambiDBus.pro index aee75020..c8a41c63 100644 --- a/src/cpp/QtJambiDBus/QtJambiDBus.pro +++ b/src/cpp/QtJambiDBus/QtJambiDBus.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core dbus dbus-private diff --git a/src/cpp/QtJambiDBus/impl.cpp b/src/cpp/QtJambiDBus/impl.cpp index 19f097ed..3dffafa5 100644 --- a/src/cpp/QtJambiDBus/impl.cpp +++ b/src/cpp/QtJambiDBus/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -56,7 +56,7 @@ // emitting (writeSignalFunction) // emitting (writeConstructors) // new QDBusReply(const QDBusError & dbusError) -void __qt_construct_QDBusReply_0(void* __qtjambi_ptr, JNIEnv*, jobject, jvalue*) +void __qt_construct_QDBusReply(void* __qtjambi_ptr, JNIEnv*, jobject, jvalue*, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QDBusReply(const QDBusError & dbusError)") QDBusReply *__qt_this = new(__qtjambi_ptr) QDBusReply(); @@ -64,7 +64,7 @@ void __qt_construct_QDBusReply_0(void* __qtjambi_ptr, JNIEnv*, jobject, jvalue*) } // new QDBusReply(const QDBusError & dbusError) -void __qt_construct_QDBusReply_1(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject, jvalue* __java_arguments) +void __qt_construct_QDBusReply_QDBusError(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QDBusReply(const QDBusError & dbusError)") jobject dbusError0 = __java_arguments[0].l; @@ -86,7 +86,7 @@ struct DBusReply{ }; // new QDBusReply(const QDBusMessage & reply) -void __qt_construct_QDBusReply_2(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QDBusReply_QDBusMessage(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QDBusReply(const QDBusMessage & reply)") jobject reply0 = __java_arguments[0].l; @@ -98,7 +98,7 @@ void __qt_construct_QDBusReply_2(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject } // new QDBusReply(const QDBusPendingCall & pcall) -void __qt_construct_QDBusReply_3(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments) +void __qt_construct_QDBusReply_QDBusPendingCall(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QDBusReply(const QDBusPendingCall & pcall)") jobject pcall0 = __java_arguments[0].l; @@ -130,7 +130,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_dbus_QD QTJAMBI_TRY{ jvalue arguments; arguments.l = dbusError0; - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QDBusReply_1, sizeof(QDBusReply), typeid(QDBusReply), false, &arguments); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QDBusReply_QDBusError, sizeof(QDBusReply), typeid(QDBusReply), false, &arguments); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END @@ -150,7 +150,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_dbus_QD jvalue arguments[2]; arguments[0].l = reply0; arguments[1].l = metaType; - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QDBusReply_2, sizeof(QDBusReply), typeid(QDBusReply), false, arguments); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QDBusReply_QDBusMessage, sizeof(QDBusReply), typeid(QDBusReply), false, arguments); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END @@ -170,7 +170,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_dbus_QD jvalue arguments[2]; arguments[0].l = pcall0; arguments[1].l = metaType; - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QDBusReply_3, sizeof(QDBusReply), typeid(QDBusReply), false, arguments); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QDBusReply_QDBusPendingCall, sizeof(QDBusReply), typeid(QDBusReply), false, arguments); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END @@ -608,10 +608,10 @@ void initialize_meta_info_QtDBus() QMetaType::registerNormalizedTypedef("QDBusReply", QMetaType(metaTypeID)); #endif registerConstructorInfos(typeId, &__qt_destruct_QDBusReply, { - ConstructorInfo(&__qt_construct_QDBusReply_0, nullptr) - ,ConstructorInfo(&__qt_construct_QDBusReply_1, "Lio/qt/dbus/QDBusError;") - ,ConstructorInfo(&__qt_construct_QDBusReply_2, "Lio/qt/dbus/QDBusMessage;") - ,ConstructorInfo(&__qt_construct_QDBusReply_3, "Lio/qt/dbus/QDBusPendingCall;") + ConstructorInfo(&__qt_construct_QDBusReply, nullptr) + ,ConstructorInfo(&__qt_construct_QDBusReply_QDBusError, "Lio/qt/dbus/QDBusError;") + ,ConstructorInfo(&__qt_construct_QDBusReply_QDBusMessage, "Lio/qt/dbus/QDBusMessage;") + ,ConstructorInfo(&__qt_construct_QDBusReply_QDBusPendingCall, "Lio/qt/dbus/QDBusPendingCall;") }); QDBusMetaType::MarshallFunction mf = [](QDBusArgument &arg, const void *t) { if(const JObjectWrapper* objectWrapper = reinterpret_cast(t)){ diff --git a/src/cpp/QtJambiDataVisualization/QtJambiDataVisualization.pro b/src/cpp/QtJambiDataVisualization/QtJambiDataVisualization.pro index 36a6f92a..177360f7 100644 --- a/src/cpp/QtJambiDataVisualization/QtJambiDataVisualization.pro +++ b/src/cpp/QtJambiDataVisualization/QtJambiDataVisualization.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core gui datavisualization diff --git a/src/cpp/QtJambiDataVisualization/hashes.h b/src/cpp/QtJambiDataVisualization/hashes.h index dc079b08..a56ec68f 100644 --- a/src/cpp/QtJambiDataVisualization/hashes.h +++ b/src/cpp/QtJambiDataVisualization/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiDataVisualization/impl.cpp b/src/cpp/QtJambiDataVisualization/impl.cpp index 6d69ecf3..fe794460 100644 --- a/src/cpp/QtJambiDataVisualization/impl.cpp +++ b/src/cpp/QtJambiDataVisualization/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "hashes.h" #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) diff --git a/src/cpp/QtJambiDesigner/QtJambiDesigner.pro b/src/cpp/QtJambiDesigner/QtJambiDesigner.pro index c50a7508..6b342188 100644 --- a/src/cpp/QtJambiDesigner/QtJambiDesigner.pro +++ b/src/cpp/QtJambiDesigner/QtJambiDesigner.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += gui widgets uiplugin designer diff --git a/src/cpp/QtJambiDesigner/impl.cpp b/src/cpp/QtJambiDesigner/impl.cpp index 29e7df8e..77b6112b 100644 --- a/src/cpp/QtJambiDesigner/impl.cpp +++ b/src/cpp/QtJambiDesigner/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiDesigner/utils_p.h b/src/cpp/QtJambiDesigner/utils_p.h index d99d2455..b4a9f1bb 100644 --- a/src/cpp/QtJambiDesigner/utils_p.h +++ b/src/cpp/QtJambiDesigner/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/QtJambiGenerator.pro b/src/cpp/QtJambiGenerator/QtJambiGenerator.pro index f625f4f1..b464ea78 100644 --- a/src/cpp/QtJambiGenerator/QtJambiGenerator.pro +++ b/src/cpp/QtJambiGenerator/QtJambiGenerator.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + TEMPLATE = subdirs SUBDIRS = library executable diff --git a/src/cpp/QtJambiGenerator/abstractgenerator.cpp b/src/cpp/QtJambiGenerator/abstractgenerator.cpp index 41b135ec..d13a87bb 100644 --- a/src/cpp/QtJambiGenerator/abstractgenerator.cpp +++ b/src/cpp/QtJambiGenerator/abstractgenerator.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -43,6 +43,10 @@ #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) +#define qAsConst std::as_const +#endif + AbstractGenerator::AbstractGenerator() { m_num_generated = 0; m_num_generated_written = 0; @@ -59,7 +63,7 @@ void AbstractGenerator::generate() { return; } - for(MetaClass *cls : m_classes) { + for(MetaClass *cls : qAsConst(m_classes)) { for(MetaFunctional* functional : cls->functionals()){ if (!shouldGenerate(functional)){ continue; @@ -151,7 +155,7 @@ void AbstractGenerator::printClasses() { QVector classes = m_classes.toVector(); std::sort(classes.begin(), classes.end(), [](MetaClass *a, MetaClass *b) ->bool {return a->name() < b->name();}); - for(MetaClass *cls : classes) { + for(MetaClass *cls : qAsConst(classes)) { if (!shouldGenerate(cls)) continue; write(s, cls); @@ -378,9 +382,9 @@ bool AbstractGenerator::hasDefaultConstructor(const MetaType *type) { bool AbstractGenerator::hasPublicDefaultConstructor(const MetaType *type) { QString full_name = type->typeEntry()->qualifiedTargetLangName(); - QString class_name = type->typeEntry()->targetLangName(); + //QString class_name = type->typeEntry()->targetLangName(); - for(const MetaClass *java_class : m_classes) { + for(const MetaClass *java_class : qAsConst(m_classes)) { if (java_class->typeEntry()->qualifiedTargetLangName() == full_name) { MetaFunctionList functions = java_class->functions(); bool hasConstructor = false; @@ -407,20 +411,27 @@ bool AbstractGenerator::hasPublicAssignmentOperator(const MetaType *type) { QString full_name = type->typeEntry()->qualifiedTargetLangName(); QString class_name = "operator="; - for(const MetaClass *java_class : m_classes) { + for(const MetaClass *java_class : qAsConst(m_classes)) { if (java_class->typeEntry()->qualifiedTargetLangName() == full_name) { MetaFunctionList functions = java_class->functions(); for(const MetaFunction *function : functions) { if (function->name() == class_name && function->wasPublic() && function->arguments().size()==1 + && function->arguments()[0]->type()->getReferenceType()!=MetaType::RReference && function->arguments()[0]->type()->typeEntry()==type->typeEntry()){ return true; } } + if(type->typeEntry()->isComplex()){ + return reinterpret_cast(type->typeEntry())->hasPublicDefaultAssignment(); + } return false; } } + if(type->typeEntry()->isComplex()){ + return reinterpret_cast(type->typeEntry())->hasPublicDefaultAssignment(); + } return false; } diff --git a/src/cpp/QtJambiGenerator/asttoxml.cpp b/src/cpp/QtJambiGenerator/asttoxml.cpp index 452f44ce..32af00d4 100644 --- a/src/cpp/QtJambiGenerator/asttoxml.cpp +++ b/src/cpp/QtJambiGenerator/asttoxml.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/bufferedoutputstream.cpp b/src/cpp/QtJambiGenerator/bufferedoutputstream.cpp index cac6e3d1..95134d61 100644 --- a/src/cpp/QtJambiGenerator/bufferedoutputstream.cpp +++ b/src/cpp/QtJambiGenerator/bufferedoutputstream.cpp @@ -41,8 +41,14 @@ #include BufferedOutputStream::BufferedOutputStream(const QFileInfo& file): + QTextStream(), m_file(file), m_buffer() { +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + setEncoding(QStringConverter::Utf8); +#else + setCodec("UTF-8"); +#endif QBuffer* buffer = new QBuffer(&m_buffer); if(buffer->open(QIODevice::WriteOnly)) setDevice(buffer); diff --git a/src/cpp/QtJambiGenerator/bufferedoutputstream.h b/src/cpp/QtJambiGenerator/bufferedoutputstream.h index db22700b..07c28cd2 100644 --- a/src/cpp/QtJambiGenerator/bufferedoutputstream.h +++ b/src/cpp/QtJambiGenerator/bufferedoutputstream.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/cppgenerator.cpp b/src/cpp/QtJambiGenerator/cppgenerator.cpp index d3fe8fa5..736c61ec 100644 --- a/src/cpp/QtJambiGenerator/cppgenerator.cpp +++ b/src/cpp/QtJambiGenerator/cppgenerator.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -49,7 +49,7 @@ // signature to that. QString CppGenerator::fixNormalizedSignatureForQt(const QString &signature) { QString ret = signature; - if (signature.contains("<") && signature.endsWith("const&")) { + if (signature.contains(QStringLiteral(u"<")) && signature.endsWith(QStringLiteral(u"const&"))) { ret = "const " + signature.mid(0, signature.size() - 6) + "&"; @@ -62,7 +62,7 @@ CppGenerator::CppGenerator(PriGenerator *_priGenerator) : AbstractGenerator(), p QString CppGenerator::subDirectoryForPackage(const QString &package) const { TypeSystemTypeEntry * typeSystemEntry = static_cast(database()->findType(package)); if(typeSystemEntry && !typeSystemEntry->qtLibrary().isEmpty()){ - if(typeSystemEntry->qtLibrary().startsWith("Qt") && !typeSystemEntry->qtLibrary().startsWith("QtJambi")){ + if(typeSystemEntry->qtLibrary().startsWith(QStringLiteral(u"Qt")) && !typeSystemEntry->qtLibrary().startsWith(QStringLiteral(u"QtJambi"))){ QString libName = typeSystemEntry->qtLibrary(); return "QtJambi" + libName.mid(2); }else{ @@ -71,16 +71,16 @@ QString CppGenerator::subDirectoryForPackage(const QString &package) const { }else if(typeSystemEntry && !typeSystemEntry->targetName().isEmpty()){ return typeSystemEntry->targetName(); }else - return QString(package).replace(".", "_"); + return QString(package).replace(u'.', u'_'); } QString CppGenerator::translateType(const MetaType *java_type, Option option) { if (!java_type) - return "void"; + return QStringLiteral(u"void"); if (java_type->hasNativeId() && (option & UseNativeIds)){ - return "QtJambiNativeID"; + return QStringLiteral(u"QtJambiNativeID"); }else if (java_type->isCharString()){ - return "jstring"; + return QStringLiteral(u"jstring"); }else if (java_type->isPrimitive() || java_type->isQChar() || java_type->isQString() @@ -94,26 +94,26 @@ QString CppGenerator::translateType(const MetaType *java_type, Option option) { return java_type->typeEntry()->jniName(); else{ QString jniName = java_type->typeEntry()->jniName(); - if(jniName=="void" - || jniName=="jstring" - || jniName=="jthrowable" - || jniName=="jclass" - || jniName=="jobject" - || jniName.endsWith("Array")) - return "jobjectArray"; + if(jniName==QStringLiteral(u"void") + || jniName==QStringLiteral(u"jstring") + || jniName==QStringLiteral(u"jthrowable") + || jniName==QStringLiteral(u"jclass") + || jniName==QStringLiteral(u"jobject") + || jniName.endsWith(QStringLiteral(u"Array"))) + return QStringLiteral(u"jobjectArray"); return jniName + "Array"; } } else if (java_type->isInitializerList()){ Q_ASSERT(java_type->instantiations().size()==1); if(java_type->instantiations().first()->isPrimitive()){ QString jniName = java_type->instantiations().first()->typeEntry()->jniName(); - if(jniName=="void" - || jniName=="jstring" - || jniName=="jthrowable" - || jniName=="jclass" - || jniName=="jobject" - || jniName.endsWith("Array")) - return "jobjectArray"; + if(jniName==QStringLiteral(u"void") + || jniName==QStringLiteral(u"jstring") + || jniName==QStringLiteral(u"jthrowable") + || jniName==QStringLiteral(u"jclass") + || jniName==QStringLiteral(u"jobject") + || jniName.endsWith(QStringLiteral(u"Array"))) + return QStringLiteral(u"jobjectArray"); return jniName + "Array"; }else{ return java_type->typeEntry()->jniName(); @@ -131,12 +131,12 @@ QString CppGenerator::translateType(const MetaType *java_type, Option option) { } } switch(size){ - case 8: return "jbyte"; - case 16: return "jshort"; - case 64: return "jlong"; + case 8: return QStringLiteral(u"jbyte"); + case 16: return QStringLiteral(u"jshort"); + case 64: return QStringLiteral(u"jlong"); default: break; } - return "jint"; + return QStringLiteral(u"jint"); } else if (java_type->isQString() || java_type->isCharString() || java_type->isQStringRef() @@ -145,10 +145,10 @@ QString CppGenerator::translateType(const MetaType *java_type, Option option) { || java_type->isQUtf8StringView() || java_type->isQLatin1String() || java_type->isQLatin1StringView() - || (java_type->typeEntry()->qualifiedTargetLangName()=="java.lang.String" && java_type->indirections().isEmpty())){ - return "jstring"; + || (java_type->typeEntry()->qualifiedTargetLangName()==QStringLiteral(u"java.lang.String") && java_type->indirections().isEmpty())){ + return QStringLiteral(u"jstring"); } else { - return "jobject"; + return QStringLiteral(u"jobject"); } } @@ -182,7 +182,7 @@ void CppGenerator::writeTypeInfo(QTextStream &s, const MetaType *type, Option op originalTypeDescription = QMetaObject::normalizedSignature(originalTypeDescription.toLatin1().constData()); originalTypeDescription = fixNormalizedSignatureForQt(originalTypeDescription); } - if (originalTypeDescription.contains("qreal")){ // map generator type to qreal type + if (originalTypeDescription.contains(QStringLiteral(u"qreal"))){ // map generator type to qreal type s << originalTypeDescription; if (!(options & SkipName)) s << ' '; @@ -321,52 +321,52 @@ void CppGenerator::writeTypeInfo(QTextStream &s, const MetaType *type, Option op s << ' '; } -QByteArray CppGenerator::jniName(const QString &name) const{ - if(name=="void") - return "void"; - else if(name=="int") - return "jint"; - else if(name=="long") - return "jlong"; - else if(name=="short") - return "jshort"; - else if(name=="byte") - return "jbyte"; - else if(name=="double") - return "jdouble"; - else if(name=="float") - return "jfloat"; - else if(name=="boolean") - return "jboolean"; - else if(name=="char") - return "jchar"; - else if(name=="int[]" || name=="int...") - return "jintArray"; - else if(name=="long[]" || name=="long...") - return "jlongArray"; - else if(name=="short[]" || name=="short...") - return "jshortArray"; - else if(name=="byte[]" || name=="byte...") - return "jbyteArray"; - else if(name=="double[]" || name=="double...") - return "jdoubleArray"; - else if(name=="float[]" || name=="float...") - return "jfloatArray"; - else if(name=="boolean[]" || name=="boolean...") - return "jbooleanArray"; - else if(name=="char[]" || name=="char...") - return "jcharArray"; - else if(name.endsWith("[]") || name.endsWith("...")) - return "jobjectArray"; - else if(name=="java.lang.String" || name=="String") - return "jstring"; - else if(name.startsWith("java.lang.Class")) - return "jclass"; +QString CppGenerator::jniName(const QString &name) const{ + if(name==QStringLiteral(u"void")) + return QStringLiteral(u"void"); + else if(name==QStringLiteral(u"int")) + return QStringLiteral(u"jint"); + else if(name==QStringLiteral(u"long")) + return QStringLiteral(u"jlong"); + else if(name==QStringLiteral(u"short")) + return QStringLiteral(u"jshort"); + else if(name==QStringLiteral(u"byte")) + return QStringLiteral(u"jbyte"); + else if(name==QStringLiteral(u"double")) + return QStringLiteral(u"jdouble"); + else if(name==QStringLiteral(u"float")) + return QStringLiteral(u"jfloat"); + else if(name==QStringLiteral(u"boolean")) + return QStringLiteral(u"jboolean"); + else if(name==QStringLiteral(u"char")) + return QStringLiteral(u"jchar"); + else if(name==QStringLiteral(u"int[]") || name==QStringLiteral(u"int...")) + return QStringLiteral(u"jintArray"); + else if(name==QStringLiteral(u"long[]") || name==QStringLiteral(u"long...")) + return QStringLiteral(u"jlongArray"); + else if(name==QStringLiteral(u"short[]") || name==QStringLiteral(u"short...")) + return QStringLiteral(u"jshortArray"); + else if(name==QStringLiteral(u"byte[]") || name==QStringLiteral(u"byte...")) + return QStringLiteral(u"jbyteArray"); + else if(name==QStringLiteral(u"double[]") || name==QStringLiteral(u"double...")) + return QStringLiteral(u"jdoubleArray"); + else if(name==QStringLiteral(u"float[]") || name==QStringLiteral(u"float...")) + return QStringLiteral(u"jfloatArray"); + else if(name==QStringLiteral(u"boolean[]") || name==QStringLiteral(u"boolean...")) + return QStringLiteral(u"jbooleanArray"); + else if(name==QStringLiteral(u"char[]") || name==QStringLiteral(u"char...")) + return QStringLiteral(u"jcharArray"); + else if(name.endsWith(QStringLiteral(u"[]")) || name.endsWith(QStringLiteral(u"..."))) + return QStringLiteral(u"jobjectArray"); + else if(name==QStringLiteral(u"java.lang.String") || name==QStringLiteral(u"String")) + return QStringLiteral(u"jstring"); + else if(name.startsWith(QStringLiteral(u"java.lang.Class"))) + return QStringLiteral(u"jclass"); TypeEntry *entry = database()->findType(name); if (entry) - return entry->jniName().toLatin1(); + return entry->jniName(); else - return "jobject"; + return QStringLiteral(u"jobject"); } void CppGenerator::writeFunctionArguments(QTextStream &s, @@ -393,21 +393,21 @@ void CppGenerator::writeFunctionArguments(QTextStream &s, s << "jobject"; }else if(java_function->useArgumentAsArray(arg->argumentIndex() + 1)){ if(arg->type()->typeEntry()->isPrimitive()){ - if(arg->type()->typeEntry()->targetLangName()=="int"){ + if(arg->type()->typeEntry()->targetLangName()==QStringLiteral(u"int")){ s << "jintArray"; - }else if(arg->type()->typeEntry()->targetLangName()=="long"){ + }else if(arg->type()->typeEntry()->targetLangName()==QStringLiteral(u"long")){ s << "jlongArray"; - }else if(arg->type()->typeEntry()->targetLangName()=="short"){ + }else if(arg->type()->typeEntry()->targetLangName()==QStringLiteral(u"short")){ s << "jshortArray"; - }else if(arg->type()->typeEntry()->targetLangName()=="byte"){ + }else if(arg->type()->typeEntry()->targetLangName()==QStringLiteral(u"byte")){ s << "jbyteArray"; - }else if(arg->type()->typeEntry()->targetLangName()=="boolean"){ + }else if(arg->type()->typeEntry()->targetLangName()==QStringLiteral(u"boolean")){ s << "jbooleanArray"; - }else if(arg->type()->typeEntry()->targetLangName()=="char"){ + }else if(arg->type()->typeEntry()->targetLangName()==QStringLiteral(u"char")){ s << "jcharArray"; - }else if(arg->type()->typeEntry()->targetLangName()=="float"){ + }else if(arg->type()->typeEntry()->targetLangName()==QStringLiteral(u"float")){ s << "jfloatArray"; - }else if(arg->type()->typeEntry()->targetLangName()=="double"){ + }else if(arg->type()->typeEntry()->targetLangName()==QStringLiteral(u"double")){ s << "jdoubleArray"; } }else if(arg->type()->typeEntry()->isQChar()){ @@ -415,7 +415,11 @@ void CppGenerator::writeFunctionArguments(QTextStream &s, }else{ s << "jobjectArray"; } - addArrayOffset = java_function->insertArrayOffsetArgument(arg->argumentIndex() + 1); + addArrayOffset = java_function->insertUtilArgument(arg->argumentIndex() + 1); + }else if(java_function->useArgumentAsSlot(arg->argumentIndex() + 1)){ + s << "jobject"; + }else if(java_function->useArgumentAsSlotContext(arg->argumentIndex() + 1)){ + s << "QtJambiNativeID"; }else{ s << translateType(arg->type(), Option(option & ~JNIProxyFunction)); } @@ -425,7 +429,7 @@ void CppGenerator::writeFunctionArguments(QTextStream &s, } if(addArrayOffset){ s << ", "; - int lengthParameter = java_function->arrayOrBufferLengthIndex(arg->argumentIndex() + 1); + int lengthParameter = java_function->utilArgumentIndex(arg->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=arguments.size()){ const MetaArgument *lengthParam = arguments[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -468,7 +472,7 @@ void CppGenerator::writeFunctionArguments(QTextStream &s, s << " = "; QString expr = arg->originalDefaultValueExpression(); - if(expr!="{}"){ + if(expr!=QStringLiteral(u"{}")){ if (arg->type()->typeEntry()->isEnum() && expr.indexOf("::") < 0) s << static_cast(arg->type()->typeEntry())->qualifier() << "::"; if (arg->type()->typeEntry()->isFlags() && expr.indexOf("::") < 0) @@ -523,7 +527,7 @@ void CppGenerator::writeFunctionSignature(QTextStream &s, if((option & JNIProxyFunction)){ QString typeReplaced = java_function->typeReplaced(0); if(!typeReplaced.isEmpty()) - s << jniName(typeReplaced.replace("@Nullable ", "").replace("@NonNull ", "")) << " "; + s << jniName(annotationFreeTypeName(typeReplaced)) << " "; else if (function_type) { s << translateType(function_type, Option(Option(option & ~JNIProxyFunction) & ~UseNativeIds)); s << " "; @@ -641,57 +645,11 @@ void CppGenerator::writeFunctionSignature(QTextStream &s, } QString CppGenerator::marshalledArguments(const MetaFunction *java_function){ - const MetaArgumentList& arguments = java_function->arguments(); - QString args; - if (!arguments.isEmpty()) { - for(const MetaArgument *arg : arguments) { - if(arg->type()->getReferenceType()==MetaType::Reference){ - if(arg->type()->isConstant()){ - args += "_cref"; - }else{ - args += "_ref"; - } - }else if(arg->type()->getReferenceType()==MetaType::RReference){ - if(arg->type()->isConstant()){ - args += "_crval"; - }else{ - args += "_rval"; - } - }else{ - if(arg->type()->isConstant()){ - args += "_const"; - } - } - QString qualifiedCppName; - if(arg->type()->typeEntry()->isFunctional()){ - qualifiedCppName = arg->type()->typeEntry()->name(); - }else{ - qualifiedCppName = arg->type()->typeEntry()->qualifiedCppName(); - } - if(qualifiedCppName=="qtjamireal") - qualifiedCppName = "double"; - args += "_" + qualifiedCppName - .replace("::", "_") - .replace("<", "_") - .replace(">", "_") - .replace(",", "_") - .replace(".", "_") - .replace("*", "_ptr") - .replace("&", "_ref") - .replace(" ", "_"); - for(bool ind : arg->type()->indirections()){ - args += ind ? "_cptr" : "_ptr"; - } - } - if(java_function->isConstant()){ - args += "_constfct"; - } - } - return args; + return MetaFunction::marshalledArguments(java_function->arguments(), java_function->isConstant(), -1); } QString CppGenerator::jni_signature(const MetaFunctional *function, JNISignatureFormat format) { - QString returned = "("; + QString returned = QStringLiteral(u"("); const MetaArgumentList& arguments = function->arguments(); for(const MetaArgument *argument : arguments) { if (function->argumentRemoved(argument->argumentIndex() + 1)==ArgumentRemove_No) { @@ -706,22 +664,22 @@ QString CppGenerator::jni_signature(const MetaFunctional *function, JNISignature } MetaBuilder::decideUsagePattern(cpy.get()); QString singleType = jni_signature(cpy.get(), format); - if(singleType=="jint"){ - returned += jni_signature("java.nio.IntBuffer", format); - }else if(singleType=="jbyte"){ - returned += jni_signature("java.nio.ByteBuffer", format); - }else if(singleType=="jchar"){ - returned += jni_signature("java.nio.CharBuffer", format); - }else if(singleType=="jshort"){ - returned += jni_signature("java.nio.ShortBuffer", format); - }else if(singleType=="jlong"){ - returned += jni_signature("java.nio.LongBuffer", format); - }else if(singleType=="jfloat"){ - returned += jni_signature("java.nio.FloatBuffer", format); - }else if(singleType=="jdouble"){ - returned += jni_signature("java.nio.DoubleBuffer", format); + if(singleType==QStringLiteral(u"jint")){ + returned += jni_signature(QStringLiteral(u"java.nio.IntBuffer"), format); + }else if(singleType==QStringLiteral(u"jbyte")){ + returned += jni_signature(QStringLiteral(u"java.nio.ByteBuffer"), format); + }else if(singleType==QStringLiteral(u"jchar")){ + returned += jni_signature(QStringLiteral(u"java.nio.CharBuffer"), format); + }else if(singleType==QStringLiteral(u"jshort")){ + returned += jni_signature(QStringLiteral(u"java.nio.ShortBuffer"), format); + }else if(singleType==QStringLiteral(u"jlong")){ + returned += jni_signature(QStringLiteral(u"java.nio.LongBuffer"), format); + }else if(singleType==QStringLiteral(u"jfloat")){ + returned += jni_signature(QStringLiteral(u"java.nio.FloatBuffer"), format); + }else if(singleType==QStringLiteral(u"jdouble")){ + returned += jni_signature(QStringLiteral(u"java.nio.DoubleBuffer"), format); }else{ - returned += jni_signature("java.nio.Buffer", format); + returned += jni_signature(QStringLiteral(u"java.nio.Buffer"), format); } }else if(function->useArgumentAsArray(argument->argumentIndex() + 1)){ QScopedPointer array(argument->type()->copy()); @@ -739,8 +697,8 @@ QString CppGenerator::jni_signature(const MetaFunctional *function, JNISignature MetaBuilder::decideUsagePattern(cpy.get()); array->setArrayElementType(cpy.get()); returned += jni_signature(array.get(), format); - if(function->insertArrayOffsetArgument(argument->argumentIndex() + 1)){ - int lengthParameter = function->arrayOrBufferLengthIndex(argument->argumentIndex() + 1); + if(function->insertUtilArgument(argument->argumentIndex() + 1)){ + int lengthParameter = function->utilArgumentIndex(argument->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=arguments.size()){ const MetaArgument *lengthParam = arguments[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -758,12 +716,16 @@ QString CppGenerator::jni_signature(const MetaFunctional *function, JNISignature if (modified_type.isEmpty()) returned += jni_signature(lengthParam->type(), format); else if(jniType.isEmpty()) - returned += jni_signature(modified_type.replace("@Nullable ", "").replace("@NonNull ", ""), format); + returned += jni_signature(annotationFreeTypeName(modified_type), format); else returned += jni_signature(jniType, format); } } } +// }else if(function->useArgumentAsSlot(argument->argumentIndex() + 1)){ +// returned += jni_signature(QStringLiteral(u"io.qt.core.QMetaObject$Slot"), format); + }else if(function->useArgumentAsSlotContext(argument->argumentIndex() + 1)){ + returned += jni_signature(QStringLiteral(u"io.qt.core.QObject"), format); }else{ QString jniType; QString modified_type = function->typeReplaced(argument->argumentIndex() + 1, &jniType); @@ -771,7 +733,7 @@ QString CppGenerator::jni_signature(const MetaFunctional *function, JNISignature if (modified_type.isEmpty()) returned += jni_signature(argument->type(), format); else if(jniType.isEmpty()) - returned += jni_signature(modified_type.replace("@Nullable ", "").replace("@NonNull ", ""), format); + returned += jni_signature(annotationFreeTypeName(modified_type), format); else returned += jni_signature(jniType, format); } @@ -808,7 +770,7 @@ QString CppGenerator::jni_signature(const MetaFunction *function, JNISignatureFo if(parameterTypesByName.contains(mod.modified_type)){ QString t = parameterTypesByName[mod.modified_type]; if(t.isEmpty()) - t = "java.lang.Object"; + t = QStringLiteral(u"java.lang.Object"); returned += jni_signature(annotationFreeTypeName(t), format); }else if(mod.modified_jni_type.isEmpty()) returned += jni_signature(annotationFreeTypeName(mod.modified_type), format); @@ -820,22 +782,22 @@ QString CppGenerator::jni_signature(const MetaFunction *function, JNISignatureFo if (function->argumentRemoved(argument->argumentIndex() + 1)==ArgumentRemove_No) { if(function->useArgumentAsBuffer(argument->argumentIndex() + 1)){ QString singleType = argument->type()->fullName(); - if(singleType=="int"){ - returned += jni_signature("java.nio.IntBuffer", format); - }else if(singleType=="byte"){ - returned += jni_signature("java.nio.ByteBuffer", format); - }else if(singleType=="char"){ - returned += jni_signature("java.nio.CharBuffer", format); - }else if(singleType=="short"){ - returned += jni_signature("java.nio.ShortBuffer", format); - }else if(singleType=="long"){ - returned += jni_signature("java.nio.LongBuffer", format); - }else if(singleType=="float"){ - returned += jni_signature("java.nio.FloatBuffer", format); - }else if(singleType=="double"){ - returned += jni_signature("java.nio.DoubleBuffer", format); + if(singleType==QStringLiteral(u"int")){ + returned += jni_signature(QStringLiteral(u"java.nio.IntBuffer"), format); + }else if(singleType==QStringLiteral(u"byte")){ + returned += jni_signature(QStringLiteral(u"java.nio.ByteBuffer"), format); + }else if(singleType==QStringLiteral(u"char")){ + returned += jni_signature(QStringLiteral(u"java.nio.CharBuffer"), format); + }else if(singleType==QStringLiteral(u"short")){ + returned += jni_signature(QStringLiteral(u"java.nio.ShortBuffer"), format); + }else if(singleType==QStringLiteral(u"long")){ + returned += jni_signature(QStringLiteral(u"java.nio.LongBuffer"), format); + }else if(singleType==QStringLiteral(u"float")){ + returned += jni_signature(QStringLiteral(u"java.nio.FloatBuffer"), format); + }else if(singleType==QStringLiteral(u"double")){ + returned += jni_signature(QStringLiteral(u"java.nio.DoubleBuffer"), format); }else{ - returned += jni_signature("java.nio.Buffer", format); + returned += jni_signature(QStringLiteral(u"java.nio.Buffer"), format); } }else if(function->useArgumentAsArray(argument->argumentIndex() + 1)){ QScopedPointer array(argument->type()->copy()); @@ -853,8 +815,8 @@ QString CppGenerator::jni_signature(const MetaFunction *function, JNISignatureFo MetaBuilder::decideUsagePattern(cpy.get()); array->setArrayElementType(cpy.get()); returned += jni_signature(array.get(), format); - if(function->insertArrayOffsetArgument(argument->argumentIndex() + 1)){ - int lengthParameter = function->arrayOrBufferLengthIndex(argument->argumentIndex() + 1); + if(function->insertUtilArgument(argument->argumentIndex() + 1)){ + int lengthParameter = function->utilArgumentIndex(argument->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=arguments.size()){ const MetaArgument *lengthParam = arguments[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -872,12 +834,16 @@ QString CppGenerator::jni_signature(const MetaFunction *function, JNISignatureFo if (modified_type.isEmpty()) returned += jni_signature(lengthParam->type(), format); else if(jniType.isEmpty()) - returned += jni_signature(modified_type.replace("@Nullable ", "").replace("@NonNull ", ""), format); + returned += jni_signature(annotationFreeTypeName(modified_type), format); else returned += jni_signature(jniType, format); } } } +// }else if(function->useArgumentAsSlot(argument->argumentIndex() + 1)){ +// returned += jni_signature(QStringLiteral(u"io.qt.core.QMetaObject$Slot"), format); + }else if(function->useArgumentAsSlotContext(argument->argumentIndex() + 1)){ + returned += jni_signature(QStringLiteral(u"io.qt.core.QObject"), format); }else{ QString jniType; QString modified_type = function->typeReplaced(argument->argumentIndex() + 1, &jniType); @@ -887,7 +853,7 @@ QString CppGenerator::jni_signature(const MetaFunction *function, JNISignatureFo if(parameterTypesByName.contains(modified_type)){ QString t = parameterTypesByName[modified_type]; if(t.isEmpty()) - t = "java.lang.Object"; + t = QStringLiteral(u"java.lang.Object"); returned += jni_signature(annotationFreeTypeName(t), format); }else if(jniType.isEmpty()) returned += jni_signature(annotationFreeTypeName(modified_type), format); @@ -902,7 +868,7 @@ QString CppGenerator::jni_signature(const MetaFunction *function, JNISignatureFo if(parameterTypesByName.contains(mod.modified_type)){ QString t = parameterTypesByName[mod.modified_type]; if(t.isEmpty()) - t = "java.lang.Object"; + t = QStringLiteral(u"java.lang.Object"); returned += jni_signature(annotationFreeTypeName(t), format); }else if(mod.modified_jni_type.isEmpty()) returned += jni_signature(annotationFreeTypeName(mod.modified_type), format); @@ -916,7 +882,7 @@ QString CppGenerator::jni_signature(const MetaFunction *function, JNISignatureFo if(parameterTypesByName.contains(mod.modified_type)){ QString t = parameterTypesByName[mod.modified_type]; if(t.isEmpty()) - t = "java.lang.Object"; + t = QStringLiteral(u"java.lang.Object"); returned += jni_signature(annotationFreeTypeName(t), format); }else if(mod.modified_jni_type.isEmpty()) returned += jni_signature(annotationFreeTypeName(mod.modified_type), format); @@ -934,7 +900,7 @@ QString CppGenerator::jni_signature(const MetaFunction *function, JNISignatureFo else returned += jni_signature(function->type(), JNISignatureFormat(format | ReturnType | NoQContainers)); }else{ - modified_type = modified_type.replace("@Nullable ", "").replace("@NonNull ", ""); + modified_type = annotationFreeTypeName(modified_type); if(parameterTypesByName.contains(modified_type)){ QString t = parameterTypesByName[modified_type]; if(t.isEmpty()) @@ -952,30 +918,30 @@ QString CppGenerator::jni_signature(const QString &_full_name, JNISignatureForma QString signature; QString full_name = _full_name; - if (full_name.endsWith("...")) { + if (full_name.endsWith(QStringLiteral(u"..."))) { full_name.chop(3); full_name = full_name.trimmed(); - signature = "["; + signature = QStringLiteral(u"["); } - while(full_name.endsWith("[]")) { + while(full_name.endsWith(QStringLiteral(u"[]"))) { full_name.chop(2); full_name = full_name.trimmed(); - signature = "["; + signature = QStringLiteral(u"["); } decltype(QString().length()) start = 0, end = -1; - while ((start = full_name.indexOf("<")) >= 0 && (end = full_name.indexOf(">")) >= 0) { + while ((start = full_name.indexOf(u'<')) >= 0 && (end = full_name.indexOf(u'>')) >= 0) { full_name.remove(start, end - start + 1); } - static QMap table{ {"boolean", "Z"}, - {"byte", "B"}, - {"char", "C"}, - {"short", "S"}, - {"int", "I"}, - {"long", "J"}, - {"float", "F"}, - {"double", "D"}}; + static QMap table{ {QStringLiteral(u"boolean"), QStringLiteral(u"Z")}, + {QStringLiteral(u"byte"), QStringLiteral(u"B")}, + {QStringLiteral(u"char"), QStringLiteral(u"C")}, + {QStringLiteral(u"short"), QStringLiteral(u"S")}, + {QStringLiteral(u"int"), QStringLiteral(u"I")}, + {QStringLiteral(u"long"), QStringLiteral(u"J")}, + {QStringLiteral(u"float"), QStringLiteral(u"F")}, + {QStringLiteral(u"double"), QStringLiteral(u"D")}}; if ((format & Underscores) == Underscores) signature.replace("[", "_3"); @@ -983,13 +949,13 @@ QString CppGenerator::jni_signature(const QString &_full_name, JNISignatureForma if (table.contains(full_name)) { signature += table[full_name]; } else if ((format & Underscores) == Underscores) { - signature.replace("[", "_3"); + signature.replace(QStringLiteral(u"["), QStringLiteral(u"_3")); signature += "L"; - signature += QString(full_name).replace("_", "_1").replace('.', '_').replace("$", "_00024"); + signature += QString(full_name).replace(QStringLiteral(u"_"), QStringLiteral(u"_1")).replace(u'.', u'_').replace(QStringLiteral(u"$"), QStringLiteral(u"_00024")); signature += "_2"; } else { signature += "L"; - signature += QString(full_name).replace('.', '/'); + signature += QString(full_name).replace(u'.', u'/'); signature += ";"; } @@ -1218,7 +1184,6 @@ bool CppGenerator::shouldGenerate(const MetaFunctional *functional) const { && (functional->enclosingClass()->typeEntry()->codeGeneration() & TypeEntry::GenerateCpp))){ return false; } - return functional->typeEntry()->getUsing().isEmpty() && (functional->typeEntry()->codeGeneration() & TypeEntry::GenerateCpp); } return (functional->typeEntry()->codeGeneration() & TypeEntry::GenerateCpp); } @@ -1237,11 +1202,11 @@ QString CppGenerator::shellClassName(const MetaClass *java_class) { QString CppGenerator::shellClassName(const MetaFunctional *java_class) { QString _shellClassName; if(java_class->enclosingClass() && !java_class->enclosingClass()->isFake()){ - _shellClassName = shellClassName(java_class->enclosingClass()); - if(_shellClassName.endsWith("_shell")){ - _shellClassName = _shellClassName.chopped(6); + if(java_class->enclosingClass()->typeEntry()->designatedInterface() && java_class->enclosingClass()->enclosingClass()){ + _shellClassName = java_class->enclosingClass()->enclosingClass()->name() + "_"; + }else{ + _shellClassName = java_class->enclosingClass()->name() + "_"; } - _shellClassName += "$"; } return _shellClassName + java_class->name() + "_shell"; //return java_class->enclosingClass() diff --git a/src/cpp/QtJambiGenerator/cppgenerator.h b/src/cpp/QtJambiGenerator/cppgenerator.h index 6f87b248..55c30c60 100644 --- a/src/cpp/QtJambiGenerator/cppgenerator.h +++ b/src/cpp/QtJambiGenerator/cppgenerator.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -97,7 +97,7 @@ class CppGenerator : public AbstractGenerator { static QString jni_signature(const MetaType *java_type, JNISignatureFormat format); inline TS::TypeDatabase* database() const {return priGenerator->database();} protected: - QByteArray jniName(const QString &name) const; + QString jniName(const QString &name) const; PriGenerator *priGenerator; QString m_cpp_out_dir; }; diff --git a/src/cpp/QtJambiGenerator/cppheadergenerator.cpp b/src/cpp/QtJambiGenerator/cppheadergenerator.cpp index 3eb15128..f27c8a1f 100644 --- a/src/cpp/QtJambiGenerator/cppheadergenerator.cpp +++ b/src/cpp/QtJambiGenerator/cppheadergenerator.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -41,6 +41,10 @@ #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) +#define qAsConst std::as_const +#endif + static Indentor INDENT; CppHeaderGenerator::CppHeaderGenerator(PriGenerator *pri) @@ -51,14 +55,14 @@ QString CppHeaderGenerator::fileNameForClass(const MetaClass *java_class) const if(java_class->typeEntry()->designatedInterface()){ return fileNameForClass(java_class->enclosingClass()); } - return QString("%1_shell.h").arg(java_class->name().replace("$", "_")); + return QStringLiteral(u"%1_shell.h").arg(java_class->name().replace(u'$', u'_')); } QString CppHeaderGenerator::fileNameForFunctional(const MetaFunctional *java_class) const { if(java_class->enclosingClass() && !java_class->enclosingClass()->isFake()) - return QString("%1_%2_shell.h").arg(java_class->enclosingClass()->name().replace("$", "_")).arg(java_class->name().replace("$", "_")); + return QStringLiteral(u"%1_%2_shell.h").arg(java_class->enclosingClass()->name().replace(u'$', u'_')).arg(java_class->name().replace(u'$', u'_')); else - return QString("%1_shell.h").arg(java_class->name().replace("$", "_")); + return QStringLiteral(u"%1_shell.h").arg(java_class->name().replace(u'$', u'_')); } void CppHeaderGenerator::writeFieldAccessors(QTextStream &s, const MetaField *java_field) { @@ -83,8 +87,8 @@ void CppHeaderGenerator::writeFieldAccessors(QTextStream &s, const MetaField *ja } if(!pps.isEmpty()){ for (int i=0; iwasProtected()){ if((hasPPS = !pps.isEmpty())) - s << Qt::endl << "#if " << pps.join(" && ") << Qt::endl; + s << Qt::endl << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; writeFunction(s, setter, Option(EnumAsInts | UseNativeIds | JNIProxyFunction)); } if (mod.isReadable() && getter->wasProtected()) { if(!hasPPS && (hasPPS = !pps.isEmpty())) - s << Qt::endl << "#if " << pps.join(" && ") << Qt::endl; + s << Qt::endl << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; writeFunction(s, getter, Option(EnumAsInts | UseNativeIds | JNIProxyFunction)); } if(hasPPS) - s << "#endif //" << pps.join(" && ") << Qt::endl << Qt::endl; + s << "#endif //" << pps.join(QStringLiteral(u" && ")) << Qt::endl << Qt::endl; } void CppHeaderGenerator::write(QTextStream &s, const MetaFunctional *java_class, int) { @@ -132,7 +136,7 @@ void CppHeaderGenerator::write(QTextStream &s, const MetaFunctional *java_class, } } #endif - QString include_block = java_class->name().replace("$", "_").toUpper() + "_SHELL_H"; + QString include_block = java_class->name().replace(u'$', u'_').toUpper() + "_SHELL_H"; s << "#ifndef " << include_block << Qt::endl << "#define " << include_block << Qt::endl << Qt::endl; @@ -147,7 +151,7 @@ void CppHeaderGenerator::write(QTextStream &s, const MetaFunctional *java_class, writeInclude(s, icl, included); } } - writeInclude(s, Include(Include::IncludePath, "QtCore/QtGlobal"), included); + writeInclude(s, Include(Include::IncludePath, QStringLiteral(u"QtCore/QtGlobal")), included); bool hasDeprecation = java_class->isDeclDeprecated() || (java_class->type() && (java_class->type()->typeEntry()->isDeclDeprecated() || java_class->type()->typeEntry()->isContainer())); if(!hasDeprecation){ for(const MetaArgument* arg : java_class->arguments()){ @@ -158,7 +162,7 @@ void CppHeaderGenerator::write(QTextStream &s, const MetaFunctional *java_class, } } if(hasDeprecation){ - writeInclude(s, Include(Include::IncludePath, "QtCore/qcompilerdetection.h"), included); + writeInclude(s, Include(Include::IncludePath, QStringLiteral(u"QtCore/qcompilerdetection.h")), included); s << Qt::endl << "QT_WARNING_DISABLE_DEPRECATED" << Qt::endl << "QT_WARNING_DISABLE_GCC(\"-Wdeprecated-declarations\")" << Qt::endl << Qt::endl; } @@ -167,10 +171,10 @@ void CppHeaderGenerator::write(QTextStream &s, const MetaFunctional *java_class, writeInclude(s, java_class->enclosingClass()->typeEntry()->include(), included); } writeInclude(s, java_class->typeEntry()->include(), included); - writeInclude(s, Include(Include::IncludePath, "QtJambi/QtJambiAPI"), included); - writeInclude(s, Include(Include::IncludePath, "QtJambi/FunctionalBase"), included); + writeInclude(s, Include(Include::IncludePath, QStringLiteral(u"QtJambi/QtJambiAPI")), included); + writeInclude(s, Include(Include::IncludePath, QStringLiteral(u"QtJambi/FunctionalBase")), included); if(java_class->isFunctionPointer() && !java_class->typeEntry()->getUsing().isEmpty()){ - writeInclude(s, Include(Include::IncludePath, "QtJambi/FunctionPointer"), included); + writeInclude(s, Include(Include::IncludePath, QStringLiteral(u"QtJambi/FunctionPointer")), included); } IncludeList list = java_class->typeEntry()->extraIncludes(); std::sort(list.begin(), list.end()); @@ -219,7 +223,7 @@ void CppHeaderGenerator::write(QTextStream &s, const MetaFunctional *java_class, << " Functor(" << shellClassName(java_class) << "& functional);" << Qt::endl << " friend class " << shellClassName(java_class) << ";" << Qt::endl << " };" << Qt::endl << Qt::endl - << " static jobject resolveFunctional(JNIEnv *, const " << java_class->typeEntry()->qualifiedCppName() << "*);" << Qt::endl << Qt::endl + << " static jobject resolveFunctional(JNIEnv *, const void*, bool* ok);" << Qt::endl << Qt::endl << "private:" << Qt::endl << " QtJambiShell* __shell() const override final;" << Qt::endl << " friend class " << shellClassName(java_class) << "::Functor;" << Qt::endl; @@ -260,7 +264,7 @@ void CppHeaderGenerator::write(QTextStream &s, const MetaClass *java_class, int) } } #endif - QString include_block = java_class->name().replace("$", "_").toUpper() + "_SHELL_H"; + QString include_block = java_class->name().replace(u'$', u'_').toUpper() + "_SHELL_H"; s << "#ifndef " << include_block << Qt::endl << "#define " << include_block << Qt::endl << Qt::endl; @@ -276,7 +280,7 @@ void CppHeaderGenerator::write(QTextStream &s, const MetaClass *java_class, int) writeInclude(s, icl, included); } } - writeInclude(s, Include(Include::IncludePath, "QtCore/QtGlobal"), included); + writeInclude(s, Include(Include::IncludePath, QStringLiteral(u"QtCore/QtGlobal")), included); QList returnScopeRequired; for(const MetaFunction *function : java_class->functionsInShellClass()) { @@ -285,7 +289,7 @@ void CppHeaderGenerator::write(QTextStream &s, const MetaClass *java_class, int) } if(!returnScopeRequired.isEmpty()) - writeInclude(s, Include(Include::IncludePath, "memory"), included); + writeInclude(s, Include(Include::IncludePath, QStringLiteral(u"memory")), included); bool hasDeprecation = java_class->isDeclDeprecated(); if(!hasDeprecation){ @@ -312,7 +316,7 @@ void CppHeaderGenerator::write(QTextStream &s, const MetaClass *java_class, int) } } if(hasDeprecation){ - writeInclude(s, Include(Include::IncludePath, "QtCore/qcompilerdetection.h"), included); + writeInclude(s, Include(Include::IncludePath, QStringLiteral(u"QtCore/qcompilerdetection.h")), included); s << Qt::endl << "QT_WARNING_DISABLE_DEPRECATED" << Qt::endl << "QT_WARNING_DISABLE_GCC(\"-Wdeprecated-declarations\")" << Qt::endl << Qt::endl; } @@ -324,7 +328,7 @@ void CppHeaderGenerator::write(QTextStream &s, const MetaClass *java_class, int) writeInclude(s, java_class->typeEntry()->include(), included); - writeInclude(s, Include(Include::IncludePath, "QtJambi/QtJambiAPI"), included); + writeInclude(s, Include(Include::IncludePath, QStringLiteral(u"QtJambi/QtJambiAPI")), included); IncludeList list = java_class->typeEntry()->extraIncludes(); std::sort(list.begin(), list.end()); @@ -334,12 +338,9 @@ void CppHeaderGenerator::write(QTextStream &s, const MetaClass *java_class, int) writeInclude(s, inc, included); } if(java_class->hasPaintMethod()) - writeInclude(s, Include(Include::IncludePath, "QtJambi/AboutToPaint"), included); -// if(java_class->hasQmlListProperty()) -// writeInclude(s, Include(Include::IncludePath, "QtJambi/QmlAPI"), included); - + writeInclude(s, Include(Include::IncludePath, QStringLiteral(u"QtJambi/AboutToPaint")), included); - writeInclude(s, Include(Include::IncludePath, "QtJambi/RegistryAPI"), included); + writeInclude(s, Include(Include::IncludePath, QStringLiteral(u"QtJambi/RegistryAPI")), included); s << Qt::endl; if(!java_class->typeEntry()->ppCondition().isEmpty()){ @@ -380,8 +381,8 @@ void CppHeaderGenerator::write(QTextStream &s, const MetaClass *java_class, int) } if(!ppConditions.isEmpty()){ for (int i=0; i= QT_VERSION_CHECK(6, 6, 0) +#define qAsConst std::as_const +#endif + static Indentor INDENT; namespace QNativePointer{ @@ -70,15 +74,15 @@ namespace QNativePointer{ using namespace QNativePointer; static const QMap default_return_table{ - {"boolean", "false"}, - {"byte", "0"}, - {"char", "0"}, - {"short", "0"}, - {"int", "0"}, - {"long", "0"}, - {"float", "0.0f"}, - {"double", "0.0"}, - {"java.lang.Object", "nullptr"} + {QStringLiteral(u"boolean"), QStringLiteral(u"false")}, + {QStringLiteral(u"byte"), QStringLiteral(u"0")}, + {QStringLiteral(u"char"), QStringLiteral(u"0")}, + {QStringLiteral(u"short"), QStringLiteral(u"0")}, + {QStringLiteral(u"int"), QStringLiteral(u"0")}, + {QStringLiteral(u"long"), QStringLiteral(u"0")}, + {QStringLiteral(u"float"), QStringLiteral(u"0.0f")}, + {QStringLiteral(u"double"), QStringLiteral(u"0.0")}, + {QStringLiteral(u"java.lang.Object"), QStringLiteral(u"nullptr")} }; CppImplGenerator::CppImplGenerator(PriGenerator *pri) : CppGenerator(pri) { @@ -139,81 +143,81 @@ QString CppImplGenerator::default_return_statement_qt(const MetaType *java_type, Q_ASSERT(!java_type->isPrimitive()); if (java_type->isJObjectWrapper()){ if (java_type->typeEntry()->isJMapWrapper()) - return returnStr + "JMapWrapper()"; + return returnStr + QStringLiteral(u"JMapWrapper()"); else if (java_type->typeEntry()->isJCollectionWrapper()) - return returnStr + "JCollectionWrapper()"; + return returnStr + QStringLiteral(u"JCollectionWrapper()"); else if (java_type->typeEntry()->isJIteratorWrapper()) - return returnStr + "JIteratorWrapper()"; + return returnStr + QStringLiteral(u"JIteratorWrapper()"); else if (java_type->typeEntry()->isJEnumWrapper()) - return returnStr + "JEnumWrapper()"; + return returnStr + QStringLiteral(u"JEnumWrapper()"); else if (java_type->typeEntry()->isJQFlagsWrapper()) - return returnStr + "JQFlagsWrapper()"; - else return returnStr + "JObjectWrapper()"; + return returnStr + QStringLiteral(u"JQFlagsWrapper()"); + else return returnStr + QStringLiteral(u"JObjectWrapper()"); } if (java_type->isQVariant()) - return returnStr + "QVariant()"; + return returnStr + QStringLiteral(u"QVariant()"); if (java_type->isCharString()) - return returnStr + "nullptr"; + return returnStr + QStringLiteral(u"nullptr"); if (java_type->isQString()) - return returnStr + "QString()"; + return returnStr + QStringLiteral(u"QString()"); if (java_type->isQStringRef()) - return returnStr + "QStringRef()"; + return returnStr + QStringLiteral(u"QStringRef()"); if (java_type->isQStringView()) - return returnStr + "QStringView()"; + return returnStr + QStringLiteral(u"QStringView()"); if (java_type->isQAnyStringView()) - return returnStr + "QAnyStringView()"; + return returnStr + QStringLiteral(u"QAnyStringView()"); if (java_type->isQUtf8StringView()) - return returnStr + "QUtf8StringView()"; + return returnStr + QStringLiteral(u"QUtf8StringView()"); if (java_type->isQChar()) - return returnStr + "QChar()"; + return returnStr + QStringLiteral(u"QChar()"); else if (java_type->isEnum()) - return returnStr + java_type->typeEntry()->name() + "(0)"; + return returnStr + java_type->typeEntry()->name() + QStringLiteral(u"(0)"); else if (java_type->isFlags()) - return returnStr + java_type->typeEntry()->name() + "()"; + return returnStr + java_type->typeEntry()->name() + QStringLiteral(u"()"); else if (java_type->isPointerContainer()) - return returnStr + java_type->cppSignature() + "()"; + return returnStr + java_type->cppSignature() + QStringLiteral(u"()"); else if (java_type->isInitializerList()) - return returnStr + java_type->cppSignature() + "()"; + return returnStr + java_type->cppSignature() + QStringLiteral(u"()"); else if (java_type->isContainer() && static_cast(java_type->typeEntry())->type() == ContainerTypeEntry::StringListContainer) - return returnStr + java_type->typeEntry()->name() + "()"; + return returnStr + java_type->typeEntry()->name() + QStringLiteral(u"()"); else if (java_type->isContainer() && static_cast(java_type->typeEntry())->type() == ContainerTypeEntry::ByteArrayListContainer) - return returnStr + java_type->typeEntry()->name() + "()"; + return returnStr + java_type->typeEntry()->name() + QStringLiteral(u"()"); else if (java_type->isContainer() || java_type->isIterator() || (java_type->typeEntry()->isComplex() && static_cast(java_type->typeEntry())->hasPublicDefaultConstructor())) - return returnStr + java_type->cppSignature() + "()"; + return returnStr + java_type->cppSignature() + QStringLiteral(u"()"); else - return returnStr + "{}"; + return returnStr + QStringLiteral(u"{}"); } QString default_return_statement_java(const MetaType *java_type, AbstractGenerator::Option options = AbstractGenerator::NoOption) { - QString returnStr = ((options & AbstractGenerator::NoReturnStatement) == 0 ? "return " : ""); + QString returnStr = ((options & AbstractGenerator::NoReturnStatement) == 0 ? QStringLiteral(u"return ") : QStringLiteral(u"")); if (!java_type) - return "return"; + return QStringLiteral(u"return"); if (java_type->isArray() || !java_type->indirections().isEmpty()) - return returnStr+"nullptr"; + return returnStr+QStringLiteral(u"nullptr"); QString signature = default_return_table.value(java_type->typeEntry()->targetLangName()); if (!signature.isEmpty()) return returnStr+signature; Q_ASSERT(!java_type->isPrimitive()); - return returnStr+"nullptr"; + return returnStr+QStringLiteral(u"nullptr"); } /* Used to decide how which of the Call[Xxx]Method functions to call */ -QByteArray jniTypeName(const QString &name) { - static QMap table; +QString jniTypeName(const QString &name) { + static QMap table; if (table.isEmpty()) { - table["jboolean"] = "Boolean"; - table["jbyte"] = "Byte"; - table["jchar"] = "Char"; - table["jshort"] = "Short"; - table["jint"] = "Int"; - table["jlong"] = "Long"; - table["jfloat"] = "Float"; - table["jdouble"] = "Double"; - table["jobject"] = "Object"; + table[QStringLiteral(u"jboolean")] = QStringLiteral(u"Boolean"); + table[QStringLiteral(u"jbyte")] = QStringLiteral(u"Byte"); + table[QStringLiteral(u"jchar")] = QStringLiteral(u"Char"); + table[QStringLiteral(u"jshort")] = QStringLiteral(u"Short"); + table[QStringLiteral(u"jint")] = QStringLiteral(u"Int"); + table[QStringLiteral(u"jlong")] = QStringLiteral(u"Long"); + table[QStringLiteral(u"jfloat")] = QStringLiteral(u"Float"); + table[QStringLiteral(u"jdouble")] = QStringLiteral(u"Double"); + table[QStringLiteral(u"jobject")] = QStringLiteral(u"Object"); } return table[name]; @@ -221,7 +225,7 @@ QByteArray jniTypeName(const QString &name) { QString CppImplGenerator::jniReturnName(const MetaFunction *java_function) const{ if(java_function->useArgumentAsBuffer(0)){ - return "jobject"; + return QStringLiteral(u"jobject"); }else if(java_function->useArgumentAsArray(0)){ QScopedPointer cpy(java_function->type()->copy()); cpy->setConstant(false); @@ -233,26 +237,26 @@ QString CppImplGenerator::jniReturnName(const MetaFunction *java_function) const } MetaBuilder::decideUsagePattern(cpy.get()); QString singleType = jni_signature(cpy.get(), JNISignatureFormat::ReturnType); - if(singleType=="jint" || singleType=="int" || singleType=="I"){ - return "jintArray"; - }else if(singleType=="jbyte" || singleType=="byte" || singleType=="B"){ - return "jbyteArray"; - }else if(singleType=="jboolean" || singleType=="bool" || singleType=="Z"){ - return "jbooleanArray"; - }else if(singleType=="jchar" || singleType=="char" || singleType=="C"){ - return "jcharArray"; - }else if(singleType=="jshort" || singleType=="short" || singleType=="S"){ - return "jshortArray"; - }else if(singleType=="jlong" || singleType=="long" || singleType=="J"){ - return "jlongArray"; - }else if(singleType=="jfloat" || singleType=="float" || singleType=="F"){ - return "jfloatArray"; - }else if(singleType=="jdouble" || singleType=="double" || singleType=="D"){ - return "jdoubleArray"; + if(singleType==QStringLiteral(u"jint") || singleType==QStringLiteral(u"int") || singleType==QStringLiteral(u"I")){ + return QStringLiteral(u"jintArray"); + }else if(singleType==QStringLiteral(u"jbyte") || singleType==QStringLiteral(u"byte") || singleType==QStringLiteral(u"B")){ + return QStringLiteral(u"jbyteArray"); + }else if(singleType==QStringLiteral(u"jboolean") || singleType==QStringLiteral(u"bool") || singleType==QStringLiteral(u"Z")){ + return QStringLiteral(u"jbooleanArray"); + }else if(singleType==QStringLiteral(u"jchar") || singleType==QStringLiteral(u"char") || singleType==QStringLiteral(u"C")){ + return QStringLiteral(u"jcharArray"); + }else if(singleType==QStringLiteral(u"jshort") || singleType==QStringLiteral(u"short") || singleType==QStringLiteral(u"S")){ + return QStringLiteral(u"jshortArray"); + }else if(singleType==QStringLiteral(u"jlong") || singleType==QStringLiteral(u"long") || singleType==QStringLiteral(u"J")){ + return QStringLiteral(u"jlongArray"); + }else if(singleType==QStringLiteral(u"jfloat") || singleType==QStringLiteral(u"float") || singleType==QStringLiteral(u"F")){ + return QStringLiteral(u"jfloatArray"); + }else if(singleType==QStringLiteral(u"jdouble") || singleType==QStringLiteral(u"double") || singleType==QStringLiteral(u"D")){ + return QStringLiteral(u"jdoubleArray"); }else{ - return "jobjectArray"; + return QStringLiteral(u"jobjectArray"); } - return "jobject"; + return QStringLiteral(u"jobject"); } QString return_type = translateType(java_function->type(), EnumAsInts); QString new_return_type = java_function->typeReplaced(0); @@ -263,74 +267,74 @@ QString CppImplGenerator::jniReturnName(const MetaFunction *java_function) const } -QByteArray jniTypeName(const MetaType *java_type) { +QString jniTypeName(const MetaType *java_type) { if (!java_type) { - return "Void"; + return QStringLiteral(u"Void"); } else if (java_type->isQChar()) { - return "Char"; + return QStringLiteral(u"Char"); } else if (java_type->isPrimitive()) { return jniTypeName(java_type->typeEntry()->jniName()); } else if (java_type->isIntegerEnum() || java_type->isIntegerFlags()) { - return "Int"; + return QStringLiteral(u"Int"); } else { - return "Object"; + return QStringLiteral(u"Object"); } } -QByteArray newXxxArray(const MetaType *java_type) { +QString newXxxArray(const MetaType *java_type) { return "New" + jniTypeName(java_type) + "Array"; } -QByteArray setXxxArrayElement(const MetaType *java_type) { +QString setXxxArrayElement(const MetaType *java_type) { Q_ASSERT(java_type); return "Set" + jniTypeName(java_type) + "ArrayElement"; } -QByteArray getXxxArrayElement(const MetaType *java_type) { +QString getXxxArrayElement(const MetaType *java_type) { Q_ASSERT(java_type); return "Get" + jniTypeName(java_type) + "ArrayElement"; } -QByteArray getXxxArrayRegion(const MetaType *java_type) { +QString getXxxArrayRegion(const MetaType *java_type) { Q_ASSERT(java_type); return "Get" + jniTypeName(java_type) + "ArrayRegion"; } -QByteArray setXxxArrayRegion(const MetaType *java_type) { +QString setXxxArrayRegion(const MetaType *java_type) { Q_ASSERT(java_type); return "Set" + jniTypeName(java_type) + "ArrayRegion"; } -QByteArray CppImplGenerator::callXxxMethod(const MetaType *java_type) const { +QString CppImplGenerator::callXxxMethod(const MetaType *java_type) const { return "Call" + jniTypeName(java_type) + "Method"; } -QByteArray CppImplGenerator::callXxxMethod(const QString &name) const{ +QString CppImplGenerator::callXxxMethod(const QString &name) const{ TypeEntry *entry = database()->findType(name); if (entry){ if(entry->isPrimitive()) return "Call" + jniTypeName(entry->jniName()) + "Method"; - else return "CallObjectMethod"; + else return QStringLiteral(u"CallObjectMethod"); }else{ - if(name=="void") - return "CallVoidMethod"; - else if(name=="boolean") - return "CallBooleanMethod"; - else if(name=="int") - return "CallIntMethod"; - else if(name=="long") - return "CallLongMethod"; - else if(name=="short") - return "CallShortMethod"; - else if(name=="byte") - return "CallByteMethod"; - else if(name=="char") - return "CallCharMethod"; - else if(name=="float") - return "CallFloatMethod"; - else if(name=="double") - return "CallDoubleMethod"; - return "CallObjectMethod"; + if(name==QStringLiteral(u"void")) + return QStringLiteral(u"CallVoidMethod"); + else if(name==QStringLiteral(u"boolean")) + return QStringLiteral(u"CallBooleanMethod"); + else if(name==QStringLiteral(u"int")) + return QStringLiteral(u"CallIntMethod"); + else if(name==QStringLiteral(u"long")) + return QStringLiteral(u"CallLongMethod"); + else if(name==QStringLiteral(u"short")) + return QStringLiteral(u"CallShortMethod"); + else if(name==QStringLiteral(u"byte")) + return QStringLiteral(u"CallByteMethod"); + else if(name==QStringLiteral(u"char")) + return QStringLiteral(u"CallCharMethod"); + else if(name==QStringLiteral(u"float")) + return QStringLiteral(u"CallFloatMethod"); + else if(name==QStringLiteral(u"double")) + return QStringLiteral(u"CallDoubleMethod"); + return QStringLiteral(u"CallObjectMethod"); } } @@ -391,12 +395,12 @@ bool hasDeleter(const MetaClass *cls) { && !cls->typeEntry()->isQObject() && !cls->typeEntry()->isNamespace() && !cls->isInterface() - && ((entry->codeGeneration() & TypeEntry::GenerateCode) != 0) + && (entry->codeGeneration() & TypeEntry::GenerateCode) ) { return lookupClassWithPublicDestructor(cls) != nullptr; } if(entry->skipMetaTypeRegistration() - && ((entry->codeGeneration() & TypeEntry::GenerateCode) != 0)){ + && (entry->codeGeneration() & TypeEntry::GenerateCode)){ return lookupClassWithPublicDestructor(cls) != nullptr; } return false; @@ -406,17 +410,17 @@ QString CppImplGenerator::fileNameForClass(const MetaClass *java_class) const { if(java_class->typeEntry()->designatedInterface()){ return fileNameForClass(java_class->enclosingClass()); } - return QString("%1_shell.cpp").arg(java_class->name().replace("$", "_")); + return QStringLiteral(u"%1_shell.cpp").arg(java_class->name().replace(u'$', u'_')); } QString CppImplGenerator::fileNameForFunctional(const MetaFunctional *java_class) const { if(java_class->enclosingClass() && !java_class->enclosingClass()->isFake()) - return QString("%1_%2_shell.cpp").arg(java_class->enclosingClass()->name().replace("$", "_"), java_class->name().replace("$", "_")); + return QStringLiteral(u"%1_%2_shell.cpp").arg(java_class->enclosingClass()->name().replace(u'$', u'_'), java_class->name().replace(u'$', u'_')); else - return QString("%1_shell.cpp").arg(java_class->name().replace("$", "_")); + return QStringLiteral(u"%1_shell.cpp").arg(java_class->name().replace(u'$', u'_')); } -void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, int) { +void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_functional, int) { #if 0 { QString fileName("written_classes_cpp.log"); @@ -432,9 +436,9 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i } } #endif - bool hasDeprecation = java_class->isDeclDeprecated() || (java_class->type() && (java_class->type()->typeEntry()->isDeclDeprecated() || java_class->type()->typeEntry()->isContainer())); + bool hasDeprecation = java_functional->isDeclDeprecated() || (java_functional->type() && (java_functional->type()->typeEntry()->isDeclDeprecated() || java_functional->type()->typeEntry()->isContainer())); if(!hasDeprecation){ - for(const MetaArgument* arg : java_class->arguments()){ + for(const MetaArgument* arg : java_functional->arguments()){ if(arg->type()->typeEntry()->isDeclDeprecated() || arg->type()->typeEntry()->isContainer()){ hasDeprecation = true; break; @@ -443,11 +447,11 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i } // Includes QSet included; - if(!(java_class->typeEntry()->codeGeneration() & TypeEntry::GenerateNoShell)){ - if(java_class->enclosingClass() && !java_class->enclosingClass()->isFake()){ - writeInclude(s, Include(Include::LocalPath, QString(java_class->enclosingClass()->name()).replace("$", "_")+"_"+QString(java_class->name().replace("$", "_"))+"_shell.h"), included); + if(!(java_functional->typeEntry()->codeGeneration() & TypeEntry::GenerateNoShell)){ + if(java_functional->enclosingClass() && !java_functional->enclosingClass()->isFake()){ + writeInclude(s, Include(Include::LocalPath, QString(java_functional->enclosingClass()->name()).replace(u'$', u'_')+"_"+QString(java_functional->name().replace(u'$', u'_'))+"_shell.h"), included); }else{ - writeInclude(s, Include(Include::LocalPath, QString(java_class->name().replace("$", "_"))+"_shell.h"), included); + writeInclude(s, Include(Include::LocalPath, QString(java_functional->name().replace(u'$', u'_'))+"_shell.h"), included); } if(hasDeprecation){ s << Qt::endl << "QT_WARNING_DISABLE_DEPRECATED" << Qt::endl @@ -455,9 +459,9 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i } }else{ { - IncludeList includes = java_class->typeEntry()->extraIncludes(); - if(java_class->typeEntry()->designatedInterface()){ - includes << java_class->typeEntry()->designatedInterface()->extraIncludes(); + IncludeList includes = java_functional->typeEntry()->extraIncludes(); + if(java_functional->typeEntry()->designatedInterface()){ + includes << java_functional->typeEntry()->designatedInterface()->extraIncludes(); } std::sort(includes.begin(), includes.end()); for(const Include& icl : includes){ @@ -471,66 +475,66 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i s << Qt::endl << "QT_WARNING_DISABLE_DEPRECATED" << Qt::endl << "QT_WARNING_DISABLE_GCC(\"-Wdeprecated-declarations\")" << Qt::endl << Qt::endl; } - writeCodeInjections(s, java_class->typeEntry(), CodeSnip::Position1, TS::NativeCode); - if(java_class->enclosingClass()){ - writeInclude(s, java_class->enclosingClass()->typeEntry()->include(), included); + writeCodeInjections(s, java_functional->typeEntry(), CodeSnip::Position1, TS::NativeCode); + if(java_functional->enclosingClass()){ + writeInclude(s, java_functional->enclosingClass()->typeEntry()->include(), included); } - writeInclude(s, java_class->typeEntry()->include(), included); - writeExtraIncludes(s, java_class, included, true); + writeInclude(s, java_functional->typeEntry()->include(), included); + writeExtraIncludes(s, java_functional, included, true); writeInclude(s, Include(Include::IncludePath, "QtJambi/QtJambiAPI"), included); - writeExtraIncludes(s, java_class, included); + writeExtraIncludes(s, java_functional, included); } writeInclude(s, Include(Include::IncludePath, "QtJambi/RegistryAPI"), included); - if(java_class->isFunctionPointer() && java_class->typeEntry()->getUsing().isEmpty()){ + if(java_functional->isFunctionPointer() && java_functional->typeEntry()->getUsing().isEmpty()){ writeInclude(s, Include(Include::IncludePath, "QtJambi/FunctionPointer"), included); } writeInclude(s, Include(Include::IncludePath, "QtJambi/Cast"), included); - if(java_class->enclosingClass() && !java_class->enclosingClass()->typeEntry()->ppCondition().isEmpty()){ - s << Qt::endl << "#if " << java_class->enclosingClass()->typeEntry()->ppCondition() << Qt::endl << Qt::endl; + if(java_functional->enclosingClass() && !java_functional->enclosingClass()->typeEntry()->ppCondition().isEmpty()){ + s << Qt::endl << "#if " << java_functional->enclosingClass()->typeEntry()->ppCondition() << Qt::endl << Qt::endl; } - writeCodeInjections(s, java_class->typeEntry(), CodeSnip::Beginning, TS::NativeCode); + writeCodeInjections(s, java_functional->typeEntry(), CodeSnip::Beginning, TS::NativeCode); - if(!(java_class->typeEntry()->codeGeneration() & TypeEntry::GenerateNoShell)){ + if(!(java_functional->typeEntry()->codeGeneration() & TypeEntry::GenerateNoShell)){ s << "// emitting (writeShellConstructor)" << Qt::endl; - writeShellConstructor(s, java_class); + writeShellConstructor(s, java_functional); s << "// emitting (writeShellDestructor)" << Qt::endl; - writeShellDestructor(s, java_class); + writeShellDestructor(s, java_functional); - s << "// construct " << shellClassName(java_class) << Qt::endl - << "void __qt_construct_" << QString(java_class->typeEntry()->name()).replace("::", "_").replace("<", "_").replace(">", "_") << "_0"; - s << "(void* __qtjambi_ptr, JNIEnv*, jobject, jvalue*)" << Qt::endl + s << "// construct " << shellClassName(java_functional) << Qt::endl + << "void __qt_construct_" << QString(java_functional->typeEntry()->name()).replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); + s << "(void* __qtjambi_ptr, JNIEnv*, jobject, jvalue*, bool)" << Qt::endl << "{" << Qt::endl; { INDENTATION(INDENT) - s << INDENT << "QTJAMBI_NATIVE_METHOD_CALL(\"construct " << java_class->typeEntry()->qualifiedCppName() << "\")" << Qt::endl; - s << INDENT << "new (__qtjambi_ptr) " << shellClassName(java_class) << "();" << Qt::endl; + s << INDENT << "QTJAMBI_NATIVE_METHOD_CALL(\"construct " << java_functional->typeEntry()->qualifiedCppName() << "\")" << Qt::endl; + s << INDENT << "new (__qtjambi_ptr) " << shellClassName(java_functional) << "();" << Qt::endl; } s << "}" << Qt::endl; - s << "// destruct " << shellClassName(java_class) << Qt::endl - << "void __qt_destruct_" << QString(java_class->typeEntry()->name()).replace("::", "_").replace("<", "_").replace(">", "_"); + s << "// destruct " << shellClassName(java_functional) << Qt::endl + << "void __qt_destruct_" << QString(java_functional->typeEntry()->name()).replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); s << "(void* ptr)" << Qt::endl << "{" << Qt::endl; { INDENTATION(INDENT) - s << INDENT << "QTJAMBI_NATIVE_METHOD_CALL(\"destruct " << java_class->typeEntry()->qualifiedCppName() << "\")" << Qt::endl; - s << INDENT << "reinterpret_cast<" << shellClassName(java_class) << "*>(ptr)->~" << shellClassName(java_class).split("::").last() << "();" << Qt::endl; + s << INDENT << "QTJAMBI_NATIVE_METHOD_CALL(\"destruct " << java_functional->typeEntry()->qualifiedCppName() << "\")" << Qt::endl; + s << INDENT << "reinterpret_cast<" << shellClassName(java_functional) << "*>(ptr)->~" << shellClassName(java_functional).split("::").last() << "();" << Qt::endl; } s << "}" << Qt::endl << Qt::endl; - s << "void " << shellClassName(java_class) << "::operator delete(void * ptr) noexcept {" << Qt::endl; - s << " reinterpret_cast<" << shellClassName(java_class) << "*>(ptr)->" << shellClassName(java_class) << "::__shell()->tryDeleteShell(typeid(" << java_class->typeEntry()->qualifiedCppName() << "));" << Qt::endl; + s << "void " << shellClassName(java_functional) << "::operator delete(void * ptr) noexcept {" << Qt::endl; + s << " reinterpret_cast<" << shellClassName(java_functional) << "*>(ptr)->" << shellClassName(java_functional) << "::__shell()->tryDeleteShell(typeid(" << java_functional->typeEntry()->qualifiedCppName() << "));" << Qt::endl; s << "}" << Qt::endl << Qt::endl; - s << "QtJambiShell* " << shellClassName(java_class) << "::__shell() const { return *reinterpret_cast( quintptr(this) + sizeof(" << shellClassName(java_class) << ") ); }" << Qt::endl << Qt::endl; + s << "QtJambiShell* " << shellClassName(java_functional) << "::__shell() const { return *reinterpret_cast( quintptr(this) + sizeof(" << shellClassName(java_functional) << ") ); }" << Qt::endl << Qt::endl; - s << shellClassName(java_class) << "::Functor::Functor(" << shellClassName(java_class) << "& functional) : FunctorBase(typeid(" << java_class->typeEntry()->qualifiedCppName() << "), functional) {}" << Qt::endl << Qt::endl - << shellClassName(java_class) << "::Functor::Functor(const Functor& functor) : FunctorBase(functor) {}" << Qt::endl << Qt::endl - << shellClassName(java_class) << "::Functor::~Functor() {}" << Qt::endl << Qt::endl; + s << shellClassName(java_functional) << "::Functor::Functor(" << shellClassName(java_functional) << "& functional) : FunctorBase(typeid(" << java_functional->typeEntry()->qualifiedCppName() << "), functional) {}" << Qt::endl << Qt::endl + << shellClassName(java_functional) << "::Functor::Functor(const Functor& functor) : FunctorBase(functor) {}" << Qt::endl << Qt::endl + << shellClassName(java_functional) << "::Functor::~Functor() {}" << Qt::endl << Qt::endl; MetaType* originalReferenceFunctionType = nullptr; - MetaType *function_type = java_class->type(); + MetaType *function_type = java_functional->type(); if(function_type){ if(function_type->getReferenceType()!=MetaType::NoReference){ @@ -544,9 +548,9 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i }else{ s << "void"; } - s << " " << shellClassName(java_class) << "::Functor::operator()("; + s << " " << shellClassName(java_functional) << "::Functor::operator()("; int counter = 0; - for(const MetaArgument *arg : java_class->arguments()){ + for(const MetaArgument *arg : java_functional->arguments()){ if(counter>0) s << ", "; writeTypeInfo(s, arg->type(), Option()); @@ -555,7 +559,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i } s << ")" << Qt::endl << "{" << Qt::endl; - QString new_return_type = java_class->typeReplaced(0); + QString new_return_type = java_functional->typeReplaced(0); { INDENTATION(INDENT) if(function_type){ @@ -566,10 +570,10 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i s << INDENT << "if (jmethodID method_id = javaMethod()) {" << Qt::endl; { INDENTATION(INDENT) - s << INDENT << "if (JniEnvironment env{" << QString::number( 100*(java_class->arguments().size()+2) ) << "}) {" << Qt::endl; + s << INDENT << "if (JniEnvironment env{" << QString::number( 100*(java_functional->arguments().size()+2) ) << "}) {" << Qt::endl; { INDENTATION(INDENT) - bool isMessageHandler = java_class->arguments().size()==3 && java_class->typeEntry()->qualifiedCppName()=="QtMessageHandler"; + bool isMessageHandler = java_functional->arguments().size()==3 && java_functional->typeEntry()->qualifiedCppName()=="QtMessageHandler"; if(isMessageHandler){ s << INDENT << "JavaException throwable;" << Qt::endl << INDENT << "if(env->ExceptionCheck()){" << Qt::endl @@ -578,7 +582,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i << INDENT << " throwable = JavaException(env, t);" << Qt::endl << INDENT << "}" << Qt::endl; }else{ - s << INDENT << (java_class->isNoExcept() ? "QtJambiExceptionInhibitor" : "QtJambiExceptionHandler") << " __qj_exnhandler;" << Qt::endl; + s << INDENT << (java_functional->isNoExcept() ? "QtJambiExceptionInhibitor" : "QtJambiExceptionHandler") << " __qj_exnhandler;" << Qt::endl; } s << INDENT << "QTJAMBI_TRY {" << Qt::endl; { @@ -589,26 +593,26 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i { QTextStream s(&lines); INDENTATION(INDENT) - for(MetaArgument *argument : java_class->arguments()) { - ArgumentRemove ar = java_class->argumentRemoved(argument->argumentIndex() + 1); + for(MetaArgument *argument : java_functional->arguments()) { + ArgumentRemove ar = java_functional->argumentRemoved(argument->argumentIndex() + 1); switch(ar) { case ArgumentRemove_No:{ if (!argument->type()->isPrimitive() - || java_class->hasConversionRule(TS::NativeCode, argument->argumentIndex() + 1) + || java_functional->hasConversionRule(TS::NativeCode, argument->argumentIndex() + 1) ) { writeQtToJava(s, argument->type(), argument->indexedName(), "__java_" + argument->indexedName(), nullptr, - java_class, + java_functional, argument->argumentIndex() + 1, NoOption, "env", "__qtjambi_scope"); } - if (java_class->resetObjectAfterUse(argument->argumentIndex() + 1)){ + if (java_functional->resetObjectAfterUse(argument->argumentIndex() + 1)){ if (argument->type()->isContainer()){ s << INDENT << "QTJAMBI_INVALIDATE_CONTAINER_AFTER_USE(env, __java_" << argument->indexedName() << ");" << Qt::endl; }else if (argument->type()->isArray()){ @@ -623,7 +627,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i } } int counter = 0; - for(const MetaArgument* argument : java_class->arguments()) { + for(const MetaArgument* argument : java_functional->arguments()) { writeOwnership(s, nullptr, "__java_" + argument->indexedName(), "__qt_" + argument->indexedName(), counter + 1, nullptr, TS::ShellCode, "env", "__qtjambi_scope"); ++counter; } @@ -665,9 +669,9 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i } s << "(__java_this, method_id"; - if (java_class->arguments().size() > 0) + if (java_functional->arguments().size() > 0) s << ", "; - writeFunctionCallArguments(s, java_class, "__java_", Option(NoCasts | SkipRemovedArguments)); + writeFunctionCallArguments(s, java_functional, "__java_", Option(NoCasts | SkipRemovedArguments)); s << ")"; if(!typeWrap.isEmpty()) s << ")"; @@ -676,7 +680,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i if (function_type) { writeJavaToQt(s, function_type, "__qt_return_value_tmp", "__java_return_value", - nullptr, java_class, 0, GlobalRefJObject, "env", + nullptr, java_functional, 0, GlobalRefJObject, "env", "__qtjambi_scope"); // This line below i sonly needed because we can't instruction writeJavaToQt // to omit the emitting the function type, so then we could assign @@ -684,8 +688,8 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i // This is not very efficient for complex types as it may cause extra copying. if(function_type) s << INDENT << "__qt_return_value = __qt_return_value_tmp;" << Qt::endl; - } else if (java_class->hasConversionRule(TS::ShellCode, 0)) { - writeConversionRule(s, TS::ShellCode, nullptr, java_class, 0, "", "", NoOption, "env", "__qtjambi_scope"); + } else if (java_functional->hasConversionRule(TS::ShellCode, 0)) { + writeConversionRule(s, TS::ShellCode, nullptr, java_functional, 0, "", "", NoOption, "env", "__qtjambi_scope"); } } if(lines.contains("__qtjambi_scope")){ @@ -695,9 +699,9 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i s << INDENT << "}" << Qt::endl; } if(function_type){ - if(java_class->nullPointersDisabled() || originalReferenceFunctionType){ + if(java_functional->nullPointersDisabled() || originalReferenceFunctionType){ s << INDENT << "if(!__qt_return_value)" << Qt::endl; - s << INDENT << " JavaException::raiseNullPointerException(__jni_env, \"" << java_class->typeEntry()->qualifiedCppName() << ": Unexpected null pointer returned.\" QTJAMBI_STACKTRACEINFO );" << Qt::endl; + s << INDENT << " JavaException::raiseNullPointerException(__jni_env, \"" << java_functional->typeEntry()->qualifiedCppName() << ": Unexpected null pointer returned.\" QTJAMBI_STACKTRACEINFO );" << Qt::endl; } } } @@ -707,7 +711,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i if(isMessageHandler){ s << INDENT << "throwable.addSuppressed(env, exn);" << Qt::endl; }else{ - s << INDENT << "__qj_exnhandler.handle(env, exn, \"" << java_class->typeEntry()->qualifiedCppName() << "\");" << Qt::endl; + s << INDENT << "__qj_exnhandler.handle(env, exn, \"" << java_functional->typeEntry()->qualifiedCppName() << "\");" << Qt::endl; } } s << INDENT << "} QTJAMBI_TRY_END" << Qt::endl; @@ -735,32 +739,32 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i s << INDENT << "}" << Qt::endl << Qt::endl; - s << "void " << shellClassName(java_class) << "::getFunctional(JNIEnv *"; - if(java_class->isFunctionPointer()) + s << "void " << shellClassName(java_functional) << "::getFunctional(JNIEnv *"; + if(java_functional->isFunctionPointer()) s << "env"; s << ", void* result)" << Qt::endl << "{" << Qt::endl; { INDENTATION(INDENT) - if(java_class->isFunctionPointer()){ + if(java_functional->isFunctionPointer()){ INDENTATION(INDENT) - s << INDENT << "jobject __this = " << shellClassName(java_class) << "::__shell()->getJavaObjectLocalRef(env);" << Qt::endl; + s << INDENT << "jobject __this = " << shellClassName(java_functional) << "::__shell()->getJavaObjectLocalRef(env);" << Qt::endl; s << INDENT << "uint hash = QtJambiAPI::getJavaObjectIdentity(env, __this);" << Qt::endl; - s << INDENT << "*reinterpret_cast<" << java_class->typeEntry()->qualifiedCppName() << "*>(result) = qtjambi_function_pointer<"; - if(java_class->typeEntry()->count()!=0){ - s << QString::number(java_class->typeEntry()->count()); + s << INDENT << "*reinterpret_cast<" << java_functional->typeEntry()->qualifiedCppName() << "*>(result) = qtjambi_function_pointer<"; + if(java_functional->typeEntry()->count()!=0){ + s << QString::number(java_functional->typeEntry()->count()); }else{ s << "14"; } s << ","; - if(java_class->type()){ - writeTypeInfo(s, java_class->type(), Option(SkipName)); + if(java_functional->type()){ + writeTypeInfo(s, java_functional->type(), Option(SkipName)); }else{ s << "void"; } s << "("; int counter = 0; - for(const MetaArgument *arg : java_class->arguments()){ + for(const MetaArgument *arg : java_functional->arguments()){ if(counter>0) s << ","; writeTypeInfo(s, arg->type(), Option(SkipName)); @@ -768,65 +772,70 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i } s << ")>(Functor(*this), hash, &m_functionPointerDeleter, reverseFunctionGetter ? nullptr : &reverseFunctionGetter);" << Qt::endl; }else{ - s << INDENT << "*reinterpret_cast<" << java_class->typeEntry()->qualifiedCppName() << "*>(result) = Functor(*this);" << Qt::endl; + s << INDENT << "*reinterpret_cast<" << java_functional->typeEntry()->qualifiedCppName() << "*>(result) = Functor(*this);" << Qt::endl; } } s << "}" << Qt::endl << Qt::endl; - s << "jobject " << shellClassName(java_class) << "::resolveFunctional(JNIEnv * env, const " << java_class->typeEntry()->qualifiedCppName() << "* function)" << Qt::endl + s << "jobject " << shellClassName(java_functional) << "::resolveFunctional(JNIEnv * env, const void* functionPtr, bool* ok)" << Qt::endl << "{" << Qt::endl; { INDENTATION(INDENT) - s << INDENT << "if(function"; - if(java_class->isFunctionPointer()){ + s << INDENT << "if(functionPtr"; + if(java_functional->isFunctionPointer()){ s << " && reverseFunctionGetter"; } s << "){" << Qt::endl - << INDENT << " if(const " << shellClassName(java_class) << "::Functor* functor = "; - if(java_class->isFunctionPointer()){ - s << "reverseFunctionGetter(*function)"; + << INDENT << " const " << java_functional->typeEntry()->qualifiedCppName() << "& function = *reinterpret_casttypeEntry()->qualifiedCppName() << "*>(functionPtr);" << Qt::endl + << INDENT << " if(const " << shellClassName(java_functional) << "::Functor* functor = "; + if(java_functional->isFunctionPointer()){ + s << "reverseFunctionGetter(function)"; }else{ - s << "function->target<" << shellClassName(java_class) << "::Functor>()"; + s << "function.target<" << shellClassName(java_functional) << "::Functor>()"; } s << "){" << Qt::endl + << INDENT << " if(ok)" << Qt::endl + << INDENT << " *ok = true;" << Qt::endl << INDENT << " return functor->getJavaObjectLocalRef(env);" << Qt::endl << INDENT << " }" << Qt::endl + << INDENT << " if(ok)" << Qt::endl + << INDENT << " *ok = !function;" << Qt::endl << INDENT << "}" << Qt::endl << INDENT << "return nullptr;" << Qt::endl; } s << "}" << Qt::endl << Qt::endl; } - QString functionalClassPackage = java_class->package(); - QString functionalClassName = java_class->name(); - if(!(java_class->typeEntry()->codeGeneration() & TypeEntry::GenerateNoShell)){ + QString functionalClassPackage = java_functional->package(); + QString functionalClassName = java_functional->name(); + if(!(java_functional->typeEntry()->codeGeneration() & TypeEntry::GenerateNoShell)){ functionalClassName += "$Impl"; } - if(java_class->enclosingClass()){ - functionalClassName = java_class->enclosingClass()->name() + "$" + functionalClassName; - functionalClassPackage = java_class->enclosingClass()->package(); + if(java_functional->enclosingClass()){ + functionalClassName = java_functional->enclosingClass()->name() + "$" + functionalClassName; + functionalClassPackage = java_functional->enclosingClass()->package(); } - QString return_type = java_class->type() ? translateType(java_class->type(), Option(EnumAsInts)) : QLatin1String("void"); - QString functionName = java_class->typeEntry()->functionName().isEmpty() ? QString("call") : java_class->typeEntry()->functionName(); - if(java_class->needsCallThrough()) + QString return_type = java_functional->type() ? translateType(java_functional->type(), Option(EnumAsInts)) : QLatin1String("void"); + QString functionName = java_functional->typeEntry()->functionName().isEmpty() ? QString("call") : java_functional->typeEntry()->functionName(); + if(java_functional->needsCallThrough()) functionName = QString("%1_native").arg(functionName); QString args = "__"; JNISignatureFormat format = Underscores; - if (java_class->needsCallThrough()){ - if(java_class->typeEntry()->isNativeIdBased()){ + if (java_functional->needsCallThrough()){ + if(java_functional->typeEntry()->isNativeIdBased()){ args += "J"; } } - if (!java_class->arguments().isEmpty()) { - for(const MetaArgument *argument : java_class->arguments()) { - if (java_class->argumentRemoved(argument->argumentIndex() + 1)==ArgumentRemove_No) { + if (!java_functional->arguments().isEmpty()) { + for(const MetaArgument *argument : java_functional->arguments()) { + if (java_functional->argumentRemoved(argument->argumentIndex() + 1)==ArgumentRemove_No) { QString jniType; - QString modified_type = java_class->typeReplaced(argument->argumentIndex()+1, &jniType); - if(java_class->useArgumentAsBuffer(argument->argumentIndex() + 1)){ + QString modified_type = java_functional->typeReplaced(argument->argumentIndex()+1, &jniType); + if(java_functional->useArgumentAsBuffer(argument->argumentIndex() + 1)){ QScopedPointer cpy(argument->type()->copy()); cpy->setConstant(false); cpy->setReferenceType(MetaType::NoReference); @@ -854,7 +863,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i }else{ args += jni_signature("java.nio.Buffer", format); } - }else if(java_class->useArgumentAsArray(argument->argumentIndex() + 1)){ + }else if(java_functional->useArgumentAsArray(argument->argumentIndex() + 1)){ QScopedPointer array(argument->type()->copy()); array->setConstant(false); array->setReferenceType(MetaType::NoReference); @@ -870,19 +879,19 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i MetaBuilder::decideUsagePattern(cpy.get()); array->setArrayElementType(cpy.get()); args += jni_signature(array.get(), format); - int lengthParameter = java_class->arrayOrBufferLengthIndex(argument->argumentIndex() + 1); - if(lengthParameter>0 && lengthParameter<=java_class->arguments().size()){ - const MetaArgument *lengthParam = java_class->arguments()[lengthParameter - 1]; + int lengthParameter = java_functional->utilArgumentIndex(argument->argumentIndex() + 1); + if(lengthParameter>0 && lengthParameter<=java_functional->arguments().size()){ + const MetaArgument *lengthParam = java_functional->arguments()[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ lengthParam = nullptr; - for(const MetaArgument *argument : java_class->arguments()) { + for(const MetaArgument *argument : java_functional->arguments()) { if(argument && argument->argumentIndex()+1==lengthParameter){ lengthParam = argument; } } } - if(lengthParam && java_class->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ - QString typeReplaced = java_class->typeReplaced(lengthParam->argumentIndex() + 1); + if(lengthParam && java_functional->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ + QString typeReplaced = java_functional->typeReplaced(lengthParam->argumentIndex() + 1); if(typeReplaced.isEmpty()){ if(isCharSequenceSubstitute(lengthParam->type())){ args += jni_signature("java.lang.CharSequence", format); @@ -900,7 +909,9 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i } }else if (!modified_type.isEmpty() || !argument->type()->hasNativeId()) { if (modified_type.isEmpty()){ - if(isCharSequenceSubstitute(argument->type())){ + if(java_functional->useArgumentAsSlotContext(argument->argumentIndex() + 1)){ + args += jni_signature(QStringLiteral(u"io.qt.core.QObject"), format); + }else if(isCharSequenceSubstitute(argument->type())){ args += jni_signature("java.lang.CharSequence", format); }else{ args += jni_signature(argument->type(), format); @@ -919,25 +930,25 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i s << jni_function_signature( functionalClassPackage, - (java_class->typeEntry()->codeGeneration() & TypeEntry::GenerateNoShell) ? functionalClassName : functionalClassName+"$ConcreteWrapper", + (java_functional->typeEntry()->codeGeneration() & TypeEntry::GenerateNoShell) ? functionalClassName : functionalClassName+"$ConcreteWrapper", functionName, return_type, args ); s << Qt::endl << "(JNIEnv *__jni_env, jobject"; - if(java_class->typeEntry()->isNativeIdBased()){ + if(java_functional->typeEntry()->isNativeIdBased()){ s << ", QtJambiNativeID __this_nativeId"; }else{ s << " __this"; } - for(const MetaArgument *arg : java_class->arguments()){ - if(java_class->argumentRemoved(arg->argumentIndex() +1)) + for(const MetaArgument *arg : java_functional->arguments()){ + if(java_functional->argumentRemoved(arg->argumentIndex() +1)) continue; bool addArrayOffset = false; s << ", "; - if(java_class->useArgumentAsBuffer(arg->argumentIndex() + 1)){ + if(java_functional->useArgumentAsBuffer(arg->argumentIndex() + 1)){ s << "jobject"; - }else if(java_class->useArgumentAsArray(arg->argumentIndex() + 1)){ + }else if(java_functional->useArgumentAsArray(arg->argumentIndex() + 1)){ QScopedPointer array(arg->type()->copy()); array->setConstant(false); array->setReferenceType(MetaType::NoReference); @@ -953,11 +964,13 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i MetaBuilder::decideUsagePattern(cpy.get()); array->setArrayElementType(cpy.get()); s << translateType(array.get(), Option(UseNativeIds | EnumAsInts)); - addArrayOffset = java_class->insertArrayOffsetArgument(arg->argumentIndex() + 1); + addArrayOffset = java_functional->insertUtilArgument(arg->argumentIndex() + 1); }else{ QString jniType; - QString modified_type = java_class->typeReplaced(arg->argumentIndex() + 1, &jniType); - + QString modified_type = java_functional->typeReplaced(arg->argumentIndex() + 1, &jniType); + if(modified_type.isEmpty() && java_functional->useArgumentAsSlotContext(arg->argumentIndex() + 1)){ + modified_type = "io.qt.core.QObject"; + } if(!jniType.isEmpty()){ s << jniType; }else if(modified_type.isEmpty()){ @@ -970,19 +983,19 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i s << " " << arg->indexedName(); if(addArrayOffset){ s << ", "; - int lengthParameter = java_class->arrayOrBufferLengthIndex(arg->argumentIndex() + 1); - if(lengthParameter>0 && lengthParameter<=java_class->arguments().size()){ - const MetaArgument *lengthParam = java_class->arguments()[lengthParameter - 1]; + int lengthParameter = java_functional->utilArgumentIndex(arg->argumentIndex() + 1); + if(lengthParameter>0 && lengthParameter<=java_functional->arguments().size()){ + const MetaArgument *lengthParam = java_functional->arguments()[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ lengthParam = nullptr; - for(const MetaArgument *argument : java_class->arguments()) { + for(const MetaArgument *argument : java_functional->arguments()) { if(argument && argument->argumentIndex()+1==lengthParameter){ lengthParam = argument; } } } - if(lengthParam && java_class->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ - QString typeReplaced = java_class->typeReplaced(lengthParam->argumentIndex() + 1); + if(lengthParam && java_functional->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ + QString typeReplaced = java_functional->typeReplaced(lengthParam->argumentIndex() + 1); if(!typeReplaced.isEmpty()) s << jniName(annotationFreeTypeName(typeReplaced)); else @@ -997,91 +1010,91 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i s << "{" << Qt::endl; { INDENTATION(INDENT) - s << INDENT << "QTJAMBI_NATIVE_METHOD_CALL(\"" << java_class->name() << "(...)\")" << Qt::endl; - if(java_class->isRethrowExceptions() || java_class->isBlockExceptions() || java_class->isNoExcept()) + s << INDENT << "QTJAMBI_NATIVE_METHOD_CALL(\"" << java_functional->name() << "(...)\")" << Qt::endl; + if(java_functional->isRethrowExceptions() || java_functional->isBlockExceptions() || java_functional->isNoExcept()) s << INDENT << "QtJambiExceptionRaiser __qt_exceptionRaiser;" << Qt::endl; s << INDENT << "QtJambiScope __qtjambi_scope("; - if(java_class->typeEntry()->isNativeIdBased()){ + if(java_functional->typeEntry()->isNativeIdBased()){ s << "__this_nativeId"; }else{ s << "__jni_env, __this"; } s << ");" << Qt::endl << INDENT << "Q_UNUSED(__qtjambi_scope)" << Qt::endl; - if (java_class->type()) + if (java_functional->type()) s << INDENT << return_type << " __java_return_value{0};" << Qt::endl; s << INDENT << "QTJAMBI_TRY {" << Qt::endl; { INDENTATION(INDENT) - s << INDENT << java_class->typeEntry()->qualifiedCppName() << "* function = "; - if(java_class->typeEntry()->isNativeIdBased()){ - s << "QtJambiAPI::interfaceFromNativeId<" << java_class->typeEntry()->qualifiedCppName() << ">(__this_nativeId);" << Qt::endl; + s << INDENT << java_functional->typeEntry()->qualifiedCppName() << "* function = "; + if(java_functional->typeEntry()->isNativeIdBased()){ + s << "QtJambiAPI::interfaceFromNativeId<" << java_functional->typeEntry()->qualifiedCppName() << ">(__this_nativeId);" << Qt::endl; }else{ - s << "QtJambiAPI::convertJavaInterfaceToNative<" << java_class->typeEntry()->qualifiedCppName() << ">(__jni_env, __this);" << Qt::endl; + s << "QtJambiAPI::convertJavaInterfaceToNative<" << java_functional->typeEntry()->qualifiedCppName() << ">(__jni_env, __this);" << Qt::endl; } s << INDENT << "QtJambiAPI::checkNullPointer(__jni_env, function);" << Qt::endl; - for(const MetaArgument *argument : java_class->arguments()) { - if(java_class->argumentRemoved(argument->argumentIndex() +1)) + for(const MetaArgument *argument : java_functional->arguments()) { + if(java_functional->argumentRemoved(argument->argumentIndex() +1)) continue; if (!argument->type()->isPrimitive() - || java_class->hasConversionRule(TS::NativeCode, argument->argumentIndex() + 1)) { + || java_functional->hasConversionRule(TS::NativeCode, argument->argumentIndex() + 1)) { writeJavaToQt(s, argument->type(), "__qt_" + argument->indexedName(), argument->indexedName(), nullptr, - java_class, + java_functional, argument->argumentIndex() + 1, Option(UseNativeIds | EnumAsInts), "__jni_env", "__qtjambi_scope"); } } - if (java_class->type()) { + if (java_functional->type()) { const QString qt_return_value = "__qt_return_value"; const QString java_return_value = "__java_return_value"; bool noConversion = false; - if(java_class->type()->isPrimitive() - && java_class->typeReplaced(0).isEmpty() - && !java_class->hasConversionRule(TS::NativeCode, 0) - && (java_class->type()->typeEntry()->qualifiedCppName()=="int" - || java_class->type()->typeEntry()->qualifiedCppName()=="double" - || java_class->type()->typeEntry()->qualifiedCppName()=="float" - || java_class->type()->typeEntry()->qualifiedCppName()=="char" - || java_class->type()->typeEntry()->qualifiedCppName()=="short" - || java_class->type()->typeEntry()->qualifiedCppName()=="bool" - || java_class->type()->typeEntry()->qualifiedCppName()=="long long")){ + if(java_functional->type()->isPrimitive() + && java_functional->typeReplaced(0).isEmpty() + && !java_functional->hasConversionRule(TS::NativeCode, 0) + && (java_functional->type()->typeEntry()->qualifiedCppName()=="int" + || java_functional->type()->typeEntry()->qualifiedCppName()=="double" + || java_functional->type()->typeEntry()->qualifiedCppName()=="float" + || java_functional->type()->typeEntry()->qualifiedCppName()=="char" + || java_functional->type()->typeEntry()->qualifiedCppName()=="short" + || java_functional->type()->typeEntry()->qualifiedCppName()=="bool" + || java_functional->type()->typeEntry()->qualifiedCppName()=="long long")){ s << java_return_value << " = "; noConversion = true; }else { s << INDENT; - writeTypeInfo(s, java_class->type(), EnumAsInts); + writeTypeInfo(s, java_functional->type(), EnumAsInts); s << " " << qt_return_value << " = "; } - if(java_class->type()->isEnum()){ - uint size = static_cast(java_class->type()->typeEntry())->size(); + if(java_functional->type()->isEnum()){ + uint size = static_cast(java_functional->type()->typeEntry())->size(); s << "qint" << size << "("; } s << "(*function)("; - writeFunctionCallArguments(s, java_class, "__qt_"); + writeFunctionCallArguments(s, java_functional, "__qt_"); s << ")"; - if(java_class->type()->isEnum()){ + if(java_functional->type()->isEnum()){ s << ")"; } s << ";" << Qt::endl; if(!noConversion){ - writeQtToJava(s, java_class->type(), qt_return_value, java_return_value, + writeQtToJava(s, java_functional->type(), qt_return_value, java_return_value, nullptr, nullptr, 0, Option(NoTmpVariable | EnumAsInts), "__jni_env", "__qtjambi_scope"); } } else { s << INDENT << "(*function)("; - writeFunctionCallArguments(s, java_class, "__qt_"); + writeFunctionCallArguments(s, java_functional, "__qt_"); s << ");" << Qt::endl; } - if(java_class->isRethrowExceptions() || java_class->isBlockExceptions() || java_class->isNoExcept()) + if(java_functional->isRethrowExceptions() || java_functional->isBlockExceptions() || java_functional->isNoExcept()) s << INDENT << "__qt_exceptionRaiser.raise(__jni_env);" << Qt::endl; } s << INDENT << "} QTJAMBI_CATCH(const JavaException& exn) {" << Qt::endl; @@ -1092,7 +1105,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i } s << "}" << Qt::endl << Qt::endl; - if(!(java_class->typeEntry()->codeGeneration() & TypeEntry::GenerateNoShell)){ + if(!(java_functional->typeEntry()->codeGeneration() & TypeEntry::GenerateNoShell)){ s << jni_function_signature( functionalClassPackage, functionalClassName, @@ -1103,11 +1116,11 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i << "{" << Qt::endl; { INDENTATION(INDENT) - s << INDENT << "QTJAMBI_NATIVE_METHOD_CALL(\"" << shellClassName(java_class) << "\")" << Qt::endl; + s << INDENT << "QTJAMBI_NATIVE_METHOD_CALL(\"" << shellClassName(java_functional) << "\")" << Qt::endl; s << INDENT << "QTJAMBI_TRY {" << Qt::endl; { INDENTATION(INDENT) - s << INDENT << "QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_" << QString(java_class->typeEntry()->name()).replace("::", "_").replace("<", "_").replace(">", "_") << "_0, sizeof(" << shellClassName(java_class) << "), typeid(" << java_class->typeEntry()->qualifiedCppName() << "), &deleter_" << QString(java_class->typeEntry()->name()).replace("::", "_").replace("<", "_").replace(">", "_") << ");" << Qt::endl; + s << INDENT << "QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_" << QString(java_functional->typeEntry()->name()).replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << ", sizeof(" << shellClassName(java_functional) << "), typeid(" << java_functional->typeEntry()->qualifiedCppName() << "), &deleter_" << QString(java_functional->typeEntry()->name()).replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'<', u'_').replace(u'>', u'_') << ");" << Qt::endl; } s << INDENT << "} QTJAMBI_CATCH(const JavaException& exn) {" << Qt::endl; s << INDENT << " exn.raiseInJava(__jni_env);" << Qt::endl; @@ -1115,22 +1128,22 @@ void CppImplGenerator::write(QTextStream &s, const MetaFunctional *java_class, i } s << "}" << Qt::endl << Qt::endl; - if(java_class->isFunctionPointer()){ - s << "std::functiontypeEntry()->qualifiedCppName() << ")> " - << shellClassName(java_class) << "::reverseFunctionGetter = std::functiontypeEntry()->qualifiedCppName() << ")>();" << Qt::endl << Qt::endl; + if(java_functional->isFunctionPointer()){ + s << "std::functiontypeEntry()->qualifiedCppName() << ")> " + << shellClassName(java_functional) << "::reverseFunctionGetter = std::functiontypeEntry()->qualifiedCppName() << ")>();" << Qt::endl << Qt::endl; } } - writeMetaInfo(s, java_class); + writeMetaInfo(s, java_functional); - writeCodeInjections(s, java_class->typeEntry(), CodeSnip::End, TS::NativeCode); + writeCodeInjections(s, java_functional->typeEntry(), CodeSnip::End, TS::NativeCode); - if(java_class->enclosingClass() && !java_class->enclosingClass()->typeEntry()->ppCondition().isEmpty()){ - s << Qt::endl << "#endif // " << java_class->enclosingClass()->typeEntry()->ppCondition() << Qt::endl << Qt::endl; + if(java_functional->enclosingClass() && !java_functional->enclosingClass()->typeEntry()->ppCondition().isEmpty()){ + s << Qt::endl << "#endif // " << java_functional->enclosingClass()->typeEntry()->ppCondition() << Qt::endl << Qt::endl; } - QString pro_file_name = priGenerator->subDirectoryForClass(java_class, PriGenerator::CppDirectory) + "/generated.pri"; - priGenerator->addSource(pro_file_name, fileNameForFunctional(java_class)); + QString pro_file_name = priGenerator->subDirectoryForClass(java_functional, PriGenerator::CppDirectory) + "/generated.pri"; + priGenerator->addSource(pro_file_name, fileNameForFunctional(java_functional)); } void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { @@ -1212,9 +1225,9 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { if (CppHeaderGenerator::shouldGenerateHeaders(java_class)){ if(java_class->typeEntry()->designatedInterface() && java_class->enclosingClass()){ - writeInclude(s, Include(Include::LocalPath, QString(java_class->enclosingClass()->name().replace("$", "_"))+"_shell.h"), included); + writeInclude(s, Include(Include::LocalPath, QString(java_class->enclosingClass()->name().replace(u'$', u'_'))+"_shell.h"), included); }else{ - writeInclude(s, Include(Include::LocalPath, QString(java_class->name().replace("$", "_"))+"_shell.h"), included); + writeInclude(s, Include(Include::LocalPath, QString(java_class->name().replace(u'$', u'_'))+"_shell.h"), included); } if(hasDeprecation){ s << Qt::endl << "QT_WARNING_DISABLE_DEPRECATED" << Qt::endl @@ -1275,9 +1288,9 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { writeFunctionArguments(__s, f->arguments(), f, Option(SkipName), int(f->arguments().size())); } s << Qt::endl - << "int __signal_method_indexes_" << java_class->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "_" << i << "(){" << Qt::endl; + << "int __signal_method_indexes_" << java_class->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "_" << i << "(){" << Qt::endl; if(!pps.isEmpty()){ - s << "#if " << pps.join(" && ") << Qt::endl; + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; } s << " static int result = "; if(java_class->queryFunctionsByOriginalName(f->originalName()).size()>1){ @@ -1305,7 +1318,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { if(!pps.isEmpty()){ s << "#else" << Qt::endl; s << " return -1;" << Qt::endl; - s << "#endif //" << pps.join(" && ") << Qt::endl; + s << "#endif //" << pps.join(QStringLiteral(u" && ")) << Qt::endl; } s << "}" << Qt::endl; s << Qt::endl; @@ -1323,19 +1336,17 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { } } - QMultiMap availabeConstructors; - QList functionsInTargetLang; + MetaFunctionList functionsInTargetLang; - for(const MetaFunction *function : java_class->functionsInTargetLang()) { + for(MetaFunction *function : java_class->functionsInTargetLang()) { if ( - (!function->isConstructor() - || !java_class->hasUnimplmentablePureVirtualFunction()) + !function->isConstructor() && !function->isEmptyFunction() && !function->hasTemplateArgumentTypes() ) functionsInTargetLang << function; } - for(const MetaFunction *function : java_class->queryFunctions(MetaClass::NormalFunctions + for(MetaFunction *function : java_class->queryFunctions(MetaClass::NormalFunctions | MetaClass::AbstractFunctions | MetaClass::NotRemovedFromTargetLang)) { if (function->implementingClass() != java_class && @@ -1357,12 +1368,6 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { !function->isPrivate() && !function->hasTemplateArgumentTypes()){ writeShellConstructor(s, isInterface, function, SkipRemovedArguments); - for(int i=0; iarguments().size(); i++){ - if(!function->arguments().at(i)->originalDefaultValueExpression().isEmpty()){ - availabeConstructors.insert(i, function); - } - } - availabeConstructors.insert(int(function->arguments().size()), function); } } @@ -1402,7 +1407,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { // Write public overrides for functions that are protected in the base class // so they can be accessed from the native callback s << "// emitting Public Override Functions (publicOverrideFunctions)" << Qt::endl; - for(const MetaFunction *function : java_class->publicOverrideFunctions()) { + for(MetaFunction *function : java_class->publicOverrideFunctions()) { if((functionsInTargetLang.contains(function) || signalsInTargetLang.contains(function)) && !function->isProxyCall()) writePublicFunctionOverride(s, function, java_class); @@ -1410,7 +1415,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { // Write virtual function overries used to decide on static/virtual calls s << "// emitting Virtual Override Functions (virtualOverrideFunctions)" << Qt::endl; - for(const MetaFunction *function : java_class->virtualOverrideFunctions()) { + for(MetaFunction *function : java_class->virtualOverrideFunctions()) { if(!function->hasTemplateArgumentTypes() && (function->implementingClass()==java_class || function->implementingClass()==java_class->extractInterface() @@ -1427,64 +1432,22 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { s << Qt::endl << "#endif // " << java_class->typeEntry()->ppCondition() << Qt::endl << Qt::endl; } - QList signalNames; - QMap> sortedSignals; - for(const MetaFunction *function : signalsInTargetLang){ - QString key = function->declaringClass()->typeEntry()->qualifiedCppName() + "::" + function->name(); - if(!signalNames.contains(key)) - signalNames.append(key); - sortedSignals[key].append(function); - } - s << "// emitting (writeConstructors)" << Qt::endl; - int counter = 0; - QHash constructorIndexes; const MetaFunction * standardConstructor = nullptr; - for(const MetaFunction *function : java_class->functions()) { - if (function->isConstructor() - && !function->isModifiedRemoved(TS::NativeCode) - && !function->isPrivate() + if(!java_class->hasUnimplmentablePureVirtualFunction()){ + for(const MetaFunction *function : java_class->queryFunctions(MetaClass::Constructors + | MetaClass::Visible + | (java_class->isInterface() ? 0 : MetaClass::ClassImplements) + | (java_class->isFinal() ? MetaClass::WasPublic : 0))){ + if(!function->isEmptyFunction() && !function->hasTemplateArgumentTypes()){ - if (function->actualMinimumArgumentCount()==0) { - standardConstructor = function; - } - QList> defaultArgumentOverloads; - if(function->arguments().isEmpty()){ - defaultArgumentOverloads << QList(); - }else{ - for(const MetaArgument *argument : function->arguments()) { - ArgumentRemove argumentRemoved = function->argumentRemoved(argument->argumentIndex()+1); - bool hasDefault = !argument->originalDefaultValueExpression().isEmpty(); - if(defaultArgumentOverloads.isEmpty()){ - if(argumentRemoved!=ArgumentRemove_Remove && hasDefault){ - defaultArgumentOverloads << ( QList() << nullptr); - } - defaultArgumentOverloads << ( QList() << argument); - }else{ - if(!hasDefault - || argumentRemoved==ArgumentRemove_UseAsLength){ - for(int i=0; i> copy; - for(int i=0; i(defaultArgumentOverloads[i]) << argument); - } - defaultArgumentOverloads[i] << nullptr; - } - defaultArgumentOverloads << copy; - } - } + writeFinalConstructor(s, function, java_class); + if (!function->isModifiedRemoved(TS::NativeCode) + && !function->isPrivate() + && function->actualMinimumArgumentCount()==0) { + standardConstructor = function; } } - if(!java_class->hasUnimplmentablePureVirtualFunction()){ - for(int i=0; igenerateShellClass() || java_class->typeEntry()->isDestructorPublic()) ){ s << "// destruct " << (instantiateShellClass ? shellClassName(java_class) : java_class->fullQualifiedCppName()) << Qt::endl - << "void __qt_destruct_" << java_class->typeEntry()->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_"); + << "void __qt_destruct_" << java_class->typeEntry()->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); s << "(void* ptr)" << Qt::endl << "{" << Qt::endl; { @@ -1526,7 +1489,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { } if(java_class->isQObject() && !java_class->isFinal() && standardConstructor && !java_class->hasUnimplmentablePureVirtualFunction()){ - writeConstructor(s, standardConstructor, QList(), java_class, -1); + writeConstructor(s, standardConstructor, {}, java_class, true); s << "// emitting (functionsInTargetLang writePlacementConstructor)" << Qt::endl << jni_function_signature(java_class->package(), @@ -1543,7 +1506,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { pps << "(" + java_class->typeEntry()->ppCondition() + ")"; } if(!pps.isEmpty()){ - s << "#if " << pps.join(" && ") << Qt::endl; + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; } s << " QTJAMBI_NATIVE_METHOD_CALL(\"" << shellClassName(java_class) << "::" << shellClassName(java_class) << "\")" << Qt::endl << " QTJAMBI_TRY {" << Qt::endl; @@ -1552,7 +1515,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { s << " jvalue arguments;" << Qt::endl << " arguments.l = placement;" << Qt::endl << " QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_" - << java_class->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") + << java_class->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "_declarative, sizeof(" << shellClassName(java_class) << "), typeid(" << java_class->qualifiedCppName() << "), " << java_class->qualifiedCppName() << "::staticMetaObject, " @@ -1570,25 +1533,14 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { s << " Q_UNUSED(__jni_class)" << Qt::endl; s << " Q_UNUSED(__jni_object)" << Qt::endl; s << " Q_UNUSED(placement)" << Qt::endl; - s << "#endif //" << pps.join(" && ") << Qt::endl; + s << "#endif //" << pps.join(QStringLiteral(u" && ")) << Qt::endl; } s << "}" << Qt::endl << Qt::endl; } - // Native callbacks (all java functions require native callbacks) s << "// emitting (functionsInTargetLang writeFinalFunction)" << Qt::endl; for(const MetaFunction *function : functionsInTargetLang) { - if ( - (!java_class->hasUnimplmentablePureVirtualFunction() || !function->isConstructor()) - && !function->isEmptyFunction() - && !function->hasTemplateArgumentTypes() - ){ - if(function->isConstructor()){ - writeFinalConstructor(s, function, java_class, constructorIndexes); - } else { - writeFinalFunction(s, function, java_class); - } - } + writeFinalFunction(s, function, java_class); } // Field accessors @@ -1663,7 +1615,7 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { } for(const MetaEnum *java_enum : java_class->enums()){ - if(!java_enum->isPrivate() && java_enum->typeEntry()->codeGeneration()!=TypeEntry::GenerateNothing){ + if(!java_enum->isPrivate() && (java_enum->typeEntry()->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)!=TypeEntry::GenerateNothing){ for(MetaEnumValue *enum_value : java_enum->values()){ if (java_enum->typeEntry()->isEnumValueRemoveRejected(enum_value->name())) continue; @@ -1705,10 +1657,11 @@ void CppImplGenerator::write(QTextStream &s, const MetaClass *java_class, int) { writeClassCodeInjections(s, java_class, CodeSnip::End); - writeMetaInfo(s, java_class, availabeConstructors, signalsInTargetLang, signalNames, sortedSignals, isInterface); + writeMetaInfo(s, java_class, signalsInTargetLang, isInterface); QString pro_file_name = priGenerator->subDirectoryForClass(java_class, PriGenerator::CppDirectory) + "/generated.pri"; priGenerator->addSource(pro_file_name, fileNameForClass(java_class)); + m_nativeConstructorNames.clear(); } void CppImplGenerator::generateFake(const MetaClass * java_class) { @@ -1727,7 +1680,7 @@ void CppImplGenerator::generateFake(const MetaClass * java_class) { writeInclude(s, cpp_enum->typeEntry()->include(), included); } s << Qt::endl; - writeMetaInfo(s, java_class, QMultiMap(), QList(), QList(), QMap>(), false); + writeMetaInfo(s, java_class, QList{}, false); QString pro_file_name = priGenerator->subDirectoryForClass(java_class, PriGenerator::CppDirectory) + "/generated.pri"; priGenerator->addSource(pro_file_name, fileNameForClass(java_class)); break; @@ -1750,7 +1703,7 @@ void CppImplGenerator::writeJavaLangObjectOverrideFunctions(QTextStream &s, cons QStringList lines; for(const CodeSnip& codeSnip : cls->typeEntry()->codeSnips()){ if(codeSnip.language==TS::NativeCode && codeSnip.position==CodeSnip::HashCode){ - lines << codeSnip.code().split("\n"); + lines << codeSnip.code().split(QStringLiteral(u"\n")); } } s << Qt::endl @@ -1856,7 +1809,7 @@ void CppImplGenerator::writeJavaLangObjectOverrideFunctions(QTextStream &s, cons QStringList lines; for(const CodeSnip& codeSnip : cls->typeEntry()->codeSnips()){ if(codeSnip.language==TS::NativeCode && codeSnip.position==CodeSnip::ToString){ - lines << codeSnip.code().split("\n"); + lines << codeSnip.code().split(QStringLiteral(u"\n")); } } s << Qt::endl @@ -1940,7 +1893,7 @@ void CppImplGenerator::writeClassCodeInjections(QTextStream &s, const MetaClass QStringList lines; for(const CodeSnip &snip : code_snips) { if (snip.position==position && (snip.language == TS::ShellCode || snip.language == TS::NativeCode)) { - lines << snip.code().replace("%this", "__qt_this").split("\n"); + lines << snip.code().replace("%this", "__qt_this").split(QStringLiteral(u"\n")); } } while(!lines.isEmpty()){ @@ -2132,7 +2085,7 @@ void CppImplGenerator::writeCloneFunction(QTextStream &s, const MetaClass *java_ if(!java_class->typeEntry()->ppCondition().isEmpty()){ s << Qt::endl << "#if " << java_class->typeEntry()->ppCondition() << Qt::endl << Qt::endl; } - s << INDENT << "const " << java_class->fullQualifiedCppName() << " *__qt_this = "; + s << INDENT << "const " << java_class->typeEntry()->qualifiedCppName() << " *__qt_this = "; if(java_class->typeEntry()->isNativeIdBased()){ if(java_class->typeEntry()->isInterface() || java_class->typeEntry()->designatedInterface() || java_class->typeEntry()->isFunctional()){ s << "QtJambiAPI::interfaceFromNativeId<" << java_class->typeEntry()->qualifiedCppName() << ">(__this_nativeId);" << Qt::endl; @@ -2349,7 +2302,7 @@ void CppImplGenerator::writeShellConstructor(QTextStream &s, const MetaFunctiona javaName = java_class->enclosingClass()->fullName() + "$" + javaName; } javaName = javaName.replace(".", "/"); - s << "void deleter_" << QString(java_class->typeEntry()->name()).replace("::", "_").replace("<", "_").replace(">", "_") << "(void *ptr,bool) { delete reinterpret_cast<" << shellClassName(java_class) << "*>(ptr); }" << Qt::endl << Qt::endl; + s << "void deleter_" << QString(java_class->typeEntry()->name()).replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'<', u'_').replace(u'>', u'_') << "(void *ptr,bool) { delete reinterpret_cast<" << shellClassName(java_class) << "*>(ptr); }" << Qt::endl << Qt::endl; s << Qt::endl; s << shellClassName(java_class) << "::" << shellClassName(java_class) << "()" << Qt::endl @@ -2385,7 +2338,7 @@ void CppImplGenerator::writeShellDestructor(QTextStream &s, bool, const MetaClas for(const ComplexTypeEntry * _cls : qAsConst(classes)){ for(const CodeSnip& snip : _cls->codeSnips()) { if (snip.language == TS::DestructorFunction) { - lines << snip.code().replace("%this", "this").replace("%shelltype", shellClassName).split("\n"); + lines << snip.code().replace("%this", "this").replace("%shelltype", shellClassName).split(QStringLiteral(u"\n")); } } } @@ -2460,7 +2413,7 @@ void CppImplGenerator::writeShellDestructor(QTextStream &s, const MetaFunctional QStringList lines; for(const CodeSnip& snip : java_class->typeEntry()->codeSnips()) { if (snip.language == TS::DestructorFunction) { - lines << snip.code().replace("%this", "this").replace("%shelltype", shellClassName).split("\n"); + lines << snip.code().replace("%this", "this").replace("%shelltype", shellClassName).split(QStringLiteral(u"\n")); } } while(!lines.isEmpty()){ @@ -2546,7 +2499,7 @@ void CppImplGenerator::writeCodeInjections(QTextStream &s, .arg(it.key()).arg(typeEntry->name()); ReportHandler::warning(debug); } - QStringList lines = code.split("\n"); + QStringList lines = code.split(QStringLiteral(u"\n")); while(!lines.isEmpty()){ if(lines.last().trimmed().isEmpty()){ lines.takeLast(); @@ -2670,7 +2623,7 @@ void CppImplGenerator::writeCodeInjections(QTextStream &s, const MetaFunction *j } } - QStringList lines = code.split("\n"); + QStringList lines = code.split(QStringLiteral(u"\n")); while(!lines.isEmpty()){ if(lines.last().trimmed().isEmpty()){ lines.takeLast(); @@ -2913,7 +2866,7 @@ void CppImplGenerator::writeShellFunction(QTextStream &s, const MetaFunction *ja return; QStringList pps = getFunctionPPConditions(java_function); if(!pps.isEmpty()){ - s << "#if " << pps.join(" && ") << Qt::endl; + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; } writeFunctionSignature(s, java_function, implementor, QString(), Option(OriginalName | FunctionOverride)); @@ -3073,7 +3026,7 @@ void CppImplGenerator::writeShellFunction(QTextStream &s, const MetaFunction *ja s << INDENT << "JavaException::check(__jni_env QTJAMBI_STACKTRACEINFO );" << Qt::endl; if (has_function_type && !java_function->isSelfReturningFunction()) { - QString scopeName = java_function->needsReturnScope() ? QString("*__returnScope__%1%2").arg(java_function->name(), java_function->isConstant() ? "_const" : "") : QStringLiteral("__qtjambi_scope"); + QString scopeName = java_function->needsReturnScope() ? QString("*__returnScope__%1%2").arg(java_function->name(), java_function->isConstant() ? "_const" : "") : QStringLiteral(u"__qtjambi_scope"); if(java_function->hasConversionRule(TS::ShellCode, 0)){ writeJavaToQt(s, function_type, "__qt_return_value_tmp", "__java_return_value", java_function, nullptr, 0, Option(GlobalRefJObject | NoEnumAsInts), "__jni_env", @@ -3285,7 +3238,7 @@ void CppImplGenerator::writeShellFunction(QTextStream &s, const MetaFunction *ja } s << "}" << Qt::endl; if(!pps.isEmpty()) - s << "#endif //" << pps.join(" && ") << Qt::endl; + s << "#endif //" << pps.join(QStringLiteral(u" && ")) << Qt::endl; s << Qt::endl; } @@ -3300,7 +3253,7 @@ void CppImplGenerator::writePublicFunctionOverride(QTextStream &s, QStringList pps = getFunctionPPConditions(java_function); if(!pps.isEmpty()) - s << "#if " << pps.join(" && ") << Qt::endl; + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; // The write a public override version of this function to be used by native functions writeFunctionSignature(s, java_function, implementor, "__qt_", Option(UnderscoreSpaces | EnumAsInts @@ -3338,7 +3291,8 @@ void CppImplGenerator::writePublicFunctionOverride(QTextStream &s, // Call the Qt function on the java object - if (function_type || !java_function->typeReplaced(0).isEmpty()) { + QString returnTypeReplacement = java_function->typeReplaced(0); + if ((function_type || !returnTypeReplacement.isEmpty())) { const QString qt_return_value = "__qt_return_value"; const QString java_return_value = "__java_return_value"; if (function_type) { @@ -3349,7 +3303,7 @@ void CppImplGenerator::writePublicFunctionOverride(QTextStream &s, writeBaseClassFunctionCall(s, java_function, implementor, Option(NoEnumAsInts | NoReturnStatement | JNIProxyFunction)); - bool hasReturn = java_function->argumentReplaced(0).isEmpty() && java_function->typeReplaced(0) != "void"; + bool hasReturn = java_function->argumentReplaced(0).isEmpty() && returnTypeReplacement != "void"; if(!hasCodeInjections(java_function, java_function->implementingClass(), {CodeSnip::End}, TS::NativeCode) && !hasOwnership(java_function, 0, java_function->implementingClass(), TS::NativeCode) && !java_function->hasConversionRule(TS::NativeCode, 0)){ @@ -3392,7 +3346,7 @@ void CppImplGenerator::writePublicFunctionOverride(QTextStream &s, s << lines; s << INDENT << "}" << Qt::endl; if(!pps.isEmpty()) - s << "#endif //" << pps.join(" && ") << Qt::endl; + s << "#endif //" << pps.join(QStringLiteral(u" && ")) << Qt::endl; s << Qt::endl; } @@ -3405,7 +3359,7 @@ void CppImplGenerator::writeVirtualFunctionOverride(QTextStream &s, QStringList pps = getFunctionPPConditions(java_function); if(!pps.isEmpty()) - s << "#if " << pps.join(" && ") << Qt::endl; + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; Q_ASSERT(!java_function->isFinalInCpp()); @@ -3437,7 +3391,7 @@ void CppImplGenerator::writeVirtualFunctionOverride(QTextStream &s, s << INDENT << "QtJambiExceptionBlocker __qj_exceptionBlocker;" << Qt::endl; QString typeReplaced = java_function->typeReplaced(0); - if ((function_type || (!typeReplaced.isEmpty() && typeReplaced!="void")) && !java_function->isSelfReturningFunction()) { + if ((function_type || !typeReplaced.isEmpty()) && !java_function->isSelfReturningFunction()) { const QString qt_return_value = "__qt_return_value"; const QString java_return_value = "__java_return_value"; if(java_function->implementingClass()->typeEntry()->isNativeIdBased()){ @@ -3556,7 +3510,7 @@ void CppImplGenerator::writeVirtualFunctionOverride(QTextStream &s, s << lines; s << INDENT << "}" << Qt::endl; if(!pps.isEmpty()) - s << "#endif //" << pps.join(" && ") << Qt::endl; + s << "#endif //" << pps.join(QStringLiteral(u" && ")) << Qt::endl; s << Qt::endl; } @@ -3652,7 +3606,7 @@ bool CppImplGenerator::writeBaseClassFunctionCall(QTextStream &s, } QTextStream _s(&tmpl); writeTypeInfo(_s, param->type()); - }else{ + }else if(param->defaultType().isEmpty()){ tmpl.clear(); break; } @@ -3798,7 +3752,7 @@ void CppImplGenerator::writeFunctionName(QTextStream &s, MetaBuilder::decideUsagePattern(cpy.get()); array->setArrayElementType(cpy.get()); args += jni_signature(array.get(), format); - int lengthParameter = java_function->arrayOrBufferLengthIndex(argument->argumentIndex() + 1); + int lengthParameter = java_function->utilArgumentIndex(argument->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=arguments.size()){ const MetaArgument *lengthParam = arguments[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -3831,6 +3785,8 @@ void CppImplGenerator::writeFunctionName(QTextStream &s, } } } + }else if(java_function->useArgumentAsSlotContext(argument->argumentIndex() + 1)){ + args += "J"; }else if (!modified_type.isEmpty() || !argument->type()->hasNativeId() || java_function->isConstructor()) { if (modified_type.isEmpty()){ if(isCharSequenceSubstitute(argument->type())){ @@ -3938,7 +3894,10 @@ void CppImplGenerator::writeFinalFunctionArguments(QTextStream &s, const MetaFun if (java_function->argumentRemoved(argument->argumentIndex() + 1)==ArgumentRemove_No) { s << "," << Qt::endl; QString modified_type = java_function->typeReplaced(argument->argumentIndex() + 1); - if(java_function->useArgumentAsArray(argument->argumentIndex() + 1) + bool addOffset = false; + if(java_function->useArgumentAsSlotContext(argument->argumentIndex() + 1) && modified_type.isEmpty()){ + s << " QtJambiNativeID"; + }else if(java_function->useArgumentAsArray(argument->argumentIndex() + 1) && !java_function->useArgumentAsBuffer(argument->argumentIndex() + 1)){ QScopedPointer array(argument->type()->copy()); array->setConstant(false); @@ -3955,31 +3914,34 @@ void CppImplGenerator::writeFinalFunctionArguments(QTextStream &s, const MetaFun MetaBuilder::decideUsagePattern(cpy.get()); array->setArrayElementType(cpy.get()); s << " " << translateType(array.get(), options); + addOffset = true; }else if (modified_type.isEmpty()) s << " " << translateType(argument->type(), options); else s << " " << jniName(annotationFreeTypeName(modified_type)); s << " " << argument->indexedName(); - int lengthParameter = java_function->arrayOrBufferLengthIndex(argument->argumentIndex() + 1); - if(lengthParameter>0 && lengthParameter<=arguments.size()){ - const MetaArgument *lengthParam = arguments[lengthParameter - 1]; - if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ - lengthParam = nullptr; - for(const MetaArgument *argument : arguments) { - if(argument && argument->argumentIndex()+1==lengthParameter){ - lengthParam = argument; + if(addOffset){ + int lengthParameter = java_function->utilArgumentIndex(argument->argumentIndex() + 1); + if(lengthParameter>0 && lengthParameter<=arguments.size()){ + const MetaArgument *lengthParam = arguments[lengthParameter - 1]; + if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ + lengthParam = nullptr; + for(const MetaArgument *argument : arguments) { + if(argument && argument->argumentIndex()+1==lengthParameter){ + lengthParam = argument; + } } } - } - if(lengthParam && java_function->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ - s << "," << Qt::endl; - QString typeReplaced = java_function->typeReplaced(lengthParam->argumentIndex() + 1); - if(typeReplaced.isEmpty()){ - s << " " << translateType(lengthParam->type(), options); - }else{ - s << " " << jniName(annotationFreeTypeName(typeReplaced)); + if(lengthParam && java_function->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ + s << "," << Qt::endl; + QString typeReplaced = java_function->typeReplaced(lengthParam->argumentIndex() + 1); + if(typeReplaced.isEmpty()){ + s << " " << translateType(lengthParam->type(), options); + }else{ + s << " " << jniName(annotationFreeTypeName(typeReplaced)); + } + s << " __qt_offset_of_" << argument->indexedName(); } - s << " __qt_offset_of_" << argument->indexedName(); } } ++argumentCounter; @@ -4041,7 +4003,7 @@ void CppImplGenerator::writeFinalFunctionSetup(QTextStream &s, const MetaFunctio const MetaArgumentList& arguments = java_function->arguments(); for(const MetaArgument *argument : arguments) { switch(java_function->argumentRemoved(argument->argumentIndex()+1)){ - case ArgumentRemove_UseAsLength:{ + case ArgumentRemove_UseAsUtilArg:{ s << INDENT; writeTypeInfo(s, argument->type(), option); s << argument->indexedName() << "{0};" << Qt::endl; @@ -4125,7 +4087,7 @@ void CppImplGenerator::writeFinalFunctionSetup(QTextStream &s, const MetaFunctio INDENTATION(INDENT) s << INDENT << "const QObject* " << variableName << "_owner = "; bool first = true; - for(const QString& line : ownerCode.split("\n")){ + for(const QString& line : ownerCode.split(QStringLiteral(u"\n"))){ if(first) first = false; else @@ -4185,7 +4147,7 @@ void CppImplGenerator::writeFinalFunctionSetup(QTextStream &s, const MetaFunctio INDENTATION(INDENT) s << INDENT << "const QObject* " << variableName << "_owner = "; bool first = true; - for(const QString& line : ownerCode.split("\n")){ + for(const QString& line : ownerCode.split(QStringLiteral(u"\n"))){ if(first) first = false; else @@ -4229,21 +4191,229 @@ void CppImplGenerator::writeFinalFunctionSetup(QTextStream &s, const MetaFunctio } } +void CppImplGenerator::writeReferenceCount(QTextStream &s, const ReferenceCount &refCount, + const MetaArgument* argument, int argumentIndex, const MetaFunction *java_function, const QString &__jni_env, const QString &thisName) { + if (refCount.action == ReferenceCount::Ignore) + return; + + QString argumentName; + if(argumentIndex==-1){ + argumentName = thisName; + }else if(argumentIndex==0){ + argumentName = QStringLiteral(u"__qt_return_value"); + }else if(argument){ + argumentName = argument->indexedName(); + }else{ + return; + } + bool nullPointersDisabled = argument && argument->isNullPointerDisabled(java_function); + + QScopedPointer indentation; + QString condition = refCount.condition; + condition = condition.replace(QStringLiteral(u"%in"), argumentName); + condition = condition.replace(QStringLiteral(u"%arg"), argumentName); + condition = condition.replace(QStringLiteral(u"%this"), thisName); + condition = condition.replace(QStringLiteral(u"%0"), QStringLiteral(u"__qt_return_value")); + condition = condition.replace(QStringLiteral(u"%return"), QStringLiteral(u"__qt_return_value")); + for(const MetaArgument* _argument : java_function->arguments()){ + condition = condition.replace(QStringLiteral(u"%")+QString::number(_argument->argumentIndex()+1), _argument->indexedName()); + } + if (refCount.action != ReferenceCount::Set) { + if(nullPointersDisabled){ + if (!refCount.condition.isEmpty()){ + s << INDENT << "if (" << condition << ") {" << Qt::endl; + indentation.reset(new Indentation(INDENT)); + } + }else{ + s << INDENT << "if (" << argumentName; + if (!condition.isEmpty()) + s << " && " << condition; + s << ") {" << Qt::endl; + indentation.reset(new Indentation(INDENT)); + } + } else if (!condition.isEmpty()){ + s << INDENT << "if (" << condition << ") {" << Qt::endl; + indentation.reset(new Indentation(INDENT)); + } + + QString className = java_function->declaringClass()->typeEntry()->qualifiedTargetLangName().replace(u'.', u'/'); + if(java_function->isAbstract()){ + if(java_function->ownerClass()->typeEntry()->lookupName().endsWith(QStringLiteral(u"$Impl$ConcreteWrapper"))){ + QString lookupName = java_function->ownerClass()->typeEntry()->lookupName(); + lookupName.chop(16); + className = java_function->ownerClass()->typeEntry()->javaPackage().replace(u'.', u'/') + "/" + lookupName; + }else if(java_function->ownerClass()->typeEntry()->lookupName().endsWith(QStringLiteral(u"$ConcreteWrapper"))){ + QString lookupName = java_function->declaringClass()->typeEntry()->lookupName(); + if(lookupName.endsWith(QStringLiteral(u"$ConcreteWrapper"))) + lookupName.chop(16); + className = java_function->declaringClass()->typeEntry()->javaPackage().replace(u'.', u'/') + "/" + lookupName; + } + } + switch (refCount.action) { + case ReferenceCount::Put: + { + QString keyArgumentName = java_function->arguments().at(int(refCount.keyArgument) - 1)->indexedName(); + s << INDENT << "Java::QtJambi::ReferenceUtility::putReferenceCount(" << __jni_env << ", " << thisName << ", "; + if(java_function->ownerClass()->isInterface() || java_function->ownerClass()->extractInterface()){ + s << "JavaAPI::resolveClass(" << __jni_env << ", \"" << className << "\")"; + }else{ + s << "nullptr"; + } + s << ", " << __jni_env << "->NewStringUTF(\"" << refCount.variableName << "\"), " << ( refCount.threadSafe ? "true" : "false") << ", " << ( java_function->isStatic() ? "true" : "false") << ", " << keyArgumentName << ", " << argumentName << ");" << Qt::endl; + } + break; + case ReferenceCount::ClearAdd: + case ReferenceCount::Add: + s << INDENT << "Java::QtJambi::ReferenceUtility::addReferenceCount(" << __jni_env << ", " << thisName << ", "; + if(java_function->ownerClass()->isInterface() || java_function->ownerClass()->extractInterface()){ + s << "JavaAPI::resolveClass(" << __jni_env << ", \"" << className << "\")"; + }else{ + s << "nullptr"; + } + s << ", " << __jni_env << "->NewStringUTF(\"" << refCount.variableName << "\"), " << ( refCount.threadSafe ? "true" : "false") << ", " << ( java_function->isStatic() ? "true" : "false") << ", " << argumentName << ");" << Qt::endl; + break; + case ReferenceCount::ClearAddAll: + case ReferenceCount::AddAll: + s << INDENT << "Java::QtJambi::ReferenceUtility::addAllReferenceCount(" << __jni_env << ", " << thisName << ", "; + if(java_function->ownerClass()->isInterface() || java_function->ownerClass()->extractInterface()){ + s << "JavaAPI::resolveClass(" << __jni_env << ", \"" << className << "\")"; + }else{ + s << "nullptr"; + } + s << ", " << __jni_env << "->NewStringUTF(\"" << refCount.variableName << "\"), " << ( refCount.threadSafe ? "true" : "false") << ", " << ( java_function->isStatic() ? "true" : "false") << ", " << argumentName << ");" << Qt::endl; + break; + case ReferenceCount::Set: { + s << INDENT << "Java::QtJambi::ReferenceUtility::setReferenceCount(" << __jni_env << ", " << thisName << ", "; + if(java_function->ownerClass()->isInterface() || java_function->ownerClass()->extractInterface()){ + s << "JavaAPI::resolveClass(" << __jni_env << ", \"" << className << "\")"; + }else{ + s << "nullptr"; + } + s << ", " << __jni_env << "->NewStringUTF(\"" << refCount.variableName << "\"), " << ( refCount.threadSafe ? "true" : "false") << ", " << ( java_function->isStatic() ? "true" : "false") << ", " << argumentName << ");" << Qt::endl; + } + break; + default: + break; + } + if(!indentation.isNull()){ + indentation.reset(); + s << INDENT << "}" << Qt::endl; + } +} + void CppImplGenerator::writeConstructor(QTextStream &s, const MetaFunction *java_function, - const QList& arguments, - const MetaClass *java_class, int constructorIndex) { + const QList& arguments, + const MetaClass *java_class, bool isDeclarative) { Q_ASSERT(java_class); const MetaClass *cls = java_class ? java_class : java_function->ownerClass(); - QString java_function_signature = java_function->originalSignature(); + QString java_function_signature = java_function->originalSignature().isEmpty() ? java_function->minimalSignature() : java_function->originalSignature(); s << "// new " << java_function_signature << Qt::endl - << "void __qt_construct_" << cls->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "_"; - if(constructorIndex>=0) - s << constructorIndex; - else - s << "declarative"; - s << "(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments)" << Qt::endl + << "void __qt_construct_" << cls->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); + if(isDeclarative){ + s << "_declarative"; + }else{ + QString jniSignature; + { + QTextStream s2(&jniSignature); + const QPair,QList> addedArguments = java_function->addedArguments(); + int argumentCounter = 1; + while(addedArguments.first.contains(argumentCounter)){ + const ArgumentModification& argumentMod = addedArguments.first[argumentCounter]; + s2 << jni_signature(annotationFreeTypeName(argumentMod.modified_type), JNISignatureFormat(NoModification | SlashesAndStuff)); + ++argumentCounter; + } + for(const MetaArgument *argument : arguments) { + if (argument && java_function->argumentRemoved(argument->argumentIndex()+1)==ArgumentRemove_No) { + if(java_function->useArgumentAsBuffer(argument->argumentIndex() + 1)){ + QScopedPointer cpy(argument->type()->copy()); + cpy->setConstant(false); + cpy->setReferenceType(MetaType::NoReference); + QList indirections = cpy->indirections(); + if(!indirections.isEmpty()){ + indirections.removeLast(); + cpy->setIndirections(indirections); + } + MetaBuilder::decideUsagePattern(cpy.get()); + QString modified_type = jni_signature(cpy.get(), JNISignatureFormat(NoModification | SlashesAndStuff)); + if(modified_type=="I"){ + s2 << "Ljava/nio/IntBuffer;"; + }else if(modified_type=="B"){ + s2 << "Ljava/nio/ByteBuffer;"; + }else if(modified_type=="C"){ + s2 << "Ljava/nio/CharBuffer;"; + }else if(modified_type=="S"){ + s2 << "Ljava/nio/ShortBuffer;"; + }else if(modified_type=="J"){ + s2 << "Ljava/nio/LongBuffer;"; + }else if(modified_type=="F"){ + s2 << "Ljava/nio/FloatBuffer;"; + }else if(modified_type=="D"){ + s2 << "Ljava/nio/DoubleBuffer;"; + }else{ + s2 << "Ljava/nio/Buffer;"; + } + }else if(java_function->useArgumentAsArray(argument->argumentIndex() + 1)){ + QScopedPointer cpy(argument->type()->copy()); + cpy->setConstant(false); + cpy->setReferenceType(MetaType::NoReference); + QList indirections = cpy->indirections(); + if(!indirections.isEmpty()){ + indirections.removeLast(); + cpy->setIndirections(indirections); + } + MetaBuilder::decideUsagePattern(cpy.get()); + s2 << "[" << jni_signature(cpy.get(), JNISignatureFormat(NoModification | SlashesAndStuff)); + if(java_function->insertUtilArgument(argument->argumentIndex() + 1)){ + int lengthParameter = java_function->utilArgumentIndex(argument->argumentIndex() + 1); + if(lengthParameter>0 && lengthParameter<=arguments.size()){ + const MetaArgument *lengthParam = arguments[lengthParameter - 1]; + if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ + lengthParam = nullptr; + for(const MetaArgument *argument : arguments) { + if(argument && argument->argumentIndex()+1==lengthParameter){ + lengthParam = argument; + } + } + } + if(lengthParam && java_function->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ + QString modified_type = java_function->typeReplaced(lengthParam->argumentIndex() + 1); + if (modified_type.isEmpty()) + s2 << jni_signature(lengthParam->type(), JNISignatureFormat(NoModification | SlashesAndStuff)); + else + s2 << jni_signature(annotationFreeTypeName(modified_type), JNISignatureFormat(NoModification | SlashesAndStuff)); + } + } + } + }else{ + QString modified_type = java_function->typeReplaced(argument->argumentIndex() + 1); + if(java_function->useArgumentAsSlotContext(argument->argumentIndex() + 1) && modified_type.isEmpty()){ + modified_type = QStringLiteral(u"io.qt.core.QObject"); + } + if (modified_type.isEmpty()) + s2 << jni_signature(argument->type(), JNISignatureFormat(NoModification | SlashesAndStuff)); + else + s2 << jni_signature(annotationFreeTypeName(modified_type), JNISignatureFormat(NoModification | SlashesAndStuff)); + } + } + ++argumentCounter; + while(addedArguments.first.contains(argumentCounter)){ + const ArgumentModification& argumentMod = addedArguments.first[argumentCounter]; + s2 << jni_signature(annotationFreeTypeName(argumentMod.modified_type), JNISignatureFormat(NoModification | SlashesAndStuff)); + ++argumentCounter; + } + } + for(const ArgumentModification& mod : addedArguments.second){ + s2 << jni_signature(annotationFreeTypeName(mod.modified_type), JNISignatureFormat(NoModification | SlashesAndStuff)); + } + } + QString marshalledArguments = MetaFunction::marshalledArguments(arguments, java_function->isConstant()); + s << marshalledArguments; + QList& argumentLists = m_nativeConstructorNames[java_function]; + argumentLists << ArgumentList{arguments, marshalledArguments, jniSignature}; + } + s << "(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool __qtjambi_is_generic)" << Qt::endl << "{" << Qt::endl; INDENTATION(INDENT) s << INDENT << "QTJAMBI_NATIVE_METHOD_CALL(\"construct " << java_function_signature << "\")" << Qt::endl; @@ -4256,13 +4426,31 @@ void CppImplGenerator::writeConstructor(QTextStream &s, const MetaFunction *java pps << "(" + cls->typeEntry()->ppCondition() + ")"; } if(!pps.isEmpty()){ - s << "#if " << pps.join(" && ") << Qt::endl; + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; } QString lines; { QTextStream s(&lines); + bool has_argument_referenceCounts = false; + QMap> referenceCounts; + referenceCounts[-1] = java_function->referenceCounts(java_function->implementingClass(), -1); + for (const MetaArgument* argument : qAsConst(arguments)) { + if(argument) + referenceCounts[argument->argumentIndex()+1] = java_function->referenceCounts(java_function->implementingClass(), argument->argumentIndex()+1); + } + for(const QList& list : qAsConst(referenceCounts)){ + for(const ReferenceCount& refCount : list) { + if (refCount.action != ReferenceCount::Ignore) { + has_argument_referenceCounts = true; + break; + } + } + if(has_argument_referenceCounts) + break; + } + bool hasDonePixmapCheck = false; bool hasDoneUICheck = false; bool hasDoneConstructorCheck = false; @@ -4273,7 +4461,7 @@ void CppImplGenerator::writeConstructor(QTextStream &s, const MetaFunction *java for(const MetaArgument *argument : arguments) { if(argument){ switch (java_function->argumentRemoved(argument->argumentIndex()+1)) { - case ArgumentRemove_UseAsLength: + case ArgumentRemove_UseAsUtilArg: { s << INDENT << "size_t " << argument->indexedName() << " = 0;" << Qt::endl; } @@ -4282,6 +4470,15 @@ void CppImplGenerator::writeConstructor(QTextStream &s, const MetaFunction *java } } } + bool hasPos1 = hasCodeInjections(java_function, java_function->implementingClass(), {CodeSnip::Position1}, TS::NativeCode); + if(hasPos1){ + s << INDENT << "if(__qtjambi_is_generic){" << Qt::endl; + { + INDENTATION(INDENT) + writeCodeInjections(s, java_function, java_function->implementingClass(), CodeSnip::Position1, TS::NativeCode, QStringLiteral(u"__jni_env"), QStringLiteral(u"__qtjambi_scope")); + } + s << INDENT << "}" << Qt::endl; + } int argumentCounter = 1; while(addedArguments.first.contains(argumentCounter)){ const ArgumentModification& argumentMod = addedArguments.first[argumentCounter]; @@ -4341,6 +4538,9 @@ void CppImplGenerator::writeConstructor(QTextStream &s, const MetaFunction *java QString jniType; QString typeReplaced = java_function->typeReplaced(argument->argumentIndex()+1, &jniType); if(jniType.isEmpty()){ + if(java_function->useArgumentAsSlotContext(argument->argumentIndex() + 1) && typeReplaced.isEmpty()){ + typeReplaced = QStringLiteral(u"io.qt.core.QObject"); + } if(typeReplaced.isEmpty()){ if(java_function->useArgumentAsArray(argument->argumentIndex()+1) && !java_function->useArgumentAsBuffer(argument->argumentIndex() + 1)){ @@ -4361,46 +4561,8 @@ void CppImplGenerator::writeConstructor(QTextStream &s, const MetaFunction *java typeReplaced = jni_signature(array.get(), JNISignatureFormat(ReturnType)); } } - if(typeReplaced=="int" || typeReplaced=="I") - jniType = "jint"; - else if(typeReplaced=="long" || typeReplaced=="J") - jniType = "jlong"; - else if(typeReplaced=="short" || typeReplaced=="S") - jniType = "jshort"; - else if(typeReplaced=="byte" || typeReplaced=="B") - jniType = "jbyte"; - else if(typeReplaced=="boolean" || typeReplaced=="Z") - jniType = "jboolean"; - else if(typeReplaced=="char" || typeReplaced=="C") - jniType = "jchar"; - else if(typeReplaced=="float" || typeReplaced=="F") - jniType = "jfloat"; - else if(typeReplaced=="double" || typeReplaced=="D") - jniType = "jdouble"; - else if(typeReplaced=="int[]" || typeReplaced=="[I") - jniType = "jintArray"; - else if(typeReplaced=="long[]" || typeReplaced=="[J") - jniType = "jlongArray"; - else if(typeReplaced=="short[]" || typeReplaced=="[S") - jniType = "jshortArray"; - else if(typeReplaced=="byte[]" || typeReplaced=="[B") - jniType = "jbyteArray"; - else if(typeReplaced=="boolean[]" || typeReplaced=="[Z") - jniType = "jbooleanArray"; - else if(typeReplaced=="char[]" || typeReplaced=="[C") - jniType = "jcharArray"; - else if(typeReplaced=="float[]" || typeReplaced=="[F") - jniType = "jfloatArray"; - else if(typeReplaced=="double[]" || typeReplaced=="[D") - jniType = "jdoubleArray"; - else if(typeReplaced.endsWith("[]") || typeReplaced.startsWith("[")) - jniType = "jobjectArray"; - else if(typeReplaced.startsWith("java.lang.Class")) - jniType = "jclass"; - else if(typeReplaced=="java.lang.String" || typeReplaced=="String") - jniType = "jstring"; - else if(!typeReplaced.isEmpty()) - jniType = "jobject"; + if(!typeReplaced.isEmpty()) + jniType = CppGenerator::jniName(annotationFreeTypeName(typeReplaced)); else jniType = translateType(argumentType, options); } @@ -4447,8 +4609,8 @@ void CppImplGenerator::writeConstructor(QTextStream &s, const MetaFunction *java } if(!java_function->useArgumentAsBuffer(argument->argumentIndex() + 1) && java_function->useArgumentAsArray(argument->argumentIndex() + 1) - && java_function->insertArrayOffsetArgument(argument->argumentIndex() + 1)){ - int lengthParameter = java_function->arrayOrBufferLengthIndex(argument->argumentIndex() + 1); + && java_function->insertUtilArgument(argument->argumentIndex() + 1)){ + int lengthParameter = java_function->utilArgumentIndex(argument->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=arguments.size()){ const MetaArgument *lengthParam = arguments[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -4462,46 +4624,8 @@ void CppImplGenerator::writeConstructor(QTextStream &s, const MetaFunction *java if(lengthParam && java_function->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ ++argumentCounter; typeReplaced = java_function->typeReplaced(lengthParam->argumentIndex() + 1); - if(typeReplaced=="int") - jniType = "jint"; - else if(typeReplaced=="long") - jniType = "jlong"; - else if(typeReplaced=="short") - jniType = "jshort"; - else if(typeReplaced=="byte") - jniType = "jbyte"; - else if(typeReplaced=="boolean") - jniType = "jboolean"; - else if(typeReplaced=="char") - jniType = "jchar"; - else if(typeReplaced=="float") - jniType = "jfloat"; - else if(typeReplaced=="double") - jniType = "jdouble"; - else if(typeReplaced=="int[]") - jniType = "jintArray"; - else if(typeReplaced=="long[]") - jniType = "jlongArray"; - else if(typeReplaced=="short[]") - jniType = "jshortArray"; - else if(typeReplaced=="byte[]") - jniType = "jbyteArray"; - else if(typeReplaced=="boolean[]") - jniType = "jbooleanArray"; - else if(typeReplaced=="char[]") - jniType = "jcharArray"; - else if(typeReplaced=="float[]") - jniType = "jfloatArray"; - else if(typeReplaced=="double[]") - jniType = "jdoubleArray"; - else if(typeReplaced.endsWith("[]")) - jniType = "jobjectArray"; - else if(typeReplaced.startsWith("java.lang.Class")) - jniType = "jclass"; - else if(typeReplaced=="java.lang.String" || typeReplaced=="String") - jniType = "jstring"; - else if(!typeReplaced.isEmpty()) - jniType = "jobject"; + if(!typeReplaced.isEmpty()) + jniType = CppGenerator::jniName(annotationFreeTypeName(typeReplaced)); else jniType = translateType(lengthParam->type(), NoOption); s << INDENT << jniType << " __qt_offset_of_" << argument->indexedName() << " = "; @@ -4611,7 +4735,7 @@ void CppImplGenerator::writeConstructor(QTextStream &s, const MetaFunction *java INDENTATION(INDENT) s << INDENT << " const QObject* " << variableName << "_owner = "; bool first = true; - for(const QString& line : ownerCode.split("\n")){ + for(const QString& line : ownerCode.split(QStringLiteral(u"\n"))){ if(first) first = false; else @@ -4683,7 +4807,7 @@ void CppImplGenerator::writeConstructor(QTextStream &s, const MetaFunction *java INDENTATION(INDENT) s << INDENT << " const QObject* " << variableName << "_owner = "; bool first = true; - for(const QString& line : ownerCode.split("\n")){ + for(const QString& line : ownerCode.split(QStringLiteral(u"\n"))){ if(first) first = false; else @@ -4830,30 +4954,72 @@ void CppImplGenerator::writeConstructor(QTextStream &s, const MetaFunction *java if(counter==0) s << INDENT << "Q_UNUSED(__java_arguments)" << Qt::endl; writeCodeInjections(s, java_function, java_function->implementingClass(), CodeSnip::Beginning, TS::NativeCode, "__jni_env", "__qtjambi_scope"); + bool hasPos2 = hasCodeInjections(java_function, java_function->implementingClass(), {CodeSnip::Position2}, TS::NativeCode); + if(hasPos2){ + s << INDENT << "if(__qtjambi_is_generic){" << Qt::endl; + { + INDENTATION(INDENT) + writeCodeInjections(s, java_function, java_function->implementingClass(), CodeSnip::Position2, TS::NativeCode, QStringLiteral(u"__jni_env"), QStringLiteral(u"__qtjambi_scope")); + } + s << INDENT << "}" << Qt::endl; + } + bool hasPos5 = hasCodeInjections(java_function, java_function->implementingClass(), {CodeSnip::Position5}, TS::NativeCode); if(java_function->isBlockExceptions()) s << INDENT << "QtJambiExceptionBlocker __qj_exceptionBlocker;" << Qt::endl; s << INDENT << cls->fullQualifiedCppName() << " *__qt_this = "; s << "new(__qtjambi_ptr) "; - if(constructorIndex>=0){ + if(isDeclarative){ if(java_class->instantiateShellClass()){ - s << shellClassName(cls); + s << "QtJambiAPI::DeclarativeShellElement<" << shellClassName(cls) << ">"; }else{ - s << cls->fullQualifiedCppName(); + s << "QtJambiAPI::DeclarativeElement<" << shellClassName(cls) << ">"; } }else{ if(java_class->instantiateShellClass()){ - s << "QtJambiAPI::DeclarativeShellElement<" << shellClassName(cls) << ">"; + s << shellClassName(cls); }else{ - s << "QtJambiAPI::DeclarativeElement<" << shellClassName(cls) << ">"; + s << cls->fullQualifiedCppName(); } } - s << "("; + if(java_function->attributes() & MetaAttributes::BracketCall){ + s << "{"; + }else{ + s << "("; + } writeFunctionCallArguments(s, java_function, arguments, "__qt_", Option(SkipRemovedArguments)); - s << ");" << Qt::endl; + if(java_function->attributes() & MetaAttributes::BracketCall){ + s << "};" << Qt::endl; + }else{ + s << ");" << Qt::endl; + } + + if(has_argument_referenceCounts || hasPos5){ + s << INDENT << "if(__qtjambi_is_generic){" << Qt::endl; + { + INDENTATION(INDENT) + for(const ReferenceCount& refCount : qAsConst(referenceCounts[-1])) + writeReferenceCount(s, refCount, nullptr, -1, java_function, QStringLiteral(u"__jni_env"), QStringLiteral(u"__jni_object")); + + // We must ensure we retain a Java hard-reference over the native method call + // so that the GC will not destroy the C++ object too early. At this point we + // have called the native method call so can manage referenceCount issues. + // First the input arguments + for (const MetaArgument* argument : qAsConst(arguments)) { + if(argument){ + for(const ReferenceCount& refCount : referenceCounts[argument->argumentIndex()+1]) + writeReferenceCount(s, refCount, argument, argument->argumentIndex()+1, java_function, QStringLiteral(u"__jni_env"), QStringLiteral(u"__jni_object")); + } + } + writeCodeInjections(s, java_function, java_function->implementingClass(), CodeSnip::Position5, TS::NativeCode, QStringLiteral(u"__jni_env"), QStringLiteral(u"__qtjambi_scope")); + } + s << INDENT << "}" << Qt::endl; + }else if(!hasPos1 && !hasPos1){ + s << INDENT << "Q_UNUSED(__qtjambi_is_generic)" << Qt::endl; + } if(java_function->isBlockExceptions()) s << INDENT << "__qj_exceptionBlocker.release(__jni_env);" << Qt::endl; - writeCodeInjections(s, java_function, java_function->implementingClass(), CodeSnip::End, TS::NativeCode, "__jni_env", "__qtjambi_scope"); + writeCodeInjections(s, java_function, java_function->implementingClass(), CodeSnip::End, TS::NativeCode, QStringLiteral(u"__jni_env"), QStringLiteral(u"__qtjambi_scope")); } if(lines.contains("__qtjambi_scope")){ @@ -4875,14 +5041,14 @@ void CppImplGenerator::writeConstructor(QTextStream &s, const MetaFunction *java << INDENT << "Q_UNUSED(__jni_object)" << Qt::endl << INDENT << "Q_UNUSED(__java_arguments)" << Qt::endl << INDENT << "Q_UNUSED(__qtjambi_ptr)" << Qt::endl + << INDENT << "Q_UNUSED(__qtjambi_is_generic)" << Qt::endl << INDENT << "JavaException::raiseQNoImplementationException(__jni_env, \"The method has no implementation on this platform.\" QTJAMBI_STACKTRACEINFO );" << Qt::endl - << "#endif // " << pps.join(" && ") << Qt::endl; + << "#endif // " << pps.join(QStringLiteral(u" && ")) << Qt::endl; } s << "}" << Qt::endl << Qt::endl; } -void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction *java_function, - const MetaClass *java_class, const QHash& constructorIndexes) { +void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction *java_function, const MetaClass *java_class) { Q_ASSERT(java_class); if (!java_function->isConstructor() @@ -4891,13 +5057,55 @@ void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction || (!java_class->generateShellClass() && !(java_function->originalAttributes() & MetaAttributes::Public))) return; + QList> defaultArgumentOverloads; + if(java_function->arguments().isEmpty()){ + defaultArgumentOverloads << QList(); + }else{ + for(MetaArgument *argument : java_function->arguments()) { + ArgumentRemove argumentRemoved = java_function->argumentRemoved(argument->argumentIndex()+1); + bool hasDefault = !argument->originalDefaultValueExpression().isEmpty(); + if(defaultArgumentOverloads.isEmpty()){ + if(argumentRemoved==ArgumentRemove_Remove && hasDefault){ + defaultArgumentOverloads << QList(); + }else{ + if(argumentRemoved!=ArgumentRemove_Remove && hasDefault){ + defaultArgumentOverloads << ( QList() << nullptr); + } + defaultArgumentOverloads << ( QList() << argument); + } + }else{ + if(!hasDefault + || argumentRemoved==ArgumentRemove_UseAsUtilArg){ + for(int i=0; i> copy; + for(int i=0; i(defaultArgumentOverloads[i]) << argument); + } + defaultArgumentOverloads[i] << nullptr; + } + defaultArgumentOverloads << copy; + } + } + } + } + for(int i=0; iisModifiedRemoved(TS::TargetLangCode)) + return; + const MetaClass *cls = java_class ? java_class : java_function->ownerClass(); - QString java_function_signature = cls->fullQualifiedCppName() + "::" + java_function->originalSignature(); + QString java_function_signature = cls->fullQualifiedCppName() + "::" + (java_function->originalSignature().isEmpty() ? java_function->minimalSignature() : java_function->originalSignature()); s << "// " << java_function_signature << Qt::endl; - QString qt_object_name = "__qt_this"; + //QString qt_object_name = "__qt_this"; const QString java_object_name = "__jni_object"; // function signature... uint options = StandardJNISignature; @@ -4920,37 +5128,19 @@ void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction pps << "(" + cls->typeEntry()->ppCondition() + ")"; } if(!pps.isEmpty()){ - s << "#if " << pps.join(" && ") << Qt::endl; + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; } if(java_function->isRethrowExceptions() || java_function->isBlockExceptions() || java_function->isNoExcept()) s << INDENT << "QtJambiExceptionRaiser __qt_exceptionRaiser;" << Qt::endl; const QPair,QList> addedArguments = java_function->addedArguments(); - QList arguments; - int additionalArguments = 0; - for(const MetaArgument *argument : java_function->arguments()) { - if(java_function->argumentRemoved(argument->argumentIndex()+1)==ArgumentRemove_No){ + const QList& argumentLists = m_nativeConstructorNames[java_function]; + const ArgumentList& argumentList = argumentLists.last(); + QList arguments; + for(MetaArgument * argument : argumentList.arguments){ + if(argument && java_function->argumentRemoved(argument->argumentIndex()+1)==ArgumentRemove_No) arguments << argument; - if(!java_function->useArgumentAsBuffer(argument->argumentIndex() + 1) - && java_function->useArgumentAsArray(argument->argumentIndex() + 1) - && java_function->insertArrayOffsetArgument(argument->argumentIndex() + 1)){ - int lengthParameter = java_function->arrayOrBufferLengthIndex(argument->argumentIndex() + 1); - if(lengthParameter>0 && lengthParameter<=arguments.size()){ - const MetaArgument *lengthParam = arguments[lengthParameter - 1]; - if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ - lengthParam = nullptr; - for(const MetaArgument *argument : arguments) { - if(argument && argument->argumentIndex()+1==lengthParameter){ - lengthParam = argument; - } - } - } - if(lengthParam && java_function->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ - ++additionalArguments; - } - } - } - } } + int additionalArguments = 0; QString argumentRef; if(additionalArguments + arguments.size() + addedArguments.first.size() + addedArguments.second.size() == 0){ argumentRef = "nullptr"; @@ -4962,46 +5152,8 @@ void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction if(!arguments.isEmpty()){ const MetaArgument * argument = arguments[0]; QString typeReplaced = java_function->typeReplaced(argument->argumentIndex()+1); - if(typeReplaced=="int") - jniType = "jint"; - else if(typeReplaced=="long") - jniType = "jlong"; - else if(typeReplaced=="short") - jniType = "jshort"; - else if(typeReplaced=="byte") - jniType = "jbyte"; - else if(typeReplaced=="boolean") - jniType = "jboolean"; - else if(typeReplaced=="char") - jniType = "jchar"; - else if(typeReplaced=="float") - jniType = "jfloat"; - else if(typeReplaced=="double") - jniType = "jdouble"; - else if(typeReplaced=="int[]") - jniType = "jintArray"; - else if(typeReplaced=="long[]") - jniType = "jlongArray"; - else if(typeReplaced=="short[]") - jniType = "jshortArray"; - else if(typeReplaced=="byte[]") - jniType = "jbyteArray"; - else if(typeReplaced=="boolean[]") - jniType = "jbooleanArray"; - else if(typeReplaced=="char[]") - jniType = "jcharArray"; - else if(typeReplaced=="float[]") - jniType = "jfloatArray"; - else if(typeReplaced=="double[]") - jniType = "jdoubleArray"; - else if(typeReplaced.endsWith("[]")) - jniType = "jobjectArray"; - else if(typeReplaced.startsWith("java.lang.Class")) - jniType = "jclass"; - else if(typeReplaced=="java.lang.String" || typeReplaced=="String") - jniType = "jstring"; - else if(!typeReplaced.isEmpty()) - jniType = "jobject"; + if(!typeReplaced.isEmpty()) + jniType = CppGenerator::jniName(annotationFreeTypeName(typeReplaced)); else jniType = translateType(argument->type(), NoOption); argName = argument->indexedName(); @@ -5065,46 +5217,8 @@ void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction const MetaArgument * argument = arguments[i]; QString jniType; QString typeReplaced = java_function->typeReplaced(argument->argumentIndex()+1); - if(typeReplaced=="int") - jniType = "jint"; - else if(typeReplaced=="long") - jniType = "jlong"; - else if(typeReplaced=="short") - jniType = "jshort"; - else if(typeReplaced=="byte") - jniType = "jbyte"; - else if(typeReplaced=="boolean") - jniType = "jboolean"; - else if(typeReplaced=="char") - jniType = "jchar"; - else if(typeReplaced=="float") - jniType = "jfloat"; - else if(typeReplaced=="double") - jniType = "jdouble"; - else if(typeReplaced=="int[]") - jniType = "jintArray"; - else if(typeReplaced=="long[]") - jniType = "jlongArray"; - else if(typeReplaced=="short[]") - jniType = "jshortArray"; - else if(typeReplaced=="byte[]") - jniType = "jbyteArray"; - else if(typeReplaced=="boolean[]") - jniType = "jbooleanArray"; - else if(typeReplaced=="char[]") - jniType = "jcharArray"; - else if(typeReplaced=="float[]") - jniType = "jfloatArray"; - else if(typeReplaced=="double[]") - jniType = "jdoubleArray"; - else if(typeReplaced.endsWith("[]")) - jniType = "jobjectArray"; - else if(typeReplaced.startsWith("java.lang.Class")) - jniType = "jclass"; - else if(typeReplaced=="java.lang.String" || typeReplaced=="String") - jniType = "jstring"; - else if(!typeReplaced.isEmpty()) - jniType = "jobject"; + if(!typeReplaced.isEmpty()) + jniType = CppGenerator::jniName(annotationFreeTypeName(typeReplaced)); else jniType = translateType(argument->type(), NoOption); s << " arguments[" << argumentCounter-1 << "]."; @@ -5129,8 +5243,8 @@ void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction s << " = " << argument->indexedName() << ";" << Qt::endl; if(!java_function->useArgumentAsBuffer(argument->argumentIndex() + 1) && java_function->useArgumentAsArray(argument->argumentIndex() + 1) - && java_function->insertArrayOffsetArgument(argument->argumentIndex() + 1)){ - int lengthParameter = java_function->arrayOrBufferLengthIndex(argument->argumentIndex() + 1); + && java_function->insertUtilArgument(argument->argumentIndex() + 1)){ + int lengthParameter = java_function->utilArgumentIndex(argument->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=arguments.size()){ const MetaArgument *lengthParam = arguments[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -5144,46 +5258,8 @@ void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction if(lengthParam && java_function->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ ++argumentCounter; typeReplaced = java_function->typeReplaced(lengthParam->argumentIndex() + 1); - if(typeReplaced=="int") - jniType = "jint"; - else if(typeReplaced=="long") - jniType = "jlong"; - else if(typeReplaced=="short") - jniType = "jshort"; - else if(typeReplaced=="byte") - jniType = "jbyte"; - else if(typeReplaced=="boolean") - jniType = "jboolean"; - else if(typeReplaced=="char") - jniType = "jchar"; - else if(typeReplaced=="float") - jniType = "jfloat"; - else if(typeReplaced=="double") - jniType = "jdouble"; - else if(typeReplaced=="int[]") - jniType = "jintArray"; - else if(typeReplaced=="long[]") - jniType = "jlongArray"; - else if(typeReplaced=="short[]") - jniType = "jshortArray"; - else if(typeReplaced=="byte[]") - jniType = "jbyteArray"; - else if(typeReplaced=="boolean[]") - jniType = "jbooleanArray"; - else if(typeReplaced=="char[]") - jniType = "jcharArray"; - else if(typeReplaced=="float[]") - jniType = "jfloatArray"; - else if(typeReplaced=="double[]") - jniType = "jdoubleArray"; - else if(typeReplaced.endsWith("[]")) - jniType = "jobjectArray"; - else if(typeReplaced.startsWith("java.lang.Class")) - jniType = "jclass"; - else if(typeReplaced=="java.lang.String" || typeReplaced=="String") - jniType = "jstring"; - else if(!typeReplaced.isEmpty()) - jniType = "jobject"; + if(!typeReplaced.isEmpty()) + jniType = CppGenerator::jniName(annotationFreeTypeName(typeReplaced)); else jniType = translateType(lengthParam->type(), NoOption); s << " arguments[" << argumentCounter-1 << "]."; @@ -5262,8 +5338,8 @@ void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction } if(java_class->isQObject()){ s << " QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_" - << java_class->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") - << "_" << constructorIndexes.value(java_function, 1000000000) + << java_class->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') + << argumentList.marshalledArguments << ", sizeof(" << shellClassName(java_class) << "), typeid(" << java_class->qualifiedCppName() << "), " << java_class->qualifiedCppName() << "::staticMetaObject, " @@ -5280,7 +5356,7 @@ void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction }else if(ownerCode==QLatin1String("pixmap")){ ownerFunction = QLatin1String("&QtJambiAPI::getPixmapOwner"); }else{ - ownerFunction = QLatin1String("&owner_function_") + cls->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_"); + ownerFunction = QLatin1String("&owner_function_") + cls->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); } } QList instantiations; @@ -5299,7 +5375,8 @@ void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction default: break; } s << " QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_" - << java_class->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "_" << constructorIndexes.value(java_function, 1000000000) + << java_class->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') + << argumentList.marshalledArguments << ", sizeof(" << shellClassName(java_class) << "), typeid(" << java_class->qualifiedCppName() << "), " << (java_class->generateShellClass() ? "true" : "false") << ", QtJambiPrivate::" << accessName << "Access<"; @@ -5312,7 +5389,7 @@ void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction } s << ">::newInstance()"; if (hasDeleter(cls)) { - s << ", &deleter_" << cls->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_"); + s << ", &deleter_" << cls->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); }else if(java_class->generateShellClass()){ s << ", [](void* ptr,bool){ delete reinterpret_cast<" << shellClassName(cls) << "*>(ptr); }"; }else if(cls->typeEntry()->isDestructorPublic()){ @@ -5323,9 +5400,12 @@ void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction } s << ", " << argumentRef << ");" << Qt::endl; }else{ - s << " QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_" << java_class->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "_" << constructorIndexes.value(java_function, 1000000000) << ", sizeof(" << shellClassName(java_class) << "), typeid(" << java_class->qualifiedCppName() << "), " << (java_class->generateShellClass() ? "true" : "false"); + s << " QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_" + << java_class->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') + << argumentList.marshalledArguments + << ", sizeof(" << shellClassName(java_class) << "), typeid(" << java_class->qualifiedCppName() << "), " << (java_class->generateShellClass() ? "true" : "false"); if (hasDeleter(cls)) { - s << ", &deleter_" << cls->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_"); + s << ", &deleter_" << cls->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); }else if(java_class->generateShellClass()){ s << ", [](void* ptr,bool){ delete reinterpret_cast<" << shellClassName(cls) << "*>(ptr); }"; }else if(cls->typeEntry()->isDestructorPublic()){ @@ -5348,7 +5428,7 @@ void CppImplGenerator::writeFinalConstructor(QTextStream &s, const MetaFunction s << INDENT << "Q_UNUSED(" << argument->indexedName() << ")" << Qt::endl; } s << INDENT << "JavaException::raiseQNoImplementationException(__jni_env, \"The method has no implementation on this platform.\" QTJAMBI_STACKTRACEINFO );" << Qt::endl; - s << "#endif // " << pps.join(" && ") << Qt::endl; + s << "#endif // " << pps.join(QStringLiteral(u" && ")) << Qt::endl; } } s << INDENT << "}QTJAMBI_CATCH(const JavaException& exn){" << Qt::endl; @@ -5426,7 +5506,7 @@ void CppImplGenerator::writeFinalFunction(QTextStream &s, const MetaFunction *ja hasThisVar = java_function->needsCallThrough() || !java_function->implementingClass()->typeEntry()->isNativeIdBased(); } if(!pps.isEmpty()){ - s << "#if " << pps.join(" && ") << Qt::endl; + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; } if(java_function->isRethrowExceptions() || java_function->isBlockExceptions() || java_function->isNoExcept()) s << INDENT << "QtJambiExceptionRaiser __qt_exceptionRaiser;" << Qt::endl; @@ -5439,7 +5519,7 @@ void CppImplGenerator::writeFinalFunction(QTextStream &s, const MetaFunction *ja for(const MetaArgument *argument : arguments) { ArgumentRemove ar = java_function->argumentRemoved(argument->argumentIndex()+1); - if(ar==ArgumentRemove_UseAsLength){ + if(ar==ArgumentRemove_UseAsUtilArg){ s << INDENT; writeTypeInfo(s, argument->type(), NoOption); s << argument->indexedName() << "{0};" << Qt::endl; @@ -5525,22 +5605,28 @@ void CppImplGenerator::writeFinalFunction(QTextStream &s, const MetaFunction *ja // Call the Qt function on the java object s << INDENT; - if ((function_type || !java_function->typeReplaced(0).isEmpty()) && !java_function->isSelfReturningFunction()) { + QString returnTypeReplacement = java_function->typeReplaced(0); + if ((function_type || !returnTypeReplacement.isEmpty()) && !java_function->isSelfReturningFunction()) { const QString qt_return_value = "__qt_return_value"; const QString java_return_value = "__java_return_value"; bool paren = false; bool noConversion = false; + bool hasReturn = false; if (function_type) { - if(!java_function->proxyCall().isEmpty()){ - s << "auto " << qt_return_value << " = "; + if(!java_function->proxyCall().isEmpty() || function_type->typeEntry()->isUnknown()){ + if(returnTypeReplacement!="void"){ + s << "auto " << qt_return_value << " = "; + hasReturn = true; + } }else if(function_type->isEnum() && !static_cast(function_type->typeEntry())->isPublic()){ writeTypeInfo(s, function_type, EnumAsInts); s << qt_return_value << " = "; uint size = static_cast(function_type->typeEntry())->size(); s << "qint" << size << "("; paren = true; + hasReturn = true; }else if(function_type->isPrimitive() - && java_function->typeReplaced(0).isEmpty() + && returnTypeReplacement.isEmpty() && !java_function->hasConversionRule(TS::NativeCode, 0) && (function_type->typeEntry()->qualifiedCppName()=="int" || function_type->typeEntry()->qualifiedCppName()=="double" @@ -5551,9 +5637,11 @@ void CppImplGenerator::writeFinalFunction(QTextStream &s, const MetaFunction *ja || function_type->typeEntry()->qualifiedCppName()=="long long")){ s << java_return_value << " = "; noConversion = true; + hasReturn = true; }else{ writeTypeInfo(s, function_type, NoOption); s << qt_return_value << " = "; + hasReturn = true; } } @@ -5565,12 +5653,11 @@ void CppImplGenerator::writeFinalFunction(QTextStream &s, const MetaFunction *ja s << INDENT << "__qt_exceptionRaiser.raise(__jni_env);" << Qt::endl; if(!noConversion){ - bool hasReturn = !java_function->isSelfReturningFunction() && java_function->typeReplaced(0) != "void"; - if(hasReturn){ + if(!java_function->isSelfReturningFunction() && returnTypeReplacement != "void"){ writeQtToJava(s, function_type, qt_return_value, java_return_value, java_function, nullptr, 0, Option(EnumAsInts | NoTmpVariable), "__jni_env", hasThisVar ? "__qtjambi_scope" : ""); - }else if(function_type){ + }else if(hasReturn){ s << INDENT << "Q_UNUSED(" << qt_return_value << ")" << Qt::endl; } } @@ -5611,7 +5698,7 @@ void CppImplGenerator::writeFinalFunction(QTextStream &s, const MetaFunction *ja s << INDENT << "Q_UNUSED(" << argument->indexedName() << ")" << Qt::endl; } s << INDENT << "JavaException::raiseQNoImplementationException(__jni_env, \"The method has no implementation on this platform.\" QTJAMBI_STACKTRACEINFO );" << Qt::endl; - s << "#endif // " << pps.join(" && ") << Qt::endl; + s << "#endif // " << pps.join(QStringLiteral(u" && ")) << Qt::endl; } if(java_function->isSelfReturningFunction()){ if(!java_function->implementingClass()->typeEntry()->designatedInterface()) @@ -5771,7 +5858,7 @@ void CppImplGenerator::writeFieldAccessors(QTextStream &s, const MetaField *java s << INDENT << "Q_UNUSED(__this)" << Qt::endl; } if(!pps.isEmpty()) - s << "#if " << pps.join(" && ") << Qt::endl; + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; if (!setter->isStatic()) { if(cls->typeEntry()->isInterface() || cls->typeEntry()->designatedInterface() || cls->typeEntry()->isFunctional()){ s << INDENT; @@ -5845,7 +5932,7 @@ void CppImplGenerator::writeFieldAccessors(QTextStream &s, const MetaField *java s << INDENT << "Q_UNUSED(" << argument->indexedName() << ")" << Qt::endl; } s << INDENT << "JavaException::raiseQNoImplementationException(__jni_env, \"The method has no implementation on this platform.\" QTJAMBI_STACKTRACEINFO );" << Qt::endl; - s << "#endif //" << pps.join(" && ") << Qt::endl; + s << "#endif //" << pps.join(QStringLiteral(u" && ")) << Qt::endl; } } s << INDENT << "}QTJAMBI_CATCH(const JavaException& exn){" << Qt::endl; @@ -5867,7 +5954,7 @@ void CppImplGenerator::writeFieldAccessors(QTextStream &s, const MetaField *java // Getter if (!getter->wasPublic()) { if(!pps.isEmpty()) - s << Qt::endl << "#if " << pps.join(" && ") << Qt::endl; + s << Qt::endl << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; writeFunctionSignature(s, getter, getter->ownerClass(), "", Option(EnumAsInts | UseNativeIds | JNIProxyFunction)); s << Qt::endl << "{" << Qt::endl; @@ -5910,7 +5997,7 @@ void CppImplGenerator::writeFieldAccessors(QTextStream &s, const MetaField *java } s << "}" << Qt::endl << Qt::endl; if(!pps.isEmpty()){ - s << "#endif //" << pps.join(" && ") << Qt::endl << Qt::endl; + s << "#endif //" << pps.join(QStringLiteral(u" && ")) << Qt::endl << Qt::endl; } } @@ -5935,7 +6022,7 @@ void CppImplGenerator::writeFieldAccessors(QTextStream &s, const MetaField *java s << INDENT << "Q_UNUSED(__this)" << Qt::endl; } if(!pps.isEmpty()) - s << "#if " << pps.join(" && ") << Qt::endl; + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; if (!getter->isStatic()) { if(cls->typeEntry()->isInterface() || cls->typeEntry()->designatedInterface() || cls->typeEntry()->isFunctional()){ s << INDENT; @@ -6000,7 +6087,7 @@ void CppImplGenerator::writeFieldAccessors(QTextStream &s, const MetaField *java if(!getter->isStatic()) s << INDENT << "Q_UNUSED(__this" << (cls->typeEntry()->isNativeIdBased() ? "_nativeId)" : ")") << Qt::endl; s << INDENT << "JavaException::raiseQNoImplementationException(__jni_env, \"The method has no implementation on this platform.\" QTJAMBI_STACKTRACEINFO );" << Qt::endl; - s << "#endif //" << pps.join(" && ") << Qt::endl; + s << "#endif //" << pps.join(QStringLiteral(u" && ")) << Qt::endl; } } s << INDENT << "}QTJAMBI_CATCH(const JavaException& exn){" << Qt::endl; @@ -6036,19 +6123,19 @@ void CppImplGenerator::writeDeleteAndOwnerFunction(QTextStream &s, const MetaCla _cls = _cls->baseClass(); } bool deleterFound = false; - for(const ComplexTypeEntry * _cls : classes){ + for(const ComplexTypeEntry * _cls : qAsConst(classes)){ for(const CodeSnip& snip : _cls->codeSnips()) { if (snip.language == TS::DeleterFunction) { - purgeLines << snip.code().replace("%this", "_ptr").replace("%classtype", cls->qualifiedCppName()).split("\n"); + purgeLines << snip.code().replace("%this", "_ptr").replace("%classtype", cls->qualifiedCppName()).split(QStringLiteral(u"\n")); deleterFound = true; } } } if(!deleterFound){ - for(const ComplexTypeEntry * _cls : classes){ + for(const ComplexTypeEntry * _cls : qAsConst(classes)){ for(const CodeSnip& snip : _cls->codeSnips()) { if (snip.language == TS::DestructorFunction) { - purgeLines << snip.code().replace("%this", "_ptr").replace("%classtype", cls->qualifiedCppName()).split("\n"); + purgeLines << snip.code().replace("%this", "_ptr").replace("%classtype", cls->qualifiedCppName()).split(QStringLiteral(u"\n")); } } } @@ -6067,7 +6154,7 @@ void CppImplGenerator::writeDeleteAndOwnerFunction(QTextStream &s, const MetaCla break; } } - s << Qt::endl << "void deleter_" << cls->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "(void *ptr, bool isShell)" << Qt::endl << "{" << Qt::endl; + s << Qt::endl << "void deleter_" << cls->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "(void *ptr, bool isShell)" << Qt::endl << "{" << Qt::endl; { INDENTATION(INDENT) s << INDENT << "QTJAMBI_NATIVE_METHOD_CALL(\"qtjambi_deleter for " << cls->qualifiedCppName() << "\")" << Qt::endl; @@ -6223,7 +6310,7 @@ void CppImplGenerator::writeDeleteAndOwnerFunction(QTextStream &s, const MetaCla const ComplexTypeEntry *entry = cls->typeEntry(); QString ownerCode = entry->threadAffinity(); if (!ownerCode.isEmpty() && ownerCode!=QLatin1String("main") && ownerCode!=QLatin1String("ui") && ownerCode!=QLatin1String("pixmap")) { - s << Qt::endl << "const QObject* owner_function_" << cls->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "(const void *ptr)" << Qt::endl + s << Qt::endl << "const QObject* owner_function_" << cls->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "(const void *ptr)" << Qt::endl << "{" << Qt::endl << " const " << cls->qualifiedCppName() << "* __qt_this = reinterpret_castqualifiedCppName() << " *>(ptr);" << Qt::endl; if(ownerCode.contains("%1")){ @@ -6235,7 +6322,7 @@ void CppImplGenerator::writeDeleteAndOwnerFunction(QTextStream &s, const MetaCla } s << " return "; bool first = true; - for(const QString& line : ownerCode.split("\n")){ + for(const QString& line : ownerCode.split(QStringLiteral(u"\n"))){ if(first) first = false; else @@ -6279,7 +6366,7 @@ void CppImplGenerator::writeCustomStructors(QTextStream &s, const ComplexTypeEnt if(!customLegacyConstructor.name.isEmpty()){ QString placement_name = customLegacyConstructor.placement_name.isEmpty() ? QLatin1String("placement") : customLegacyConstructor.placement_name; QString param_name = customLegacyConstructor.param_name.isEmpty() ? QLatin1String("copy") : customLegacyConstructor.param_name; - s << "void* custom_constructor_" << entry->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "(" + s << "void* custom_constructor_" << entry->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "(" << "void* " << placement_name << ", const void * __in_var)" << Qt::endl << "{" << Qt::endl << " Q_UNUSED(" << placement_name << ")" << Qt::endl @@ -6298,7 +6385,7 @@ void CppImplGenerator::writeCustomStructors(QTextStream &s, const ComplexTypeEnt if(!customCopyConstructor.name.isEmpty()){ QString placement_name = customCopyConstructor.placement_name.isEmpty() ? QLatin1String("placement") : customCopyConstructor.placement_name; QString param_name = customCopyConstructor.param_name.isEmpty() ? QLatin1String("copy") : customCopyConstructor.param_name; - s << "void custom_copy_constructor_" << entry->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "(const QtPrivate::QMetaTypeInterface *metaTypeInterface, void* " << placement_name << ", const void * __in_var)" << Qt::endl + s << "void custom_copy_constructor_" << entry->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "(const QtPrivate::QMetaTypeInterface *metaTypeInterface, void* " << placement_name << ", const void * __in_var)" << Qt::endl << "{" << Qt::endl << " Q_UNUSED(metaTypeInterface)" << Qt::endl << " Q_UNUSED(" << placement_name << ")" << Qt::endl @@ -6309,7 +6396,7 @@ void CppImplGenerator::writeCustomStructors(QTextStream &s, const ComplexTypeEnt } if(!customDefaultConstructor.name.isEmpty()){ QString placement_name = customDefaultConstructor.placement_name.isEmpty() ? QLatin1String("placement") : customDefaultConstructor.placement_name; - s << "void custom_default_constructor_" << entry->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "(const QtPrivate::QMetaTypeInterface *metaTypeInterface, void* " << placement_name << ")" << Qt::endl + s << "void custom_default_constructor_" << entry->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "(const QtPrivate::QMetaTypeInterface *metaTypeInterface, void* " << placement_name << ")" << Qt::endl << "{" << Qt::endl << " Q_UNUSED(metaTypeInterface)" << Qt::endl << " Q_UNUSED(" << placement_name << ")" << Qt::endl; @@ -6319,7 +6406,7 @@ void CppImplGenerator::writeCustomStructors(QTextStream &s, const ComplexTypeEnt if(!customMoveConstructor.name.isEmpty()){ QString placement_name = customMoveConstructor.placement_name.isEmpty() ? QLatin1String("placement") : customMoveConstructor.placement_name; QString param_name = customMoveConstructor.param_name.isEmpty() ? QLatin1String("copy") : customMoveConstructor.param_name; - s << "void custom_move_constructor_" << entry->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "(const QtPrivate::QMetaTypeInterface * metaTypeInterface, void* " << placement_name << ", void * __in_var)" << Qt::endl + s << "void custom_move_constructor_" << entry->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "(const QtPrivate::QMetaTypeInterface * metaTypeInterface, void* " << placement_name << ", void * __in_var)" << Qt::endl << "{" << Qt::endl << " Q_UNUSED(metaTypeInterface)" << Qt::endl << " Q_UNUSED(" << placement_name << ")" << Qt::endl @@ -6330,7 +6417,7 @@ void CppImplGenerator::writeCustomStructors(QTextStream &s, const ComplexTypeEnt } } if (!customDestructor.name.isEmpty()) { - s << "void custom_destructor_" << entry->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "(" << Qt::endl; + s << "void custom_destructor_" << entry->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "(" << Qt::endl; if(QT_VERSION_CHECK(m_qtVersionMajor,m_qtVersionMinor,m_qtVersionPatch) >= QT_VERSION_CHECK(6, 0, 0)){ s << " const QtPrivate::QMetaTypeInterface * metaTypeInterface, " << Qt::endl; } @@ -6389,67 +6476,72 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, const MetaArgument* argumentTypeArrayLength = nullptr; QString argumentTypeArrayExpression; - bool argumentTypeArray = false; - bool argumentTypeBuffer = false; + bool useArgumentAsArray = false; + bool useArgumentAsBuffer = false; + bool useArgumentAsSlotContext = false; bool argumentTypeString = false; bool argumentTypeArrayDeref = false; - bool insertArrayOffsetArgument = false; + bool insertUtilArgument = false; int argumentTypeArrayMinLength = -1; int argumentTypeArrayMaxLength = -1; if(java_function){ - int arrayOrBufferLengthIndex = java_function->arrayOrBufferLengthIndex(argument_index); - argumentTypeArrayDeref = java_function->useArgumentAsDerefPointer(argument_index); - argumentTypeBuffer = java_function->useArgumentAsBuffer(argument_index); - argumentTypeArray = !argumentTypeBuffer && java_function->useArgumentAsArray(argument_index); - if(arrayOrBufferLengthIndex>0){ - argumentTypeArrayLength = java_function->arguments().value(arrayOrBufferLengthIndex-1, nullptr); - if(!argumentTypeArrayLength || argumentTypeArrayLength->argumentIndex()+1!=arrayOrBufferLengthIndex){ - argumentTypeArrayLength = nullptr; - for(const MetaArgument *argument : java_function->arguments()) { - if(argument->argumentIndex()+1==arrayOrBufferLengthIndex){ - argumentTypeArrayLength = argument; + useArgumentAsBuffer = java_function->useArgumentAsBuffer(argument_index); + useArgumentAsArray = !useArgumentAsBuffer && java_function->useArgumentAsArray(argument_index); + useArgumentAsSlotContext = java_function->useArgumentAsSlotContext(argument_index); + if(useArgumentAsArray || useArgumentAsBuffer){ + argumentTypeArrayDeref = java_function->useArgumentAsDerefPointer(argument_index); + int utilArgumentIndex = java_function->utilArgumentIndex(argument_index); + if(utilArgumentIndex>0){ + argumentTypeArrayLength = java_function->arguments().value(utilArgumentIndex-1, nullptr); + if(!argumentTypeArrayLength || argumentTypeArrayLength->argumentIndex()+1!=utilArgumentIndex){ + argumentTypeArrayLength = nullptr; + for(const MetaArgument *argument : java_function->arguments()) { + if(argument->argumentIndex()+1==utilArgumentIndex){ + argumentTypeArrayLength = argument; + } } } } - } - if(argumentTypeArrayLength){ - insertArrayOffsetArgument = java_function->insertArrayOffsetArgument(argument_index); - }else{ - argumentTypeArrayMinLength = java_function->arrayOrBufferLengthMinValue(argument_index); - argumentTypeArrayMaxLength = java_function->arrayOrBufferLengthMaxValue(argument_index); - if(argumentTypeArrayMinLength<0){ - argumentTypeArrayExpression = java_function->arrayOrBufferLengthExpression(argument_index); + if(argumentTypeArrayLength){ + insertUtilArgument = java_function->insertUtilArgument(argument_index); + }else{ + argumentTypeArrayMinLength = java_function->arrayOrBufferLengthMinValue(argument_index); + argumentTypeArrayMaxLength = java_function->arrayOrBufferLengthMaxValue(argument_index); + if(argumentTypeArrayMinLength<0){ + argumentTypeArrayExpression = java_function->arrayOrBufferLengthExpression(argument_index); + } } - } - if(!argumentTypeArray && !argumentTypeBuffer){ + }else{ replacedType = java_function->typeReplaced(argument_index); } }else{ - int arrayOrBufferLengthIndex = java_functional->arrayOrBufferLengthIndex(argument_index); - argumentTypeArrayDeref = java_functional->useArgumentAsDerefPointer(argument_index); - argumentTypeBuffer = java_functional->useArgumentAsBuffer(argument_index); - argumentTypeArray = !argumentTypeBuffer && java_functional->useArgumentAsArray(argument_index); - if(arrayOrBufferLengthIndex>0){ - argumentTypeArrayLength = java_functional->arguments().value(arrayOrBufferLengthIndex-1, nullptr); - if(!argumentTypeArrayLength || argumentTypeArrayLength->argumentIndex()+1!=arrayOrBufferLengthIndex){ - argumentTypeArrayLength = nullptr; - for(const MetaArgument *argument : java_functional->arguments()) { - if(argument->argumentIndex()+1==arrayOrBufferLengthIndex){ - argumentTypeArrayLength = argument; + useArgumentAsBuffer = java_functional->useArgumentAsBuffer(argument_index); + useArgumentAsArray = !useArgumentAsBuffer && java_functional->useArgumentAsArray(argument_index); + useArgumentAsSlotContext = java_functional->useArgumentAsSlotContext(argument_index); + if(useArgumentAsBuffer || useArgumentAsArray){ + argumentTypeArrayDeref = java_functional->useArgumentAsDerefPointer(argument_index); + int utilArgumentIndex = java_functional->utilArgumentIndex(argument_index); + if(utilArgumentIndex>0){ + argumentTypeArrayLength = java_functional->arguments().value(utilArgumentIndex-1, nullptr); + if(!argumentTypeArrayLength || argumentTypeArrayLength->argumentIndex()+1!=utilArgumentIndex){ + argumentTypeArrayLength = nullptr; + for(const MetaArgument *argument : java_functional->arguments()) { + if(argument->argumentIndex()+1==utilArgumentIndex){ + argumentTypeArrayLength = argument; + } } } } - } - if(argumentTypeArrayLength){ - insertArrayOffsetArgument = java_functional->insertArrayOffsetArgument(argument_index); - }else{ - argumentTypeArrayMinLength = java_functional->arrayOrBufferLengthMinValue(argument_index); - argumentTypeArrayMaxLength = java_functional->arrayOrBufferLengthMaxValue(argument_index); - if(argumentTypeArrayMinLength<0){ - argumentTypeArrayExpression = java_functional->arrayOrBufferLengthExpression(argument_index); + if(argumentTypeArrayLength){ + insertUtilArgument = java_functional->insertUtilArgument(argument_index); + }else{ + argumentTypeArrayMinLength = java_functional->arrayOrBufferLengthMinValue(argument_index); + argumentTypeArrayMaxLength = java_functional->arrayOrBufferLengthMaxValue(argument_index); + if(argumentTypeArrayMinLength<0){ + argumentTypeArrayExpression = java_functional->arrayOrBufferLengthExpression(argument_index); + } } - } - if(!argumentTypeArray && !argumentTypeBuffer){ + }else{ replacedType = java_functional->typeReplaced(argument_index); } } @@ -6472,10 +6564,10 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, argumentTypeString = true; } - if (!conversion_rule.isEmpty() || argumentTypeArray || argumentTypeBuffer || argumentTypeString) { + if (!conversion_rule.isEmpty() || useArgumentAsArray || useArgumentAsBuffer || argumentTypeString || useArgumentAsSlotContext) { QScopedPointer indentationPointer; bool needLambda = false; - if(!argumentTypeBuffer && !argumentTypeString){ + if(!useArgumentAsBuffer && !argumentTypeString){ if((option & DirectReturn) == DirectReturn){ needLambda = true; //}else if((option & NoTmpVariable) == NoTmpVariable){ @@ -6513,7 +6605,7 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, writeTypeInfo(_s, java_type, option); } } - if(!argumentTypeBuffer && !argumentTypeString){ + if(!useArgumentAsBuffer && !argumentTypeString){ if(out_name.isEmpty()){ needLambda = true; } @@ -6527,9 +6619,9 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, { INDENTATIONRESET(INDENT) QTextStream s(&convertCode); - if(argumentTypeArray && java_type){ + if(useArgumentAsArray && java_type){ if(!argumentTypeArrayLength && argumentTypeArrayMinLength<0 && argumentTypeArrayExpression.isEmpty()) - ReportHandler::warning("ArrayLength expected"); + ReportHandler::warning(QString("ArrayLength expected at argument %1 of %2").arg(QString::number(argument_index), java_function ? (java_function->declaringClass() ? java_function->declaringClass()->qualifiedCppName()+"::" : QString()) + java_function->minimalSignature() : java_functional->name())); QScopedPointer _java_type(java_type->copy()); _java_type->setConstant(false); _java_type->setReferenceType(MetaType::NoReference); @@ -6547,13 +6639,13 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, if(_java_type->typeEntry()->isPrimitive() || _java_type->isQChar()){ QString arrayPointerType = _java_type->typeEntry()->targetLangName(); arrayPointerType[0] = arrayPointerType[0].toUpper(); - if(insertArrayOffsetArgument || qtjambi_scope.isEmpty()){ + if(insertUtilArgument || qtjambi_scope.isEmpty()){ s << INDENT << "J" << arrayPointerType << "ArrayPointer " << out_name << "_buffer(" << __jni_env << ", " << in_name; if(java_type->isConstant()){ s << ", false"; } s << ");" << Qt::endl; - if(insertArrayOffsetArgument){ + if(insertUtilArgument){ s << INDENT; if(target_language==TS::NativeCode){ writeTypeInfo(s, java_type, option); @@ -6637,7 +6729,7 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, s << ");" << Qt::endl; } }else{ - if(insertArrayOffsetArgument || qtjambi_scope.isEmpty()){ + if(insertUtilArgument || qtjambi_scope.isEmpty()){ s << INDENT << "JObjectArrayPointer<"; writeTypeInfo(s, _java_type.get(), option); s << "> " << out_name << "_buffer(" << __jni_env << ", " << in_name << "," << Qt::endl; @@ -6690,7 +6782,7 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, } } s << ");" << Qt::endl; - if(insertArrayOffsetArgument){ + if(insertUtilArgument){ s << INDENT; if(target_language==TS::NativeCode){ writeTypeInfo(s, java_type, option); @@ -6807,7 +6899,7 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, }else if(_java_type->typeEntry()->targetLangName()=="char"){ pointerConverterType = "WChar"; } - if(insertArrayOffsetArgument || qtjambi_scope.isEmpty()){ + if(insertUtilArgument || qtjambi_scope.isEmpty()){ s << INDENT; if(java_type->isConstant()) s << "Const"; @@ -6830,7 +6922,7 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, if((option & NoTmpVariable) != NoTmpVariable) s << _java_type->typeEntry()->jniName() << "Array "; s << tmp_out_name << " = " << out_name << "_array;" << Qt::endl; - if(insertArrayOffsetArgument){ + if(insertUtilArgument){ QString typeReplaced = java_function ? java_function->typeReplaced(argumentTypeArrayLength->argumentIndex() + 1) : java_functional->typeReplaced(argumentTypeArrayLength->argumentIndex() + 1); if(!typeReplaced.isEmpty()) @@ -6869,7 +6961,7 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, } lambdaOutType = _java_type->typeEntry()->jniName() + QLatin1String("Array"); }else{ - if(insertArrayOffsetArgument || qtjambi_scope.isEmpty()){ + if(insertUtilArgument || qtjambi_scope.isEmpty()){ if(java_type->isConstant()){ s << INDENT << "ConstObjectPointerArray<"; }else{ @@ -7009,7 +7101,7 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, if((option & DirectReturn) == 0) s << ";" << Qt::endl; } - }else if(argumentTypeBuffer){ + }else if(useArgumentAsBuffer){ //Q_ASSERT(java_type->typeEntry()->isPrimitive()); //Q_ASSERT(java_type->indirections().size()==1); //Q_ASSERT(java_type->typeEntry()->targetLangName()!="boolean"); @@ -7113,6 +7205,8 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, } s << out_name << "_buffer." << (argument_index==0 ? "take" : "buffer") << "();" << Qt::endl; } + }else if(useArgumentAsSlotContext){ + s << "QObject* " << out_name << " = QtJambiAPI::objectFromNativeId(" << in_name << ");" << Qt::endl; }else{ conversion_rule = conversion_rule.replace("%out", tmp_out_name) .replace("%in", tmp_in_name) @@ -7124,7 +7218,7 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, arguments.at(i)->indexedName()); } conversion_rule = conversion_rule.replace("%\"\"", "%"); - QStringList lines = conversion_rule.split("\n"); + QStringList lines = conversion_rule.split(QStringLiteral(u"\n")); while(!lines.isEmpty()){ if(lines.last().trimmed().isEmpty()){ lines.takeLast(); @@ -7173,9 +7267,10 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, s << line << Qt::endl; } if(((option & OptionalScope) == OptionalScope) && target_language==TS::NativeCode && argument_index>0){ + const ComplexTypeEntry *complexType = dynamic_cast(java_type->typeEntry()); if(java_type->indirections().isEmpty() && (java_type->getReferenceType()==MetaType::Reference - || ((java_type->typeEntry()->isObject() || java_type->typeEntry()->isInterface()) && !this->hasPublicAssignmentOperator(java_type)) + || (complexType && (complexType->isObject() || complexType->isInterface()) && !complexType->hasPublicDefaultAssignment()) )){ if(argument_index==0){ s << INDENT << "if(" << qt_name << "){" << Qt::endl; @@ -7237,7 +7332,7 @@ bool CppImplGenerator::writeConversionRule(QTextStream &s, } } - QStringList lines = convertCode.split("\n"); + QStringList lines = convertCode.split(QStringLiteral(u"\n")); while(!lines.isEmpty()){ if(lines.last().trimmed().isEmpty()){ lines.takeLast(); @@ -7476,11 +7571,12 @@ bool CppImplGenerator::writeJavaToQt(QTextStream &s, s << INDENT << "Q_ASSERT(" << __jni_env << "->GetArrayLength(jarray(" << java_name << ")) >= " << java_type->arrayElementCount() << ");" << Qt::endl; s << INDENT; writeTypeInfo(s, elementType); - s << " " << qt_name << "[" << java_type->arrayElementCount() << "];" << Qt::endl; - - s << INDENT << __jni_env << "->" << getXxxArrayRegion(elementType) - << "( " << translateType(java_type, option) << "(" << java_name << "), 0, " << java_type->arrayElementCount() - << ", reinterpret_cast<" << translateType(elementType, option) << " *>(" << qt_name << "));" << Qt::endl; + s << "* " << qt_name << " = qtjambi_array_cast<"; + writeTypeInfo(s, elementType, Option(option | SkipName)); + s << "*>(" << __jni_env << ", "; + if((option & OptionalScope) == OptionalScope) + s << "*"; + s << qtjambi_scope << ", " << java_name << ", " << java_type->arrayElementCount() << ");" << Qt::endl; }else{ s << INDENT << "Q_ASSERT(" << __jni_env << "->GetArrayLength(jarray(" << java_name << ")) >= " << java_type->arrayElementCount() << ");" << Qt::endl; s << INDENT; @@ -8025,6 +8121,7 @@ bool CppImplGenerator::writeJavaToQt(QTextStream &s, s << "qtjambi_cast(" << __jni_env << ", " << java_name << ")"; } else { const TypeEntry *type = java_type->typeEntry(); + const ComplexTypeEntry *complexType = dynamic_cast(java_type->typeEntry()); QString qualified_class_name = type->qualifiedCppName(); if(!java_type->instantiations().isEmpty()){ qualified_class_name += "<"; @@ -8047,6 +8144,12 @@ bool CppImplGenerator::writeJavaToQt(QTextStream &s, const ImplementorTypeEntry * imptype; if (java_type->isFunctional()) { //const FunctionalTypeEntry* funEntry = static_cast(java_type->typeEntry()); + //QString registeredName; + //if(funEntry->getUsing().isEmpty()){ + // registeredName = funEntry->normalizedSignature(); + //}else{ + // registeredName = funEntry->name(); + //} s << "qtjambi_cast<" << qualified_class_name << ">(" << __jni_env << ", " << java_name << ")"; }else if (java_type->isIterator()) { s << "reinterpret_deref_cast<" << qualified_class_name << " " @@ -8184,7 +8287,7 @@ bool CppImplGenerator::writeJavaToQt(QTextStream &s, } } else { if ((option & UseNativeIds) == 0 || !java_type->typeEntry()->isNativeIdBased()){ - if(java_type->typeEntry()->isComplex() && static_cast(java_type->typeEntry())->isGLsync()){ + if(complexType && complexType->isGLsync()){ s << "QtJambiAPI::convertJavaObjectToNative<__GLsync>(" << __jni_env << ", " << java_name << ")"; }else{ s << "qtjambi_cast<"; @@ -8296,8 +8399,10 @@ bool CppImplGenerator::writeJavaToQt(QTextStream &s, } if(java_type->indirections().isEmpty() && (java_type->getReferenceType()==MetaType::Reference - || ((java_type->typeEntry()->isObject() || java_type->typeEntry()->isInterface()) && !this->hasPublicAssignmentOperator(java_type)))){ - if(java_type->isQObject() || !this->hasPublicAssignmentOperator(java_type)){ + || (complexType && (complexType->isObject() || complexType->isInterface()) && !complexType->hasPublicDefaultAssignment()))){ + if(java_type->isQObject() || !complexType || (!complexType->hasPublicDefaultAssignment() + && !(complexType->hasPublicMoveAssignment() && complexType->hasPublicCopyConstructor()) + && !(complexType->isDestructorPublic() && complexType->hasPublicCopyConstructor()))){ if(java_type->isConstant()){ s << INDENT << qt_name << " = const_cast<"; writeTypeInfo(s, java_type, Option(SkipName | ForceValueType)); @@ -8307,11 +8412,22 @@ bool CppImplGenerator::writeJavaToQt(QTextStream &s, } }else{ s << INDENT << "if(" << qt_name << "){" << Qt::endl; - { + if(complexType->hasPublicDefaultAssignment()){ INDENTATION(INDENT) s << INDENT << "*reinterpret_cast<"; writeTypeInfo(s, java_type, Option(SkipName | ForceValueType)); s << "*>(" << qt_name << ") = " << convertLine << ";" << Qt::endl; + }else if(complexType->hasPublicMoveAssignment() && complexType->hasPublicCopyConstructor()){ + INDENTATION(INDENT) + s << INDENT << "*reinterpret_cast<"; + writeTypeInfo(s, java_type, Option(SkipName | ForceValueType)); + s << "*>(" << qt_name << ") = " << java_type->typeEntry()->qualifiedCppName() << "(" << convertLine << ");" << Qt::endl; + }else /*if(complexType->isDestructorPublic() && complexType->hasPublicCopyConstructor())*/ { + INDENTATION(INDENT) + s << INDENT << "reinterpret_cast<"; + writeTypeInfo(s, java_type, Option(SkipName | ForceValueType)); + s << "*>(" << qt_name << ")->~" << java_type->typeEntry()->qualifiedCppName().split("::").last() << "();" << Qt::endl; + s << INDENT << "new (" << qt_name << ") " << java_type->typeEntry()->qualifiedCppName() << "(" << convertLine << ");" << Qt::endl; } s << INDENT << "}else{" << Qt::endl; { @@ -8606,14 +8722,21 @@ bool CppImplGenerator::writeQtToJava(QTextStream &s, }else{ s << "jobjectArray " << java_name << " = "; } - QString qualifiedTargetLangName = elementType->fullName().mid(elementType->package().length()+1).replace(".", "$"); + QString qualifiedTargetLangName = elementType->fullName(); + if(!elementType->package().isEmpty()){ + qualifiedTargetLangName = qualifiedTargetLangName.mid(elementType->package().length()+1).replace(".", "$"); + qualifiedTargetLangName = elementType->package().replace(".", "/") + "/" + qualifiedTargetLangName; + } + if(qualifiedTargetLangName=="void"){ + qualifiedTargetLangName = "io/qt/QNativePointer"; + } s << "QtJambiAPI::toJObjectArray<"; if(elementType->indirections().isEmpty()) writeTypeInfo(s, elementType, Option(ForceValueType)); else writeTypeInfo(s, elementType, Option(NoOption)); s << ">(" << __jni_env - << ", \"" << elementType->package().replace(".", "/") << "/" << qualifiedTargetLangName << "\"" + << ", \"" << qualifiedTargetLangName << "\"" << ", " << qt_name << ", jsize(" << java_type->arrayElementCount() << "), [](JNIEnv * " << __jni_env << ", "; writeTypeInfo(s, elementType, Option(ForceConstReference)); @@ -8929,11 +9052,13 @@ bool CppImplGenerator::writeQtToJava(QTextStream &s, } } else if (java_type->isFunctional()) { const FunctionalTypeEntry* funEntry = static_cast(java_type->typeEntry()); - QString funName = funEntry->targetLangName(); - if(!funEntry->qualifier().isEmpty()){ - funName = funEntry->qualifier() + "$" + funName; + QString registeredName; + if(funEntry->getUsing().isEmpty()){ + registeredName = funEntry->normalizedSignature(); + }else{ + registeredName = funEntry->name(); } - s << "qtjambi_cast(" << __jni_env << ", " << qt_name << ", \"" << funEntry->qualifiedCppName() << "\")"; + s << "qtjambi_cast(" << __jni_env << ", " << qt_name << ", \"" << registeredName << "\")"; } else if (java_type->isPointerContainer() && java_type->instantiations().size()==1) { s << "qtjambi_cast(" << __jni_env << ", "; if(!qtjambi_scope.isEmpty()){ @@ -8955,8 +9080,13 @@ bool CppImplGenerator::writeQtToJava(QTextStream &s, s << "QtJambiAPI::convertNativeToQNativePointer(" << __jni_env << ", "; if (java_type->getReferenceType()==MetaType::Reference) s << "&"; - s << qt_name << ", " << nativePointerTypeString(java_type) << ", " - << java_type->actualIndirections() << ")"; + s << qt_name << ", " << nativePointerTypeString(java_type) << ", "; + int actualIndirections = java_type->actualIndirections(); + if(actualIndirections==0 && java_type->typeEntry()->isAlias() && static_cast(java_type->typeEntry())->getHasIndirections()){ + ++actualIndirections; + } + s << actualIndirections; + s << ")"; } else if (java_type->isIterator()) { const IteratorTypeEntry* iteratorType = static_cast(java_type->typeEntry()); bool found = false; @@ -9883,7 +10013,7 @@ void CppImplGenerator::writeFunctionCall(QTextStream &s, const QString &object_n QTextStream s2(&tmpl); writeTypeInfo(s2, param->type()); } - }else{ + }else if(param->defaultType().isEmpty()){ tmpl.clear(); break; } @@ -10190,10 +10320,10 @@ void CppImplGenerator::writeFunctionCall(QTextStream &s, const QString &object_n if(!(option & JNIProxyFunction)) prefix = "__qt_"; if(additionalClosingBracket && !java_function->type() && !java_function->arguments().isEmpty()){ - QList result; + QList result; const MetaArgumentList& arguments = java_function->arguments(); for (int i = 0; i < arguments.size(); ++i) { - const MetaArgument *argument = arguments.at(i); + MetaArgument *argument = arguments.at(i); if ((option & SkipRemovedArguments) == SkipRemovedArguments && java_function->argumentRemoved(argument->argumentIndex() + 1)!=ArgumentRemove_No) { if(!java_function->isConstructor() @@ -10205,7 +10335,7 @@ void CppImplGenerator::writeFunctionCall(QTextStream &s, const QString &object_n } result << argument; } - const MetaArgument* assignment = result.takeLast(); + MetaArgument* assignment = result.takeLast(); writeFunctionCallArguments(s, java_function, result, prefix, option); s << "] = "; writeFunctionCallArguments(s, java_function, {assignment}, prefix, option); @@ -10231,11 +10361,11 @@ void CppImplGenerator::writeFunctionCall(QTextStream &s, const QString &object_n void CppImplGenerator::writeFunctionCallArguments(QTextStream &s, const MetaFunction *java_function, const QString &prefix, Option options){ writeFunctionCallArguments(s, java_function, - [=]()->QList { - QList result; + [=]()->QList { + QList result; const MetaArgumentList& arguments = java_function->arguments(); for (int i = 0; i < arguments.size(); ++i) { - const MetaArgument *argument = arguments.at(i); + MetaArgument *argument = arguments.at(i); if ((options & SkipRemovedArguments) == SkipRemovedArguments && java_function->argumentRemoved(argument->argumentIndex() + 1)!=ArgumentRemove_No) { if(!java_function->isConstructor() @@ -10254,7 +10384,7 @@ void CppImplGenerator::writeFunctionCallArguments(QTextStream &s, const MetaFunc void CppImplGenerator::writeFunctionCallArguments(QTextStream &s, const MetaFunction *java_function, - const QList& arguments, + const QList& arguments, const QString &prefix, Option options) { Q_ASSERT(java_function); @@ -10298,6 +10428,9 @@ void CppImplGenerator::writeFunctionCallArguments(QTextStream &s, if (written_arguments++ > 0) { s << ", "; } +// if(java_function->attributes() & MetaAttributes::BracketCall){ +// s << "." << argument->argumentName() << "="; +// } bool enum_as_int = (options & EnumAsInts) && (argument->type()->typeEntry()->isEnum() || argument->type()->typeEntry()->isFlags()) @@ -10370,17 +10503,34 @@ void CppImplGenerator::writeFunctionCallArguments(QTextStream &s, } } - if (!argument->type()->isPrimitive() - || java_function->hasConversionRule(TS::NativeCode, argument->argumentIndex() + 1)) { - s << prefix; + if(argument->type()->isArray() + && java_function->functionType()==MetaFunction::ConstructorFunction + && java_function->attributes() & MetaAttributes::BracketCall){ + s << "{"; + for(int i=0; itype()->arrayElementCount(); ++i){ + if(i>0){ + s << ", "; + } + if (!argument->type()->isPrimitive() + || java_function->hasConversionRule(TS::NativeCode, argument->argumentIndex() + 1)) { + s << prefix; + } + s << argument->indexedName() << "[" << i << "]"; + } + s << "}"; + }else{ + if (!argument->type()->isPrimitive() + || java_function->hasConversionRule(TS::NativeCode, argument->argumentIndex() + 1)) { + s << prefix; + } + s << argument->indexedName(); } - s << argument->indexedName(); for(uint i=0; iuseArgumentAsArray(argument->argumentIndex() + 1) && !java_function->useArgumentAsBuffer(argument->argumentIndex() + 1)){ - if(java_function->insertArrayOffsetArgument(argument->argumentIndex() + 1) && (options & SkipRemovedArguments)){ - int lengthParameter = java_function->arrayOrBufferLengthIndex(argument->argumentIndex() + 1); + if(java_function->insertUtilArgument(argument->argumentIndex() + 1) && (options & SkipRemovedArguments)){ + int lengthParameter = java_function->utilArgumentIndex(argument->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=arguments.size()){ const MetaArgument *lengthParam = arguments[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -10505,8 +10655,8 @@ void CppImplGenerator::writeFunctionCallArguments(QTextStream &s, s << ")"; if(java_function->useArgumentAsArray(argument->argumentIndex() + 1) && !java_function->useArgumentAsBuffer(argument->argumentIndex() + 1)){ - if(java_function->insertArrayOffsetArgument(argument->argumentIndex() + 1) && (options & SkipRemovedArguments)){ - int lengthParameter = java_function->arrayOrBufferLengthIndex(argument->argumentIndex() + 1); + if(java_function->insertUtilArgument(argument->argumentIndex() + 1) && (options & SkipRemovedArguments)){ + int lengthParameter = java_function->utilArgumentIndex(argument->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=arguments.size()){ const MetaArgument *lengthParam = arguments[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -10608,7 +10758,7 @@ QString computeMangledTypeName(const MetaType *type){ } if(mangledTypeName=="qtjamireal") mangledTypeName = "double"; - mangledTypeName = mangledTypeName.replace("::", "_") + mangledTypeName = mangledTypeName.replace(QStringLiteral(u"::"), QStringLiteral(u"_")) .replace("<", "_lt") .replace(">", "_gt") .replace(",", "_") @@ -10874,7 +11024,7 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f isCustomized |= isCustomized1; }else{ if(checkedScope){ - for(const QString& line : scopedConvert1.split("\n")){ + for(const QString& line : scopedConvert1.split(QStringLiteral(u"\n"))){ if(!line.trimmed().isEmpty()){ s << Qt::endl; if(!line.startsWith(QLatin1Char('#'))) @@ -10884,7 +11034,7 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f } }else{ s << INDENT << "if(scope){"; - for(const QString& line : scopedConvert1.split("\n")){ + for(const QString& line : scopedConvert1.split(QStringLiteral(u"\n"))){ if(!line.trimmed().isEmpty()){ s << Qt::endl; if(!line.startsWith(QLatin1Char('#'))) @@ -10893,7 +11043,7 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f } } s << Qt::endl << INDENT << "}else{"; - for(const QString& line : scopedConvert2.split("\n")){ + for(const QString& line : scopedConvert2.split(QStringLiteral(u"\n"))){ if(!line.trimmed().isEmpty()){ s << Qt::endl; if(!line.startsWith(QLatin1Char('#'))) @@ -10933,7 +11083,7 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f s << " forceBoxedType"; } s << ")->bool{"; - for(const QString& line : nativeToJavaConverter.split("\n")){ + for(const QString& line : nativeToJavaConverter.split(QStringLiteral(u"\n"))){ if(!line.isEmpty()){ s << Qt::endl; if(!line.startsWith(QLatin1Char('#'))) @@ -10964,7 +11114,7 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f s << " forceBoxedType"; } s << ") {"; - for(const QString& line : nativeToJavaConverter.split("\n")){ + for(const QString& line : nativeToJavaConverter.split(QStringLiteral(u"\n"))){ if(!line.isEmpty()){ s << Qt::endl; if(!line.startsWith(QLatin1Char('#'))) @@ -11109,7 +11259,7 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f s << ") -> bool {"; { INDENTATION(INDENT) - for(const QString& line : javaToNativeConverter.split("\n")){ + for(const QString& line : javaToNativeConverter.split(QStringLiteral(u"\n"))){ if(!line.isEmpty()){ s << Qt::endl; if(!line.startsWith(QLatin1Char('#'))) @@ -11141,7 +11291,7 @@ void CppImplGenerator::writeTypeConversion(QTextStream &s, const MetaFunction *f s << " valueType"; } s << ") {"; - for(const QString& line : javaToNativeConverter.split("\n")){ + for(const QString& line : javaToNativeConverter.split(QStringLiteral(u"\n"))){ if(!line.isEmpty()){ s << Qt::endl; if(!line.startsWith(QLatin1Char('#'))) @@ -11194,16 +11344,13 @@ void CppImplGenerator::writeArgumentConversion(QTextStream &s, const MetaFunctio } void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, - const QMultiMap&, const QList &signalsInTargetLang, - const QList& signalNames, - const QMap>& sortedSignals, bool isInterface){ Q_UNUSED(isInterface) if (!cls) return; const ComplexTypeEntry *entry = cls->typeEntry(); - if (entry->codeGeneration() == TypeEntry::GenerateForSubclass || entry->isIterator()) + if ((entry->codeGeneration() & ~TypeEntry::InheritedByTypeSystem) == TypeEntry::GenerateForSubclass || entry->isIterator()) return; QSet forwardDeclarations; @@ -11211,7 +11358,7 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, QString code; { QTextStream s(&code); - s << "void initialize_meta_info_" << cls->typeEntry()->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "(){" << Qt::endl; + s << "void initialize_meta_info_" << cls->typeEntry()->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "(){" << Qt::endl; { INDENTATION(INDENT) @@ -11257,12 +11404,12 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, QString destructorName; if(!customDestructor.name.isEmpty() || !customLegacyConstructor.name.isEmpty()){ if(!customLegacyConstructor.name.isEmpty()){ - constructorLegacyName = "&custom_constructor_" + entry->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_"); + constructorLegacyName = "&custom_constructor_" + entry->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); }else{ constructorLegacyName = "QtMetaTypePrivate::QMetaTypeFunctionHelper<" + entry->qualifiedCppName() + ">::Construct"; } if(!customDestructor.name.isEmpty()){ - destructorName = "&custom_destructor_" + entry->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_"); + destructorName = "&custom_destructor_" + entry->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); } } if(!customCopyConstructor.name.isEmpty() @@ -11270,22 +11417,22 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, || !customDefaultConstructor.name.isEmpty() || !customDestructor.name.isEmpty()){ if(!customCopyConstructor.name.isEmpty()){ - constructorCopyName = "&custom_copy_constructor_" + entry->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_"); + constructorCopyName = "&custom_copy_constructor_" + entry->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); }else{ constructorCopyName = "QtJambiPrivate::QMetaTypeInterfaceFunctions<" + entry->qualifiedCppName() + ">::copyCtr"; } if(!customMoveConstructor.name.isEmpty()){ - constructorMoveName = "&custom_move_constructor_" + entry->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_"); + constructorMoveName = "&custom_move_constructor_" + entry->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); }else{ constructorMoveName = "QtJambiPrivate::QMetaTypeInterfaceFunctions<" + entry->qualifiedCppName() + ">::moveCtr"; } if(!customDefaultConstructor.name.isEmpty()){ - constructorDefaultName = "&custom_default_constructor_" + entry->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_"); + constructorDefaultName = "&custom_default_constructor_" + entry->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); }else{ constructorDefaultName = "QtJambiPrivate::QMetaTypeInterfaceFunctions<" + entry->qualifiedCppName() + ">::defaultCtr"; } if(!customDestructor.name.isEmpty()){ - destructorName = "&custom_destructor_" + entry->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_"); + destructorName = "&custom_destructor_" + entry->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); } } #if QT_VERSION < QT_VERSION_CHECK(6,0,0) @@ -11399,19 +11546,19 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, QString javaName = entry->lookupName(); if (!javaPackage.isEmpty()) { - javaName.prepend(javaPackage.replace(".", "/") + "/"); + javaName.prepend(javaPackage.replace(u'.', u'/') + u'/'); } bool usedTypeID = false; if (!cls->isQObject() && cls->typeEntry()->isThreadAffine()){ const ComplexTypeEntry *entry = cls->typeEntry(); QString ownerCode = entry->threadAffinity(); - if(ownerCode==QLatin1String("main") || ownerCode==QLatin1String("ui")){ + if(ownerCode==QStringLiteral(u"main") || ownerCode==QStringLiteral(u"ui")){ s << INDENT << "registerOwnerFunction(typeId, &RegistryAPI::mainThreadOwner);" << Qt::endl; }else if(ownerCode==QLatin1String("pixmap")){ s << INDENT << "registerOwnerFunction(typeId, &QtJambiAPI::getPixmapOwner);" << Qt::endl; }else{ - s << INDENT << "registerOwnerFunction(typeId, &owner_function_" << entry->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << ");" << Qt::endl; + s << INDENT << "registerOwnerFunction(typeId, &owner_function_" << entry->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << ");" << Qt::endl; } usedTypeID = true; } @@ -11433,7 +11580,7 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, digits = 1; INDENTATION(INDENT) for (int i = 0; i < virtual_functions.size(); ++i) { - s << Qt::endl << INDENT << "FunctionInfo(/* " << QString("%1").arg(QString::number(i), digits) << " */ \"" << virtual_functions.at(i)->name() << "\", \"" + s << Qt::endl << INDENT << "FunctionInfo(/* " << QStringLiteral(u"%1").arg(QString::number(i), digits) << " */ \"" << virtual_functions.at(i)->name() << "\", \"" << jni_signature(virtual_functions.at(i), JNISignatureFormat(NoModification | SlashesAndStuff)) << "\""; if(virtual_functions.at(i)->wasPrivate() && virtual_functions.at(i)->isAbstract()){ @@ -11461,7 +11608,7 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, usedTypeID = true; s << INDENT << "registerConstructorInfos(typeId, "; if(hasDestructor) - s << "&__qt_destruct_" << cls->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_"); + s << "&__qt_destruct_" << cls->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_'); else s << "nullptr"; s << ", {"; @@ -11470,6 +11617,7 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, for(const MetaFunction *function : cls->functions()) { if (function->isConstructor() && !function->isModifiedRemoved(TS::NativeCode) + && !function->isModifiedRemoved(TS::TargetLangCode) && !function->isPrivate() && !function->hasTemplateArgumentTypes()){ if (function->actualMinimumArgumentCount()==0) { @@ -11480,148 +11628,24 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, pps.removeAll(cls->typeEntry()->ppCondition()); } if(!pps.isEmpty()){ - s << Qt::endl << "#if " << pps.join(" && "); - } - QList> defaultArgumentOverloads; - if(function->arguments().isEmpty()){ - defaultArgumentOverloads << QList(); - }else{ - for(const MetaArgument *argument : function->arguments()) { - if(defaultArgumentOverloads.isEmpty()){ - if(function->argumentRemoved(argument->argumentIndex()+1)==ArgumentRemove_No - && !argument->originalDefaultValueExpression().isEmpty()){ - defaultArgumentOverloads << ( QList() << nullptr); - } - defaultArgumentOverloads << ( QList() << argument); - }else{ - if(function->argumentRemoved(argument->argumentIndex()+1)!=ArgumentRemove_No){ - if(argument->originalDefaultValueExpression().isEmpty()){ - for(int i=0; ioriginalDefaultValueExpression().isEmpty()){ - for(int i=0; i> copy; - for(int i=0; i(defaultArgumentOverloads[i]) << argument); - } - defaultArgumentOverloads[i] << nullptr; - } - defaultArgumentOverloads << copy; - } - } - } + s << Qt::endl << "#if " << pps.join(QStringLiteral(u" && ")); } - for(int i=0; i& argumentLists = m_nativeConstructorNames[function]; + for(const ArgumentList& argumentList : argumentLists){ s << Qt::endl << INDENT << " "; - if(counter>0){ + if(counter++>0){ s << ","; }else{ s << " "; } - s << "ConstructorInfo(&__qt_construct_" << cls->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "_" << counter++ << ", "; - QString args; - QTextStream s2(&args); - const QPair,QList> addedArguments = function->addedArguments(); - int argumentCounter = 1; - while(addedArguments.first.contains(argumentCounter)){ - const ArgumentModification& argumentMod = addedArguments.first[argumentCounter]; - s2 << jni_signature(annotationFreeTypeName(argumentMod.modified_type), JNISignatureFormat(NoModification | SlashesAndStuff)); - ++argumentCounter; - } - const QList& arguments = defaultArgumentOverloads[i]; - for(const MetaArgument *argument : arguments) { - if (argument && function->argumentRemoved(argument->argumentIndex()+1)==ArgumentRemove_No) { - if(function->useArgumentAsBuffer(argument->argumentIndex() + 1)){ - QScopedPointer cpy(argument->type()->copy()); - cpy->setConstant(false); - cpy->setReferenceType(MetaType::NoReference); - QList indirections = cpy->indirections(); - if(!indirections.isEmpty()){ - indirections.removeLast(); - cpy->setIndirections(indirections); - } - MetaBuilder::decideUsagePattern(cpy.get()); - QString modified_type = jni_signature(cpy.get(), JNISignatureFormat(NoModification | SlashesAndStuff)); - if(modified_type=="I"){ - s2 << "Ljava/nio/IntBuffer;"; - }else if(modified_type=="B"){ - s2 << "Ljava/nio/ByteBuffer;"; - }else if(modified_type=="C"){ - s2 << "Ljava/nio/CharBuffer;"; - }else if(modified_type=="S"){ - s2 << "Ljava/nio/ShortBuffer;"; - }else if(modified_type=="J"){ - s2 << "Ljava/nio/LongBuffer;"; - }else if(modified_type=="F"){ - s2 << "Ljava/nio/FloatBuffer;"; - }else if(modified_type=="D"){ - s2 << "Ljava/nio/DoubleBuffer;"; - }else{ - s2 << "Ljava/nio/Buffer;"; - } - }else if(function->useArgumentAsArray(argument->argumentIndex() + 1)){ - QScopedPointer cpy(argument->type()->copy()); - cpy->setConstant(false); - cpy->setReferenceType(MetaType::NoReference); - QList indirections = cpy->indirections(); - if(!indirections.isEmpty()){ - indirections.removeLast(); - cpy->setIndirections(indirections); - } - MetaBuilder::decideUsagePattern(cpy.get()); - s2 << "[" << jni_signature(cpy.get(), JNISignatureFormat(NoModification | SlashesAndStuff)); - if(function->insertArrayOffsetArgument(argument->argumentIndex() + 1)){ - int lengthParameter = function->arrayOrBufferLengthIndex(argument->argumentIndex() + 1); - if(lengthParameter>0 && lengthParameter<=arguments.size()){ - const MetaArgument *lengthParam = arguments[lengthParameter - 1]; - if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ - lengthParam = nullptr; - for(const MetaArgument *argument : arguments) { - if(argument && argument->argumentIndex()+1==lengthParameter){ - lengthParam = argument; - } - } - } - if(lengthParam && function->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ - QString modified_type = function->typeReplaced(lengthParam->argumentIndex() + 1); - if (modified_type.isEmpty()) - s2 << jni_signature(lengthParam->type(), JNISignatureFormat(NoModification | SlashesAndStuff)); - else - s2 << jni_signature(annotationFreeTypeName(modified_type), JNISignatureFormat(NoModification | SlashesAndStuff)); - } - } - } - }else{ - QString modified_type = function->typeReplaced(argument->argumentIndex() + 1); - if (modified_type.isEmpty()) - s2 << jni_signature(argument->type(), JNISignatureFormat(NoModification | SlashesAndStuff)); - else - s2 << jni_signature(annotationFreeTypeName(modified_type), JNISignatureFormat(NoModification | SlashesAndStuff)); - } - } - ++argumentCounter; - while(addedArguments.first.contains(argumentCounter)){ - const ArgumentModification& argumentMod = addedArguments.first[argumentCounter]; - s2 << jni_signature(annotationFreeTypeName(argumentMod.modified_type), JNISignatureFormat(NoModification | SlashesAndStuff)); - ++argumentCounter; - } - } - for(const ArgumentModification& mod : addedArguments.second){ - s2 << jni_signature(annotationFreeTypeName(mod.modified_type), JNISignatureFormat(NoModification | SlashesAndStuff)); - } - if(args.isEmpty()) + s << "ConstructorInfo(&__qt_construct_" << cls->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << argumentList.marshalledArguments << ", "; + if(argumentList.jniSignature.isEmpty()) s << "nullptr)"; else - s << "\"" << args << "\")"; + s << "\"" << argumentList.jniSignature << "\")"; } if(!pps.isEmpty()){ - s << Qt::endl << "#endif // " << pps.join(" && "); + s << Qt::endl << "#endif // " << pps.join(QStringLiteral(u" && ")); } } } @@ -11631,16 +11655,16 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, pps.removeAll(cls->typeEntry()->ppCondition()); } if(!pps.isEmpty()){ - s << Qt::endl << "#if " << pps.join(" && "); + s << Qt::endl << "#if " << pps.join(QStringLiteral(u" && ")); } s << Qt::endl << INDENT << " "; if(counter>0) s << ","; else s << " "; - s << "ConstructorInfo(&__qt_construct_" << cls->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "_declarative, \"Lio/qt/core/QObject$QDeclarativeConstructor;\")"; + s << "ConstructorInfo(&__qt_construct_" << cls->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "_declarative, \"Lio/qt/core/QObject$QDeclarativeConstructor;\")"; if(!pps.isEmpty()){ - s << Qt::endl << "#endif // " << pps.join(" && ") << Qt::endl; + s << Qt::endl << "#endif // " << pps.join(QStringLiteral(u" && ")) << Qt::endl; } } s << Qt::endl << INDENT << "});" << Qt::endl; @@ -11658,22 +11682,23 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, if(signal->originalName()!=signal->name()){ QStringList pps = getFunctionPPConditions(signal); if(!signal->declaringClass()->typeEntry()->ppCondition().isEmpty() && !pps.contains(signal->declaringClass()->typeEntry()->ppCondition())){ - if(pps.isEmpty() || !signal->declaringClass()->typeEntry()->ppCondition().contains("|")) + if(pps.isEmpty() || !signal->declaringClass()->typeEntry()->ppCondition().contains(QStringLiteral(u"|"))) pps << signal->declaringClass()->typeEntry()->ppCondition(); else pps << "(" + signal->declaringClass()->typeEntry()->ppCondition() + ")"; } pps.removeAll(cls->typeEntry()->ppCondition()); if(!pps.isEmpty()) - s << "#if " << pps.join(" && ") << Qt::endl; - s << "if(methodIndex==__signal_method_indexes_" << cls->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "_" << i << "()){ // " << signal->signature() << Qt::endl + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; + s << "if(methodIndex==__signal_method_indexes_" << cls->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "_" << i << "()){ // " << signal->signature() << Qt::endl << " return \"" << signal->name() << "\";" << Qt::endl << "}"<< Qt::endl; if(!pps.isEmpty()) - s << "#endif //" << pps.join(" && ") << Qt::endl; + s << "#endif //" << pps.join(QStringLiteral(u" && ")) << Qt::endl; } } - for(const MetaFunction *function : cls->functionsInTargetLang()) { + const auto functionsInTargetLang = cls->functionsInTargetLang(); + for(const MetaFunction *function : functionsInTargetLang) { if((function->isSlot() || function->isInvokable()) && !function->isSignal()){ if(function->originalName()!=function->name()){ QStringList pps = getFunctionPPConditions(function); @@ -11685,20 +11710,21 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, } pps.removeAll(cls->typeEntry()->ppCondition()); if(!pps.isEmpty()) - s << "#if " << pps.join(" && ") << Qt::endl; + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; s << "if(methodIndex==" << qtName << "::staticMetaObject.indexOfMethod(\"" << QMetaObject::normalizedSignature(qPrintable(function->signature(true))) << "\")){" << Qt::endl << " return \"" << function->name() << "\";" << Qt::endl << "}" << Qt::endl; if(!pps.isEmpty()) - s << "#endif //" << pps.join(" && ") << Qt::endl; + s << "#endif //" << pps.join(QStringLiteral(u" && ")) << Qt::endl; } } } } const ObjectTypeEntry *oentry = entry->isQObject() ? static_cast(entry) : nullptr; bool hasInvokables = false; - for(const MetaFunction *function : cls->functionsInTargetLang()) { + const auto functionsInTargetLang = cls->functionsInTargetLang(); + for(const MetaFunction *function : functionsInTargetLang) { if((function->isSlot() || function->isInvokable()) && !function->isSignal()){ hasInvokables = true; break; @@ -11722,6 +11748,16 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, INDENTATION(INDENT) s << INDENT << "{"; int signalCounter = 0; + + + QList signalNames; + QMap> sortedSignals; + for(const MetaFunction *function : signalsInTargetLang){ + QString key = function->declaringClass()->typeEntry()->qualifiedCppName() + "::" + function->name(); + if(!signalNames.contains(key)) + signalNames.append(key); + sortedSignals[key].append(function); + } for(const QString& key : signalNames){ const QList& list = sortedSignals[key]; for (int i = 0; i < list.size(); ++i) { @@ -11741,7 +11777,7 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, }else{ signalSignature = "Lio/qt/core/QObject$Signal" + QString::number(arguments.size()); int defaultCounter = 0; - for (MetaArgument* arg : arguments) { + for (MetaArgument* arg : qAsConst(arguments)) { if(!arg->defaultValueExpression().isEmpty()){ defaultCounter++; } @@ -11766,7 +11802,7 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, INDENTATION(INDENT) s << Qt::endl << INDENT << "SignalMetaInfo(/* " << QString("%1").arg(QString::number(signalCounter), digits) << " */ \"" << f->name() << "\", \"" - << signalSignature << "\", " << arguments.size() << ", __signal_method_indexes_" << cls->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "_" << signalsInTargetLang.indexOf(f) << ")"; + << signalSignature << "\", " << arguments.size() << ", __signal_method_indexes_" << cls->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "_" << signalsInTargetLang.indexOf(f) << ")"; } signalCounter++; } @@ -11798,8 +11834,8 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, } pps.removeAll(cls->typeEntry()->ppCondition()); if(!pps.isEmpty()) - s << "#if " << pps.join(" && ") << Qt::endl; - s << INDENT << "if(methodIndex==__signal_method_indexes_" << cls->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << "_" << i << "()){ // " << signal->signature() << Qt::endl; + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; + s << INDENT << "if(methodIndex==__signal_method_indexes_" << cls->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "_" << i << "()){ // " << signal->signature() << Qt::endl; { INDENTATION(INDENT) writeArgumentConversion(s, signal, converterFunctions, forwardDeclarations); @@ -11807,7 +11843,7 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, } s << INDENT << "}" << Qt::endl; if(!pps.isEmpty()) - s << "#endif //" << pps.join(" && ") << Qt::endl; + s << "#endif //" << pps.join(QStringLiteral(u" && ")) << Qt::endl; } for(const MetaFunction *function : cls->functionsInTargetLang()) { if((function->isSlot() || function->isInvokable()) && !function->isSignal()){ @@ -11820,7 +11856,7 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, } pps.removeAll(cls->typeEntry()->ppCondition()); if(!pps.isEmpty()) - s << "#if " << pps.join(" && ") << Qt::endl; + s << "#if " << pps.join(QStringLiteral(u" && ")) << Qt::endl; s << INDENT << "if(methodIndex==" << qtName << "::staticMetaObject.indexOfMethod(\""; s << QMetaObject::normalizedSignature(qPrintable(function->signature(true))) << "\")){" << Qt::endl; { @@ -11830,7 +11866,7 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, } s << INDENT << "}" << Qt::endl; if(!pps.isEmpty()) - s << "#endif //" << pps.join(" && ") << Qt::endl; + s << "#endif //" << pps.join(QStringLiteral(u" && ")) << Qt::endl; } } s << INDENT << "return false;" << Qt::endl; @@ -11846,7 +11882,7 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, s << INDENT << "[](int methodIndex) -> const char* {" << Qt::endl; { INDENTATION(INDENT) - for(const QString& line : renamedMethods.split("\n")){ + for(const QString& line : renamedMethods.split(QStringLiteral(u"\n"))){ if(!line.startsWith("#")) s << INDENT; s << line << Qt::endl; @@ -11868,7 +11904,7 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, s << INDENT << "[](int methodIndex) -> const char* {" << Qt::endl; { INDENTATION(INDENT) - for(const QString& line : renamedMethods.split("\n")){ + for(const QString& line : renamedMethods.split(QStringLiteral(u"\n"))){ if(!line.startsWith("#")) s << INDENT; s << line << Qt::endl; @@ -11889,7 +11925,7 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, s << "// BEGIN: type registration" << Qt::endl; if (hasDeleter(cls)){ usedTypeID = true; - s << INDENT << "registerDeleter(typeId, &deleter_" << entry->qualifiedCppName().replace("::", "_").replace("<", "_").replace(">", "_") << ");" << Qt::endl; + s << INDENT << "registerDeleter(typeId, &deleter_" << entry->qualifiedCppName().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << ");" << Qt::endl; } if(!metaTypeRegistration.isEmpty()){ s << metaTypeRegistration; @@ -11900,9 +11936,9 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, } QSet registeredTypes; - registeredTypes << QLatin1String("QMap"); - registeredTypes << QLatin1String("QHash"); - registeredTypes << QLatin1String("QList"); + registeredTypes << QStringLiteral(u"QMap"); + registeredTypes << QStringLiteral(u"QHash"); + registeredTypes << QStringLiteral(u"QList"); for(const MetaFunction *function : cls->functions()) { if(function->declaringClass()==cls){ if(function->isSlot() || function->isInvokable() || function->isSignal()){ @@ -11944,12 +11980,12 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, switch(ctype->type()){ case ContainerTypeEntry::StackContainer: if(QT_VERSION_CHECK(m_qtVersionMajor,m_qtVersionMinor,m_qtVersionPatch) < QT_VERSION_CHECK(6, 0, 0)){ - accessName = "QVector"; + accessName = QStringLiteral(u"QVector"); break; } Q_FALLTHROUGH(); case ContainerTypeEntry::QueueContainer: - accessName = "QList"; + accessName = QStringLiteral(u"QList"); break; default: break; } @@ -11983,14 +12019,14 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, if(type->typeEntry()->isContainer()){ const ContainerTypeEntry* ctype = reinterpret_cast(type->typeEntry()); static const QHash> containerTypes{ - {ContainerTypeEntry::ListContainer,{1,"QList"}}, - {ContainerTypeEntry::LinkedListContainer,{1,"QLinkedList"}}, - {ContainerTypeEntry::SetContainer,{1,"QSet"}}, - {ContainerTypeEntry::VectorContainer,{1,"QVector"}}, - {ContainerTypeEntry::MapContainer,{2,"QMap"}}, - {ContainerTypeEntry::HashContainer,{2,"QHash"}}, - {ContainerTypeEntry::MultiMapContainer,{2,"QMultiMap"}}, - {ContainerTypeEntry::MultiHashContainer,{2,"QMultiHash"}} + {ContainerTypeEntry::ListContainer,{1,QStringLiteral(u"QList")}}, + {ContainerTypeEntry::LinkedListContainer,{1,QStringLiteral(u"QLinkedList")}}, + {ContainerTypeEntry::SetContainer,{1,QStringLiteral(u"QSet")}}, + {ContainerTypeEntry::VectorContainer,{1,QStringLiteral(u"QVector")}}, + {ContainerTypeEntry::MapContainer,{2,QStringLiteral(u"QMap")}}, + {ContainerTypeEntry::HashContainer,{2,QStringLiteral(u"QHash")}}, + {ContainerTypeEntry::MultiMapContainer,{2,QStringLiteral(u"QMultiMap")}}, + {ContainerTypeEntry::MultiHashContainer,{2,QStringLiteral(u"QMultiHash")}} }; if(containerTypes.contains(ctype->type())){ const QPair& data = containerTypes[ctype->type()]; @@ -12219,13 +12255,13 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, s << Qt::endl << "// BEGIN: enums and flags" << Qt::endl; for(MetaEnum *cpp_enum : cls->enums()){ - writeMetaInfo(s, cls, cpp_enum, cls->isPublic()); + writeMetaInfo(s, cpp_enum); } if(entry->designatedInterface()){ for(MetaClass* interface : cls->interfaces()){ if(entry->designatedInterface()==interface->typeEntry()){ for(MetaEnum *cpp_enum : interface->enums()){ - writeMetaInfo(s, interface, cpp_enum, interface->isPublic()); + writeMetaInfo(s, cpp_enum); } break; } @@ -12263,13 +12299,14 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *cls, s << code; } -void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *owner, const MetaEnum *enm, bool ownerIsPublic){ +void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaEnum *enm){ if (!enm) return; const EnumTypeEntry *entry = enm->typeEntry(); - if (entry->codeGeneration() == TypeEntry::GenerateForSubclass) + if ((entry->codeGeneration() & ~TypeEntry::InheritedByTypeSystem) == TypeEntry::GenerateForSubclass) return; - if(enm->enclosingClass()!=owner) + const MetaClass *owner = enm->enclosingClass(); + if(!owner) return; const QString qtEnumName = entry->qualifiedCppName(); @@ -12291,11 +12328,11 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaClass *owner, con if(!enm->typeEntry()->ppCondition().isEmpty()){ s << Qt::endl << "#if " << enm->typeEntry()->ppCondition() << Qt::endl; } - if(enm->isProtected() || !ownerIsPublic){ + if(enm->isProtected() || !owner->isPublic()){ if(owner->typeEntry()->designatedInterface()){ - s << INDENT << owner->extractInterface()->name() << "_access::__registerEnumTypeInfo_" << enm->name().replace("::", "_").replace("<", "_").replace(">", "_") << "();" << Qt::endl; + s << INDENT << owner->extractInterface()->name() << "_access::__registerEnumTypeInfo_" << enm->name().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "();" << Qt::endl; }else{ - s << INDENT << owner->name() << "_access::__registerEnumTypeInfo_" << enm->name().replace("::", "_").replace("<", "_").replace(">", "_") << "();" << Qt::endl; + s << INDENT << owner->name() << "_access::__registerEnumTypeInfo_" << enm->name().replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "();" << Qt::endl; } }else{ if(const FlagsTypeEntry * fentry = entry->flags()){ @@ -12344,7 +12381,7 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaFunctional *funct javaName = javaName.replace(".", "/"); return javaName; }(); - s << "void initialize_meta_info_" << QString(functional->typeEntry()->name()).replace("::", "_").replace("<", "_").replace(">", "_") << "(){" << Qt::endl; + s << "void initialize_meta_info_" << QString(functional->typeEntry()->name()).replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "(){" << Qt::endl; { INDENTATION(INDENT) s << INDENT << "using namespace RegistryAPI;" << Qt::endl; @@ -12352,18 +12389,24 @@ void CppImplGenerator::writeMetaInfo(QTextStream &s, const MetaFunctional *funct s << Qt::endl << "#if " << functional->typeEntry()->ppCondition() << Qt::endl << Qt::endl; } writeCodeInjections(s, functional->typeEntry(), CodeSnip::Beginning, TS::MetaInfo); + QString registeredName; + if(functional->typeEntry()->getUsing().isEmpty()){ + registeredName = functional->typeEntry()->normalizedSignature(); + }else{ + registeredName = functional->typeEntry()->name(); + } if(functional->typeEntry()->codeGeneration() & TypeEntry::GenerateNoShell){ - s << INDENT << "const char* qt_name = \"" << functional->typeEntry()->normalizedSignature() << "\";" << Qt::endl + s << INDENT << "const char* qt_name = \"" << registeredName << "\";" << Qt::endl << INDENT << "const std::type_info& id = typeid(" << qtName << ");" << Qt::endl << INDENT << "registerFunctionalTypeInfo(id, QtJambiTypeInfo::of<" << qtName << ">(), qt_name, \"" << javaName << "\");" << Qt::endl << INDENT << "registerSizeOfType(id, sizeof(" << qtName << "));" << Qt::endl << INDENT << "registerAlignmentOfType(id, Q_ALIGNOF(" << qtName << "));" << Qt::endl << INDENT << "registerMetaTypeID(id, qRegisterMetaType<" << qtName << ">(qt_name));" << Qt::endl; }else{ - s << INDENT << "registerFunctionalTypeInfo<" << qtName << ", " << shellClassName(functional) << ">(\"" << functional->typeEntry()->normalizedSignature() << "\", \"" << javaName << "\"," << Qt::endl - << INDENT << " &deleter_" << QString(functional->typeEntry()->name()).replace("::", "_").replace("<", "_").replace(">", "_") << "," << Qt::endl - << INDENT << " &__qt_destruct_" << QString(functional->typeEntry()->name()).replace("::", "_").replace("<", "_").replace(">", "_") << "," << Qt::endl - << INDENT << " {ConstructorInfo(&__qt_construct_" << QString(functional->typeEntry()->name()).replace("::", "_").replace("<", "_").replace(">", "_") << "_0, nullptr)}," << Qt::endl + s << INDENT << "registerFunctionalTypeInfo<" << qtName << ", " << shellClassName(functional) << ">(\"" << registeredName << "\", \"" << javaName << "\"," << Qt::endl + << INDENT << " &deleter_" << QString(functional->typeEntry()->name()).replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "," << Qt::endl + << INDENT << " &__qt_destruct_" << QString(functional->typeEntry()->name()).replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << "," << Qt::endl + << INDENT << " {ConstructorInfo(&__qt_construct_" << QString(functional->typeEntry()->name()).replace(QStringLiteral(u"::"), QStringLiteral(u"_")).replace(u'$', u'_').replace(u'>', u'_').replace(u'<', u'_') << ", nullptr)}," << Qt::endl << INDENT << " {FunctionInfo(\"" << (functional->typeEntry()->functionName().isEmpty() ? QString("call") : functional->typeEntry()->functionName()) << "\", \"" << jni_signature(functional, JNISignatureFormat(NoModification | SlashesAndStuff)) << "\", FunctionInfo::Abstract)});" << Qt::endl; diff --git a/src/cpp/QtJambiGenerator/cppimplgenerator.h b/src/cpp/QtJambiGenerator/cppimplgenerator.h index 48458fff..8caee527 100644 --- a/src/cpp/QtJambiGenerator/cppimplgenerator.h +++ b/src/cpp/QtJambiGenerator/cppimplgenerator.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -100,12 +100,9 @@ class CppImplGenerator : public CppGenerator { void writeArgumentConversion(QTextStream &s, const MetaFunction *signal, QStringList& converterFunctions, QSet &forwardDeclarations); void writeTypeConversion(QTextStream &s, const MetaFunction *function, MetaType *type, int index, const QString& metaTypeId, QStringList& converterFunctions, QSet &forwardDeclarations); void writeMetaInfo(QTextStream &s, const MetaClass *java_class, - const QMultiMap& availabeConstructors, const QList& signalsInTargetLang, - const QList& signalNames, - const QMap>& sortedSignals, bool isInterface); - void writeMetaInfo(QTextStream &s, const MetaClass *owner, const MetaEnum *java_class, bool ownerIsPublic); + void writeMetaInfo(QTextStream &s, const MetaEnum *java_enum); void writeMetaInfo(QTextStream &s, const MetaFunctional *java_class); void writeShellFunction(QTextStream &s, const MetaFunction *java_function, const MetaClass *implementor, int pos); @@ -130,7 +127,7 @@ class CppImplGenerator : public CppGenerator { void writeFunctionCallArguments(QTextStream &s, const MetaFunction *java_function, const QString &prefix = QString(), Option option = NoOption); void writeFunctionCallArguments(QTextStream &s, const MetaFunction *java_function, - const QList& arguments, + const QList& arguments, const QString &prefix = QString(), Option option = NoOption); void writeFunctionCallArguments(QTextStream &s, const MetaFunctional *java_function, const QString &prefix = QString(), Option option = NoOption); @@ -152,14 +149,14 @@ class CppImplGenerator : public CppGenerator { void writeConstructor(QTextStream &s, const MetaFunction *java_function, - const QList& arguments, - const MetaClass *java_class, int counter); + const QList& arguments, + const MetaClass *java_class, bool isDeclarative); void writeFinalFunction(QTextStream &s, const MetaFunction *java_function, const MetaClass *java_class); void writeFinalConstructor(QTextStream &s, const MetaFunction *java_function, - const MetaClass *java_class, const QHash& constructorIndexes = QHash()); + const MetaClass *java_class); void writeFinalFunctionArguments(QTextStream &s, const MetaFunction *java_function, const QString &java_object_name) const; @@ -251,11 +248,18 @@ class CppImplGenerator : public CppGenerator { bool shouldGenerate(const MetaClass *java_class) const override; QString default_return_statement_qt(const MetaType *java_type, AbstractGenerator::Option options = AbstractGenerator::NoOption); void setContainerBaseClasses(const QMap>>& containerBaseClasses); + void writeReferenceCount(QTextStream &s, const ReferenceCount &refCount, const MetaArgument* argument, int argumentIndex, const MetaFunction *java_function, const QString &__jni_env = "__jni_env", const QString &thisName = QLatin1String("__jni_object")); private: - QByteArray callXxxMethod(const QString &name) const; - QByteArray callXxxMethod(const MetaType *java_type) const; + QString callXxxMethod(const QString &name) const; + QString callXxxMethod(const MetaType *java_type) const; QMap> nativeToJavaConverterInfos; QMap> javaToNativeConverterInfos; + struct ArgumentList{ + QList arguments; + QString marshalledArguments; + QString jniSignature; + }; + QHash> m_nativeConstructorNames; }; #endif // CPPIMPLGENERATOR_H diff --git a/src/cpp/QtJambiGenerator/debuglog.h b/src/cpp/QtJambiGenerator/debuglog.h index 3563c607..ff61d660 100644 --- a/src/cpp/QtJambiGenerator/debuglog.h +++ b/src/cpp/QtJambiGenerator/debuglog.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef DEBUGLOG_H_ #define DEBUGLOG_H_ diff --git a/src/cpp/QtJambiGenerator/docindex/docclass.cpp b/src/cpp/QtJambiGenerator/docindex/docclass.cpp index 4cdc91f1..37b32db8 100644 --- a/src/cpp/QtJambiGenerator/docindex/docclass.cpp +++ b/src/cpp/QtJambiGenerator/docindex/docclass.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "docclass.h" DocClass::DocClass(QObject* parent):DocElement(parent), diff --git a/src/cpp/QtJambiGenerator/docindex/docclass.h b/src/cpp/QtJambiGenerator/docindex/docclass.h index 19fb612a..51d228b6 100644 --- a/src/cpp/QtJambiGenerator/docindex/docclass.h +++ b/src/cpp/QtJambiGenerator/docindex/docclass.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef DOCCLASS_H #define DOCCLASS_H diff --git a/src/cpp/QtJambiGenerator/docindex/docelement.cpp b/src/cpp/QtJambiGenerator/docindex/docelement.cpp index 71ac6f07..221ba9b5 100644 --- a/src/cpp/QtJambiGenerator/docindex/docelement.cpp +++ b/src/cpp/QtJambiGenerator/docindex/docelement.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "docelement.h" DocElement::DocElement(QObject* parent) diff --git a/src/cpp/QtJambiGenerator/docindex/docelement.h b/src/cpp/QtJambiGenerator/docindex/docelement.h index 64256b3b..e76d8901 100644 --- a/src/cpp/QtJambiGenerator/docindex/docelement.h +++ b/src/cpp/QtJambiGenerator/docindex/docelement.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef DOCELEMENT_H #define DOCELEMENT_H diff --git a/src/cpp/QtJambiGenerator/docindex/docenum.cpp b/src/cpp/QtJambiGenerator/docindex/docenum.cpp index 8131b6b0..9d0d7bb1 100644 --- a/src/cpp/QtJambiGenerator/docindex/docenum.cpp +++ b/src/cpp/QtJambiGenerator/docindex/docenum.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "docenum.h" DocEnum::DocEnum(QObject* parent):DocElement(parent) diff --git a/src/cpp/QtJambiGenerator/docindex/docenum.h b/src/cpp/QtJambiGenerator/docindex/docenum.h index 261f72bf..f458f623 100644 --- a/src/cpp/QtJambiGenerator/docindex/docenum.h +++ b/src/cpp/QtJambiGenerator/docindex/docenum.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef DOCENUM_H #define DOCENUM_H diff --git a/src/cpp/QtJambiGenerator/docindex/docfunction.cpp b/src/cpp/QtJambiGenerator/docindex/docfunction.cpp index 6e782e26..782a8abf 100644 --- a/src/cpp/QtJambiGenerator/docindex/docfunction.cpp +++ b/src/cpp/QtJambiGenerator/docindex/docfunction.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "docfunction.h" DocFunction::DocFunction(QObject* parent):DocElement(parent) diff --git a/src/cpp/QtJambiGenerator/docindex/docfunction.h b/src/cpp/QtJambiGenerator/docindex/docfunction.h index 8f5a745a..1f921f69 100644 --- a/src/cpp/QtJambiGenerator/docindex/docfunction.h +++ b/src/cpp/QtJambiGenerator/docindex/docfunction.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef DOCFUNCTION_H #define DOCFUNCTION_H diff --git a/src/cpp/QtJambiGenerator/docindex/docindexreader.cpp b/src/cpp/QtJambiGenerator/docindex/docindexreader.cpp index 18918c50..1d3d5f42 100644 --- a/src/cpp/QtJambiGenerator/docindex/docindexreader.cpp +++ b/src/cpp/QtJambiGenerator/docindex/docindexreader.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "docindexreader.h" #include "docmodel.h" #include "docclass.h" diff --git a/src/cpp/QtJambiGenerator/docindex/docindexreader.h b/src/cpp/QtJambiGenerator/docindex/docindexreader.h index 2d1ade3a..7e31d610 100644 --- a/src/cpp/QtJambiGenerator/docindex/docindexreader.h +++ b/src/cpp/QtJambiGenerator/docindex/docindexreader.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef DOCINDEXREADER_H #define DOCINDEXREADER_H diff --git a/src/cpp/QtJambiGenerator/docindex/docmodel.cpp b/src/cpp/QtJambiGenerator/docindex/docmodel.cpp index d5988653..f13b55e0 100644 --- a/src/cpp/QtJambiGenerator/docindex/docmodel.cpp +++ b/src/cpp/QtJambiGenerator/docindex/docmodel.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "docmodel.h" DocModel::DocModel(): QObject(), diff --git a/src/cpp/QtJambiGenerator/docindex/docmodel.h b/src/cpp/QtJambiGenerator/docindex/docmodel.h index f53be1c0..f246abb0 100644 --- a/src/cpp/QtJambiGenerator/docindex/docmodel.h +++ b/src/cpp/QtJambiGenerator/docindex/docmodel.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef QDOCMODEL_H #define QDOCMODEL_H diff --git a/src/cpp/QtJambiGenerator/docindex/docnamespace.cpp b/src/cpp/QtJambiGenerator/docindex/docnamespace.cpp index 9027250d..14a86784 100644 --- a/src/cpp/QtJambiGenerator/docindex/docnamespace.cpp +++ b/src/cpp/QtJambiGenerator/docindex/docnamespace.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "docnamespace.h" DocNamespace::DocNamespace(QObject* parent): diff --git a/src/cpp/QtJambiGenerator/docindex/docnamespace.h b/src/cpp/QtJambiGenerator/docindex/docnamespace.h index 05d6e11f..eae135b4 100644 --- a/src/cpp/QtJambiGenerator/docindex/docnamespace.h +++ b/src/cpp/QtJambiGenerator/docindex/docnamespace.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef DOCNAMESPACE_H #define DOCNAMESPACE_H diff --git a/src/cpp/QtJambiGenerator/docindex/docproperty.cpp b/src/cpp/QtJambiGenerator/docindex/docproperty.cpp index a410776b..6422cc7f 100644 --- a/src/cpp/QtJambiGenerator/docindex/docproperty.cpp +++ b/src/cpp/QtJambiGenerator/docindex/docproperty.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "docproperty.h" DocProperty::DocProperty(QObject* parent) : DocElement(parent) diff --git a/src/cpp/QtJambiGenerator/docindex/docproperty.h b/src/cpp/QtJambiGenerator/docindex/docproperty.h index def3724b..dc80b527 100644 --- a/src/cpp/QtJambiGenerator/docindex/docproperty.h +++ b/src/cpp/QtJambiGenerator/docindex/docproperty.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef DOCPROPERTY_H #define DOCPROPERTY_H diff --git a/src/cpp/QtJambiGenerator/docindex/doctypedef.cpp b/src/cpp/QtJambiGenerator/docindex/doctypedef.cpp index 6d8b1dda..9400eb6a 100644 --- a/src/cpp/QtJambiGenerator/docindex/doctypedef.cpp +++ b/src/cpp/QtJambiGenerator/docindex/doctypedef.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "doctypedef.h" DocTypeDef::DocTypeDef(QObject* parent) : DocElement(parent) diff --git a/src/cpp/QtJambiGenerator/docindex/doctypedef.h b/src/cpp/QtJambiGenerator/docindex/doctypedef.h index 305469ce..474db962 100644 --- a/src/cpp/QtJambiGenerator/docindex/doctypedef.h +++ b/src/cpp/QtJambiGenerator/docindex/doctypedef.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef DOCTYPEDEF_H #define DOCTYPEDEF_H diff --git a/src/cpp/QtJambiGenerator/docindex/docvariable.cpp b/src/cpp/QtJambiGenerator/docindex/docvariable.cpp index 1c2990a9..b1881e63 100644 --- a/src/cpp/QtJambiGenerator/docindex/docvariable.cpp +++ b/src/cpp/QtJambiGenerator/docindex/docvariable.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "docvariable.h" DocVariable::DocVariable(QObject* parent) : DocElement(parent), m_static(false) diff --git a/src/cpp/QtJambiGenerator/docindex/docvariable.h b/src/cpp/QtJambiGenerator/docindex/docvariable.h index 290d28c0..2589d784 100644 --- a/src/cpp/QtJambiGenerator/docindex/docvariable.h +++ b/src/cpp/QtJambiGenerator/docindex/docvariable.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef DOCVARIABLE_H #define DOCVARIABLE_H diff --git a/src/cpp/QtJambiGenerator/executable.pro b/src/cpp/QtJambiGenerator/executable.pro index 2167855c..289bfde1 100644 --- a/src/cpp/QtJambiGenerator/executable.pro +++ b/src/cpp/QtJambiGenerator/executable.pro @@ -1,4 +1,34 @@ -# Input +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + TEMPLATE = app TARGET = QtJambiGenerator CONFIG += console @@ -73,5 +103,7 @@ mac:{ } else { LIBS += -L../lib LIBS += -l$$QTJAMBI_LIB_NAME - linux-g++*: QMAKE_RPATHDIR = $ORIGIN/../lib + linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc*:{ + QMAKE_RPATHDIR = $ORIGIN/../lib + } } diff --git a/src/cpp/QtJambiGenerator/generator.cpp b/src/cpp/QtJambiGenerator/generator.cpp index 7b626902..4f33421f 100644 --- a/src/cpp/QtJambiGenerator/generator.cpp +++ b/src/cpp/QtJambiGenerator/generator.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -64,6 +64,10 @@ #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) +#define qAsConst std::as_const +#endif + Q_DECL_EXPORT int execute_generator(int argc, char *argv[]) { GeneratorApplication app(argc, argv); app.parseArguments(); diff --git a/src/cpp/QtJambiGenerator/generator.h b/src/cpp/QtJambiGenerator/generator.h index 60035ecf..0a71a74c 100644 --- a/src/cpp/QtJambiGenerator/generator.h +++ b/src/cpp/QtJambiGenerator/generator.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/javagenerator.cpp b/src/cpp/QtJambiGenerator/javagenerator.cpp index d387ce91..fddc8e32 100644 --- a/src/cpp/QtJambiGenerator/javagenerator.cpp +++ b/src/cpp/QtJambiGenerator/javagenerator.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -47,6 +47,10 @@ #include "typesystem/typedatabase.h" #include "bufferedoutputstream.h" +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) +#define qAsConst std::as_const +#endif + static Indentor INDENT; void JavaGenerator::printExtraCode(QStringList& lines, QTextStream &s, bool addFreeLine){ @@ -104,7 +108,7 @@ void JavaGenerator::printExtraCode(QStringList& lines, QTextStream &s, bool addF QString findComparableType(const MetaClass *cls){ QString comparableType; - MetaFunctionList geltFunctions = MetaFunctionList() + const MetaFunctionList geltFunctions = MetaFunctionList() << cls->greaterThanFunctions() << cls->greaterThanEqFunctions() << cls->lessThanFunctions() @@ -118,62 +122,62 @@ QString findComparableType(const MetaClass *cls){ if (type.isEmpty()){ type = arg->type()->typeEntry()->qualifiedTargetLangName(); if(arg->type()->typeEntry()->isContainer()){ - if(type=="java.util.List" - || type=="java.util.LinkedList" - || type=="java.util.Queue" - || type=="java.util.Deque" - || type=="java.util.ArrayList" - || type=="java.util.Vector" - || type=="java.util.Set" - || type=="io.qt.core.QSet" - || type=="io.qt.core.QList" - || type=="io.qt.core.QQueue" - || type=="io.qt.core.QVector" - || type=="io.qt.core.QStack" - || type=="io.qt.core.QLinkedList") { - type = "java.util.Collection"; - }else if(type=="java.util.Map" - || type=="java.util.SortedMap" - || type=="java.util.NavigableMap" - || type=="java.util.HashMap" - || type=="java.util.TreeMap" - || type=="io.qt.core.QMap" - || type=="io.qt.core.QHash" - || type=="io.qt.core.QMultiMap" - || type=="io.qt.core.QMultiHash"){ - type = "java.util.Map"; + if(type==QStringLiteral(u"java.util.List") + || type==QStringLiteral(u"java.util.LinkedList") + || type==QStringLiteral(u"java.util.Queue") + || type==QStringLiteral(u"java.util.Deque") + || type==QStringLiteral(u"java.util.ArrayList") + || type==QStringLiteral(u"java.util.Vector") + || type==QStringLiteral(u"java.util.Set") + || type==QStringLiteral(u"io.qt.core.QSet") + || type==QStringLiteral(u"io.qt.core.QList") + || type==QStringLiteral(u"io.qt.core.QQueue") + || type==QStringLiteral(u"io.qt.core.QVector") + || type==QStringLiteral(u"io.qt.core.QStack") + || type==QStringLiteral(u"io.qt.core.QLinkedList")) { + type = QStringLiteral(u"java.util.Collection"); + }else if(type==QStringLiteral(u"java.util.Map") + || type==QStringLiteral(u"java.util.SortedMap") + || type==QStringLiteral(u"java.util.NavigableMap") + || type==QStringLiteral(u"java.util.HashMap") + || type==QStringLiteral(u"java.util.TreeMap") + || type==QStringLiteral(u"io.qt.core.QMap") + || type==QStringLiteral(u"io.qt.core.QHash") + || type==QStringLiteral(u"io.qt.core.QMultiMap") + || type==QStringLiteral(u"io.qt.core.QMultiHash")){ + type = QStringLiteral(u"java.util.Map"); } } if(arg->type()->instantiations().size()>0){ - type += "<"; + type += u"<"; for(int i=0; itype()->instantiations().size(); i++){ if(i==0) - type += "?"; + type += u"?"; else - type += ",?"; + type += u",?"; } - type += ">"; + type += u">"; } } - type.replace('$', '.'); + type.replace(u'$', u'.'); if(comparableType.isEmpty()){ comparableType = type; }else if(comparableType!=type){ - comparableType = "Object"; + comparableType = QStringLiteral(u"Object"); break; } } if(comparableType.isEmpty()){ comparableType = cls->typeEntry()->qualifiedTargetLangName(); } - auto idx = comparableType.indexOf('<'); + auto idx = comparableType.indexOf(u'<'); QString package; QString typeName = comparableType; if(idx>0){ typeName = comparableType.mid(0, idx); } - idx = typeName.lastIndexOf('.'); - QString ann = QStringLiteral("@StrictNonNull "); + idx = typeName.lastIndexOf(u'.'); + QString ann = QStringLiteral(u"@StrictNonNull "); if(idx>0){ typeName = comparableType.mid(idx+1); package = comparableType.mid(0, idx+1); @@ -187,7 +191,7 @@ QString findComparableType(const MetaClass *cls){ JavaGenerator::JavaGenerator(TS::TypeDatabase* database, bool nullness, bool noKotlinDelegates) : m_database(database), m_noKotlinDelegates(noKotlinDelegates), m_nullness(nullness) {} QString JavaGenerator::fileNameForClass(const MetaClass *java_class) const { - return QString("%1.java").arg(java_class->name()); + return QStringLiteral(u"%1.java").arg(java_class->name()); } void JavaGenerator::writeFieldAccessors(QTextStream &s, const MetaField *field, Option functionOptions, QList *overloadedFunctions) { @@ -214,8 +218,8 @@ void JavaGenerator::writeFieldAccessors(QTextStream &s, const MetaField *field, if (mod.isWritable() && isWritable) { if (declaringClass->hasFunction(setter)) { QString warning = - QString("class '%1' already has setter '%2' for %3 field '%4'") - .arg(declaringClass->name()).arg(setter->name(), field->isProtected() ? "protected" : "public", field->name()); + QStringLiteral(u"class '%1' already has setter '%2' for %3 field '%4'") + .arg(declaringClass->name()).arg(setter->name(), field->isProtected() ? QStringLiteral(u"protected") : QStringLiteral(u"public"), field->name()); ReportHandler::warning(warning); } else { writeFunction(s, setter, 0, 0, functionOptions); @@ -228,8 +232,8 @@ void JavaGenerator::writeFieldAccessors(QTextStream &s, const MetaField *field, if (mod.isReadable()) { if (declaringClass->hasFunction(getter)) { QString warning = - QString("class '%1' already has getter '%2' for %3 field '%4'") - .arg(declaringClass->name()).arg(getter->name(), field->isProtected() ? "protected" : "public", field->name()); + QStringLiteral(u"class '%1' already has getter '%2' for %3 field '%4'") + .arg(declaringClass->name()).arg(getter->name(), field->isProtected() ? QStringLiteral(u"protected") : QStringLiteral(u"public"), field->name()); ReportHandler::warning(warning); } else { writeFunction(s, getter, 0, 0, functionOptions); @@ -251,13 +255,13 @@ void JavaGenerator::writeFieldAccessors(QTextStream &s, const MetaField *field, QTextStream commentStream(&comment); if(!field->brief().isEmpty()){ commentStream << "

" << QString(field->brief()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "

" << Qt::endl; } commentStream << "

See "; @@ -265,32 +269,29 @@ void JavaGenerator::writeFieldAccessors(QTextStream &s, const MetaField *field, commentStream << "href() << "\">"; if(declaringClass){ commentStream << declaringClass->qualifiedCppName() - .replace("", "") - .replace("QtJambi", "Q") - .replace("QVoid", "Q") - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u""), QString()) + .replace(QStringLiteral(u"QtJambi"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"QVoid"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "::"; } commentStream << QString(field->name()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/"); + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")); if(!field->href().isEmpty()) commentStream << ""; commentStream << "

" << Qt::endl; -// if(hasCodeInjections(field, {CodeSnip::Comment})){ -// writeInjectedCode(commentStream, field, CodeSnip::Comment); -// } if(field->getter()->isDeprecated() && !field->getter()->deprecatedComment().isEmpty()){ if(!comment.isEmpty()) commentStream << Qt::endl; @@ -321,25 +322,26 @@ void JavaGenerator::writeFieldAccessors(QTextStream &s, const MetaField *field, } void JavaGenerator::registerPackage(QString pkgName, bool inclExported){ - auto idx = pkgName.indexOf('<'); + auto idx = pkgName.indexOf(u'<'); if(idx>0){ pkgName = pkgName.mid(0, idx); } - if(pkgName==QStringLiteral("io.qt.qml.QQmlListProperty")) + if(pkgName==QStringLiteral(u"io.qt.qml.QQmlListProperty")) inclExported = false; - if(pkgName.startsWith(QStringLiteral("?"))){ + if(pkgName.startsWith(QStringLiteral(u"?"))){ pkgName = pkgName.mid(1).trimmed(); - if(pkgName.startsWith(QStringLiteral("extends "))){ + if(pkgName.startsWith(QStringLiteral(u"extends "))){ pkgName = pkgName.mid(8); - }else if(pkgName.startsWith(QStringLiteral("super "))){ + }else if(pkgName.startsWith(QStringLiteral(u"super "))){ pkgName = pkgName.mid(6); } - for(const QString& pkg : pkgName.split("&")){ + const QStringList pkgs = pkgName.split(QStringLiteral(u"&")); + for(const QString& pkg : pkgs){ registerPackage(pkg.trimmed(), inclExported); } return; } - idx = pkgName.lastIndexOf('.'); + idx = pkgName.lastIndexOf(u'.'); if(idx>0){ pkgName = pkgName.mid(0, idx); m_currentPackages << pkgName; @@ -356,29 +358,29 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass java_type = java_type->originalTemplateType(); if (!java_type) { - s = "void"; + s = QStringLiteral(u"void"); } else if (java_type->isIterator()){ const IteratorTypeEntry* iteratorType = static_cast(java_type->typeEntry()); s = iteratorType->qualifiedTargetLangName(); bool found = false; if(!java_type->iteratorInstantiations().isEmpty()){ if(java_type->iteratorInstantiations().size()==2){ - s = "io.qt.core.QAssociativeConstIterator"; + s = QStringLiteral(u"io.qt.core.QAssociativeConstIterator"); } if ((option & StrictNonNull) || !(option & NoNullness)) { - auto idx = s.indexOf('<'); + auto idx = s.indexOf(u'<'); QString package; QString typeName = s; if(idx>0){ typeName = s.mid(0, idx); } - idx = typeName.lastIndexOf('.'); + idx = typeName.lastIndexOf(u'.'); QString nullness; if(option & StrictNonNull){ - nullness = QStringLiteral("@StrictNonNull "); + nullness = QStringLiteral(u"@StrictNonNull "); }else{ - nullness = QStringLiteral("@NonNull "); + nullness = QStringLiteral(u"@NonNull "); } if(idx>0){ typeName = s.mid(idx+1); @@ -407,24 +409,24 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass || containerType->type()==ContainerTypeEntry::MultiMapContainer || containerType->type()==ContainerTypeEntry::HashContainer || containerType->type()==ContainerTypeEntry::MultiHashContainer){ - s = "io.qt.core.QAssociativeConstIterator"; + s = QStringLiteral(u"io.qt.core.QAssociativeConstIterator"); } } if(!containerClass->templateBaseClassInstantiations().isEmpty() && (option & SkipTemplateParameters)==0){ if ((option & StrictNonNull) || !(option & NoNullness)) { - auto idx = s.indexOf('<'); + auto idx = s.indexOf(u'<'); QString package; QString typeName = s; if(idx>0){ typeName = s.mid(0, idx); } - idx = typeName.lastIndexOf('.'); + idx = typeName.lastIndexOf(u'.'); QString nullness; if(option & StrictNonNull){ - nullness = QStringLiteral("@StrictNonNull "); + nullness = QStringLiteral(u"@StrictNonNull "); }else{ - nullness = QStringLiteral("@NonNull "); + nullness = QStringLiteral(u"@NonNull "); } if(idx>0){ typeName = s.mid(idx+1); @@ -450,18 +452,18 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass if(iteratorClass){ if ((option & StrictNonNull) || !(option & NoNullness)) { - auto idx = s.indexOf('<'); + auto idx = s.indexOf(u'<'); QString package; QString typeName = s; if(idx>0){ typeName = s.mid(0, idx); } - idx = typeName.lastIndexOf('.'); + idx = typeName.lastIndexOf(u'.'); QString nullness; if(option & StrictNonNull){ - nullness = QStringLiteral("@StrictNonNull "); + nullness = QStringLiteral(u"@StrictNonNull "); }else{ - nullness = QStringLiteral("@NonNull "); + nullness = QStringLiteral(u"@NonNull "); } if(idx>0){ typeName = s.mid(idx+1); @@ -487,7 +489,7 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass } }else{ for(MetaFunction* function : iteratorClass->functions()){ - if(function->originalName()=="operator*" && function->type() && function->arguments().isEmpty() && function->isConstant()){ + if(function->originalName()==QStringLiteral(u"operator*") && function->type() && function->arguments().isEmpty() && function->isConstant()){ if((option & SkipTemplateParameters)==0){ s += "<"; s += translateType(function->type(), context, Option((option & ~EnumAsInts & ~UseNativeIds) | BoxedPrimitive | NoQCollectionContainers | VarArgsAsArray)); @@ -504,17 +506,17 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass MetaBuilder::decideUsagePattern(instantiation); s = translateType(instantiation, context, Option((option & ~EnumAsInts & ~UseNativeIds & ~BoxedPrimitive) | NoSuppressExports | VarArgsAsArray)); if (option & StrictNonNull) { - s += QString("@StrictNonNull "); + s += QStringLiteral(u"@StrictNonNull "); }else if (!(option & NoNullness)) { if(!java_type->typeEntry()->isPrimitive() && !java_type->typeEntry()->isQVariant() && !java_type->typeEntry()->isQChar() && !java_type->typeEntry()->isFunctional() && java_type->indirections().isEmpty()){ - s += QString("@NonNull "); + s += QStringLiteral(u"@NonNull "); }else if(!java_type->indirections().isEmpty() || java_type->typeEntry()->isFunctional()){ - s += QString("@Nullable "); + s += QStringLiteral(u"@Nullable "); } } if(option & VarArgsAsArray) @@ -523,12 +525,12 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass s += " ..."; } else if (java_type->isCharString()) { if (option & NoNullness) { - s = "java.lang.String"; + s = QStringLiteral(u"java.lang.String"); }else{ - s = "java.lang.@Nullable String"; + s = QStringLiteral(u"java.lang.@Nullable String"); } } else if (java_type->hasNativeId() && (option & UseNativeIds)) { - s = "long"; + s = QStringLiteral(u"long"); } else if (java_type->isArray()) { s = translateType(java_type->arrayElementType(), context, Option((option & ~EnumAsInts & ~UseNativeIds & ~BoxedPrimitive) | NoSuppressExports | VarArgsAsArray)) + "[]"; } else if (java_type->isEnum()) { @@ -539,87 +541,87 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass switch(size){ case 8: if (option & BoxedPrimitive) - s = "Byte"; + s = QStringLiteral(u"Byte"); else - s = "byte"; + s = QStringLiteral(u"byte"); break; case 16: if (option & BoxedPrimitive) - s = "Short"; + s = QStringLiteral(u"Short"); else - s = "short"; + s = QStringLiteral(u"short"); break; case 32: if (option & BoxedPrimitive) - s = "Integer"; + s = QStringLiteral(u"Integer"); else s = "int"; break; case 64: if (option & BoxedPrimitive) - s = "Long"; + s = QStringLiteral(u"Long"); else - s = "long"; + s = QStringLiteral(u"long"); break; default: if (option & BoxedPrimitive) - s = "Integer"; + s = QStringLiteral(u"Integer"); else - s = "int"; + s = QStringLiteral(u"int"); break; } if (((option & StrictNonNull) || !(option & NoNullness)) && (option & BoxedPrimitive)) { if(option & StrictNonNull){ - s = QStringLiteral("java.lang.@QtPrimitiveType@StrictNonNull ") + s; + s = QStringLiteral(u"java.lang.@QtPrimitiveType@StrictNonNull ") + s; }else if(java_type->indirections().isEmpty()){ - s = QStringLiteral("java.lang.@QtPrimitiveType@NonNull ") + s; + s = QStringLiteral(u"java.lang.@QtPrimitiveType@NonNull ") + s; }else{ - s = QStringLiteral("java.lang.@QtPrimitiveType@Nullable ") + s; + s = QStringLiteral(u"java.lang.@QtPrimitiveType@Nullable ") + s; } } }else{ if (option & EnumAsInts) switch(size){ case 8: - s = "byte"; + s = QStringLiteral(u"byte"); break; case 16: - s = "short"; + s = QStringLiteral(u"short"); break; case 32: - s = "int"; + s = QStringLiteral(u"int"); break; case 64: - s = "long"; + s = QStringLiteral(u"long"); break; default: - s = "int"; + s = QStringLiteral(u"int"); break; } else{ m_currentPackages << static_cast(java_type->typeEntry())->javaPackage(); if((option & NoSuppressExports) == 0) m_exportedPackages.insert(static_cast(java_type->typeEntry())->javaPackage()); - s = java_type->fullName().replace('$', '.'); + s = java_type->fullName().replace(u'$', u'.'); if ((option & StrictNonNull) || !(option & NoNullness)) { - auto idx = s.indexOf('<'); + auto idx = s.indexOf(u'<'); QString package; QString typeName = s; if(idx>0){ typeName = s.mid(0, idx); } - idx = typeName.lastIndexOf('.'); + idx = typeName.lastIndexOf(u'.'); QString nullness; if(option & StrictNonNull){ - nullness = QStringLiteral("@StrictNonNull "); + nullness = QStringLiteral(u"@StrictNonNull "); }else if(java_type->indirections().isEmpty()){ - nullness = QStringLiteral("@NonNull "); + nullness = QStringLiteral(u"@NonNull "); }else{ - nullness = QStringLiteral("@Nullable "); + nullness = QStringLiteral(u"@Nullable "); } if(idx>0){ typeName = s.mid(idx+1); @@ -637,41 +639,41 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass if ((option & StrictNonNull) || !(option & NoNullness)) { if(option & StrictNonNull){ - s = QStringLiteral("java.lang.@QtPrimitiveType@StrictNonNull Integer"); + s = QStringLiteral(u"java.lang.@QtPrimitiveType@StrictNonNull Integer"); }else if(java_type->indirections().isEmpty()){ - s = QStringLiteral("java.lang.@QtPrimitiveType@NonNull Integer"); + s = QStringLiteral(u"java.lang.@QtPrimitiveType@NonNull Integer"); }else{ - s = QStringLiteral("java.lang.@QtPrimitiveType@Nullable Integer"); + s = QStringLiteral(u"java.lang.@QtPrimitiveType@Nullable Integer"); } }else{ - s = "java.lang.@QtPrimitiveType@Nullable Integer"; + s = QStringLiteral(u"java.lang.@QtPrimitiveType@Nullable Integer"); } }else - s = "int"; + s = QStringLiteral(u"int"); } else { if (option & EnumAsInts) - s = "int"; + s = QStringLiteral(u"int"); else{ m_currentPackages << static_cast(java_type->typeEntry())->javaPackage(); if((option & NoSuppressExports) == 0) m_exportedPackages.insert(static_cast(java_type->typeEntry())->javaPackage()); - s = java_type->fullName().replace('$', '.'); + s = java_type->fullName().replace(u'$', u'.'); if ((option & StrictNonNull) || !(option & NoNullness)) { - auto idx = s.indexOf('<'); + auto idx = s.indexOf(u'<'); QString package; QString typeName = s; if(idx>0){ typeName = s.mid(0, idx); } - idx = typeName.lastIndexOf('.'); + idx = typeName.lastIndexOf(u'.'); QString nullness; if(option & StrictNonNull){ - nullness = QStringLiteral("@StrictNonNull "); + nullness = QStringLiteral(u"@StrictNonNull "); }else if(java_type->indirections().isEmpty()){ - nullness = QStringLiteral("@NonNull "); + nullness = QStringLiteral(u"@NonNull "); }else{ - nullness = QStringLiteral("@Nullable "); + nullness = QStringLiteral(u"@Nullable "); } if(idx>0){ typeName = s.mid(idx+1); @@ -686,11 +688,11 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass } else { if (java_type->isPrimitive() && (option & BoxedPrimitive) ) { s = static_cast(java_type->typeEntry())->javaObjectFullName(); - auto idx = s.lastIndexOf('.'); + auto idx = s.lastIndexOf(u'.'); QString ann; if (!(option & StrictNonNull) && (option & NoNullness)) { - ann = QStringLiteral("@QtPrimitiveType "); + ann = QStringLiteral(u"@QtPrimitiveType "); } if(idx>0){ QString typeName = s.mid(idx+1); @@ -700,7 +702,7 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass s = ann + s; } } else if (java_type->isNativePointer()) { - s = "QNativePointer"; + s = QStringLiteral(u"QNativePointer"); } else if (java_type->isContainer()) { const ContainerTypeEntry * container = static_cast(java_type->typeEntry()); if(container->type()==ContainerTypeEntry::std_chrono){ @@ -726,16 +728,16 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass )){ if(container->type()==ContainerTypeEntry::StringListContainer || container->type()==ContainerTypeEntry::ByteArrayListContainer){ - s = "io.qt.core.QList"; + s = QStringLiteral(u"io.qt.core.QList"); }else{ if(QT_VERSION_CHECK(m_qtVersionMajor,m_qtVersionMinor,m_qtVersionPatch)>=QT_VERSION_CHECK(6,0,0) && container->type()==ContainerTypeEntry::VectorContainer){ - s = "io.qt.core.QList"; + s = QStringLiteral(u"io.qt.core.QList"); }else{ - s = "io.qt.core."+java_type->typeEntry()->qualifiedCppName(); + s = QStringLiteral(u"io.qt.core.")+java_type->typeEntry()->qualifiedCppName(); } } if ((option & SkipTemplateParameters) == 0) { - s += '<'; + s += u'<'; const QList& args = java_type->instantiations(); for (int i=0; itypeEntry()->qualifiedTargetLangName(); if((option & CollectionAsCollection) == CollectionAsCollection){ - if(s=="java.util.List" - || s=="java.util.LinkedList" - || s=="java.util.Queue" - || s=="java.util.Deque" - || s=="java.util.ArrayList" - || s=="java.util.Vector" - || s=="java.util.Set" - || s=="io.qt.core.QSet" - || s=="io.qt.core.QList" - || s=="io.qt.core.QStringList" - || s=="io.qt.core.QQueue" - || s=="io.qt.core.QVector" - || s=="io.qt.core.QStack" - || s=="io.qt.core.QLinkedList"){ - s = "java.util.Collection"; - }else if(s=="java.util.Map" - || s=="java.util.SortedMap" - || s=="java.util.NavigableMap" - || s=="java.util.HashMap" - || s=="java.util.TreeMap" - || s=="io.qt.core.QMap" - || s=="io.qt.core.QHash" - || s=="io.qt.core.QMultiMap" - || s=="io.qt.core.QMultiHash"){ - s = "java.util.Map"; - }else if(s=="java.time.Duration"){ - s = "java.time.temporal.TemporalAmount"; + if(s==QStringLiteral(u"java.util.List") + || s==QStringLiteral(u"java.util.LinkedList") + || s==QStringLiteral(u"java.util.Queue") + || s==QStringLiteral(u"java.util.Deque") + || s==QStringLiteral(u"java.util.ArrayList") + || s==QStringLiteral(u"java.util.Vector") + || s==QStringLiteral(u"java.util.Set") + || s==QStringLiteral(u"io.qt.core.QSet") + || s==QStringLiteral(u"io.qt.core.QList") + || s==QStringLiteral(u"io.qt.core.QStringList") + || s==QStringLiteral(u"io.qt.core.QQueue") + || s==QStringLiteral(u"io.qt.core.QVector") + || s==QStringLiteral(u"io.qt.core.QStack") + || s==QStringLiteral(u"io.qt.core.QLinkedList")){ + s = QStringLiteral(u"java.util.Collection"); + }else if(s==QStringLiteral(u"java.util.Map") + || s==QStringLiteral(u"java.util.SortedMap") + || s==QStringLiteral(u"java.util.NavigableMap") + || s==QStringLiteral(u"java.util.HashMap") + || s==QStringLiteral(u"java.util.TreeMap") + || s==QStringLiteral(u"io.qt.core.QMap") + || s==QStringLiteral(u"io.qt.core.QHash") + || s==QStringLiteral(u"io.qt.core.QMultiMap") + || s==QStringLiteral(u"io.qt.core.QMultiHash")){ + s = QStringLiteral(u"java.util.Map"); + }else if(s==QStringLiteral(u"java.time.Duration")){ + s = QStringLiteral(u"java.time.temporal.TemporalAmount"); } }else if((option & NoQCollectionContainers) == NoQCollectionContainers){ - if(s=="io.qt.core.QList" - || s=="io.qt.core.QVector"){ + if(s==QStringLiteral(u"io.qt.core.QList") + || s==QStringLiteral(u"io.qt.core.QVector")){ s = "java.util.List"; - }else if(s=="io.qt.core.QStringList"){ + }else if(s==QStringLiteral(u"io.qt.core.QStringList")){ s = "java.util.List"; - }else if(s=="io.qt.core.QSet"){ + }else if(s==QStringLiteral(u"io.qt.core.QSet")){ s = "java.util.Set"; - }else if(s=="io.qt.core.QQueue"){ + }else if(s==QStringLiteral(u"io.qt.core.QQueue")){ s = "java.util.Queue"; - }else if(s=="io.qt.core.QStack"){ + }else if(s==QStringLiteral(u"io.qt.core.QStack")){ s = "java.util.Deque"; - }else if(s=="io.qt.core.QLinkedList"){ + }else if(s==QStringLiteral(u"io.qt.core.QLinkedList")){ s = "java.util.LinkedList"; - }else if(s=="io.qt.core.QMap" - || s=="io.qt.core.QMultiMap"){ + }else if(s==QStringLiteral(u"io.qt.core.QMap") + || s==QStringLiteral(u"io.qt.core.QMultiMap")){ s = "java.util.NavigableMap"; - }else if(s=="io.qt.core.QHash" - || s=="io.qt.core.QMultiHash"){ - s = "java.util.Map"; - }else if(s=="java.time.Duration"){ - s = "java.time.temporal.TemporalAmount"; + }else if(s==QStringLiteral(u"io.qt.core.QHash") + || s==QStringLiteral(u"io.qt.core.QMultiHash")){ + s = QStringLiteral(u"java.util.Map"); + }else if(s==QStringLiteral(u"java.time.Duration")){ + s = QStringLiteral(u"java.time.temporal.TemporalAmount"); } } QString plainType; if((option & SkipTemplateParameters) == 0 && container->type()==ContainerTypeEntry::QModelRoleDataSpanContainer){ - s += ""; - }else if ((option & SkipTemplateParameters) == 0 && s!="io.qt.core.QStringList") { + s += QStringLiteral(u""); + }else if ((option & SkipTemplateParameters) == 0 && s!=QStringLiteral(u"io.qt.core.QStringList")) { plainType = s; - s += '<'; + s += u'<'; const QList& args = java_type->instantiations(); auto argssize = args.size(); for (int i=0; itype() == ContainerTypeEntry::MultiMapContainer || container->type() == ContainerTypeEntry::MultiHashContainer) && ((option & NoQCollectionContainers) == NoQCollectionContainers @@ -834,44 +836,44 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass } s += '>'; } - if(s.startsWith("java.util.Optional")){ - s = "java.util.OptionalInt"; - }else if(s.startsWith("java.util.Optional")){ - s = "java.util.OptionalLong"; - }else if(s.startsWith("java.util.Optional")){ - s = "java.util.OptionalDouble"; - }else if(s.startsWith("io.qt.core.QPropertyBinding")){ - s = "io.qt.core.QBooleanPropertyBinding"; - }else if(s.startsWith("io.qt.core.QPropertyBinding")){ - s = "io.qt.core.QBytePropertyBinding"; - }else if(s.startsWith("io.qt.core.QPropertyBinding")){ - s = "io.qt.core.QShortPropertyBinding"; - }else if(s.startsWith("io.qt.core.QPropertyBinding")){ - s = "io.qt.core.QIntPropertyBinding"; - }else if(s.startsWith("io.qt.core.QPropertyBinding")){ - s = "io.qt.core.QLongPropertyBinding"; - }else if(s.startsWith("io.qt.core.QPropertyBinding")){ - s = "io.qt.core.QCharPropertyBinding"; - }else if(s.startsWith("io.qt.core.QPropertyBinding")){ - s = "io.qt.core.QFloatPropertyBinding"; - }else if(s.startsWith("io.qt.core.QPropertyBinding")){ - s = "io.qt.core.QDoublePropertyBinding"; - }else if(s.startsWith("io.qt.core.QBindable")){ - s = "io.qt.core.QBooleanBindable"; - }else if(s.startsWith("io.qt.core.QBindable")){ - s = "io.qt.core.QByteBindable"; - }else if(s.startsWith("io.qt.core.QBindable")){ - s = "io.qt.core.QShortBindable"; - }else if(s.startsWith("io.qt.core.QBindable")){ - s = "io.qt.core.QIntBindable"; - }else if(s.startsWith("io.qt.core.QBindable")){ - s = "io.qt.core.QLongBindable"; - }else if(s.startsWith("io.qt.core.QBindable")){ - s = "io.qt.core.QCharBindable"; - }else if(s.startsWith("io.qt.core.QBindable")){ - s = "io.qt.core.QFloatBindable"; - }else if(s.startsWith("io.qt.core.QBindable")){ - s = "io.qt.core.QDoubleBindable"; + if(s.startsWith(QStringLiteral(u"java.util.Optional"))){ + s = QStringLiteral(u"java.util.OptionalInt"); + }else if(s.startsWith(QStringLiteral(u"java.util.Optional"))){ + s = QStringLiteral(u"java.util.OptionalLong"); + }else if(s.startsWith(QStringLiteral(u"java.util.Optional"))){ + s = QStringLiteral(u"java.util.OptionalDouble"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QPropertyBinding"))){ + s = QStringLiteral(u"io.qt.core.QBooleanPropertyBinding"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QPropertyBinding"))){ + s = QStringLiteral(u"io.qt.core.QBytePropertyBinding"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QPropertyBinding"))){ + s = QStringLiteral(u"io.qt.core.QShortPropertyBinding"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QPropertyBinding"))){ + s = QStringLiteral(u"io.qt.core.QIntPropertyBinding"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QPropertyBinding"))){ + s = QStringLiteral(u"io.qt.core.QLongPropertyBinding"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QPropertyBinding"))){ + s = QStringLiteral(u"io.qt.core.QCharPropertyBinding"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QPropertyBinding"))){ + s = QStringLiteral(u"io.qt.core.QFloatPropertyBinding"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QPropertyBinding"))){ + s = QStringLiteral(u"io.qt.core.QDoublePropertyBinding"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QBindable"))){ + s = QStringLiteral(u"io.qt.core.QBooleanBindable"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QBindable"))){ + s = QStringLiteral(u"io.qt.core.QByteBindable"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QBindable"))){ + s = QStringLiteral(u"io.qt.core.QShortBindable"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QBindable"))){ + s = QStringLiteral(u"io.qt.core.QIntBindable"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QBindable"))){ + s = QStringLiteral(u"io.qt.core.QLongBindable"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QBindable"))){ + s = QStringLiteral(u"io.qt.core.QCharBindable"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QBindable"))){ + s = QStringLiteral(u"io.qt.core.QFloatBindable"); + }else if(s.startsWith(QStringLiteral(u"io.qt.core.QBindable"))){ + s = QStringLiteral(u"io.qt.core.QDoubleBindable"); } } } else if (java_type->isPointerContainer() && java_type->instantiations().size()==1) { @@ -976,7 +978,7 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass } if(java_type && !java_type->isEnum() && !java_type->isFlags()) registerPackage(s, (option & NoSuppressExports) == 0); - s = s.replace('$', '.'); + s = s.replace(u'$', u'.'); if ((option & StrictNonNull) || (!(option & NoNullness) && (((!java_type->typeEntry()->isPrimitive() || (option & BoxedPrimitive)) @@ -984,31 +986,31 @@ QString JavaGenerator::translateType(const MetaType *java_type, const MetaClass && !java_type->typeEntry()->isQChar() && java_type->indirections().isEmpty()) || !java_type->indirections().isEmpty()))) { - auto idx = s.indexOf('<'); + auto idx = s.indexOf(u'<'); QString package; QString typeName = s; if(idx>0){ typeName = s.mid(0, idx); } - idx = typeName.lastIndexOf('.'); + idx = typeName.lastIndexOf(u'.'); QString ann; if((option & BoxedPrimitive) && java_type->typeEntry()->isPrimitive()){ if(java_type->typeEntry()->isVoid()){ - ann = QStringLiteral("@QtPrimitiveType "); + ann = QStringLiteral(u"@QtPrimitiveType "); }else if(option & StrictNonNull){ - ann = QStringLiteral("@QtPrimitiveType@StrictNonNull "); + ann = QStringLiteral(u"@QtPrimitiveType@StrictNonNull "); }else if(java_type->indirections().isEmpty()){ - ann = QStringLiteral("@QtPrimitiveType@NonNull "); + ann = QStringLiteral(u"@QtPrimitiveType@NonNull "); }else{ - ann = QStringLiteral("@QtPrimitiveType@Nullable "); + ann = QStringLiteral(u"@QtPrimitiveType@Nullable "); } }else{ if(option & StrictNonNull){ - ann = QStringLiteral("@StrictNonNull "); + ann = QStringLiteral(u"@StrictNonNull "); }else if(java_type->indirections().isEmpty() && !java_type->typeEntry()->isFunctional()){ - ann = QStringLiteral("@NonNull "); + ann = QStringLiteral(u"@NonNull "); }else{ - ann = QStringLiteral("@Nullable "); + ann = QStringLiteral(u"@Nullable "); } } if(idx>0){ @@ -1038,9 +1040,9 @@ void JavaGenerator::writeFunctionArgument(QTextStream &s, bool addNullness = false; if(alternativeType){ modified_type = *alternativeType; - if(modified_type=="0") + if(modified_type==QStringLiteral(u"0") || modified_type==QStringLiteral(u"3")) return; - if(modified_type=="1" || modified_type=="2"){ + if(modified_type==QStringLiteral(u"1") || modified_type==QStringLiteral(u"2")){ addNullness = true; options = Option(options & ~EnumAsInts); QScopedPointer cpy(java_argument->type()->copy()); @@ -1079,26 +1081,26 @@ void JavaGenerator::writeFunctionArgument(QTextStream &s, } MetaBuilder::decideUsagePattern(cpy.get()); modified_type = translateType(cpy.get(), java_function->implementingClass(), Option(options & ~UseNativeIds)); - if(modified_type=="int"){ - modified_type = "java.nio.IntBuffer"; - }else if(modified_type=="byte"){ - modified_type = "java.nio.ByteBuffer"; - }else if(modified_type=="char"){ - modified_type = "java.nio.CharBuffer"; - }else if(modified_type=="short"){ - modified_type = "java.nio.ShortBuffer"; - }else if(modified_type=="long"){ - modified_type = "java.nio.LongBuffer"; - }else if(modified_type=="float"){ - modified_type = "java.nio.FloatBuffer"; - }else if(modified_type=="double"){ - modified_type = "java.nio.DoubleBuffer"; + if(modified_type==QStringLiteral(u"int")){ + modified_type = QStringLiteral(u"java.nio.IntBuffer"); + }else if(modified_type==QStringLiteral(u"byte")){ + modified_type = QStringLiteral(u"java.nio.ByteBuffer"); + }else if(modified_type==QStringLiteral(u"char")){ + modified_type = QStringLiteral(u"java.nio.CharBuffer"); + }else if(modified_type==QStringLiteral(u"short")){ + modified_type = QStringLiteral(u"java.nio.ShortBuffer"); + }else if(modified_type==QStringLiteral(u"long")){ + modified_type = QStringLiteral(u"java.nio.LongBuffer"); + }else if(modified_type==QStringLiteral(u"float")){ + modified_type = QStringLiteral(u"java.nio.FloatBuffer"); + }else if(modified_type==QStringLiteral(u"double")){ + modified_type = QStringLiteral(u"java.nio.DoubleBuffer"); }else{ - modified_type = "java.nio.Buffer"; + modified_type = QStringLiteral(u"java.nio.Buffer"); } }else if(java_function->useArgumentAsArray(java_argument->argumentIndex() + 1)){ addNullness = true; - addArrayOffset = java_function->insertArrayOffsetArgument(java_argument->argumentIndex() + 1); + addArrayOffset = java_function->insertUtilArgument(java_argument->argumentIndex() + 1); options = Option(options & ~EnumAsInts); QScopedPointer cpy(java_argument->type()->copy()); cpy->setConstant(false); @@ -1118,21 +1120,24 @@ void JavaGenerator::writeFunctionArgument(QTextStream &s, }else { addNullness = true; modified_type = java_function->typeReplaced(java_argument->argumentIndex() + 1); + if(modified_type.isEmpty() && java_function->useArgumentAsSlotContext(java_argument->argumentIndex() + 1)){ + modified_type = QStringLiteral(u"io.qt.core.@Nullable QObject"); + } if((options & SkipTemplateParameters) && modified_type.contains("<")){ - auto idx = modified_type.indexOf('<'); + auto idx = modified_type.indexOf(u'<'); QString arrayType; - if(modified_type.endsWith("...")){ + if(modified_type.endsWith(QStringLiteral(u"..."))){ if((options & VarArgsAsArray)){ - arrayType = QStringLiteral("[]"); + arrayType = QStringLiteral(u"[]"); }else{ - arrayType = QStringLiteral("..."); + arrayType = QStringLiteral(u"..."); } - }else if(modified_type.endsWith("[]")){ - arrayType = QStringLiteral("[]"); + }else if(modified_type.endsWith(QStringLiteral(u"[]"))){ + arrayType = QStringLiteral(u"[]"); } modified_type = modified_type.mid(0, idx)+arrayType; - }else if((options & VarArgsAsArray) && modified_type.endsWith("...")){ - modified_type = modified_type.replace("...", "[]"); + }else if((options & VarArgsAsArray) && modified_type.endsWith(QStringLiteral(u"..."))){ + modified_type = modified_type.replace(QStringLiteral(u"..."), QStringLiteral(u"[]")); } } QString arg; @@ -1144,14 +1149,14 @@ void JavaGenerator::writeFunctionArgument(QTextStream &s, } if(isCharSequenceSubstitute(java_argument->type())){ if(options & NoNullness){ - arg = "java.lang.CharSequence"; + arg = QStringLiteral(u"java.lang.CharSequence"); }else{ if(options & StrictNonNull){ - arg = "java.lang.@StrictNonNull CharSequence"; + arg = QStringLiteral(u"java.lang.@StrictNonNull CharSequence"); }else if(java_argument->type()->indirections().isEmpty()){ - arg = "java.lang.@NonNull CharSequence"; + arg = QStringLiteral(u"java.lang.@NonNull CharSequence"); }else{ - arg = "java.lang.@Nullable CharSequence"; + arg = QStringLiteral(u"java.lang.@Nullable CharSequence"); } } }else{ @@ -1166,59 +1171,59 @@ void JavaGenerator::writeFunctionArgument(QTextStream &s, } }else{ registerPackage(modified_type); - modified_type = modified_type.replace('$', '.'); + modified_type = modified_type.replace(u'$', u'.'); if (!(options & NoNullness)) { if(addNullness){ if(java_function->nullPointersDisabled(java_function->declaringClass(), java_argument->argumentIndex() + 1)){ - if(modified_type.endsWith("[]")){ + if(modified_type.endsWith(QStringLiteral(u"[]"))){ modified_type = modified_type.mid(0, modified_type.length()-2) + " @StrictNonNull[]"; - }else if(modified_type.endsWith("...")){ + }else if(modified_type.endsWith(QStringLiteral(u"..."))){ modified_type = modified_type.mid(0, modified_type.length()-3) + " @StrictNonNull..."; }else{ - auto idx = modified_type.indexOf('<'); + auto idx = modified_type.indexOf(u'<'); QString package; QString typeName = modified_type; if(idx>0){ typeName = modified_type.mid(0, idx); } - idx = typeName.lastIndexOf('.'); + idx = typeName.lastIndexOf(u'.'); if(idx>0){ typeName = modified_type.mid(idx+1); package = modified_type.mid(0, idx+1); - modified_type = package + QString("@StrictNonNull ") + typeName; + modified_type = package + QStringLiteral(u"@StrictNonNull ") + typeName; }else{ - modified_type = QString("@StrictNonNull ") + modified_type; + modified_type = QStringLiteral(u"@StrictNonNull ") + modified_type; } } - }else if(modified_type.startsWith("java.nio.") && !modified_type.contains("@")){ - auto idx = modified_type.indexOf('<'); + }else if(modified_type.startsWith(QStringLiteral(u"java.nio.")) && !modified_type.contains(QStringLiteral(u"@"))){ + auto idx = modified_type.indexOf(u'<'); QString package; QString typeName = modified_type; if(idx>0){ typeName = modified_type.mid(0, idx); } - idx = typeName.lastIndexOf('.'); + idx = typeName.lastIndexOf(u'.'); if(idx>0){ typeName = modified_type.mid(idx+1); package = modified_type.mid(0, idx+1); - modified_type = package + QString("@Nullable ") + typeName; + modified_type = package + QStringLiteral(u"@Nullable ") + typeName; }else{ - modified_type = QString("@Nullable ") + modified_type; + modified_type = QStringLiteral(u"@Nullable ") + modified_type; } - }else if(modified_type=="java.lang.String" || modified_type=="String"){ + }else if(modified_type==QStringLiteral(u"java.lang.String") || modified_type==QStringLiteral(u"String")){ if(java_argument->type() - && java_argument->type()->typeEntry()->qualifiedCppName()=="char" + && java_argument->type()->typeEntry()->qualifiedCppName()==QStringLiteral(u"char") && java_argument->type()->indirections().size()==1 && !java_function->hasConversionRule(TS::Language::NativeCode, java_argument->argumentIndex() + 1)){ - auto idx = modified_type.indexOf('<'); + auto idx = modified_type.indexOf(u'<'); QString package; QString typeName = modified_type; if(idx>0){ typeName = modified_type.mid(0, idx); } - idx = typeName.lastIndexOf('.'); - QString ann = QString("@Nullable "); + idx = typeName.lastIndexOf(u'.'); + QString ann = QStringLiteral(u"@Nullable "); if(idx>0){ typeName = modified_type.mid(idx+1); package = modified_type.mid(0, idx+1); @@ -1229,23 +1234,21 @@ void JavaGenerator::writeFunctionArgument(QTextStream &s, } } } - }else if(modified_type.contains('@')){ - modified_type = modified_type - .replace(" @Nullable", "").replace(" @NonNull", "").replace(" @StrictNonNull", "") - .replace("@Nullable ", "").replace("@NonNull ", "").replace("@StrictNonNull ", ""); + }else if(modified_type.contains(u'@')){ + modified_type = annotationFreeTypeName(modified_type); } arg = modified_type; } if ((options & SkipTemplateParameters) == SkipTemplateParameters) { - auto idx = arg.indexOf("<"); + auto idx = arg.indexOf(u'<'); if(idx>0) arg = arg.left(idx); } if(suppressWarning) - arg = QString("@SuppressWarnings(\"rawtypes\") ") + arg; + arg = QStringLiteral(u"@SuppressWarnings(\"rawtypes\") ") + arg; if ((options & SkipName) == 0) { - arg += " "; + arg += ' '; arg += java_argument->modifiedArgumentName(); } @@ -1255,7 +1258,7 @@ void JavaGenerator::writeFunctionArgument(QTextStream &s, s << arg; if(addArrayOffset){ - int lengthParameter = java_function->arrayOrBufferLengthIndex(java_argument->argumentIndex() + 1); + int lengthParameter = java_function->utilArgumentIndex(java_argument->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=java_function->arguments().size()){ const MetaArgument *lengthParam = java_function->arguments()[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -1268,7 +1271,7 @@ void JavaGenerator::writeFunctionArgument(QTextStream &s, } if(alternativeTypes){ if(const QString* lengthType = alternativeTypes->value(lengthParam->argumentIndex())){ - if(*lengthType=="0") + if(*lengthType==QStringLiteral(u"0") || *lengthType==QStringLiteral(u"3")) lengthParam = nullptr; } } @@ -1276,42 +1279,42 @@ void JavaGenerator::writeFunctionArgument(QTextStream &s, s << ", "; QString argumentType = java_function->typeReplaced(lengthParam->argumentIndex() + 1); if(!argumentType.isEmpty()){ - argumentType = argumentType.replace('$', '.'); + argumentType = argumentType.replace(u'$', u'.'); if (!(options & NoNullness)) { if(java_function->nullPointersDisabled(java_function->declaringClass(), java_argument->argumentIndex() + 1)){ - if(argumentType.endsWith("[]")){ + if(argumentType.endsWith(QStringLiteral(u"[]"))){ argumentType = argumentType.mid(0, argumentType.length()-2) + " @StrictNonNull[]"; - }else if(argumentType.endsWith("...")){ + }else if(argumentType.endsWith(QStringLiteral(u"..."))){ argumentType = argumentType.mid(0, argumentType.length()-3) + " @StrictNonNull..."; }else{ - auto idx = argumentType.indexOf('<'); + auto idx = argumentType.indexOf(u'<'); QString package; QString typeName = argumentType; if(idx>0){ typeName = argumentType.mid(0, idx); } - idx = typeName.lastIndexOf('.'); + idx = typeName.lastIndexOf(u'.'); if(idx>0){ typeName = argumentType.mid(idx+1); package = argumentType.mid(0, idx+1); - argumentType = package + QString("@StrictNonNull ") + typeName; + argumentType = package + QStringLiteral(u"@StrictNonNull ") + typeName; }else{ - argumentType = QString("@StrictNonNull ") + argumentType; + argumentType = QStringLiteral(u"@StrictNonNull ") + argumentType; } } - }else if(argumentType=="java.lang.String" || argumentType=="String"){ + }else if(argumentType==QStringLiteral(u"java.lang.String") || argumentType==QStringLiteral(u"String")){ if(java_argument->type() - && java_argument->type()->typeEntry()->qualifiedCppName()=="char" + && java_argument->type()->typeEntry()->qualifiedCppName()==QStringLiteral(u"char") && java_argument->type()->indirections().size()==1 && !java_function->hasConversionRule(TS::Language::NativeCode, java_argument->argumentIndex() + 1)){ - auto idx = argumentType.indexOf('<'); + auto idx = argumentType.indexOf(u'<'); QString package; QString typeName = argumentType; if(idx>0){ typeName = argumentType.mid(0, idx); } - idx = typeName.lastIndexOf('.'); - QString ann = QString("@Nullable "); + idx = typeName.lastIndexOf(u'.'); + QString ann = QStringLiteral(u"@Nullable "); if(idx>0){ typeName = argumentType.mid(idx+1); package = argumentType.mid(0, idx+1); @@ -1321,10 +1324,8 @@ void JavaGenerator::writeFunctionArgument(QTextStream &s, } } } - }else if(argumentType.contains('@')){ - argumentType = argumentType - .replace(" @Nullable", "").replace(" @NonNull", "").replace(" @StrictNonNull", "") - .replace("@Nullable ", "").replace("@NonNull ", "").replace("@StrictNonNull ", ""); + }else if(argumentType.contains(u'@')){ + argumentType = annotationFreeTypeName(argumentType); } }else{ if(!(options & NoNullness) && lengthParam->isNullPointerDisabled(java_function)){ @@ -1332,26 +1333,19 @@ void JavaGenerator::writeFunctionArgument(QTextStream &s, } if(isCharSequenceSubstitute(lengthParam->type())){ if(options & NoNullness){ - argumentType = "java.lang.CharSequence"; + argumentType = QStringLiteral(u"java.lang.CharSequence"); }else{ if(options & StrictNonNull){ - argumentType = "java.lang.@StrictNonNull CharSequence"; + argumentType = QStringLiteral(u"java.lang.@StrictNonNull CharSequence"); }else if(lengthParam->type()->indirections().isEmpty()){ - argumentType = "java.lang.@NonNull CharSequence"; + argumentType = QStringLiteral(u"java.lang.@NonNull CharSequence"); }else{ - argumentType = "java.lang.@Nullable CharSequence"; + argumentType = QStringLiteral(u"java.lang.@Nullable CharSequence"); } } }else{ argumentType = translateType(lengthParam->type(), java_function->implementingClass(), Option(options)); } - - if((options & SkipTemplateParameters) == 0 && lengthParam->type()->typeEntry()->isComplex()){ - const ComplexTypeEntry* ctype = dynamic_cast(lengthParam->type()->typeEntry()); - if(ctype->isGenericClass() && lengthParam->type()->instantiations().isEmpty()){ - suppressWarning = true; - } - } } if(addArrayLength){ argumentType = "int"; @@ -1407,13 +1401,13 @@ void JavaGenerator::writeIntegerEnum(QTextStream &s, const uint size, const Meta if(!value->deprecatedComment().isEmpty()){ s << INDENT << " /**" << Qt::endl << INDENT << " * @deprecated " << QString(value->deprecatedComment()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << Qt::endl << INDENT << " */" << Qt::endl; } @@ -1466,7 +1460,7 @@ void JavaGenerator::writeIntegerEnum(QTextStream &s, const uint size, const Meta } void JavaGenerator::writeFunctional(QTextStream &s, const MetaFunctional *java_functional) { - if(java_functional->isPrivate() || java_functional->typeEntry()->codeGeneration()==TypeEntry::GenerateNothing){ + if(java_functional->isPrivate() || (java_functional->typeEntry()->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateNothing){ return; } @@ -1485,19 +1479,19 @@ void JavaGenerator::writeFunctional(QTextStream &s, const MetaFunctional *java_f if(!java_functional->href().isEmpty()) commentStream << "href() << "\">"; commentStream << java_functional->typeEntry()->qualifiedCppName() - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/"); + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")); if(!java_functional->href().isEmpty()) commentStream << ""; commentStream << "

" << Qt::endl; } - int returnArrayLengthIndex = java_functional->arrayOrBufferLengthIndex(0); + int returnArrayLengthIndex = java_functional->utilArgumentIndex(0); QString replacedReturnType = java_functional->typeReplaced(0); s << Qt::endl; if(!comment.trimmed().isEmpty()){ @@ -1533,21 +1527,21 @@ void JavaGenerator::writeFunctional(QTextStream &s, const MetaFunctional *java_f }else{ if(!replacedReturnType.isEmpty()){ registerPackage(replacedReturnType); - s << replacedReturnType.replace('$', '.'); + s << replacedReturnType.replace(u'$', u'.'); }else s << translateType(java_functional->type(), nullptr, Option(BoxedPrimitive | VarArgsAsArray | NoQCollectionContainers)); } }else{ Q_ASSERT(index<=uint(java_functional->arguments().size())); MetaArgument * arg = java_functional->arguments()[index-1]; - int arrayLengthIndex = java_functional->arrayOrBufferLengthIndex(arg->argumentIndex() + 1); + int arrayLengthIndex = java_functional->utilArgumentIndex(arg->argumentIndex() + 1); if(arrayLengthIndex>=0){ s << translateType(arg->type(), nullptr, Option(CollectionAsCollection)) << "[]"; }else{ QString replacedArgType = java_functional->typeReplaced(arg->argumentIndex() + 1); if(!replacedArgType.isEmpty()){ registerPackage(replacedArgType); - s << replacedArgType.replace('$', '.'); + s << replacedArgType.replace(u'$', u'.'); }else s << translateType(arg->type(), nullptr, Option(CollectionAsCollection)); } @@ -1595,7 +1589,7 @@ void JavaGenerator::writeFunctional(QTextStream &s, const MetaFunctional *java_f }else{ if(!replacedReturnType.isEmpty()){ registerPackage(replacedReturnType); - s << replacedReturnType.replace('$', '.'); + s << replacedReturnType.replace(u'$', u'.'); }else s << translateType(java_functional->type(), nullptr, Option(VarArgsAsArray | NoQCollectionContainers)); } @@ -1611,14 +1605,14 @@ void JavaGenerator::writeFunctional(QTextStream &s, const MetaFunctional *java_f continue; if(counter!=0) s << ", "; - int arrayLengthIndex = java_functional->arrayOrBufferLengthIndex(arg->argumentIndex() + 1); + int arrayLengthIndex = java_functional->utilArgumentIndex(arg->argumentIndex() + 1); if(arrayLengthIndex>=0){ s << translateType(arg->type(), nullptr, Option(CollectionAsCollection)) << "[]"; }else{ QString replacedArgType = java_functional->typeReplaced(arg->argumentIndex() + 1); if(!replacedArgType.isEmpty()){ registerPackage(replacedArgType); - s << replacedArgType.replace('$', '.'); + s << replacedArgType.replace(u'$', u'.'); }else s << translateType(arg->type(), nullptr, Option(CollectionAsCollection)); } @@ -1628,12 +1622,12 @@ void JavaGenerator::writeFunctional(QTextStream &s, const MetaFunctional *java_f for(const QString& pkg : qAsConst(m_exportedPackages)){ if(pkg!=java_functional->package() - && !pkg.isEmpty() - && m_typeSystemByPackage[pkg] - && m_typeSystemByPackage[pkg]->module()!="qtjambi" // because it's transitive - && m_typeSystemByPackage[pkg]!=m_typeSystemByPackage[java_functional->package()] - && !pkg.startsWith("io.qt.internal") - && pkg!="io.qt"){ + && !pkg.isEmpty() + && m_typeSystemByPackage[pkg] + && m_typeSystemByPackage[pkg]->module()!=QStringLiteral(u"qtjambi") // because it's transitive + && m_typeSystemByPackage[pkg]!=m_typeSystemByPackage[java_functional->package()] + && !pkg.startsWith(QStringLiteral(u"io.qt.internal")) + && pkg!=QStringLiteral(u"io.qt")){ needsSuppressExportsWarning = true; break; } @@ -1657,7 +1651,7 @@ void JavaGenerator::writeFunctional(QTextStream &s, const MetaFunctional *java_f closeParen = true; } else if (java_functional->type()->isTargetLangFlags()) { registerPackage(java_functional->type()->typeEntry()->qualifiedTargetLangName()); - s << "new " << java_functional->type()->typeEntry()->qualifiedTargetLangName().replace('$', '.') << "("; + s << "new " << java_functional->type()->typeEntry()->qualifiedTargetLangName().replace(u'$', u'.') << "("; closeParen = true; } } @@ -1721,14 +1715,14 @@ void JavaGenerator::writeFunctional(QTextStream &s, const MetaFunctional *java_f continue; if(hasArg) s << ", "; - int arrayLengthIndex = java_functional->arrayOrBufferLengthIndex(arg->argumentIndex()+1); + int arrayLengthIndex = java_functional->utilArgumentIndex(arg->argumentIndex()+1); if(arrayLengthIndex>=0){ s << translateType(arg->type(), nullptr, Option(CollectionAsCollection)) << "[]"; }else{ QString replacedArgType = java_functional->typeReplaced(arg->argumentIndex()+1); if(!replacedArgType.isEmpty()){ registerPackage(replacedArgType); - s << replacedArgType.replace('$', '.'); + s << replacedArgType.replace(u'$', u'.'); }else if(java_functional->useArgumentAsArray(arg->argumentIndex()+1)){ s << translateType(arg->type(), nullptr, Option(NoNullness | VarArgsAsArray | CollectionAsCollection | EnumAsInts)) << "[]"; }else{ @@ -1794,14 +1788,14 @@ void JavaGenerator::writeFunctional(QTextStream &s, const MetaFunctional *java_f continue; if(counter!=0) s << ", "; - int arrayLengthIndex = java_functional->arrayOrBufferLengthIndex(arg->argumentIndex() + 1); + int arrayLengthIndex = java_functional->utilArgumentIndex(arg->argumentIndex() + 1); if(arrayLengthIndex>=0){ s << translateType(arg->type(), nullptr, Option(CollectionAsCollection)) << "[]"; }else{ QString replacedArgType = java_functional->typeReplaced(arg->argumentIndex() + 1); if(!replacedArgType.isEmpty()){ registerPackage(replacedArgType); - s << replacedArgType.replace('$', '.'); + s << replacedArgType.replace(u'$', u'.'); }else s << translateType(arg->type(), nullptr, Option(CollectionAsCollection)); } @@ -1822,7 +1816,7 @@ void JavaGenerator::writeFunctional(QTextStream &s, const MetaFunctional *java_f closeParen = true; } else if (java_functional->type()->isTargetLangFlags()) { registerPackage(java_functional->type()->typeEntry()->qualifiedTargetLangName()); - s << "new " << java_functional->type()->typeEntry()->qualifiedTargetLangName().replace('$', '.') << "("; + s << "new " << java_functional->type()->typeEntry()->qualifiedTargetLangName().replace(u'$', u'.') << "("; closeParen = true; } } @@ -1886,14 +1880,14 @@ void JavaGenerator::writeFunctional(QTextStream &s, const MetaFunctional *java_f continue; if(hasArg) s << ", "; - int arrayLengthIndex = java_functional->arrayOrBufferLengthIndex(arg->argumentIndex()+1); + int arrayLengthIndex = java_functional->utilArgumentIndex(arg->argumentIndex()+1); if(arrayLengthIndex>=0){ s << translateType(arg->type(), nullptr, Option(NoNullness | CollectionAsCollection)) << "[]"; }else{ QString replacedArgType = java_functional->typeReplaced(arg->argumentIndex()+1); if(!replacedArgType.isEmpty()){ registerPackage(replacedArgType); - s << replacedArgType.replace('$', '.'); + s << replacedArgType.replace(u'$', u'.'); }else if(java_functional->useArgumentAsArray(arg->argumentIndex()+1)){ s << translateType(arg->type(), nullptr, Option(NoNullness | VarArgsAsArray | CollectionAsCollection | EnumAsInts)) << "[]"; }else{ @@ -1915,7 +1909,7 @@ void JavaGenerator::writeFunctional(QTextStream &s, const MetaFunctional *java_f } void JavaGenerator::writeEnum(QTextStream &s, const MetaEnum *java_enum) { - if(java_enum->isPrivate() || java_enum->typeEntry()->codeGeneration()==TypeEntry::GenerateNothing){ + if(java_enum->isPrivate() || (java_enum->typeEntry()->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateNothing){ return; } @@ -1923,26 +1917,26 @@ void JavaGenerator::writeEnum(QTextStream &s, const MetaEnum *java_enum) { QTextStream commentStream(&comment); if(!java_enum->brief().isEmpty()){ commentStream << "

" << QString(java_enum->brief()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "

" << Qt::endl; } commentStream << "

Java wrapper for Qt enum "; if(!java_enum->href().isEmpty()) commentStream << "href() << "\">"; - commentStream << (java_enum->typeEntry()->qualifiedCppName().startsWith("QtJambi") ? java_enum->name().replace("$", "::") : java_enum->typeEntry()->qualifiedCppName() ) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/"); + commentStream << (java_enum->typeEntry()->qualifiedCppName().startsWith(QStringLiteral(u"QtJambi")) ? java_enum->name().replace(QStringLiteral(u"$"), QStringLiteral(u"::")) : java_enum->typeEntry()->qualifiedCppName() ) + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")); if(!java_enum->href().isEmpty()) commentStream << ""; commentStream << "

" << Qt::endl; @@ -1951,13 +1945,13 @@ void JavaGenerator::writeEnum(QTextStream &s, const MetaEnum *java_enum) { if(!comment.isEmpty()) commentStream << Qt::endl; commentStream << "@deprecated " << QString(java_enum->deprecatedComment()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << Qt::endl; } } @@ -2040,7 +2034,7 @@ void JavaGenerator::writeEnum(QTextStream &s, const MetaEnum *java_enum) { for (int i = 0; i < values.size(); ++i) { MetaEnumValue *enum_value = values.at(i); if (java_enum->typeEntry()->isEnumValueRejected(enum_value->name()) && !java_enum->typeEntry()->isEnumValueRemoveRejected(enum_value->name())){ - rejected << QString("\"%1\"").arg(renamedEnumValues.value(enum_value->name(), enum_value->name())); + rejected << QStringLiteral(u"\"%1\"").arg(renamedEnumValues.value(enum_value->name(), enum_value->name())); } } if(!rejected.isEmpty()){ @@ -2060,39 +2054,39 @@ void JavaGenerator::writeEnum(QTextStream &s, const MetaEnum *java_enum) { QString enumInterface; switch(size){ case 8: - type = "byte"; + type = QStringLiteral(u"byte"); if(java_enum->typeEntry()->flags()) - enumInterface = "QtByteFlagEnumerator"; + enumInterface = QStringLiteral(u"QtByteFlagEnumerator"); else - enumInterface = "QtByteEnumerator"; + enumInterface = QStringLiteral(u"QtByteEnumerator"); break; case 16: - type = "short"; + type = QStringLiteral(u"short"); if(java_enum->typeEntry()->flags()) - enumInterface = "QtShortFlagEnumerator"; + enumInterface = QStringLiteral(u"QtShortFlagEnumerator"); else - enumInterface = "QtShortEnumerator"; + enumInterface = QStringLiteral(u"QtShortEnumerator"); break; case 32: - type = "int"; + type = QStringLiteral(u"int"); if(java_enum->typeEntry()->flags()) - enumInterface = "QtFlagEnumerator"; + enumInterface = QStringLiteral(u"QtFlagEnumerator"); else - enumInterface = "QtEnumerator"; + enumInterface = QStringLiteral(u"QtEnumerator"); break; case 64: - type = "long"; + type = QStringLiteral(u"long"); if(java_enum->typeEntry()->flags()) - enumInterface = "QtLongFlagEnumerator"; + enumInterface = QStringLiteral(u"QtLongFlagEnumerator"); else - enumInterface = "QtLongEnumerator"; + enumInterface = QStringLiteral(u"QtLongEnumerator"); break; default: - type = "int"; + type = QStringLiteral(u"int"); if(java_enum->typeEntry()->flags()) - enumInterface = "QtFlagEnumerator"; + enumInterface = QStringLiteral(u"QtFlagEnumerator"); else - enumInterface = "QtEnumerator"; + enumInterface = QStringLiteral(u"QtEnumerator"); break; } @@ -2135,18 +2129,18 @@ void JavaGenerator::writeEnum(QTextStream &s, const MetaEnum *java_enum) { commentStream << "

Representing "; if(!java_enum->href().isEmpty()) commentStream << "href() << "\">"; - commentStream << (QStringList(enumScope) << enum_value->name()).join("::"); + commentStream << (QStringList(enumScope) << enum_value->name()).join(QStringLiteral(u"::")); if(!java_enum->href().isEmpty()) commentStream << ""; commentStream << "

" << Qt::endl << "@deprecated " << QString(enum_value->deprecatedComment()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << Qt::endl; } s << INDENT << "@Deprecated" << Qt::endl; @@ -2155,7 +2149,7 @@ void JavaGenerator::writeEnum(QTextStream &s, const MetaEnum *java_enum) { commentStream << "

Representing "; if(!java_enum->href().isEmpty()) commentStream << "href() << "\">"; - commentStream << (QStringList(enumScope) << enum_value->name()).join("::"); + commentStream << (QStringList(enumScope) << enum_value->name()).join(QStringLiteral(u"::")); if(!java_enum->href().isEmpty()) commentStream << ""; commentStream << "

"; @@ -2267,19 +2261,19 @@ void JavaGenerator::writeEnum(QTextStream &s, const MetaEnum *java_enum) { if (entry->isExtensible()) { switch(size){ case 8: - numberType = "java.lang.Byte"; + numberType = QStringLiteral(u"java.lang.Byte"); break; case 16: - numberType = "java.lang.Short"; + numberType = QStringLiteral(u"java.lang.Short"); break; case 32: - numberType = "java.lang.Integer"; + numberType = QStringLiteral(u"java.lang.Integer"); break; case 64: - numberType = "java.lang.Long"; + numberType = QStringLiteral(u"java.lang.Long"); break; default: - numberType = "java.lang.Integer"; + numberType = QStringLiteral(u"java.lang.Integer"); break; } } @@ -2612,21 +2606,22 @@ void JavaGenerator::writePrivateNativeFunction(QTextStream &s, const MetaFunctio if(needsComma) s << ", "; needsComma = true; - s << QString(argumentMod.modified_type).replace('$', '.') << " " << argumentMod.modified_name; + s << QString(argumentMod.modified_type).replace(u'$', u'.') << " " << argumentMod.modified_name; ++argumentCounter; } for (int i = 0; i < arguments.count(); ++i) { const MetaArgument *arg = arguments.at(i); if (java_function->argumentRemoved(arg->argumentIndex() + 1)==ArgumentRemove_No) { - if(java_function->isConstructor()) + if(java_function->isConstructor()){ writeFunctionArgument(s, java_function, arg, needsComma, nullptr, Option(NoNullness | CollectionAsCollection | VarArgsAsArray)); - else if (!arg->type()->hasNativeId() - || !java_function->typeReplaced(arg->argumentIndex()+1).isEmpty() - || java_function->useArgumentAsArray(arg->argumentIndex()+1) - || java_function->useArgumentAsBuffer(arg->argumentIndex()+1)) + }else if ((!arg->type()->hasNativeId() + || !java_function->typeReplaced(arg->argumentIndex()+1).isEmpty() + || java_function->useArgumentAsArray(arg->argumentIndex()+1) + || java_function->useArgumentAsBuffer(arg->argumentIndex()+1) + ) && !java_function->useArgumentAsSlotContext(arg->argumentIndex()+1)){ writeFunctionArgument(s, java_function, arg, needsComma, nullptr, Option(NoNullness | EnumAsInts | UseNativeIds | CollectionAsCollection | VarArgsAsArray)); - else{ + }else{ if (needsComma) s << ", "; needsComma = true; @@ -2639,7 +2634,7 @@ void JavaGenerator::writePrivateNativeFunction(QTextStream &s, const MetaFunctio if(needsComma) s << ", "; needsComma = true; - s << QString(argumentMod.modified_type).replace('$', '.') << " " << argumentMod.modified_name; + s << QString(argumentMod.modified_type).replace(u'$', u'.') << " " << argumentMod.modified_name; ++argumentCounter; } } @@ -2648,7 +2643,7 @@ void JavaGenerator::writePrivateNativeFunction(QTextStream &s, const MetaFunctio s << ", "; needsComma = true; registerPackage(argumentMod.modified_type); - s << QString(argumentMod.modified_type).replace('$', '.') << " " << argumentMod.modified_name; + s << QString(argumentMod.modified_type).replace(u'$', u'.') << " " << argumentMod.modified_name; } s << ")"; @@ -2721,7 +2716,7 @@ void JavaGenerator::writeInjectedCode(QTextStream &s, const MetaFunction *java_f || position==CodeSnip::Beginning ); - for(const FunctionModification& mod : mods) { + for(const FunctionModification& mod : qAsConst(mods)) { if (mod.snips.count() <= 0) continue ; @@ -2741,18 +2736,17 @@ void JavaGenerator::writeInjectedCode(QTextStream &s, const MetaFunction *java_f QString meta_name = it.value(); if(pos == -1){ - code = code.replace(meta_name, "__qt_return_value"); + code = code.replace(meta_name, QStringLiteral(u"__qt_return_value")); }else if (pos >= 0 && pos < arguments.count()) { code = code.replace(meta_name, arguments.at(pos)->modifiedArgumentName()); } else { - QString debug = QString("argument map specifies invalid argument index %1" - "for function '%2'") + QString debug = QStringLiteral(u"argument map specifies invalid argument index %1 for function '%2'") .arg(pos + 1).arg(java_function->name()); ReportHandler::warning(debug); } } - code = code.replace("%this", "this"); + code = code.replace(QStringLiteral(u"%this"), QStringLiteral(u"this")); QStringList lines = code.split("\n"); if(position==CodeSnip::Comment){ INDENTATIONRESET(INDENT) @@ -2765,12 +2759,6 @@ void JavaGenerator::writeInjectedCode(QTextStream &s, const MetaFunction *java_f } void JavaGenerator::writeJavaCallThroughContents(QTextStream &s, const MetaFunction *java_function, uint attributes) { -// if((java_function->isAbstract() || !(java_function->originalAttributes() & AbstractMetaAttributes::Public)) && !java_function->implementingClass()->generateShellClass()){ -// s << INDENT << "throw new QNoImplementationException();" << Qt::endl; -// }else -// if(java_function->isAbstract() && java_function->implementingClass()->hasUnimplmentablePureVirtualFunction()){ -// s << INDENT << "throw new QNoImplementationException();" << Qt::endl; -// }else { const MetaArgumentList& arguments = java_function->arguments(); @@ -2916,8 +2904,8 @@ void JavaGenerator::writeJavaCallThroughContents(QTextStream &s, const MetaFunct << arg->modifiedArgumentName() << ".length + \", expected: " << minArrayLength << "\");" << Qt::endl; } } - if(java_function->insertArrayOffsetArgument(arg->argumentIndex() + 1)){ - int lengthParameter = java_function->arrayOrBufferLengthIndex(arg->argumentIndex() + 1); + if(java_function->insertUtilArgument(arg->argumentIndex() + 1)){ + int lengthParameter = java_function->utilArgumentIndex(arg->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=java_function->arguments().size()){ const MetaArgument *lengthParam = java_function->arguments()[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -2929,7 +2917,7 @@ void JavaGenerator::writeJavaCallThroughContents(QTextStream &s, const MetaFunct } } if(lengthParam && java_function->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ - QString offsetName = "offsetOf"; + QString offsetName = QStringLiteral(u"offsetOf"); QString modifiedArgumentName = arg->modifiedArgumentName(); modifiedArgumentName[0] = modifiedArgumentName[0].toUpper(); offsetName += modifiedArgumentName; @@ -2947,27 +2935,33 @@ void JavaGenerator::writeJavaCallThroughContents(QTextStream &s, const MetaFunct bool has_argument_referenceCounts = false; QMap> referenceCounts; - for (int i = -1; i <= arguments.size(); ++i) { - referenceCounts[i] = java_function->referenceCounts(java_function->implementingClass(), i); - if (referenceCounts[i].size() > 0) { - for(const ReferenceCount& refCount : referenceCounts[i]) { - // We just want to know this to secure return value into local variable - // to hold over ReferenceCount management later on. - if (refCount.action != ReferenceCount::Ignore) { - // Something active have been specified - has_argument_referenceCounts = true; - break; - } + if(!java_function->isStatic()) + referenceCounts[-1] = java_function->referenceCounts(java_function->implementingClass(), -1); + if(!java_function->isConstructor()) + referenceCounts[0] = java_function->referenceCounts(java_function->implementingClass(), 0); + for (const MetaArgument* argument : qAsConst(arguments)) { + referenceCounts[argument->argumentIndex()+1] = java_function->referenceCounts(java_function->implementingClass(), argument->argumentIndex()+1); + } + for(const QList& list : qAsConst(referenceCounts)){ + for(const ReferenceCount& refCount : list) { + // We just want to know this to secure return value into local variable + // to hold over ReferenceCount management later on. + if (refCount.action != ReferenceCount::Ignore) { + // Something active have been specified + has_argument_referenceCounts = true; + break; } } + if(has_argument_referenceCounts) + break; } // Lookup if there is a reference-count action required on the return value. MetaType *return_type = java_function->type(); QString new_return_type = java_function->typeReplaced(0); registerPackage(new_return_type); - new_return_type = new_return_type.replace('$', '.'); - bool has_return_type = (new_return_type != "void" + new_return_type = new_return_type.replace(u'$', u'.'); + bool has_return_type = (new_return_type != QStringLiteral(u"void") && (!new_return_type.isEmpty() || return_type)) || java_function->isSelfReturningFunction(); TS::Ownership returnValueOwnership = java_function->ownership(java_function->implementingClass(), TS::TargetLangCode, 0).ownership; TS::Ownership thisOwnership = java_function->ownership(java_function->implementingClass(), TS::TargetLangCode, -1).ownership; @@ -2982,7 +2976,7 @@ void JavaGenerator::writeJavaCallThroughContents(QTextStream &s, const MetaFunct || has_code_injections_at_the_end); s << INDENT; - if (has_return_type && (java_function->argumentReplaced(0).isEmpty() || java_function->argumentReplaced(0)=="this")) { + if (has_return_type && (java_function->argumentReplaced(0).isEmpty() || java_function->argumentReplaced(0)==QStringLiteral(u"this"))) { if (needs_return_variable) { if (new_return_type.isEmpty()) s << translateType(return_type, java_function->implementingClass()); @@ -2999,7 +2993,7 @@ void JavaGenerator::writeJavaCallThroughContents(QTextStream &s, const MetaFunct s << static_cast(return_type->typeEntry())->qualifiedTargetLangName() << ".resolve("; } else if (return_type->isTargetLangFlags()) { registerPackage(return_type->typeEntry()->qualifiedTargetLangName()); - s << "new " << return_type->typeEntry()->qualifiedTargetLangName().replace('$', '.') << "("; + s << "new " << return_type->typeEntry()->qualifiedTargetLangName().replace(u'$', u'.') << "("; } } } @@ -3048,8 +3042,8 @@ void JavaGenerator::writeJavaCallThroughContents(QTextStream &s, const MetaFunct s << arg->modifiedArgumentName(); }else if(java_function->useArgumentAsArray(arg->argumentIndex()+1)){ s << arg->modifiedArgumentName(); - if(java_function->insertArrayOffsetArgument(arg->argumentIndex() + 1)){ - int lengthParameter = java_function->arrayOrBufferLengthIndex(arg->argumentIndex() + 1); + if(java_function->insertUtilArgument(arg->argumentIndex() + 1)){ + int lengthParameter = java_function->utilArgumentIndex(arg->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=java_function->arguments().size()){ const MetaArgument *lengthParam = java_function->arguments()[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -3072,7 +3066,7 @@ void JavaGenerator::writeJavaCallThroughContents(QTextStream &s, const MetaFunct s << arg->modifiedArgumentName(); }else if (type->isTargetLangEnum() || type->isTargetLangFlags()) { s << arg->modifiedArgumentName() << ".value()"; - }else if (type->hasNativeId()) { + }else if (type->hasNativeId() || java_function->useArgumentAsSlotContext(arg->argumentIndex()+1)) { s << "QtJambi_LibraryUtilities.internal.checkedNativeId(" << arg->modifiedArgumentName() << ")"; } else { s << arg->modifiedArgumentName(); @@ -3109,21 +3103,24 @@ void JavaGenerator::writeJavaCallThroughContents(QTextStream &s, const MetaFunct s << setArgumentOwnership; - for(const ReferenceCount& refCount : referenceCounts[-1]) - writeReferenceCount(s, refCount, -1, java_function, java_function->isStatic() ? QLatin1String("null") : QLatin1String("this")); + if(!java_function->isStatic()){ + for(const ReferenceCount& refCount : qAsConst(referenceCounts[-1])) + writeReferenceCount(s, refCount, -1, java_function, java_function->isStatic() ? QLatin1String("null") : QLatin1String("this")); + } // We must ensure we retain a Java hard-reference over the native method call // so that the GC will not destroy the C++ object too early. At this point we // have called the native method call so can manage referenceCount issues. // First the input arguments - for (const MetaArgument* argument : arguments) { + for (const MetaArgument* argument : qAsConst(arguments)) { for(const ReferenceCount& refCount : referenceCounts[argument->argumentIndex()+1]) writeReferenceCount(s, refCount, argument->argumentIndex()+1, java_function, java_function->isStatic() ? QLatin1String("null") : QLatin1String("this")); } // Then the return value - for(const ReferenceCount& referenceCount : referenceCounts[0]) { - writeReferenceCount(s, referenceCount, 0, java_function, java_function->isStatic() ? QLatin1String("null") : QLatin1String("this")); + if(!java_function->isConstructor()){ + for(const ReferenceCount& referenceCount : qAsConst(referenceCounts[0])) + writeReferenceCount(s, referenceCount, 0, java_function, java_function->isStatic() ? QLatin1String("null") : QLatin1String("this")); } writeInjectedCode(s, java_function, CodeSnip::Position3); @@ -3174,7 +3171,7 @@ void JavaGenerator::writeSignal(QTextStream &s, const MetaFunction *java_functio signalTypeName += "PrivateSignal"; }else{ signalTypeName += "Signal"; - for (const MetaArgument* argument : arguments) { + for (const MetaArgument* argument : qAsConst(arguments)) { QString defaultValueExpression = argument->defaultValueExpression(); if(!defaultValueExpression.isEmpty()){ defaultValueExpressions << defaultValueExpression; @@ -3182,10 +3179,10 @@ void JavaGenerator::writeSignal(QTextStream &s, const MetaFunction *java_functio QString type = java_function->typeReplaced(argument->argumentIndex() + 1); if (type.isEmpty()){ - type = translateType(argument->type(), java_function->implementingClass(), Option(BoxedPrimitive | VarArgsAsArray | NoQCollectionContainers)); + type = translateType(argument->type(), java_function->implementingClass(), java_function->isPrivateSignal() ? Option(BoxedPrimitive | VarArgsAsArray) : Option(BoxedPrimitive | VarArgsAsArray | NoQCollectionContainers)); }else{ registerPackage(type); - type = type.replace('$', '.'); + type = type.replace(u'$', u'.'); } defaultValueArgumentType << type; @@ -3243,32 +3240,32 @@ void JavaGenerator::writeSignal(QTextStream &s, const MetaFunction *java_functio QString boxedType; if (modifiedType.isEmpty()){ - boxedType = translateType(argument->type(), java_function->implementingClass(), Option(BoxedPrimitive | VarArgsAsArray | NoQCollectionContainers)); + boxedType = translateType(argument->type(), java_function->implementingClass(), java_function->isPrivateSignal() ? Option(BoxedPrimitive | VarArgsAsArray) : Option(BoxedPrimitive | VarArgsAsArray | NoQCollectionContainers)); }else{ registerPackage(modifiedType); - boxedType = modifiedType.replace('$', '.'); - } - QString typeAnnotation = QString("java.lang.@QtPrimitiveType@StrictNonNull "); - if(boxedType=="java.lang.Integer"){ - boxedType = typeAnnotation + "Integer"; - }else if(boxedType=="java.lang.Short"){ - boxedType = typeAnnotation + "Short"; - }else if(boxedType=="java.lang.Byte"){ - boxedType = typeAnnotation + "Byte"; - }else if(boxedType=="java.lang.Long"){ - boxedType = typeAnnotation + "Long"; - }else if(boxedType=="java.lang.Double"){ - boxedType = typeAnnotation + "Double"; - }else if(boxedType=="java.lang.Float"){ - boxedType = typeAnnotation + "Float"; - }else if(boxedType=="java.lang.Boolean"){ - boxedType = typeAnnotation + "Boolean"; - }else if(boxedType=="java.lang.Character"){ - boxedType = typeAnnotation + "Character"; + boxedType = modifiedType.replace(u'$', u'.'); + } + QString typeAnnotation = QStringLiteral(u"java.lang.@QtPrimitiveType@StrictNonNull "); + if(boxedType==QStringLiteral(u"java.lang.Integer")){ + boxedType = typeAnnotation + QStringLiteral(u"Integer"); + }else if(boxedType==QStringLiteral(u"java.lang.Short")){ + boxedType = typeAnnotation + QStringLiteral(u"Short"); + }else if(boxedType==QStringLiteral(u"java.lang.Byte")){ + boxedType = typeAnnotation + QStringLiteral(u"Byte"); + }else if(boxedType==QStringLiteral(u"java.lang.Long")){ + boxedType = typeAnnotation + QStringLiteral(u"Long"); + }else if(boxedType==QStringLiteral(u"java.lang.Double")){ + boxedType = typeAnnotation + QStringLiteral(u"Double"); + }else if(boxedType==QStringLiteral(u"java.lang.Float")){ + boxedType = typeAnnotation + QStringLiteral(u"Float"); + }else if(boxedType==QStringLiteral(u"java.lang.Boolean")){ + boxedType = typeAnnotation + QStringLiteral(u"Boolean"); + }else if(boxedType==QStringLiteral(u"java.lang.Character")){ + boxedType = typeAnnotation + QStringLiteral(u"Character"); } signalTypeName += boxedType; } - signalTypeName += ">"; + signalTypeName += u'>'; } uint exclude_attributes = MetaAttributes::Abstract @@ -3279,7 +3276,7 @@ void JavaGenerator::writeSignal(QTextStream &s, const MetaFunction *java_functio QString signalName = java_function->name(); FunctionModificationList mods = java_function->modifications(java_function->implementingClass()); - for(const FunctionModification& mod : mods) { + for(const FunctionModification& mod : qAsConst(mods)) { if (mod.isAccessModifier()) { exclude_attributes |= MetaAttributes::Public | MetaAttributes::Protected @@ -3307,13 +3304,13 @@ void JavaGenerator::writeSignal(QTextStream &s, const MetaFunction *java_functio QTextStream commentStream(&comment); if(!java_function->brief().isEmpty()){ commentStream << "

" << QString(java_function->brief()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "

" << Qt::endl; } commentStream << "

See "; @@ -3321,25 +3318,25 @@ void JavaGenerator::writeSignal(QTextStream &s, const MetaFunction *java_functio commentStream << "href() << "\">"; if(java_function->declaringClass()) commentStream << java_function->declaringClass()->qualifiedCppName() - .replace("", "") - .replace("QtJambi", "Q") - .replace("QVoid", "Q") - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u""), QString()) + .replace(QStringLiteral(u"QtJambi"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"QVoid"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "::"; commentStream << QString(java_function->originalSignature()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) .replace(",", ","); if(!java_function->href().isEmpty()) commentStream << ""; @@ -3365,7 +3362,7 @@ void JavaGenerator::writeSignal(QTextStream &s, const MetaFunction *java_functio { QTextStream s2(&ident); writeFunctionAttributes(s2, java_function, -1, include_attributes, exclude_attributes, - Option(SkipReturnType | VarArgsAsArray | NoQCollectionContainers)); + Option(SkipReturnType)); if(m_nullness) s2 << "@NonNull "; s2 << signalTypeName << " " << signalName << " = new " << constructorCall << "("; @@ -3405,13 +3402,13 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig << INDENT << " *

    " << Qt::endl; for(MetaFunction* java_function : signalList){ s << INDENT << " *
  • " << java_function->signature() - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "
  • " << Qt::endl; } s << INDENT << " *
" << Qt::endl @@ -3439,9 +3436,9 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig QList defaultValueArgumentType; QList defaultValueExpressions; - QString constructorCall("Signal"); + QString constructorCall = QStringLiteral(u"Signal"); if (java_function->isPrivateSignal()) { - constructorCall = "PrivateSignal"; + constructorCall = QStringLiteral(u"PrivateSignal"); }else{ for (int i = 0; i < sz; ++i) { auto arg = arguments.at(i); @@ -3452,10 +3449,10 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig QString type = java_function->typeReplaced(arg->argumentIndex() + 1); if (type.isEmpty()){ - type = translateType(arg->type(), java_function->implementingClass(), Option(BoxedPrimitive | VarArgsAsArray | NoQCollectionContainers)); + type = translateType(arg->type(), java_function->implementingClass(), java_function->isPrivateSignal() ? Option(BoxedPrimitive | VarArgsAsArray) : Option(BoxedPrimitive | VarArgsAsArray | NoQCollectionContainers)); }else{ registerPackage(type); - type = type.replace('$', '.'); + type = type.replace(u'$', u'.'); } defaultValueArgumentType << type; @@ -3497,21 +3494,21 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig if (modifiedType.isEmpty()){ boxedType += translateType(arg->type(), java_function->implementingClass(), Option(BoxedPrimitive | VarArgsAsArray)); QString type = translateType(arg->type(), java_function->implementingClass(), Option(NoNullness | VarArgsAsArray)); - auto idx = type.indexOf('<'); + auto idx = type.indexOf(u'<'); if(idx>0){ type = type.mid(0, idx); - if(type=="io.qt.core.QList") - type = "java.util.List"; - else if(type=="io.qt.core.QMap" || type=="io.qt.core.QHash") - type = "java.util.Map"; - else if(type=="io.qt.core.QSet") - type = "java.util.Set"; + if(type==QStringLiteral(u"io.qt.core.QList")) + type = QStringLiteral(u"java.util.List"); + else if(type==QStringLiteral(u"io.qt.core.QMap") || type==QStringLiteral(u"io.qt.core.QHash")) + type = QStringLiteral(u"java.util.Map"); + else if(type==QStringLiteral(u"io.qt.core.QSet")) + type = QStringLiteral(u"java.util.Set"); } unboxedType += type; }else{ registerPackage(modifiedType); - boxedType += modifiedType.replace('$', '.'); - unboxedType += annotationFreeTypeName(modifiedType.replace('$', '.')); + boxedType += modifiedType.replace(u'$', u'.'); + unboxedType += annotationFreeTypeName(modifiedType.replace(u'$', u'.')); } signalObjectType += boxedType; signalParameterClasses += unboxedType+".class"; @@ -3530,11 +3527,7 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig first = false; } } - /*if(hasDefaults){ - s << INDENT << "super(" << configurations << ");" << Qt::endl; - }else{*/ - s << INDENT << "super();" << Qt::endl; - //} + s << INDENT << "super();" << Qt::endl; } s << INDENT << "}" << Qt::endl << Qt::endl; QSet writtenConnects; @@ -3546,7 +3539,7 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig QString annotations; { QTextStream s2(&annotations); - for(const QString& signalParameterClasses : signalParameterClassesList[it.key()]){ + for(const QString& signalParameterClasses : qAsConst(signalParameterClassesList[it.key()])){ s2 << "@QtAllowedTypeSet({" << signalParameterClasses << "})" << Qt::endl << INDENT; } } @@ -3576,7 +3569,7 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig s << INDENT << " *

The only valid call is " << signalName << ".overload(" << signalParameterClassesList[it.key()].first() << ")

" << Qt::endl; }else{ s << INDENT << " *

The only valid calls are:

    " << Qt::endl; - for(const QString& signalParameterClasses : signalParameterClassesList[it.key()]){ + for(const QString& signalParameterClasses : qAsConst(signalParameterClassesList[it.key()])){ s << INDENT << " *
  • " << signalName << ".overload(" << signalParameterClasses << ")
  • " << Qt::endl; } s << INDENT << " *
" << Qt::endl; @@ -3603,8 +3596,8 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig << INDENT << "}" << Qt::endl << Qt::endl; } - QString nonNull = m_nullness ? QStringLiteral("@NonNull ") : QString{}; - QString snonNull = m_nullness ? QStringLiteral("@StrictNonNull ") : QString{}; + QString nonNull = m_nullness ? QStringLiteral(u"@NonNull ") : QString{}; + QString snonNull = m_nullness ? QStringLiteral(u"@StrictNonNull ") : QString{}; QString arrayNonNull = m_nullness ? QStringLiteral(" @NonNull") : QString{}; if(it.key()>0){ s << INDENT << "/**" << Qt::endl @@ -3683,11 +3676,11 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig for(int j=0; j type%2")).arg(letter).arg(j+1); - vars << QString(QLatin1String("type%1")).arg(j+1); - parameterClasses << QString(QLatin1String("(Class<%1>)parameters[%2]")).arg(letter).arg(j); + classes << QStringLiteral(u"Class<%1> type%2").arg(letter).arg(j+1); + vars << QStringLiteral(u"type%1").arg(j+1); + parameterClasses << QStringLiteral(u"(Class<%1>)parameters[%2]").arg(letter).arg(j); } - parameters = QString(QLatin1String("<%1>")).arg(params.join(",")); + parameters = QStringLiteral(u"<%1>").arg(params.join(QStringLiteral(u","))); } s << INDENT << "/**" << Qt::endl << INDENT << " * Initializes a connection to the slot." << Qt::endl @@ -3741,13 +3734,13 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig QTextStream commentStream(&comment); if(!java_function->brief().isEmpty()){ commentStream << "

" << QString(java_function->brief()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "

" << Qt::endl; } commentStream << "

See "; @@ -3755,25 +3748,25 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig commentStream << "href() << "\">"; if(java_function->declaringClass()) commentStream << java_function->declaringClass()->qualifiedCppName() - .replace("", "") - .replace("QtJambi", "Q") - .replace("QVoid", "Q") - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u""), QString()) + .replace(QStringLiteral(u"QtJambi"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"QVoid"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "::"; commentStream << QString(java_function->originalSignature()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) .replace(",", ","); if(!java_function->href().isEmpty()) commentStream << ""; @@ -3798,34 +3791,34 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig bool hasInstantiations = false; for(int i = 0; i < java_function->arguments().size(); i++){ QString type = translateType(java_function->arguments().at(i)->type(), java_function->implementingClass(), Option(NoNullness | VarArgsAsArray)); - auto idx = type.indexOf('<'); + auto idx = type.indexOf(u'<'); if(idx>0){ type = type.mid(0, idx); - if(type=="io.qt.core.QList") - type = "java.util.List"; - else if(type=="io.qt.core.QMap" || type=="io.qt.core.QHash") - type = "java.util.Map"; - else if(type=="io.qt.core.QSet") - type = "java.util.Set"; + if(type==QStringLiteral(u"io.qt.core.QList")) + type = QStringLiteral(u"java.util.List"); + else if(type==QStringLiteral(u"io.qt.core.QMap") || type==QStringLiteral(u"io.qt.core.QHash")) + type = QStringLiteral(u"java.util.Map"); + else if(type==QStringLiteral(u"io.qt.core.QSet")) + type = QStringLiteral(u"java.util.Set"); hasInstantiations = true; } - classes << type+".class"; + classes << type+QStringLiteral(u".class"); } m_exportedPackages.clear(); QString sig = functionSignature(java_function, java_function->isPrivateSignal() ? MetaAttributes::Private : MetaAttributes::Public, ( java_function->isPrivateSignal() ? MetaAttributes::Public : 0 ) | MetaAttributes::Native | MetaAttributes::Override, - Option(NoSuppressExports), {}, -1, "emit");// << "public final void emit(" + Option(NoSuppressExports), {}, -1, QStringLiteral(u"emit"));// << "public final void emit(" bool exp = false; for(const QString& pkg : qAsConst(m_exportedPackages)){ if(pkg!=java_function->implementingClass()->package() - && !pkg.isEmpty() - && !pkg.startsWith("io.qt.internal") - && pkg!="io.qt" - && m_typeSystemByPackage[pkg] - && !m_typeSystemByPackage[pkg]->module().isEmpty() - && m_typeSystemByPackage[pkg]->module()!="qtjambi" // because it's transitive - ){ + && !pkg.isEmpty() + && !pkg.startsWith(QStringLiteral(u"io.qt.internal")) + && pkg!=QStringLiteral(u"io.qt") + && m_typeSystemByPackage[pkg] + && !m_typeSystemByPackage[pkg]->module().isEmpty() + && m_typeSystemByPackage[pkg]->module()!=QStringLiteral(u"qtjambi") // because it's transitive + ){ exp = true; break; } @@ -3852,7 +3845,7 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig s << INDENT << " io.qt.core.QObject.emit(("; if(hasInstantiations){ QString signalType = signalTypes.value(java_function); - auto idx = signalType.indexOf('<'); + auto idx = signalType.indexOf(u'<'); if(idx>0){ signalType = signalType.mid(0, idx); } @@ -3861,7 +3854,7 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig s << signalTypes.value(java_function); } s << ")overload("; - s << classes.join(", ") << "), "; + s << classes.join(QStringLiteral(u", ")) << "), "; for(int i = 0; i < java_function->arguments().size(); i++){ if(i!=0) s << ", "; @@ -3872,7 +3865,7 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig s << INDENT << " (("; if(hasInstantiations){ QString signalType = signalTypes.value(java_function); - auto idx = signalType.indexOf('<'); + auto idx = signalType.indexOf(u'<'); if(idx>0){ signalType = signalType.mid(0, idx); } @@ -3881,7 +3874,7 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig s << signalTypes.value(java_function); } s << ")overload("; - s << classes.join(", ") << ")).emit("; + s << classes.join(QStringLiteral(u", ")) << ")).emit("; for(int i = 0; i < java_function->arguments().size(); i++){ if(i!=0) s << ", "; @@ -3898,7 +3891,7 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig s2 << ")"; s2.flush(); if(m_currentMethodSignatures.contains(javaSignature)){ - ReportHandler::warning(QString("Duplicate Java method %1 in %2").arg(javaSignature, java_function->ownerClass()->qualifiedCppName())); + ReportHandler::warning(QStringLiteral(u"Duplicate Java method %1 in %2").arg(javaSignature, java_function->ownerClass()->qualifiedCppName())); } m_currentMethodSignatures.insert(javaSignature, nullptr); } @@ -3907,7 +3900,7 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig writeFunctionOverloads(s, java_function, java_function->isPrivateSignal() ? MetaAttributes::Private : MetaAttributes::Public, ( java_function->isPrivateSignal() ? MetaAttributes::Public : 0 ) | MetaAttributes::Native, - Option(NoOption), "emit"); + Option(NoOption), QStringLiteral(u"emit")); } m_currentMethodSignatures.swap(previousMethodSignatures); } @@ -3918,13 +3911,13 @@ void JavaGenerator::writeMultiSignal(QTextStream &s, const MetaFunctionList& sig << INDENT << " *

    " << Qt::endl; for(MetaFunction* java_function : signalList){ s << INDENT << " *
  • " << QString(java_function->originalSignature()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) .replace(",", ",") << "
  • " << Qt::endl; } s << INDENT << " *
" << Qt::endl @@ -3941,7 +3934,7 @@ void JavaGenerator::retrieveModifications(const MetaFunction *java_function, uint *include_attributes, Option) const { FunctionModificationList mods = java_function->modifications(java_class); // printf("name: %s has %d mods\n", qPrintable(java_function->signature()), mods.size()); - for(const FunctionModification& mod : mods) { + for(const FunctionModification& mod : qAsConst(mods)) { if (mod.isAccessModifier()) { // printf(" -> access mod to %x\n", mod.modifiers); *exclude_attributes |= MetaAttributes::Public @@ -4027,9 +4020,9 @@ void JavaGenerator::writeReferenceCount(QTextStream &s, const ReferenceCount &re const MetaArgumentList& arguments = java_function->arguments(); QString argumentName; if(argumentIndex==-1){ - argumentName = QLatin1String("this"); + argumentName = thisName; }else if(argumentIndex==0){ - argumentName = QLatin1String("__qt_return_value"); + argumentName = QStringLiteral(u"__qt_return_value"); }else if(argumentIndex-1modifiedArgumentName(); }else{ @@ -4047,13 +4040,13 @@ void JavaGenerator::writeReferenceCount(QTextStream &s, const ReferenceCount &re QScopedPointer indentation; QString condition = refCount.condition; - condition = condition.replace("%in", argumentName); - condition = condition.replace("%arg", argumentName); - condition = condition.replace("%this", "this"); - condition = condition.replace("%0", "__qt_return_value"); - condition = condition.replace("%return", "__qt_return_value"); + condition = condition.replace(QStringLiteral(u"%in"), argumentName); + condition = condition.replace(QStringLiteral(u"%arg"), argumentName); + condition = condition.replace(QStringLiteral(u"%this"), thisName); + condition = condition.replace(QStringLiteral(u"%0"), QStringLiteral(u"__qt_return_value")); + condition = condition.replace(QStringLiteral(u"%return"), QStringLiteral(u"__qt_return_value")); for(const MetaArgument* argument : arguments){ - condition = condition.replace(QString("%")+QString::number(argument->argumentIndex()+1), argument->modifiedArgumentName()); + condition = condition.replace(QStringLiteral(u"%")+QString::number(argument->argumentIndex()+1), argument->modifiedArgumentName()); } if (refCount.action != ReferenceCount::Set) { if(nullPointersDisabled){ @@ -4081,15 +4074,15 @@ void JavaGenerator::writeReferenceCount(QTextStream &s, const ReferenceCount &re declareVariable = types[0]->qualifiedTargetLangName(); } }else if(java_function->isAbstract()){ - if(java_function->ownerClass()->typeEntry()->lookupName().endsWith("$Impl$ConcreteWrapper")){ + if(java_function->ownerClass()->typeEntry()->lookupName().endsWith(QStringLiteral(u"$Impl$ConcreteWrapper"))){ QString lookupName = java_function->ownerClass()->typeEntry()->lookupName(); lookupName.chop(16); - declareVariable = java_function->ownerClass()->typeEntry()->javaPackage() + "." + lookupName.replace('$', '.'); - }else if(java_function->ownerClass()->typeEntry()->lookupName().endsWith("$ConcreteWrapper")){ + declareVariable = java_function->ownerClass()->typeEntry()->javaPackage() + "." + lookupName.replace(u'$', u'.'); + }else if(java_function->ownerClass()->typeEntry()->lookupName().endsWith(QStringLiteral(u"$ConcreteWrapper"))){ QString lookupName = java_function->declaringClass()->typeEntry()->lookupName(); - if(lookupName.endsWith("$ConcreteWrapper")) + if(lookupName.endsWith(QStringLiteral(u"$ConcreteWrapper"))) lookupName.chop(16); - declareVariable = java_function->declaringClass()->typeEntry()->javaPackage() + "." + lookupName.replace('$', '.'); + declareVariable = java_function->declaringClass()->typeEntry()->javaPackage() + "." + lookupName.replace(u'$', u'.'); } } switch (refCount.action) { @@ -4191,14 +4184,14 @@ void JavaGenerator::writeDeprecatedComment(QTextStream& commentStream, const Met const MetaClass *declaringClass = nullptr; bool hasNull = false; QString method; - if(java_function->deprecatedComment().toLower().startsWith("use ")){ + if(java_function->deprecatedComment().toLower().startsWith(QStringLiteral(u"use "))){ QString deprecatedComment = java_function->deprecatedComment(); deprecatedComment = deprecatedComment.mid(4); if(deprecatedComment.startsWith(java_function->declaringClass()->qualifiedCppName() + "::")){ method = deprecatedComment.mid(java_function->declaringClass()->qualifiedCppName().length()+2); declaringClass = java_function->declaringClass(); }else{ - auto idx = deprecatedComment.indexOf("::"); + auto idx = deprecatedComment.indexOf(QStringLiteral(u"::")); if(idx>0){ QString className = deprecatedComment.left(idx); method = deprecatedComment.mid(idx+2); @@ -4208,12 +4201,12 @@ void JavaGenerator::writeDeprecatedComment(QTextStream& commentStream, const Met method = deprecatedComment; } } - if(method.endsWith(" instead")){ + if(method.endsWith(QStringLiteral(u" instead"))){ method.chop(8); } - if(method.contains("nullptr")){ + if(method.contains(QStringLiteral(u"nullptr"))){ hasNull = true; - method.replace("nullptr", ""); + method.replace(QStringLiteral(u"nullptr"), QString()); } } if(declaringClass){ @@ -4242,7 +4235,7 @@ void JavaGenerator::writeDeprecatedComment(QTextStream& commentStream, const Met } if(foundFun && !foundFun->isSignal()){ commentStream << "@deprecated Use {@link "; - commentStream << foundFun->declaringClass()->typeEntry()->qualifiedTargetLangName().replace("$", "."); + commentStream << foundFun->declaringClass()->typeEntry()->qualifiedTargetLangName().replace(u'$', u'.'); commentStream << "#" << foundFun->name() << "("; writeFunctionArguments(commentStream, foundFun, {}, int(foundFun->arguments().size()), Option(NoNullness | SkipName | SkipTemplateParameters | NoSuppressExports | VarArgsAsArray)); commentStream << ")}"; @@ -4251,13 +4244,13 @@ void JavaGenerator::writeDeprecatedComment(QTextStream& commentStream, const Met commentStream << " instead"; }else{ commentStream << "@deprecated " << QString(java_function->deprecatedComment()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/"); + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")); } } @@ -4265,8 +4258,9 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct uint included_attributes, uint excluded_attributes, Option option) { if (java_function->isModifiedRemoved(TS::TargetLangCode)) return ; - if (java_function->hasTemplateArgumentTypes()) + if (java_function->hasTemplateArgumentTypes()){ return; + } if(!(option & NoNullness) && !m_nullness){ option = Option(option & NoNullness); } @@ -4281,13 +4275,13 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct s2 << ")"; s2.flush(); if(m_currentMethodSignatures.contains(javaSignature)){ - ReportHandler::warning(QString("Duplicate Java method %1 in %2").arg(javaSignature, java_function->ownerClass()->qualifiedCppName())); + ReportHandler::warning(QStringLiteral(u"Duplicate Java method %1 in %2").arg(javaSignature, java_function->ownerClass()->qualifiedCppName())); } m_currentMethodSignatures.insert(javaSignature, nullptr); } - static QRegularExpression regExp("^(insert|set|take|add|remove|install|uninstall).*"); + static QRegularExpression regExp(QStringLiteral(u"^(insert|set|take|add|remove|install|uninstall).*")); if (regExp.match(java_function->name()).hasMatch()) { const MetaArgumentList& arguments = java_function->arguments(); @@ -4321,8 +4315,8 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct } } - static QRegularExpression regExp2("^(new|create|clone|take).*"); - static QRegularExpression regExp3("^(new|create|clone|take|from).*"); + static QRegularExpression regExp2(QStringLiteral(u"^(new|create|clone|take).*")); + static QRegularExpression regExp3(QStringLiteral(u"^(new|create|clone|take|from).*")); if (java_function->type() && !java_function->implementingClass()->typeEntry()->designatedInterface() && !java_function->type()->indirections().isEmpty() @@ -4384,13 +4378,13 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct if (!java_function->isEmptyFunction()) { if(!java_function->brief().isEmpty()){ commentStream << "

" << QString(java_function->brief()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "

" << Qt::endl; } commentStream << "

See "; @@ -4398,80 +4392,80 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct commentStream << "href() << "\">"; if(java_function->declaringClass() && java_function->functionType()!=MetaFunction::GlobalScopeFunction){ commentStream << java_function->declaringClass()->qualifiedCppName() - .replace("", "") - .replace("QtJambi", "Q") - .replace("QVoid", "Q") - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u""), QString()) + .replace(QStringLiteral(u"QtJambi"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"QVoid"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "::"; } if(java_function->functionTemplate()){ if(!java_function->functionTemplate()->originalSignature().isEmpty()){ commentStream << QString(java_function->functionTemplate()->originalSignature()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) .replace(",", ","); }else if(!java_function->functionTemplate()->minimalSignature().isEmpty()){ commentStream << QString(java_function->functionTemplate()->minimalSignature()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) .replace(",", ","); }else{ commentStream << QString(java_function->functionTemplate()->name()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "(...)"; } }else { if(!java_function->originalSignature().isEmpty()){ commentStream << QString(java_function->originalSignature()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) .replace(",", ","); }else if(!java_function->minimalSignature().isEmpty()){ commentStream << QString(java_function->minimalSignature()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) .replace(",", ","); }else{ commentStream << QString(java_function->name()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "(...)"; } } @@ -4559,7 +4553,8 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct if(!java_function->isAbstract()){ sigOption = DefaultFunction; }else{ - for(const FunctionModification& mod : java_function->modifications(java_function->ownerClass())) { + const FunctionModificationList mods = java_function->modifications(java_function->ownerClass()); + for(const FunctionModification& mod : mods) { if (mod.snips.count() > 0){ for(const CodeSnip& snip : mod.snips) { if (snip.language == TS::Interface){ @@ -4571,19 +4566,18 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct int pos = it.key() - 1; QString meta_name = it.value(); if(pos == -1){ - code = code.replace(meta_name, "__qt_return_value"); + code = code.replace(meta_name, QStringLiteral(u"__qt_return_value")); }else if (pos >= 0 && pos < arguments.count()) { code = code.replace(meta_name, arguments.at(pos)->modifiedArgumentName()); } else { - QString debug = QString("argument map specifies invalid argument index %1" - "for function '%2'") + QString debug = QStringLiteral(u"argument map specifies invalid argument index %1 for function '%2'") .arg(pos + 1).arg(java_function->name()); ReportHandler::warning(debug); } } - code = code.replace("%this", "this"); - QStringList lines = code.split("\n"); + code = code.replace(QStringLiteral(u"%this"), QStringLiteral(u"this")); + QStringList lines = code.split(QStringLiteral(u"\n")); QTextStream s(&interfaceDefaultImpl); { INDENTATION(INDENT) @@ -4599,10 +4593,10 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct } } uint attr = (java_function->attributes() & (~excluded_attributes)) | included_attributes; - if(java_function->name().startsWith("operator_")){ + if(java_function->name().startsWith(QStringLiteral(u"operator_"))){ if (!(attr & MetaAttributes::Static && java_function->ownerClass()->typeEntry()->designatedInterface()) && !(attr & MetaAttributes::Private)) - ReportHandler::warning(QString("Non-private operator function %1 in %2").arg(java_function->originalSignature()).arg(java_function->ownerClass()->qualifiedCppName())); + ReportHandler::warning(QStringLiteral(u"Non-private operator function %1 in %2").arg(java_function->originalSignature(), java_function->ownerClass()->qualifiedCppName())); } s << functionSignature(java_function, included_attributes, excluded_attributes, sigOption); } @@ -4627,7 +4621,7 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct for (int i = -1; i <= arguments.size(); ++i) { referenceCounts[i] = java_function->referenceCounts(java_function->implementingClass(), i); if (referenceCounts[i].size() > 0) { - for(const ReferenceCount& refCount : referenceCounts[i]) { + for(const ReferenceCount& refCount : qAsConst(referenceCounts[i])) { // We just want to know this to secure return value into local variable // to hold over ReferenceCount management later on. if (refCount.action != ReferenceCount::Ignore) { @@ -4645,7 +4639,7 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct // Lookup if there is a reference-count action required on the return value. MetaType *return_type = java_function->type(); - QString new_return_type = QString(java_function->typeReplaced(0)).replace('$', '.'); + QString new_return_type = QString(java_function->typeReplaced(0)).replace(u'$', u'.'); bool has_return_type = (new_return_type != "void" && (!new_return_type.isEmpty() || return_type)) || java_function->isSelfReturningFunction(); @@ -4658,7 +4652,7 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct || has_argument_referenceCounts || referenceCounts[0].size() > 0 || has_code_injections_at_the_end); s << INDENT; - if (has_return_type && (java_function->argumentReplaced(0).isEmpty() || java_function->argumentReplaced(0)=="this")) { + if (has_return_type && (java_function->argumentReplaced(0).isEmpty() || java_function->argumentReplaced(0)==QStringLiteral(u"this"))) { if (needs_return_variable) { if (new_return_type.isEmpty()) s << translateType(return_type, java_function->implementingClass()); @@ -4674,7 +4668,7 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct if (return_type->isTargetLangEnum()) { s << static_cast(return_type->typeEntry())->qualifiedTargetLangName() << ".resolve("; } else if (return_type->isTargetLangFlags()) { - s << "new " << return_type->typeEntry()->qualifiedTargetLangName().replace('$', '.') << "("; + s << "new " << return_type->typeEntry()->qualifiedTargetLangName().replace(u'$', u'.') << "("; } } } @@ -4702,9 +4696,9 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct s << arg->modifiedArgumentName(); }else if(java_function->useArgumentAsArray(arg->argumentIndex()+1)){ s << arg->modifiedArgumentName(); - if(java_function->insertArrayOffsetArgument(arg->argumentIndex() + 1)){ + if(java_function->insertUtilArgument(arg->argumentIndex() + 1)){ s << ", "; - int lengthParameter = java_function->arrayOrBufferLengthIndex(arg->argumentIndex() + 1); + int lengthParameter = java_function->utilArgumentIndex(arg->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=java_function->arguments().size()){ const MetaArgument *lengthParam = java_function->arguments()[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -4741,8 +4735,8 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct s << ";" << Qt::endl; - for(ReferenceCount refCount : referenceCounts[-1]){ - refCount.declareVariable = java_function->declaringClass()->fullName().replace("/", ".").replace('$', '.'); + for(ReferenceCount refCount : qAsConst(referenceCounts[-1])){ + refCount.declareVariable = java_function->declaringClass()->fullName().replace("/", ".").replace(u'$', u'.'); writeReferenceCount(s, refCount, -1, java_function, java_function->isStatic() ? QLatin1String("null") : QLatin1String("this")); } @@ -4750,20 +4744,20 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct // so that the GC will not destroy the C++ object too early. At this point we // have called the native method call so can manage referenceCount issues. // First the input arguments - for (const MetaArgument* argument : arguments) { - for(ReferenceCount refCount : referenceCounts[argument->argumentIndex()+1]){ - refCount.declareVariable = java_function->declaringClass()->fullName().replace("/", ".").replace('$', '.'); + for (const MetaArgument* argument : qAsConst(arguments)) { + for(ReferenceCount refCount : qAsConst(referenceCounts[argument->argumentIndex()+1])){ + refCount.declareVariable = java_function->declaringClass()->fullName().replace("/", ".").replace(u'$', u'.'); writeReferenceCount(s, refCount, argument->argumentIndex()+1, java_function, QLatin1String("this")); } } - if (!java_function->argumentReplaced(0).isEmpty() && java_function->argumentReplaced(0)!="this") { + if (!java_function->argumentReplaced(0).isEmpty() && java_function->argumentReplaced(0)!=QStringLiteral(u"this")) { s << INDENT << "return " << java_function->argumentReplaced(0) << ";" << Qt::endl; }else{ // Then the return value - for(ReferenceCount referenceCount : referenceCounts[0]) { - referenceCount.declareVariable = java_function->declaringClass()->fullName().replace("/", ".").replace('$', '.'); - writeReferenceCount(s, referenceCount, 0, java_function, QLatin1String("this")); + for(ReferenceCount referenceCount : qAsConst(referenceCounts[0])) { + referenceCount.declareVariable = java_function->declaringClass()->fullName().replace(u'/', u'.').replace(u'$', u'.'); + writeReferenceCount(s, referenceCount, 0, java_function, QStringLiteral(u"this")); } writeInjectedCode(s, java_function, CodeSnip::Position3); @@ -4780,18 +4774,18 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct s << ") {" << Qt::endl; { INDENTATION(INDENT) - writeFunctionCallForOwnership(s, java_function, ownershipRule.ownership, "__qt_return_value"); + writeFunctionCallForOwnership(s, java_function, ownershipRule.ownership, QStringLiteral(u"__qt_return_value")); } s << INDENT << "}" << Qt::endl; }else if(!ownershipRule.condition.isEmpty()){ s << INDENT << "if (" << ownershipRule.condition << ") {" << Qt::endl; { INDENTATION(INDENT) - writeFunctionCallForOwnership(s, java_function, ownershipRule.ownership, "__qt_return_value"); + writeFunctionCallForOwnership(s, java_function, ownershipRule.ownership, QStringLiteral(u"__qt_return_value")); } s << INDENT << "}" << Qt::endl; }else{ - writeFunctionCallForOwnership(s, java_function, ownershipRule.ownership, "__qt_return_value"); + writeFunctionCallForOwnership(s, java_function, ownershipRule.ownership, QStringLiteral(u"__qt_return_value")); } } s << INDENT << "return __qt_return_value;" << Qt::endl; @@ -4827,8 +4821,8 @@ void JavaGenerator::writeFunction(QTextStream &s, const MetaFunction *java_funct s << arguments.at(i)->modifiedArgumentName(); hasArg = true; if(java_function->useArgumentAsArray(arg->argumentIndex()+1) - && java_function->insertArrayOffsetArgument(arg->argumentIndex() + 1)){ - int lengthParameter = java_function->arrayOrBufferLengthIndex(arg->argumentIndex() + 1); + && java_function->insertUtilArgument(arg->argumentIndex() + 1)){ + int lengthParameter = java_function->utilArgumentIndex(arg->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=java_function->arguments().size()){ const MetaArgument *lengthParam = java_function->arguments()[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -4892,32 +4886,32 @@ void JavaGenerator::write_equals_parts(QTextStream &s, const MetaFunctionList &l else type = arg->type()->typeEntry()->qualifiedTargetLangName(); registerPackage(type); - type = type.replace('$', '.'); + type = type.replace(u'$', u'.'); if(arg->type()->typeEntry()->isContainer()){ - if(type=="java.util.List" - || type=="java.util.LinkedList" - || type=="java.util.Queue" - || type=="java.util.Deque" - || type=="java.util.ArrayList" - || type=="java.util.Vector" - || type=="java.util.Set" - || type=="io.qt.core.QSet" - || type=="io.qt.core.QList" - || type=="io.qt.core.QQueue" - || type=="io.qt.core.QVector" - || type=="io.qt.core.QStack" - || type=="io.qt.core.QLinkedList"){ - type = "java.util.Collection"; - }else if(type=="java.util.Map" - || type=="java.util.SortedMap" - || type=="java.util.NavigableMap" - || type=="java.util.HashMap" - || type=="java.util.TreeMap" - || type=="io.qt.core.QMap" - || type=="io.qt.core.QHash" - || type=="io.qt.core.QMultiMap" - || type=="io.qt.core.QMultiHash"){ - type = "java.util.Map"; + if(type==QStringLiteral(u"java.util.List") + || type==QStringLiteral(u"java.util.LinkedList") + || type==QStringLiteral(u"java.util.Queue") + || type==QStringLiteral(u"java.util.Deque") + || type==QStringLiteral(u"java.util.ArrayList") + || type==QStringLiteral(u"java.util.Vector") + || type==QStringLiteral(u"java.util.Set") + || type==QStringLiteral(u"io.qt.core.QSet") + || type==QStringLiteral(u"io.qt.core.QList") + || type==QStringLiteral(u"io.qt.core.QQueue") + || type==QStringLiteral(u"io.qt.core.QVector") + || type==QStringLiteral(u"io.qt.core.QStack") + || type==QStringLiteral(u"io.qt.core.QLinkedList")){ + type = QStringLiteral(u"java.util.Collection"); + }else if(type==QStringLiteral(u"java.util.Map") + || type==QStringLiteral(u"java.util.SortedMap") + || type==QStringLiteral(u"java.util.NavigableMap") + || type==QStringLiteral(u"java.util.HashMap") + || type==QStringLiteral(u"java.util.TreeMap") + || type==QStringLiteral(u"io.qt.core.QMap") + || type==QStringLiteral(u"io.qt.core.QHash") + || type==QStringLiteral(u"io.qt.core.QMultiMap") + || type==QStringLiteral(u"io.qt.core.QMultiHash")){ + type = QStringLiteral(u"java.util.Map"); } } const QList& instantiations = arg->type()->instantiations(); @@ -4939,32 +4933,32 @@ void JavaGenerator::write_equals_parts(QTextStream &s, const MetaFunctionList &l } } QString boxedType = type; - if(boxedType=="io.qt.core.QString") - boxedType = type = "java.lang.CharSequence"; - else if(boxedType=="int") - boxedType = "java.lang.Integer"; - else if(boxedType=="byte") - boxedType = "java.lang.Byte"; - else if(boxedType=="short") - boxedType = "java.lang.Short"; - else if(boxedType=="long") - boxedType = "java.lang.Long"; - else if(boxedType=="double") - boxedType = "java.lang.Double"; - else if(boxedType=="float") - boxedType = "java.lang.Float"; - else if(boxedType=="boolean") - boxedType = "java.lang.Boolean"; - else if(boxedType=="char") - boxedType = "java.lang.Character"; - - if(type=="java.lang.Void"){ + if(boxedType==QStringLiteral(u"io.qt.core.QString")) + boxedType = type = QStringLiteral(u"java.lang.CharSequence"); + else if(boxedType==QStringLiteral(u"int")) + boxedType = QStringLiteral(u"java.lang.Integer"); + else if(boxedType==QStringLiteral(u"byte")) + boxedType = QStringLiteral(u"java.lang.Byte"); + else if(boxedType==QStringLiteral(u"short")) + boxedType = QStringLiteral(u"java.lang.Short"); + else if(boxedType==QStringLiteral(u"long")) + boxedType = QStringLiteral(u"java.lang.Long"); + else if(boxedType==QStringLiteral(u"double")) + boxedType = QStringLiteral(u"java.lang.Double"); + else if(boxedType==QStringLiteral(u"float")) + boxedType = QStringLiteral(u"java.lang.Float"); + else if(boxedType==QStringLiteral(u"boolean")) + boxedType = QStringLiteral(u"java.lang.Boolean"); + else if(boxedType==QStringLiteral(u"char")) + boxedType = QStringLiteral(u"java.lang.Character"); + + if(type==QStringLiteral(u"java.lang.Void")){ javaTypesByFunction[f] = "null"; s << INDENT << (first ? "if" : "else if") << " (other==null) {" << Qt::endl; s << INDENT << " return "; if (prefix != 0) s << prefix; s << f->name() << "((java.lang.Void)null);" << Qt::endl; - }else if(type=="null"){ + }else if(type==QStringLiteral(u"null")){ javaTypesByFunction[f] = "null"; s << INDENT << (first ? "if" : "else if") << " (other==" << type; s << ") {" << Qt::endl; @@ -4972,7 +4966,7 @@ void JavaGenerator::write_equals_parts(QTextStream &s, const MetaFunctionList &l if (prefix != 0) s << prefix; s << f->name() << "();" << Qt::endl; }else{ - if(boxedType.endsWith("[]")) + if(boxedType.endsWith(QStringLiteral(u"[]"))) javaTypesByFunction[f] = ""+boxedType+""; else javaTypesByFunction[f] = "{@link "+boxedType+"}"; @@ -4992,29 +4986,28 @@ void JavaGenerator::write_equals_parts(QTextStream &s, const MetaFunctionList &l if(arg->type()->typeEntry()->isComplex() && static_cast(arg->type()->typeEntry())->isQByteArrayView()){ implicitCalls << "io.qt.core.@NonNull QByteArray" << "java.nio.@NonNull ByteBuffer" << "byte @NonNull[]"; } - for(QString jarg : implicitCalls){ - jarg = jarg.replace(" @Nullable", "").replace(" @NonNull", "").replace(" @StrictNonNull", "") - .replace("@Nullable ", "").replace("@NonNull ", "").replace("@StrictNonNull ", ""); + for(QString jarg : qAsConst(implicitCalls)){ + jarg = annotationFreeTypeName(jarg); QString boxedType = jarg; - if(boxedType=="io.qt.core.QString") - boxedType = jarg = "java.lang.CharSequence"; - else if(boxedType=="int") - boxedType = "java.lang.Integer"; - else if(boxedType=="byte") - boxedType = "java.lang.Byte"; - else if(boxedType=="short") - boxedType = "java.lang.Short"; - else if(boxedType=="long") - boxedType = "java.lang.Long"; - else if(boxedType=="double") - boxedType = "java.lang.Double"; - else if(boxedType=="float") - boxedType = "java.lang.Float"; - else if(boxedType=="boolean") - boxedType = "java.lang.Boolean"; - else if(boxedType=="char") - boxedType = "java.lang.Character"; - if(boxedType.endsWith("[]")) + if(boxedType==QStringLiteral(u"io.qt.core.QString")) + boxedType = type = QStringLiteral(u"java.lang.CharSequence"); + else if(boxedType==QStringLiteral(u"int")) + boxedType = QStringLiteral(u"java.lang.Integer"); + else if(boxedType==QStringLiteral(u"byte")) + boxedType = QStringLiteral(u"java.lang.Byte"); + else if(boxedType==QStringLiteral(u"short")) + boxedType = QStringLiteral(u"java.lang.Short"); + else if(boxedType==QStringLiteral(u"long")) + boxedType = QStringLiteral(u"java.lang.Long"); + else if(boxedType==QStringLiteral(u"double")) + boxedType = QStringLiteral(u"java.lang.Double"); + else if(boxedType==QStringLiteral(u"float")) + boxedType = QStringLiteral(u"java.lang.Float"); + else if(boxedType==QStringLiteral(u"boolean")) + boxedType = QStringLiteral(u"java.lang.Boolean"); + else if(boxedType==QStringLiteral(u"char")) + boxedType = QStringLiteral(u"java.lang.Character"); + if(boxedType.endsWith(QStringLiteral(u"[]"))) javaTypesByFunction[f] = ""+boxedType+""; else javaTypesByFunction[f] = "{@link "+boxedType+"}"; @@ -5038,30 +5031,30 @@ void JavaGenerator::write_compareto_parts(QTextStream &s, const MetaFunctionList if (type.isEmpty()){ type = arg->type()->typeEntry()->qualifiedTargetLangName(); if(arg->type()->typeEntry()->isContainer()){ - if(type=="java.util.List" - || type=="java.util.LinkedList" - || type=="java.util.Queue" - || type=="java.util.Deque" - || type=="java.util.ArrayList" - || type=="java.util.Vector" - || type=="java.util.Set" - || type=="io.qt.core.QSet" - || type=="io.qt.core.QList" - || type=="io.qt.core.QQueue" - || type=="io.qt.core.QVector" - || type=="io.qt.core.QStack" - || type=="io.qt.core.QLinkedList") { - type = "java.util.Collection"; - }else if(type=="java.util.Map" - || type=="java.util.SortedMap" - || type=="java.util.NavigableMap" - || type=="java.util.HashMap" - || type=="java.util.TreeMap" - || type=="io.qt.core.QMap" - || type=="io.qt.core.QHash" - || type=="io.qt.core.QMultiMap" - || type=="io.qt.core.QMultiHash"){ - type = "java.util.Map"; + if(type==QStringLiteral(u"java.util.List") + || type==QStringLiteral(u"java.util.LinkedList") + || type==QStringLiteral(u"java.util.Queue") + || type==QStringLiteral(u"java.util.Deque") + || type==QStringLiteral(u"java.util.ArrayList") + || type==QStringLiteral(u"java.util.Vector") + || type==QStringLiteral(u"java.util.Set") + || type==QStringLiteral(u"io.qt.core.QSet") + || type==QStringLiteral(u"io.qt.core.QList") + || type==QStringLiteral(u"io.qt.core.QQueue") + || type==QStringLiteral(u"io.qt.core.QVector") + || type==QStringLiteral(u"io.qt.core.QStack") + || type==QStringLiteral(u"io.qt.core.QLinkedList")) { + type = QStringLiteral(u"java.util.Collection"); + }else if(type==QStringLiteral(u"java.util.Map") + || type==QStringLiteral(u"java.util.SortedMap") + || type==QStringLiteral(u"java.util.NavigableMap") + || type==QStringLiteral(u"java.util.HashMap") + || type==QStringLiteral(u"java.util.TreeMap") + || type==QStringLiteral(u"io.qt.core.QMap") + || type==QStringLiteral(u"io.qt.core.QHash") + || type==QStringLiteral(u"io.qt.core.QMultiMap") + || type==QStringLiteral(u"io.qt.core.QMultiHash")){ + type = QStringLiteral(u"java.util.Map"); } } const QList& instantiations = arg->type()->instantiations(); @@ -5070,7 +5063,7 @@ void JavaGenerator::write_compareto_parts(QTextStream &s, const MetaFunctionList suppressUnchecked = true; } } - type = type.replace('$', '.'); + type = type.replace(u'$', u'.'); auto idx = type.indexOf("<"); if(idx>0){ suppressRaw = true; @@ -5084,30 +5077,30 @@ void JavaGenerator::write_compareto_parts(QTextStream &s, const MetaFunctionList } } QString boxedType = type; - if(boxedType=="io.qt.core.QString") - boxedType = type = "java.lang.CharSequence"; - else if(boxedType=="int") - boxedType = "java.lang.Integer"; - else if(boxedType=="byte") - boxedType = "java.lang.Byte"; - else if(boxedType=="short") - boxedType = "java.lang.Short"; - else if(boxedType=="long") - boxedType = "java.lang.Long"; - else if(boxedType=="double") - boxedType = "java.lang.Double"; - else if(boxedType=="float") - boxedType = "java.lang.Float"; - else if(boxedType=="boolean") - boxedType = "java.lang.Boolean"; - else if(boxedType=="char") - boxedType = "java.lang.Character"; + if(boxedType==QStringLiteral(u"io.qt.core.QString")) + boxedType = type = QStringLiteral(u"java.lang.CharSequence"); + else if(boxedType==QStringLiteral(u"int")) + boxedType = QStringLiteral(u"java.lang.Integer"); + else if(boxedType==QStringLiteral(u"byte")) + boxedType = QStringLiteral(u"java.lang.Byte"); + else if(boxedType==QStringLiteral(u"short")) + boxedType = QStringLiteral(u"java.lang.Short"); + else if(boxedType==QStringLiteral(u"long")) + boxedType = QStringLiteral(u"java.lang.Long"); + else if(boxedType==QStringLiteral(u"double")) + boxedType = QStringLiteral(u"java.lang.Double"); + else if(boxedType==QStringLiteral(u"float")) + boxedType = QStringLiteral(u"java.lang.Float"); + else if(boxedType==QStringLiteral(u"boolean")) + boxedType = QStringLiteral(u"java.lang.Boolean"); + else if(boxedType==QStringLiteral(u"char")) + boxedType = QStringLiteral(u"java.lang.Character"); QStringList implicitCalls = f->implicitCalls(arg->argumentIndex()+1); if(arg->type()->typeEntry()->isComplex() && static_cast(arg->type()->typeEntry())->isQByteArrayView()){ implicitCalls << "io.qt.core.@NonNull QByteArray" << "java.nio.@NonNull ByteBuffer" << "byte @NonNull[]"; } if(value==0){ - if(boxedType.endsWith("[]")) + if(boxedType.endsWith(QStringLiteral(u"[]"))) javaTypesByFunction.append({f, ""+boxedType+""}); else javaTypesByFunction.append({f, "{@link "+boxedType+"}"}); @@ -5122,29 +5115,28 @@ void JavaGenerator::write_compareto_parts(QTextStream &s, const MetaFunctionList s << ") {" << Qt::endl << INDENT << " return " << f->name() << "((" << type << ") other);" << Qt::endl << INDENT << "}" << Qt::endl; - for(QString jarg : implicitCalls){ - jarg = jarg.replace(" @Nullable", "").replace(" @NonNull", "").replace(" @StrictNonNull", "") - .replace("@Nullable ", "").replace("@NonNull ", "").replace("@StrictNonNull ", ""); + for(QString jarg : qAsConst(implicitCalls)){ + jarg = annotationFreeTypeName(jarg); QString boxedType = jarg; - if(boxedType=="io.qt.core.QString") - boxedType = jarg = "java.lang.CharSequence"; - else if(boxedType=="int") - boxedType = "java.lang.Integer"; - else if(boxedType=="byte") - boxedType = "java.lang.Byte"; - else if(boxedType=="short") - boxedType = "java.lang.Short"; - else if(boxedType=="long") - boxedType = "java.lang.Long"; - else if(boxedType=="double") - boxedType = "java.lang.Double"; - else if(boxedType=="float") - boxedType = "java.lang.Float"; - else if(boxedType=="boolean") - boxedType = "java.lang.Boolean"; - else if(boxedType=="char") - boxedType = "java.lang.Character"; - if(boxedType.endsWith("[]")) + if(boxedType==QStringLiteral(u"io.qt.core.QString")) + boxedType = type = QStringLiteral(u"java.lang.CharSequence"); + else if(boxedType==QStringLiteral(u"int")) + boxedType = QStringLiteral(u"java.lang.Integer"); + else if(boxedType==QStringLiteral(u"byte")) + boxedType = QStringLiteral(u"java.lang.Byte"); + else if(boxedType==QStringLiteral(u"short")) + boxedType = QStringLiteral(u"java.lang.Short"); + else if(boxedType==QStringLiteral(u"long")) + boxedType = QStringLiteral(u"java.lang.Long"); + else if(boxedType==QStringLiteral(u"double")) + boxedType = QStringLiteral(u"java.lang.Double"); + else if(boxedType==QStringLiteral(u"float")) + boxedType = QStringLiteral(u"java.lang.Float"); + else if(boxedType==QStringLiteral(u"boolean")) + boxedType = QStringLiteral(u"java.lang.Boolean"); + else if(boxedType==QStringLiteral(u"char")) + boxedType = QStringLiteral(u"java.lang.Character"); + if(boxedType.endsWith(QStringLiteral(u"[]"))) javaTypesByFunction.append({f, ""+boxedType+""}); else javaTypesByFunction.append({f, "{@link "+boxedType+"}"}); @@ -5169,7 +5161,7 @@ void JavaGenerator::write_compareto_parts(QTextStream &s, const MetaFunctionList << INDENT << " else return " << -value << ";" << Qt::endl << INDENT << "}" << Qt::endl; }else{ - if(boxedType.endsWith("[]")) + if(boxedType.endsWith(QStringLiteral(u"[]"))) javaTypesByFunction.append({f, ""+boxedType+""}); else javaTypesByFunction.append({f, "{@link "+boxedType+"}"}); @@ -5185,29 +5177,28 @@ void JavaGenerator::write_compareto_parts(QTextStream &s, const MetaFunctionList s << INDENT << " if (" << f->name() << "((" << type << ") other)) return " << value << ";" << Qt::endl << INDENT << " else return " << -value << ";" << Qt::endl << INDENT << "}" << Qt::endl; - for(QString jarg : implicitCalls){ - jarg = jarg.replace(" @Nullable", "").replace(" @NonNull", "").replace(" @StrictNonNull", "") - .replace("@Nullable ", "").replace("@NonNull ", "").replace("@StrictNonNull ", ""); + for(QString jarg : qAsConst(implicitCalls)){ + jarg = annotationFreeTypeName(jarg); QString boxedType = jarg; - if(boxedType=="io.qt.core.QString") - boxedType = jarg = "java.lang.CharSequence"; - else if(boxedType=="int") - boxedType = "java.lang.Integer"; - else if(boxedType=="byte") - boxedType = "java.lang.Byte"; - else if(boxedType=="short") - boxedType = "java.lang.Short"; - else if(boxedType=="long") - boxedType = "java.lang.Long"; - else if(boxedType=="double") - boxedType = "java.lang.Double"; - else if(boxedType=="float") - boxedType = "java.lang.Float"; - else if(boxedType=="boolean") - boxedType = "java.lang.Boolean"; - else if(boxedType=="char") - boxedType = "java.lang.Character"; - if(boxedType.endsWith("[]")) + if(boxedType==QStringLiteral(u"io.qt.core.QString")) + boxedType = type = QStringLiteral(u"java.lang.CharSequence"); + else if(boxedType==QStringLiteral(u"int")) + boxedType = QStringLiteral(u"java.lang.Integer"); + else if(boxedType==QStringLiteral(u"byte")) + boxedType = QStringLiteral(u"java.lang.Byte"); + else if(boxedType==QStringLiteral(u"short")) + boxedType = QStringLiteral(u"java.lang.Short"); + else if(boxedType==QStringLiteral(u"long")) + boxedType = QStringLiteral(u"java.lang.Long"); + else if(boxedType==QStringLiteral(u"double")) + boxedType = QStringLiteral(u"java.lang.Double"); + else if(boxedType==QStringLiteral(u"float")) + boxedType = QStringLiteral(u"java.lang.Float"); + else if(boxedType==QStringLiteral(u"boolean")) + boxedType = QStringLiteral(u"java.lang.Boolean"); + else if(boxedType==QStringLiteral(u"char")) + boxedType = QStringLiteral(u"java.lang.Character"); + if(boxedType.endsWith(QStringLiteral(u"[]"))) javaTypesByFunction.append({f, ""+boxedType+""}); else javaTypesByFunction.append({f, "{@link "+boxedType+"}"}); @@ -5218,7 +5209,8 @@ void JavaGenerator::write_compareto_parts(QTextStream &s, const MetaFunctionList } } } - *first = false; + if(first) + *first = false; } if(!suppressNull){ s << INDENT << (*first ? "if" : "else if") << "(other==null)" << Qt::endl; @@ -5323,59 +5315,59 @@ void JavaGenerator::writeJavaLangObjectOverrideFunctions(QTextStream &s, } if(funs[0]->functionType()!=MetaFunction::GlobalScopeFunction){ s << cls->qualifiedCppName() - .replace("", "") - .replace("QtJambi", "Q") - .replace("QVoid", "Q") - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u""), QString()) + .replace(QStringLiteral(u"QtJambi"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"QVoid"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "::"; } s << QString(funs[0]->originalSignature()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) .replace(",", ","); if(!funs[0]->href().isEmpty()) s << ""; s << "

" << Qt::endl; }else{ s << INDENT << " *

Checks for equality depending on the type of given object.

    " << Qt::endl; - for(MetaFunction* f : funs){ + for(MetaFunction* f : qAsConst(funs)){ s << INDENT << " *
  • "+javaTypesByFunction[f]+" ckecked by to "; if(!f->href().isEmpty()){ s << "href() << "\">"; } if(f->functionType()!=MetaFunction::GlobalScopeFunction){ s << cls->qualifiedCppName() - .replace("", "") - .replace("QtJambi", "Q") - .replace("QVoid", "Q") - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u""), QString()) + .replace(QStringLiteral(u"QtJambi"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"QVoid"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "::"; } s << QString(f->originalSignature()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) .replace(",", ","); if(!f->href().isEmpty()) s << ""; @@ -5446,26 +5438,26 @@ void JavaGenerator::writeJavaLangObjectOverrideFunctions(QTextStream &s, printExtraCode(lines, s); QString nonGenericType = cls->typeEntry()->qualifiedTargetLangName(); registerPackage(nonGenericType); - nonGenericType = nonGenericType.replace('$', '.'); + nonGenericType = nonGenericType.replace(u'$', u'.'); auto idx = nonGenericType.indexOf("<"); if(idx>0) nonGenericType = nonGenericType.left(idx); - if(nonGenericType=="int") - nonGenericType = "java.lang.Integer"; - else if(nonGenericType=="byte") - nonGenericType = "java.lang.Byte"; - else if(nonGenericType=="short") - nonGenericType = "java.lang.Short"; - else if(nonGenericType=="long") - nonGenericType = "java.lang.Long"; - else if(nonGenericType=="double") - nonGenericType = "java.lang.Double"; - else if(nonGenericType=="float") - nonGenericType = "java.lang.Float"; - else if(nonGenericType=="boolean") - nonGenericType = "java.lang.Boolean"; - else if(nonGenericType=="char") - nonGenericType = "java.lang.Character"; + if(nonGenericType==QStringLiteral(u"int")) + nonGenericType = QStringLiteral(u"java.lang.Integer"); + else if(nonGenericType==QStringLiteral(u"byte")) + nonGenericType = QStringLiteral(u"java.lang.Byte"); + else if(nonGenericType==QStringLiteral(u"short")) + nonGenericType = QStringLiteral(u"java.lang.Short"); + else if(nonGenericType==QStringLiteral(u"long")) + nonGenericType = QStringLiteral(u"java.lang.Long"); + else if(nonGenericType==QStringLiteral(u"double")) + nonGenericType = QStringLiteral(u"java.lang.Double"); + else if(nonGenericType==QStringLiteral(u"float")) + nonGenericType = QStringLiteral(u"java.lang.Float"); + else if(nonGenericType==QStringLiteral(u"boolean")) + nonGenericType = QStringLiteral(u"java.lang.Boolean"); + else if(nonGenericType==QStringLiteral(u"char")) + nonGenericType = QStringLiteral(u"java.lang.Character"); s << INDENT << "if(other instanceof " << nonGenericType << ")" << Qt::endl << INDENT << " return hashCode()==other.hashCode();" << Qt::endl << INDENT << "else return super.equals(other);"; @@ -5473,7 +5465,7 @@ void JavaGenerator::writeJavaLangObjectOverrideFunctions(QTextStream &s, s << INDENT << "}" << Qt::endl << Qt::endl; }else if(cls->typeEntry()->isValue()){ if(!cls->baseClass()) - ReportHandler::warning(QString("No ==/!= operator found for value type %1.").arg(cls->qualifiedCppName())); + ReportHandler::warning(QStringLiteral(u"No ==/!= operator found for value type %1.").arg(cls->qualifiedCppName())); } } @@ -5592,30 +5584,30 @@ void JavaGenerator::writeJavaLangObjectOverrideFunctions(QTextStream &s, javaTypesByFunction.append({geq_functions[0], ""}); QString className = cls->typeEntry()->qualifiedTargetLangName(); if(cls->typeEntry()->isContainer()){ - if(className=="java.util.List" - || className=="java.util.LinkedList" - || className=="java.util.Queue" - || className=="java.util.Deque" - || className=="java.util.ArrayList" - || className=="java.util.Vector" - || className=="java.util.Set" - || className=="io.qt.core.QSet" - || className=="io.qt.core.QList" - || className=="io.qt.core.QQueue" - || className=="io.qt.core.QVector" - || className=="io.qt.core.QStack" - || className=="io.qt.core.QLinkedList") { - className = "java.util.Collection"; - }else if(className=="java.util.Map" - || className=="java.util.SortedMap" - || className=="java.util.NavigableMap" - || className=="java.util.HashMap" - || className=="java.util.TreeMap" - || className=="io.qt.core.QMap" - || className=="io.qt.core.QHash" - || className=="io.qt.core.QMultiMap" - || className=="io.qt.core.QMultiHash"){ - className = "java.util.Map"; + if(className==QStringLiteral(u"java.util.List") + || className==QStringLiteral(u"java.util.LinkedList") + || className==QStringLiteral(u"java.util.Queue") + || className==QStringLiteral(u"java.util.Deque") + || className==QStringLiteral(u"java.util.ArrayList") + || className==QStringLiteral(u"java.util.Vector") + || className==QStringLiteral(u"java.util.Set") + || className==QStringLiteral(u"io.qt.core.QSet") + || className==QStringLiteral(u"io.qt.core.QList") + || className==QStringLiteral(u"io.qt.core.QQueue") + || className==QStringLiteral(u"io.qt.core.QVector") + || className==QStringLiteral(u"io.qt.core.QStack") + || className==QStringLiteral(u"io.qt.core.QLinkedList")) { + className = QStringLiteral(u"java.util.Collection"); + }else if(className==QStringLiteral(u"java.util.Map") + || className==QStringLiteral(u"java.util.SortedMap") + || className==QStringLiteral(u"java.util.NavigableMap") + || className==QStringLiteral(u"java.util.HashMap") + || className==QStringLiteral(u"java.util.TreeMap") + || className==QStringLiteral(u"io.qt.core.QMap") + || className==QStringLiteral(u"io.qt.core.QHash") + || className==QStringLiteral(u"io.qt.core.QMultiMap") + || className==QStringLiteral(u"io.qt.core.QMultiHash")){ + className = QStringLiteral(u"java.util.Map"); } } if(cls->typeEntry()->isGenericClass()){ @@ -5662,33 +5654,33 @@ void JavaGenerator::writeJavaLangObjectOverrideFunctions(QTextStream &s, } if(f->functionType()!=MetaFunction::GlobalScopeFunction){ s << cls->qualifiedCppName() - .replace("", "") - .replace("QtJambi", "Q") - .replace("QVoid", "Q") - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u""), QString()) + .replace(QStringLiteral(u"QtJambi"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"QVoid"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "::"; } s << QString(f->originalSignature()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) .replace(",", ","); if(!f->href().isEmpty()) s << ""; s << "

    " << Qt::endl; }else{ s << INDENT << " *

    Compares to other object depending on its type.

      " << Qt::endl; - for(const QPair& pair : javaTypesByFunction){ + for(const QPair& pair : qAsConst(javaTypesByFunction)){ auto f = pair.first; if(f){ s << INDENT << " *
    • "+pair.second+" compared by "; @@ -5697,26 +5689,26 @@ void JavaGenerator::writeJavaLangObjectOverrideFunctions(QTextStream &s, } if(f->functionType()!=MetaFunction::GlobalScopeFunction){ s << cls->qualifiedCppName() - .replace("", "") - .replace("QtJambi", "Q") - .replace("QVoid", "Q") - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u""), QString()) + .replace(QStringLiteral(u"QtJambi"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"QVoid"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "::"; } s << QString(f->originalSignature()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) .replace(",", ","); if(!f->href().isEmpty()) s << ""; @@ -5736,7 +5728,7 @@ void JavaGenerator::writeJavaLangObjectOverrideFunctions(QTextStream &s, } if (!cls->isNamespace() && (cls->hasHashFunction() || eq_functions.size()+neq_functions.size() > 0 )) { - MetaFunctionList hashcode_functions = cls->queryFunctionsByName("hashCode"); + const MetaFunctionList hashcode_functions = cls->queryFunctionsByName("hashCode"); bool found = false; for(const MetaFunction* function : hashcode_functions) { if (function->actualMinimumArgumentCount() == 0) { @@ -5824,7 +5816,7 @@ void JavaGenerator::writeJavaLangObjectOverrideFunctions(QTextStream &s, QMetaType metaType = QMetaType::fromName(qPrintable(cls->qualifiedCppName())); if (!cls->toStringCapability() && metaType.isValid() && metaType.id()!=QMetaType::QStringList && QMetaType::canConvert(metaType, QMetaType(QMetaType::QString))) { #endif - MetaFunctionList tostring_functions = cls->queryFunctionsByName("toString"); + const MetaFunctionList tostring_functions = cls->queryFunctionsByName(QStringLiteral(u"toString")); bool found = false; for(const MetaFunction* function : tostring_functions) { if (function->actualMinimumArgumentCount() == 0) { @@ -5839,7 +5831,7 @@ void JavaGenerator::writeJavaLangObjectOverrideFunctions(QTextStream &s, lines << codeSnip.code().split("\n"); } } - QString nonNull = m_nullness ? QStringLiteral("@NonNull ") : QString{}; + QString nonNull = m_nullness ? QStringLiteral(u"@NonNull ") : QString{}; if (!found) { if(lines.isEmpty() && !cls->typeEntry()->isNativeIdBased() && !cls->typeEntry()->designatedInterface()){ s << Qt::endl @@ -5904,35 +5896,35 @@ void JavaGenerator::writeInstantiatedType(QTextStream &s, const MetaType *abstra const TypeEntry *type = abstractMetaType->typeEntry(); /* avoid output like java.util.List*/ if(forceBoxed && type->isPrimitive()){ - if(type->qualifiedTargetLangName()=="int"){ + if(type->qualifiedTargetLangName()==QStringLiteral(u"int")){ s << "java.lang.Integer"; return; - }else if(type->qualifiedTargetLangName()=="boolean"){ + }else if(type->qualifiedTargetLangName()==QStringLiteral(u"boolean")){ s << "java.lang.Boolean"; return; - }else if(type->qualifiedTargetLangName()=="short"){ + }else if(type->qualifiedTargetLangName()==QStringLiteral(u"short")){ s << "java.lang.Short"; return; - }else if(type->qualifiedTargetLangName()=="char"){ + }else if(type->qualifiedTargetLangName()==QStringLiteral(u"char")){ s << "java.lang.Character"; return; - }else if(type->qualifiedTargetLangName()=="byte"){ + }else if(type->qualifiedTargetLangName()==QStringLiteral(u"byte")){ s << "java.lang.Byte"; return; - }else if(type->qualifiedTargetLangName()=="long"){ + }else if(type->qualifiedTargetLangName()==QStringLiteral(u"long")){ s << "java.lang.Long"; return; - }else if(type->qualifiedTargetLangName()=="double"){ + }else if(type->qualifiedTargetLangName()==QStringLiteral(u"double")){ s << "java.lang.Double"; return; - }else if(type->qualifiedTargetLangName()=="float"){ + }else if(type->qualifiedTargetLangName()==QStringLiteral(u"float")){ s << "java.lang.Float"; return; } } if(type->designatedInterface()){ - s << type->designatedInterface()->qualifiedTargetLangName().replace('$', '.'); + s << type->designatedInterface()->qualifiedTargetLangName().replace(u'$', u'.'); }else if(abstractMetaType->isCharString()){ s << "java.lang.String"; }else if(type->isContainer()){ @@ -5952,10 +5944,10 @@ void JavaGenerator::writeInstantiatedType(QTextStream &s, const MetaType *abstra case ContainerTypeEntry::MultiHashContainer: case ContainerTypeEntry::MapContainer: s << "java.util.Map"; break; default: - s << type->qualifiedTargetLangName().replace('$', '.'); break; + s << type->qualifiedTargetLangName().replace(u'$', u'.'); break; } }else{ - s << type->qualifiedTargetLangName().replace('$', '.'); + s << type->qualifiedTargetLangName().replace(u'$', u'.'); } if (abstractMetaType->hasInstantiations()) { @@ -5981,6 +5973,19 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j return; if (java_function->isCopyConstructor()) return; + + // We only create the overloads for the class that actually declares the function + // unless this is an interface, in which case we create the overloads for all + // classes that directly implement the interface. + const MetaClass *decl_class = java_function->declaringClass(); + + if (java_function->implementingClass() != decl_class + && java_function->implementingClass()->baseClass() + && (decl_class->isInterface() + ? java_function->implementingClass()->baseClass()->inheritsFromInterface(decl_class) + : java_function->implementingClass()->baseClass()->inheritsFrom(decl_class))) + return; + if(!(_option & NoNullness) && !m_nullness){ _option = Option(_option & NoNullness); } @@ -6029,14 +6034,14 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j } if(isCharSequenceSubstitute(castArgument->type())){ if(options & NoNullness){ - impliciteCall = "java.lang.CharSequence"; + impliciteCall = QStringLiteral(u"java.lang.CharSequence"); }else{ if(options & StrictNonNull){ - impliciteCall = "java.lang.@StrictNonNull CharSequence"; + impliciteCall = QStringLiteral(u"java.lang.@StrictNonNull CharSequence"); }else if(castArgument->type()->indirections().isEmpty()){ - impliciteCall = "java.lang.@NonNull CharSequence"; + impliciteCall = QStringLiteral(u"java.lang.@NonNull CharSequence"); }else{ - impliciteCall = "java.lang.@Nullable CharSequence"; + impliciteCall = QStringLiteral(u"java.lang.@Nullable CharSequence"); } } }else{ @@ -6069,13 +6074,13 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j if(!originator->javaQualifier().isEmpty()) name += originator->javaQualifier().replace("$",".") + "."; name += originator->targetLangName().replace("$","."); - auto idx = name.indexOf('<'); + auto idx = name.indexOf(u'<'); QString package; QString typeName = name; if(idx>0){ typeName = name.mid(0, idx); } - idx = typeName.lastIndexOf('.'); + idx = typeName.lastIndexOf(u'.'); if(idx>0){ typeName = name.mid(idx+1); package = name.mid(0, idx+1); @@ -6087,12 +6092,30 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j } impliciteCallArgs[arg->argumentIndex()] << replacement; } + bool useArgumentAsSlot = java_function->useArgumentAsSlot(arg->argumentIndex() + 1); bool useArgumentAsBuffer = java_function->useArgumentAsBuffer(arg->argumentIndex() + 1); bool useArgumentAsArray = java_function->useArgumentAsArray(arg->argumentIndex() + 1); + if(useArgumentAsSlot){ + int lengthParameter = java_function->utilArgumentIndex(arg->argumentIndex() + 1); + if(lengthParameter>0 && lengthParameter<=arguments.size()){ + const MetaArgument *lengthParam = arguments[lengthParameter - 1]; + if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ + lengthParam = nullptr; + for(const MetaArgument *argument : arguments) { + if(argument && argument->argumentIndex()+1==lengthParameter){ + lengthParam = argument; + } + } + } + if(lengthParam && java_function->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ + impliciteCallArgs[lengthParam->argumentIndex()] << QStringLiteral(u"3"); + } + } + } if(!useArgumentAsBuffer && useArgumentAsArray - && java_function->insertArrayOffsetArgument(arg->argumentIndex() + 1)){ - int lengthParameter = java_function->arrayOrBufferLengthIndex(arg->argumentIndex() + 1); + && java_function->insertUtilArgument(arg->argumentIndex() + 1)){ + int lengthParameter = java_function->utilArgumentIndex(arg->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=arguments.size()){ const MetaArgument *lengthParam = arguments[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -6104,18 +6127,23 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j } } if(lengthParam && java_function->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ - impliciteCallArgs[lengthParam->argumentIndex()] << QString("0"); + impliciteCallArgs[lengthParam->argumentIndex()] << QStringLiteral(u"0"); } } } if(useArgumentAsBuffer && useArgumentAsArray){ - if(java_function->insertArrayOffsetArgument(arg->argumentIndex() + 1)){ - impliciteCallArgs[arg->argumentIndex()] << QString("1"); + if(java_function->insertUtilArgument(arg->argumentIndex() + 1)){ + impliciteCallArgs[arg->argumentIndex()] << QStringLiteral(u"1"); } - impliciteCallArgs[arg->argumentIndex()] << QString("2"); + impliciteCallArgs[arg->argumentIndex()] << QStringLiteral(u"2"); } + } + } + + for (const MetaArgument *arg : arguments){ + if(impliciteCallArgs.contains(arg->argumentIndex())){ const QList> implicitCallsCopy = implicitCalls; - for(const QString& jarg : impliciteCallArgs[arg->argumentIndex()]){ + for(const QString& jarg : qAsConst(impliciteCallArgs[arg->argumentIndex()])){ if(!jarg.isEmpty()){ QList> _implicitCalls = implicitCallsCopy; _implicitCalls.detach(); @@ -6126,35 +6154,23 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j implicitCalls << _implicitCalls; } } - if(implicitCalls.size()>50){ - implicitCalls.clear(); - implicitCalls << QMap(); - QString originalJavaSignature; - { - QTextStream s2(&originalJavaSignature); - s2 << java_function->name(); - s2 << "("; - writeFunctionArguments(s2, java_function, {}, -1, Option(NoNullness | SkipTemplateParameters | VarArgsAsArray | SkipName)); - s2 << ")"; - s2.flush(); - } - ReportHandler::warning(QString("Skipping implicit calls for Java method %1 in %2. Too much arguments.").arg(originalJavaSignature, java_function->ownerClass()->qualifiedCppName())); - break; - } } } - // We only create the overloads for the class that actually declares the function - // unless this is an interface, in which case we create the overloads for all - // classes that directly implement the interface. - const MetaClass *decl_class = java_function->declaringClass(); - - if (java_function->implementingClass() != decl_class - && java_function->implementingClass()->baseClass() - && (decl_class->isInterface() - ? java_function->implementingClass()->baseClass()->inheritsFromInterface(decl_class) - : java_function->implementingClass()->baseClass()->inheritsFrom(decl_class))) - return; + if(implicitCalls.size()>50){ + implicitCalls.clear(); + implicitCalls << QMap(); + QString originalJavaSignature; + { + QTextStream s2(&originalJavaSignature); + s2 << java_function->name(); + s2 << "("; + writeFunctionArguments(s2, java_function, {}, -1, Option(NoNullness | SkipTemplateParameters | VarArgsAsArray | SkipName)); + s2 << ")"; + s2.flush(); + } + ReportHandler::warning(QString("Skipping implicit calls for Java method %1 in %2. Too much arguments.").arg(originalJavaSignature, java_function->ownerClass()->qualifiedCppName())); + } // Figure out how many functions we need to write out, // One extra for each default argument. @@ -6197,7 +6213,7 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j if(!newNoKotlinGetter){ // QString getName = ((accessedField->type() // && accessedField->type()->isPrimitive() -// && accessedField->type()->typeEntry()->qualifiedTargetLangName()=="boolean") ? "is" : "get") + upCaseFirst(name); +// && accessedField->type()->typeEntry()->qualifiedTargetLangName()==QStringLiteral(u"boolean")) ? "is" : "get") + upCaseFirst(name); QString getName = "get" + upCaseFirst(name); if(java_function->name()!=getName){ delegates << Delegate{getName, false, false, 0, {}}; @@ -6214,7 +6230,7 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j if(!noKotlinGetter && java_function->type() && java_function->type()->isPrimitive() - && java_function->type()->typeEntry()->targetLangName()=="boolean" + && java_function->type()->typeEntry()->targetLangName()==QStringLiteral(u"boolean") && java_function->propertySpec()->name().startsWith("is") && java_function->propertySpec()->name()==java_function->name()){ noKotlinGetter = true; @@ -6244,7 +6260,7 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j if(!delegate.name.isEmpty()){ argumentCounts << -1; } - for(const QMap& replacedArguments : implicitCalls){ + for(const QMap& replacedArguments : qAsConst(implicitCalls)){ if(delegate.name.isEmpty()){ bool isEmpty = true; for(const QString* a : replacedArguments){ @@ -6376,16 +6392,16 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j defaultExpr = defaultExpr.replace(someName + ".", replacement); } if (java_function->typeReplaced(arg->argumentIndex() + 1).isEmpty() && arg->type()->isFlags()) { - defaultExpr = "new " + arg->type()->fullName().replace('$', '.') + "(" + defaultExpr + ")"; + defaultExpr = "new " + arg->type()->fullName().replace(u'$', u'.') + "(" + defaultExpr + ")"; } commentStream << defaultExpr - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/"); + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")); commentStream << ""; if(useList) commentStream << "
    • " << Qt::endl; @@ -6471,34 +6487,41 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j const QString* alternativeType = replacedArguments[arg->argumentIndex()]; if(used_arguments!=-1 && alternativeType - && *alternativeType!="0" - && *alternativeType!="1" - && *alternativeType!="2"){ + && *alternativeType!=QStringLiteral(u"0") + && *alternativeType!=QStringLiteral(u"1") + && *alternativeType!=QStringLiteral(u"2") + && *alternativeType!=QStringLiteral(u"3")){ alternativeType = nullptr; } if(alternativeType){ if (written_arguments > 0) s << ", "; - if(*alternativeType=="0"){ + if(*alternativeType==QStringLiteral(u"0")){ s << "-1"; + }else if(*alternativeType==QStringLiteral(u"3")){ + for(const MetaArgument* _arg : arguments){ + if(java_function->utilArgumentIndex(_arg->argumentIndex()+1)==arg->argumentIndex()+1){ + s << "QtJambi_LibraryUtilities.internal.lambdaContext(" << _arg->argumentName() << ")"; + } + } }else{ QString java_type = java_function->typeReplaced(arg->argumentIndex() + 1); if (java_type.isEmpty()){ java_type = arg->type()->fullName(); if(java_function->useArgumentAsBuffer(arg->argumentIndex()+1)){ - if(java_type=="int"){ + if(java_type==QStringLiteral(u"int")){ java_type = "java.nio.IntBuffer"; - }else if(java_type=="byte"){ + }else if(java_type==QStringLiteral(u"byte")){ java_type = "java.nio.ByteBuffer"; - }else if(java_type=="char"){ + }else if(java_type==QStringLiteral(u"char")){ java_type = "java.nio.CharBuffer"; - }else if(java_type=="short"){ + }else if(java_type==QStringLiteral(u"short")){ java_type = "java.nio.ShortBuffer"; - }else if(java_type=="long"){ + }else if(java_type==QStringLiteral(u"long")){ java_type = "java.nio.LongBuffer"; - }else if(java_type=="float"){ + }else if(java_type==QStringLiteral(u"float")){ java_type = "java.nio.FloatBuffer"; - }else if(java_type=="double"){ + }else if(java_type==QStringLiteral(u"double")){ java_type = "java.nio.DoubleBuffer"; }else{ java_type = "java.nio.Buffer"; @@ -6511,14 +6534,14 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j .replace("@Nullable ", "").replace("@NonNull ", "").replace("@StrictNonNull ", ""); } //s << arg->modifiedArgumentName() << "==null ? null : "; - if(java_type=="int" - || java_type=="byte" - || java_type=="short" - || java_type=="long" - || java_type=="double" - || java_type=="float" - || java_type=="boolean" - || java_type=="char"){ + if(java_type==QStringLiteral(u"int") + || java_type==QStringLiteral(u"byte") + || java_type==QStringLiteral(u"short") + || java_type==QStringLiteral(u"long") + || java_type==QStringLiteral(u"double") + || java_type==QStringLiteral(u"float") + || java_type==QStringLiteral(u"boolean") + || java_type==QStringLiteral(u"char")){ s << "(" << java_type << ")" << arg->modifiedArgumentName(); }else if(java_type.startsWith("java.nio.") && java_type.endsWith("ByteBuffer") && alternativeType && alternativeType->endsWith("QByteArray")){ if(arg->type()->isConstant()){ @@ -6529,17 +6552,17 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j }else if(java_type.startsWith("java.nio.") && java_type.endsWith("Buffer") && alternativeType - && (alternativeType->endsWith("[]") || *alternativeType=="1" || *alternativeType=="2")){ + && (alternativeType->endsWith(QStringLiteral(u"[]")) || *alternativeType=="1" || *alternativeType=="2")){ if(java_type=="java.nio.Buffer"){ s << arg->modifiedArgumentName() << "==null ? null : java.nio.ByteBuffer.wrap(" << arg->modifiedArgumentName(); }else{ - s << arg->modifiedArgumentName() << "==null ? null : " << java_type.replace('$', '.') << ".wrap(" << arg->modifiedArgumentName(); + s << arg->modifiedArgumentName() << "==null ? null : " << java_type.replace(u'$', u'.') << ".wrap(" << arg->modifiedArgumentName(); } if(*alternativeType=="1"){ QString modifiedArgumentName = arg->modifiedArgumentName(); modifiedArgumentName[0] = modifiedArgumentName[0].toUpper(); s << ", offsetOf" << modifiedArgumentName << ", "; - int lengthParameter = java_function->arrayOrBufferLengthIndex(arg->argumentIndex() + 1); + int lengthParameter = java_function->utilArgumentIndex(arg->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=arguments.size()){ const MetaArgument *lengthParam = arguments[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -6563,7 +6586,7 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j }else if(java_type.startsWith("io.qt.core.QRunnable")){ s << "io.qt.core.QRunnable.of(" << arg->modifiedArgumentName() << ")"; }else{ - s << "new " << java_type.replace('$', '.') << "(" << arg->modifiedArgumentName() << ")"; + s << "new " << java_type.replace(u'$', u'.') << "(" << arg->modifiedArgumentName() << ")"; } } }else if (used_arguments==-1 || j < used_arguments) { @@ -6572,8 +6595,8 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j s << arg->modifiedArgumentName(); if(!java_function->useArgumentAsBuffer(arg->argumentIndex() + 1) && java_function->useArgumentAsArray(arg->argumentIndex() + 1) - && java_function->insertArrayOffsetArgument(arg->argumentIndex() + 1)){ - int lengthParameter = java_function->arrayOrBufferLengthIndex(arg->argumentIndex() + 1); + && java_function->insertUtilArgument(arg->argumentIndex() + 1)){ + int lengthParameter = java_function->utilArgumentIndex(arg->argumentIndex() + 1); if(lengthParameter>0 && lengthParameter<=arguments.size()){ const MetaArgument *lengthParam = arguments[lengthParameter - 1]; if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ @@ -6584,10 +6607,12 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j } } } - if(const QString* lengthType = replacedArguments[lengthParam->argumentIndex()]){ - if(*lengthType=="0"){ - lengthParam = nullptr; - s << ", 0"; + if(lengthParam){ + if(const QString* lengthType = replacedArguments[lengthParam->argumentIndex()]){ + if(*lengthType==QStringLiteral(u"0")){ + lengthParam = nullptr; + s << ", 0"; + } } } if(lengthParam && java_function->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ @@ -6628,7 +6653,7 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j } else { if(defaultExpr=="null") s << "(" << modified_type.replace(" @Nullable", "").replace(" @NonNull", "").replace(" @StrictNonNull", "") - .replace("@Nullable ", "").replace("@NonNull ", "").replace("@StrictNonNull ", "").replace('$', '.') << ")"; + .replace("@Nullable ", "").replace("@NonNull ", "").replace("@StrictNonNull ", "").replace(u'$', u'.') << ")"; } auto pos = defaultExpr.indexOf("."); @@ -6650,7 +6675,7 @@ void JavaGenerator::writeFunctionOverloads(QTextStream &s, const MetaFunction *j } if (arg_type && arg_type->isFlags()) { - s << "new " << arg_type->fullName().replace('$', '.') << "(" << defaultExpr << ")"; + s << "new " << arg_type->fullName().replace(u'$', u'.') << "(" << defaultExpr << ")"; } else { s << defaultExpr; } @@ -6787,13 +6812,13 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti } if(!java_class->brief().isEmpty()){ commentStream << "

      " << QString(java_class->brief()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "

      " << Qt::endl; } commentStream << "

      Java wrapper for Qt "; @@ -6813,13 +6838,13 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti // ? java_class->templateBaseClass()->qualifiedCppName().replace("", "") // : java_class->qualifiedCppName() ) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/"); + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")); if(!java_class->href().isEmpty()) commentStream << ""; commentStream << "

      " << Qt::endl; @@ -6830,13 +6855,13 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti if(!comment.isEmpty()) commentStream << Qt::endl; commentStream << "@deprecated " << QString(java_class->deprecatedComment()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << Qt::endl; } s << INDENT << "@Deprecated" << Qt::endl; @@ -6900,7 +6925,7 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti TypeEntry *templateArgument = templateArguments.at(i); if (i > 0) s << ", "; - s << QString(templateArgument->name()).replace('$', '.'); + s << QString(templateArgument->name()).replace(u'$', u'.'); } }else{ s << "T"; @@ -6983,7 +7008,7 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti m_currentPackages << iface->package(); if (i != 0) s << "," << Qt::endl << INDENT << " "; - s << iface->package() << "." << iface->name().replace('$', '.'); + s << iface->package() << "." << iface->name().replace(u'$', u'.'); } } @@ -7030,7 +7055,8 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti } else { s << "," << Qt::endl << INDENT << " "; } - for(QString cls : java_class->typeEntry()->implements().split(",")){ + const QStringList clss = java_class->typeEntry()->implements().split(","); + for(QString cls : clss){ registerPackage(cls); } s << java_class->typeEntry()->implements(); @@ -7064,7 +7090,7 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti QMap variables; //bool isWrapperClass = java_class->typeEntry()->lookupName().endsWith("$ConcreteWrapper"); for(MetaFunction *function : java_class->functions()) { - QList referenceCounts = function->referenceCounts(java_class); + const QList referenceCounts = function->referenceCounts(java_class); for(const ReferenceCount& refCount : referenceCounts) { variables[refCount.variableName] |= uint(refCount.action) @@ -7075,7 +7101,7 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti } } for(MetaField *field : java_class->fields()) { - QList referenceCounts = field->setter()->referenceCounts(java_class); + const QList referenceCounts = field->setter()->referenceCounts(java_class); for(const ReferenceCount& refCount : referenceCounts) { variables[refCount.variableName] |= uint(refCount.action) @@ -7086,7 +7112,8 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti } } - for(const QString& variableName : variables.keys()) { + const auto keys = variables.keys(); + for(const QString& variableName : keys) { int attributes = variables[variableName]; int actions = attributes & ReferenceCount::ActionsMask; bool threadSafe = attributes & ReferenceCount::ThreadSafe; @@ -7099,8 +7126,8 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti if (((actions & ReferenceCount::Add) == 0) != ((actions & ReferenceCount::Remove) == 0) && !(actions & ReferenceCount::ClearAdd)&& !(actions & ReferenceCount::ClearAddAll)) { - QString warn = QString("Either add or remove specified for reference count variable '%1' in '%2' but not both.") - .arg(variableName).arg(java_class->qualifiedCppName()); + QString warn = QStringLiteral(u"Either add or remove specified for reference count variable '%1' in '%2' but not both.") + .arg(variableName, java_class->qualifiedCppName()); ReportHandler::warning(warn); } @@ -7148,14 +7175,14 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti << INDENT << " * This variable stores the meta-object for the class." << Qt::endl << INDENT << " */" << Qt::endl << INDENT << "public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(" - << java_class->name().replace('$', '.') << ".class);" << Qt::endl + << java_class->name().replace(u'$', u'.') << ".class);" << Qt::endl << INDENT << Qt::endl; } } if (!java_class->isInterface() && (java_class->isAbstract() || force_abstract)) { s << INDENT << "@NativeAccess" << Qt::endl - << INDENT << "private static final class ConcreteWrapper extends " << java_class->name().replace('$', '.') << " {" << Qt::endl; + << INDENT << "private static final class ConcreteWrapper extends " << java_class->name().replace(u'$', u'.') << " {" << Qt::endl; { INDENTATION(INDENT) @@ -7163,7 +7190,7 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti << INDENT << "@NativeAccess" << Qt::endl << INDENT << "private ConcreteWrapper(QPrivateConstructor p) { super(p); }" << Qt::endl; - MetaFunctionList functions = java_class->queryFunctions(MetaClass::NormalFunctions | MetaClass::AbstractFunctions | MetaClass::NonEmptyFunctions | MetaClass::NotRemovedFromTargetLang); + const MetaFunctionList functions = java_class->queryFunctions(MetaClass::NormalFunctions | MetaClass::AbstractFunctions | MetaClass::NonEmptyFunctions | MetaClass::NotRemovedFromTargetLang); for(const MetaFunction *java_function : functions) { if(!java_function->isPrivate()){ uint exclude_attributes = MetaAttributes::Abstract | MetaAttributes::Override; @@ -7230,16 +7257,17 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti // Signals QList signalNames; QMap sortedSignals; - for(MetaFunction* function : java_class->queryFunctions(MetaClass::Signals - | MetaClass::ClassImplements - | MetaClass::NotRemovedFromTargetLang)){ + const MetaFunctionList functions = java_class->queryFunctions(MetaClass::Signals + | MetaClass::ClassImplements + | MetaClass::NotRemovedFromTargetLang); + for(MetaFunction* function : functions){ QString key = function->declaringClass()->typeEntry()->qualifiedCppName() + "::" + function->name(); if(!signalNames.contains(key)) signalNames.append(key); sortedSignals[key].append(function); } - for(const QString& key : signalNames){ + for(const QString& key : qAsConst(signalNames)){ const MetaFunctionList& list = sortedSignals[key]; if(list.size()==1) writeSignal(s, list.first()); @@ -7387,7 +7415,7 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti if (java_class->hasCloneOperator() && !alreadyHasCloneMethod) { writeCloneFunction(s, java_class); } - for(const MetaFunction *function : overloadedFunctions){ + for(const MetaFunction *function : qAsConst(overloadedFunctions)){ writeFunctionOverloads(s, function); } @@ -7420,10 +7448,10 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti INDENTATIONRESET(INDENT) QString comment2; QTextStream commentStream2(&comment2); - for (MetaFunction *function : nonPublicFunctions) { + for (MetaFunction *function : qAsConst(nonPublicFunctions)) { writeFunction(commentStream2, function, 0, 0, Option(NoNullness | InFunctionComment | NoSuppressExports)); } - for(const MetaField *field : nonPublicFields) { + for(const MetaField *field : qAsConst(nonPublicFields)) { writeFieldAccessors(commentStream2, field, Option(NoNullness | InFunctionComment | NoSuppressExports)); } commentStream2.seek(0); @@ -7432,13 +7460,13 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti << "" << Qt::endl; while(!commentStream2.atEnd()){ QString line = commentStream2.readLine() - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/"); + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")); int count = 0; while(line.startsWith(" ")){ line = line.mid(1); @@ -7452,7 +7480,7 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti commentStream << "" << Qt::endl; } if(!restrictedFunctions.isEmpty()){ - QString targetLangName = java_class->typeEntry()->targetLangName().replace('$', '.'); + QString targetLangName = java_class->typeEntry()->targetLangName().replace(u'$', u'.'); s << INDENT << Qt::endl << INDENT << "/**" << Qt::endl << INDENT << " * @hidden" << Qt::endl @@ -7464,7 +7492,7 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti << INDENT << " super(instance);" << Qt::endl << INDENT << "}" << Qt::endl << INDENT << Qt::endl; - for(MetaFunction *java_function : restrictedFunctions) { + for(MetaFunction *java_function : qAsConst(restrictedFunctions)) { if(java_function->isPublic()){ *java_function -= MetaAttributes::Public; *java_function += MetaAttributes::Private; @@ -7492,7 +7520,7 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti for (int i = -1; i <= arguments.size(); ++i) { referenceCounts[i] = java_function->referenceCounts(java_function->implementingClass(), i); if (referenceCounts[i].size() > 0) { - for(const ReferenceCount& refCount : referenceCounts[i]) { + for(const ReferenceCount& refCount : qAsConst(referenceCounts[i])) { // We just want to know this to secure return value into local variable // to hold over ReferenceCount management later on. if (refCount.action != ReferenceCount::Ignore) { @@ -7515,7 +7543,7 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti // Lookup if there is a reference-count action required on the return value. MetaType *return_type = java_function->type(); - QString new_return_type = QString(java_function->typeReplaced(0)).replace('$', '.'); + QString new_return_type = QString(java_function->typeReplaced(0)).replace(u'$', u'.'); bool has_return_type = (new_return_type != "void" && (!new_return_type.isEmpty() || return_type)) || java_function->isSelfReturningFunction(); OwnershipRule ownershipRule = java_function->ownership(java_function->implementingClass(), TS::TargetLangCode, 0); @@ -7543,12 +7571,12 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti if (return_type->isTargetLangEnum()) { s << static_cast(return_type->typeEntry())->qualifiedTargetLangName() << ".resolve("; } else if (return_type->isTargetLangFlags()) { - s << "new " << return_type->typeEntry()->qualifiedTargetLangName().replace('$', '.') << "("; + s << "new " << return_type->typeEntry()->qualifiedTargetLangName().replace(u'$', u'.') << "("; } } } - s << itype->origin()->targetLangName().replace('$', '.') + s << itype->origin()->targetLangName().replace(u'$', u'.') << "." << java_function->marshalledName() << "("; if(java_class->typeEntry()->isNativeIdBased()){ s << "QtJambi_LibraryUtilities.internal.nativeId(instance)"; @@ -7588,8 +7616,8 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti s << ";" << Qt::endl; - for(ReferenceCount refCount : referenceCounts[-1]){ - refCount.declareVariable = java_function->declaringClass()->fullName().replace("/", ".").replace('$', '.'); + for(ReferenceCount refCount : qAsConst(referenceCounts[-1])){ + refCount.declareVariable = java_function->declaringClass()->fullName().replace("/", ".").replace(u'$', u'.'); writeReferenceCount(s, refCount, -1, java_function, java_function->isStatic() ? QLatin1String("null") : QLatin1String("this")); } @@ -7597,9 +7625,9 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti // so that the GC will not destroy the C++ object too early. At this point we // have called the native method call so can manage referenceCount issues. // First the input arguments - for (const MetaArgument* argument : arguments) { + for (const MetaArgument* argument : qAsConst(arguments)) { for(ReferenceCount refCount : referenceCounts[argument->argumentIndex()+1]){ - refCount.declareVariable = java_function->declaringClass()->fullName().replace("/", ".").replace('$', '.'); + refCount.declareVariable = java_function->declaringClass()->fullName().replace("/", ".").replace(u'$', u'.'); writeReferenceCount(s, refCount, argument->argumentIndex()+1, java_function, QLatin1String("instance")); } } @@ -7608,8 +7636,8 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti s << INDENT << "return " << java_function->argumentReplaced(0) << ";" << Qt::endl; }else{ // Then the return value - for(ReferenceCount referenceCount : referenceCounts[0]) { - referenceCount.declareVariable = java_function->declaringClass()->fullName().replace("/", ".").replace('$', '.'); + for(ReferenceCount referenceCount : qAsConst(referenceCounts[0])) { + referenceCount.declareVariable = java_function->declaringClass()->fullName().replace("/", ".").replace(u'$', u'.'); writeReferenceCount(s, referenceCount, 0, java_function, QLatin1String("instance")); } @@ -7665,7 +7693,7 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti } }else if(!privatePureVirtualFunctions.isEmpty()){ QStringList privatePureVirtualFunctionSignatures; - for(MetaFunction *function : privatePureVirtualFunctions){ + for(MetaFunction *function : qAsConst(privatePureVirtualFunctions)){ QString sig = functionSignature(function, 0, MetaAttributes::Native | MetaAttributes::Abstract, Option(InFunctionComment | NoSuppressExports)); if(!privatePureVirtualFunctionSignatures.contains(sig)) privatePureVirtualFunctionSignatures << sig; @@ -7679,7 +7707,7 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti INDENTATIONRESET(INDENT) QString comment2; QTextStream commentStream2(&comment2); - for(const QString& signature : privatePureVirtualFunctionSignatures){ + for(const QString& signature : qAsConst(privatePureVirtualFunctionSignatures)){ commentStream2 << Qt::endl << "@QtPrivateOverride" << Qt::endl << signature << " {...}" << Qt::endl; @@ -7688,13 +7716,13 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti commentStream << "" << Qt::endl; while(!commentStream2.atEnd()){ QString line = commentStream2.readLine() - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/"); + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")); int count = 0; while(line.startsWith(" ")){ line = line.mid(1); @@ -7737,10 +7765,11 @@ void JavaGenerator::write(QTextStream &s, const MetaClass *java_class, int nesti void JavaGenerator::generate() { AbstractGenerator::generate(); - for(TypeSystemTypeEntry * typeSystemEntry : m_packagesByTypeSystem.keys()){ + const auto keys = m_packagesByTypeSystem.keys(); + for(TypeSystemTypeEntry * typeSystemEntry : keys){ if(typeSystemEntry){ m_packagesByTypeSystem[typeSystemEntry].removeDuplicates(); - for(const QString& pkg : m_packagesByTypeSystem[typeSystemEntry]){ + for(const QString& pkg : qAsConst(m_packagesByTypeSystem[typeSystemEntry])){ bool isSuppressed = false; for(QString forwardDeclaration : typeSystemEntry->forwardDeclarations()){ auto idx = forwardDeclaration.lastIndexOf('/'); @@ -7830,19 +7859,19 @@ void JavaGenerator::writeFunctionAttributes(QTextStream &s, const MetaFunction * } MetaBuilder::decideUsagePattern(cpy.get()); modified_type = translateType(cpy.get(), java_function->implementingClass(), Option((options & ~UseNativeIds) | NoNullness)); - if(modified_type=="int"){ + if(modified_type==QStringLiteral(u"int")){ modified_type = "java.nio.IntBuffer"; - }else if(modified_type=="byte"){ + }else if(modified_type==QStringLiteral(u"byte")){ modified_type = "java.nio.ByteBuffer"; - }else if(modified_type=="char"){ + }else if(modified_type==QStringLiteral(u"char")){ modified_type = "java.nio.CharBuffer"; - }else if(modified_type=="short"){ + }else if(modified_type==QStringLiteral(u"short")){ modified_type = "java.nio.ShortBuffer"; - }else if(modified_type=="long"){ + }else if(modified_type==QStringLiteral(u"long")){ modified_type = "java.nio.LongBuffer"; - }else if(modified_type=="float"){ + }else if(modified_type==QStringLiteral(u"float")){ modified_type = "java.nio.FloatBuffer"; - }else if(modified_type=="double"){ + }else if(modified_type==QStringLiteral(u"double")){ modified_type = "java.nio.DoubleBuffer"; }else{ modified_type = "java.nio.Buffer"; @@ -7857,29 +7886,8 @@ void JavaGenerator::writeFunctionAttributes(QTextStream &s, const MetaFunction * cpy->setIndirections(indirections); } MetaBuilder::decideUsagePattern(cpy.get()); - modified_type = translateType(cpy.get(), java_function->implementingClass(), Option(options & ~UseNativeIds)).replace('$', '.'); + modified_type = translateType(cpy.get(), java_function->implementingClass(), Option(options & ~UseNativeIds)).replace(u'$', u'.'); modified_type += "[]"; - /*if(function->insertArrayOffsetArgument(argument->argumentIndex() + 1)){ - int lengthParameter = function->arrayOrBufferLengthIndex(argument->argumentIndex() + 1); - if(lengthParameter>0 && lengthParameter<=arguments.size()){ - const MetaArgument *lengthParam = arguments[lengthParameter - 1]; - if(!lengthParam || lengthParam->argumentIndex()+1!=lengthParameter){ - lengthParam = nullptr; - for(const MetaArgument *argument : arguments) { - if(argument && argument->argumentIndex()+1==lengthParameter){ - lengthParam = argument; - } - } - } - if(lengthParam && function->argumentRemoved(lengthParam->argumentIndex() + 1)==ArgumentRemove_No){ - QString modified_type = function->typeReplaced(lengthParam->argumentIndex() + 1); - if (modified_type.isEmpty()) - s2 << jni_signature(lengthParam->type(), JNISignatureFormat(NoModification | SlashesAndStuff)); - else - s2 << jni_signature(annotationFreeTypeName(modified_type), JNISignatureFormat(NoModification | SlashesAndStuff)); - } - } - }*/ }else{ modified_type = java_function->typeReplaced(0); if(modified_type.isEmpty() && java_function->isSelfReturningFunction()){ @@ -7893,23 +7901,23 @@ void JavaGenerator::writeFunctionAttributes(QTextStream &s, const MetaFunction * } returnType = translateType(java_function->type(), java_function->implementingClass(), Option(options | VarArgsAsArray)); }else{ - modified_type.replace('$', '.'); + modified_type.replace(u'$', u'.').replace(QStringLiteral(u"..."), QStringLiteral(u"[]")); registerPackage(modified_type); if (!(options & NoNullness) && modified_type!="void") { bool np = false; if((np = java_function->nullPointersDisabled(java_function->declaringClass(), 0)) || java_function->isSelfReturningFunction()){ - QString ann = np ? QString("@StrictNonNull") : QString("@NonNull"); - if(modified_type.endsWith("[]")){ + QString ann = np ? QStringLiteral(u"@StrictNonNull") : QStringLiteral(u"@NonNull"); + if(modified_type.endsWith(QStringLiteral(u"[]"))){ modified_type = modified_type.mid(0, modified_type.length()-2) + " " + ann + "[]"; }else { - auto idx = modified_type.indexOf('<'); + auto idx = modified_type.indexOf(u'<'); QString package; QString typeName = modified_type; if(idx>0){ typeName = modified_type.mid(0, idx); } - idx = typeName.lastIndexOf('.'); + idx = typeName.lastIndexOf(u'.'); if(idx>0){ typeName = modified_type.mid(idx+1); package = modified_type.mid(0, idx+1); @@ -7919,14 +7927,14 @@ void JavaGenerator::writeFunctionAttributes(QTextStream &s, const MetaFunction * } } }else if(modified_type.startsWith("java.nio.") && !modified_type.contains("@")){ - QString ann = QString("@Nullable "); - auto idx = modified_type.indexOf('<'); + QString ann = QStringLiteral(u"@Nullable "); + auto idx = modified_type.indexOf(u'<'); QString package; QString typeName = modified_type; if(idx>0){ typeName = modified_type.mid(0, idx); } - idx = typeName.lastIndexOf('.'); + idx = typeName.lastIndexOf(u'.'); if(idx>0){ typeName = modified_type.mid(idx+1); package = modified_type.mid(0, idx+1); @@ -7936,17 +7944,17 @@ void JavaGenerator::writeFunctionAttributes(QTextStream &s, const MetaFunction * } }else if(modified_type=="java.lang.String" || modified_type=="String"){ if(java_function->type() - && java_function->type()->typeEntry()->qualifiedCppName()=="char" + && java_function->type()->typeEntry()->qualifiedCppName()==QStringLiteral(u"char") && java_function->type()->indirections().size()==1 && !java_function->hasConversionRule(TS::Language::NativeCode, 0)){ - auto idx = modified_type.indexOf('<'); + auto idx = modified_type.indexOf(u'<'); QString package; QString typeName = modified_type; if(idx>0){ typeName = modified_type.mid(0, idx); } - idx = typeName.lastIndexOf('.'); - QString ann = QString("@Nullable "); + idx = typeName.lastIndexOf(u'.'); + QString ann = QStringLiteral(u"@Nullable "); if(idx>0){ typeName = modified_type.mid(idx+1); package = modified_type.mid(0, idx+1); @@ -7965,12 +7973,15 @@ void JavaGenerator::writeFunctionAttributes(QTextStream &s, const MetaFunction * // Does the function use native pointer API? bool nativePointer = false; - if(java_function->type() && java_function->type()->isNativePointer()){ + if(java_function->type() + && java_function->type()->isNativePointer() + && !java_function->type()->typeEntry()->isNativePointer() + && !(java_function->type()->typeEntry()->isAlias() && reinterpret_cast(java_function->type()->typeEntry())->getAsNativePointer())){ if(java_function->typeReplaced(0).isEmpty() - && java_function->argumentReplaced(0)!="this" - && !java_function->useArgumentAsArray(0) + && java_function->argumentReplaced(0)!=QStringLiteral(u"this") + && !java_function->useArgumentAsArray(0) && !java_function->useArgumentAsBuffer(0) - && java_function->type()->typeEntry()->qualifiedCppName()!="QMetaObject"){ + && java_function->type()->typeEntry()->qualifiedCppName()!=QStringLiteral(u"QMetaObject")){ nativePointer = true; } } @@ -8020,7 +8031,10 @@ void JavaGenerator::writeFunctionAttributes(QTextStream &s, const MetaFunction * if (!nativePointer && java_function->type() && !java_function->type()->isPointerContainer()) { for(const MetaType *type : java_function->type()->instantiations()) { - if (type && type->isNativePointer()) { + if (type + && type->isNativePointer() + && !type->typeEntry()->isNativePointer() + && !(type->typeEntry()->isAlias() && reinterpret_cast(type->typeEntry())->getAsNativePointer())) { nativePointer = true; break; } @@ -8033,11 +8047,15 @@ void JavaGenerator::writeFunctionAttributes(QTextStream &s, const MetaFunction * if (java_function->argumentRemoved(argument->argumentIndex() + 1)==ArgumentRemove_No && java_function->typeReplaced(argument->argumentIndex() + 1).isEmpty() && !java_function->useArgumentAsArray(argument->argumentIndex() + 1) - && !java_function->useArgumentAsBuffer(argument->argumentIndex() + 1)) { + && !java_function->useArgumentAsBuffer(argument->argumentIndex() + 1) + && !java_function->useArgumentAsSlot(argument->argumentIndex() + 1)) { if (argument->type()->isNativePointer()) { - nativePointer = true; - if (resettableObject) break ; + if(!argument->type()->typeEntry()->isNativePointer() + && !(argument->type()->typeEntry()->isAlias() && reinterpret_cast(argument->type()->typeEntry())->getAsNativePointer())){ + nativePointer = true; + if (resettableObject) break ; + } } else if (!java_function->isFinalInTargetLang() && ((argument->type()->isObject() && (argument->type()->typeEntry()->isObject() || !argument->type()->isConstant())) @@ -8073,7 +8091,9 @@ void JavaGenerator::writeFunctionAttributes(QTextStream &s, const MetaFunction * for(const MetaType *type : argument->type()->instantiations()) { if (type && type->isNativePointer()) { - if(!argument->type()->isPointerContainer()){ + if(!argument->type()->isPointerContainer() + && !type->typeEntry()->isNativePointer() + && !(type->typeEntry()->isAlias() && reinterpret_cast(type->typeEntry())->getAsNativePointer())){ nativePointer = true; if (resettableObject) break; } @@ -8131,7 +8151,7 @@ void JavaGenerator::writeFunctionAttributes(QTextStream &s, const MetaFunction * if(pkg!=java_function->implementingClass()->package() && !pkg.isEmpty() && m_typeSystemByPackage[pkg] - && m_typeSystemByPackage[pkg]->module()!="qtjambi" // because it's transitive + && m_typeSystemByPackage[pkg]->module()!=QStringLiteral(u"qtjambi") // because it's transitive && m_typeSystemByPackage[pkg]!=m_typeSystemByPackage[java_function->implementingClass()->package()] && !pkg.startsWith("io.qt.internal") && pkg!="io.qt"){ @@ -8178,16 +8198,16 @@ void JavaGenerator::writeFunctionAttributes(QTextStream &s, const MetaFunction * ){ s << INDENT << "@SafeVarargs" << Qt::endl; }else if(!typeReplaced.isEmpty() - && typeReplaced!="java.lang.Object..." - && typeReplaced.endsWith("...")){ + && typeReplaced!=QStringLiteral(u"java.lang.Object...") + && typeReplaced.endsWith(QStringLiteral(u"..."))){ s << INDENT << "@SafeVarargs" << Qt::endl; } } } if(!java_function->isConstructor() - && (!java_function->isInGlobalScope() || (java_function->name()!="readFrom" - && java_function->name()!="writeTo") ) + && (!java_function->isInGlobalScope() || (java_function->name()!=QStringLiteral(u"readFrom") + && java_function->name()!=QStringLiteral(u"writeTo")) ) && !java_function->isSignal() && !java_function->isStatic() && java_function->isFinalInCpp() && (excluded_attributes & MetaAttributes::FinalInTargetLang)==MetaAttributes::FinalInTargetLang){ @@ -8307,16 +8327,16 @@ void JavaGenerator::writeFunctionArguments(QTextStream &s, const MetaFunction *j if(commaRequired) s << ", "; commaRequired = true; - QString argType = QString(mod.modified_type).replace('$', '.'); + QString argType = QString(mod.modified_type).replace(u'$', u'.'); if((options & SkipTemplateParameters) && argType.contains("<")){ - bool isVarArg = argType.endsWith("..."); + bool isVarArg = argType.endsWith(QStringLiteral(u"...")); argType = argType.chopped(3); int arrayCount = 0; - while(argType.endsWith("[]")){ + while(argType.endsWith(QStringLiteral(u"[]"))){ ++arrayCount; argType = argType.chopped(2); } - auto idx = argType.indexOf('<'); + auto idx = argType.indexOf(u'<'); argType = argType.mid(0, idx); for(;arrayCount>0; --arrayCount){ argType += "[]"; @@ -8324,8 +8344,8 @@ void JavaGenerator::writeFunctionArguments(QTextStream &s, const MetaFunction *j if(isVarArg) argType += "..."; } - if((options & VarArgsAsArray) && argType.endsWith("...")){ - argType = argType.replace("...", "[]"); + if((options & VarArgsAsArray) && argType.endsWith(QStringLiteral(u"..."))){ + argType = argType.replace(QStringLiteral(u"..."), QStringLiteral(u"[]")); } s << argType; if ((options & SkipName) == 0) { @@ -8352,16 +8372,16 @@ void JavaGenerator::writeFunctionArguments(QTextStream &s, const MetaFunction *j if(commaRequired) s << ", "; commaRequired = true; - QString argType = QString(mod.modified_type).replace('$', '.'); + QString argType = QString(mod.modified_type).replace(u'$', u'.'); if((options & SkipTemplateParameters) && argType.contains("<")){ - bool isVarArg = argType.endsWith("..."); + bool isVarArg = argType.endsWith(QStringLiteral(u"...")); argType = argType.chopped(3); int arrayCount = 0; - while(argType.endsWith("[]")){ + while(argType.endsWith(QStringLiteral(u"[]"))){ ++arrayCount; argType = argType.chopped(2); } - auto idx = argType.indexOf('<'); + auto idx = argType.indexOf(u'<'); argType = argType.mid(0, idx); for(;arrayCount>0; --arrayCount){ argType += "[]"; @@ -8369,8 +8389,8 @@ void JavaGenerator::writeFunctionArguments(QTextStream &s, const MetaFunction *j if(isVarArg) argType += "..."; } - if((options & VarArgsAsArray) && argType.endsWith("...")){ - argType = argType.replace("...", "[]"); + if((options & VarArgsAsArray) && argType.endsWith(QStringLiteral(u"..."))){ + argType = argType.replace(QStringLiteral(u"..."), QStringLiteral(u"[]")); } s << argType; if ((options & SkipName) == 0) { @@ -8383,16 +8403,16 @@ void JavaGenerator::writeFunctionArguments(QTextStream &s, const MetaFunction *j if(commaRequired) s << ", "; commaRequired = true; - QString argType = QString(argumentMod.modified_type).replace('$', '.'); + QString argType = QString(argumentMod.modified_type).replace(u'$', u'.'); if((options & SkipTemplateParameters) && argType.contains("<")){ - bool isVarArg = argType.endsWith("..."); + bool isVarArg = argType.endsWith(QStringLiteral(u"...")); argType = argType.chopped(3); int arrayCount = 0; - while(argType.endsWith("[]")){ + while(argType.endsWith(QStringLiteral(u"[]"))){ ++arrayCount; argType = argType.chopped(2); } - auto idx = argType.indexOf('<'); + auto idx = argType.indexOf(u'<'); argType = argType.mid(0, idx); for(;arrayCount>0; --arrayCount){ argType += "[]"; @@ -8400,8 +8420,8 @@ void JavaGenerator::writeFunctionArguments(QTextStream &s, const MetaFunction *j if(isVarArg) argType += "..."; } - if((options & VarArgsAsArray) && argType.endsWith("...")){ - argType = argType.replace("...", "[]"); + if((options & VarArgsAsArray) && argType.endsWith(QStringLiteral(u"..."))){ + argType = argType.replace(QStringLiteral(u"..."), QStringLiteral(u"[]")); } s << argType; if ((options & SkipName) == 0) { @@ -8468,7 +8488,7 @@ void JavaGenerator::writeToStringFunction(QTextStream &s, const MetaClass *java_ lines << codeSnip.code().split("\n"); } } - QString nonNull = m_nullness ? QStringLiteral("@NonNull ") : QString{}; + QString nonNull = m_nullness ? QStringLiteral(u"@NonNull ") : QString{}; if (isQEvent) { s << Qt::endl << INDENT << "/**" << Qt::endl @@ -8491,27 +8511,27 @@ void JavaGenerator::writeToStringFunction(QTextStream &s, const MetaClass *java_ } if(java_class->toStringCapability()->functionType()!=MetaFunction::GlobalScopeFunction){ s << java_class->qualifiedCppName() - .replace("", "") - .replace("QtJambi", "Q") - .replace("QVoid", "Q") - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") + .replace(QStringLiteral(u""), QString()) + .replace(QStringLiteral(u"QtJambi"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"QVoid"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) << "::"; } s << QString(java_class->toStringCapability()->originalSignature()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") - .replace(",", ","); + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) + .replace(QStringLiteral(u","), QStringLiteral(u",")); if(!java_class->toStringCapability()->href().isEmpty()) s << ""; s << "

      " << Qt::endl; @@ -8560,47 +8580,34 @@ void JavaGenerator::writeCloneFunction(QTextStream &s, const MetaClass *java_cla s << INDENT << Qt::endl << INDENT << "/**" << Qt::endl << INDENT << " *

      Creates and returns a copy of this object.

      " << Qt::endl; - if(java_class->hasPublicCopyConstructor()){ - MetaFunctionList functions = java_class->queryFunctions(Constructors); - for(MetaFunction *f : functions) { - if ((f->wasPublic() || f->isPublic()) - && !f->isInvalid() - && !f->isEmptyFunction() && !f->isFake() - && f->implementingClass()==java_class - && f->actualMinimumArgumentCount()==1 - && f->arguments()[0]->type()->isConstant() - && f->arguments()[0]->type()->getReferenceType()==MetaType::Reference - && f->arguments()[0]->type()->typeEntry()==java_class->typeEntry()) { - s << "

      See "; - if(!f->href().isEmpty()){ - s << "href() << "\">"; - } - s << java_class->qualifiedCppName() - .replace("", "") - .replace("QtJambi", "Q") - .replace("QVoid", "Q") - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/") - << "::"; - s << QString(f->originalSignature()) - .replace("&", "&") - .replace("<", "<") - .replace(">", ">") - .replace("\t", "    ") - .replace("@", "@") - .replace("/*", "/*") - .replace("*/", "*/"); - if(!f->href().isEmpty()) - s << ""; - s << "

      " << Qt::endl; - break; - } - } + if(MetaFunction* f = java_class->publicCopyConstructor()){ + s << INDENT << "

      See "; + if(!f->href().isEmpty()){ + s << "href() << "\">"; + } + s << java_class->qualifiedCppName() + .replace(QStringLiteral(u""), QString()) + .replace(QStringLiteral(u"QtJambi"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"QVoid"), QStringLiteral(u"Q")) + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")) + << "::"; + s << QString(f->originalSignature()) + .replace(QStringLiteral(u"&"), QStringLiteral(u"&")) + .replace(QStringLiteral(u"<"), QStringLiteral(u"<")) + .replace(QStringLiteral(u">"), QStringLiteral(u">")) + .replace(QStringLiteral(u"\t"), QStringLiteral(u"    ")) + .replace(QStringLiteral(u"@"), QStringLiteral(u"@")) + .replace(QStringLiteral(u"/*"), QStringLiteral(u"/*")) + .replace(QStringLiteral(u"*/"), QStringLiteral(u"*/")); + if(!f->href().isEmpty()) + s << ""; + s << "

      " << Qt::endl; } s << INDENT << " */" << Qt::endl << INDENT << "@QtUninvokable" << Qt::endl @@ -8624,7 +8631,7 @@ void JavaGenerator::writeCloneFunction(QTextStream &s, const MetaClass *java_cla for (int i = 0; i < templateArguments.size(); ++i) { if (i > 0) s << ","; - s << QString(templateArguments.at(i)->name()).replace('$', '.'); + s << QString(templateArguments.at(i)->name()).replace(u'$', u'.'); } } }else{ @@ -8671,7 +8678,7 @@ void JavaGenerator::writeCloneFunction(QTextStream &s, const MetaClass *java_cla for (int i = 0; i < templateArguments.size(); ++i) { if (i > 0) s << ","; - s << QString(templateArguments.at(i)->name()).replace('$', '.'); + s << QString(templateArguments.at(i)->name()).replace(u'$', u'.'); } } }else{ @@ -8688,7 +8695,7 @@ void JavaGenerator::writeCloneFunction(QTextStream &s, const MetaClass *java_cla for (int i = 0; i < templateArguments.size(); ++i) { if (i > 0) s << ","; - s << QString(templateArguments.at(i)->name()).replace('$', '.'); + s << QString(templateArguments.at(i)->name()).replace(u'$', u'.'); } } }else{ @@ -8704,6 +8711,12 @@ void JavaGenerator::writeCloneFunction(QTextStream &s, const MetaClass *java_cla } s << ");" << Qt::endl; } + if(!java_class->publicCopyConstructor() + && !java_class->typeEntry()->hasProtectedCopyConstructor() + && !java_class->typeEntry()->hasPrivateCopyConstructor() + && !java_class->typeEntry()->isContainer()){ + ReportHandler::warning(QStringLiteral("Cloneable class %1 is missing an explicit copy constructor").arg(java_class->qualifiedCppName())); + } } void JavaGenerator::generateFake(const MetaClass *fake_class) { @@ -8896,7 +8909,7 @@ void JavaGenerator::write(QTextStream &s, const MetaFunctional *global_fun, int) s << INDENT << "package " << global_fun->package() << ";" << Qt::endl << Qt::endl; QSet imports; - imports.insert("io.qt.*"); + imports.insert(QStringLiteral(u"io.qt.*")); s << "import io.qt.*;" << Qt::endl; const QList& includes = global_fun->typeEntry()->extraIncludes(); @@ -8923,7 +8936,7 @@ void JavaGenerator::write(QTextStream &s, const MetaFunctional *global_fun, int) } void JavaGenerator::write(QTextStream &s, const MetaEnum *global_enum) { - if(global_enum->typeEntry()->codeGeneration()==TypeEntry::GenerateNothing) + if((global_enum->typeEntry()->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateNothing) return; ReportHandler::debugSparse("Generating enum: " + global_enum->fullName()); s << INDENT << "package " << global_enum->package() << ";" << Qt::endl << Qt::endl; diff --git a/src/cpp/QtJambiGenerator/javagenerator.h b/src/cpp/QtJambiGenerator/javagenerator.h index 197b6901..09c7234b 100644 --- a/src/cpp/QtJambiGenerator/javagenerator.h +++ b/src/cpp/QtJambiGenerator/javagenerator.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/library.pro b/src/cpp/QtJambiGenerator/library.pro index 792d9f85..dc971c54 100644 --- a/src/cpp/QtJambiGenerator/library.pro +++ b/src/cpp/QtJambiGenerator/library.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + TEMPLATE = lib TARGET = QtJambiGenerator @@ -48,6 +79,7 @@ mac:CONFIG -= app_bundle INCLUDEPATH += $$PWD/. $$PWD/typesystem RESOURCES += generator.qrc +QMAKE_RESOURCE_FLAGS += -no-compress include(parser/rxx.pri) @@ -180,14 +212,21 @@ macx:{ greaterThan(QT_MAJOR_VERSION, 6) | greaterThan(QT_MINOR_VERSION, 1):{ QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64 } + }else{ + CONFIG += c++17 } } -linux-g++* | freebsd-g++* | win32-g++* { +linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc* | win32-g++* { QMAKE_CXXFLAGS_WARN_OFF += -Wdollar-in-identifier-extension -Woverloaded-virtual QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF + lessThan(QT_MAJOR_VERSION, 6):{ + QMAKE_CXXFLAGS += -fno-sized-deallocation + }else{ + CONFIG += c++17 + } } contains(QMAKE_CXX, "g++") | contains(QMAKE_CXX, "clang++") : { @@ -196,10 +235,6 @@ contains(QMAKE_CXX, "g++") | contains(QMAKE_CXX, "clang++") : { QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -g -fdebug-prefix-map=$$SOURCES_BASE=../sources/QtJambiGenerator } -linux-g++* : lessThan(QT_MAJOR_VERSION, 6):{ - QMAKE_CXXFLAGS += -fno-sized-deallocation -} - JAVA_HOME_TARGET = $$(JAVA_HOME_TARGET) isEmpty(JAVA_HOME_TARGET):{ JAVA_HOME_TARGET = $$(JAVA_HOME) @@ -228,13 +263,19 @@ macx | ios:{ win32 { INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/win32) } - solaris-g++ | solaris-cc { - INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/solaris) - } - linux-g++* { + linux-* { INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/linux) } - freebsd-g++* { + freebsd-* { INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/freebsd) } + netbsd-* { + INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/netbsd) + } + openbsd-* { + INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/openbsd) + } + solaris-* { + INCLUDEPATH += $$quote($$JAVA_HOME_TARGET/include/solaris) + } } diff --git a/src/cpp/QtJambiGenerator/metabuilder.cpp b/src/cpp/QtJambiGenerator/metabuilder.cpp index d32cd43e..e7a4a94c 100644 --- a/src/cpp/QtJambiGenerator/metabuilder.cpp +++ b/src/cpp/QtJambiGenerator/metabuilder.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -43,6 +43,10 @@ #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) +#define qAsConst std::as_const +#endif + static const char* GLOBAL_PACKAGE = "package_global"; inline QString strip_template_args(const QString &name) { @@ -136,7 +140,7 @@ void MetaBuilder::checkFunctionModifications() { SingleTypeEntryHash entryHash = m_database->entries(); const QList entries = entryHash.values(); for(TypeEntry *entry : entries) { - if (!entry || entry->codeGeneration() == TypeEntry::GenerateNothing) + if (!entry || (entry->codeGeneration() & ~TypeEntry::InheritedByTypeSystem) == TypeEntry::GenerateNothing) continue; if (entry->isTypeSystem()){ /* @@ -180,7 +184,7 @@ void MetaBuilder::checkFunctionModifications() { } } - if (!found && clazz->typeEntry()->codeGeneration()!=TypeEntry::GenerateNothing && modification.template_instantiations.isEmpty()) { + if (!found && (clazz->typeEntry()->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)!=TypeEntry::GenerateNothing && modification.template_instantiations.isEmpty()) { QString warning = QString("signature '%1' for function modification in '%2' not found. Possible candidates: %3") .arg(signature, clazz->qualifiedCppName(), possibleSignatures.join(",\n ")); @@ -217,7 +221,7 @@ void MetaBuilder::checkFunctionModifications() { if (function->originalName() == name) possibleSignatures.append(function->minimalSignature() + " in " + function->implementingClass()->name()); } - if(!found && clazz->typeEntry()->codeGeneration()!=TypeEntry::GenerateAll){ + if(!found && (clazz->typeEntry()->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)!=TypeEntry::GenerateAll){ for(MetaFunction *function : clazz->invalidFunctions()) { if (function->originalSignature() == signature) { found = true; @@ -236,7 +240,7 @@ void MetaBuilder::checkFunctionModifications() { if (function->originalName() == name) possibleSignatures.append(function->minimalSignature() + " in " + function->implementingClass()->name()); } - if(!found && clazz->typeEntry()->codeGeneration()!=TypeEntry::GenerateAll){ + if(!found && (clazz->typeEntry()->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)!=TypeEntry::GenerateAll){ for(MetaFunction *function : clazz->invalidFunctions()) { if (function->originalSignature() == signature) { found = true; @@ -246,7 +250,7 @@ void MetaBuilder::checkFunctionModifications() { } } - if (!found && clazz->typeEntry()->codeGeneration()!=TypeEntry::GenerateNothing && modification.template_instantiations.isEmpty()) { + if (!found && (clazz->typeEntry()->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)!=TypeEntry::GenerateNothing && modification.template_instantiations.isEmpty()) { QString warning = QString("signature '%1' for function modification in '%2' not found. Possible candidates: %3") .arg(signature, clazz->qualifiedCppName(), possibleSignatures.join(",\n ")); @@ -723,7 +727,7 @@ bool MetaBuilder::build(FileModelItem&& dom) { } } - if(entry->codeGeneration()==TypeEntry::GenerateAll){ + if((entry->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll){ if (!cls) { ReportHandler::warning(QString("namespace '%1' for enum '%2' is not declared") .arg(name, entry->targetLangName())); @@ -766,7 +770,7 @@ bool MetaBuilder::build(FileModelItem&& dom) { } } - if(entry->codeGeneration()==TypeEntry::GenerateAll){ + if((entry->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll){ if (!cls) { ReportHandler::warning(QStringLiteral("namespace '%1' for functional '%2' is not declared") .arg(name, entry->targetLangName())); @@ -790,7 +794,6 @@ bool MetaBuilder::build(FileModelItem&& dom) { figureOutEnumValues(); figureOutDefaultEnumArguments(); - checkFunctionModifications(); for(MetaClass *cls : qAsConst(m_templates)) { setupEquals(cls); @@ -801,7 +804,72 @@ bool MetaBuilder::build(FileModelItem&& dom) { setupEquals(cls); setupComparable(cls); setupBeginEnd(cls); + + if(cls->hasCloneOperator() && !cls->typeEntry()->isContainer() && !cls->isInterface()){ + bool hasCopyConstructor = cls->typeEntry()->hasPrivateCopyConstructor() || cls->typeEntry()->hasProtectedCopyConstructor(); + if(!hasCopyConstructor){ + MetaFunctionList functions = cls->queryFunctions(MetaClass::Constructors); + for(MetaFunction *f : functions) { + if (!f->isInvalid() + && !f->isEmptyFunction() + && !f->isFake() + && f->implementingClass()==cls + && f->actualMinimumArgumentCount()==1 + && f->arguments()[0]->type()->typeEntry()==cls->typeEntry() + && ( + (f->arguments()[0]->type()->isConstant() && f->arguments()[0]->type()->getReferenceType()==MetaType::Reference) + || f->arguments()[0]->type()->getReferenceType()==MetaType::NoReference)) { + hasCopyConstructor = true; + break; + } + } + } + if(!hasCopyConstructor){ + MetaFunction * copyConstructor = new MetaFunction(); + copyConstructor->setType(nullptr); + QString name = cls->qualifiedCppName().split("::").last(); + auto idx = name.indexOf('<'); + if(idx>=0){ + name = name.mid(0, idx); + } + copyConstructor->setOriginalName(name); + copyConstructor->setName(cls->simpleName()); + copyConstructor->setFunctionType(MetaFunction::ConstructorFunction); + *copyConstructor += MetaAttributes::Public; + *copyConstructor += MetaAttributes::Native; + *copyConstructor += MetaAttributes::Final; + MetaArgument* arg = new MetaArgument(); + arg->setArgumentIndex(0); + arg->setName("other"); + MetaType* type = new MetaType(); + type->setTypeEntry(cls->typeEntry()); + type->setConstant(true); + if(!cls->templateArguments().isEmpty()){ + QList instantiations; + for(TypeEntry* entry : cls->templateArguments()){ + if(entry){ + MetaType* ttype = new MetaType(); + ttype->setTypeEntry(entry); + decideUsagePattern(ttype); + instantiations << ttype; + } + } + type->setInstantiations(instantiations); + } + type->setReferenceType(MetaType::Reference); + decideUsagePattern(type); + arg->setType(type); + copyConstructor->addArgument(arg); + copyConstructor->setDeclaringClass(cls); + copyConstructor->setImplementingClass(cls); + copyConstructor->setOriginalSignature(copyConstructor->minimalSignature()); + copyConstructor->setOriginalAttributes(copyConstructor->attributes()); + cls->addFunction(copyConstructor); + //ReportHandler::warning(QStringLiteral("Added implicit copy constructor for type %1").arg(cls->qualifiedCppName())); + } + } } + checkFunctionModifications(); dumpLog(); sortLists(); for(const QList& entries : m_database->allEntries().values()){ @@ -1830,7 +1898,7 @@ void analyzeFunctional(MetaFunctional* meta_functional, const QListtypeEntry()->codeGeneration()==TypeEntry::GenerateNothing && !meta_functional->javaFunctionalInterface().isEmpty()){ + if((meta_functional->typeEntry()->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateNothing && !meta_functional->javaFunctionalInterface().isEmpty()){ auto idx = meta_functional->javaFunctionalInterface().lastIndexOf('.'); if(idx>0){ meta_functional->typeEntry()->setGenericClass(!meta_functional->javaFunctionalInterfaceParameterTypes().isEmpty()); @@ -1854,7 +1922,7 @@ MetaFunctional * MetaBuilder::findFunctional(MetaClass *cls, const FunctionalTyp || (is_qxp = usingType.qualifiedName()==QStringList{"qxp", "function_ref"}) || usingType.isFunctionPointer()){ QString normalizedSignature = usingType.isFunctionPointer() ? "" : (is_qxp ? "qxp::function_ref<" : "std::function<"); - QString newUsing = usingType.isFunctionPointer() ? "FunctionPointerPrivate::fn<" : (is_qxp ? "qxp::function_ref<" : "std::function<"); + QString newUsing = usingType.isFunctionPointer() ? "QtJambiAPI::FunctionType<" : (is_qxp ? "qxp::function_ref<" : "std::function<"); std::unique_ptr meta_functional; meta_functional.reset(new MetaFunctional()); meta_functional->setTypeEntry(ftype); @@ -1960,12 +2028,14 @@ TypeInfo MetaBuilder::convertInfo(MetaClass *cls, const TypeParser::Info& ti){ info.setFunctionalReturnType(convertInfo(cls, ti.functionalReturnType.first())); QList functionalArgumentTypes; for(const TypeParser::Info& ins : ti.functionalArgumentTypes){ - functionalArgumentTypes << convertInfo(cls, ins); + if(ins) + functionalArgumentTypes << convertInfo(cls, ins); } info.setFunctionalArgumentTypes(functionalArgumentTypes); } for(const TypeParser::Info& ins : ti.arguments){ - info.addArgument(convertInfo(cls, ins)); + if(ins) + info.addArgument(convertInfo(cls, ins)); } return info; } @@ -3825,7 +3895,7 @@ MetaClass *MetaBuilder::traverseClass(ClassModelItem class_item, QListcodeGeneration() == TypeEntry::GenerateNothing) { + } else if ((type->codeGeneration() & ~TypeEntry::InheritedByTypeSystem) == TypeEntry::GenerateNothing) { reason = GenerationDisabled; } @@ -3979,6 +4049,7 @@ MetaClass *MetaBuilder::traverseClass(ClassModelItem class_item, QListclassType()==CodeModel::Union){ *meta_class += MetaAttributes::Final; + *meta_class += MetaAttributes::IsUnion; } if(meta_class->typeEntry()->isTemplate()){ @@ -4069,6 +4140,15 @@ MetaField *MetaBuilder::traverseField(VariableModelItem field) { //qDebug()<<"\n\n\n"<<"Class in question:"<name()<<"\n\n\n"; MetaType *meta_type = translateType(field_type, &ok, "traverseField " + class_name); + if (!meta_type && m_current_class) { + FieldModification mod = m_current_class->typeEntry()->fieldModification(field_name); + if(!mod.modified_type.isEmpty()){ + meta_type = new MetaType; + meta_type->setTypeEntry(new ObjectTypeEntry("decltype(std::declval<" + m_current_class->qualifiedCppName() + ">()." + field_name + ")")); + ok = true; + } + } + if (!meta_type || !ok) { if(m_current_class) ReportHandler::warning(QString("skipping field '%1::%2' with unmatched type '%3'") @@ -4200,9 +4280,18 @@ void MetaBuilder::traverseFunctions(ScopeModelItem scope_item) { tparams << ti.toString(); } for(TemplateParameterModelItem t : function_item->templateParameters()){ - if(t->isVaradic()) + if(t->isVaradic()){ tparams << t->name()+"..."; - else tparams << t->name(); + }else{ + if(t->name().isEmpty()){ + if(t->defaultValue().isEmpty()) + tparams << t->parameterType(); + else + tparams << t->defaultValue(); + }else{ + tparams << t->name(); + } + } } _function_name += "<" + tparams.join(",") + ">"; } @@ -4233,34 +4322,27 @@ void MetaBuilder::traverseFunctions(ScopeModelItem scope_item) { break; default: break; } + QStringList function_scope = function_item->scope(); + if(m_current_class){ + if(function_scope.join("::")==m_current_class->qualifiedCppName()){ + function_scope.clear(); + } + } + if (function_item->isFriend() && !((function_item->hasBody() || function_item->isDllExported()) && function_scope.isEmpty())){ + if(function_item->functionType() == CodeModel::Signal + || function_item->functionType() == CodeModel::PrivateSignal){ + m_rejected_signals.insert({_function_name, function_item->fileName()}, NoReason); + }else if(!function_item->templateParameters().isEmpty()){ + m_rejected_template_functions.insert({_function_name, function_item->fileName()}, NoReason); + }else{ + m_rejected_functions.insert({_function_name, function_item->fileName()}, NoReason); + } + continue; + } MetaFunction *meta_function = traverseFunction(function_item, _function_name, tparams); if (meta_function) { - if(m_current_class){ - if(function_item->isInline() && !meta_function->isConstructor() && !meta_function->originalSignature().isEmpty()){ - for(MetaFunction *f : m_current_class->queryFunctionsByOriginalName(meta_function->originalName())) { - if(f->originalSignature()==meta_function->originalSignature() - || f->minimalSignature()==meta_function->minimalSignature()){ - delete meta_function; - meta_function = nullptr; - break; - } - } - if(!meta_function) - continue; - }else if((function_item->hasBody() || function_item->isDeclDefault()) && !function_item->isInline()){ - for(MetaFunction *f : m_current_class->queryFunctionsByOriginalName(meta_function->originalName())) { - if(f->originalSignature()==meta_function->originalSignature() - || f->minimalSignature()==meta_function->minimalSignature()){ - delete meta_function; - meta_function = nullptr; - break; - } - } - if(!meta_function) - continue; - } - }else{ + if(!m_current_class){ meta_function->setFunctionType(MetaFunction::GlobalScopeFunction); } bool isRemoved = false; @@ -4271,6 +4353,7 @@ void MetaBuilder::traverseFunctions(ScopeModelItem scope_item) { meta_function->setOriginalAttributes(meta_function->attributes()); if(!m_current_class || meta_function->isInGlobalScope()){ const QList typeSystems = m_database->typeSystems(); + bool isDuplicate = false; for(const TypeSystemTypeEntry* ts : typeSystems){ if(!ts->functionModifications().isEmpty()){ FunctionModificationList list = meta_function->modifications(ts); @@ -4297,17 +4380,54 @@ void MetaBuilder::traverseFunctions(ScopeModelItem scope_item) { *targetClass += MetaAttributes::Final; *targetClass += MetaAttributes::Public; m_meta_classes << targetClass; + }else{ + MetaArgumentList arguments = meta_function->arguments(); + MetaFunctionList otherFunctions = targetClass->queryFunctionsByName(meta_function->name()); + if(targetClass->isInterface()){ + if(MetaClass *ifaceImpl = targetClass->extractInterfaceImpl()) + otherFunctions << ifaceImpl->queryFunctionsByName(meta_function->name()); + } + for(MetaFunction *other : qAsConst(otherFunctions)){ + if(!other->isRemovedFrom(targetClass, TS::TargetLangCode) + && other->arguments().size()==arguments.size()){ + bool skip = true; + for(auto l = other->arguments().size(), i = decltype(l)(0); iarguments()[i]->type()->typeEntry()!=arguments[i]->type()->typeEntry() + || other->arguments()[i]->type()->indirections().size()!=arguments[i]->type()->indirections().size()){ + skip = false; + break; + } + } + if(skip){ + isDuplicate = true; + break; + } + } + } + if(isDuplicate) + break; } functionModificationList << list; break; } + if(isDuplicate) + break; } + if(isDuplicate) + break; if(targetClass) break; } } + if(isDuplicate){ + delete meta_function; + meta_function = nullptr; + continue; + } *meta_function += MetaAttributes::Static; *meta_function += MetaAttributes::Public; + *meta_function -= MetaAttributes::Private; + *meta_function -= MetaAttributes::Protected; }else if(m_current_class->isNamespace()){ FunctionModificationList list = meta_function->modifications(m_current_class); for(const FunctionModification& mod : qAsConst(list)){ @@ -4342,6 +4462,8 @@ void MetaBuilder::traverseFunctions(ScopeModelItem scope_item) { break; *meta_function += MetaAttributes::Static; *meta_function += MetaAttributes::Public; + *meta_function -= MetaAttributes::Private; + *meta_function -= MetaAttributes::Protected; }else{ for(const FunctionModification& mod : meta_function->modifications(m_current_class)){ if (mod.isPrivateSignal()) { @@ -4623,7 +4745,7 @@ void MetaBuilder::traverseFunctions(ScopeModelItem scope_item) { case OperatorType::Times: case OperatorType::Div: case OperatorType::Rem: - if(arguments.size()>=1 && arguments[0]->type()->getReferenceType()!=MetaType::RReference){ + if(arguments.size()>=1 && (arguments[0]->type()->getReferenceType()!=MetaType::RReference || arguments.size()>1)){ if (MetaClass *cls = argumentToClass(arguments[0]->type())) { if(m_current_class && !targetClassGlobalSet @@ -4697,6 +4819,8 @@ void MetaBuilder::traverseFunctions(ScopeModelItem scope_item) { cls->typeEntry()->setHasEquals(); } } + }else if(arguments[0]->type()->getReferenceType()!=MetaType::RReference && !targetClassGlobalSet){ + targetClass = nullptr; } }else if(!targetClassGlobalSet){ targetClass = nullptr; @@ -4746,6 +4870,29 @@ void MetaBuilder::traverseFunctions(ScopeModelItem scope_item) { mod.modifiers |= Modification::NonFinal; cls->typeEntry()->addFunctionModification(mod); targetClass = cls; + const MetaFunctionList otherFunctions = targetClass->queryFunctionsByName(meta_function->name()); + for(MetaFunction *other : otherFunctions){ + if(!other->isRemovedFrom(cls, TS::TargetLangCode) + && other->arguments().size()==arguments.size()){ + bool skip = true; + for(auto l = other->arguments().size(), i = decltype(l)(0); iarguments()[i]->type()->typeEntry()!=arguments[i]->type()->typeEntry() + || other->arguments()[i]->type()->indirections().size()!=arguments[i]->type()->indirections().size()){ + skip = false; + break; + } + } + if(skip){ + targetClass = nullptr; + break; + } + } + } + if(!targetClass){ + delete meta_function; + meta_function = nullptr; + continue; + } } break; }else{ @@ -4833,11 +4980,10 @@ void MetaBuilder::traverseFunctions(ScopeModelItem scope_item) { if(MetaClass *ifaceImpl = cls->extractInterfaceImpl()) otherFunctions << ifaceImpl->queryFunctionsByName(meta_function->name()); } - bool skip = false; for(MetaFunction *other : qAsConst(otherFunctions)){ if(!other->isRemovedFrom(cls, TS::TargetLangCode) && other->arguments().size()==arguments.size()){ - skip = true; + bool skip = true; for(auto l = other->arguments().size(), i = decltype(l)(0); iarguments()[i]->type()->typeEntry()!=arguments[i]->type()->typeEntry() || other->arguments()[i]->type()->indirections().size()!=arguments[i]->type()->indirections().size()){ @@ -4851,6 +4997,11 @@ void MetaBuilder::traverseFunctions(ScopeModelItem scope_item) { } } } + if(!targetClass){ + delete meta_function; + meta_function = nullptr; + continue; + } }else if(!targetClassGlobalSet){ targetClass = nullptr; } @@ -4935,6 +5086,23 @@ void MetaBuilder::traverseFunctions(ScopeModelItem scope_item) { targetClass = targetClass->extractInterface(); } + if(!meta_function->originalSignature().isEmpty() + && ((function_item->isInline() && !meta_function->isConstructor()) + || (!function_item->isInline() && (function_item->hasBody() || function_item->isDeclDefault())) + || (function_item->isFriend()))){ + for(MetaFunction *f : targetClass->queryFunctionsByOriginalName(meta_function->originalName())) { + if(f->originalSignature()==meta_function->originalSignature() + || f->minimalSignature()==meta_function->minimalSignature()){ + rValueFunctions.removeAll(meta_function); + delete meta_function; + meta_function = nullptr; + break; + } + } + if(!meta_function) + continue; + } + if((targetClass->typeEntry()->codeGeneration() & TypeEntry::GenerateCode) && !function_item->isDeleted() && function_item->accessPolicy() != CodeModel::Private @@ -5268,7 +5436,7 @@ bool MetaBuilder::setupFunctionTemplateInstantiations(MetaClass *meta_class){ for(MetaFunction *func : meta_class->functions()) { MetaTemplateParameterList templateParameters; for(MetaTemplateParameter* tparam : func->templateParameters()){ - if(tparam->type()->typeEntry()->isTemplateArgument()){ + if(tparam->type() && tparam->type()->typeEntry()->isTemplateArgument()){ templateParameters << tparam; } } @@ -5290,7 +5458,7 @@ bool MetaBuilder::setupFunctionTemplateInstantiations(MetaClass *meta_class){ QMap templateTypes; for(int k=0; ktemplateParameters().size(); k++){ MetaTemplateParameter* tparam = func2->templateParameters()[k]; - if(tparam->type()->typeUsagePattern()==MetaType::TemplateArgumentPattern){ + if(tparam->type() && tparam->type()->typeUsagePattern()==MetaType::TemplateArgumentPattern){ if(template_instantiation.arguments[k].name.isEmpty()){ TypeInfo info = analyzeTypeInfo(meta_class, template_instantiation.arguments[k].type); MetaClass * tmp_current_class = m_current_class; @@ -5308,7 +5476,7 @@ bool MetaBuilder::setupFunctionTemplateInstantiations(MetaClass *meta_class){ tparam->setDefaultType({}); untreatedTemplateParameters.removeOne(tparam); } - }else if(template_instantiation.arguments[k].name==tparam->name()){ + }else if(!tparam->name().isEmpty() && template_instantiation.arguments[k].name==tparam->name()){ untreatedTemplateParameters.removeOne(tparam); }else if(!tparam->defaultType().isEmpty()){ untreatedTemplateParameters.removeOne(tparam); @@ -5317,6 +5485,15 @@ bool MetaBuilder::setupFunctionTemplateInstantiations(MetaClass *meta_class){ untreatedTemplateParameters.removeOne(tparam); } } + for(int k=template_instantiation.arguments.size(); ktemplateParameters().size(); k++){ + MetaTemplateParameter* tparam = func2->templateParameters()[k]; + if(tparam->type() && tparam->type()->typeUsagePattern()==MetaType::TemplateArgumentPattern){ + if(!tparam->defaultType().isEmpty()) + untreatedTemplateParameters.removeOne(tparam); + }else{ + untreatedTemplateParameters.removeOne(tparam); + } + } // exchange template types if(func2->type()){ @@ -5342,15 +5519,24 @@ bool MetaBuilder::setupFunctionTemplateInstantiations(MetaClass *meta_class){ } for(MetaArgument* arg : func2->arguments()){ + MetaType* ttype = arg->type(); MetaType* rtype = exchangeTemplateTypes(arg->type(), false, templateTypes); - if(rtype!=arg->type()) + if(rtype!=ttype){ arg->setType(rtype); + if(!arg->defaultValueExpression().isEmpty()){ + QString exp = arg->defaultValueExpression(); + arg->setOriginalDefaultValueExpression(exp); + exp = exp.replace(ttype->typeEntry()->qualifiedCppName(), rtype->typeEntry()->qualifiedCppName()); + exp = translateDefaultValue(exp, rtype, func2.get(), meta_class, int(func2->arguments().size())); + arg->setDefaultValueExpression(exp); + } + } } if(!untreatedTemplateParameters.isEmpty()){ QStringList templ; for(MetaTemplateParameter* tparam : untreatedTemplateParameters){ - templ << tparam->name(); + templ << (tparam->name().isEmpty() ? tparam->parameterType() : tparam->name()); } ReportHandler::warning(QString("template method %1::%2 has uninstantiated parameters <%3>").arg(func->implementingClass()->qualifiedCppName(), func->minimalSignature(), templ.join(", "))); }else if(func2->type() && func2->type()->typeUsagePattern()==MetaType::AutoPattern){ @@ -5391,7 +5577,7 @@ bool MetaBuilder::setupFunctionTemplateInstantiations(MetaClass *meta_class){ QMap templateTypes; for(int k=0; ktemplateParameters().size(); k++){ MetaTemplateParameter* tparam = func2->templateParameters()[k]; - if(tparam->type()->typeUsagePattern()==MetaType::TemplateArgumentPattern){ + if(tparam->type() && tparam->type()->typeUsagePattern()==MetaType::TemplateArgumentPattern){ TypeInfo info = analyzeTypeInfo(meta_class, tparam->defaultType()); bool ok = false; MetaClass * tmp_current_class = m_current_class; @@ -5414,9 +5600,17 @@ bool MetaBuilder::setupFunctionTemplateInstantiations(MetaClass *meta_class){ func2->setType(rtype); } for(MetaArgument* arg : func2->arguments()){ - MetaType* rtype = exchangeTemplateTypes(arg->type(), false, templateTypes); - if(rtype!=arg->type()) + MetaType* ttype = arg->type(); + MetaType* rtype = exchangeTemplateTypes(ttype, false, templateTypes); + if(rtype!=ttype){ arg->setType(rtype); + if(!arg->originalDefaultValueExpression().isEmpty()){ + QString exp = arg->originalDefaultValueExpression(); + exp = exp.replace(ttype->typeEntry()->qualifiedCppName(), rtype->typeEntry()->qualifiedCppName()); + exp = translateDefaultValue(exp, rtype, func2.get(), meta_class, int(func2->arguments().size())); + arg->setDefaultValueExpression(exp); + } + } } functions << func2.release(); }else if(func->hasTemplateArgumentTypes()){ @@ -5480,7 +5674,7 @@ void MetaBuilder::fixFunctions(MetaClass * cls) { *cpy += MetaAttributes::InterfaceFunction; // Copy the modifications in interface into the implementing classes. - FunctionModificationList mods = function->modifications(interface); + const FunctionModificationList mods = function->modifications(interface); for(const FunctionModification &mod : mods) { cls->typeEntry()->addFunctionModification(mod); } @@ -5506,13 +5700,23 @@ void MetaBuilder::fixFunctions(MetaClass * cls) { MetaClass *interfaceImplClass{nullptr}; MetaClass *super_class = cls->baseClass(); - MetaFunctionList funcs = cls->functions(); MetaFunctionList deletedFuncs = cls->deletedFunctions(); + MetaFunctionList funcs = cls->functions(); // printf("fix functions for %s\n", qPrintable(name())); - if (super_class) + if (super_class){ fixFunctions(super_class); + if(super_class->typeEntry()->codeGeneration() == TypeEntry::GenerateForSubclass){ + for(MetaField* field : super_class->fields()){ + if(!cls->findField(field->name())){ + field = field->copy(); + field->setEnclosingClass(cls); + cls->addField(field); + } + } + } + } int iface_idx = 0; while (super_class || iface_idx < cls->interfaces().size()) { @@ -6061,7 +6265,6 @@ void MetaBuilder::setupInheritance(MetaClass *meta_class, QListname(), meta_class->typeEntry()->designatedInterface()->name())); } - } for (int i = 0; i < publicBaseClasses.size(); ++i) { @@ -6208,7 +6411,7 @@ MetaFunction *MetaBuilder::traverseFunction(FunctionModelItem function_item, con if(function_name==QLatin1String("static_assert")) return nullptr; if(m_current_class){ - if(function_item->accessPolicy() != CodeModel::Private && m_current_class->typeEntry()->codeGeneration()==TypeEntry::GenerateAll){ + if(function_item->accessPolicy() != CodeModel::Private && (m_current_class->typeEntry()->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll){ if(function_item->functionType() == CodeModel::Signal || function_item->functionType() == CodeModel::PrivateSignal){ m_rejected_signals.insert({class_name + "::" + _function_name, function_item->fileName()}, GenerationDisabled); @@ -6233,9 +6436,6 @@ MetaFunction *MetaBuilder::traverseFunction(FunctionModelItem function_item, con || function_item->functionType() == CodeModel::PrivateSignal || function_item->functionType() == CodeModel::Slot); - if (function_item->isFriend() && !function_item->hasBody()/* && !isOperator*/) - return nullptr; - std::unique_ptr meta_function(new MetaFunction()); meta_function->setConstant(function_item->isConstant()); meta_function->setTemplate(function_item->isTemplate()); @@ -6272,26 +6472,39 @@ MetaFunction *MetaBuilder::traverseFunction(FunctionModelItem function_item, con } // Access rights - if (function_item->accessPolicy() == CodeModel::Public) + if (!function_item->isFriend()){ + if (function_item->accessPolicy() == CodeModel::Public) + *meta_function += MetaAttributes::Public; + else if (function_item->accessPolicy() == CodeModel::Private) + *meta_function += MetaAttributes::Private; + else + *meta_function += MetaAttributes::Protected; + }else{ *meta_function += MetaAttributes::Public; - else if (function_item->accessPolicy() == CodeModel::Private) - *meta_function += MetaAttributes::Private; - else - *meta_function += MetaAttributes::Protected; + } QMap metaTemplateParameters; int templateParameterCounter=0; for(const TemplateParameterModelItem& p : function_item->templateParameters()){ if(!p->ownerClass()){ - TemplateArgumentEntry* tae = new TemplateArgumentEntry(p->name()); - tae->setVariadic(p->isVaradic()); - tae->setOrdinal(templateParameterCounter); - MetaType *type = new MetaType(); - type->setTypeUsagePattern(MetaType::TemplateArgumentPattern); - type->setTypeEntry(tae); + MetaType *type{nullptr}; + if(p->parameterType().isEmpty()){ + TemplateArgumentEntry* tae = new TemplateArgumentEntry(p->name()); + tae->setVariadic(p->isVaradic()); + tae->setOrdinal(templateParameterCounter); + type = new MetaType(); + type->setTypeUsagePattern(MetaType::TemplateArgumentPattern); + type->setTypeEntry(tae); + }else{ + bool ok = false; + type = translateType(p->parameterTypeInfo(), &ok, QString("traverseFunction %1.%2").arg(class_name, function_name)); + if(!ok) + type = nullptr; + } templateParameterCounter++; MetaTemplateParameter* tp = new MetaTemplateParameter(); tp->setName(p->name()); tp->setType(type); + tp->setParameterType(p->parameterType()); tp->setDefaultType(p->defaultValue()); metaTemplateParameters[p->name()] = tp; meta_function->addTemplateParameter(tp); @@ -6375,6 +6588,34 @@ MetaFunction *MetaBuilder::traverseFunction(FunctionModelItem function_item, con break; } } + if(!ok && templateParameterCounter>0 && !mod.template_instantiations.isEmpty()){ + for(const TemplateInstantiation& templateInstantiation : mod.template_instantiations){ + for(const ArgumentModification& amod : templateInstantiation.argument_mods){ + if(amod.index==0 && !amod.modified_type.isEmpty()){ + TypeInfo _type = function_type; + _type.setVolatile(false); + _type.setConstant(false); + _type.setReferenceType(TypeInfo::NoReference); + UnknownTypeEntry* tae = new UnknownTypeEntry(_type.toString()); + type = new MetaType(); + if(function_type.isConstant()) + type->setConstant(true); + if(function_type.isVolatile()) + type->setVolatile(true); + type->setReferenceType(MetaType::ReferenceType(function_type.getReferenceType())); + type->setOriginalTypeDescription(function_type.toString()); + type->setTypeUsagePattern(MetaType::InvalidPattern); + type->setTypeEntry(tae); + ok = true; + break; + } + if(ok) + break; + } + if(ok) + break; + } + } if(ok) break; } @@ -6382,20 +6623,20 @@ MetaFunction *MetaBuilder::traverseFunction(FunctionModelItem function_item, con if (!ok) { if(function_item->accessPolicy() != CodeModel::Private - && m_current_class && m_current_class->typeEntry()->codeGeneration()==TypeEntry::GenerateAll + && m_current_class && (m_current_class->typeEntry()->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll && !m_database->isClassRejected(function_item->type().qualifiedName().join("::"))){ if(function_item->functionType() == CodeModel::Signal || function_item->functionType() == CodeModel::PrivateSignal){ ReportHandler::warning(QString("skipping signal '%1::%2', unmatched return type '%3'") - .arg(class_name, function_item->name(), function_item->type().toString())); + .arg(class_name, _function_name, function_item->type().toString())); m_rejected_signals[{class_name + "::" + _function_name, function_item->fileName()}] = UnmatchedReturnType; }else if(function_item->isTemplate()){ ReportHandler::warning(QString("skipping function '%1::%2<%3>', unmatched return type '%4'") - .arg(class_name, function_item->name(), tparams.join(", "), function_item->type().toString())); + .arg(class_name, _function_name, tparams.join(", "), function_item->type().toString())); m_rejected_template_functions.insert({class_name + "::" + _function_name, function_item->fileName()}, UnmatchedReturnType); }else{ ReportHandler::warning(QString("skipping function '%1::%2', unmatched return type '%3'") - .arg(class_name, function_item->name(), function_item->type().toString())); + .arg(class_name, _function_name, function_item->type().toString())); m_rejected_functions[{class_name + "::" + _function_name, function_item->fileName()}] = UnmatchedReturnType; } } @@ -6492,7 +6733,8 @@ MetaFunction *MetaBuilder::traverseFunction(FunctionModelItem function_item, con } for(const FunctionModification& mod : qAsConst(list)){ for(const ArgumentModification& amod : mod.argument_mods){ - if(amod.index==i+1 && (!amod.modified_type.isEmpty() || amod.removed)){ + if((amod.index==i+1 && (!amod.modified_type.isEmpty() || amod.removed)) + || (amod.useAsSlotType.testFlag(AsSlotType::Yes) && amod.utilArgParameter==i+1)){ TypeInfo _type = arg->type(); _type.setVolatile(false); _type.setConstant(false); @@ -6511,6 +6753,35 @@ MetaFunction *MetaBuilder::traverseFunction(FunctionModelItem function_item, con break; } } + if(!ok && templateParameterCounter>0 && !mod.template_instantiations.isEmpty()){ + for(const TemplateInstantiation& templateInstantiation : mod.template_instantiations){ + for(const ArgumentModification& amod : templateInstantiation.argument_mods){ + if((amod.index==i+1 && (!amod.modified_type.isEmpty() || amod.removed)) + || (amod.useAsSlotType.testFlag(AsSlotType::Yes) && amod.utilArgParameter==i+1)){ + TypeInfo _type = arg->type(); + _type.setVolatile(false); + _type.setConstant(false); + _type.setReferenceType(TypeInfo::NoReference); + UnknownTypeEntry* tae = new UnknownTypeEntry(_type.toString()); + argumentType = new MetaType(); + if(arg->type().isConstant()) + argumentType->setConstant(true); + if(arg->type().isVolatile()) + argumentType->setVolatile(true); + argumentType->setReferenceType(MetaType::ReferenceType(arg->type().getReferenceType())); + argumentType->setOriginalTypeDescription(arg->type().toString()); + argumentType->setTypeUsagePattern(MetaType::InvalidPattern); + argumentType->setTypeEntry(tae); + ok = true; + break; + } + if(ok) + break; + } + if(ok) + break; + } + } if(ok) break; } @@ -6519,25 +6790,25 @@ MetaFunction *MetaBuilder::traverseFunction(FunctionModelItem function_item, con if(arg->type().isVolatile()) argumentType = translateType(arg->type(), &ok, QString("traverseFunction %1.%2 arg#%3").arg(class_name, function_name).arg(i)); if(function_item->accessPolicy() != CodeModel::Private - && m_current_class - && m_current_class->typeEntry()->codeGeneration()==TypeEntry::GenerateAll - && !m_database->isClassRejected(arg->type().qualifiedName().join("::")) - && arg->type().qualifiedName().join("::")!=m_current_class->typeEntry()->qualifiedCppName()+"Private"){ + && m_current_class + && (m_current_class->typeEntry()->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll + && !m_database->isClassRejected(arg->type().qualifiedName().join("::")) + && arg->type().qualifiedName().join("::")!=m_current_class->typeEntry()->qualifiedCppName()+"Private"){ if(function_item->functionType() == CodeModel::Signal || function_item->functionType() == CodeModel::PrivateSignal){ ReportHandler::warning(QString("skipping signal '%1::%2', " "unmatched parameter type '%3'") - .arg(class_name, function_item->name(), arg->type().toString())); + .arg(class_name, _function_name, arg->type().toString())); m_rejected_signals[{class_name + "::" + _function_name, function_item->fileName()}] = UnmatchedArgumentType; }else if(function_item->isTemplate()){ ReportHandler::warning(QString("skipping function '%1::%2<%3>', " "unmatched parameter type '%4'") - .arg(class_name, function_item->name(), tparams.join(", "), arg->type().toString())); + .arg(class_name, _function_name, tparams.join(", "), arg->type().toString())); m_rejected_template_functions.insert({class_name + "::" + _function_name, function_item->fileName()}, UnmatchedArgumentType); }else{ ReportHandler::warning(QString("skipping function '%1::%2', " "unmatched parameter type '%3'") - .arg(class_name, function_item->name(), arg->type().toString())); + .arg(class_name, _function_name, arg->type().toString())); m_rejected_functions[{class_name + "::" + _function_name, function_item->fileName()}] = UnmatchedArgumentType; } } @@ -6585,7 +6856,7 @@ MetaFunction *MetaBuilder::traverseFunction(FunctionModelItem function_item, con meta_function->setOriginalSignature(QString::fromLatin1(QMetaObject::normalizedSignature(qPrintable(originalSignature)))); else meta_function->setOriginalSignature(originalSignature); - if (function_item->isFriend() && function_item->hasBody()){ + if (function_item->isFriend()){ meta_function->setFunctionType(MetaFunction::GlobalScopeFunction); meta_function->setOriginalAttributes(meta_function->attributes()); } @@ -6929,20 +7200,22 @@ MetaFunction *MetaBuilder::traverseFunction(FunctionModelItem function_item, con } if (arg->defaultValue()) { - QString expr = arg->defaultValueExpression(); - if (!expr.isEmpty()) - meta_arg->setOriginalDefaultValueExpression(expr); - expr = translateDefaultValue(arg->defaultValueExpression(), meta_arg->type(), meta_function.get(), m_current_class, i); - if (expr.isEmpty()) { - first_default_argument = i; - } else { - meta_arg->setDefaultValueExpression(expr); - } - /*}else{ - QString inserted_default_expression = meta_function->replacedDefaultExpression(m_current_class, meta_arg->argumentIndex() + 1); - if(!inserted_default_expression.isEmpty()){ - meta_arg->setDefaultValueExpression(inserted_default_expression); - }*/ + //if(!meta_arg->type()->isTemplateArgument()){ + QString expr = arg->defaultValueExpression(); + if (!expr.isEmpty()) + meta_arg->setOriginalDefaultValueExpression(expr); + expr = translateDefaultValue(arg->defaultValueExpression(), meta_arg->type(), meta_function.get(), m_current_class, i); + if (expr.isEmpty()) { + first_default_argument = i; + } else { + meta_arg->setDefaultValueExpression(expr); + } + /*}else{ + QString inserted_default_expression = meta_function->replacedDefaultExpression(m_current_class, meta_arg->argumentIndex() + 1); + if(!inserted_default_expression.isEmpty()){ + meta_arg->setDefaultValueExpression(inserted_default_expression); + }*/ + //} } } @@ -7113,7 +7386,7 @@ MetaType *MetaBuilder::translateType(TypeInfo typei, MetaType *arrayType = new MetaType(); arrayType->setArrayElementCount(elems); arrayType->setArrayElementType(elementType); - arrayType->setTypeEntry(new ArrayTypeEntry(elementType->typeEntry(), int(elementType->indirections().size()))); + arrayType->setTypeEntry(new ArrayTypeEntry(typei.toString(), elementType->typeEntry(), int(elementType->indirections().size()))); decideUsagePattern(arrayType); elementType = arrayType; @@ -7172,8 +7445,8 @@ MetaType *MetaBuilder::translateType(TypeInfo typei, } if(type && (type->isObject() || type->isValue()) && (!m_current_class || m_current_class->typeEntry()!=type) - && (type->codeGeneration()==TypeEntry::GenerateNothing - || type->codeGeneration()==TypeEntry::GenerateForSubclass) + && ((type->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateNothing + || (type->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateForSubclass) && typei.arguments().size()==1 && typei.arguments()[0].qualifiedName().join("::")=="void" && qualified_name.startsWith("Q") && !qualified_name.startsWith("Qt")){ if(const TypeEntry *_type = m_database->findType(qualified_name = QLatin1String("QVoid")+qualified_name.mid(1))){ @@ -7207,7 +7480,7 @@ MetaType *MetaBuilder::translateType(TypeInfo typei, // of the parameters. if (!type && m_current_function) { for(MetaTemplateParameter* t : m_current_function->templateParameters()){ - if (t->type()->typeEntry()->name() == qualified_name){ + if (t->type() && t->type()->typeEntry()->name() == qualified_name){ type = t->type()->typeEntry(); } } @@ -7569,7 +7842,7 @@ MetaType *MetaBuilder::translateType(TypeInfo typei, if(iteratorClass->typeAliasType()){ Q_ASSERT(iteratorClass->typeAliasType()->typeEntry()); if(iteratorClass->typeAliasType()->typeEntry()->isAlias()){ - m_missing_iterators << MissingIterator(iteratorType, meta_type, m_current_class); + m_missing_aliases << MissingAlias(iteratorType, meta_type, m_current_class); found = true; }else{ MetaType* typeAliasType = iteratorClass->typeAliasType()->copy(); @@ -7592,67 +7865,101 @@ MetaType *MetaBuilder::translateType(TypeInfo typei, } } if(!found){ - m_missing_iterators << MissingIterator(iteratorType, meta_type, m_current_class); + m_missing_aliases << MissingAlias(iteratorType, meta_type, m_current_class); } + }else if (meta_type->typeEntry()->isAlias()){ + m_missing_aliases << MissingAlias(meta_type->typeEntry(), meta_type, m_current_class); } return meta_type; } void MetaBuilder::fixMissingIterator(){ - QList missing_iterators; - for(const MissingIterator& missingIterator : m_missing_iterators){ + QList missing_aliases; + for(const MissingAlias& missingAlias : m_missing_aliases){ bool found = false; - if(MetaClass * iteratorClass = classes().findClass(missingIterator.iteratorType->qualifiedCppName(), MetaClassList::QualifiedCppName)){ - if(iteratorClass->typeAliasType()){ - MetaType* typeAliasType = nullptr; - if(iteratorClass->typeAliasType()->typeEntry()->isAlias()){ - if(MetaClass *cls = m_meta_classes.findClass(iteratorClass->typeEntry()->qualifiedCppName())){ - if(cls->typeAliasType()){ - typeAliasType = cls->typeAliasType()->copy(); - if(typeAliasType->indirections().isEmpty() && typeAliasType->getReferenceType()==MetaType::NoReference){ - typeAliasType->setReferenceType(iteratorClass->typeAliasType()->getReferenceType()); + if(missingAlias.aliasType->isIterator()){ + if(MetaClass * iteratorClass = classes().findClass(missingAlias.aliasType->qualifiedCppName(), MetaClassList::QualifiedCppName)){ + if(iteratorClass->typeAliasType()){ + MetaType* typeAliasType = nullptr; + if(iteratorClass->typeAliasType()->typeEntry()->isAlias()){ + if(MetaClass *cls = m_meta_classes.findClass(iteratorClass->typeEntry()->qualifiedCppName())){ + if(cls->typeAliasType()){ + typeAliasType = cls->typeAliasType()->copy(); + if(typeAliasType->indirections().isEmpty() && typeAliasType->getReferenceType()==MetaType::NoReference){ + typeAliasType->setReferenceType(iteratorClass->typeAliasType()->getReferenceType()); + } + typeAliasType->setIndirections( QList() << typeAliasType->indirections() << typeAliasType->indirections()); + if(iteratorClass->typeAliasType()->isConstant()) + typeAliasType->setConstant(true); } - typeAliasType->setIndirections( QList() << typeAliasType->indirections() << typeAliasType->indirections()); - if(iteratorClass->typeAliasType()->isConstant()) - typeAliasType->setConstant(true); } } - } - if(!typeAliasType){ - typeAliasType = iteratorClass->typeAliasType()->copy(); - QList indirections = typeAliasType->indirections(); - if(!indirections.isEmpty()){ - indirections.takeFirst(); - typeAliasType->setIndirections(indirections); + if(!typeAliasType){ + typeAliasType = iteratorClass->typeAliasType()->copy(); + QList indirections = typeAliasType->indirections(); + if(!indirections.isEmpty()){ + indirections.takeFirst(); + typeAliasType->setIndirections(indirections); + } + typeAliasType->setReferenceType(MetaType::Reference); } - typeAliasType->setReferenceType(MetaType::Reference); + MetaBuilder::decideUsagePattern(typeAliasType); + missingAlias.meta_type->addIteratorInstantiation(typeAliasType); + found = true; } - MetaBuilder::decideUsagePattern(typeAliasType); - missingIterator.meta_type->addIteratorInstantiation(typeAliasType); - found = true; - } - } - if(!found && missingIterator.current_class){ - if(MetaClass * iteratorClass = missingIterator.current_class->findIterator(missingIterator.iteratorType)){ - missingIterator.meta_type->setIteratorInstantiations(iteratorClass->templateBaseClassInstantiations()); - found = true; } - if(missingIterator.current_class->templateBaseClass()){ - if(missingIterator.iteratorType->containerType()==missingIterator.current_class->templateBaseClass()->typeEntry()){ - missingIterator.meta_type->setIteratorInstantiations(missingIterator.current_class->templateBaseClassInstantiations()); - QStringList baseClassNames; - for(const QPair& p : missingIterator.current_class->baseClassTypeInfo()) - baseClassNames << p.first.toString(); - IteratorTypeEntry* newIteratorType = missingIterator.iteratorType->clone(missingIterator.iteratorType->containerType(), baseClassNames.join("::")); - missingIterator.meta_type->setTypeEntry(newIteratorType); + if(!found && missingAlias.current_class && missingAlias.aliasType->isIterator()){ + const IteratorTypeEntry* iteratorType = static_cast(missingAlias.aliasType); + if(MetaClass * iteratorClass = missingAlias.current_class->findIterator(iteratorType)){ + missingAlias.meta_type->setIteratorInstantiations(iteratorClass->templateBaseClassInstantiations()); found = true; } + if(missingAlias.current_class->templateBaseClass()){ + if(iteratorType->containerType()==missingAlias.current_class->templateBaseClass()->typeEntry()){ + missingAlias.meta_type->setIteratorInstantiations(missingAlias.current_class->templateBaseClassInstantiations()); + QStringList baseClassNames; + for(const QPair& p : missingAlias.current_class->baseClassTypeInfo()) + baseClassNames << p.first.toString(); + IteratorTypeEntry* newIteratorType = iteratorType->clone(iteratorType->containerType(), baseClassNames.join("::")); + missingAlias.meta_type->setTypeEntry(newIteratorType); + found = true; + } + } } + }else{ + while(missingAlias.meta_type->typeEntry()->isAlias()){ + if(MetaClass * aliasClass = classes().findClass(missingAlias.meta_type->typeEntry()->qualifiedCppName(), MetaClassList::QualifiedCppName)){ + if(const MetaType* typeAliasType = aliasClass->typeAliasType()){ + if(static_cast(missingAlias.meta_type->typeEntry())->getAsNativePointer()){ + if(!typeAliasType->indirections().isEmpty()) + const_cast(static_cast(missingAlias.meta_type->typeEntry()))->setHasIndirections(true); + break; + }else{ + missingAlias.meta_type->setTypeEntry(typeAliasType->typeEntry()); + missingAlias.meta_type->setConstant(missingAlias.meta_type->isConstant() || typeAliasType->isConstant()); + missingAlias.meta_type->setIndirections(QList{missingAlias.meta_type->indirections()} << typeAliasType->indirections()); + } + MetaBuilder::decideUsagePattern(missingAlias.meta_type); + }else{ + break; + } + }else{ + break; + } + } + if(!missingAlias.meta_type->typeEntry()->isAlias() || static_cast(missingAlias.meta_type->typeEntry())->getAsNativePointer()) + found = true; } if(!found) - missing_iterators << missingIterator; + missing_aliases << missingAlias; + else + MetaBuilder::decideUsagePattern(missingAlias.meta_type); + } + bool repeat = !missing_aliases.isEmpty() && m_missing_aliases.size()>missing_aliases.size(); + m_missing_aliases = missing_aliases; + if(repeat){ + fixMissingIterator(); } - m_missing_iterators = missing_iterators; } void MetaBuilder::decideUsagePattern(MetaType *meta_type) { @@ -7675,6 +7982,10 @@ void MetaBuilder::decideUsagePattern(MetaType *meta_type) { }else{ meta_type->setTypeUsagePattern(MetaType::NativePointerPattern); } + } else if (type->isAlias() && !static_cast(type)->getAsNativePointer()) { + meta_type->setTypeUsagePattern(MetaType::NativePointerPattern); + } else if (type->isNativePointer()) { + meta_type->setTypeUsagePattern(MetaType::NativePointerPattern); } else if (type->isAuto()) { meta_type->setTypeUsagePattern(MetaType::AutoPattern); } else if (type->isVoid()) { @@ -7859,7 +8170,13 @@ QString MetaBuilder::translateDefaultValue(const QString& defaultValueExpression QString expr = defaultValueExpression; if(type->isTemplateArgument()){ - return expr; + if(type->indirections().isEmpty()) + return expr; + else{ + if (expr == "0" || expr == "nullptr" || expr == "NULL" || expr == "null") { + return "null"; + } + } } if (type->isPrimitive() || type->isQChar()) { if (type->name() == "boolean") { @@ -8040,7 +8357,7 @@ QString MetaBuilder::translateDefaultValue(const QString& defaultValueExpression else return expr; } - if (expr == "0" || expr == "nullptr" || expr == "NULL") { + if (expr == "0" || expr == "nullptr" || expr == "NULL" || expr == "null") { return "null"; } if (type->isQString() @@ -8982,9 +9299,9 @@ void MetaBuilder::setupEquals(MetaClass *cls) { if (equals.size() || nequals.size()) { if (!cls->hasHashFunction() - && cls->typeEntry()->hasEquals() - && cls->typeEntry()->codeGeneration()==TypeEntry::GenerateAll - && (cls->typeEntry()->isValue() + && cls->typeEntry()->hasEquals() + && (cls->typeEntry()->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll + && (cls->typeEntry()->isValue() || (cls->typeEntry()->hasPublicDefaultConstructor() && cls->typeEntry()->hasPublicCopyConstructor() && cls->typeEntry()->isDestructorPublic()))) { ReportHandler::warning(QString::fromLatin1("Class '%1' has equals operators but no qHash() function. Hashcode of objects will consistently be 0.") .arg(cls->qualifiedCppName())); @@ -9104,6 +9421,99 @@ void MetaBuilder::setupConstructorAvailability(MetaClass *meta_class){ bool inheritingPublicMoveConstructor = true; bool inheritingPublicDefaultAssignment = true; bool inheritingPublicMoveAssignment = true; + if(meta_class->typeEntry()->isComplex()){ + const ComplexTypeEntry* centry = reinterpret_cast(meta_class->typeEntry()); + if(centry->getNotAssignable()){ + inheritingPublicDefaultAssignment = false; + } + if(centry->getNotMoveAssignable()){ + inheritingPublicMoveAssignment = false; + } + if(centry->getNotCloneable()){ + inheritingPublicCopyConstructor = false; + } + } + if(meta_class->typeEntry()->hasPrivateConstructors() + && !meta_class->typeEntry()->hasPublicDefaultConstructor()){ + inheritingPublicDefaultConstructor = false; + } + if(!meta_class->typeEntry()->hasPublicCopyConstructor() + && !meta_class->typeEntry()->hasProtectedCopyConstructor() + && !meta_class->typeEntry()->hasPrivateCopyConstructor()){ + for(MetaField* field : meta_class->fields()){ + if(!field->type()->hasInstantiations()){ + if(field->type()->typeEntry()->isComplex()){ + const ComplexTypeEntry* centry = reinterpret_cast(field->type()->typeEntry()); + if(!centry->hasPublicCopyConstructor()){ + inheritingPublicCopyConstructor = false; + break; + } + } + } + } + } + if(!meta_class->typeEntry()->hasPublicDefaultAssignment() + && !meta_class->typeEntry()->hasProtectedDefaultAssignment() + && !meta_class->typeEntry()->hasPrivateDefaultAssignment()){ + for(MetaField* field : meta_class->fields()){ + if(!field->type()->hasInstantiations()){ + if(field->type()->typeEntry()->isComplex()){ + const ComplexTypeEntry* centry = reinterpret_cast(field->type()->typeEntry()); + if(!centry->hasPublicDefaultAssignment()){ + inheritingPublicDefaultAssignment = false; + break; + } + }else if(field->type()->typeEntry()->isPointerContainer()){ + const PointerContainerTypeEntry* centry = reinterpret_cast(field->type()->typeEntry()); + switch(centry->type()){ + case PointerContainerTypeEntry::QPointer: + case PointerContainerTypeEntry::QScopedPointer: + case PointerContainerTypeEntry::unique_ptr: + inheritingPublicDefaultAssignment = false; + break; + default:break; + } + if(inheritingPublicDefaultAssignment) + break; + } + } + } + } + if(!meta_class->typeEntry()->hasPublicMoveAssignment() + && !meta_class->typeEntry()->hasProtectedMoveAssignment() + && !meta_class->typeEntry()->hasPrivateMoveAssignment()){ + for(MetaField* field : meta_class->fields()){ + if(!field->type()->hasInstantiations()){ + if(field->type()->typeEntry()->isComplex()){ + const ComplexTypeEntry* centry = reinterpret_cast(field->type()->typeEntry()); + if(!centry->hasPublicMoveAssignment()){ + inheritingPublicMoveAssignment = false; + break; + } + }else if(field->type()->typeEntry()->isPointerContainer()){ + const PointerContainerTypeEntry* centry = reinterpret_cast(field->type()->typeEntry()); + switch(centry->type()){ + case PointerContainerTypeEntry::QPointer: + case PointerContainerTypeEntry::QScopedPointer: + case PointerContainerTypeEntry::unique_ptr: + inheritingPublicMoveAssignment = false; + break; + default:break; + } + if(inheritingPublicMoveAssignment) + break; + } + } + } + } + if(!meta_class->typeEntry()->hasPublicDefaultAssignment() + && !meta_class->typeEntry()->hasProtectedDefaultAssignment() + && !meta_class->typeEntry()->hasPrivateDefaultAssignment() + && (meta_class->typeEntry()->hasPublicMoveAssignment() + || meta_class->typeEntry()->hasProtectedMoveAssignment() + || meta_class->typeEntry()->hasPrivateMoveAssignment())){ + inheritingPublicDefaultAssignment = false; + } if(meta_class->baseClass()){ hasSuperClasses = true; setupConstructorAvailability(meta_class->baseClass()); @@ -9124,11 +9534,82 @@ void MetaBuilder::setupConstructorAvailability(MetaClass *meta_class){ inheritingPublicMoveAssignment &= ifc->typeEntry()->hasPublicMoveAssignment(); } } - if(inheritingPublicDefaultConstructor + if((inheritingPublicDefaultConstructor || !hasSuperClasses) && !meta_class->typeEntry()->hasPublicDefaultConstructor() && !meta_class->typeEntry()->hasPrivateDefaultConstructor() && !meta_class->typeEntry()->hasProtectedDefaultConstructor() && meta_class->typeEntry()->isDestructorPublic()){ + if(!meta_class->baseClass() + && !(meta_class->attributes() & MetaAttributes::IsUnion) + && meta_class->interfaces().isEmpty() + && meta_class->queryFunctions(MetaClass::Constructors).isEmpty() + && meta_class->typeEntry()->hasFields() + && !meta_class->typeEntry()->hasNonPublicFields()){ + FunctionModification mod; + std::unique_ptr fieldsConstructor{new MetaFunction()}; + fieldsConstructor->setType(nullptr); + QString name = meta_class->qualifiedCppName().split("::").last(); + auto idx = name.indexOf('<'); + if(idx>=0){ + name = name.mid(0, idx); + } + fieldsConstructor->setOriginalName(name); + fieldsConstructor->setName(meta_class->simpleName()); + fieldsConstructor->setFunctionType(MetaFunction::ConstructorFunction); + *fieldsConstructor += MetaAttributes::Public; + *fieldsConstructor += MetaAttributes::Native; + *fieldsConstructor += MetaAttributes::Final; + *fieldsConstructor += MetaAttributes::BracketCall; + MetaArgumentList arguments; + for(MetaField* field : meta_class->fields()){ + MetaArgument* arg = new MetaArgument(); + arg->setArgumentIndex(int(arguments.size())); + arg->setName(field->name()); + MetaType* type = field->type()->copy(); + arg->setType(type); + arguments << arg; + FieldModification fmod = meta_class->typeEntry()->fieldModification(field->name()); + ArgumentModification amod(arg->argumentIndex()+1); + bool modified = false; + if(!fmod.modified_type.isEmpty()){ + modified = true; + amod.modified_type = fmod.modified_type; + amod.modified_jni_type = fmod.modified_jni_type; + for(const CodeSnip& snip : fmod.conversion_rules){ + if((snip.language == TS::Language(TS::Setter | TS::NativeCode))){ + CodeSnip _snip = snip; + _snip.language = TS::NativeCode; + amod.conversion_rules << _snip; + } + } + } + if(!fmod.renamedToName.isEmpty()){ + modified = true; + amod.modified_name = fmod.renamedToName; + } + if(fmod.no_null_pointers){ + modified = true; + amod.no_null_pointers = true; + } + if(modified){ + mod.argument_mods << amod; + } + } + if(!arguments.isEmpty()){ + fieldsConstructor->setArguments(arguments); + fieldsConstructor->setDeclaringClass(meta_class); + fieldsConstructor->setImplementingClass(meta_class); + fieldsConstructor->setOriginalSignature(fieldsConstructor->minimalSignature()); + fieldsConstructor->setOriginalAttributes(fieldsConstructor->attributes()); + if(!mod.argument_mods.isEmpty()){ + mod.signature = fieldsConstructor->minimalSignature(); + meta_class->typeEntry()->addFunctionModification(mod); + } + meta_class->addFunction(fieldsConstructor.release()); + meta_class->typeEntry()->setHasPublicCopyConstructor(); + meta_class->typeEntry()->setHasPublicDefaultAssignment(); + } + } meta_class->addDefaultConstructor(); applyOnType(meta_class->typeEntry(), [](ComplexTypeEntry* c){c->setHasPublicDefaultConstructor();}); } diff --git a/src/cpp/QtJambiGenerator/metabuilder.h b/src/cpp/QtJambiGenerator/metabuilder.h index 0e0bddb0..a58a5dc4 100644 --- a/src/cpp/QtJambiGenerator/metabuilder.h +++ b/src/cpp/QtJambiGenerator/metabuilder.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -226,19 +226,19 @@ class MetaBuilder { QSet m_setup_inheritance_done; - struct MissingIterator{ - MissingIterator(const IteratorTypeEntry* _iteratorType, + struct MissingAlias{ + MissingAlias(const TypeEntry* _aliasType, MetaType *_meta_type, MetaClass * _current_class) : - iteratorType(_iteratorType), + aliasType(_aliasType), meta_type(_meta_type), current_class(_current_class) {} - const IteratorTypeEntry* iteratorType; + const TypeEntry* aliasType; MetaType *meta_type; MetaClass * current_class; }; - QList m_missing_iterators; + QList m_missing_aliases; const QMap* m_features; QMap m_typeSystemByPackage; QList m_scopeChangedEnums; diff --git a/src/cpp/QtJambiGenerator/metainfogenerator.cpp b/src/cpp/QtJambiGenerator/metainfogenerator.cpp index 421dcfb9..1fc00c68 100644 --- a/src/cpp/QtJambiGenerator/metainfogenerator.cpp +++ b/src/cpp/QtJambiGenerator/metainfogenerator.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -44,6 +44,10 @@ #include #include "typesystem/typedatabase.h" +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) +#define qAsConst std::as_const +#endif + MetaInfoGenerator::MetaInfoGenerator(PriGenerator *pri): AbstractGenerator(), priGenerator(pri), m_database(pri->database()) @@ -290,14 +294,16 @@ void MetaInfoGenerator::writeCppFile() { if(functional->enclosingClass()){ if(!(!functional->enclosingClass()->isFake() && functional->enclosingClass()->typeEntry() - && (functional->typeEntry()->codeGeneration() & TypeEntry::GenerateCpp) && (functional->enclosingClass()->typeEntry()->codeGeneration() & TypeEntry::GenerateCpp))){ continue; } } - if(!(functional->typeEntry()->getUsing().isEmpty() || functional->typeEntry()->codeGeneration()==TypeEntry::GenerateCpp)) + if(!(functional->typeEntry()->codeGeneration() & TypeEntry::GenerateCpp)) continue; - stream << INDENT << "void initialize_meta_info_" << QString(functional->typeEntry()->name()).replace("::", "_").replace("<", "_").replace(">", "_") << "();" << Qt::endl; + if(!writtenClasses[cls->targetTypeSystem()].contains(functional->typeEntry()->name())){ + writtenClasses[cls->targetTypeSystem()] << functional->typeEntry()->name(); + stream << INDENT << "void initialize_meta_info_" << QString(functional->typeEntry()->name()).replace("::", "_").replace("<", "_").replace(">", "_") << "();" << Qt::endl; + } } } } @@ -340,14 +346,16 @@ void MetaInfoGenerator::writeCppFile() { if(functional->enclosingClass()){ if(!(!functional->enclosingClass()->isFake() && functional->enclosingClass()->typeEntry() - && (functional->typeEntry()->codeGeneration() & TypeEntry::GenerateCpp) && (functional->enclosingClass()->typeEntry()->codeGeneration() & TypeEntry::GenerateCpp))){ continue; } } - if(!(functional->typeEntry()->getUsing().isEmpty() || functional->typeEntry()->codeGeneration()==TypeEntry::GenerateCpp)) + if(!(functional->typeEntry()->codeGeneration() & TypeEntry::GenerateCpp)) continue; - stream << INDENT << "initialize_meta_info_" << QString(functional->typeEntry()->name()).replace("::", "_") << "();" << Qt::endl; + if(!writtenClasses[cls->targetTypeSystem()].contains(functional->typeEntry()->name())){ + writtenClasses[cls->targetTypeSystem()] << functional->typeEntry()->name(); + stream << INDENT << "initialize_meta_info_" << QString(functional->typeEntry()->name()).replace("::", "_") << "();" << Qt::endl; + } } } } @@ -860,7 +868,7 @@ void MetaInfoGenerator::writeLibraryInitializers() { s << INDENT << "Map> _dependencies = new TreeMap<>();" << Qt::endl; const QList typeSystems = m_database->typeSystems(); for(TypeSystemTypeEntry* ts : typeSystems){ - if(ts->codeGeneration()!=TypeEntry::GenerateNothing && !m_staticLibraries.contains(ts->qtLibrary())){ + if((ts->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)!=TypeEntry::GenerateNothing && !m_staticLibraries.contains(ts->qtLibrary())){ QString dependencyString; QSet deps{"QtCore"}; { @@ -1068,8 +1076,8 @@ void MetaInfoGenerator::writeLibraryInitializers() { const QList typeSystems = m_database->typeSystems(); for(TypeSystemTypeEntry* ts : typeSystems){ if(ts - && ts->codeGeneration()!=TypeEntry::GenerateForSubclass - && ts->codeGeneration()!=TypeEntry::GenerateNothing){ + && (ts->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)!=TypeEntry::GenerateForSubclass + && (ts->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)!=TypeEntry::GenerateNothing){ QString qtJambiLibrary; if(ts->qtLibrary().isEmpty()){ qtJambiLibrary = ts->targetName(); @@ -1145,7 +1153,7 @@ void MetaInfoGenerator::writeLibraryInitializers() { } } - if(baseTypeSystem && baseTypeSystem->codeGeneration()!=TypeEntry::GenerateNothing){ + if(baseTypeSystem && (baseTypeSystem->codeGeneration() & ~TypeEntry::InheritedByTypeSystem)!=TypeEntry::GenerateNothing){ { BufferedOutputStream stream(QFileInfo(cppOutputDirectory() + "/QtJambi/QtJambiDepends")); stream << "/* This file was generated by QtJambiGenerator. */" << Qt::endl diff --git a/src/cpp/QtJambiGenerator/metainfogenerator.h b/src/cpp/QtJambiGenerator/metainfogenerator.h index 8411633a..be9923bb 100644 --- a/src/cpp/QtJambiGenerator/metainfogenerator.h +++ b/src/cpp/QtJambiGenerator/metainfogenerator.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/metalang.cpp b/src/cpp/QtJambiGenerator/metalang.cpp index 4bfa6f9e..b94b2d33 100644 --- a/src/cpp/QtJambiGenerator/metalang.cpp +++ b/src/cpp/QtJambiGenerator/metalang.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -110,9 +110,9 @@ MetaTemplateParameter *MetaTemplateParameter::copy() const { cpy->setName(MetaTemplateParameter::name()); cpy->setInstantiation(instantiation()); cpy->setImplicit(isImplicit()); - cpy->setType(type()->copy()); + cpy->setType(type() ? type()->copy() : nullptr); cpy->setDefaultType(defaultType()); - + cpy->setParameterType(parameterType()); return cpy; } @@ -264,7 +264,8 @@ bool MetaFunction::needsCallThrough() const { if (arg->type()->isArray() || arg->type()->isTargetLangEnum() || arg->type()->isTargetLangFlags() - || arg->type()->typeEntry()->isNativeIdBased()) + || arg->type()->typeEntry()->isNativeIdBased() + || useArgumentAsSlotContext(arg->argumentIndex()+1)) return true; if(useArgumentAsArray(arg->argumentIndex()+1) || useArgumentAsBuffer(arg->argumentIndex()+1)){ int minArrayLength = arrayOrBufferLengthMinValue(arg->argumentIndex()+1); @@ -344,52 +345,69 @@ QString MetaFunction::marshalledName() const { if(this->isConstructor()){ returned = "initialize_native"; }else{ - returned = name() + "_native"; - for(const MetaArgument *arg : this->arguments()) { - if(arg->type()->getReferenceType()==MetaType::Reference){ - if(arg->type()->isConstant()){ - returned += "_cref"; - }else{ - returned += "_ref"; - } - }else if(arg->type()->getReferenceType()==MetaType::RReference){ - if(arg->type()->isConstant()){ - returned += "_crval"; - }else{ - returned += "_rval"; - } + returned = name() + "_native" + marshalledArguments(); + } + return returned; +} + +QString MetaFunction::marshalledArguments(int count) const { + return MetaFunction::marshalledArguments(m_arguments, isConstant(), count); +} + +QString MetaFunction::marshalledArguments(const QList& arguments, bool isConst, int count){ + QString returned; + if(count<0) + count = arguments.size(); + for(const MetaArgument *arg : arguments) { + if(!arg) + continue; + if(--count<0) + break; + if(arg->type()->getReferenceType()==MetaType::Reference){ + if(arg->type()->isConstant()){ + returned += "_cref"; }else{ - if(arg->type()->isConstant()){ - returned += "_const"; - } + returned += "_ref"; } - QString qualifiedCppName; - if(arg->type()->typeEntry()->isFunctional()){ - qualifiedCppName = arg->type()->typeEntry()->name(); + }else if(arg->type()->getReferenceType()==MetaType::RReference){ + if(arg->type()->isConstant()){ + returned += "_crval"; }else{ - qualifiedCppName = arg->type()->typeEntry()->qualifiedCppName(); - } - if(qualifiedCppName=="qtjamireal") - qualifiedCppName = "double"; - returned += "_" + qualifiedCppName - .replace("::", "_") - .replace("(*)", "_fptr") - .replace("<", "_") - .replace(">", "_") - .replace("(", "_") - .replace(")", "_") - .replace(",", "_") - .replace(".", "_") - .replace("*", "_ptr") - .replace("&", "_ref") - .replace(" ", "_"); - for(bool ind : arg->type()->indirections()){ - returned += ind ? "_cptr" : "_ptr"; - } - } - if(this->isConstant()){ - returned += "_constfct"; + returned += "_rval"; + } + }else{ + if(arg->type()->isConstant()){ + returned += "_const"; + } } + QString qualifiedCppName; + if(arg->type()->typeEntry()->isFunctional()){ + qualifiedCppName = arg->type()->typeEntry()->name(); + }else{ + qualifiedCppName = arg->type()->typeEntry()->qualifiedCppName(); + } + if(qualifiedCppName=="qtjamireal") + qualifiedCppName = "double"; + returned += "_" + qualifiedCppName + .replace("::", "_") + .replace("(*)", "_fptr") + .replace("<", "_") + .replace(">", "_") + .replace("[", "_") + .replace("]", "_") + .replace("(", "_") + .replace(")", "_") + .replace(",", "_") + .replace(".", "_") + .replace("*", "_ptr") + .replace("&", "_ref") + .replace(" ", "_"); + for(bool ind : arg->type()->indirections()){ + returned += ind ? "_cptr" : "_ptr"; + } + } + if(isConst){ + returned += "_constfct"; } return returned; } @@ -1168,12 +1186,13 @@ ArgumentRemove MetaFunction::argumentRemoved(int key) const { if (argument_modification.removed) { return ArgumentRemove_Remove; } - }else if(argument_modification.arrayLengthParameter == key){ - if (argument_modification.useAsBufferType.testFlag(AsBufferType::Yes)) { - return ArgumentRemove_UseAsLength; - }else if (argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) - && argument_modification.useAsArrayType.testFlag(AsArrayType::NoOffset)) { - return ArgumentRemove_UseAsLength; + }else if(argument_modification.utilArgParameter == key){ + if ((argument_modification.useAsSlotType.testFlag(AsSlotType::Yes) + && argument_modification.useAsSlotType.testFlag(AsSlotType::NoContext)) + || argument_modification.useAsBufferType.testFlag(AsBufferType::Yes) + || (argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) + && argument_modification.useAsArrayType.testFlag(AsArrayType::NoOffset))) { + return ArgumentRemove_UseAsUtilArg; } } } @@ -1202,12 +1221,13 @@ ArgumentRemove MetaFunctional::argumentRemoved(int key) const { if (argument_modification.index == key) { if (argument_modification.removed) { return ArgumentRemove_Remove; - }else if(argument_modification.arrayLengthParameter == key){ - if (argument_modification.useAsBufferType.testFlag(AsBufferType::Yes)) { - return ArgumentRemove_UseAsLength; - }else if (argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) - && argument_modification.useAsArrayType.testFlag(AsArrayType::NoOffset)) { - return ArgumentRemove_UseAsLength; + }else if(argument_modification.utilArgParameter == key){ + if ((argument_modification.useAsSlotType.testFlag(AsSlotType::Yes) + && argument_modification.useAsSlotType.testFlag(AsSlotType::NoContext)) + || argument_modification.useAsBufferType.testFlag(AsBufferType::Yes) + || (argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) + && argument_modification.useAsArrayType.testFlag(AsArrayType::NoOffset))) { + return ArgumentRemove_UseAsUtilArg; } } } @@ -1367,7 +1387,7 @@ QString MetaFunction::arrayOrBufferLengthExpression(int key) const{ return {}; } -int MetaFunction::arrayOrBufferLengthIndex(int key) const{ +int MetaFunction::utilArgumentIndex(int key) const{ FunctionModificationList modifications = this->modifications(implementingClass()); if(implementingClass()!=declaringClass()) modifications << this->modifications(declaringClass()); @@ -1376,9 +1396,10 @@ int MetaFunction::arrayOrBufferLengthIndex(int key) const{ if(argument_modification.type!=ArgumentModification::Default) continue; if (argument_modification.index == key - && (argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) + && (argument_modification.useAsSlotType.testFlag(AsSlotType::Yes) + || argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) || argument_modification.useAsBufferType.testFlag(AsBufferType::Yes))) { - return argument_modification.arrayLengthParameter; + return argument_modification.utilArgParameter; } } } @@ -1433,12 +1454,13 @@ QString MetaFunctional::arrayOrBufferLengthExpression(int key) const{ return {}; } -int MetaFunctional::arrayOrBufferLengthIndex(int key) const{ +int MetaFunctional::utilArgumentIndex(int key) const{ for(const ArgumentModification& argument_modification : this->typeEntry()->argumentModification()) { if (argument_modification.index == key - && (argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) + && (argument_modification.useAsSlotType.testFlag(AsSlotType::Yes) + || argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) || argument_modification.useAsBufferType.testFlag(AsBufferType::Yes))) { - return argument_modification.arrayLengthParameter; + return argument_modification.utilArgParameter; } } return -1; @@ -1541,6 +1563,38 @@ bool MetaFunction::isRethrowExceptions() const{ return false; } +bool MetaFunction::useArgumentAsSlot(int key) const{ + FunctionModificationList modifications = this->modifications(implementingClass()); + if(implementingClass()!=declaringClass()) + modifications << this->modifications(declaringClass()); + for(const FunctionModification& modification : modifications) { + for(const ArgumentModification& argument_modification : modification.argument_mods) { + if(argument_modification.type!=ArgumentModification::Default) + continue; + if (argument_modification.index == key) { + return argument_modification.useAsSlotType.testFlag(AsSlotType::Yes); + } + } + } + return false; +} + +bool MetaFunction::useArgumentAsSlotContext(int key) const{ + FunctionModificationList modifications = this->modifications(implementingClass()); + if(implementingClass()!=declaringClass()) + modifications << this->modifications(declaringClass()); + for(const FunctionModification& modification : modifications) { + for(const ArgumentModification& argument_modification : modification.argument_mods) { + if(argument_modification.type!=ArgumentModification::Default) + continue; + if (argument_modification.useAsSlotType.testFlag(AsSlotType::Yes) && argument_modification.utilArgParameter == key) { + return true; + } + } + } + return false; +} + bool MetaFunction::useArgumentAsArray(int key) const{ FunctionModificationList modifications = this->modifications(implementingClass()); if(implementingClass()!=declaringClass()) @@ -1573,7 +1627,7 @@ bool MetaFunction::useArgumentAsBuffer(int key) const{ return false; } -bool MetaFunction::insertArrayOffsetArgument(int key) const{ +bool MetaFunction::insertUtilArgument(int key) const{ FunctionModificationList modifications = this->modifications(implementingClass()); if(implementingClass()!=declaringClass()) modifications << this->modifications(declaringClass()); @@ -1582,16 +1636,17 @@ bool MetaFunction::insertArrayOffsetArgument(int key) const{ if(argument_modification.type!=ArgumentModification::Default) continue; if (argument_modification.index == key) { - return argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) - && !argument_modification.useAsArrayType.testFlag(AsArrayType::NoOffset) - && argument_modification.arrayLengthParameter>key; + if(argument_modification.useAsArrayType.testFlag(AsArrayType::Yes)){ + return !argument_modification.useAsArrayType.testFlag(AsArrayType::NoOffset) + && argument_modification.utilArgParameter>key; + } } } } return false; } -bool MetaFunction::implementPlainArrayDelegate(int key) const{ +bool MetaFunction::implementPlainDelegate(int key) const{ FunctionModificationList modifications = this->modifications(implementingClass()); if(implementingClass()!=declaringClass()) modifications << this->modifications(declaringClass()); @@ -1600,7 +1655,8 @@ bool MetaFunction::implementPlainArrayDelegate(int key) const{ if(argument_modification.type!=ArgumentModification::Default) continue; if (argument_modification.index == key) { - return argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) && argument_modification.useAsArrayType.testFlag(AsArrayType::AddPlainDelegate); + return (argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) && argument_modification.useAsArrayType.testFlag(AsArrayType::AddPlainDelegate)) + || (argument_modification.useAsSlotType.testFlag(AsSlotType::Yes) && argument_modification.useAsSlotType.testFlag(AsSlotType::AddPlainDelegate)); } } } @@ -1642,8 +1698,30 @@ bool MetaFunctional::useArgumentAsDerefPointer(int key) const{ return false; } +bool MetaFunctional::useArgumentAsSlot(int key) const{ + for(const ArgumentModification& argument_modification : this->typeEntry()->argumentModification()) { + if (argument_modification.index == key) { + return argument_modification.useAsSlotType.testFlag(AsSlotType::Yes); + } + } + return false; +} + +bool MetaFunctional::useArgumentAsSlotContext(int key) const{ + for(const ArgumentModification& argument_modification : this->typeEntry()->argumentModification()) { + if(argument_modification.type!=ArgumentModification::Default) + continue; + if (argument_modification.useAsSlotType.testFlag(AsSlotType::Yes) && argument_modification.utilArgParameter == key) { + return true; + } + } + return false; +} + bool MetaFunctional::useArgumentAsArray(int key) const{ for(const ArgumentModification& argument_modification : this->typeEntry()->argumentModification()) { + if(argument_modification.type!=ArgumentModification::Default) + continue; if (argument_modification.index == key) { return argument_modification.useAsArrayType.testFlag(AsArrayType::Yes); } @@ -1660,25 +1738,27 @@ bool MetaFunctional::useArgumentAsBuffer(int key) const{ return false; } -bool MetaFunctional::insertArrayOffsetArgument(int key) const{ +bool MetaFunctional::insertUtilArgument(int key) const{ for(const ArgumentModification& argument_modification : this->typeEntry()->argumentModification()) { if(argument_modification.type!=ArgumentModification::Default) continue; if (argument_modification.index == key) { - return argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) - && !argument_modification.useAsArrayType.testFlag(AsArrayType::NoOffset) - && argument_modification.arrayLengthParameter>key; + if(argument_modification.useAsArrayType.testFlag(AsArrayType::Yes)){ + return !argument_modification.useAsArrayType.testFlag(AsArrayType::NoOffset) + && argument_modification.utilArgParameter>key; + } } } return false; } -bool MetaFunctional::implementPlainArrayDelegate(int key) const{ +bool MetaFunctional::implementPlainDelegate(int key) const{ for(const ArgumentModification& argument_modification : this->typeEntry()->argumentModification()) { if(argument_modification.type!=ArgumentModification::Default) continue; if (argument_modification.index == key) { - return argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) && argument_modification.useAsArrayType.testFlag(AsArrayType::AddPlainDelegate); + return (argument_modification.useAsArrayType.testFlag(AsArrayType::Yes) && argument_modification.useAsArrayType.testFlag(AsArrayType::AddPlainDelegate)) + || (argument_modification.useAsSlotType.testFlag(AsSlotType::Yes) && argument_modification.useAsSlotType.testFlag(AsSlotType::AddPlainDelegate)); } } return false; @@ -1745,7 +1825,20 @@ QString MetaFunction::minimalSignature() const { QTextStream s2(&strg); writeTypeInfo(s2, param->type()); s2.flush(); + if(strg.isEmpty()){ + if(!param->defaultType().isEmpty()){ + strg = param->defaultType(); + }else if(!param->parameterType().isEmpty()){ + strg = param->parameterType(); + } + } args << strg; + }else if(!param->name().isEmpty()){ + args << param->name(); + }else if(!param->defaultType().isEmpty()){ + args << param->defaultType(); + }else if(!param->parameterType().isEmpty()){ + args << param->parameterType(); }else{ args.clear(); break; @@ -1767,6 +1860,9 @@ QString MetaFunction::minimalSignature() const { minimalSignature += "const"; minimalSignature = QMetaObject::normalizedSignature(minimalSignature.toLocal8Bit().constData()); + if(attributes() & MetaAttributes::BracketCall){ + minimalSignature = minimalSignature.replace(u'(', u'{').replace(u')', u'}'); + } m_cached_minimal_signature = minimalSignature; return minimalSignature; @@ -2291,6 +2387,7 @@ void MetaClass::setBaseClass(MetaClass *base_class) { } void MetaClass::setFunctions(const MetaFunctionList &functions) { + m_functionsBySignature.clear(); m_functions = functions; // Functions must be sorted by name before next loop @@ -2299,6 +2396,7 @@ void MetaClass::setFunctions(const MetaFunctionList &functions) { MetaFunctionList final_functions; for(MetaFunction *f : m_functions) { f->setOwnerClass(this); + m_functionsBySignature[f->minimalSignature()] = f; m_has_virtual_slots |= f->isVirtualSlot(); m_has_virtuals |= !f->isFinal() || f->isVirtualSlot(); @@ -2357,6 +2455,8 @@ void MetaClass::setFunctions(const MetaFunctionList &functions) { } } } + if(f->isConstructor()) + m_publiccopyconstructor_requested = false; } #ifndef QT_NO_DEBUG @@ -2516,6 +2616,9 @@ void MetaClass::addFunction(MetaFunction *function) { && function->arguments()[2]->type()->cppSignature()=="void**"){ m_has_private_metacall = true; } + if(function->isConstructor()){ + m_publiccopyconstructor_requested = false; + } //printf("Adding function: %s::%s\n", qPrintable(qualifiedCppName()), qPrintable(function->minimalSignature())); } @@ -2929,10 +3032,10 @@ bool MetaClass::hasExplicitStandardConstructor() const { return m_has_explicitstandardconstructor>0; } -bool MetaClass::hasPublicCopyConstructor() const { - if(m_has_publiccopyconstructor==0){ +MetaFunction* MetaClass::publicCopyConstructor() const { + if(!m_publiccopyconstructor_requested){ MetaFunctionList functions = queryFunctions(Constructors); - m_has_publiccopyconstructor = -1; + m_publiccopyconstructor_requested = true; for(MetaFunction *f : functions) { if ((f->wasPublic() || f->isPublic()) && !f->isInvalid() @@ -2942,11 +3045,12 @@ bool MetaClass::hasPublicCopyConstructor() const { && f->arguments()[0]->type()->isConstant() && f->arguments()[0]->type()->getReferenceType()==MetaType::Reference && f->arguments()[0]->type()->typeEntry()==typeEntry()) { - m_has_publiccopyconstructor = 1; + m_publiccopyconstructor = f; + break; } } } - return m_has_publiccopyconstructor>0; + return m_publiccopyconstructor; } bool MetaClass::hasPublicAssignment() const { @@ -2979,8 +3083,10 @@ MetaClass::MetaClass() m_has_standardconstructor(0), m_has_publicstandardconstructor(0), m_has_explicitstandardconstructor(0), - m_has_publiccopyconstructor(0), + m_publiccopyconstructor_requested(false), m_has_explicitcopyconstructor(0), + m_has_publicassignment(0), + m_publiccopyconstructor(nullptr), m_has_unimplmentablePureVirtualFunctions(false), m_unimplmentablePureVirtualFunctions(), m_has_metaObject(false), @@ -3034,8 +3140,8 @@ bool MetaClass::hasExplicitCopyConstructor() const { } void MetaClass::addDefaultConstructor() { - FunctionModificationList result = typeEntry()->functionModifications(qualifiedCppName()+"()"); - for(FunctionModification mod : result){ + const FunctionModificationList result = typeEntry()->functionModifications(qualifiedCppName()+"()"); + for(const FunctionModification& mod : result){ if(mod.isRemoveModifier()) return; } @@ -3050,8 +3156,10 @@ void MetaClass::addDefaultConstructor() { uint attr = MetaAttributes::Native | MetaAttributes::Final; if(hasJustPrivateConstructors()){ attr |= MetaAttributes::Private; + //typeEntry()->setHasPrivateDefaultConstructor(); }else{ attr |= MetaAttributes::Public; + //typeEntry()->setHasPublicDefaultConstructor(); } f->setAttributes(attr); f->setImplementingClass(this); @@ -3107,7 +3215,7 @@ MetaFunctionList MetaClass::queryFunctions(uint query) const { continue; } - if ((query & WasPublic) && !f->wasPublic()) { + if ((query & WasPublic) && !f->wasPublic() && !f->isInGlobalScope()) { continue; } @@ -3115,7 +3223,7 @@ MetaFunctionList MetaClass::queryFunctions(uint query) const { continue; } - if ((query & WasProtected) && !f->wasProtected()) { + if ((query & WasProtected) && (!f->wasProtected() || f->isInGlobalScope())) { continue; } @@ -3162,7 +3270,7 @@ MetaFunctionList MetaClass::queryFunctions(uint query) const { continue; }*/ - if ((query & VirtualFunctions) && (f->isFinal() || f->isSignal() || f->isStatic())) { + if ((query & VirtualFunctions) && (f->isFinal() || f->isInGlobalScope() || f->isSignal() || f->isStatic())) { continue; } diff --git a/src/cpp/QtJambiGenerator/metalang.h b/src/cpp/QtJambiGenerator/metalang.h index 1a5e653c..dc6dce0a 100644 --- a/src/cpp/QtJambiGenerator/metalang.h +++ b/src/cpp/QtJambiGenerator/metalang.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -67,7 +67,7 @@ typedef QList MetaTemplateParameterList; enum ArgumentRemove{ ArgumentRemove_No, ArgumentRemove_Remove, - ArgumentRemove_UseAsLength + ArgumentRemove_UseAsUtilArg }; class MetaClassList : public QList { @@ -136,6 +136,10 @@ class MetaAttributes { Override = 0x08000000, + BracketCall = 0x10000000, + + IsUnion = 0x20000000, + Final = FinalInTargetLang | FinalInCpp }; @@ -477,9 +481,12 @@ class MetaTemplateParameter : public MetaVariable { void setInstantiation(const QString &expr) { m_instantiation = expr; } void setImplicit(bool implicit){m_implicit = implicit;} bool isImplicit() const{return m_implicit;} + QString parameterType() const { return m_parameterType; } + void setParameterType(const QString &expr) { m_parameterType = expr; } MetaTemplateParameter *copy() const; private: QString m_instantiation; + QString m_parameterType; bool m_implicit; }; @@ -614,6 +621,9 @@ class MetaFunction : public MetaAttributes { const QString& originalSignature() const { return m_original_signature; } QString marshalledName() const; + QString marshalledArguments(int count = -1) const; + + static QString marshalledArguments(const QList& arguments, bool isConst, int count = -1); // true if one or more of the arguments are of QtObject subclasses bool argumentsHaveNativeId() const { @@ -684,7 +694,9 @@ class MetaFunction : public MetaAttributes { } bool hasTemplateTypes() const{ for(const MetaTemplateParameter *arg : m_templateParameters) { - if (arg->type()->isTemplateArgument() && arg->defaultType().isEmpty()) + if (arg->type() && arg->type()->isTemplateArgument() && arg->defaultType().isEmpty()) + return true; + if (!arg->type() && arg->defaultType().isEmpty()) return true; } return false; @@ -732,16 +744,18 @@ class MetaFunction : public MetaAttributes { bool isUIThreadAffine() const; bool isPixmapThreadAffine() const; - int arrayOrBufferLengthIndex(int argument_index) const; + int utilArgumentIndex(int argument_index) const; QString arrayOrBufferLengthExpression(int key) const; int arrayOrBufferLengthMinValue(int argument_index) const; int arrayOrBufferLengthMaxValue(int argument_index) const; bool useArgumentAsDerefPointer(int key) const; + bool useArgumentAsSlotContext(int key) const; + bool useArgumentAsSlot(int key) const; bool useArgumentAsArray(int key) const; bool useArgumentAsBuffer(int key) const; bool useArgumentAsVarArgs(int key) const; - bool insertArrayOffsetArgument(int key) const; - bool implementPlainArrayDelegate(int key) const; + bool insertUtilArgument(int key) const; + bool implementPlainDelegate(int key) const; bool isNoExcept() const; bool isBlockExceptions() const; bool isRethrowExceptions() const; @@ -966,16 +980,18 @@ class MetaFunctional : public MetaAttributes { const QList& arguments() const { return m_arguments; } void addArgument(MetaArgument * type) { m_arguments << type; } ArgumentRemove argumentRemoved(int) const; - int arrayOrBufferLengthIndex(int key) const; + int utilArgumentIndex(int key) const; QString arrayOrBufferLengthExpression(int key) const; int arrayOrBufferLengthMinValue(int argument_index) const; int arrayOrBufferLengthMaxValue(int argument_index) const; bool useArgumentAsDerefPointer(int key) const; + bool useArgumentAsSlotContext(int key) const; + bool useArgumentAsSlot(int key) const; bool useArgumentAsArray(int key) const; bool useArgumentAsBuffer(int key) const; bool useArgumentAsVarArgs(int key) const; - bool insertArrayOffsetArgument(int key) const; - bool implementPlainArrayDelegate(int key) const; + bool insertUtilArgument(int key) const; + bool implementPlainDelegate(int key) const; QString typeReplaced(int argument_index, QString* jniType = nullptr) const; QString conversionRule(TS::Language language, int idx) const; bool hasConversionRule(TS::Language language, int idx) const; @@ -1063,7 +1079,6 @@ class MetaClass : public MetaAttributes { void setHasJustPrivateConstructors(bool on) { m_has_justprivateconstructors = on; } bool hasPublicStandardConstructor() const; bool hasExplicitStandardConstructor() const; - bool hasPublicCopyConstructor() const; bool hasExplicitCopyConstructor() const; bool hasPublicAssignment() const; bool hasStandardConstructor() const; @@ -1284,9 +1299,9 @@ class MetaClass : public MetaAttributes { void addFunctionalByUsing(QString _using, MetaFunctional* f){ m_functionalByUsing[_using] = f; } - const QMap& functionalByUsing(){ return m_functionalByUsing; } + const QMap& functionalByUsing() const { return m_functionalByUsing; } - const QMap& functionBySignature(){ return m_functionsBySignature; } + const QMap& functionBySignature() const { return m_functionsBySignature; } void setDeprecatedComment(const QString &deprecatedComment) { m_deprecatedComment = deprecatedComment; } const QString& deprecatedComment() const { return m_deprecatedComment; } @@ -1300,6 +1315,7 @@ class MetaClass : public MetaAttributes { bool usingPublicBaseConstructors() const {return m_usingPublicBaseConstructors;} bool hasPaintMethod() const; bool hasQmlListProperty() const; + MetaFunction* publicCopyConstructor() const; private: QSet getAllUnimplmentablePureVirtualFunctions() const; @@ -1313,9 +1329,10 @@ class MetaClass : public MetaAttributes { mutable int m_has_standardconstructor : 2; mutable int m_has_publicstandardconstructor : 2; mutable int m_has_explicitstandardconstructor : 2; - mutable int m_has_publiccopyconstructor : 2; + mutable int m_publiccopyconstructor_requested : 1; mutable int m_has_explicitcopyconstructor : 2; mutable int m_has_publicassignment : 2; + mutable MetaFunction* m_publiccopyconstructor = nullptr; uint m_has_unimplmentablePureVirtualFunctions : 1; QSet m_unimplmentablePureVirtualFunctions; uint m_has_metaObject : 1; diff --git a/src/cpp/QtJambiGenerator/parser/ast.h b/src/cpp/QtJambiGenerator/parser/ast.h index b6abac0b..9386be0c 100644 --- a/src/cpp/QtJambiGenerator/parser/ast.h +++ b/src/cpp/QtJambiGenerator/parser/ast.h @@ -330,6 +330,7 @@ struct ClassSpecifierAST: public TypeSpecifierAST { const ListNode *member_specs; bool is_final; bool is_deprecated; + bool is_dllExported; StringLiteralAST *deprecationComment; ExpressionAST *annotationExpression; }; diff --git a/src/cpp/QtJambiGenerator/parser/binder.cpp b/src/cpp/QtJambiGenerator/parser/binder.cpp index 79bedc35..5e108bbd 100644 --- a/src/cpp/QtJambiGenerator/parser/binder.cpp +++ b/src/cpp/QtJambiGenerator/parser/binder.cpp @@ -316,7 +316,8 @@ void Binder::declare_symbol(SimpleDeclarationAST *node, InitDeclaratorAST *init_ updateItemPosition(fun->toItem(), node); fun->setAccessPolicy(_M_current_access); fun->setFunctionType(_M_current_function_type); - fun->setName(decl_cc.id().split("::").last()); + QStringList functionName = decl_cc.id().split("::"); + fun->setName(functionName.takeLast()); fun->setAbstract(false); if(init_declarator->initializer){ if(init_declarator->initializer->initializer_clause @@ -359,10 +360,12 @@ void Binder::declare_symbol(SimpleDeclarationAST *node, InitDeclaratorAST *init_ if(_M_current_is_template){ fun->setTemplateInstantiations(name_cc.templateArgumentTypes()); } - applyStorageSpecifiers(node->storage_specifiers, model_static_cast(fun)); + applyStorageSpecifiers(node->storage_specifiers, model_static_cast(fun), [](MemberModelItem item, bool value){model_static_cast(item)->setDllExported(value);}); applyFunctionSpecifiers(node->function_specifiers, fun); if(!fun->isDeprecated() && node->annotationExpression) fun->setDeprecated(isDeprecated(node->annotationExpression, node->deprecationComment)); + if(!fun->isDllExported() && node->annotationExpression) + fun->setDllExported(isDllExported(node->annotationExpression)); if(fun->isDeprecated() && node->deprecationComment){ if(node->deprecationComment->literals){ QString comment; @@ -432,7 +435,11 @@ void Binder::declare_symbol(SimpleDeclarationAST *node, InitDeclaratorAST *init_ } } - fun->setScope(symbolScope->qualifiedName()); + if(fun->isFriend()){ + fun->setScope(functionName); + }else{ + fun->setScope(symbolScope->qualifiedName()); + } symbolScope->addFunction(fun); } else { VariableModelItem var = model()->create(); @@ -649,7 +656,8 @@ void Binder::visitFunctionDefinition(FunctionDefinitionAST *node) { _M_current_function->setHasBody(node->function_body); applyStorageSpecifiers(node->storage_specifiers, - model_static_cast(_M_current_function)); + model_static_cast(_M_current_function), + [](MemberModelItem item, bool value){model_static_cast(item)->setDllExported(value);}); if(_M_current_function->isFriend()){ _M_current_function->setAccessPolicy(CodeModel::Public); } @@ -740,29 +748,30 @@ void Binder::visitTemplateDeclaration(TemplateDeclarationAST *node) { TypeParameterAST *type_parameter = parameter->type_parameter; QString defaultType; - NameAST *name; + NameAST *name{nullptr}; + QString parameterType; + TypeInfo parameterTypeInfo; bool isVariadic = false; if (!type_parameter) { - // A hacky hack to work around missing support for parameter declarations in - // templates. We just need the to get the name of the variable, since we - // aren't actually compiling these anyway. We are still not supporting much - // more, but we are refusing to fail for a few more declarations - if (parameter->parameter_declaration == nullptr || - parameter->parameter_declaration->declarator == nullptr || - parameter->parameter_declaration->declarator->id == nullptr) { - changeTemplateParameters(savedTemplateParameters); - return; - - } - - isVariadic = parameter->parameter_declaration->declarator->ellipsis!=0 && parameter->parameter_declaration->declarator->ellipsis!=std::numeric_limits::max(); - name = parameter->parameter_declaration->declarator->id; - if(parameter->parameter_declaration->expression){ - defaultType = parameter->parameter_declaration->expression->toString(this->tokenStream()); + if(parameter->parameter_declaration){ + if(parameter->parameter_declaration->declarator){ + isVariadic = parameter->parameter_declaration->declarator->ellipsis!=0 && parameter->parameter_declaration->declarator->ellipsis!=std::numeric_limits::max(); + name = parameter->parameter_declaration->declarator->id; + } + if(parameter->parameter_declaration->expression){ + defaultType = parameter->parameter_declaration->expression->toString(this->tokenStream()).trimmed(); + } + if(parameter->parameter_declaration->type_specifier){ + parameterType = parameter->parameter_declaration->type_specifier->toString(this->tokenStream()).trimmed(); + parameterTypeInfo = CompilerUtils::typeDescription(parameter->parameter_declaration->type_specifier, + parameter->parameter_declaration->declarator, + this); + } } } else { int tk = decode_token(type_parameter->type); if (tk != Token_typename && tk != Token_class) { + // don't accept Token_template return; } assert(tk == Token_typename || tk == Token_class); @@ -779,6 +788,7 @@ void Binder::visitTemplateDeclaration(TemplateDeclarationAST *node) { TemplateParameterModelItem p = model()->create(); name_cc.run(name); p->setName(name_cc.name()); + p->setParameterType(parameterType); p->setIsVaradic(isVariadic); p->setDefaultValue(defaultType); @@ -968,6 +978,44 @@ bool Binder::isDeprecated(ExpressionAST *annotationExpression, StringLiteralAST return false; } +bool Binder::isDllExported(ExpressionAST *annotationExpression){ + if(annotationExpression){ + class DllExportedBinder: protected DefaultVisitor { + DllExportedBinder(Binder* binder) + : DefaultVisitor(), + m_isCurrentExport(false), + m_isExport(false), + m_binder(binder){} + + void visitPostfixExpression(PostfixExpressionAST *node) { + if(!m_isCurrentExport) + DefaultVisitor::visitPostfixExpression(node); + m_isCurrentExport = false; + } + void visitSimpleTypeSpecifier(SimpleTypeSpecifierAST *node) { + m_binder->name_cc.run(node->name); + if(m_binder->name_cc.name()=="declexport"){ + m_isExport = true; + m_isCurrentExport = true; + } + } + void visitName(NameAST *node) { + m_binder->name_cc.run(node); + if(m_binder->name_cc.name()=="declexport"){ + m_isExport = true; + } + } + bool m_isCurrentExport; + bool m_isExport; + Binder* m_binder; + friend Binder; + } b(this); + b.visit(annotationExpression); + return b.m_isExport; + } + return false; +} + void Binder::visitClassSpecifier(ClassSpecifierAST *node) { class_cc.run(node); if (class_cc.name().isEmpty()) { @@ -989,7 +1037,10 @@ void Binder::visitClassSpecifier(ClassSpecifierAST *node) { thisClass->setDeclFinal(node->is_final); if(!node->is_deprecated && node->annotationExpression) node->is_deprecated = isDeprecated(node->annotationExpression, node->deprecationComment); + if(!node->is_dllExported && node->annotationExpression) + node->is_dllExported = isDllExported(node->annotationExpression); thisClass->setDeclDeprecated(node->is_deprecated); + thisClass->setDllExported(node->is_dllExported); thisClass->setAccessPolicy(_M_current_access); if(node->deprecationComment) thisClass->setDeclDeprecatedComment(node->deprecationComment->toString(tokenStream())); @@ -1250,7 +1301,7 @@ void Binder::visitQProperty(QPropertyAST *node) { _M_current_class->addPropertyDeclaration(property); } -void Binder::applyStorageSpecifiers(const ListNode *it, MemberModelItem item) { +void Binder::applyStorageSpecifiers(const ListNode *it, MemberModelItem item, void(*setDllExported)(MemberModelItem item, bool value)) { if (it == nullptr) return; @@ -1274,6 +1325,10 @@ void Binder::applyStorageSpecifiers(const ListNode *it, MemberModel case Token_constexpr: item->setConstExpr(true); break; + case Token_QTJAMBI_EXPORT: + if(setDllExported) + setDllExported(item, true); + break; case Token_QTJAMBI_DEPRECATED: item->setDeprecated(true); break; @@ -1323,6 +1378,10 @@ void Binder::applyFunctionSpecifiers(const ListNode *it, FunctionMo item->setInvokable(true); break; + case Token_QTJAMBI_EXPORT: + item->setDllExported(true); + break; + case Token_QTJAMBI_DEPRECATED: item->setDeprecated(true); break; diff --git a/src/cpp/QtJambiGenerator/parser/binder.h b/src/cpp/QtJambiGenerator/parser/binder.h index b5dd5cf8..73312a3d 100644 --- a/src/cpp/QtJambiGenerator/parser/binder.h +++ b/src/cpp/QtJambiGenerator/parser/binder.h @@ -101,6 +101,7 @@ class Binder: protected DefaultVisitor { void visitQObject(QObjectAST *) override; private: bool isDeprecated(ExpressionAST *annotationExpression, StringLiteralAST *&deprecationComment); + bool isDllExported(ExpressionAST *annotationExpression); int decode_token(std::size_t index) const; const NameSymbol *decode_symbol(std::size_t index) const; CodeModel::AccessPolicy decode_access_policy(std::size_t index) const; @@ -117,7 +118,7 @@ class Binder: protected DefaultVisitor { void declare_symbol(SimpleDeclarationAST *node, InitDeclaratorAST *init_declarator); - void applyStorageSpecifiers(const ListNode *storage_specifiers, MemberModelItem item); + void applyStorageSpecifiers(const ListNode *storage_specifiers, MemberModelItem item, void(*setDllExported)(MemberModelItem item, bool value) = nullptr); void applyFunctionSpecifiers(const ListNode *it, FunctionModelItem item); void updateItemPosition(CodeModelItem item, AST *node); diff --git a/src/cpp/QtJambiGenerator/parser/codemodel.cpp b/src/cpp/QtJambiGenerator/parser/codemodel.cpp index 30cd38a5..db37c74d 100644 --- a/src/cpp/QtJambiGenerator/parser/codemodel.cpp +++ b/src/cpp/QtJambiGenerator/parser/codemodel.cpp @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** Copyright (C) 2002-2005 Roberto Raggi -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -349,6 +349,14 @@ void _ClassModelItem::setDeclDeprecated(bool declDeprecated) { _M_declDeprecated = declDeprecated; } +bool _ClassModelItem::isDllExported() const { + return _M_dllExported; +} + +void _ClassModelItem::setDllExported(bool dllExported) { + _M_dllExported = dllExported; +} + CodeModel::AccessPolicy _ClassModelItem::accessPolicy() const { return _M_accessPolicy; } @@ -675,6 +683,14 @@ void _FunctionModelItem::setDeclDefault(bool d) { _M_flags.setFlag(IsDeclDefault, d); } +bool _FunctionModelItem::isDllExported() const { + return _M_flags.testFlag(IsDllExported); +} + +void _FunctionModelItem::setDllExported(bool d) { + _M_flags.setFlag(IsDllExported, d); +} + bool _FunctionModelItem::isVariadics() const { return _M_flags.testFlag(IsVariadics); } @@ -834,6 +850,23 @@ void _TemplateParameterModelItem::setIsVaradic(bool isVaradic) { _M_isVaradic = isVaradic; } + +const QString& _TemplateParameterModelItem::parameterType() const{ + return _M_parameterType; +} + +void _TemplateParameterModelItem::setParameterType(const QString ¶meterType){ + _M_parameterType = parameterType; +} + +const TypeInfo& _TemplateParameterModelItem::parameterTypeInfo() const{ + return _M_parameterTypeInfo; +} + +void _TemplateParameterModelItem::setParameterTypeInfo(const TypeInfo ¶meterTypeInfo){ + _M_parameterTypeInfo = parameterTypeInfo; +} + ClassModelItem _TemplateParameterModelItem::ownerClass() const { return _M_ownerClass; } diff --git a/src/cpp/QtJambiGenerator/parser/codemodel.h b/src/cpp/QtJambiGenerator/parser/codemodel.h index ff21f449..c4a3d7b5 100644 --- a/src/cpp/QtJambiGenerator/parser/codemodel.h +++ b/src/cpp/QtJambiGenerator/parser/codemodel.h @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** Copyright (C) 2002-2005 Roberto Raggi -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -372,6 +372,8 @@ class _ClassModelItem: public _ScopeModelItem { void setDeclFinal(bool declFinal); bool isDeclDeprecated() const; void setDeclDeprecated(bool declDeprecated); + bool isDllExported() const; + void setDllExported(bool dllExported); const QString& declDeprecatedComment() const; void setDeclDeprecatedComment(const QString& comment); CodeModel::AccessPolicy accessPolicy() const; @@ -379,7 +381,7 @@ class _ClassModelItem: public _ScopeModelItem { protected: _ClassModelItem(CodeModelPtr model, int kind = __node_kind) : _ScopeModelItem(model, kind), m_has_Q_GADGET(false), m_has_Q_OBJECT(false), _M_classType(CodeModel::Class), - _M_declFinal(false), _M_declDeprecated(false), _M_isTemplate(false), + _M_declFinal(false), _M_declDeprecated(false), _M_isTemplate(false), _M_dllExported(false), _M_accessPolicy(CodeModel::Public), _M_usingBaseConstructors(CodeModel::AccessPolicy::Private){} @@ -394,6 +396,7 @@ class _ClassModelItem: public _ScopeModelItem { bool _M_declFinal; bool _M_declDeprecated; bool _M_isTemplate; + bool _M_dllExported; QString _M_declDeprecatedComment; CodeModel::AccessPolicy _M_accessPolicy; CodeModel::AccessPolicy _M_usingBaseConstructors; @@ -547,6 +550,7 @@ class _MemberModelItem: public _CodeModelItem { IsDeprecated = 0x080, IsConstExpr = 0x100, IsTemplate = 0x200, + IsDllExported = 0x400, }; TemplateParameterList _M_templateParameters; @@ -657,6 +661,8 @@ class _FunctionModelItem: public _MemberModelItem { void setDeleted(bool deleted); bool isDeclDefault() const; void setDeclDefault(bool d); + bool isDllExported() const; + void setDllExported(bool d); OperatorType operatorType() const; void setOperatorType(OperatorType op); @@ -683,7 +689,8 @@ class _FunctionModelItem: public _MemberModelItem { IsDeclFinal = 0x040, HasBody = 0x080, IsDeleted = 0x100, - IsDeclDefault = 0x200 + IsDeclDefault = 0x200, + IsDllExported = 0x400 }; ArgumentList _M_arguments; CodeModel::FunctionType _M_functionType; @@ -837,6 +844,10 @@ class _TemplateParameterModelItem: public _CodeModelItem { bool isVaradic() const; void setOwnerClass(const ClassModelItem& ownerClass); ClassModelItem ownerClass() const; + const QString& parameterType() const; + void setParameterType(const QString ¶meterType); + const TypeInfo& parameterTypeInfo() const; + void setParameterTypeInfo(const TypeInfo ¶meterTypeInfo); protected: _TemplateParameterModelItem(CodeModelPtr model, int kind = __node_kind) @@ -845,6 +856,8 @@ class _TemplateParameterModelItem: public _CodeModelItem { private: QString _M_defaultValue; bool _M_isVaradic; + QString _M_parameterType; + TypeInfo _M_parameterTypeInfo; ClassModelItem _M_ownerClass; private: diff --git a/src/cpp/QtJambiGenerator/parser/declarator_compiler.cpp b/src/cpp/QtJambiGenerator/parser/declarator_compiler.cpp index 717fae23..f4be1ba0 100644 --- a/src/cpp/QtJambiGenerator/parser/declarator_compiler.cpp +++ b/src/cpp/QtJambiGenerator/parser/declarator_compiler.cpp @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** Copyright (C) 2002-2005 Roberto Raggi -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/parser/declarator_compiler.h b/src/cpp/QtJambiGenerator/parser/declarator_compiler.h index 110aa6cd..b5d8d80f 100644 --- a/src/cpp/QtJambiGenerator/parser/declarator_compiler.h +++ b/src/cpp/QtJambiGenerator/parser/declarator_compiler.h @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** Copyright (C) 2002-2005 Roberto Raggi -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/parser/lexer.cpp b/src/cpp/QtJambiGenerator/parser/lexer.cpp index 3fd1337b..ab8d0bd5 100644 --- a/src/cpp/QtJambiGenerator/parser/lexer.cpp +++ b/src/cpp/QtJambiGenerator/parser/lexer.cpp @@ -1878,6 +1878,24 @@ void Lexer::scanKeyword14() { return; } break; + case 'Q': + if (*(cursor + 1) == 'T' && + *(cursor + 2) == 'J' && + *(cursor + 3) == 'A' && + *(cursor + 4) == 'M' && + *(cursor + 5) == 'B' && + *(cursor + 6) == 'I' && + *(cursor + 7) == '_' && + *(cursor + 8) == 'E' && + *(cursor + 9) == 'X' && + *(cursor + 10) == 'P' && + *(cursor + 11) == 'O' && + *(cursor + 12) == 'R' && + *(cursor + 13) == 'T') { + token_stream[index++].kind = Token_QTJAMBI_EXPORT; + return; + } + break; } token_stream[index++].kind = Token_identifier; } diff --git a/src/cpp/QtJambiGenerator/parser/name_compiler.cpp b/src/cpp/QtJambiGenerator/parser/name_compiler.cpp index 23e2c606..8e787ebf 100644 --- a/src/cpp/QtJambiGenerator/parser/name_compiler.cpp +++ b/src/cpp/QtJambiGenerator/parser/name_compiler.cpp @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** Copyright (C) 2002-2005 Roberto Raggi -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/parser/parser.cpp b/src/cpp/QtJambiGenerator/parser/parser.cpp index 6e104b97..77ae704d 100644 --- a/src/cpp/QtJambiGenerator/parser/parser.cpp +++ b/src/cpp/QtJambiGenerator/parser/parser.cpp @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** Copyright (C) 2002-2005 Roberto Raggi -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -278,12 +278,12 @@ bool Parser::skipUntilDeclaration() { case Token_float: case Token_double: case Token_void: - case Token_extern: case Token_namespace: case Token_using: case Token_typedef: case Token_asm: case Token_template: + case Token_extern: case Token_export: case Token_auto: case Token_constexpr: @@ -538,20 +538,9 @@ bool Parser::parseDeclaration(DeclarationAST *&node) { Q_FALLTHROUGH(); default: { - ExpressionAST *annotationExpression(nullptr); - if (token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(annotationExpression)){ - token_stream.rewind(start); - }else{ - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - } - } + ExpressionAST *annotationExpression(nullptr); + if(!parseAnnotation(annotationExpression)){ + token_stream.rewind(start); } if (token_stream.lookAhead() == Token_typedef){ token_stream.rewind(start); @@ -565,59 +554,41 @@ bool Parser::parseDeclaration(DeclarationAST *&node) { const ListNode *storageSpec = nullptr; StringLiteralAST *deprecationComment = nullptr; + bool hasExported = parseExportedSpecifier(storageSpec); bool hasDeprecated = parseDeprecatedSpecifier(storageSpec, deprecationComment); - if (!annotationExpression && token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(annotationExpression)){ - token_stream.rewind(start); - }else{ - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - } - } + if(!hasExported) + hasExported = parseExportedSpecifier(storageSpec); + if(!annotationExpression && !parseAnnotation(annotationExpression)){ + token_stream.rewind(start); } parseStorageClassSpecifier(storageSpec); + if(!hasExported) + hasExported = parseExportedSpecifier(storageSpec); if(!hasDeprecated) hasDeprecated = parseDeprecatedSpecifier(storageSpec, deprecationComment); - if (!annotationExpression && token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(annotationExpression)){ - token_stream.rewind(start); - }else{ - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - } - } + if(!hasExported) + hasExported = parseExportedSpecifier(storageSpec); + if(!annotationExpression && !parseAnnotation(annotationExpression)){ + token_stream.rewind(start); } + if(!hasExported) + hasExported = parseExportedSpecifier(storageSpec); parseCvQualify(cv); + if(!hasExported) + hasExported = parseExportedSpecifier(storageSpec); if(!hasDeprecated) hasDeprecated = parseDeprecatedSpecifier(storageSpec, deprecationComment); - if (!annotationExpression && token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(annotationExpression)){ - token_stream.rewind(start); - }else{ - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - } - } + if(!hasExported) + hasExported = parseExportedSpecifier(storageSpec); + if(!annotationExpression && !parseAnnotation(annotationExpression)){ + token_stream.rewind(start); } + if(!hasExported) + hasExported = parseExportedSpecifier(storageSpec); TypeSpecifierAST *spec = nullptr; if (parseEnumSpecifier(spec) @@ -835,20 +806,9 @@ bool Parser::parseUsing(DeclarationAST *&node) { parseDeprecatedSpecifier(storageSpec, deprecationComment); ExpressionAST *annotationExpression(nullptr); - if (token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(annotationExpression)){ - token_stream.rewind(start); - return false; - } - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - return false; - } + if(!parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + return false; } if (token_stream.lookAhead() == '=') { @@ -1047,20 +1007,9 @@ bool Parser::parseTypedef(DeclarationAST *&node) { std::size_t start = token_stream.cursor(); ExpressionAST *annotationExpression(nullptr); - if (token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(annotationExpression)){ - token_stream.rewind(start); - return false; - } - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - return false; - } + if(!parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + return false; } if (token_stream.lookAhead() == Token_QTJAMBI_DEPRECATED) { token_stream.nextToken(); @@ -1084,20 +1033,9 @@ bool Parser::parseTypedef(DeclarationAST *&node) { CHECK(Token_typedef); - if (token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(annotationExpression)){ - token_stream.rewind(start); - return false; - } - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - return false; - } + if(!annotationExpression && !parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + return false; } if (token_stream.lookAhead() == Token_QTJAMBI_DEPRECATED) { @@ -1781,20 +1719,9 @@ bool Parser::parseEnumSpecifier(TypeSpecifierAST *&node) { CHECK(Token_enum); ExpressionAST *annotationExpression(nullptr); - if (token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(annotationExpression)){ - token_stream.rewind(start); - return false; - } - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - return false; - } + if(!parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + return false; } bool isDeprecated = false; StringLiteralAST *deprecationComment = nullptr; @@ -1875,20 +1802,9 @@ bool Parser::parseEnumClassSpecifier(TypeSpecifierAST *&node) { } ExpressionAST *annotationExpression(nullptr); - if (token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(annotationExpression)){ - token_stream.rewind(start); - return false; - } - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - return false; - } + if(!parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + return false; } bool isDeprecated = false; StringLiteralAST *deprecationComment = nullptr; @@ -2119,13 +2035,26 @@ bool Parser::parseDeprecatedSpecifier(const ListNode *&node, String return start != token_stream.cursor(); } +bool Parser::parseExportedSpecifier(const ListNode *&node){ + std::size_t start = token_stream.cursor(); + + int tk; + while (0 != (tk = token_stream.lookAhead()) + && (tk == Token_QTJAMBI_EXPORT)) { + node = snoc(node, token_stream.cursor(), _M_pool); + token_stream.nextToken(); + } + + return start != token_stream.cursor(); +} + bool Parser::parseFunctionSpecifier(const ListNode *&node) { std::size_t start = token_stream.cursor(); int tk; while (0 != (tk = token_stream.lookAhead()) && (tk == Token_constexpr || tk == Token_inline || tk == Token_virtual - || tk == Token_explicit || tk == Token_Q_INVOKABLE || tk == Token_Q_SCRIPTABLE)) { + || tk == Token_explicit || tk == Token_Q_INVOKABLE || tk == Token_Q_SCRIPTABLE || tk == Token_QTJAMBI_EXPORT)) { node = snoc(node, token_stream.cursor(), _M_pool); token_stream.nextToken(); } @@ -2239,20 +2168,9 @@ bool Parser::parseParameterDeclarationList(const ListNode *storage = nullptr; @@ -2340,6 +2258,16 @@ bool Parser::parseForwardDeclarationSpecifier(TypeSpecifierAST *&node) { std::size_t class_key = token_stream.cursor(); token_stream.nextToken(); + const ListNode *storageSpec = nullptr; + bool hasExported = parseExportedSpecifier(storageSpec); + + ExpressionAST *annotationExpression(nullptr); + if(!parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + } + if(!hasExported) + hasExported = parseExportedSpecifier(storageSpec); + NameAST *name = nullptr; if (!parseName(name, false)) { token_stream.rewind(start); @@ -2371,17 +2299,8 @@ bool Parser::parseForwardDeclarationSpecifier(TypeSpecifierAST *&node) { return true; } -bool Parser::parseClassSpecifier(TypeSpecifierAST *&node) { +bool Parser::parseAnnotation(ExpressionAST *&annotationExpression){ std::size_t start = token_stream.cursor(); - - int kind = token_stream.lookAhead(); - if (kind != Token_class && kind != Token_struct && kind != Token_union) - return false; - - std::size_t class_key = token_stream.cursor(); - token_stream.nextToken(); - - ExpressionAST *annotationExpression(nullptr); if (token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { token_stream.nextToken(); token_stream.nextToken(); @@ -2397,10 +2316,39 @@ bool Parser::parseClassSpecifier(TypeSpecifierAST *&node) { return false; } } + return true; +} + +bool Parser::parseClassSpecifier(TypeSpecifierAST *&node) { + std::size_t start = token_stream.cursor(); + + int kind = token_stream.lookAhead(); + if (kind != Token_class && kind != Token_struct && kind != Token_union) + return false; + + std::size_t class_key = token_stream.cursor(); + token_stream.nextToken(); + + ExpressionAST *annotationExpression(nullptr); + if(!parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + return false; + } + bool isExported = false; bool isDeprecated = false; StringLiteralAST *deprecationComment = nullptr; + if (token_stream.lookAhead() == Token_QTJAMBI_EXPORT) { + token_stream.nextToken(); + isExported = true; + } + + if(!annotationExpression && !parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + return false; + } + if (token_stream.lookAhead() == Token_QTJAMBI_DEPRECATED) { token_stream.nextToken(); isDeprecated = true; @@ -2417,6 +2365,21 @@ bool Parser::parseClassSpecifier(TypeSpecifierAST *&node) { ADVANCE(')', ")") } + if(!annotationExpression && !parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + return false; + } + + if (!isExported && token_stream.lookAhead() == Token_QTJAMBI_EXPORT) { + token_stream.nextToken(); + isExported = true; + } + + if(!annotationExpression && !parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + return false; + } + WinDeclSpecAST *winDeclSpec = nullptr; parseWinDeclSpec(winDeclSpec); @@ -2489,6 +2452,7 @@ bool Parser::parseClassSpecifier(TypeSpecifierAST *&node) { ast->base_clause = bases; ast->is_final = isFinal; ast->is_deprecated = isDeprecated; + ast->is_dllExported = isExported; ast->deprecationComment = deprecationComment; ast->annotationExpression = annotationExpression; @@ -2739,20 +2703,9 @@ bool Parser::parseEnumerator(EnumeratorAST *&node) { EnumeratorAST *ast = CreateNode(_M_pool); ast->id = id; - if (token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(ast->annotationExpression)){ - token_stream.rewind(start); - return false; - } - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - return false; - } + if(!ast->annotationExpression && !parseAnnotation(ast->annotationExpression)){ + token_stream.rewind(start); + return false; } if (token_stream.lookAhead() == Token_QTJAMBI_DEPRECATED) { @@ -3176,6 +3129,11 @@ bool Parser::parseExpressionStatement(StatementAST *&node) { ExpressionAST *expr = nullptr; parseCommaExpression(expr); + if (token_stream.lookAhead() != ';') { + token_stream.rewind(start); + parseAnnotation(expr); + } + ADVANCE(';', ";") ExpressionStatementAST *ast = CreateNode(_M_pool); @@ -3747,6 +3705,7 @@ bool Parser::parseBlockDeclaration(DeclarationAST *&node) { parseStorageClassSpecifier(storageSpec); parseCvQualify(cv); + bool hasExported = parseExportedSpecifier(storageSpec); TypeSpecifierAST *spec = nullptr; if (!parseTypeSpecifierOrClassSpec(spec)) { // replace with simpleTypeSpecifier?!?! @@ -3754,6 +3713,8 @@ bool Parser::parseBlockDeclaration(DeclarationAST *&node) { return false; } + if(!hasExported) + hasExported = parseExportedSpecifier(storageSpec); parseCvQualify(cv); spec->cv = cv; @@ -3866,20 +3827,9 @@ bool Parser::parseDeclarationInternal(DeclarationAST *&node) { } ExpressionAST *annotationExpression(nullptr); - if (token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(annotationExpression)){ - token_stream.rewind(start); - return false; - } - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - return false; - } + if(!annotationExpression && !parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + return false; } const ListNode *funSpec = nullptr; @@ -3893,65 +3843,35 @@ bool Parser::parseDeclarationInternal(DeclarationAST *&node) { if(!hasDeprecated) hasDeprecated = parseDeprecatedSpecifier(storageSpec, deprecationComment); + hasFunSpec |= parseFunctionSpecifier(funSpec); - if (!annotationExpression && token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(annotationExpression)){ - token_stream.rewind(start); - return false; - } - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - return false; - } + if(!annotationExpression && !parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + return false; } parseStorageClassSpecifier(storageSpec); parseCvQualify(cv); + hasFunSpec |= parseFunctionSpecifier(funSpec); if(!hasDeprecated) hasDeprecated = parseDeprecatedSpecifier(storageSpec, deprecationComment); + hasFunSpec |= parseFunctionSpecifier(funSpec); - if (!annotationExpression && token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(annotationExpression)){ - token_stream.rewind(start); - return false; - } - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - return false; - } + if(!annotationExpression && !parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + return false; } hasFunSpec |= parseFunctionSpecifier(funSpec); - if(!hasDeprecated) hasDeprecated = parseDeprecatedSpecifier(storageSpec, deprecationComment); + hasFunSpec |= parseFunctionSpecifier(funSpec); - if (!annotationExpression && token_stream.lookAhead() == '[' && token_stream.lookAhead(1) == '[') { - token_stream.nextToken(); - token_stream.nextToken(); - if(!parseExpression(annotationExpression)){ - token_stream.rewind(start); - return false; - } - if (token_stream.lookAhead() == ']' && token_stream.lookAhead(1) == ']') { - token_stream.nextToken(); - token_stream.nextToken(); - }else{ - token_stream.rewind(start); - return false; - } + if(!annotationExpression && !parseAnnotation(annotationExpression)){ + token_stream.rewind(start); + return false; } // that is for the case 'friend __declspec(dllexport) ....' diff --git a/src/cpp/QtJambiGenerator/parser/parser.h b/src/cpp/QtJambiGenerator/parser/parser.h index 7e3e5b44..b83a4749 100644 --- a/src/cpp/QtJambiGenerator/parser/parser.h +++ b/src/cpp/QtJambiGenerator/parser/parser.h @@ -76,6 +76,7 @@ class Parser { bool parse_Attribute__(); bool parseAbstractDeclarator(DeclaratorAST *&node); bool parseAccessSpecifier(DeclarationAST *&node); + bool parseAnnotation(ExpressionAST *&annotationExpression); bool parseAdditiveExpression(ExpressionAST *&node); bool parseAndExpression(ExpressionAST *&node, bool templArgs = false); bool parseAsmDefinition(DeclarationAST *&node); @@ -118,6 +119,7 @@ class Parser { bool parseFunctionBody(StatementAST *&node); bool parseFunctionSpecifier(const ListNode *&node); bool parseDeprecatedSpecifier(const ListNode *&node, StringLiteralAST *&deprecationComment); + bool parseExportedSpecifier(const ListNode *&node); bool parseIfStatement(StatementAST *&node); bool parseInclusiveOrExpression(ExpressionAST *&node, bool templArgs = false); diff --git a/src/cpp/QtJambiGenerator/parser/rpp/pp-cctype.h b/src/cpp/QtJambiGenerator/parser/rpp/pp-cctype.h index 1fed0c26..1388be0f 100644 --- a/src/cpp/QtJambiGenerator/parser/rpp/pp-cctype.h +++ b/src/cpp/QtJambiGenerator/parser/rpp/pp-cctype.h @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** Copyright 2005 Roberto Raggi -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/parser/rpp/pp-engine-bits.cpp b/src/cpp/QtJambiGenerator/parser/rpp/pp-engine-bits.cpp index b7528706..0d66c22d 100644 --- a/src/cpp/QtJambiGenerator/parser/rpp/pp-engine-bits.cpp +++ b/src/cpp/QtJambiGenerator/parser/rpp/pp-engine-bits.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -39,6 +39,10 @@ #include #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) +#define qAsConst std::as_const +#endif + rpp::pp::pp(pp_environment &__env) : env(__env), expand_macro(env) { verbose = 0; @@ -147,7 +151,7 @@ rpp::PP_DIRECTIVE_TYPE rpp::pp::find_directive(char const *p_directive, std::siz default: break; } - QString message = QString("unknown directive '#%1' at %2:%3").arg(p_directive).arg(env.current_file.absoluteFilePath()).arg(QString::number(env.current_line)); + QString message = QStringLiteral(u"unknown directive '#%1' at %2:%3").arg(p_directive, env.current_file.absoluteFilePath(), QString::number(env.current_line)); env.log(message.toStdString()); return PP_UNKNOWN_DIRECTIVE; } @@ -188,7 +192,8 @@ QFileInfo rpp::pp::find_include_file(QString const &p_input_filename, } QDir curentPath = env.current_file.isDir() ? QDir(env.current_file.absoluteFilePath()) : env.current_file.dir(); - for(QDir path : qAsConst(include_paths)){ + for(const QString& p : qAsConst(include_paths)){ + QDir path(p); if(p_skip_current_path && path==curentPath) continue; #ifdef Q_OS_MAC @@ -220,3 +225,163 @@ QFileInfo rpp::pp::find_include_file(QString const &p_input_filename, } return {}; } + +long rpp::pp::eval_has_include(const QString& incl, bool next){ + bool chop = (incl.startsWith("<") && incl.endsWith(">")) + || (incl.startsWith("\"") && incl.endsWith("\"")); + QFileInfo fileInfo = find_include_file(chop ? incl.mid(1, incl.length()-2) : incl, INCLUDE_GLOBAL, false); + if (fileInfo.isFile()) { + return 1; + } + static QStringList available{""}; + if(available.contains(incl)) + return 1; + Q_UNUSED(next) + /* + QString message = QString(next ? "Unavailable: __has_include_next(%1)" : "Unavailable: __has_include(%1)").arg(incl); + env.log(message.toStdString()); + */ + return 0; +} + +long rpp::pp::eval_has_x(const QString& attr, bool isHasAttribute, bool isHasCppAttribute, bool isHasBuiltin, bool isHasFeature){ + Q_UNUSED(attr) + Q_UNUSED(isHasAttribute) + Q_UNUSED(isHasCppAttribute) + Q_UNUSED(isHasBuiltin) + Q_UNUSED(isHasFeature) + //static QStringList available{}; + //if(available.contains(attr)) + // return 1; + /* + if(isHasCppAttribute) + env.log(QString("Unavailable: __has_cpp_attribute(%1)").arg(attr).toStdString()); + else if(isHasAttribute) + env.log(QString("Unavailable: __has_attribute(%1)").arg(attr).toStdString()); + else if(isHasBuiltin) + env.log(QString("Unavailable: __has_builtin(%1)").arg(attr).toStdString()); + else if(isHasFeature) + env.log(QString("Unavailable: __has_feature(%1)").arg(attr).toStdString()); + */ + return 0; +} + +QFileInfo rpp::pp::handle_include(bool skip_current_path, QString filename, int quote){ + QFileInfo fileInfo = find_include_file(filename, quote == '>' ? + INCLUDE_GLOBAL : INCLUDE_LOCAL, skip_current_path); +#if defined (PP_HOOK_ON_FILE_INCLUDED) + PP_HOOK_ON_FILE_INCLUDED(env.current_file, fp ? filepath : filename, fp); +#endif + + if (fileInfo.isFile()) { + return fileInfo; + } else { +#ifdef PP_OS_WIN + std::replace(filename.begin(), filename.end(), '\\', '/'); +#endif + static QStringList ignoredFiles{ + "type_traits", + "cstddef", + "utility", + "assert.h", + "stddef.h", + "algorithm", + "initializer_list", + "new", + "string.h", + "stdarg.h", + "string", + "string_view", + "iterator", + "list", + "stdlib.h", + "limits.h", + "vector", + "map", + "stdio.h", + "limits", + "exception", + "cmath", + "random", + "future", + "ctype.h", + "GLES2/gl2.h", + "AppKit/NSOpenGL.h", + "X11/Xlib.h", + "GL/glx.h", + "GL/gl.h", + "wingdi.h", + "float.h", + "set", + "numeric", + "functional", + "windows.h", + "Windows.h", + "xcb/xcb.h", + "qpa/qplatformscreen.h", + "CoreFoundation/CoreFoundation.h", + "qplatformdefs.h", + "QtAxContainer/QtAxContainer", + "QtActiveQt/QtActiveQtDepends", + "QtMacExtras/QtMacExtrasDepends", + "QtX11Extras/QtX11ExtrasDepends", + "QtWinExtras/QtWinExtrasDepends", + "ActiveQt/ActiveQtDepends", + "QtGui/qopengles2ext.h", + "time.h", + "inttypes.h", + "typeinfo", + "memory", + "mutex", + "atomic", + "array", + "filesystem", + "optional", + "variant", + "private/qlibrary_p.h", + "private/qobject_p.h", + "sys/types.h", + "unistd.h", + "GLES3/gl32.h", + "qopengl.h", + "cstring", + "tuple", + "vulkan/vulkan.h", + "QObject", + "qpromise.h", + "QScopedPointer", + "QtGlobal", + "QPointer", + "QAbstractListModel", + "QRectF", + "QLocale", + "QInputMethodEvent", + "QInputMethod", + "QVariant", + "QPointF", + "qanimationclipdata.h", + "qchannel.h", + "QStringList", + "cstdint", + "cstdlib", + "chrono", + "stdbool.h", + "climits", + "QtCore/qjnitypes.h", + "cassert" + }; + if((verbose & DEBUGLOG_INCLUDE_ERRORS) != 0) { + QString current_file(env.current_file.absoluteFilePath()); + if(!current_file.contains("private/") + && !current_file.endsWith("_p.h") + && !ignoredFiles.contains(filename)){ + QString message = QString("No such file or directory: %1%2%3") + .arg(quote != '>' ? '"' : '<') + .arg(filename) + .arg(quote != '>' ? '"' : '>'); + env.log(message.toStdString()); + } + } + return {}; + } +} diff --git a/src/cpp/QtJambiGenerator/parser/rpp/pp-engine-bits.h b/src/cpp/QtJambiGenerator/parser/rpp/pp-engine-bits.h index 2d1d70cc..b4f8b3c3 100644 --- a/src/cpp/QtJambiGenerator/parser/rpp/pp-engine-bits.h +++ b/src/cpp/QtJambiGenerator/parser/rpp/pp-engine-bits.h @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** Copyright 2005 Roberto Raggi -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -425,6 +425,8 @@ namespace rpp { return first; } + QFileInfo handle_include(bool skip_current_path, QString filename, int quote); + template _InputIterator handle_include(bool skip_current_path, _InputIterator first, _InputIterator last, _OutputIterator result) { @@ -453,14 +455,8 @@ namespace rpp { } QString filename = QString::fromStdString(std::string(first, end_name)); - QFileInfo fileInfo = find_include_file(filename, quote == '>' ? - INCLUDE_GLOBAL : INCLUDE_LOCAL, skip_current_path); - -#if defined (PP_HOOK_ON_FILE_INCLUDED) - PP_HOOK_ON_FILE_INCLUDED(env.current_file, fp ? filepath : filename, fp); -#endif - - if (fileInfo.isFile()) { + QFileInfo fileInfo = handle_include(skip_current_path, filename, quote); + if(fileInfo.isFile()){ QFileInfo old_file = env.current_file; env.current_file = fileInfo; int __saved_lines = env.current_line; @@ -476,114 +472,7 @@ namespace rpp { // sync the buffer _PP_internal::output_line(env.current_file, env.current_line, result); - } else { -#ifdef PP_OS_WIN - std::replace(filename.begin(), filename.end(), '\\', '/'); -#endif - static QStringList ignoredFiles{ - "type_traits", - "cstddef", - "utility", - "assert.h", - "stddef.h", - "algorithm", - "initializer_list", - "new", - "string.h", - "stdarg.h", - "string", - "string_view", - "iterator", - "list", - "stdlib.h", - "limits.h", - "vector", - "map", - "stdio.h", - "limits", - "exception", - "cmath", - "random", - "future", - "ctype.h", - "GLES2/gl2.h", - "AppKit/NSOpenGL.h", - "X11/Xlib.h", - "GL/glx.h", - "GL/gl.h", - "wingdi.h", - "float.h", - "set", - "numeric", - "functional", - "windows.h", - "Windows.h", - "xcb/xcb.h", - "qpa/qplatformscreen.h", - "CoreFoundation/CoreFoundation.h", - "qplatformdefs.h", - "QtAxContainer/QtAxContainer", - "QtActiveQt/QtActiveQtDepends", - "QtMacExtras/QtMacExtrasDepends", - "QtX11Extras/QtX11ExtrasDepends", - "QtWinExtras/QtWinExtrasDepends", - "ActiveQt/ActiveQtDepends", - "QtGui/qopengles2ext.h", - "time.h", - "inttypes.h", - "typeinfo", - "memory", - "mutex", - "atomic", - "array", - "filesystem", - "optional", - "variant", - "private/qlibrary_p.h", - "private/qobject_p.h", - "sys/types.h", - "unistd.h", - "GLES3/gl32.h", - "qopengl.h", - "cstring", - "tuple", - "vulkan/vulkan.h", - "QObject", - "qpromise.h", - "QScopedPointer", - "QtGlobal", - "QPointer", - "QAbstractListModel", - "QRectF", - "QLocale", - "QInputMethodEvent", - "QInputMethod", - "QVariant", - "QPointF", - "qanimationclipdata.h", - "qchannel.h", - "QStringList", - "cstdint", - "cstdlib", - "chrono", - "stdbool.h", - "climits", - "QtCore/qjnitypes.h" - }; - if((verbose & DEBUGLOG_INCLUDE_ERRORS) != 0) { - QString current_file(env.current_file.absoluteFilePath()); - if(!current_file.contains("private/") - && !current_file.endsWith("_p.h") - && !ignoredFiles.contains(filename)){ - QString message = QString("No such file or directory: %1%2%3") - .arg(quote != '>' ? '"' : '<') - .arg(filename) - .arg(quote != '>' ? '"' : '>'); - env.log(message.toStdString()); - } - } } - return first; } @@ -683,7 +572,11 @@ namespace rpp { definition = "1"; }else if(macroName.startsWith("QTJAMBI_FEATURE_")){ QByteArray feature("QT"); +#if QT_VERSION >= QT_VERSION_CHECK(6,0,0) || QT_VERSION < QT_VERSION_CHECK(6,5,0) + feature.append(macro_name->begin()+7, macro_name->size()-7); +#else feature.append(macroName.mid(7)); +#endif pp_fast_string _macro_name(feature.constBegin(), feature.size()); if(rpp::pp_macro * macro = env.resolve(&_macro_name)){ env.unbind(macro->name); @@ -768,6 +661,9 @@ namespace rpp { return first; } + long eval_has_include(const QString& incl, bool next); + + long eval_has_x(const QString& attr, bool isHasAttribute, bool isHasCppAttribute, bool isHasBuiltin, bool isHasFeature); template _InputIterator eval_primary(_InputIterator __first, _InputIterator __last, Value *result) { @@ -776,6 +672,10 @@ namespace rpp { __first = next_token(__first, __last, &token); bool isHasInclude = false; bool isHasCppAttribute = false; + bool isHasBuiltin = false; + bool isHasFeature = false; + bool isHasAttribute = false; + bool isHasIncludeNext = false; switch (token) { case TOKEN_NUMBER: @@ -830,6 +730,10 @@ namespace rpp { case TOKEN_IDENTIFIER: { isHasInclude = _M_current_text==std::string("__has_include"); isHasCppAttribute = _M_current_text==std::string("__has_cpp_attribute"); + isHasBuiltin = _M_current_text==std::string("__has_builtin"); + isHasFeature = _M_current_text==std::string("__has_feature"); + isHasAttribute = _M_current_text==std::string("__has_attribute"); + isHasIncludeNext = _M_current_text==std::string("__has_include_next"); result->set_long(0); int _token; _InputIterator ___first = next_token(__first, __last, &_token); @@ -847,7 +751,7 @@ namespace rpp { } } }else{ - if(rpp::pp_macro * macro = env.resolve(_M_current_text.c_str(), _M_current_text.size())){ + if(rpp::pp_macro * macro = env.resolve(_M_current_text.c_str(), _M_current_text.size())){ if(macro->definition && !QLatin1String(macro->definition->begin(), macro->definition->size()).contains(QLatin1String(_M_current_text.c_str(), _M_current_text.size()))){ std::string previous_text(_M_current_text); _M_current_text = std::string(macro->definition->begin(), macro->definition->end()); @@ -860,7 +764,7 @@ namespace rpp { } Q_FALLTHROUGH(); case '(':{ - if(isHasInclude){ + if(isHasInclude || isHasIncludeNext){ int _token; _InputIterator ___first = next_token(__first, __last, &_token); if(_token=='<'){ @@ -869,6 +773,7 @@ namespace rpp { ___first = next_token(___first, __last, &_token); if(_token=='>'){ token = _token; + _M_current_text = std::string(__first, ___first); __first = ___first; isHasInclude = true; break; @@ -876,22 +781,24 @@ namespace rpp { }while(true); } } - if(isHasCppAttribute){ + if(isHasCppAttribute || isHasBuiltin || isHasFeature || isHasAttribute){ __first = eval_constant_expression(__first, __last, result); next_token(__first, __last, &token); - result->set_long(1); + result->set_long(eval_has_x(QString::fromStdString(_M_current_text), isHasAttribute, isHasCppAttribute, isHasBuiltin, isHasFeature)); }else{ - if(!isHasInclude) + if(!isHasInclude && !isHasIncludeNext) __first = eval_constant_expression(__first, __last, result); next_token(__first, __last, &token); - if(!isHasInclude){ + if(!isHasInclude && !isHasIncludeNext){ while(token == ','){ __first = next_token(__first, __last, &token); __first = eval_constant_expression(__first, __last, result); next_token(__first, __last, &token); } } + if(isHasInclude || isHasIncludeNext) + result->set_long(eval_has_include(QString::fromStdString(_M_current_text), isHasIncludeNext)); } if (token != ')') { diff --git a/src/cpp/QtJambiGenerator/parser/rpp/pp-environment.cpp b/src/cpp/QtJambiGenerator/parser/rpp/pp-environment.cpp index 5e1de966..cc2f9fc0 100644 --- a/src/cpp/QtJambiGenerator/parser/rpp/pp-environment.cpp +++ b/src/cpp/QtJambiGenerator/parser/rpp/pp-environment.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -36,6 +36,13 @@ #include "pp-environment.h" void rpp::pp_environment::bind(pp_fast_string const *__name, pp_macro const &__macro) { + if(std::string(__name->begin())==std::string("__has_include") + || std::string(__name->begin())==std::string("__has_include_next") + || std::string(__name->begin())==std::string("__has_builtin") + || std::string(__name->begin())==std::string("__has_feature") + || std::string(__name->begin())==std::string("__has_attribute") + || std::string(__name->begin())==std::string("__has_cpp_attribute")) + return; _M_featureRegistry(std::string(__name->begin()), __macro.definition ? std::string(__macro.definition->begin()) : std::string(), current_file, true); std::size_t h = hash_code(*__name) % _M_hash_size; pp_macro *m = new pp_macro(__macro); @@ -49,13 +56,13 @@ void rpp::pp_environment::bind(pp_fast_string const *__name, pp_macro const &__m if (_M_macros.size() == _M_hash_size) rehash(); #ifdef DEBUG_DEFUNDEF - std::string x__name = std::string(); - std::string x__macro = std::string(); + QString x__name = QLatin1String(__name->begin(), __name->size()); + QString x__macro; if(__macro.definition) - x__macro.assign(__macro.definition->begin(), __macro.definition->size()); + x__macro = QLatin1String(__macro.definition->begin(), __macro.definition->size()); else x__macro = ""; - std::cerr << "** DEFINE " << x__name.assign(__name->begin(), __name->size()) << " " << x__macro << " ** in " << qPrintable(current_file.absoluteFilePath()) << std::endl; + std::cerr << "** DEFINE " << qPrintable(__name) << " " << qPrintable(x__macro.trimmed()) << " ** in " << qPrintable(current_file.absoluteFilePath()) << ":" << current_line << std::endl; #endif } @@ -67,8 +74,8 @@ bool rpp::pp_environment::unbind(pp_fast_string const *__name) { result = true; } #ifdef DEBUG_DEFUNDEF - std::string x__name = std::string((const char *)__name); - std::cerr << "** UNDEF " << x__name.assign(__name->begin(), __name->size()) << " ** in " << qPrintable(current_file.absoluteFilePath()) << std::endl; + QString x__name = QLatin1String(__name->begin(), __name->size()); + std::cerr << "** UNDEF " << qPrintable(__name) << " ** in " << qPrintable(current_file.absoluteFilePath()) << ":" << current_line << std::endl; #endif return result; } diff --git a/src/cpp/QtJambiGenerator/parser/rpp/pp-environment.h b/src/cpp/QtJambiGenerator/parser/rpp/pp-environment.h index 8320eb34..a7605e48 100644 --- a/src/cpp/QtJambiGenerator/parser/rpp/pp-environment.h +++ b/src/cpp/QtJambiGenerator/parser/rpp/pp-environment.h @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** Copyright 2005 Roberto Raggi -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/parser/rpp/pp-fwd.h b/src/cpp/QtJambiGenerator/parser/rpp/pp-fwd.h index 0bfbfac8..61113358 100644 --- a/src/cpp/QtJambiGenerator/parser/rpp/pp-fwd.h +++ b/src/cpp/QtJambiGenerator/parser/rpp/pp-fwd.h @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** Copyright 2005 Roberto Raggi -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/parser/rpp/pp-internal.h b/src/cpp/QtJambiGenerator/parser/rpp/pp-internal.h index e803d52c..52f268c5 100644 --- a/src/cpp/QtJambiGenerator/parser/rpp/pp-internal.h +++ b/src/cpp/QtJambiGenerator/parser/rpp/pp-internal.h @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** Copyright 2005 Roberto Raggi -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/parser/rpp/pp-macro-expander.cpp b/src/cpp/QtJambiGenerator/parser/rpp/pp-macro-expander.cpp index 4b8de3eb..fc286b9c 100644 --- a/src/cpp/QtJambiGenerator/parser/rpp/pp-macro-expander.cpp +++ b/src/cpp/QtJambiGenerator/parser/rpp/pp-macro-expander.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/parser/rpp/pp-macro-expander.h b/src/cpp/QtJambiGenerator/parser/rpp/pp-macro-expander.h index e39fd19a..33a4f82c 100644 --- a/src/cpp/QtJambiGenerator/parser/rpp/pp-macro-expander.h +++ b/src/cpp/QtJambiGenerator/parser/rpp/pp-macro-expander.h @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** Copyright 2005 Roberto Raggi -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/parser/rpp/pp-qt-configuration b/src/cpp/QtJambiGenerator/parser/rpp/pp-qt-configuration index f9c944d0..6b467520 100644 --- a/src/cpp/QtJambiGenerator/parser/rpp/pp-qt-configuration +++ b/src/cpp/QtJambiGenerator/parser/rpp/pp-qt-configuration @@ -121,3 +121,7 @@ Q_ENUM(ENUM) #define Q_ASSERT(a) static_cast(0) #define Q_ASSERT_X(a) static_cast(0) + +#define QT_SHARED +#define Q_DECL_IMPORT QTJAMBI_EXPORT +#define Q_DECL_EXPORT QTJAMBI_EXPORT diff --git a/src/cpp/QtJambiGenerator/parser/rpp/preprocessor.cpp b/src/cpp/QtJambiGenerator/parser/rpp/preprocessor.cpp index cb20c319..5bb62b89 100644 --- a/src/cpp/QtJambiGenerator/parser/rpp/preprocessor.cpp +++ b/src/cpp/QtJambiGenerator/parser/rpp/preprocessor.cpp @@ -2,7 +2,7 @@ ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** Copyright 2005 Harald Fernengel -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/parser/rpp/rpp.pri b/src/cpp/QtJambiGenerator/parser/rpp/rpp.pri index 9d49b494..16b09446 100644 --- a/src/cpp/QtJambiGenerator/parser/rpp/rpp.pri +++ b/src/cpp/QtJambiGenerator/parser/rpp/rpp.pri @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + SOURCES += \ $$RXXPATH/rpp/preprocessor.cpp \ $$RXXPATH/rpp/pp-environment.cpp \ diff --git a/src/cpp/QtJambiGenerator/parser/rxx.pri b/src/cpp/QtJambiGenerator/parser/rxx.pri index 0f7f0382..f2d227f8 100644 --- a/src/cpp/QtJambiGenerator/parser/rxx.pri +++ b/src/cpp/QtJambiGenerator/parser/rxx.pri @@ -1,3 +1,33 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### isEmpty(RXXPATH):RXXPATH = $$PWD diff --git a/src/cpp/QtJambiGenerator/parser/tokens.cpp b/src/cpp/QtJambiGenerator/parser/tokens.cpp index c0f101b4..e845cc9e 100644 --- a/src/cpp/QtJambiGenerator/parser/tokens.cpp +++ b/src/cpp/QtJambiGenerator/parser/tokens.cpp @@ -169,6 +169,7 @@ static char const * const _S_token_names[] = { "QT_REQUIRE_CONFIG", "QTJAMBI_DEPRECATED", "QTJAMBI_DEPRECATED_X", + "QTJAMBI_EXPORT", "decltype", "alignas", "alignof", diff --git a/src/cpp/QtJambiGenerator/parser/tokens.h b/src/cpp/QtJambiGenerator/parser/tokens.h index b7bdfa2e..914e035e 100644 --- a/src/cpp/QtJambiGenerator/parser/tokens.h +++ b/src/cpp/QtJambiGenerator/parser/tokens.h @@ -170,6 +170,7 @@ enum TOKEN_KIND { Token_QT_REQUIRE_CONFIG, Token_QTJAMBI_DEPRECATED, Token_QTJAMBI_DEPRECATED_X, + Token_QTJAMBI_EXPORT, Token_decltype, Token_alignas, Token_alignof, diff --git a/src/cpp/QtJambiGenerator/preprocesshandler.h b/src/cpp/QtJambiGenerator/preprocesshandler.h index 2ee82f89..eab3cc92 100644 --- a/src/cpp/QtJambiGenerator/preprocesshandler.h +++ b/src/cpp/QtJambiGenerator/preprocesshandler.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef PREPROCESSHANDLER_H_ #define PREPROCESSHANDLER_H_ diff --git a/src/cpp/QtJambiGenerator/prigenerator.cpp b/src/cpp/QtJambiGenerator/prigenerator.cpp index 767e6bdd..69ed84d7 100644 --- a/src/cpp/QtJambiGenerator/prigenerator.cpp +++ b/src/cpp/QtJambiGenerator/prigenerator.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/reporthandler.h b/src/cpp/QtJambiGenerator/reporthandler.h index 4b58cce2..3a18efb5 100644 --- a/src/cpp/QtJambiGenerator/reporthandler.h +++ b/src/cpp/QtJambiGenerator/reporthandler.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** Copyright (C) 1992-2009 Nokia. All rights reserved. ** ** This file is part of QtJambi. diff --git a/src/cpp/QtJambiGenerator/targets/all.h b/src/cpp/QtJambiGenerator/targets/all.h index 3c038f30..08b0a9d0 100644 --- a/src/cpp/QtJambiGenerator/targets/all.h +++ b/src/cpp/QtJambiGenerator/targets/all.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -85,6 +85,7 @@ #ifndef QTJAMBI_NO_GUI #define QACCESSIBLE_H +#undef QSCREEN_PLATFORM_H typedef struct __GLsync *GLsync; #include typedef void (*GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); @@ -400,9 +401,9 @@ typedef void (*GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity, #ifndef QTJAMBI_NO_WEBCHANNEL #include -//#ifndef QTJAMBI_NO_WEBCHANNELQUICK -//#include -//#endif +#ifndef QTJAMBI_NO_WEBCHANNELQUICK +#include +#endif #endif #ifndef QTJAMBI_NO_WEBVIEW @@ -621,8 +622,7 @@ typedef void (*GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity, #include #include -#undef QT_FEATURE_opengles2 -#define QT_FEATURE_opengles2 1 +#define QTJAMBI_FEATURE_opengles2 1 #ifdef QT_NO_OPENGL_BRIDGE #undef QT_NO_OPENGL_BRIDGE @@ -631,15 +631,7 @@ typedef void (*GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity, #undef Q_OS_ANDROID_EMBEDDED #define Q_OS_ANDROID -#undef QT_FEATURE_xcb -#undef QT_FEATURE_opengl -#undef QT_FEATURE_vulkan -#undef QT_FEATURE_vsp2 #undef Q_OS_WEBOS -#define QT_FEATURE_xcb 1 -#define QT_FEATURE_opengl 1 -#define QT_FEATURE_vulkan 1 -#define QT_FEATURE_vsp2 1 #define Q_OS_WIN #define Q_OS_MACOS #define Q_CLANG_QDOC @@ -667,6 +659,13 @@ typedef void (*GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity, #include #endif +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) +#undef QSCREEN_PLATFORM_H +#define Q_OS_WIN32 +#define Q_OS_ANDROID +#include +#endif + #endif //QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #endif diff --git a/src/cpp/QtJambiGenerator/targets/all.qml b/src/cpp/QtJambiGenerator/targets/all.qml index e101cac6..d13e8c0a 100644 --- a/src/cpp/QtJambiGenerator/targets/all.qml +++ b/src/cpp/QtJambiGenerator/targets/all.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/targets/graphs.h b/src/cpp/QtJambiGenerator/targets/graphs.h index c86fa1a9..6e9a194f 100644 --- a/src/cpp/QtJambiGenerator/targets/graphs.h +++ b/src/cpp/QtJambiGenerator/targets/graphs.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/targets/graphs.qml b/src/cpp/QtJambiGenerator/targets/graphs.qml index ab77ff17..359e439b 100644 --- a/src/cpp/QtJambiGenerator/targets/graphs.qml +++ b/src/cpp/QtJambiGenerator/targets/graphs.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typeparser.cpp b/src/cpp/QtJambiGenerator/typeparser.cpp index 78c308a4..a6cc83c3 100644 --- a/src/cpp/QtJambiGenerator/typeparser.cpp +++ b/src/cpp/QtJambiGenerator/typeparser.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typeparser.h b/src/cpp/QtJambiGenerator/typeparser.h index f0ad8d5f..23af47fc 100644 --- a/src/cpp/QtJambiGenerator/typeparser.h +++ b/src/cpp/QtJambiGenerator/typeparser.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambi3DCore.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambi3DCore.java index 1629b106..29918ee7 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambi3DCore.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambi3DCore.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiCharts.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiCharts.java index 8d1f0398..7ee651e6 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiCharts.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiCharts.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiConcurrent.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiConcurrent.java index 79db3356..c485daa4 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiConcurrent.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiConcurrent.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiCore.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiCore.java index c2131e6c..28937398 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiCore.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiCore.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. - ** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. + ** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -10013,7 +10013,6 @@ public final boolean tryLockUntil(java.time.temporal.@NonNull Temporal timePoint }// class class QTimer___ extends QTimer { - /** *

      See QTimer::callOnTimeout(Args&&...)

      */ @@ -10034,317 +10033,7 @@ class QTimer___ extends QTimer { public final QMetaObject.@NonNull Connection callOnTimeout(@Nullable QObject receiver, @NonNull String method, Qt.@NonNull ConnectionType @NonNull... type){ return timeout.connect(receiver, method, type); } - - private static class QSingleShotTimer extends QObject { - int timerId; - public final Signal0 timeout = new Signal0(); - private final QObject receiver; - private final QMetaObject.Slot0 slot; - - QSingleShotTimer(QObject obj, String method) { - super(QAbstractEventDispatcher.instance()); - this.slot = null; - this.receiver = null; - if(QAbstractEventDispatcher.instance()==null){ - dispose(); - return; - } - QtJambi_LibraryUtilities.internal.setCppOwnership(this); - timeout.connect(obj, method); - } - - QSingleShotTimer(QObject obj, QMetaObject.Slot0 slot) { - super(QAbstractEventDispatcher.instance()); - QMetaObject.Connection connection = timeout.connect(slot); - if(!connection.isConnected() || (obj!=null && connection.receiver()!=obj)) { - this.slot = slot; - this.receiver = obj; - }else { - this.slot = null; - this.receiver = null; - } - if(obj!=null && thread()!=obj.thread()) { - QCoreApplication.instance().aboutToQuit.connect(this::disposeLater); - setParent(null); - this.moveToThread(obj.thread()); - }else if(QAbstractEventDispatcher.instance()==null){ - dispose(); - return; - } - QtJambi_LibraryUtilities.internal.setCppOwnership(this); - } - - QSingleShotTimer(int msec, Qt.TimerType timeType, QObject obj, String method) { - this(obj, method); - if(!isDisposed()) - timerId = startTimer(msec, timeType); - } - - QSingleShotTimer(int msec, Qt.TimerType timeType, QObject obj, QMetaObject.Slot0 slot) { - this(obj, slot); - if(!isDisposed()) - timerId = startTimer(msec, timeType); - } - - @Override - protected void timerEvent(QTimerEvent e) { - if (timerId > 0) - killTimer(timerId); - timerId = -1; - if(slot!=null) { - if(receiver==null || !receiver.isDisposed()) { - try { - slot.invoke(); - } catch (Throwable e1) { - } - } - }else { - timeout.emit(); - } - disposeLater(); - } - } - - /** - * This static function calls a slot after a given time interval. - * - * It is very convenient to use this function because you do not need - * to bother with a timerEvent or create a local QTimer object. - * - * The receiver is the receiving object and the member is the slot. The - * time interval is msec milliseconds. - * - * @see #start() - * @see QTimer::singleShot(Duration,const QObject*,const char *) - */ - public static void singleShot(int msec, @Nullable QObject obj, @NonNull String method) { - singleShot(msec, defaultTypeFor(msec), obj, method); - } - - /** - * This static function calls slot after a given time interval. - * - * It is very convenient to use this function because you do not need - * to bother with a timerEvent or create a local QTimer object. - * - * The time interval is msec milliseconds. - * - * If context is destroyed before the interval occurs, the method will not be called. - * The function will be run in the thread of context. The context's thread must have - * a running Qt event loop. - * - * @see #start() - * @since 5.4 - * @see QTimer::singleShot(Duration,const QObject*,Functor) - */ - public static void singleShot(int msec, @Nullable QObject context, QMetaObject.@NonNull Slot0 slot) { - singleShot(msec, defaultTypeFor(msec), context, slot); - } - - /** - * This static function calls a slot after a given time interval. - * - * It is very convenient to use this function because you do not need - * to bother with a timerEvent or create a local QTimer object. - * - * The receiver is the receiving object and the member is the slot. The - * time interval is msec milliseconds. The timerType affects the - * accuracy of the timer. - * - * @see #start() - * @see QTimer::singleShot(Duration,Qt::TimerType,const QObject*,const char *) - */ - public static void singleShot(int msec, Qt.@NonNull TimerType timeType, @Nullable QObject obj, @NonNull String method) { - new QSingleShotTimer(msec, timeType, obj, method); - } - - /** - * This static function calls slot after a given time interval. - * - * It is very convenient to use this function because you do not need - * to bother with a timerEvent or - * create a local QTimer object. - * - * The time interval is msec milliseconds. - * - * @see #start() - * @since 5.4 - * @see QTimer::singleShot(Duration,Qt::TimerType,PointerToMemberFunction) - */ - public static void singleShot(int msec, QMetaObject.@NonNull Slot0 slot) { - singleShot(msec, defaultTypeFor(msec), null, slot); - } - - /** - * This static function calls slot after a given time interval. - * - * It is very convenient to use this function because you do not need - * to bother with a timerEvent or - * create a local QTimer object. - * - * The time interval is msec milliseconds. The timerType affects the - * accuracy of the timer. - * - * @see #start() - * @since 5.4 - * @see QTimer::singleShot(Duration,Qt::TimerType,PointerToMemberFunction) - */ - public static void singleShot(int msec, Qt.@NonNull TimerType timeType, QMetaObject.@NonNull Slot0 slot) { - singleShot(msec, timeType, null, slot); - } - - /** - * This static function calls slot after a given time interval. - * - * It is very convenient to use this function because you do not need - * to bother with a timerEvent or - * create a local QTimer object. - * - * The time interval is msec milliseconds. The timerType affects the - * accuracy of the timer. - * - * If context is destroyed before the interval occurs, the method will not be called. - * The function will be run in the thread of context. The context's thread must have - * a running Qt event loop. - * - * @see #start() - * @since 5.4 - * @see QTimer::singleShot(Duration,Qt::TimerType,const QObject*,Functor) - */ - public static void singleShot(int msec, Qt.@NonNull TimerType timeType, @Nullable QObject context, QMetaObject.@NonNull Slot0 slot) { - new QSingleShotTimer(msec, timeType, context, slot); - } - - private static Qt.TimerType defaultTypeFor(int msecs){ - return msecs >= 2000 ? Qt.TimerType.CoarseTimer : Qt.TimerType.PreciseTimer; - } - -}// class - -class QTimer_6__ extends QTimer { - - private static class QSingleShotChronoTimer extends QSingleShotTimer { - QSingleShotChronoTimer(java.time.temporal.TemporalAmount time, Qt.TimerType timeType, QObject obj, String method) { - super(obj, method); - if(!isDisposed()) - timerId = startTimer(time, timeType); - } - - QSingleShotChronoTimer(java.time.temporal.TemporalAmount time, Qt.TimerType timeType, QObject obj, QMetaObject.Slot0 slot) { - super(obj, slot); - if(!isDisposed()) - timerId = startTimer(time, timeType); - } - } - - /** - * This static function calls a slot after a given time interval. - * - * It is very convenient to use this function because you do not need - * to bother with a timerEvent or create a local QTimer object. - * - * The receiver is the receiving object and the member is the slot. - * - * @see #start() - * @see QTimer::singleShot(Duration,const QObject*,const char *) - */ - public static void singleShot(java.time.temporal.@NonNull TemporalAmount time, @Nullable QObject obj, @NonNull String method) { - singleShot(time, defaultTypeFor(time), obj, method); - } - - /** - * This static function calls slot after a given time interval. - * - * It is very convenient to use this function because you do not need - * to bother with a timerEvent or create a local QTimer object. - * - * If context is destroyed before the interval occurs, the method will not be called. - * The function will be run in the thread of context. The context's thread must have - * a running Qt event loop. - * - * @see #start() - * @since 5.4 - * @see QTimer::singleShot(Duration,const QObject*,Functor) - */ - public static void singleShot(java.time.temporal.@NonNull TemporalAmount time, @Nullable QObject context, QMetaObject.@NonNull Slot0 slot) { - singleShot(time, defaultTypeFor(time), context, slot); - } - - /** - * This static function calls a slot after a given time interval. - * - * It is very convenient to use this function because you do not need - * to bother with a timerEvent or create a local QTimer object. - * - * The receiver is the receiving object and the member is the slot. - * The timerType affects the accuracy of the timer. - * - * @see #start() - * @see QTimer::singleShot(Duration,Qt::TimerType,const QObject*,const char *) - */ - public static void singleShot(java.time.temporal.@NonNull TemporalAmount time, Qt.@NonNull TimerType timeType, @Nullable QObject obj, @NonNull String method) { - new QSingleShotChronoTimer(time, timeType, obj, method); - } - - /** - * This static function calls slot after a given time interval. - * - * It is very convenient to use this function because you do not need - * to bother with a timerEvent or - * create a local QTimer object. - * - * @see #start() - * @since 5.4 - * @see QTimer::singleShot(Duration,Qt::TimerType,PointerToMemberFunction) - */ - public static void singleShot(java.time.temporal.@NonNull TemporalAmount time, QMetaObject.@NonNull Slot0 slot) { - singleShot(time, defaultTypeFor(time), null, slot); - } - - /** - * This static function calls slot after a given time interval. - * - * It is very convenient to use this function because you do not need - * to bother with a timerEvent or - * create a local QTimer object. - * - * The timerType affects the - * accuracy of the timer. - * - * @see #start() - * @since 5.4 - * @see QTimer::singleShot(Duration,Qt::TimerType,PointerToMemberFunction) - */ - public static void singleShot(java.time.temporal.@NonNull TemporalAmount time, Qt.@NonNull TimerType timeType, QMetaObject.@NonNull Slot0 slot) { - singleShot(time, timeType, null, slot); - } - /** - * This static function calls slot after a given time interval. - * - * It is very convenient to use this function because you do not need - * to bother with a timerEvent or - * create a local QTimer object. - * - * The timerType affects the - * accuracy of the timer. - * - * If context is destroyed before the interval occurs, the method will not be called. - * The function will be run in the thread of context. The context's thread must have - * a running Qt event loop. - * - * @see #start() - * @since 5.4 - * @see QTimer::singleShot(Duration,Qt::TimerType,const QObject*,Functor) - */ - public static void singleShot(java.time.temporal.@NonNull TemporalAmount time, Qt.@NonNull TimerType timeType, @Nullable QObject context, QMetaObject.@NonNull Slot0 slot) { - new QSingleShotChronoTimer(time, timeType, context, slot); - } - - private static Qt.TimerType defaultTypeFor(java.time.temporal.@NonNull TemporalAmount time){ - return (time instanceof java.time.Duration ? (java.time.Duration)time : java.time.Duration.from(time)).toMillis() >= 2000 ? Qt.TimerType.CoarseTimer : Qt.TimerType.PreciseTimer; - } - }// class class QCoreApplication___ extends QCoreApplication { @@ -11761,6 +11450,14 @@ private Week(int weekNumber, int yearNumber){ class QByteArray___ extends QByteArray { + /** + *

      Java wrapper for Qt callable std::function<bool(char)>

      + */ + @FunctionalInterface + public interface Predicate { + public boolean test(byte b); + } + private static byte[] getBytes(String s) { if(s==null) return new byte[0]; @@ -13127,16 +12824,6 @@ public QMetaType(QMetaType.@StrictNonNull Type type){ this(type.value()); } - /** - * Returns the type name associated with this QMetaType as {@link String}. - * @return type name - */ - @Override - @QtUninvokable - public final @NonNull String toString() { - return ""+name(); - } - /** * @deprecated Use {@link #qRegisterMetaType(Class, QMetaType...)} instead. */ @@ -13730,6 +13417,18 @@ else if (javaType == byte.class) } }// class +class QMetaType_toString__ extends QMetaType { +/** + * Returns the type name associated with this QMetaType as {@link String}. + * @return type name + */ +@Override +@QtUninvokable +public final @NonNull String toString() { + return String.format("QMetaType(%1$s)", name()); +} +}// class + class QVariant_5__ { /** * @deprecated Use {@link QDataStream#writeObject(Object)} instead. @@ -14084,7 +13783,14 @@ public static boolean canConvert(@Nullable Object obj, int targetType) { }// class class QVariant___ { - + + /** + * Create a variant for the native nullptr type. + */ + public static QVariant nullVariant() { + return new QVariant(QMetaType.Type.Nullptr); + } + static Class getComplexType(Class primitiveType) { if (primitiveType == int.class) return Integer.class; @@ -15066,6 +14772,80 @@ class QPartialOrdering___ { public static final int Unordered = -127; }// class +class QPartialOrdering_67__ { + /** + *

      See QPartialOrdering::equivalent

      + */ + public static final int equivalent = 0; + /** + *

      See QPartialOrdering::less

      + */ + public static final int greater = 1; + /** + *

      See QPartialOrdering::greater

      + */ + public static final int less = -1; + /** + *

      See QPartialOrdering::unordered

      + */ + public static final int unordered = -127; +}// class + +class partial_ordering___ { + /** + *

      See partial_ordering::equivalent

      + */ + public static final int equivalent = 0; + /** + *

      See partial_ordering::less

      + */ + public static final int greater = 1; + /** + *

      See partial_ordering::greater

      + */ + public static final int less = -1; + /** + *

      See partial_ordering::unordered

      + */ + public static final int unordered = unordered(); + + private static native int unordered(); +}// class + +class weak_ordering___ { + /** + *

      See weak_ordering::equivalent

      + */ + public static final int equivalent = 0; + /** + *

      See weak_ordering::less

      + */ + public static final int greater = 1; + /** + *

      See weak_ordering::greater

      + */ + public static final int less = -1; +}// class + +class strong_ordering___ { + /** + *

      See strong_ordering::equivalent

      + */ + public static final int equivalent = 0; + /** + *

      See strong_ordering::equal

      + */ + public static final int equal = 0; + /** + *

      See strong_ordering::less

      + */ + public static final int greater = 1; + /** + *

      See strong_ordering::greater

      + */ + public static final int less = -1; +}// class + class QMetaMethod___ { private Class returnClassType; private java.util.List> parameterClassTypes; @@ -15402,8 +15182,10 @@ private QMetaObject.AbstractSignal findSignal(@StrictNonNull QObject sender) { private static QMetaMethod fromMethodImpl(QMetaObject.AbstractSlot method) { io.qt.internal.ClassAnalyzerUtility.LambdaInfo info = io.qt.internal.ClassAnalyzerUtility.lambdaInfo(method); - if(info!=null && info.lambdaArgs.isEmpty()) { - if(info.owner instanceof QMetaObject.Signal && info.reflectiveMethod.getName().equals("emit")) + if(info!=null) { + if(info.owner instanceof QMetaObject.Signal + && info.reflectiveMethod!=null + && info.reflectiveMethod.getName().equals("emit")) return fromSignal((QMetaObject.Signal)info.owner); if(info.reflectiveMethod!=null) return fromReflectedMethod(info.reflectiveMethod); @@ -17166,7 +16948,7 @@ public void setContextClassLoader(@Nullable ClassLoader cl) { private final Thread javaThread = null; /** - * Returns the {@link Thread} instance repüresenting this {@link QThread}. + * Returns the {@link Thread} instance representing this {@link QThread}. */ public final @Nullable Thread javaThread() { return javaThread==null ? __qt_javaThread() : javaThread; } @@ -17842,6 +17624,14 @@ else if(arg!=null) */ @QtUninvokable public static native @NonNull QByteArray toLocal8Bit(CharSequence string); + + /** + *

      Java wrapper for Qt callable std::function<bool(QChar)>

      + */ + @FunctionalInterface + public interface Predicate { + public boolean test(char character); + } }// class class QtGlobal_5_ { diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiGui.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiGui.java index de58bdf7..fe1c9492 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiGui.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiGui.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -370,7 +370,7 @@ public QImage(java.nio.Buffer data, int width, int height, Format format) { class QImage::JNI{ -void __qt_create_new_QImage_7(void* __qtjambi_ptr, JNIEnv* env, jobject, jvalue* arguments){ +void __qt_create_new_QImage_7(void* __qtjambi_ptr, JNIEnv* env, jobject, jvalue* arguments, bool){ QTJAMBI_NATIVE_METHOD_CALL("construct QImage(unsigned char * data, int width, int height, QImage::Format format, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr)"); jobject data = arguments[0].l; jint width = arguments[1].i; @@ -381,7 +381,7 @@ void __qt_create_new_QImage_7(void* __qtjambi_ptr, JNIEnv* env, jobject, jvalue* } -void __qt_create_new_QImage_8(void* __qtjambi_ptr, JNIEnv* env, jobject, jvalue* arguments){ +void __qt_create_new_QImage_8(void* __qtjambi_ptr, JNIEnv* env, jobject, jvalue* arguments, bool){ QTJAMBI_NATIVE_METHOD_CALL("construct QImage(unsigned char * data, int width, int height, QImage::Format format, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr)"); jobject data = arguments[0].l; jint width = arguments[1].i; diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiHttpServer.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiHttpServer.java index e8326e66..8d0a0c97 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiHttpServer.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiHttpServer.java @@ -1,6 +1,6 @@ /**************************************************************************** ** - ** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. + ** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiLocation.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiLocation.java index 13a913f9..706edc55 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiLocation.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiLocation.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiMultimedia.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiMultimedia.java index b0271916..f98a5932 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiMultimedia.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiMultimedia.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiNetwork.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiNetwork.java index 411108af..b07a93ea 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiNetwork.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiNetwork.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -44,60 +44,10 @@ class QSsl___{ }// class class QHostInfo___ extends QHostInfo { - /** - *

      See QHostInfo::lookupHost(QString, Functor)

      - */ - @QtUninvokable - public static int lookupHost(@NonNull String name, io.qt.core.QMetaObject.@StrictNonNull Slot1<@NonNull QHostInfo> slot) { - io.qt.core.QObject context = QtJambi_LibraryUtilities.internal.lambdaContext(slot); - io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot)); - if(metaMethod!=null && metaMethod.isValid()) { - if(metaMethod.parameterCount()!=1 && metaMethod.parameterType(0)!=io.qt.core.QMetaType.fromType(QHostInfo.class).id()) { - throw new IllegalArgumentException("Method does not take a single QHostInfo argument: "+metaMethod.cppMethodSignature()); - } - if(context!=null) { - switch(metaMethod.methodType()) { - case Signal: - return lookupHost(name, context, "2"+metaMethod.cppMethodSignature()); - case Method: - case Slot: - return lookupHost(name, context, "1"+metaMethod.cppMethodSignature()); - default: - break; - } - } - } - return lookupHost(name, QtJambi_LibraryUtilities.internal.nativeId(context), slot); - } - - /** - *

      See QHostInfo::lookupHost(QString, QObject, Functor)

      - */ - @QtUninvokable - public static int lookupHost(@NonNull String name, io.qt.core.@Nullable QObject context, io.qt.core.QMetaObject.@StrictNonNull Slot1<@NonNull QHostInfo> slot){ - io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot)); - if(metaMethod!=null && metaMethod.isValid()) { - if(metaMethod.parameterCount()!=1 && metaMethod.parameterType(0)!=io.qt.core.QMetaType.fromType(QHostInfo.class).id()) { - throw new IllegalArgumentException("Method does not take a single QHostInfo argument: "+metaMethod.cppMethodSignature()); - } - io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot); - if(context!=null && context==object) { - switch(metaMethod.methodType()) { - case Signal: - return lookupHost(name, context, "2"+metaMethod.cppMethodSignature()); - case Method: - case Slot: - return lookupHost(name, context, "1"+metaMethod.cppMethodSignature()); - default: - break; - } - } - } - return lookupHost(name, QtJambi_LibraryUtilities.internal.nativeId(context), slot); - } /** *

      See QHostInfo::lookupHost(QString, Functor)

      + * @see #lookupHost(String, io.qt.core.QObject, io.qt.core.QMetaObject.Slot1) */ @SuppressWarnings("unchecked") @QtUninvokable @@ -124,13 +74,10 @@ public static int lookupHost(@NonNull String name, io.qt.core.QMetaObject.@Stric } } if(signal instanceof io.qt.core.QMetaObject.Emitable1) - return lookupHost(name, QtJambi_LibraryUtilities.internal.nativeId(context), ((io.qt.core.QMetaObject.Emitable1)signal)::emit); + return lookupHost(name, context, ((io.qt.core.QMetaObject.Emitable1)signal)::emit); else throw new IllegalArgumentException("Signal is not emitable."); } - - @QtUninvokable - private static native int lookupHost(String name, long context, io.qt.core.QMetaObject.Slot1 slot); }// class class QAbstractSocket___ extends QAbstractSocket { @@ -158,20 +105,10 @@ public HostInfo() { } }// class -class QNetworkReply___ extends QNetworkReply { +class QRestAccessManager___ extends QRestAccessManager { /** - *

      See QNetworkReply::rawHeader(QByteArray)const

      + * Callback for rest requests. */ - @QtUninvokable - public final io.qt.core.@NonNull QByteArray rawHeader(@NonNull String headerName){ - return rawHeader(new io.qt.core.QByteArray(headerName)); - } - - /** - *

      See QNetworkReply::hasRawHeader(QByteArray)const

      - */ - @QtUninvokable - public final boolean hasRawHeader(@NonNull String headerName){ - return hasRawHeader(new io.qt.core.QByteArray(headerName)); + public interface Callback extends java.util.function.@StrictNonNull Consumer, java.io.Serializable{ } }// class diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiPositioning.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiPositioning.java index f9888bfa..bd4b3796 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiPositioning.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiPositioning.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiQml.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiQml.java index 8248624e..52417925 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiQml.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiQml.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiQuick.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiQuick.java index 6f8119f7..e6db029c 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiQuick.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiQuick.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -30,8 +30,18 @@ ****************************************************************************/ class QSGGeometry.AttributeSet__{ + @Deprecated public AttributeSet(java.util.Collection attributes, int stride){ - this(attributes.toArray(new Attribute[attributes.size()]), stride); + this(stride, attributes.toArray(new Attribute[attributes.size()])); + } + + public AttributeSet(int stride, java.util.Collection attributes){ + this(stride, attributes.toArray(new Attribute[attributes.size()])); + } + + @Deprecated + public AttributeSet(Attribute[] attributes, int stride){ + this(stride, attributes); } }// class diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiQuickTest.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiQuickTest.java index 1e964afe..c04a2957 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiQuickTest.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiQuickTest.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiRemoteObjects.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiRemoteObjects.java index 5c8d2531..c55214fe 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiRemoteObjects.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiRemoteObjects.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiScxml.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiScxml.java index a7e62be0..0069e66a 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiScxml.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiScxml.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -112,302 +112,122 @@ public static io.qt.core.QMetaObject.Slot1 onExit(io.qt.core.QMetaObjec /** *

      See QScxmlStateMachine::connectToState(QString, Functor, Qt::ConnectionType)

      */ - public io.qt.core.QMetaObject.Connection connectToState(String scxmlStateName, - io.qt.core.QMetaObject.Slot0 slot, io.qt.core.Qt.ConnectionType... type){ - int _type = 0; - for (io.qt.core.Qt.ConnectionType t : type) { - _type |= t.value(); - } - io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot)); - if(metaMethod!=null && metaMethod.isValid() && metaMethod.parameterCount()==0) { - io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot); - if(object!=null) { - switch(metaMethod.methodType()) { - case Signal: - return connectToState(scxmlStateName, object, "2"+metaMethod.cppMethodSignature(), _type); - case Method: - case Slot: - return connectToState(scxmlStateName, object, "1"+metaMethod.cppMethodSignature(), _type); - default: - break; - } - } - } - return connectToState(QtJambi_LibraryUtilities.internal.nativeId(this), scxmlStateName, slot, _type); - } - - /** - *

      See QScxmlStateMachine::connectToState(QString, Functor, Qt::ConnectionType)

      - */ - public io.qt.core.QMetaObject.Connection connectToState(String scxmlStateName, - io.qt.core.QMetaObject.Connectable0 signal, io.qt.core.Qt.ConnectionType... type){ - int _type = 0; - for (io.qt.core.Qt.ConnectionType t : type) { - _type |= t.value(); + public io.qt.core.QMetaObject.@NonNull Connection connectToState(@NonNull String scxmlStateName, + io.qt.core.QMetaObject.@StrictNonNull Connectable0 signal, io.qt.core.Qt.@NonNull ConnectionType @NonNull... type){ + io.qt.core.QObject object = null; + if(signal.containingObject() instanceof io.qt.core.QObject){ + object = (io.qt.core.QObject)signal.containingObject(); } io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromSignal(java.util.Objects.requireNonNull(signal)); if(metaMethod!=null && metaMethod.isValid() && metaMethod.parameterCount()==0) { - io.qt.core.QObject object = null; - if(signal.containingObject() instanceof io.qt.core.QObject){ - object = (io.qt.core.QObject)signal.containingObject(); - } if(object!=null) { switch(metaMethod.methodType()) { case Signal: - return connectToState(scxmlStateName, object, "2"+metaMethod.cppMethodSignature(), _type); + return connectToState(scxmlStateName, object, "2"+metaMethod.cppMethodSignature(), type); case Method: case Slot: - return connectToState(scxmlStateName, object, "1"+metaMethod.cppMethodSignature(), _type); + return connectToState(scxmlStateName, object, "1"+metaMethod.cppMethodSignature(), type); default: break; } } } if(signal instanceof io.qt.core.QMetaObject.Emitable0) - return connectToState(QtJambi_LibraryUtilities.internal.nativeId(this), scxmlStateName, (io.qt.core.QMetaObject.Slot0)((io.qt.core.QMetaObject.Emitable0)signal)::emit, _type); - else return null; - } - - /** - *

      See QScxmlStateMachine::connectToState(QString, Functor, Qt::ConnectionType)

      - */ - public io.qt.core.QMetaObject.Connection connectToState(String scxmlStateName, - io.qt.core.QMetaObject.Slot1 slot, io.qt.core.Qt.ConnectionType... type){ - int _type = 0; - for (io.qt.core.Qt.ConnectionType t : type) { - _type |= t.value(); - } - io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot)); - if(metaMethod!=null && metaMethod.isValid()) { - if(metaMethod.parameterCount()!=1 || metaMethod.parameterType(0)!=io.qt.core.QMetaType.Type.Bool.value()) { - throw new IllegalArgumentException("Method does not take a single boolean argument: "+metaMethod.cppMethodSignature()); - } - io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot); - if(object!=null) { - switch(metaMethod.methodType()) { - case Signal: - return connectToState(scxmlStateName, object, "2"+metaMethod.cppMethodSignature(), _type); - case Method: - case Slot: - return connectToState(scxmlStateName, object, "1"+metaMethod.cppMethodSignature(), _type); - default: - break; - } - } - } - return connectToState(QtJambi_LibraryUtilities.internal.nativeId(this), scxmlStateName, slot, _type); + return connectToState(scxmlStateName, object, (io.qt.core.QMetaObject.Slot0)((io.qt.core.QMetaObject.Emitable0)signal)::emit, type); + else return connectToState(scxmlStateName, object, (String)null, type); } - + /** *

      See QScxmlStateMachine::connectToState(QString, Functor, Qt::ConnectionType)

      */ @SuppressWarnings("unchecked") - public io.qt.core.QMetaObject.Connection connectToState(String scxmlStateName, - io.qt.core.QMetaObject.Connectable1 signal, io.qt.core.Qt.ConnectionType... type){ - int _type = 0; - for (io.qt.core.Qt.ConnectionType t : type) { - _type |= t.value(); + public io.qt.core.QMetaObject.@NonNull Connection connectToState(@NonNull String scxmlStateName, + io.qt.core.QMetaObject.@StrictNonNull Connectable1 signal, io.qt.core.Qt.@NonNull ConnectionType @NonNull... type){ + io.qt.core.QObject object = null; + if(signal.containingObject() instanceof io.qt.core.QObject){ + object = (io.qt.core.QObject)signal.containingObject(); } io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromSignal(java.util.Objects.requireNonNull(signal)); if(metaMethod!=null && metaMethod.isValid()) { if(metaMethod.parameterCount()!=1 || metaMethod.parameterType(0)!=io.qt.core.QMetaType.Type.Bool.value()) { throw new IllegalArgumentException("Method does not take a single boolean argument: "+metaMethod.cppMethodSignature()); } - io.qt.core.QObject object = null; - if(signal.containingObject() instanceof io.qt.core.QObject){ - object = (io.qt.core.QObject)signal.containingObject(); - } if(object!=null) { switch(metaMethod.methodType()) { case Signal: - return connectToState(scxmlStateName, object, "2"+metaMethod.cppMethodSignature(), _type); + return connectToState(scxmlStateName, object, "2"+metaMethod.cppMethodSignature(), type); case Method: case Slot: - return connectToState(scxmlStateName, object, "1"+metaMethod.cppMethodSignature(), _type); + return connectToState(scxmlStateName, object, "1"+metaMethod.cppMethodSignature(), type); default: break; } } } if(signal instanceof io.qt.core.QMetaObject.Emitable1) - return connectToState(QtJambi_LibraryUtilities.internal.nativeId(this), scxmlStateName, (io.qt.core.QMetaObject.Slot1)((io.qt.core.QMetaObject.Emitable1)signal)::emit, _type); - else return null; - } - - /** - *

      See QScxmlStateMachine::connectToState(QString, QObject, const char*, Qt::ConnectionType)

      - */ - public io.qt.core.QMetaObject.Connection connectToState(String scxmlStateName, - io.qt.core.QObject object, String member, io.qt.core.Qt.ConnectionType... type){ - int _type = 0; - for (io.qt.core.Qt.ConnectionType t : type) { - _type |= t.value(); - } - if(member!=null && !member.startsWith("1") && !member.startsWith("2")) { - io.qt.core.QMetaMethod method = object.metaObject().method(member); - if(method!=null && method.isValid()) { - if(method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal) - member = "2" + method.cppMethodSignature(); - else - member = "1" + method.cppMethodSignature(); - }else { - member = "1" + member; - } - } - return connectToState(scxmlStateName, object, member, _type); + return connectToState(scxmlStateName, object, (io.qt.core.QMetaObject.Slot1)((io.qt.core.QMetaObject.Emitable1)signal)::emit, type); + else return connectToState(scxmlStateName, object, (String)null, type); } - private native io.qt.core.QMetaObject.Connection connectToState(long nativeId, String scxmlStateName, io.qt.core.QMetaObject.AbstractSlot slot, int type); - /** *

      See QScxmlStateMachine::connectToEvent(QString, Functor, Qt::ConnectionType)

      */ - public io.qt.core.QMetaObject.Connection connectToEvent(String scxmlStateName, - io.qt.core.QMetaObject.Slot0 slot, io.qt.core.Qt.ConnectionType... type){ - int _type = 0; - for (io.qt.core.Qt.ConnectionType t : type) { - _type |= t.value(); - } - io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot)); - if(metaMethod!=null && metaMethod.isValid() && metaMethod.parameterCount()==0) { - io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot); - if(object!=null) { - switch(metaMethod.methodType()) { - case Signal: - return connectToEvent(scxmlStateName, object, "2"+metaMethod.cppMethodSignature(), _type); - case Method: - case Slot: - return connectToEvent(scxmlStateName, object, "1"+metaMethod.cppMethodSignature(), _type); - default: - break; - } - } - } - return connectToEvent(QtJambi_LibraryUtilities.internal.nativeId(this), scxmlStateName, slot, _type); - } - - /** - *

      See QScxmlStateMachine::connectToEvent(QString, Functor, Qt::ConnectionType)

      - */ - public io.qt.core.QMetaObject.Connection connectToEvent(String scxmlStateName, - io.qt.core.QMetaObject.Connectable0 signal, io.qt.core.Qt.ConnectionType... type){ - int _type = 0; - for (io.qt.core.Qt.ConnectionType t : type) { - _type |= t.value(); + public io.qt.core.QMetaObject.@NonNull Connection connectToEvent(@NonNull String scxmlStateName, + io.qt.core.QMetaObject.@StrictNonNull Connectable0 signal, io.qt.core.Qt.@NonNull ConnectionType @NonNull... type){ + io.qt.core.QObject object = null; + if(signal.containingObject() instanceof io.qt.core.QObject){ + object = (io.qt.core.QObject)signal.containingObject(); } io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromSignal(java.util.Objects.requireNonNull(signal)); if(metaMethod!=null && metaMethod.isValid() && metaMethod.parameterCount()==0) { - io.qt.core.QObject object = null; - if(signal.containingObject() instanceof io.qt.core.QObject){ - object = (io.qt.core.QObject)signal.containingObject(); - } if(object!=null) { switch(metaMethod.methodType()) { case Signal: - return connectToEvent(scxmlStateName, object, "2"+metaMethod.cppMethodSignature(), _type); + return connectToEvent(scxmlStateName, object, "2"+metaMethod.cppMethodSignature(), type); case Method: case Slot: - return connectToEvent(scxmlStateName, object, "1"+metaMethod.cppMethodSignature(), _type); + return connectToEvent(scxmlStateName, object, "1"+metaMethod.cppMethodSignature(), type); default: break; } } } if(signal instanceof io.qt.core.QMetaObject.Emitable0) - return connectToEvent(QtJambi_LibraryUtilities.internal.nativeId(this), scxmlStateName, (io.qt.core.QMetaObject.Slot0)((io.qt.core.QMetaObject.Emitable0)signal)::emit, _type); + return connectToEvent(scxmlStateName, object, (io.qt.core.QMetaObject.Slot0)((io.qt.core.QMetaObject.Emitable0)signal)::emit, type); else - return null; - } - - /** - *

      See QScxmlStateMachine::connectToEvent(QString, Functor, Qt::ConnectionType)

      - */ - public io.qt.core.QMetaObject.Connection connectToEvent(String scxmlStateName, - io.qt.core.QMetaObject.Slot1 slot, io.qt.core.Qt.ConnectionType... type){ - int _type = 0; - for (io.qt.core.Qt.ConnectionType t : type) { - _type |= t.value(); - } - io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot)); - if(metaMethod!=null && metaMethod.isValid()) { - if(metaMethod.parameterCount()!=1 || metaMethod.parameterType(0)!=io.qt.core.QMetaType.fromType(QScxmlEvent.class).id()) { - throw new IllegalArgumentException("Method does not take a single QScxmlEvent argument: "+metaMethod.cppMethodSignature()); - } - io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot); - if(object!=null) { - switch(metaMethod.methodType()) { - case Signal: - return connectToEvent(scxmlStateName, object, "2"+metaMethod.cppMethodSignature(), _type); - case Method: - case Slot: - return connectToEvent(scxmlStateName, object, "1"+metaMethod.cppMethodSignature(), _type); - default: - break; - } - } - } - return connectToEvent(QtJambi_LibraryUtilities.internal.nativeId(this), scxmlStateName, slot, _type); + return connectToEvent(scxmlStateName, object, (String)null, type); } /** *

      See QScxmlStateMachine::connectToEvent(QString, Functor, Qt::ConnectionType)

      */ @SuppressWarnings("unchecked") - public io.qt.core.QMetaObject.Connection connectToEvent(String scxmlStateName, - io.qt.core.QMetaObject.Connectable1 signal, io.qt.core.Qt.ConnectionType... type){ - int _type = 0; - for (io.qt.core.Qt.ConnectionType t : type) { - _type |= t.value(); + public io.qt.core.QMetaObject.@NonNull Connection connectToEvent(@NonNull String scxmlStateName, + io.qt.core.QMetaObject.@StrictNonNull Connectable1 signal, io.qt.core.Qt.@NonNull ConnectionType @NonNull... type){ + io.qt.core.QObject object = null; + if(signal.containingObject() instanceof io.qt.core.QObject){ + object = (io.qt.core.QObject)signal.containingObject(); } io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromSignal(java.util.Objects.requireNonNull(signal)); if(metaMethod!=null && metaMethod.isValid()) { if(metaMethod.parameterCount()!=1 || metaMethod.parameterType(0)!=io.qt.core.QMetaType.fromType(QScxmlEvent.class).id()) { throw new IllegalArgumentException("Method does not take a single QScxmlEvent argument: "+metaMethod.cppMethodSignature()); } - io.qt.core.QObject object = null; - if(signal.containingObject() instanceof io.qt.core.QObject){ - object = (io.qt.core.QObject)signal.containingObject(); - } if(object!=null) { switch(metaMethod.methodType()) { case Signal: - return connectToEvent(scxmlStateName, object, "2"+metaMethod.cppMethodSignature(), _type); + return connectToEvent(scxmlStateName, object, "2"+metaMethod.cppMethodSignature(), type); case Method: case Slot: - return connectToEvent(scxmlStateName, object, "1"+metaMethod.cppMethodSignature(), _type); + return connectToEvent(scxmlStateName, object, "1"+metaMethod.cppMethodSignature(), type); default: break; } } } if(signal instanceof io.qt.core.QMetaObject.Emitable1) - return connectToEvent(QtJambi_LibraryUtilities.internal.nativeId(this), scxmlStateName, (io.qt.core.QMetaObject.Slot1)((io.qt.core.QMetaObject.Emitable1)signal)::emit, _type); - else return null; + return connectToEvent(scxmlStateName, object, (io.qt.core.QMetaObject.Slot1)((io.qt.core.QMetaObject.Emitable1)signal)::emit, type); + else return connectToEvent(scxmlStateName, object, (String)null, type); } - - /** - *

      See QScxmlStateMachine::connectToEvent(QString, QObject, const char*, Qt::ConnectionType)

      - */ - public io.qt.core.QMetaObject.Connection connectToEvent(String scxmlStateName, - io.qt.core.QObject object, String member, io.qt.core.Qt.ConnectionType... type){ - int _type = 0; - for (io.qt.core.Qt.ConnectionType t : type) { - _type |= t.value(); - } - if(member!=null && !member.startsWith("1") && !member.startsWith("2")) { - io.qt.core.QMetaMethod method = object.metaObject().method(member); - if(method!=null && method.isValid()) { - if(method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal) - member = "2" + method.cppMethodSignature(); - else - member = "1" + method.cppMethodSignature(); - }else { - member = "1" + member; - } - } - return connectToEvent(scxmlStateName, object, member, _type); - } - - private native io.qt.core.QMetaObject.Connection connectToEvent(long nativeId, String scxmlStateName, io.qt.core.QMetaObject.AbstractSlot slot, int type); }// class diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiTest.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiTest.java index 4a944565..692cd513 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiTest.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiTest.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiWebEngineQuick.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiWebEngineQuick.java index 4ba08926..9c2273b4 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiWebEngineQuick.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiWebEngineQuick.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiWidgets.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiWidgets.java index 06a26e37..685705a1 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiWidgets.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiWidgets.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiWinExtras.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiWinExtras.java index 5debf939..952dc692 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiWinExtras.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiWinExtras.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiXml.java b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiXml.java index 6d091e6d..f9c90195 100644 --- a/src/cpp/QtJambiGenerator/typesystem/java/QtJambiXml.java +++ b/src/cpp/QtJambiGenerator/typesystem/java/QtJambiXml.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/modification.h b/src/cpp/QtJambiGenerator/typesystem/modification.h index 57587b6f..db3defc9 100644 --- a/src/cpp/QtJambiGenerator/typesystem/modification.h +++ b/src/cpp/QtJambiGenerator/typesystem/modification.h @@ -49,11 +49,18 @@ enum class AsArrayType{ NoOffset = 0x008, AddPlainDelegate = 0x010 }; +enum class AsSlotType{ + No = 0, + Yes = 0x001, + NoContext = 0x008, + AddPlainDelegate = 0x010 +}; enum class AsBufferType{ No = 0, Yes = 0x001, Deref = 0x002, }; +typedef QFlags AsSlotTypes; typedef QFlags AsArrayTypes; typedef QFlags AsBufferTypes; @@ -82,7 +89,8 @@ struct ArgumentModification { thread_affine(ThreadAffinity::None), index(std::numeric_limits::max()), useAsArrayType(AsArrayType::No), - arrayLengthParameter(-1), + useAsSlotType(AsSlotType::No), + utilArgParameter(-1), minArrayLength(-1), maxArrayLength(-1) {} @@ -97,7 +105,8 @@ struct ArgumentModification { thread_affine(ThreadAffinity::None), index(idx), useAsArrayType(AsArrayType::No), - arrayLengthParameter(-1), + useAsSlotType(AsSlotType::No), + utilArgParameter(-1), minArrayLength(-1), maxArrayLength(-1) {} @@ -142,7 +151,8 @@ struct ArgumentModification { AsArrayTypes useAsArrayType; AsBufferTypes useAsBufferType; - int arrayLengthParameter; + AsSlotTypes useAsSlotType; + int utilArgParameter; int minArrayLength; int maxArrayLength; QString arrayLengthExpression; @@ -189,7 +199,7 @@ struct Modification { }; Modification() : modifiers(0) { } - Modification(const Modification&) = default; + //Modification(const Modification&) = default; bool isAccessModifier() const { return modifiers & AccessModifierMask; } Modifiers accessModifier() const { return Modifiers(modifiers & AccessModifierMask); } @@ -244,7 +254,7 @@ struct Delegate{ struct AbstractFunctionModification: public Modification { AbstractFunctionModification() = default; - AbstractFunctionModification(const AbstractFunctionModification&) = default; + //AbstractFunctionModification(const AbstractFunctionModification&) = default; bool isCodeInjection() const { return modifiers & CodeInjection; } QString ppCondition; QString throws; @@ -265,7 +275,7 @@ struct Parameter{ struct TemplateInstantiation: public AbstractFunctionModification { TemplateInstantiation() = default; - TemplateInstantiation(const TemplateInstantiation&) = default; + //TemplateInstantiation(const TemplateInstantiation&) = default; QList arguments; }; @@ -273,7 +283,7 @@ typedef QList TemplateInstantiationList; struct FunctionModification: public AbstractFunctionModification { FunctionModification() : AbstractFunctionModification(), removal(TS::NoLanguage) { } - FunctionModification(const FunctionModification&) = default; + //FunctionModification(const FunctionModification&) = default; bool isRemoveModifier() const { return removal != TS::NoLanguage; } QString toString() const; TS::Language removal; diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DAnimation.qml b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DAnimation.qml index eace327b..c896ea8a 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DAnimation.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DAnimation.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DCore.qml b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DCore.qml index 22c4f16a..54e75944 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DCore.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DCore.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -1007,7 +1007,7 @@ TypeSystem{ SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: signature 'doClone()const' for function modification in '*' not found.*"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: signature '*' for function modification in 'Qt3DCore' not found.*"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Final class 'QAbstractSkeleton' set to non-final, as it is extended by other classes"} - SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'Qt3DCore::QAspectJob::postFrame', unmatched parameter type 'Qt3DCore::QAspectManager*'"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'Qt3DCore::QAspectJob::postFrame*', unmatched parameter type 'Qt3DCore::QAspectManager*'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: private virtual function 'sceneChangeEvent(*)' in 'QCameraLens'"} SuppressedWarning{text: "WARNING(JavaGenerator) :: No ==/!= operator found for value type Qt3DCore::QNodeIdTypePair."} } diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DExtras.qml b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DExtras.qml index 087e46cb..3fc662f7 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DExtras.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DExtras.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DInput.qml b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DInput.qml index 9692b480..7b574ea4 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DInput.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DInput.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DLogic.qml b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DLogic.qml index 857fcbb4..6ddbe5c3 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DLogic.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DLogic.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuick.qml b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuick.qml index 7643b310..78223c24 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuick.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuick.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuickExtras.qml b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuickExtras.qml index 775eb43d..720444d1 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuickExtras.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuickExtras.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuickRender.qml b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuickRender.qml index 1b726ba7..44eeb2b3 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuickRender.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuickRender.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuickScene2D.qml b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuickScene2D.qml index b39ecd64..3b7ac9c1 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuickScene2D.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DQuickScene2D.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DRender.qml b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DRender.qml index 0095f019..bb3c86ef 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DRender.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/Qt3DRender.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -240,10 +240,6 @@ TypeSystem{ ValueType{ name: "Qt3DRender::QLevelOfDetailBoundingSphere" - ModifyFunction{ - signature: "operator=(const Qt3DRender::QLevelOfDetailBoundingSphere &)" - remove: RemoveFlag.All - } } ObjectType{ @@ -2467,6 +2463,18 @@ TypeSystem{ ValueType{ name: "Qt3DRender::QTextureImageData" + + ExtraIncludes{ + Include{ + fileName: "QtJambi/JavaAPI" + location: Include.Global + } + Include{ + fileName: "QtJambi/JObjectWrapper" + location: Include.Global + } + } + InjectCode{ target: CodeClass.Native position: Position.Beginning @@ -2476,9 +2484,62 @@ TypeSystem{ FunctionalType{ name: "DataConverter" + generate: false using: "std::function" since: 6 } + + ModifyFunction{ + signature: "setData(const QByteArray &, std::function, bool)" + ModifyArgument{ + index: 2 + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "std::function %out;\n"+ + "if(%in){\n"+ + " JObjectWrapper wrapper(%env, %in);\n"+ + " %out = [wrapper](QByteArray rawData, int layer, int face, int mipmapLevel) -> QByteArray {\n"+ + " if(JniEnvironment env{200}){\n"+ + " jobject _rawData = qtjambi_cast(env, rawData);\n"+ + " jobject result = Java::Qt3DRender::QTextureImageData$DataConverter::apply(env, wrapper.object(), _rawData, layer, face, mipmapLevel);\n"+ + " return qtjambi_cast(env, result);\n"+ + " }\n"+ + " return {};\n"+ + " };\n"+ + "}"} + } + } + since: 6 + } + InjectCode{ + target: CodeClass.Java + Text{content: String.raw` +/** + *

      Java wrapper for Qt callable std::function<QByteArray(QByteArray,int,int,int)>

      + */ +@FunctionalInterface +public interface DataConverter{ + public io.qt.core.@NonNull QByteArray apply(io.qt.core.@NonNull QByteArray rawData, int layer, int face, int mipmapLevel); +} + `} + since: 6 + } + InjectCode{ + target: CodeClass.Native + position: Position.Beginning + Text{content: String.raw` +namespace Java{ +namespace Qt3DRender{ +QTJAMBI_REPOSITORY_DECLARE_CLASS(QTextureImageData$DataConverter, + QTJAMBI_REPOSITORY_DECLARE_OBJECT_METHOD(apply)) +QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/qt3d/render,QTextureImageData$DataConverter, + QTJAMBI_REPOSITORY_DEFINE_METHOD(apply,(Lio/qt/core/QByteArray;III)Lio/qt/core/QByteArray;) + ) +} +} + `} + since: 6 + } since: [5, 7] } diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtActiveX.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtActiveX.qml index e772a85a..dfbddbec 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtActiveX.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtActiveX.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtBluetooth.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtBluetooth.qml index f0f58ff7..b6aa3399 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtBluetooth.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtBluetooth.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtBodymovin.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtBodymovin.qml index c93b440e..a5afe5e7 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtBodymovin.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtBodymovin.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtCharts.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtCharts.qml index ce15c5f3..2eb2f0ef 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtCharts.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtCharts.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -164,6 +164,12 @@ TypeSystem{ ObjectType{ name: "QtCharts::QAreaSeries" + ExtraIncludes{ + Include{ + fileName: "QtJambi/JavaAPI" + location: Include.Global + } + } ModifyFunction{ signature: "QAreaSeries(QtCharts::QLineSeries *, QtCharts::QLineSeries *)" ModifyArgument{ diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtConcurrent.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtConcurrent.qml index d92a1812..783ba216 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtConcurrent.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtConcurrent.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtCore.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtCore.qml index 2f0ae15f..bbf11f11 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtCore.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtCore.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -718,6 +718,18 @@ public final %ITERATOR_TYPE iterator() { className: "QSequentialConstIterator" } + Rejection{ + className: "QAtomicScopedValueRollback" + } + + Rejection{ + className: "QStaticLatin1StringMatcher" + } + + Rejection{ + className: "QSpan" + } + Rejection{ className: "QIntegerForSize" } @@ -2685,6 +2697,7 @@ public final %ITERATOR_TYPE iterator() { Rejection{functionName: "uppercasebase"} Rejection{functionName: "uppercasedigits"} Rejection{functionName: "ws"} + Rejection{functionName: "compareThreeWay"} Rejection{fieldName: "Disambiguated"} EnumType{ @@ -3184,6 +3197,187 @@ public final %ITERATOR_TYPE iterator() { quoteBeforeLine: "}// class" } } + + ObjectType{ + name: "partial_ordering" + targetType: "final class" + generate: "no-shell" + /*ModifyFunction{ + signature: "partial_ordering()" + remove: RemoveFlag.All + }*/ + ModifyFunction{ + signature: "partial_ordering(Qt::partial_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator==(Qt::partial_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator!=(Qt::partial_ordering)" + remove: RemoveFlag.All + } + ModifyField{ + name: "less" + read: false + write: false + } + ModifyField{ + name: "equivalent" + read: false + write: false + } + ModifyField{ + name: "greater" + read: false + write: false + } + ModifyField{ + name: "unordered" + read: false + write: false + } + InjectCode{ + ImportFile{ + name: ":/io/qtjambi/generator/typesystem/QtJambiCore.java" + quoteAfterLine: "class partial_ordering___" + quoteBeforeLine: "}// class" + } + } + since: 6.7 + } + + ObjectType{ + name: "strong_ordering" + targetType: "final class" + generate: "no-shell" + /*ModifyFunction{ + signature: "strong_ordering()" + remove: RemoveFlag.All + }*/ + ModifyFunction{ + signature: "strong_ordering(Qt::strong_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator==(Qt::strong_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator!=(Qt::strong_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator==(Qt::partial_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator!=(Qt::partial_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator==(Qt::weak_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator!=(Qt::weak_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator weak_ordering()const" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator partial_ordering()const" + remove: RemoveFlag.All + } + ModifyField{ + name: "less" + read: false + write: false + } + ModifyField{ + name: "equivalent" + read: false + write: false + } + ModifyField{ + name: "greater" + read: false + write: false + } + ModifyField{ + name: "equal" + read: false + write: false + } + InjectCode{ + ImportFile{ + name: ":/io/qtjambi/generator/typesystem/QtJambiCore.java" + quoteAfterLine: "class strong_ordering___" + quoteBeforeLine: "}// class" + } + } + since: 6.7 + } + + ObjectType{ + name: "weak_ordering" + targetType: "final class" + generate: "no-shell" + /*ModifyFunction{ + signature: "weak_ordering()" + remove: RemoveFlag.All + }*/ + ModifyFunction{ + signature: "weak_ordering(Qt::weak_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator==(Qt::weak_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator!=(Qt::weak_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator==(Qt::partial_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator!=(Qt::partial_ordering)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "operator partial_ordering()const" + remove: RemoveFlag.All + } + ModifyField{ + name: "less" + read: false + write: false + } + ModifyField{ + name: "equivalent" + read: false + write: false + } + ModifyField{ + name: "greater" + read: false + write: false + } + InjectCode{ + ImportFile{ + name: ":/io/qtjambi/generator/typesystem/QtJambiCore.java" + quoteAfterLine: "class weak_ordering___" + quoteBeforeLine: "}// class" + } + } + since: 6.7 + } }// namespace Qt NamespaceType{ @@ -3498,7 +3692,19 @@ public final %ITERATOR_TYPE iterator() { } ModifyFunction{ signature: "QByteArrayMatcher(const char*,int)" - remove: RemoveFlag.All + ModifyArgument{ + index: 1 + NoNullPointer{ + } + AsBuffer{ + lengthParameter: 2 + AsArray{} + } + ReferenceCount{ + variableName: "__rcData" + action: ReferenceCount.Set + } + } until: 5 } ModifyFunction{ @@ -3540,12 +3746,27 @@ public final %ITERATOR_TYPE iterator() { ModifyArgument{ index: 1 noImplicitCalls: true - ReferenceCount{ - variableName: "__rcData" - action: ReferenceCount.Set - } } - since: 6 + } + ModifyFunction{ + signature: "QByteArrayMatcher(QByteArrayMatcher)" + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{index: 1; metaName: "%1"} + Text{content: "__rcData = %1.__rcData;"} + } + InjectCode{ + target: CodeClass.Native + position: Position.Position5 + ArgumentMap{index: 1; metaName: "%1"} + Text{content: "Java::QtJambi::ReferenceUtility::copyReferenceCount(__jni_env, __jni_object, nullptr, __jni_env->NewStringUTF(\"__rcData\"), %1);"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Clone + Text{content: "clone.__rcData = __rcData;"} } ModifyFunction{ signature: "indexIn(const char*,int,int)const" @@ -3590,6 +3811,17 @@ public final %ITERATOR_TYPE iterator() { signature: "toString(QStringView,QCalendar)const" remove: RemoveFlag.All since: [5, 14] + until: 6.6 + } + ModifyFunction{ + signature: "toString(QString)const" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "toString(QString,QCalendar)const" + remove: RemoveFlag.All + since: 6.7 } ModifyFunction{ signature: "fromString(QString,Qt::DateFormat)" @@ -3606,6 +3838,45 @@ public final %ITERATOR_TYPE iterator() { remove: RemoveFlag.All since: 6 } + ModifyFunction{ + signature: "fromString(QString,QStringView,int)" + ModifyArgument{ + index: 3 + ReplaceDefaultExpression{ + expression: "QLocale.DefaultTwoDigitBaseYear" + } + } + since: 6.7 + } + ModifyFunction{ + signature: "fromString(QString,QStringView,int,QCalendar)" + since: 6.7 + } + ModifyFunction{ + signature: "fromString(QStringView,QStringView,int)" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "fromString(QStringView,QStringView,int,QCalendar)" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "fromString(const QString &, QStringView, QCalendar)" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "fromString(QString,QString,int,QCalendar)" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "fromString(QString,QString,int)" + remove: RemoveFlag.All + since: 6.7 + } ExtraIncludes{ Include{ fileName: "utils_p.h" @@ -3653,6 +3924,20 @@ public final %ITERATOR_TYPE iterator() { remove: RemoveFlag.All since: [5, 9] } + /*ModifyFunction{ + signature: "compareThreeWay(QDate,QDate)" + ModifyArgument{ + index: 0 + ReplaceType{ + modifiedType: "int" + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "%out = jint(QtPrivate::CompareUnderlyingType(%in));"} + } + } + since: 6.7 + }*/ } ValueType{ @@ -3661,6 +3946,13 @@ public final %ITERATOR_TYPE iterator() { name: "YearRange" since: [5, 14] } + EnumType{ + name: "TransitionResolution" + RejectEnumValue{ + name: "LegacyBehavior" + } + since: 6.7 + } Rejection{ className: "Data" @@ -3679,6 +3971,17 @@ public final %ITERATOR_TYPE iterator() { signature: "toString(QStringView,QCalendar) const" remove: RemoveFlag.All since: [5, 15] + until: 6.6 + } + ModifyFunction{ + signature: "toString(QString)const" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "toString(QString,QCalendar)const" + remove: RemoveFlag.All + since: 6.7 } ModifyFunction{ signature: "fromString(const QString &, Qt::DateFormat)" @@ -3696,23 +3999,62 @@ public final %ITERATOR_TYPE iterator() { since: 6 } ModifyFunction{ - signature: "operator+=(std::chrono::milliseconds)" + signature: "fromString(const QString &, QStringView, QCalendar)" remove: RemoveFlag.All - since: 6 + since: 6.7 } ModifyFunction{ - signature: "operator-=(std::chrono::milliseconds)" + signature: "fromString(const QString &, const QString &, int, QCalendar)" remove: RemoveFlag.All - since: 6 + since: 6.7 } - } - - ValueType{ - name: "QDir" - EnumType{ - name: "Filter" + ModifyFunction{ + signature: "fromString(QStringView, QStringView, int, QCalendar)" + remove: RemoveFlag.All + since: 6.7 } - EnumType{ + ModifyFunction{ + signature: "fromString(const QString &, const QString &, int)" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "fromString(QStringView, QStringView, int)" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "fromString(QString,QStringView,int,QCalendar)" + since: 6.7 + } + ModifyFunction{ + signature: "fromString(QString,QStringView,int)" + ModifyArgument{ + index: 3 + ReplaceDefaultExpression{ + expression: "QLocale.DefaultTwoDigitBaseYear" + } + } + since: 6.7 + } + ModifyFunction{ + signature: "operator+=(std::chrono::milliseconds)" + remove: RemoveFlag.All + since: 6 + } + ModifyFunction{ + signature: "operator-=(std::chrono::milliseconds)" + remove: RemoveFlag.All + since: 6 + } + } + + ValueType{ + name: "QDir" + EnumType{ + name: "Filter" + } + EnumType{ name: "SortFlag" RejectEnumValue{ name: "Unsorted" @@ -4047,6 +4389,12 @@ public final %ITERATOR_TYPE iterator() { signature: "toString(QStringView) const" remove: RemoveFlag.All since: [5, 10] + until: 6.6 + } + ModifyFunction{ + signature: "toString(QString) const" + remove: RemoveFlag.All + since: 6.7 } ModifyFunction{ signature: "fromString(QStringView,QStringView)" @@ -4063,6 +4411,20 @@ public final %ITERATOR_TYPE iterator() { remove: RemoveFlag.All since: 6 } + /*ModifyFunction{ + signature: "compareThreeWay(QTime,QTime)" + ModifyArgument{ + index: 0 + ReplaceType{ + modifiedType: "int" + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "%out = jint(QtPrivate::CompareUnderlyingType(%in));"} + } + } + since: 6.7 + }*/ } ValueType{ @@ -5171,9 +5533,30 @@ public static Id128Bytes of(long... data) throws IllegalArgumentException{ signature: "operator|(QBitArray,QBitArray)" rename: "or" } + ModifyFunction{ + signature: "operator&(QBitArray&&)" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "operator|(QBitArray&&)" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "operator^(QBitArray&&)" + remove: RemoveFlag.All + since: 6.7 + } ModifyFunction{ signature: "operator~()const" rename: "inverted" + until: 6.6 + } + ModifyFunction{ + signature: "operator~(QBitArray)" + rename: "inverted" + since: 6.7 } ModifyFunction{ signature: "bits()const" @@ -5766,7 +6149,12 @@ public static Id128Bytes of(long... data) throws IllegalArgumentException{ ObjectType{ name: "StringResult" + targetType: "final class" isGeneric: true + ModifyFunction{ + signature: "StringResult(QCborStreamReader::StringResult)" + remove: RemoveFlag.All + } since: [5, 12] } @@ -7379,6 +7767,12 @@ if(destinationChildV<0) TypeAliasType{ name: "pointer" } + TypeAliasType{ + name: "const_pointer" + } + TypeAliasType{ + name: "value_type" + } ImplicitCast{from: "io.qt.core.@NonNull QByteArray"} ImplicitCast{from: "java.nio.@NonNull ByteBuffer"} ImplicitCast{from: "byte @NonNull[]"} @@ -7386,6 +7780,30 @@ if(destinationChildV<0) signature: "QByteArrayView(std::nullptr_t)" remove: RemoveFlag.All } + ModifyFunction{ + signature: "QByteArrayView(const Byte*,qsizetype)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "QByteArrayView(const Byte*,const Byte*)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "QByteArrayView(Pointer)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "QByteArrayView(ByteArray)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "QByteArrayView(Container)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "fromArray(Byte)" + remove: RemoveFlag.All + } ModifyFunction{ signature: "compare(QByteArrayView,Qt::CaseSensitivity)const" ModifyArgument{ @@ -7674,6 +8092,13 @@ if(destinationChildV<0) ImplicitCast{from: "byte @NonNull[]"} + ExtraIncludes{ + Include{ + fileName: "QtJambi/JObjectWrapper" + location: Include.Global + } + } + EnumType{ name: "Base64Option" RejectEnumValue{ @@ -8267,6 +8692,7 @@ if(destinationChildV<0) } FunctionalType{ name: "Predicate" + generate: false using: "std::function" } ModifyFunction{ @@ -8274,6 +8700,15 @@ if(destinationChildV<0) Instantiation{ Argument{ type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 1 + NoNullPointer{} + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = std::bind(Java::QtCore::QByteArray$Predicate::test, %env, %in, std::placeholders::_1);"} + } } } } @@ -8998,6 +9433,10 @@ if(destinationChildV<0) quoteBeforeLine: "}// class" } } + ModifyFunction{ + signature: "QItemSelection(QItemSelection)" + remove: RemoveFlag.All + } ModifyFunction{ signature: "split(QItemSelectionRange,QItemSelectionRange,QItemSelection*)" ModifyArgument{ @@ -10301,22 +10740,6 @@ if(destinationChildV<0) ReplaceType{ modifiedType: "int" } - /* - ConversionRule{ - codeClass: CodeClass.Shell - Text{content: "qint64 %out = qint64(%in);\n"+ - "while(%2 > std::numeric_limits::max() && %in == std::numeric_limits::max()){\n"+ - " %2 -= std::numeric_limits::max();\n"+ - " %1 = &%1[std::numeric_limits::max()];\n"+ - " CharPointerArray %1_buffer2(%env, %1, jsize(qMin(qint64(std::numeric_limits::max()), %2)));\n"+ - " %in = %env->CallIntMethod(__java_this, method_id, %1_buffer2.array());\n"+ - " %out += %in;\n"+ - "}"} - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "%out = jint(%in);"} - }*/ } ModifyArgument{ index: 1 @@ -10333,23 +10756,6 @@ if(destinationChildV<0) ReplaceType{ modifiedType: "int" } - /* - ConversionRule{ - codeClass: CodeClass.Shell - Text{content: "qint64 %out = qint64(%in);\n"+ - "while(%2 > std::numeric_limits::max() && %in == std::numeric_limits::max()){\n"+ - " %2 -= std::numeric_limits::max();\n"+ - " %1 = &%1[std::numeric_limits::max()];\n"+ - " CharPointerArray %1_buffer2(%env, %1, jsize(qMin(qint64(std::numeric_limits::max()), %2)));\n"+ - " %in = %env->CallIntMethod(__java_this, method_id, %1_buffer2.array());\n"+ - " %out += %in;\n"+ - "}"} - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "%out = jint(%in);"} - } - */ } ModifyArgument{ index: 1 @@ -10366,23 +10772,6 @@ if(destinationChildV<0) ReplaceType{ modifiedType: "int" } - /* - ConversionRule{ - codeClass: CodeClass.Shell - Text{content: "qint64 %out = qint64(%in);\n"+ - "while(%2 > std::numeric_limits::max() && %in == std::numeric_limits::max()){\n"+ - " %2 -= std::numeric_limits::max();\n"+ - " %1 = &%1[std::numeric_limits::max()];\n"+ - " CharPointerArray %1_buffer2(%env, %1, jsize(qMin(qint64(std::numeric_limits::max()), %2)));\n"+ - " %in = %env->CallIntMethod(__java_this, method_id, %1_buffer2.array());\n"+ - " %out += %in;\n"+ - "}"} - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "%out = jint(%in);"} - } - */ } ModifyArgument{ index: 1 @@ -10399,24 +10788,6 @@ if(destinationChildV<0) ReplaceType{ modifiedType: "int" } - /* - ConversionRule{ - codeClass: CodeClass.Shell - Text{content: "qint64 %out = qint64(%in);\n"+ - "while(%2 > std::numeric_limits::max() && %in == std::numeric_limits::max()){\n"+ - " %2 -= std::numeric_limits::max();\n"+ - " %1 = &%1[std::numeric_limits::max()];\n"+ - " j%2 = jsize(qMin(qint64(std::numeric_limits::max()), %2));\n"+ - " ConstCharPointerArray __%1(%env, %1, j%2);\n"+ - " %in = %env->CallIntMethod(__java_this, method_id, __%1.array());\n"+ - " %out += %in;\n"+ - "}"} - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "%out = jint(%in);"} - } - */ } ModifyArgument{ index: 1 @@ -10433,23 +10804,6 @@ if(destinationChildV<0) ReplaceType{ modifiedType: "int" } - /* - ConversionRule{ - codeClass: CodeClass.Shell - Text{content: "qint64 %out = qint64(%in);\n"+ - "while(%2 > std::numeric_limits::max() && %in == std::numeric_limits::max()){\n"+ - " %2 -= std::numeric_limits::max();\n"+ - " %1 = &%1[std::numeric_limits::max()];\n"+ - " CharPointerArray %1_buffer2(%env, %1, jsize(qMin(qint64(std::numeric_limits::max()), %2)));\n"+ - " %in = %env->CallIntMethod(__java_this, method_id, %1_buffer2.array());\n"+ - " %out += %in;\n"+ - "}"} - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "jint %out = jint(%in);"} - } - */ } ModifyArgument{ index: 1 @@ -10465,24 +10819,6 @@ if(destinationChildV<0) ReplaceType{ modifiedType: "int" } - /* - ConversionRule{ - codeClass: CodeClass.Shell - Text{content: "qint64 %out = qint64(%in);\n"+ - "while(%2 > std::numeric_limits::max() && %in == std::numeric_limits::max()){\n"+ - " %2 -= std::numeric_limits::max();\n"+ - " %1 = &%1[std::numeric_limits::max()];\n"+ - " jsize j%2 = jsize(qMin(qint64(std::numeric_limits::max()), %2));\n"+ - " ConstCharPointerArray __%1(%env, %1, j%2);\n"+ - " %in = %env->CallIntMethod(__java_this, method_id, __%1.array());\n"+ - " %out += %in;\n"+ - "}"} - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "jint %out = jint(%in);"} - } - */ } ModifyArgument{ index: 1 @@ -10498,23 +10834,6 @@ if(destinationChildV<0) ReplaceType{ modifiedType: "int" } - /* - ConversionRule{ - codeClass: CodeClass.Shell - Text{content: "qint64 %out = qint64(%in);\n"+ - "while(%2 > std::numeric_limits::max() && %in == std::numeric_limits::max()){\n"+ - " %2 -= std::numeric_limits::max();\n"+ - " %1 = &%1[std::numeric_limits::max()];\n"+ - " CharPointerArray %1_buffer2(%env, %1, jsize(qMin(qint64(std::numeric_limits::max()), %2)));\n"+ - " %in = %env->CallIntMethod(__java_this, method_id, %1_buffer2.array());\n"+ - " %out += %in;\n"+ - "}"} - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "jint %out = jint(%in);"} - } - */ } ModifyArgument{ index: 1 @@ -10920,6 +11239,13 @@ if(destinationChildV<0) name: "ConversionFlag" until: [5, 16] } + ObjectType{ + name: "ConverterState" + Include{ + fileName: "QTextCodec" + location: Include.Global + } + } ModifyFunction{ signature: "setCodecForLocale(QTextCodec*)" ModifyArgument{ @@ -11173,17 +11499,14 @@ if(destinationChildV<0) } } - ObjectType{ - name: "QTextCodec::ConverterState" - Include{ - fileName: "QTextCodec" - location: Include.Global - } - until: 5 - } - ObjectType{ name: "QBuffer" + ExtraIncludes{ + Include{ + fileName: "QtJambi/JavaAPI" + location: Include.Global + } + } ModifyFunction{ signature: "buffer()" Remove{ @@ -11240,42 +11563,518 @@ if(destinationChildV<0) ObjectType{ name: "QTimer" - Rejection{functionName: "singleShot"} - Rejection{functionName: "singleShot"} + ExtraIncludes{ + Include{ + fileName: "QtJambi/JavaAPI" + location: Include.Global + } + Include{ + fileName: "QtJambi/JObjectWrapper" + location: Include.Global + } + } + ModifyFunction{ signature: "callOnTimeout(Args&&)" remove: RemoveFlag.All } - InjectCode{ - target: CodeClass.Java - ImportFile{ - name: ":/io/qtjambi/generator/typesystem/QtJambiCore.java" - quoteAfterLine: "class QTimer___" - quoteBeforeLine: "}// class" + ModifyFunction{ + signature: "singleShot(int, const QObject*, const char*)" + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 3 + metaName: "slot" + } + ArgumentMap{ + index: 2 + metaName: "dest" + } + Text{content: "if(slot!=null && !slot.startsWith(\"1\") && !slot.startsWith(\"2\")) {\n"+ + " io.qt.core.QMetaMethod method = dest.metaObject().method(slot);\n"+ + " if(method!=null && method.isValid()) {\n"+ + " if(method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal)\n"+ + " slot = \"2\" + method.cppMethodSignature();\n"+ + " else\n"+ + " slot = \"1\" + method.cppMethodSignature();\n"+ + " }\n"+ + "}"} } } - InjectCode{ - target: CodeClass.Java - ImportFile{ - name: ":/io/qtjambi/generator/typesystem/QtJambiCore.java" - quoteAfterLine: "class QTimer_6__" - quoteBeforeLine: "}// class" + ModifyFunction{ + signature: "singleShot(int, Qt::TimerType, const QObject*, const char*)" + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 4 + metaName: "slot" + } + ArgumentMap{ + index: 3 + metaName: "dest" + } + Text{content: "if(slot!=null && !slot.startsWith(\"1\") && !slot.startsWith(\"2\")) {\n"+ + " io.qt.core.QMetaMethod method = dest.metaObject().method(slot);\n"+ + " if(method!=null && method.isValid()) {\n"+ + " if(method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal)\n"+ + " slot = \"2\" + method.cppMethodSignature();\n"+ + " else\n"+ + " slot = \"1\" + method.cppMethodSignature();\n"+ + " }\n"+ + "}"} } - since: 6 } - } - - ObjectType{ - name: "QProcess" - ppCondition: "QT_CONFIG(process)" - Rejection{ - className: "CreateProcessArguments" + ModifyFunction{ + signature: "singleShot(std::chrono::milliseconds, const QObject*, const char*)" + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 3 + metaName: "slot" + } + ArgumentMap{ + index: 2 + metaName: "dest" + } + Text{content: "if(slot!=null && !slot.startsWith(\"1\") && !slot.startsWith(\"2\")) {\n"+ + " io.qt.core.QMetaMethod method = dest.metaObject().method(slot);\n"+ + " if(method!=null && method.isValid()) {\n"+ + " if(method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal)\n"+ + " slot = \"2\" + method.cppMethodSignature();\n"+ + " else\n"+ + " slot = \"1\" + method.cppMethodSignature();\n"+ + " }\n"+ + "}"} + } + ppCondition: "__has_include()" } - Rejection{ - functionName: "setupChildProcess" - since: 6 + ModifyFunction{ + signature: "singleShot(std::chrono::milliseconds, Qt::TimerType, const QObject*, const char*)" + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 4 + metaName: "slot" + } + ArgumentMap{ + index: 3 + metaName: "dest" + } + Text{content: "if(slot!=null && !slot.startsWith(\"1\") && !slot.startsWith(\"2\")) {\n"+ + " io.qt.core.QMetaMethod method = dest.metaObject().method(slot);\n"+ + " if(method!=null && method.isValid()) {\n"+ + " if(method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal)\n"+ + " slot = \"2\" + method.cppMethodSignature();\n"+ + " else\n"+ + " slot = \"1\" + method.cppMethodSignature();\n"+ + " }\n"+ + "}"} + } + ppCondition: "__has_include()" } - Rejection{ + + FunctionalType{ + name: "Slot" + using: "std::function" + generate: false + } + + ModifyFunction{ + signature: "singleShot(Duration,const QtPrivate::ContextTypeForFunctor::ContextType*,Functor&&)" + Instantiation{ + Argument{ + type: "int" + isImplicit: true + } + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot0" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertSlot(%env, %in);"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 1 + metaName: "dur" + } + ArgumentMap{ + index: 2 + metaName: "context" + } + ArgumentMap{ + index: 3 + metaName: "slot" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " singleShot(dur, context, \"2\"+metaMethod.cppMethodSignature());\n"+ + " return;\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " singleShot(dur, context, \"1\"+metaMethod.cppMethodSignature());\n"+ + " return;\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"} + } + } + Instantiation{ + Argument{ + type: "std::chrono::milliseconds" + isImplicit: true + } + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot0" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertSlot(%env, %in);"} + } + } + ppCondition: "__has_include()" + } + since: 6.6 + } + + ModifyFunction{ + signature: "singleShot(Duration,Qt::TimerType,const QtPrivate::ContextTypeForFunctor::ContextType*,Functor&&)" + Instantiation{ + Argument{ + type: "int" + isImplicit: true + } + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot0" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertSlot(%env, %in);"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 1 + metaName: "dur" + } + ArgumentMap{ + index: 2 + metaName: "tt" + } + ArgumentMap{ + index: 3 + metaName: "context" + } + ArgumentMap{ + index: 4 + metaName: "slot" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " singleShot(dur, tt, context, \"2\"+metaMethod.cppMethodSignature());\n"+ + " return;\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " singleShot(dur, tt, context, \"1\"+metaMethod.cppMethodSignature());\n"+ + " return;\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"} + } + } + Instantiation{ + Argument{ + type: "std::chrono::milliseconds" + isImplicit: true + } + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot0" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertSlot(%env, %in);"} + } + } + ppCondition: "__has_include()" + } + since: 6.6 + } + ModifyFunction{ + signature: "singleShot(Duration,Functor&&)" + remove: RemoveFlag.All + since: 6.6 + } + ModifyFunction{ + signature: "singleShot(Duration,Qt::TimerType,Functor&&)" + remove: RemoveFlag.All + since: 6.6 + } + + ModifyFunction{ + signature: "singleShot(Duration,const QObject*,Func1)" + ModifyArgument{ + index: 0 + replaceType: "void" + } + Instantiation{ + Argument{ + type: "int" + isImplicit: true + } + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot0" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertSlot(%env, %in);"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 1 + metaName: "dur" + } + ArgumentMap{ + index: 2 + metaName: "context" + } + ArgumentMap{ + index: 3 + metaName: "slot" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " singleShot(dur, context, \"2\"+metaMethod.cppMethodSignature());\n"+ + " return;\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " singleShot(dur, context, \"1\"+metaMethod.cppMethodSignature());\n"+ + " return;\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"} + } + } + Instantiation{ + Argument{ + type: "std::chrono::milliseconds" + isImplicit: true + } + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot0" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertSlot(%env, %in);"} + } + } + ppCondition: "__has_include()" + } + until: 6.5 + } + + ModifyFunction{ + signature: "singleShot(Duration,Qt::TimerType,const QObject*,Func1)" + ModifyArgument{ + index: 0 + replaceType: "void" + } + Instantiation{ + Argument{ + type: "int" + isImplicit: true + } + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot0" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertSlot(%env, %in);"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 1 + metaName: "dur" + } + ArgumentMap{ + index: 2 + metaName: "tt" + } + ArgumentMap{ + index: 3 + metaName: "context" + } + ArgumentMap{ + index: 4 + metaName: "slot" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " singleShot(dur, tt, context, \"2\"+metaMethod.cppMethodSignature());\n"+ + " return;\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " singleShot(dur, tt, context, \"1\"+metaMethod.cppMethodSignature());\n"+ + " return;\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"} + } + } + Instantiation{ + Argument{ + type: "std::chrono::milliseconds" + isImplicit: true + } + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot0" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertSlot(%env, %in);"} + } + } + ppCondition: "__has_include()" + } + until: 6.5 + } + + InjectCode{ + target: CodeClass.Native + position: Position.Beginning + Text{content: "auto convertSlot(JNIEnv* _env, jobject _slot){\n"+ + " JObjectWrapper slot(_env, _slot);\n"+ + " return [slot](){\n"+ + " if(JniEnvironment env{200}){\n"+ + " Java::QtCore::QMetaObject$Slot0::invoke(env, slot.object());\n"+ + " }\n"+ + " };\n"+ + "}"} + } + + InjectCode{ + target: CodeClass.Java + ImportFile{ + name: ":/io/qtjambi/generator/typesystem/QtJambiCore.java" + quoteAfterLine: "class QTimer___" + quoteBeforeLine: "}// class" + } + } + } + + ObjectType{ + name: "QProcess" + ppCondition: "QT_CONFIG(process)" + Rejection{ + className: "CreateProcessArguments" + } + Rejection{ + functionName: "setupChildProcess" + since: 6 + } + Rejection{ functionName: "pid" } Rejection{ @@ -12138,6 +12937,26 @@ if(destinationChildV<0) " return;\n"+ "}"} } + until: 6.6 + } + ModifyFunction{ + signature: "moveToThread(QThread*)" + threadAffinity: false + since: 7 + } + ModifyFunction{ + signature: "moveToThread(QThread*,Qt::Disambiguated_t)" + threadAffinity: false + ModifyArgument{ + index: 2 + RemoveArgument{} + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "constexpr Qt::Disambiguated_t %out = Qt::Disambiguated;"} + } + } + since: 6.7 + until: 7 } ModifyFunction{ signature: "receivers(const char*)const" @@ -12248,6 +13067,7 @@ if(destinationChildV<0) } } } + until: 6.6 } ModifyFunction{ signature: "findChildren(QString, Qt::FindChildOptions) const" @@ -12285,6 +13105,84 @@ if(destinationChildV<0) } } } + until: 6.6 + } + ModifyFunction{ + signature: "findChild(QAnyStringView, Qt::FindChildOptions) const" + Instantiation{ + proxyCall: "qtjambi_findChild" + Argument{ + type: "QTimer*" + } + ModifyArgument{ + index: 0 + ReplaceType{ + modifiedType: "T" + modifiedJniType: "jobject" + } + } + AddTypeParameter{ + name: "T" + extending: "io.qt.core.@Nullable QObject" + } + AddArgument{ + index: 1 + defaultExpression: "io.qt.core.QObject.class" + name: "type" + type: "java.lang.Class" + } + } + Instantiation{ + proxyCall: "qtjambi_findChild" + Argument{ + type: "QObject*" + } + ModifyArgument{ + index: 0 + ReplaceType{ + modifiedType: "io.qt.core.@Nullable QObject" + } + } + } + since: 6.7 + } + ModifyFunction{ + signature: "findChildren(QAnyStringView, Qt::FindChildOptions) const" + Instantiation{ + proxyCall: "qtjambi_findChildren" + Argument{ + type: "QTimer*" + } + ModifyArgument{ + index: 0 + ReplaceType{ + modifiedType: "io.qt.core.@NonNull QList" + } + } + AddTypeParameter{ + name: "T" + extending: "io.qt.core.@Nullable QObject" + } + AddArgument{ + index: 1 + defaultExpression: "io.qt.core.QObject.class" + name: "type" + type: "java.lang.Class" + } + } + Instantiation{ + proxyCall: "qtjambi_findChildren" + Argument{ + type: "QObject*" + } + ModifyArgument{ + index: 0 + ReplaceType{ + modifiedType: "io.qt.core.@NonNull QList" + } + } + } + since: 6.7 } ModifyFunction{ signature: "findChildren(QRegularExpression, Qt::FindChildOptions) const" @@ -12395,6 +13293,43 @@ if(destinationChildV<0) } until: [5, 15] } + ModifyFunction{ + signature: "findChild(Qt::FindChildOptions) const" + Instantiation{ + proxyCall: "qtjambi_findChild" + Argument{ + type: "QTimer*" + } + ModifyArgument{ + index: 0 + ReplaceType{ + modifiedType: "io.qt.core.@NonNull QList" + } + } + AddTypeParameter{ + name: "T" + extending: "io.qt.core.@Nullable QObject" + } + AddArgument{ + index: 1 + name: "type" + type: "java.lang.Class" + } + } + Instantiation{ + proxyCall: "qtjambi_findChild" + Argument{ + type: "QObject*" + } + ModifyArgument{ + index: 0 + ReplaceType{ + modifiedType: "io.qt.core.@NonNull QList" + } + } + } + since: 6.7 + } } ObjectType{ @@ -13237,10 +14172,6 @@ if(destinationChildV<0) name: "Qt_6_5" since: [6, 5] } - RejectEnumValue{ - name: "Qt_6_7" - since: [6, 7] - } RejectEnumValue{ name: "Qt_DefaultCompiledVersion" } @@ -13331,9 +14262,20 @@ if(destinationChildV<0) signature: "readBytes(char&*,uint&)" remove: RemoveFlag.All } + ModifyFunction{ + signature: "readBytes(char&*,qint64&)" + remove: RemoveFlag.All + since: 6.7 + } ModifyFunction{ signature: "writeBytes(const char*,uint)" remove: RemoveFlag.All + until: 6.6 + } + ModifyFunction{ + signature: "writeBytes(const char*,qint64)" + remove: RemoveFlag.All + since: 6.7 } Import{ template: "Stream" @@ -13630,6 +14572,7 @@ if(destinationChildV<0) AsArray{} } } + until: 6.6 } ModifyFunction{ signature: "writeRawData(const char*,int)" @@ -13644,6 +14587,37 @@ if(destinationChildV<0) AsArray{} } } + until: 6.6 + } + ModifyFunction{ + signature: "readRawData(char*,qint64)" + Delegate{ + name: "readBytes" + deprecated: true + } + ModifyArgument{ + index: 1 + AsBuffer{ + lengthParameter: 2 + AsArray{} + } + } + since: 6.7 + } + ModifyFunction{ + signature: "writeRawData(const char*,qint64)" + Delegate{ + name: "writeBytes" + deprecated: true + } + ModifyArgument{ + index: 1 + AsBuffer{ + lengthParameter: 2 + AsArray{} + } + } + since: 6.7 } InjectCode{ ImportFile{ @@ -14177,18 +15151,38 @@ if(destinationChildV<0) since: [6, 3] } - Rejection{functionName: "makeExceptionalFuture*"} - Rejection{functionName: "makeReadyFuture*"} - Rejection{functionName: "makeReadyFuture*"} - Rejection{functionName: "makeReadyValueFuture*"} - Rejection{functionName: "makeReadyRangeFuture*"} - - EnumType{ - name: "Launch" + Rejection{functionName: "makeExceptionalFuture*"} + Rejection{functionName: "makeReadyFuture*"} + Rejection{functionName: "makeReadyFuture*"} + Rejection{functionName: "makeReadyValueFuture*"} + Rejection{functionName: "makeReadyRangeFuture*"} + + EnumType{ + name: "Launch" + } + + ModifyFunction{ + signature: "connect>(Sender*,Signal)" + remove: RemoveFlag.All + } + + ModifyFunction{ + signature: "whenAll(InputIt,InputIt)" + remove: RemoveFlag.All + } + + ModifyFunction{ + signature: "whenAll(Futures&&)" + remove: RemoveFlag.All + } + + ModifyFunction{ + signature: "whenAny(InputIt,InputIt)" + remove: RemoveFlag.All } ModifyFunction{ - signature: "connect(Sender*,Signal)" + signature: "whenAny(Futures&&)" remove: RemoveFlag.All } @@ -14492,6 +15486,42 @@ if(%1!=null){ location: Include.Global } } + FunctionalType{ + name: "Callable" + using: "std::function" + generate: false + } + ModifyFunction{ + signature: "start(std::function,int)" + remove: RemoveFlag.All + until: 6.5 + } + ModifyFunction{ + signature: "tryStart(std::function)" + remove: RemoveFlag.All + until: 6.5 + } + ModifyFunction{ + signature: "startOnReservedThread(std::function)" + remove: RemoveFlag.All + since: 6.3 + until: 6.5 + } + ModifyFunction{ + signature: "start(Callable&&,int)" + remove: RemoveFlag.All + since: 6.6 + } + ModifyFunction{ + signature: "tryStart(Callable&&)" + remove: RemoveFlag.All + since: 6.6 + } + ModifyFunction{ + signature: "startOnReservedThread(Callable&&)" + remove: RemoveFlag.All + since: 6.6 + } ModifyFunction{ signature: "start(QRunnable *, int)" ModifyArgument{ @@ -15188,48 +16218,6 @@ if(%1!=null){ modifiedType: "int" } } - /* - ModifyArgument{ - index: 0 - ReplaceType{ - modifiedType: "int" - } - ConversionRule{ - codeClass: CodeClass.Shell - Text{content: "qint64 %out = qint64(%in);\n"+ - "while(%2 > std::numeric_limits::max() && %in == std::numeric_limits::max()){\n"+ - " %2 -= std::numeric_limits::max();\n"+ - " %1 = &%1[std::numeric_limits::max()];\n"+ - " CharPointerArray %1_buffer2(%env, %1, jsize(qMin(qint64(std::numeric_limits::max()), %2)));\n"+ - " %in = %env->CallIntMethod(__java_this, method_id, %1_buffer2.array());\n"+ - " %out += %in;\n"+ - "}"} - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "jint %out = jint(%in);"} - } - } - ModifyArgument{ - index: 1 - ReplaceType{ - modifiedType: "byte @Nullable[]" - } - ConversionRule{ - codeClass: CodeClass.Shell - Text{content: "jbyteArray %out = qtjambi_array_cast(%env, %scope, %in, jsize(qMin(qint64(std::numeric_limits::max()), %2)));"} - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "jsize %2 = 0;\n"+ - "char * %out = qtjambi_array_cast(%env, %scope, jbyteArray(%in), %2);"} - } - } - ModifyArgument{ - index: 2 - RemoveArgument{ - } - }*/ } ModifyFunction{ signature: "readLine(char *, qint64)" @@ -15246,49 +16234,6 @@ if(%1!=null){ modifiedType: "int" } } - /* - ModifyArgument{ - index: 0 - ReplaceType{ - modifiedType: "int" - } - ConversionRule{ - codeClass: CodeClass.Shell - Text{content: "qint64 %out = qint64(%in);\n"+ - "while(%2 > std::numeric_limits::max() && %in == std::numeric_limits::max()){\n"+ - " %2 -= std::numeric_limits::max();\n"+ - " %1 = &%1[std::numeric_limits::max()];\n"+ - " CharPointerArray __%1(%env, %1, jsize(qMin(qint64(std::numeric_limits::max()), %2)));\n"+ - " %in = %env->CallIntMethod(__java_this, method_id, __%1.array());\n"+ - " %out += %in;\n"+ - "}"} - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "jint %out = jint(%in);"} - } - } - ModifyArgument{ - index: 1 - ReplaceType{ - modifiedType: "byte @Nullable[]" - } - ConversionRule{ - codeClass: CodeClass.Shell - Text{content: "jbyteArray %out = qtjambi_array_cast(%env, %scope, %in, jsize(qMin(qint64(std::numeric_limits::max()), %2)));"} - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "jsize %2 = 0;\n"+ - "char * %out = qtjambi_array_cast(%env, %scope, jbyteArray(%in), %2);"} - } - } - ModifyArgument{ - index: 2 - RemoveArgument{ - } - } - */ } ModifyFunction{ signature: "write(const char *, qint64)" @@ -15305,51 +16250,6 @@ if(%1!=null){ modifiedType: "int" } } - /* - ModifyArgument{ - index: 0 - ReplaceType{ - modifiedType: "int" - } - ConversionRule{ - codeClass: CodeClass.Shell - Text{content: "qint64 %out = qint64(%in);\n"+ - "while(%2 > std::numeric_limits::max() && %in == std::numeric_limits::max()){\n"+ - " %2 -= std::numeric_limits::max();\n"+ - " %1 = &%1[std::numeric_limits::max()];\n"+ - " j%2 = jsize(qMin(qint64(std::numeric_limits::max()), %2));\n"+ - " ConstCharPointerArray __%1(%env, %1, j%2);\n"+ - " %in = %env->CallIntMethod(__java_this, method_id, __%1.array());\n"+ - " %out += %in;\n"+ - "}"} - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "jint %out = jint(%in);"} - } - } - ModifyArgument{ - index: 1 - ReplaceType{ - modifiedType: "byte @Nullable[]" - } - ConversionRule{ - codeClass: CodeClass.Shell - Text{content: "jsize j%2 = jsize(qMin(qint64(std::numeric_limits::max()), %2));\n"+ - "jbyteArray %out = qtjambi_array_cast(%env, %scope, %in, j%2);"} - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "jsize %2 = 0;\n"+ - "char * %out = qtjambi_array_cast(%env, %scope, jbyteArray(%in), %2);"} - } - } - ModifyArgument{ - index: 2 - RemoveArgument{ - } - } - */ } } @@ -15565,6 +16465,11 @@ if(%1!=null){ name: "OSType" } defaultSuperClass: "QtObject" + ModifyFunction{ + signature: "QOperatingSystemVersion(QOperatingSystemVersionBase)" + remove: RemoveFlag.All + since: 6 + } CustomConstructor{ Text{content: "if(copy){\n"+ " return new(placement) QOperatingSystemVersion(*copy);\n"+ @@ -15776,6 +16681,13 @@ if(%1!=null){ until: [5, 15] } + ExtraIncludes{ + Include{ + fileName: "QtJambi/JObjectWrapper" + location: Include.Global + } + } + EnumType{ name: "SectionFlag" } @@ -17344,6 +18256,7 @@ if(%1!=null){ } FunctionalType{ name: "Predicate" + generate: false using: "std::function" } ModifyFunction{ @@ -17351,6 +18264,15 @@ if(%1!=null){ Instantiation{ Argument{ type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 1 + NoNullPointer{} + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = std::bind(Java::QtCore::QString$Predicate::test, %env, %in, std::placeholders::_1);"} + } } } } @@ -17767,21 +18689,23 @@ if(%1!=null){ quoteAfterLine: "class QMetaType___" quoteBeforeLine: "}// class" } - } - InjectCode{ - until: 5 ImportFile{ name: ":/io/qtjambi/generator/typesystem/QtJambiCore.java" quoteAfterLine: "class QMetaType_5__" quoteBeforeLine: "}// class" + until: 5 + } + ImportFile{ + name: ":/io/qtjambi/generator/typesystem/QtJambiCore.java" + quoteAfterLine: "class QMetaType_toString__" + quoteBeforeLine: "}// class" + until: 6.4 } - } - InjectCode{ - since: 6 ImportFile{ name: ":/io/qtjambi/generator/typesystem/QtJambiCore.java" quoteAfterLine: "class QMetaType_6__" quoteBeforeLine: "}// class" + since: 6 } } ModifyFunction{ @@ -18410,6 +19334,7 @@ if(%1!=null){ Rejection{functionName: "view"} Rejection{functionName: "canView"} Rejection{functionName: "canView"} + Rejection{functionName: "emplace"} Rejection{className: "Handler"} Rejection{className: "Private"} Rejection{className: "PrivateShared"} @@ -18488,9 +19413,20 @@ if(%1!=null){ remove: RemoveFlag.All } ModifyFunction{ - signature: "setValue(T&&)" + signature: "setValue,QVariant>>>(T&&)" + remove: RemoveFlag.All + since: 6 + } + ModifyFunction{ + signature: "fromValue(T&&)" remove: RemoveFlag.All since: 6 + until: 6.4 + } + ModifyFunction{ + signature: "fromValue(T&&)" + remove: RemoveFlag.All + since: 6.6 } ModifyFunction{ signature: "setValue(T)" @@ -18582,6 +19518,33 @@ if(%1!=null){ } since: 6 } + ModifyFunction{ + signature: "fromMetaType(QMetaType,const void*)" + ModifyArgument{ + index: 1 + AddImplicitCall{type: "io.qt.core.QMetaType.@NonNull Type"} + } + ModifyArgument{ + index: 2 + ReplaceType{ + modifiedType: "java.lang.@Nullable Object" + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "QVariant* variant = new QVariant(CoreAPI::convertCheckedObjectToQVariant(%env, %in, __qt_%1));\n"+ + "#if 0"} + } + } + ModifyArgument{ + index: 0 + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "#endif\n"+ + "%out = QtJambiAPI::convertQVariantToJavaVariant(%env, variant); // taking ownership of variant"} + } + } + since: 6.7 + } ModifyFunction{ signature: "toBool()const" rename: "toBoolean" @@ -18869,10 +19832,40 @@ if(%1!=null){ signature: "QPartialOrdering(QPartialOrdering)" remove: RemoveFlag.All } + ModifyFunction{ + signature: "QPartialOrdering(Qt::partial_ordering)" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "QPartialOrdering(Qt::strong_ordering)" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "QPartialOrdering(Qt::weak_ordering)" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "operator Qt::partial_ordering()const" + remove: RemoveFlag.All + since: 6.7 + } ModifyFunction{ signature: "operator==(QPartialOrdering)" remove: RemoveFlag.All } + ModifyFunction{ + signature: "operator==(Qt::partial_ordering)" + remove: RemoveFlag.All + since: 6.7 + } + ModifyFunction{ + signature: "operator!=(Qt::partial_ordering)" + remove: RemoveFlag.All + since: 6.7 + } ModifyFunction{ signature: "operator!=(QPartialOrdering)" remove: RemoveFlag.All @@ -18897,12 +19890,42 @@ if(%1!=null){ read: false write: false } + ModifyField{ + name: "equivalent" + read: false + write: false + since: 6.7 + } + ModifyField{ + name: "greater" + read: false + write: false + since: 6.7 + } + ModifyField{ + name: "less" + read: false + write: false + since: 6.7 + } + ModifyField{ + name: "unordered" + read: false + write: false + since: 6.7 + } InjectCode{ ImportFile{ name: ":/io/qtjambi/generator/typesystem/QtJambiCore.java" quoteAfterLine: "class QPartialOrdering___" quoteBeforeLine: "}// class" } + ImportFile{ + name: ":/io/qtjambi/generator/typesystem/QtJambiCore.java" + quoteAfterLine: "class QPartialOrdering_67__" + quoteBeforeLine: "}// class" + since: 6.7 + } } since: 6 } @@ -19403,8 +20426,14 @@ if(%1!=null){ } } ModifyFunction{ - signature: "setSource(Property)" + signature: "setSource(Property)" + remove: RemoveFlag.All + until: 6.6 + } + ModifyFunction{ + signature: "setSource(Property)" remove: RemoveFlag.All + since: 6.7 } ModifyFunction{ signature: "setSource(QtPrivate::QPropertyBindingData)" @@ -19432,11 +20461,9 @@ if(%1!=null){ ValueType{ name: "QPropertyBindingError" - since: 6 - } - - EnumType{ - name: "QPropertyBindingError::Type" + EnumType{ + name: "Type" + } since: 6 } @@ -19732,8 +20759,17 @@ if(%1!=null){ ModifyFunction{ signature: "QDebug(QDebug)" InjectCode{ - Text{content: "this.__rcDevice = o.__rcDevice;\n" - + "this.disabled = o.disabled;"} + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{index: 1; metaName: "%1"} + Text{content: "this.__rcDevice = %1.__rcDevice;\n" + + "this.disabled = %1.disabled;"} + } + InjectCode{ + target: CodeClass.Native + position: Position.Position5 + ArgumentMap{index: 1; metaName: "%1"} + Text{content: "Java::QtJambi::ReferenceUtility::copyReferenceCount(__jni_env, __jni_object, nullptr, __jni_env->NewStringUTF(\"__rcDevice\"), %1);"} } } ModifyFunction{ @@ -22337,17 +23373,26 @@ if(%1!=null){ SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: signature 'qHash(QPartialOrdering)' for function modification in 'QPartialOrdering' not found. Possible candidates:"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: class 'QSequentialConstIterator' inherits from unknown base class 'QByteArrayView::pointer'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: template baseclass 'QList' of 'QStringList' is not known"} - SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'QVariant::fromValue<>', unmatched parameter type 'const std::monostate&'"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'QVariant::fromValue<>*', unmatched parameter type 'const std::monostate&'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Missing instantiations for template method operator<<(std::pair)"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Missing instantiations for template method operator>>(std::pair&)"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping field 'QSequentialConstIterator::i' with unmatched type '*::Node*'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'QCoreApplication::requestPermission<*>', unmatched parameter type 'const QPermission&'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: namespace 'io.qt.core.Q*Permission' for enum '*' is not declared"} - SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'QDebug::operator<<', unmatched parameter type 'const std::basic_string<*>&'"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'QDebug::operator<<*', unmatched parameter type 'const std::basic_string<*>&'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: signature 'QPartialOrdering(QPartialOrdering)' for function modification in 'QPartialOrdering' not found. Possible candidates: "} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Missing instantiations for template method QShortcut::QShortcut(QKeySequence,QWidget*,Func1,Qt::ShortcutContext)"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: signature 'QBasicMutex(QBasicMutex)' for function modification in 'QBasicMutex' not found. Possible candidates: QBasicMutex() in QBasicMutex"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'QString*coder::*', unmatched return type 'QString*coder::*codedData<*>'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: class '' inherits from unknown base class 'QByteArrayView::value_type*'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: class 'QSequentialConstIterator' inherits from unknown base class 'QByteArrayView::const_pointer'"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: signature '*_ordering(Qt::*_ordering)' for function modification in 'Qt::*_ordering' not found. Possible candidates: "} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function '*::get<*, true, true>', unmatched return type 'DECL_TYPE'"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Missing instantiations for template method QFile::**"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Missing instantiations for template method QFileInfo::**"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Missing instantiations for template method QDir::**"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Missing instantiations for template method *::assign(InputIterator,InputIterator)"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Missing instantiations for template method *::nativeInterface()const"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Missing instantiations for template method QRandomGenerator::fillRange<*"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Missing instantiations for template method QStringList::QStringList(InputIterator,InputIterator)"} } diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtDBus.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtDBus.qml index dda83002..b926ebd2 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtDBus.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtDBus.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtDataVisualization.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtDataVisualization.qml index 6bb26753..da36af53 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtDataVisualization.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtDataVisualization.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtDesigner.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtDesigner.qml index b1e0b4ab..4f3cbfe4 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtDesigner.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtDesigner.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtGamepad.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtGamepad.qml index 03358482..cae36e83 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtGamepad.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtGamepad.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtGraphs.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtGraphs.qml index d3056196..7e51803a 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtGraphs.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtGraphs.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -61,7 +61,10 @@ TypeSystem{ className: "QQuickGraphsItem" since: 6.7 } - + Rejection{className: "QAbstract3DAxisPrivate"} + Rejection{className: "QAbstract3DSeriesPrivate"} + Rejection{className: "QAbstractDataProxyPrivate"} + NamespaceType{ name: "QtGraphs" ExtraIncludes{ @@ -76,21 +79,6 @@ TypeSystem{ signature: "qDefaultSurfaceFormat(bool)" targetType: "QtGraphs" } - - ObjectType{ - name: "QAbstract3DAxisPrivate" - generate: false - } - - ObjectType{ - name: "QAbstractDataProxyPrivate" - generate: false - } - - ObjectType{ - name: "QAbstract3DSeriesPrivate" - generate: false - } ObjectType{ name: "Q3DBars" @@ -447,10 +435,6 @@ TypeSystem{ EnumType{ name: "AxisType" } - ModifyFunction{ - signature: "QAbstract3DAxis(QAbstract3DAxisPrivate *, QObject *)" - remove: RemoveFlag.All - } ModifyFunction{ signature: "setLabels(QStringList)" access: Modification.NonFinal @@ -658,10 +642,6 @@ TypeSystem{ EnumType{ name: "SeriesType" } - ModifyFunction{ - signature: "QAbstract3DSeries(QAbstract3DSeriesPrivate *, QObject *)" - remove: RemoveFlag.All - } } ObjectType{ @@ -670,10 +650,6 @@ TypeSystem{ EnumType{ name: "DataType" } - ModifyFunction{ - signature: "QAbstractDataProxy(QAbstractDataProxyPrivate *, QObject *)" - remove: RemoveFlag.All - } } ObjectType{ @@ -723,6 +699,7 @@ TypeSystem{ ownership: Ownership.Cpp } } + until: 6.6 } ModifyFunction{ signature: "addRow(QBarDataRow*,QString)" @@ -733,6 +710,7 @@ TypeSystem{ ownership: Ownership.Cpp } } + until: 6.6 } ModifyFunction{ signature: "insertRow(int,QBarDataRow*)" @@ -743,6 +721,7 @@ TypeSystem{ ownership: Ownership.Cpp } } + until: 6.6 } ModifyFunction{ signature: "insertRow(int,QBarDataRow*,QString)" @@ -753,6 +732,7 @@ TypeSystem{ ownership: Ownership.Cpp } } + until: 6.6 } ModifyFunction{ signature: "setRow(int,QBarDataRow*)" @@ -763,6 +743,7 @@ TypeSystem{ ownership: Ownership.Cpp } } + until: 6.6 } ModifyFunction{ signature: "setRow(int,QBarDataRow*,QString)" @@ -773,6 +754,7 @@ TypeSystem{ ownership: Ownership.Cpp } } + until: 6.6 } ModifyFunction{ signature: "resetArray()" @@ -780,6 +762,7 @@ TypeSystem{ position: Position.Beginning Text{content: "QtJambi_LibraryUtilities.internal.invalidateObject(__rcArray);"} } + until: 6.6 } ModifyFunction{ signature: "resetArray(QBarDataArray*)" @@ -803,6 +786,7 @@ TypeSystem{ ownership: Ownership.Cpp } } + until: 6.6 } ModifyFunction{ signature: "resetArray(QBarDataArray*,QStringList,QStringList)" @@ -826,9 +810,11 @@ TypeSystem{ ownership: Ownership.Cpp } } + until: 6.6 } InjectCode{ Text{content: "private QBarDataArray __rcArray;"} + until: 6.6 } } @@ -1112,6 +1098,7 @@ TypeSystem{ ownership: Ownership.Cpp } } + until: 6.6 } ModifyFunction{ signature: "insertRow(int,QSurfaceDataRow*)" @@ -1122,6 +1109,7 @@ TypeSystem{ ownership: Ownership.Cpp } } + until: 6.6 } ModifyFunction{ signature: "setRow(int,QSurfaceDataRow*)" @@ -1132,14 +1120,7 @@ TypeSystem{ ownership: Ownership.Cpp } } - } - ModifyFunction{ - signature: "resetArray()" - InjectCode{ - position: Position.Beginning - Text{content: "QtJambi_LibraryUtilities.internal.invalidateObject(__rcArray);"} - } - since: 6.7 + until: 6.6 } ModifyFunction{ signature: "resetArray(QSurfaceDataArray*)" @@ -1163,9 +1144,11 @@ TypeSystem{ ownership: Ownership.Cpp } } + until: 6.6 } InjectCode{ Text{content: "private QSurfaceDataArray __rcArray;"} + until: 6.6 } } @@ -1181,6 +1164,13 @@ TypeSystem{ ValueType{ name: "QSurfaceDataArray" + ExtraIncludes{ + Include{ + fileName: "hashes.h" + location: Include.Local + } + since: 6.7 + } } ObjectType{ @@ -1240,6 +1230,7 @@ TypeSystem{ ownership: Ownership.Dependent } } + until: 6.6 } ModifyFunction{ signature: "labelPositions()" @@ -1250,6 +1241,7 @@ TypeSystem{ ownership: Ownership.Dependent } } + until: 6.6 } ModifyFunction{ signature: "labelStrings()" @@ -1260,6 +1252,7 @@ TypeSystem{ ownership: Ownership.Dependent } } + until: 6.6 } ModifyFunction{ signature: "subGridPositions()" @@ -1270,9 +1263,93 @@ TypeSystem{ ownership: Ownership.Dependent } } + until: 6.6 } } + + ObjectType{ + name: "QSeriesTheme" + EnumType{ + name: "SeriesColorTheme" + } + /*ModifyFunction{ + signature: "graphSeriesCount() const" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "setGraphSeriesCount(int)" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "graphSeriesColor(int) const" + remove: RemoveFlag.All + } + Rejection{className: "CustomFlags"}*/ + since: 6.7 + } + + ObjectType{ + name: "QAbstractAxis" + EnumType{ + name: "AxisType" + } + Rejection{fieldName: "d_ptr"} + since: 6.7 + } + + ObjectType{ + name: "QAbstractBarSeries" + EnumType{ + name: "LabelsPosition" + } + since: 6.7 + } + + ObjectType{ + name: "QAbstractSeries" + EnumType{ + name: "SeriesType" + } + ModifyFunction{ + signature: "setTheme(QSeriesTheme *)" + ModifyArgument{ + index: 1 + ReferenceCount{ + variableName: "__rcTheme" + action: ReferenceCount.Set + } + } + } + Rejection{fieldName: "d_ptr"} + Rejection{functionName: "graph"} + Rejection{functionName: "setGraph"} + since: 6.7 + } + + ObjectType{ + name: "QBarCategoryAxis" + since: 6.7 + } + + ObjectType{ + name: "QBarSeries" + since: 6.7 + } + + ObjectType{ + name: "QBarSet" + ModifyFunction{ + signature: "operator<<(qreal)" + remove: RemoveFlag.All + } + since: 6.7 + } + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: horribly broken type ''"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Final class 'QAbstractDataProxy' set to non-final, as it is extended by other classes"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Final class 'QAbstract3DSeries' set to non-final, as it is extended by other classes"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: Final class 'QAbstract3DAxis' set to non-final, as it is extended by other classes"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: private virtual function '*()' in 'Q3DTheme'"} SuppressedWarning{text: "WARNING(JavaGenerator) :: No ==/!= operator found for value type *Q*DataArray."} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: signature 'from*' for function modification in 'QQuick*' not found. Possible candidates: "} } diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtGrpc.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtGrpc.qml index 35840c7f..d4403e31 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtGrpc.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtGrpc.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtGui.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtGui.qml index 8b37dcd9..32374652 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtGui.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtGui.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -4143,10 +4143,6 @@ TypeSystem{ } } - EnumType{ - name: "QColor::NameFormat" - } - EnumType{ name: "QTextCharFormat::FontPropertiesInheritanceBehavior" } @@ -6035,6 +6031,9 @@ TypeSystem{ EnumType{ name: "Spec" } + EnumType{ + name: "NameFormat" + } ModifyFunction{ signature: "QColor(QColor::Spec)" isForcedExplicit: true @@ -7185,6 +7184,14 @@ TypeSystem{ since: [5, 12] until: 5 } + ValueType{ + name: "Tag" + ModifyFunction{ + signature: "toString()const" + rename: "toByteArray" + } + since: 6.7 + } } ValueType{ @@ -7223,6 +7230,11 @@ TypeSystem{ type: CustomConstructor.Default Text{content: "new(placement) QFontMetricsF(QFont());"} } + ModifyFunction{ + signature: "QFontMetricsF<0>(const QFont &, const QPaintDevice *)" + remove: RemoveFlag.All + until: 5 + } ModifyFunction{ signature: "boundingRect(QRectF,int,QString,int,int*)const" ModifyArgument{ @@ -7278,6 +7290,11 @@ TypeSystem{ type: CustomConstructor.Default Text{content: "new(placement) QFontMetrics(QFont());"} } + ModifyFunction{ + signature: "QFontMetrics<0>(const QFont &, const QPaintDevice *)" + remove: RemoveFlag.All + until: 5 + } ModifyFunction{ signature: "boundingRect(int,int,int,int,int,QString,int,int*)const" ModifyArgument{ @@ -11524,14 +11541,6 @@ TypeSystem{ } } - ValueType{ - name: "QTextLayout::FormatRange" - Include{ - fileName: "QTextLayout" - location: Include.Global - } - } - ValueType{ name: "QTextTableCell" ExtraIncludes{ @@ -11598,12 +11607,28 @@ TypeSystem{ ObjectType{ name: "QTextLayout" + ValueType{ + name: "FormatRange" + Include{ + fileName: "QTextLayout" + location: Include.Global + } + } + EnumType{ + name: "GlyphRunRetrievalFlag" + since: [6,5] + } ExtraIncludes{ Include{ fileName: "QTextOption" location: Include.Global } } + ModifyFunction{ + signature: "QTextLayout<0>(const QString &, const QFont &, const QPaintDevice *)" + remove: RemoveFlag.All + until: 5 + } ModifyFunction{ signature: "draw(QPainter *, const QPointF &, const QVector &, const QRectF &) const" Access{ @@ -11631,11 +11656,6 @@ TypeSystem{ since: 6 } } - - EnumType{ - name: "QTextLayout::GlyphRunRetrievalFlag" - since: [6,5] - } InterfaceType{ name: "QAbstractUndoItem" @@ -11811,6 +11831,7 @@ TypeSystem{ ValueType{ name: "QTransform" Rejection{functionName: "asAffineMatrix"} + Rejection{className: "Affine"} EnumType{ name: "TransformationType" } @@ -12551,6 +12572,12 @@ TypeSystem{ ObjectType{ name: "QRasterWindow" + ModifyFunction{ + signature: "resizeEvent(QResizeEvent *)" + remove: RemoveFlag.All // remove for compatibility with Qt 6.6.0 + since: 6.6 + until: 6.6 + } } ObjectType{ @@ -13424,6 +13451,10 @@ TypeSystem{ ValueType{ name: "QEventPoint" + EnumType{ + name: "State" + since: 6 + } ModifyFunction{ signature: "operator=(QEventPoint)" Delegate{ @@ -13770,10 +13801,10 @@ TypeSystem{ } since: 6 } - - EnumType{ - name: "QEventPoint::State" - since: 6 + + ObjectType{ + name: "QChildWindowEvent" + since: 6.7 } Rejection{ @@ -16969,11 +17000,27 @@ TypeSystem{ remove: RemoveFlag.All } ModifyFunction{ - signature: "setUniformValue(int, Array)" + signature: "setUniformValue(int, const GLfloat[2][2])" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "setUniformValue(int, const GLfloat[3][3])" remove: RemoveFlag.All } ModifyFunction{ - signature: "setUniformValue(const char*, Array)" + signature: "setUniformValue(int, const GLfloat[4][4])" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "setUniformValue(const char*, const GLfloat[2][2])" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "setUniformValue(const char*, const GLfloat[3][3])" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "setUniformValue(const char*, const GLfloat[4][4])" remove: RemoveFlag.All } ModifyFunction{ @@ -17429,31 +17476,26 @@ TypeSystem{ ObjectType{ name: "QOpenGLVertexArrayObject" - until: 5 - } - - ObjectType{ - name: "QOpenGLVertexArrayObject::Binder" - implementing: "AutoCloseable" - InjectCode{ - target: CodeClass.Java - Text{content: "@Override\n"+ - "@QtUninvokable\n"+ - "public final void close(){\n"+ - " dispose();\n"+ - "}"} + ObjectType{ + name: "Binder" + implementing: "AutoCloseable" + InjectCode{ + target: CodeClass.Java + Text{content: "@Override\n"+ + "@QtUninvokable\n"+ + "public final void close(){\n"+ + " dispose();\n"+ + "}"} + } } until: 5 } - EnumType{ - name: "QOpenGLTextureBlitter::Origin" - since: [5, 8] - until: 5 - } - ObjectType{ name: "QOpenGLTextureBlitter" + EnumType{ + name: "Origin" + } since: [5, 8] until: 5 } @@ -17674,66 +17716,55 @@ TypeSystem{ SuppressedWarning{text: "skipping function 'QWindowsMimeConverter::*', unmatched *type '*IDataObject*'"; since: 6.5} SuppressedWarning{text: "Unimplementable pure virtual function: QWindowsMimeConverter::*"; since: 6.5} - ValueType{ - name: "HWND__" - generate: false - since: [6, 2] - } - - ValueType{ - name: "HGLRC__" - generate: false - since: [6, 2] - } - - ValueType{ - name: "HMODULE__" - generate: false + TypeAliasType{ + name: "ANativeWindow" + asNativePointer: true since: [6, 2] } - - ValueType{ + + NativePointerType{ name: "__GLXcontextRec" - generate: false - since: [6, 2] - } - - ValueType{ - name: "ANativeWindow" - generate: false - since: [6, 2] } TypeAliasType{ name: "GLXContext" + asNativePointer: true } TypeAliasType{ name: "EGLContext" + asNativePointer: true } TypeAliasType{ name: "EGLDisplay" + asNativePointer: true } - + TypeAliasType{ - name: "NSOpenGLContext" + name: "EGLConfig" + asNativePointer: true } TypeAliasType{ - name: "HMODULE" + name: "NSOpenGLContext" + asNativePointer: true } + NativePointerType{ + name: "HGLRC__" + } TypeAliasType{ name: "HGLRC" + asNativePointer: true } - TypeAliasType{ - name: "HWND" + NativePointerType{ + name: "HWND__" } - TypeAliasType{ - name: "HINSTANCE" + name: "HWND" + asNativePointer: true } InterfaceType{ @@ -17856,6 +17887,11 @@ TypeSystem{ fileName: "QtGui/QOpenGLContext" location: Include.Global } + Include{ + fileName: "QtGui/qwindowdefs_win.h" + location: Include.Global + suppressed: true + } } ModifyFunction{ signature: "fromNative(HGLRC,HWND,QOpenGLContext*)" @@ -18006,23 +18042,22 @@ TypeSystem{ fileName: "QtGui/QGuiApplication" location: Include.Global } + Include{ + fileName: "QtGui/qwindowdefs_win.h" + location: Include.Global + suppressed: true + } } since: [6, 2] } - PrimitiveType{ + NativePointerType{ name: "xcb_connection_t" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false since: [6, 2] } - PrimitiveType{ + NativePointerType{ name: "Display" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false since: [6, 2] } @@ -18179,54 +18214,139 @@ TypeSystem{ since: [6, 2] } - PrimitiveType{ + InterfaceType{ + name: "QNativeInterface::QWaylandScreen" + packageName: "io.qt.gui.nativeinterface" + javaName: "QWaylandScreen" + ppCondition: "QT_CONFIG(wayland)" + isNativeInterface: true + Rejection{ + className: "TypeInfo" + } + ModifyFunction{ + signature: "QWaylandScreen()" + remove: RemoveFlag.All + } + ExtraIncludes{ + Include{ + fileName: "QtGui/QScreen" + location: Include.Global + } + } + since: 6.7 + } + + InterfaceType{ + name: "QNativeInterface::QAndroidScreen" + packageName: "io.qt.gui.nativeinterface" + javaName: "QAndroidScreen" + ppCondition: "defined(Q_OS_ANDROID)" + isNativeInterface: true + Rejection{ + className: "TypeInfo" + } + ModifyFunction{ + signature: "QAndroidScreen()" + remove: RemoveFlag.All + } + ExtraIncludes{ + Include{ + fileName: "QtGui/QScreen" + location: Include.Global + } + } + since: 6.7 + } + + InterfaceType{ + name: "QNativeInterface::QWindowsScreen" + packageName: "io.qt.gui.nativeinterface" + javaName: "QWindowsScreen" + ppCondition: "defined(Q_OS_WIN32)" + isNativeInterface: true + Rejection{ + className: "TypeInfo" + } + ModifyFunction{ + signature: "QWindowsScreen()" + remove: RemoveFlag.All + } + ExtraIncludes{ + Include{ + fileName: "QtGui/QScreen" + location: Include.Global + } + Include{ + fileName: "QtGui/qwindowdefs_win.h" + location: Include.Global + suppressed: true + } + } + since: 6.7 + } + + NativePointerType{ + name: "HMONITOR__" + ppCondition: "defined(Q_OS_WIN)" + } + TypeAliasType{ + name: "HMONITOR" + asNativePointer: true + ppCondition: "defined(Q_OS_WIN)" + since: [6, 2] + } + + NativePointerType{ + name: "HINSTANCE__" + ppCondition: "defined(Q_OS_WIN)" + } + TypeAliasType{ + name: "HINSTANCE" + asNativePointer: true + ppCondition: "defined(Q_OS_WIN)" + since: [6, 2] + } + TypeAliasType{ + name: "HMODULE" + ppCondition: "defined(Q_OS_WIN)" + since: [6, 2] + } + + NativePointerType{ name: "wl_seat" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false since: [6, 2] } - PrimitiveType{ + NativePointerType{ name: "wl_keyboard" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false since: [6, 2] } - PrimitiveType{ + NativePointerType{ name: "wl_display" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false since: [6, 2] } - PrimitiveType{ + NativePointerType{ name: "wl_pointer" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false since: [6, 2] } - PrimitiveType{ + NativePointerType{ name: "wl_compositor" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false since: [6, 2] } - PrimitiveType{ + NativePointerType{ name: "wl_touch" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false since: [6, 2] } + NativePointerType{ + name: "wl_output" + since: 6.7 + } + InterfaceType{ name: "QNativeInterface::QWaylandApplication" packageName: "io.qt.gui.nativeinterface" @@ -18475,6 +18595,49 @@ TypeSystem{ targetType: "QVector4D" until: [5, 15] } + + NativePointerType{ + name: "VkFormat" + since: [6, 4] + } + + NativePointerType{ + name: "MTLTexture" + since: [6, 2] + } + + NativePointerType{ + name: "MTLDevice" + since: [6, 2] + } + + NativePointerType{ + name: "MTLCommandQueue" + since: [6, 2] + } + + NativePointerType{ + name: "MTLCommandBuffer" + } + + NativePointerType{ + name: "MTLRenderCommandEncoder" + } + + ObjectType{ + name: "id" + template: true + TemplateArguments{ + arguments: ["MTLTexture"] + } + since: [6, 2] + } + + ObjectType{ + name: "id" + generate: false + since: [6, 2] + } SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: unsupported default value '0., 0., 1000000000., 1000000000.' of argument in function 'update', class 'QAbstractTextDocumentLayout'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping * unmatched *type '*QImageTextKeyLang*'"} @@ -18571,4 +18734,5 @@ TypeSystem{ SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: class 'Display' inherits from unknown base class '_XDisplay'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: signature 'QPaintEngineState(*)' for function modification in 'QPaintEngineState' not found. Possible candidates: "} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function '*', unmatched *type 'QRhi*'"; until: 6.6} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'QFont::Tag::Tag*', unmatched parameter type 'const char[N]'"; since: 6.7} } diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtGuiQpa.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtGuiQpa.qml index ece77607..a50b99e8 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtGuiQpa.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtGuiQpa.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtGuiRhi.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtGuiRhi.qml index a77ee359..c4bfcd83 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtGuiRhi.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtGuiRhi.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -41,20 +41,6 @@ TypeSystem{ Rejection{className: "QRhiImplementation"} - PrimitiveType{ - name: "MTLCommandBuffer" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false - } - - PrimitiveType{ - name: "MTLRenderCommandEncoder" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false - } - ObjectType{ name: "QRhi" EnumType{ @@ -81,6 +67,42 @@ TypeSystem{ FunctionalType{ name: "CleanupCallback" } + ModifyFunction{ + signature: "addCleanupCallback(const void *, const QRhi::CleanupCallback &)" + Remove{ // remove for compatibility with Qt 6.6.0 + codeClass: RemoveFlag.All + until: 6.6 + } + ModifyArgument{ + index: 1 + ReplaceType{ + modifiedType: "long" + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "const void * %out = reinterpret_cast(%in);"} + } + since: 6.7 + } + } + ModifyFunction{ + signature: "removeCleanupCallback(const void *)" + Remove{ // remove for compatibility with Qt 6.6.0 + codeClass: RemoveFlag.All + until: 6.6 + } + ModifyArgument{ + index: 1 + ReplaceType{ + modifiedType: "long" + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "const void * %out = reinterpret_cast(%in);"} + } + since: 6.7 + } + } ModifyFunction{ signature: "beginOffscreenFrame(QRhiCommandBuffer **, QRhi::BeginFrameFlags)" ModifyArgument{ @@ -523,6 +545,10 @@ if(%out_buffer.size()" + } } ObjectType{ name: "QShader" @@ -1074,8 +1100,6 @@ if(%out_buffer.size()NewFloatArray(2); +%env->SetFloatArrayRegion(%out, 0, 2, *reinterpret_cast(&%in));` + } + } + ConversionRule{ + codeClass: CodeClass.NativeSetter + Text{content: String.raw` +decltype(std::declval().limits) %out{}; +if(%env->GetArrayLength(%in)!=2) + JavaException::raiseIllegalArgumentException(%env, "Array of length 2 expected" QTJAMBI_STACKTRACEINFO ); +%env->GetFloatArrayRegion(%in, 0, 2, *reinterpret_cast(&%out));` + } + } + } + InjectCode{ + target: CodeClass.Java + position: Position.End + Text{content: String.raw` +@QtUninvokable +public final void setColorComponentValue(float maxColorComponentValue, float maxPotentialColorComponentValue) { + setLimits(new float[] {maxColorComponentValue, maxPotentialColorComponentValue}); + setLimitsType(LimitsType.ColorComponentValue); +} + +@QtUninvokable +public final void setLuminanceInNits(float minLuminance, float maxLuminance) { + setLimits(new float[] {minLuminance, maxLuminance}); + setLimitsType(LimitsType.LuminanceInNits); +}` + } + } } ObjectType{ name: "QRhiSwapChainProxyData" diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtHelp.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtHelp.qml index 9368f6a7..0d0d32f0 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtHelp.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtHelp.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtHttpServer.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtHttpServer.qml index 22ae815f..30023fc4 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtHttpServer.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtHttpServer.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtLocation.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtLocation.qml index 7b99f66a..3c090267 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtLocation.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtLocation.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtMacExtras.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtMacExtras.qml index 3fa4694f..34f20d03 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtMacExtras.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtMacExtras.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtMultimedia.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtMultimedia.qml index 7d14e81d..1571e37d 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtMultimedia.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtMultimedia.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -352,6 +352,14 @@ TypeSystem{ name: "QCameraControl::PropertyChangeType" until: 5 } + + NamespaceType{ + name: "QtVideo" + EnumType{ + name: "Rotation" + } + since: 6.7 + } ValueType{ name: "QVideoFrame" @@ -638,7 +646,7 @@ TypeSystem{ } } ModifyFunction{ - signature: "mapPlanes(QAbstractVideoBuffer::MapMode, int *, Array, Array)" + signature: "mapPlanes(QAbstractVideoBuffer::MapMode, int *, int[4], uchar*[4])" ModifyArgument{ index: 2 RemoveArgument{ @@ -725,7 +733,7 @@ TypeSystem{ } } ModifyFunction{ - signature: "map(QAbstractVideoBuffer::MapMode, int *, Array, Array)" + signature: "map(QAbstractVideoBuffer::MapMode, int *, int[4],uchar*[4])" rename: "mapPlanesImpl" ModifyArgument{ index: 2 @@ -2693,7 +2701,7 @@ TypeSystem{ since: [6, 6] } - SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'QAudioBuffer::QAudioBuffer', unmatched parameter type 'QAbstractAudioBuffer*'"} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function '*', unmatched parameter type 'QAbstractAudioBuffer*'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'QMediaService::requestControl', unmatched return type 'T'"} SuppressedWarning{text: "WARNING(JavaGenerator) :: No ==/!= operator found for value type QAudioBuffer."} SuppressedWarning{ diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtMultimediaWidgets.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtMultimediaWidgets.qml index 9c2d9148..f4252b77 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtMultimediaWidgets.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtMultimediaWidgets.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtNetwork.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtNetwork.qml index b1ba7287..1b1bacd5 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtNetwork.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtNetwork.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -706,38 +706,101 @@ TypeSystem{ ModifyFunction{ signature: "get(QNetworkRequest)" threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } } ModifyFunction{ signature: "head(QNetworkRequest)" threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } } ModifyFunction{ signature: "post(QNetworkRequest,QIODevice*)" threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } } ModifyFunction{ signature: "post(QNetworkRequest,QByteArray)" threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } } ModifyFunction{ signature: "post(QNetworkRequest,QHttpMultiPart*)" threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } } ModifyFunction{ signature: "put(QNetworkRequest,QByteArray)" threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } } ModifyFunction{ signature: "put(QNetworkRequest,QIODevice*)" threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } } ModifyFunction{ signature: "put(QNetworkRequest,QHttpMultiPart*)" threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } } ModifyFunction{ signature: "deleteResource(QNetworkRequest)" threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } } ModifyFunction{ signature: "connectToHostEncrypted(const QString &, quint16, const QSslConfiguration &)" @@ -833,6 +896,16 @@ TypeSystem{ } } } + ModifyFunction{ + signature: "setTransferTimeout(std::chrono::milliseconds)" + ModifyArgument{ + index: 1 + ReplaceDefaultExpression{ + expression: "java.time.Duration.ofMillis(io.qt.network.QNetworkRequest.TransferTimeoutConstant.DefaultTransferTimeoutConstant.value())" + } + } + since: 6.7 + } } ObjectType{ @@ -847,17 +920,26 @@ TypeSystem{ ObjectType{ name: "QNetworkReply" - InjectCode{ - ImportFile{ - name: ":/io/qtjambi/generator/typesystem/QtJambiNetwork.java" - quoteAfterLine: "class QNetworkReply___" - quoteBeforeLine: "}// class" - } - } EnumType{ name: "NetworkError" } + ModifyFunction{ + signature: "hasRawHeader(const QByteArray &) const" + ModifyArgument{ + index: 1 + AddImplicitCall{type: "java.lang.@NonNull String"} + } + until: 6.6 + } + ModifyFunction{ + signature: "rawHeader(const QByteArray &) const" + ModifyArgument{ + index: 1 + AddImplicitCall{type: "java.lang.@NonNull String"} + } + until: 6.6 + } ModifyFunction{ signature: "sslConfigurationImplementation(QSslConfiguration&) const" ModifyArgument{ @@ -938,11 +1020,30 @@ TypeSystem{ ValueType{ name: "QHostInfo" ExtraIncludes{ + Include{ + fileName: "QtJambi/JavaAPI" + location: Include.Global + } Include{ fileName: "QtJambi/JObjectWrapper" location: Include.Global } } + + InjectCode{ + target: CodeClass.Native + position: Position.Beginning + Text{content: "auto convertSlot(JNIEnv* _env, jobject _slot){\n"+ + " JObjectWrapper slot(_env, _slot);\n"+ + " return [slot](const QHostInfo& info){\n"+ + " if(JniEnvironment env{200}){\n"+ + " jobject _info = qtjambi_cast(env, info);\n"+ + " Java::QtCore::QMetaObject$Slot1::invoke(env, slot.object(), _info);\n"+ + " }\n"+ + " };\n"+ + "}"} + } + InjectCode{ target: CodeClass.Java ImportFile{ @@ -979,6 +1080,157 @@ TypeSystem{ " }\n"+ "}"} } + until: 6.6 + } + + ModifyFunction{ + signature: "lookupHost(QString, const QObject*, const char*)" + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 3 + metaName: "slot" + } + ArgumentMap{ + index: 2 + metaName: "dest" + } + Text{content: "if(slot!=null && !slot.startsWith(\"1\") && !slot.startsWith(\"2\")) {\n"+ + " io.qt.core.QMetaMethod method = dest.metaObject().method(slot);\n"+ + " if(method!=null && method.isValid()) {\n"+ + " if(method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal)\n"+ + " slot = \"2\" + method.cppMethodSignature();\n"+ + " else\n"+ + " slot = \"1\" + method.cppMethodSignature();\n"+ + " }\n"+ + "}"} + } + since: 6.7 + } + + FunctionalType{ + name: "Slot" + using: "std::function" + generate: false + } + + ModifyFunction{ + signature: "lookupHost(const QString&,const QtPrivate::FunctionPointer::Object*,Func)" + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 0 + replaceType: "int" + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "%out = %in;"} + } + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot1<@NonNull QHostInfo>" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertSlot(%env, %in);"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 1 + metaName: "name" + } + ArgumentMap{ + index: 2 + metaName: "context" + } + ArgumentMap{ + index: 3 + metaName: "slot" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " if(metaMethod.parameterCount()!=1 && metaMethod.parameterType(0)!=io.qt.core.QMetaType.fromType(QHostInfo.class).id()) {\n"+ + " throw new IllegalArgumentException(\"Method does not take a single QHostInfo argument: \"+metaMethod.cppMethodSignature());\n"+ + " }\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " return lookupHost(name, context, \"2\"+metaMethod.cppMethodSignature());\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " return lookupHost(name, context, \"1\"+metaMethod.cppMethodSignature());\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"} + } + } + until: 6.5 + } + + ModifyFunction{ + signature: "lookupHost(const QString&,const QtPrivate::ContextTypeForFunctor::ContextType*,Functor&&)" + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot1<@NonNull QHostInfo>" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertSlot(%env, %in);"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 2 + metaName: "context" + } + ArgumentMap{ + index: 3 + metaName: "slot" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " if(metaMethod.parameterCount()!=1 && metaMethod.parameterType(0)!=io.qt.core.QMetaType.fromType(QHostInfo.class).id()) {\n"+ + " throw new IllegalArgumentException(\"Method does not take a single QHostInfo argument: \"+metaMethod.cppMethodSignature());\n"+ + " }\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " return lookupHost(name, context, \"2\"+metaMethod.cppMethodSignature());\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " return lookupHost(name, context, \"1\"+metaMethod.cppMethodSignature());\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"} + } + } + since: 6.6 } ModifyFunction{ signature: "lookupHost(QString,Functor&&)" @@ -1080,13 +1332,6 @@ TypeSystem{ " throw new ArrayIndexOutOfBoundsException(index);"} } } - InjectCode{ - target: CodeClass.Java - Text{content: "public QIPv6Address(byte[] c){\n"+ - " this();\n"+ - " setC(c);\n"+ - "}"} - } } ValueType{ @@ -1112,7 +1357,7 @@ TypeSystem{ since: [6, 1] } ModifyFunction{ - signature: "parseCookies(QByteArray)" + signature: "parseCookies(QByteArrayView)" ModifyArgument{ index: 1 noImplicitCalls: true @@ -1172,6 +1417,23 @@ TypeSystem{ } } } + + InjectCode{ + Text{ + content: "public final static int DefaultTransferTimeout = TransferTimeoutConstant.DefaultTransferTimeoutConstant.value();" + } + since: 6.7 + } + ModifyFunction{ + signature: "setTransferTimeout(std::chrono::milliseconds)" + ModifyArgument{ + index: 1 + ReplaceDefaultExpression{ + expression: "java.time.Duration.ofMillis(io.qt.network.QNetworkRequest.TransferTimeoutConstant.DefaultTransferTimeoutConstant.value())" + } + } + since: 6.7 + } } ValueType{ @@ -1582,6 +1844,1225 @@ TypeSystem{ since: [6, 5] } + ObjectType{ + name: "QRestReply" + since: 6.7 + } + + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: template baseclass 'QtPrivate::ContextTypeForFunctor::ContextType' of '' is not known"} + Template{ + name: "rest.comsumer.function" + Text{content: "JObjectWrapper wrapper(%env, %in);\n"+ + "auto %out = [wrapper](QRestReply* reply){\n"+ + " if(JniEnvironment env{200}){\n"+ + " jobject _reply = qtjambi_cast(env, reply);\n"+ + " Java::Runtime::Consumer::accept(env, wrapper.object(), _reply);\n"+ + " }\n"+ + " };"} + } + + ObjectType{ + name: "QRestAccessManager" + ExtraIncludes{ + Include{ + fileName: "QtJambi/JavaAPI" + location: Include.Global + } + Include{ + fileName: "QtJambi/JObjectWrapper" + location: Include.Global + } + } + + InjectCode{ + target: CodeClass.Native + position: Position.Beginning + Text{content: "auto convertConsumer(JNIEnv* _env, jobject _consumer){\n"+ + " JObjectWrapper consumer(_env, _consumer);\n"+ + " return [consumer](QRestReply& reply){\n"+ + " if(JniEnvironment env{200}){\n"+ + " jobject _reply = qtjambi_cast(env, &reply);\n"+ + " InvalidateAfterUse inv(env, _reply);\n"+ + " Java::Runtime::Consumer::accept(env, consumer.object(), _reply);\n"+ + " }\n"+ + " };\n"+ + "}"} + } + + InjectCode{ + ImportFile{ + name: ":/io/qtjambi/generator/typesystem/QtJambiNetwork.java" + quoteAfterLine: "class QRestAccessManager___" + quoteBeforeLine: "}// class" + } + } + + FunctionalType{ + name: "Callback" + using: "std::function" + generate: false + } + + ModifyFunction{ + signature: "sendCustomRequest(const QNetworkRequest&, const QByteArray &, const QByteArray &)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "sendCustomRequest(const QNetworkRequest&, const QByteArray &, QIODevice *)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "sendCustomRequest(const QNetworkRequest&, const QByteArray &, QHttpMultiPart *)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "deleteResource(const QNetworkRequest&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "head(const QNetworkRequest&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "get(const QNetworkRequest&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "get(const QNetworkRequest&,QIODevice*)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "get(const QNetworkRequest&,const QByteArray&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "get(const QNetworkRequest&,const QJsonDocument&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "post(const QNetworkRequest&,const QMap &)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "post(const QNetworkRequest&,QHttpMultiPart*)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "post(const QNetworkRequest&,QIODevice*)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "post(const QNetworkRequest&,const QByteArray&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "post(const QNetworkRequest&,const QJsonDocument&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "put(const QNetworkRequest&,const QMap &)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "put(const QNetworkRequest&,QHttpMultiPart*)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "put(const QNetworkRequest&,QIODevice*)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "put(const QNetworkRequest&,const QByteArray&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "put(const QNetworkRequest&,const QJsonDocument&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "patch(const QNetworkRequest&,const QMap&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "patch(const QNetworkRequest&,QIODevice*)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "patch(const QNetworkRequest&,const QByteArray&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "patch(const QNetworkRequest&,const QJsonDocument&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + + ModifyFunction{ + signature: "deleteResource(const QNetworkRequest&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "head(const QNetworkRequest&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "get(const QNetworkRequest&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "get(const QNetworkRequest&,QIODevice*,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "get(const QNetworkRequest&,const QByteArray&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "get(const QNetworkRequest&,const QJsonDocument&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "patch(const QNetworkRequest&,QIODevice*,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "patch(const QNetworkRequest&,const QByteArray&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "patch(const QNetworkRequest&,const QJsonArray&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "patch(const QNetworkRequest&,const QJsonDocument&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "patch(const QNetworkRequest&,const QVariantMap&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "patch(QNetworkRequest,QMap,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "post(const QNetworkRequest&,QHttpMultiPart*,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "post(const QNetworkRequest&,QIODevice*,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "post(const QNetworkRequest&,const QByteArray&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "post(const QNetworkRequest&,const QJsonArray&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "post(const QNetworkRequest&,const QJsonDocument&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "post(const QNetworkRequest&,const QVariantMap&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "post(QNetworkRequest,QMap,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "put(const QNetworkRequest&,QHttpMultiPart*,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "put(const QNetworkRequest&,QIODevice*,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "put(const QNetworkRequest&,const QByteArray&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "put(const QNetworkRequest&,const QJsonArray&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "put(const QNetworkRequest&,const QJsonDocument&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "put(const QNetworkRequest&,const QVariantMap&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "put(QNetworkRequest,QMap,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 4 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 3 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "sendCustomRequest(const QNetworkRequest&,const QByteArray&,QHttpMultiPart*,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 5 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 4 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "sendCustomRequest(const QNetworkRequest&,const QByteArray&,QIODevice*,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 5 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 4 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + + ModifyFunction{ + signature: "sendCustomRequest(const QNetworkRequest&,const QByteArray&,const QByteArray&,const QRestAccessManager::ContextTypeForFunctor*,Functor&&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 5 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.network.QRestAccessManager$Callback" + contextParameter: 4 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = convertConsumer(%env, %in);"} + } + } + } + } + since: 6.7 + } + + ObjectType{ + name: "QNetworkRequestFactory" + since: 6.7 + } + + ObjectType{ + name: "QHttpHeaders" + EnumType{ + name: "WellKnownHeader" + } + since: 6.7 + } SuppressedWarning{text: "*unmatched parameter type 'const sockaddr*"} diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtNetworkAuth.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtNetworkAuth.qml index 0312edb4..16ec7021 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtNetworkAuth.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtNetworkAuth.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -35,21 +35,6 @@ TypeSystem{ qtLibrary: "QtNetworkAuth" module: "qtjambi.networkauth" description: "Provides support for OAuth-based authorization to online services." - EnumType{ - name: "QAbstractOAuth::Status" - } - - EnumType{ - name: "QAbstractOAuth::Stage" - } - - EnumType{ - name: "QAbstractOAuth::Error" - } - - EnumType{ - name: "QAbstractOAuth::ContentType" - } EnumType{ name: "QOAuth1::SignatureMethod" @@ -65,6 +50,30 @@ TypeSystem{ ObjectType{ name: "QAbstractOAuth" + FunctionalType{ + name: "ModifyParametersFunction" + ExtraIncludes{ + Include{ + fileName: "QtCore/QVariantMap" + location: Include.Global + } + } + } + EnumType{ + name: "Status" + } + + EnumType{ + name: "Stage" + } + + EnumType{ + name: "Error" + } + + EnumType{ + name: "ContentType" + } ModifyFunction{ signature: "setNetworkAccessManager(QNetworkAccessManager*)" ModifyArgument{ @@ -93,6 +102,81 @@ TypeSystem{ } since: 6 } + ModifyFunction{ + signature: "get(QUrl,const QMap&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Shell + ownership: Ownership.Cpp + } + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + ModifyFunction{ + signature: "head(QUrl,const QMap&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Shell + ownership: Ownership.Cpp + } + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + ModifyFunction{ + signature: "post(QUrl,const QMap&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Shell + ownership: Ownership.Cpp + } + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + ModifyFunction{ + signature: "put(QUrl,const QMap&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Shell + ownership: Ownership.Cpp + } + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } + ModifyFunction{ + signature: "deleteResource(QUrl,const QMap&)" + threadAffinity: true + ModifyArgument{ + index: 0 + DefineOwnership{ + codeClass: CodeClass.Shell + ownership: Ownership.Cpp + } + DefineOwnership{ + codeClass: CodeClass.Native + ownership: Ownership.Java + } + } + } } ObjectType{ @@ -128,15 +212,5 @@ TypeSystem{ name: "QOAuthOobReplyHandler" } - FunctionalType{ - name: "QAbstractOAuth::ModifyParametersFunction" - ExtraIncludes{ - Include{ - fileName: "QtCore/QVariantMap" - location: Include.Global - } - } - } - SuppressedWarning{text: "WARNING(JavaGenerator) :: No ==/!= operator found for value type QOAuth1Signature."} } diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtNfc.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtNfc.qml index 829a67a4..086abc9b 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtNfc.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtNfc.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtOpenGL.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtOpenGL.qml index 0844cd65..035a4a83 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtOpenGL.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtOpenGL.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -4185,11 +4185,27 @@ TypeSystem{ remove: RemoveFlag.All } ModifyFunction{ - signature: "setUniformValue(int, Array)" + signature: "setUniformValue(int, const GLfloat[2][2])" remove: RemoveFlag.All } ModifyFunction{ - signature: "setUniformValue(const char*, Array)" + signature: "setUniformValue(int, const GLfloat[3][3])" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "setUniformValue(int, const GLfloat[4][4])" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "setUniformValue(const char*, const GLfloat[2][2])" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "setUniformValue(const char*, const GLfloat[3][3])" + remove: RemoveFlag.All + } + ModifyFunction{ + signature: "setUniformValue(const char*, const GLfloat[4][4])" remove: RemoveFlag.All } ModifyFunction{ diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtOpenGLWidgets.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtOpenGLWidgets.qml index 1b867d38..d42134cc 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtOpenGLWidgets.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtOpenGLWidgets.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtPdf.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtPdf.qml index 8a05c0da..1e7761b9 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtPdf.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtPdf.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -205,12 +205,12 @@ TypeSystem{ EnumType{ name: "RenderFlag" - until: [6, 3] + hiddenMetaobject: true } EnumType{ name: "Rotation" - until: [6, 3] + hiddenMetaobject: true } until: [6, 3] } diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtPdfWidgets.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtPdfWidgets.qml index 6612b02f..7f2e72a2 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtPdfWidgets.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtPdfWidgets.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtPositioning.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtPositioning.qml index 38b7338c..44c60883 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtPositioning.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtPositioning.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtPrintSupport.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtPrintSupport.qml index b0d4ac59..a8b89d5b 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtPrintSupport.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtPrintSupport.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtProtobuf.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtProtobuf.qml index 40019837..ab30c7f9 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtProtobuf.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtProtobuf.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtPurchasing.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtPurchasing.qml index 4c0a99bb..79994413 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtPurchasing.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtPurchasing.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtQml.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtQml.qml index c07cc135..8ef501a2 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtQml.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtQml.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -60,6 +60,14 @@ TypeSystem{ Rejection{ className: "QQmlTriviallyDestructibleDebuggingEnabler" } + + Rejection{ + className: "QJSListForInIterator" + } + + Rejection{ + className: "QJSListForOfIterator" + } Rejection{ className: "" @@ -410,6 +418,11 @@ TypeSystem{ remove: RemoveFlag.All since: [6, 6] } + ModifyFunction{ + signature: "to()const" + remove: RemoveFlag.All + since: [6, 6] + } since: [6, 1] } diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtQuick.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtQuick.qml index 66e791cc..fb38b18a 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtQuick.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtQuick.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -288,6 +288,13 @@ TypeSystem{ ObjectType{ name: "QQuickRenderControl" + ExtraIncludes{ + Include{ + fileName: "QtGui/rhi/qrhi.h" + location: Include.Global + } + since: 6.6 + } ModifyFunction{ signature: "renderWindow(QPoint *)" ModifyArgument{ @@ -709,7 +716,6 @@ TypeSystem{ Rejection{ enumName: "NativeObjectType" } - Rejection{ functionName: "createTextureFromNativeObject" } @@ -1415,45 +1421,85 @@ TypeSystem{ } } - ObjectType{ + ValueType{ name: "AttributeSet" InjectCode{ target: CodeClass.DestructorFunction Text{content: "delete[] %this->attributes;"} } + CustomConstructor{ + type: CustomConstructor.Legacy + Text{content: "if(copy){\n"+ + " QSGGeometry::AttributeSet* result = new(placement) QSGGeometry::AttributeSet{*copy};\n"+ + " QSGGeometry::Attribute* attributes;\n"+ + " result->attributes = attributes = copy->count>0 ? new QSGGeometry::Attribute[copy->count] : nullptr;\n"+ + " for(int i=0; icount; ++i){\n"+ + " attributes[i] = copy->attributes[i];\n"+ + " }\n"+ + " return result;\n"+ + "}else{\n"+ + " return new(placement) QSGGeometry::AttributeSet{};\n"+ + "}"} + } + CustomConstructor{ + type: CustomConstructor.Copy + Text{content: "QSGGeometry::AttributeSet* result = new(placement) QSGGeometry::AttributeSet{*copy};\n"+ + "QSGGeometry::Attribute* attributes;\n"+ + "result->attributes = attributes = copy->count>0 ? new QSGGeometry::Attribute[copy->count] : nullptr;\n"+ + "for(int i=0; icount; ++i){\n"+ + " attributes[i] = copy->attributes[i];\n"+ + "}\n"} + } + CustomConstructor{ + type: CustomConstructor.Move + Text{content: "new(placement) QSGGeometry::AttributeSet{std::move(*copy)};\n"+ + "copy->count = 0;\n"+ + "copy->attributes = nullptr;\n"+ + "copy->stride = 0;\n"} + } + CustomDestructor{ + Text{content: "delete[] ptr->attributes;\n"+ + "ptr->count = 0;\n"+ + "ptr->stride = 0;\n"+ + "ptr->attributes = nullptr;\n"+ + "ptr->~AttributeSet();\n"} + } + ModifyFunction{ - signature: "AttributeSet()" - AddArgument{ - name: "attributes" - type: "io.qt.quick.QSGGeometry$Attribute[]" - } - AddArgument{ - name: "stride" - type: "int" - } + signature: "AttributeSet(const QSGGeometry::AttributeSet&)" InjectCode{ target: CodeClass.Native position: Position.End - Text{content: "__qt_this->stride = stride;\n"+ - "__qt_this->count = %env->GetArrayLength(attributes);\n"+ - "QSGGeometry::Attribute* _attributes = new QSGGeometry::Attribute[size_t(__qt_this->count)];\n"+ - "__qt_this->attributes = _attributes;\n"+ - "for(jsize i=0; icount); ++i){\n"+ - " jobject element = %env->GetObjectArrayElement(attributes, i);\n"+ - " _attributes[i] = qtjambi_cast(%env, element);\n"+ + ArgumentMap{index: 1; metaName: "%1"} + Text{content: "QSGGeometry::Attribute* attributes;\n"+ + "__qt_this->attributes = attributes = __qt_%1.count>0 ? new QSGGeometry::Attribute[__qt_%1.count] : nullptr;\n"+ + "for(int i=0; i<__qt_%1.count; ++i){\n"+ + " attributes[i] = __qt_%1.attributes[i];\n"+ "}"} } } + ModifyField{ name: "attributes" - write: false ReplaceType{ - modifiedType: "io.qt.quick.QSGGeometry$@Nullable Attribute @NonNull[]" + modifiedType: "io.qt.quick.QSGGeometry$@NonNull Attribute @Nullable..." } ConversionRule{ codeClass: CodeClass.NativeGetter Text{content: "%out = qtjambi_array_cast(%env, %scope, %in, __qt_this->count);"} } + ConversionRule{ + codeClass: CodeClass.NativeSetter + Text{content: String.raw` +__qt_this->count = %in ? %env->GetArrayLength(jobjectArray(%in)) : 0; +QSGGeometry::Attribute* %out = __qt_this->count>0 ? new QSGGeometry::Attribute[__qt_this->count] : nullptr; +for(jsize i=0; icount); ++i){ + jobject element = %env->GetObjectArrayElement(jobjectArray(%in), i); + JavaException::check(%env QTJAMBI_STACKTRACEINFO); + %out[i] = qtjambi_cast(%env, element); +}` + } + } } ModifyField{ name: "count" @@ -1461,7 +1507,31 @@ TypeSystem{ } ModifyField{ name: "stride" - write: false + } + ModifyFunction{ + signature: "AttributeSet{int,int,const QSGGeometry::Attribute*}" + ModifyArgument{ + index: 3 + ReplaceType{ + modifiedType: "io.qt.quick.QSGGeometry$@NonNull Attribute @Nullable..." + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: String.raw` +jsize count0 = %in ? %env->GetArrayLength(%in) : 0; +QSGGeometry::Attribute* %out = count0>0 ? new QSGGeometry::Attribute[count0] : nullptr; +for(jsize i=0; iGetObjectArrayElement(%in, i); + JavaException::check(%env QTJAMBI_STACKTRACEINFO); + %out[i] = qtjambi_cast(%env, element); +}` + } + } + } + ModifyArgument{ + index: 1 + RemoveArgument{} + } } InjectCode{ target: CodeClass.Java @@ -1476,6 +1546,65 @@ TypeSystem{ ValueType{ name: "ColoredPoint2D" } + + ExtraIncludes{ + Include{ + fileName: "QtJambi/JavaAPI" + location: Include.Global + } + Include{ + fileName: "utils_p.h" + location: Include.Local + } + } + ModifyFunction{ + signature: "QSGGeometry(const QSGGeometry::AttributeSet &, int, int, int)" + ModifyArgument{ + index: 1 + NoNullPointer{ + } + ReferenceCount{ + variableName: "__rcAttributeSet" + action: ReferenceCount.Set + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: String.raw` +if(__qtjambi_is_generic) + %in = Java::QtQuick::QSGGeometry$AttributeSet::clone(%env, %in); +const QSGGeometry::AttributeSet& %out = QtJambiAPI::checkedAddressOf(%env, QtJambiAPI::convertJavaObjectToNative(%env, %in)); +if(__qtjambi_is_generic){ + if(%out.stride<=0) + JavaException::raiseIllegalArgumentException(%env, "AttributeSet stride > 0 expected" QTJAMBI_STACKTRACEINFO); + if(%out.count<=0) + JavaException::raiseIllegalArgumentException(%env, "AttributeSet count > 0 expected" QTJAMBI_STACKTRACEINFO); +} + `} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{index: 1; metaName: "%1"} + Text{content: String.raw` +if(%1.stride()<=0) + throw new IllegalArgumentException("AttributeSet stride > 0 expected"); +if(%1.count()<=0) + throw new IllegalArgumentException("AttributeSet count > 0 expected"); +%1 = %1.clone();` + } + } + } + + InjectCode{ + target: CodeClass.Java + ImportFile{ + name: ":/io/qtjambi/generator/typesystem/QtJambiQuick.java" + quoteAfterLine: "class QSGGeometry__" + quoteBeforeLine: "}// class" + } + } + ModifyFunction{ signature: "indexData() const" remove: RemoveFlag.All @@ -1524,12 +1653,6 @@ TypeSystem{ signature: "vertexDataAsTexturedPoint2D() const" remove: RemoveFlag.All } - ExtraIncludes{ - Include{ - fileName: "QtJambi/JavaAPI" - location: Include.Global - } - } ModifyFunction{ signature: "indexData()" ModifyArgument{ @@ -1575,69 +1698,11 @@ TypeSystem{ signature: "attributes()const" ModifyArgument{ index: 0 - ReplaceType{ - modifiedType: "io.qt.quick.QSGGeometry$@NonNull Attribute @NonNull[]" - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "%out = qtjambi_array_cast(%env, %scope, %in, __qt_this->attributeCount());"} - } - } - } - ModifyFunction{ - signature: "defaultAttributes_Point2D()" - ModifyArgument{ - index: 0 - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "%out = QtJambiAPI::convertNativeToJavaObjectAsWrapper(%env, &%in);"} - } - } - } - ModifyFunction{ - signature: "defaultAttributes_ColoredPoint2D()" - ModifyArgument{ - index: 0 - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "%out = QtJambiAPI::convertNativeToJavaObjectAsWrapper(%env, &%in);"} - } - } - } - ModifyFunction{ - signature: "defaultAttributes_TexturedPoint2D()" - ModifyArgument{ - index: 0 - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "%out = QtJambiAPI::convertNativeToJavaObjectAsWrapper(%env, &%in);"} - } - } - } - ModifyFunction{ - signature: "QSGGeometry(const QSGGeometry::AttributeSet &, int, int, int)" - ModifyArgument{ - index: 1 - NoNullPointer{ - } - ReferenceCount{ - variableName: "__rcAttributeSet" - action: ReferenceCount.Set - } - ConversionRule{ - codeClass: CodeClass.Native - Text{content: "const QSGGeometry::AttributeSet& %out = QtJambiAPI::checkedAddressOf(%env, QtJambiAPI::convertJavaObjectToNative(%env, %in));"} + AsArray{ + lengthExpression: "__qt_this->attributeCount()" } } } - InjectCode{ - target: CodeClass.Java - ImportFile{ - name: ":/io/qtjambi/generator/typesystem/QtJambiQuick.java" - quoteAfterLine: "class QSGGeometry__" - quoteBeforeLine: "}// class" - } - } } ObjectType{ @@ -1697,9 +1762,6 @@ TypeSystem{ ObjectType{ name: "QSGMaterialShader" - Rejection{ - functionName: "rhi" - } Rejection{ functionName: "resourceUpdateBatch" } @@ -1721,6 +1783,10 @@ TypeSystem{ EnumType{ name: "DirtyState" } + Rejection{ + functionName: "rhi" + until: 6.5 + } ModifyFunction{ signature: "uniformData()" remove: RemoveFlag.All @@ -2492,7 +2558,7 @@ TypeSystem{ InjectCode{ target: CodeClass.Native position: Position.Beginning - since: [6, 4] + since: [6, 2] Text{content: "QQuickGraphicsDevice qtjambi_QQuickGraphicsDevice_fromPhysicalDevice(JNIEnv *, jlong);\n"+ "QQuickGraphicsDevice qtjambi_QQuickGraphicsDevice_fromDeviceObjects(JNIEnv *, jlong, jlong, int, int);"} } @@ -3030,53 +3096,6 @@ TypeSystem{ since: [6, 6] } - PrimitiveType{ - name: "VkFormat" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false - since: [6, 4] - } - - PrimitiveType{ - name: "MTLTexture" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false - since: [6, 2] - } - - PrimitiveType{ - name: "MTLDevice" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false - since: [6, 2] - } - - PrimitiveType{ - name: "MTLCommandQueue" - javaName: "io.qt.QNativePointer" - jniName: "jobject" - preferredConversion: false - since: [6, 2] - } - - ObjectType{ - name: "id" - template: true - TemplateArguments{ - arguments: ["MTLTexture"] - } - since: [6, 2] - } - - ObjectType{ - name: "id" - generate: false - since: [6, 2] - } - InterfaceType{ name: "QNativeInterface::QSGMetalTexture" packageName: "io.qt.quick.nativeinterface" @@ -3231,6 +3250,19 @@ TypeSystem{ } since: [6, 2] } + + ObjectType{ + name: "QQuickRhiItem" + EnumType{ + name: "TextureFormat" + } + since: 6.7 + } + + ObjectType{ + name: "QQuickRhiItemRenderer" + since: 6.7 + } SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping *unmatched *type 'Vk*'"} } diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtQuick3D.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtQuick3D.qml index 10990650..ca77ffe9 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtQuick3D.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtQuick3D.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtQuickControls2.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtQuickControls2.qml index 2cb945c8..6ee3ae8b 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtQuickControls2.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtQuickControls2.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtQuickTest.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtQuickTest.qml index 8bd60000..656c7d19 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtQuickTest.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtQuickTest.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtQuickWidgets.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtQuickWidgets.qml index 5b6da40e..da958ae5 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtQuickWidgets.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtQuickWidgets.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtRemoteObjects.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtRemoteObjects.qml index 2dc345b3..d06fac51 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtRemoteObjects.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtRemoteObjects.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtScript.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtScript.qml index a04af74a..ef9dcde5 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtScript.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtScript.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtScriptTools.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtScriptTools.qml index a9446051..a83e326a 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtScriptTools.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtScriptTools.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtScxml.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtScxml.qml index 021c0e9e..17811078 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtScxml.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtScxml.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -463,6 +463,16 @@ TypeSystem{ ObjectType{ name: "QScxmlStateMachine" + ExtraIncludes{ + Include{ + fileName: "QtJambi/JavaAPI" + location: Include.Global + } + Include{ + fileName: "QtJambi/JObjectWrapper" + location: Include.Global + } + } Rejection{functionName: "onExit"} Rejection{functionName: "onEntry"} ModifyFunction{ @@ -517,27 +527,685 @@ TypeSystem{ } ModifyFunction{ signature: "connectToEvent(QString,const QObject*,const char*,Qt::ConnectionType)" - access: Modification.Private ModifyArgument{ index: 4 - ReplaceType{ - modifiedType: "int" + replaceType: "io.qt.core.Qt$@NonNull ConnectionType @NonNull..." + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "Qt::ConnectionType %out = Qt::AutoConnection;\n"+ + "JObjectArrayWrapper %inArray(%env, %in);\n"+ + "if(%inArray.length()>0){\n"+ + "for(jsize i=0, l=%inArray.length(); i(%inArray.at(%env, i)));\n"+ + "}\n"+ + "}"} } - RemoveDefaultExpression{ + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 3 + metaName: "slot" + } + ArgumentMap{ + index: 2 + metaName: "dest" } + Text{content: "if(slot!=null && !slot.startsWith(\"1\") && !slot.startsWith(\"2\")) {\n"+ + " io.qt.core.QMetaMethod _method = dest.metaObject().method(slot);\n"+ + " if(_method!=null && _method.isValid()) {\n"+ + " if(_method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal)\n"+ + " slot = \"2\" + _method.cppMethodSignature();\n"+ + " else\n"+ + " slot = \"1\" + _method.cppMethodSignature();\n"+ + " }\n"+ + "}"} } } ModifyFunction{ signature: "connectToState(QString,const QObject*,const char*,Qt::ConnectionType)" - access: Modification.Private ModifyArgument{ index: 4 - ReplaceType{ - modifiedType: "int" + replaceType: "io.qt.core.Qt$@NonNull ConnectionType @NonNull..." + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "Qt::ConnectionType %out = Qt::AutoConnection;\n"+ + "JObjectArrayWrapper %inArray(%env, %in);\n"+ + "if(%inArray.length()>0){\n"+ + "for(jsize i=0, l=%inArray.length(); i(%inArray.at(%env, i)));\n"+ + "}\n"+ + "}"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 3 + metaName: "slot" + } + ArgumentMap{ + index: 2 + metaName: "dest" + } + Text{content: "if(slot!=null && !slot.startsWith(\"1\") && !slot.startsWith(\"2\")) {\n"+ + " io.qt.core.QMetaMethod _method = dest.metaObject().method(slot);\n"+ + " if(_method!=null && _method.isValid()) {\n"+ + " if(_method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal)\n"+ + " slot = \"2\" + _method.cppMethodSignature();\n"+ + " else\n"+ + " slot = \"1\" + _method.cppMethodSignature();\n"+ + " }\n"+ + "}"} + } + } + FunctionalType{ + name: "Slot1" + using: "std::function" + generate: false + } + FunctionalType{ + name: "Slot1B" + using: "std::function" + generate: false + } + FunctionalType{ + name: "Slot0" + using: "std::function" + generate: false + } + ModifyFunction{ + signature: "connectToEvent(const QString&,const QtPrivate::ContextTypeForFunctor::ContextType*,Functor&&,Qt::ConnectionType)" + ModifyArgument{ + index: 0 + replaceType: "io.qt.core.QMetaObject.@NonNull Connection" + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "%out = qtjambi_cast(%env, %in);"} + } + } + ModifyArgument{ + index: 4 + replaceType: "io.qt.core.Qt$@NonNull ConnectionType @NonNull..." + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "Qt::ConnectionType %out = Qt::AutoConnection;\n"+ + "JObjectArrayWrapper %inArray(%env, %in);\n"+ + "if(%inArray.length()>0){\n"+ + " for(jsize i=0, l=%inArray.length(); i(%inArray.at(%env, i)));\n"+ + " }\n"+ + "}"} + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot1<@NonNull QScxmlEvent>" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = [slot = JObjectWrapper(%env, %in)](const QScxmlEvent& event){\n"+ + " if(JniEnvironment env{200}){\n"+ + " jobject _event = qtjambi_cast(env, event);\n"+ + " Java::QtCore::QMetaObject$Slot1::invoke(env, slot.object(), _event);\n"+ + " }\n"+ + " };"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 1 + metaName: "scxmlEventSpec" + } + ArgumentMap{ + index: 2 + metaName: "context" + } + ArgumentMap{ + index: 3 + metaName: "slot" + } + ArgumentMap{ + index: 4 + metaName: "type" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " if(metaMethod.parameterCount()!=1 && metaMethod.parameterType(0)!=io.qt.core.QMetaType.fromType(QScxmlEvent.class).id()) {\n"+ + " throw new IllegalArgumentException(\"Method does not take a single QScxmlEvent argument: \"+metaMethod.cppMethodSignature());\n"+ + " }\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " return connectToEvent(scxmlEventSpec, context, \"2\"+metaMethod.cppMethodSignature(), type);\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " return connectToEvent(scxmlEventSpec, context, \"1\"+metaMethod.cppMethodSignature(), type);\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"+ + "if(context==null)\n"+ + " context = this;\n"} + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot0" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = [slot = JObjectWrapper(%env, %in)](const QScxmlEvent&){\n"+ + " if(JniEnvironment env{200}){\n"+ + " Java::QtCore::QMetaObject$Slot0::invoke(env, slot.object());\n"+ + " }\n"+ + " };"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 1 + metaName: "scxmlEventSpec" + } + ArgumentMap{ + index: 2 + metaName: "context" + } + ArgumentMap{ + index: 3 + metaName: "slot" + } + ArgumentMap{ + index: 4 + metaName: "type" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " return connectToEvent(scxmlEventSpec, context, \"2\"+metaMethod.cppMethodSignature(), type);\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " return connectToEvent(scxmlEventSpec, context, \"1\"+metaMethod.cppMethodSignature(), type);\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"+ + "if(context==null)\n"+ + " context = this;\n"} + } + } + since: 6.6 + } + ModifyFunction{ + signature: "connectToState(const QString&,const QtPrivate::ContextTypeForFunctor::ContextType*,Functor&&,Qt::ConnectionType)" + ModifyArgument{ + index: 0 + replaceType: "io.qt.core.QMetaObject.@NonNull Connection" + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "%out = qtjambi_cast(%env, %in);"} + } + } + ModifyArgument{ + index: 4 + replaceType: "io.qt.core.Qt$@NonNull ConnectionType @NonNull..." + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "Qt::ConnectionType %out = Qt::AutoConnection;\n"+ + "JObjectArrayWrapper %inArray(%env, %in);\n"+ + "if(%inArray.length()>0){\n"+ + " for(jsize i=0, l=%inArray.length(); i(%inArray.at(%env, i)));\n"+ + " }\n"+ + "}"} + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot1<@QtPrimitiveType@NonNull Boolean>" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = [slot = JObjectWrapper(%env, %in)](bool b){\n"+ + " if(JniEnvironment env{200}){\n"+ + " Java::QtCore::QMetaObject$Slot1::invoke(env, slot.object(), Java::Runtime::Boolean::valueOf(env, b));\n"+ + " }\n"+ + " };"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 1 + metaName: "scxmlEventSpec" + } + ArgumentMap{ + index: 2 + metaName: "context" + } + ArgumentMap{ + index: 3 + metaName: "slot" + } + ArgumentMap{ + index: 4 + metaName: "type" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " if(metaMethod.parameterCount()!=1 && metaMethod.parameterType(0)!=io.qt.core.QMetaType.fromType(boolean.class).id()) {\n"+ + " throw new IllegalArgumentException(\"Method does not take a single QScxmlEvent argument: \"+metaMethod.cppMethodSignature());\n"+ + " }\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " return connectToState(scxmlEventSpec, context, \"2\"+metaMethod.cppMethodSignature(), type);\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " return connectToState(scxmlEventSpec, context, \"1\"+metaMethod.cppMethodSignature(), type);\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"+ + "if(context==null)\n"+ + " context = this;\n"} } - RemoveDefaultExpression{ + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot0" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = [slot = JObjectWrapper(%env, %in)](bool){\n"+ + " if(JniEnvironment env{200}){\n"+ + " Java::QtCore::QMetaObject$Slot0::invoke(env, slot.object());\n"+ + " }\n"+ + " };"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 1 + metaName: "scxmlEventSpec" + } + ArgumentMap{ + index: 2 + metaName: "context" + } + ArgumentMap{ + index: 3 + metaName: "slot" + } + ArgumentMap{ + index: 4 + metaName: "type" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " return connectToState(scxmlEventSpec, context, \"2\"+metaMethod.cppMethodSignature(), type);\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " return connectToState(scxmlEventSpec, context, \"1\"+metaMethod.cppMethodSignature(), type);\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"+ + "if(context==null)\n"+ + " context = this;\n"} + } + } + since: 6.6 + } + + ModifyFunction{ + signature: "connectToEvent(const QString&,const QObject*,Functor,Qt::ConnectionType)" + ModifyArgument{ + index: 0 + replaceType: "io.qt.core.QMetaObject.@NonNull Connection" + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "%out = qtjambi_cast(%env, %in);"} + } + } + ModifyArgument{ + index: 4 + replaceType: "io.qt.core.Qt$@NonNull ConnectionType @NonNull..." + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "Qt::ConnectionType %out = Qt::AutoConnection;\n"+ + "JObjectArrayWrapper %inArray(%env, %in);\n"+ + "if(%inArray.length()>0){\n"+ + " for(jsize i=0, l=%inArray.length(); i(%inArray.at(%env, i)));\n"+ + " }\n"+ + "}"} + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot1<@NonNull QScxmlEvent>" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = [slot = JObjectWrapper(%env, %in)](const QScxmlEvent& event){\n"+ + " if(JniEnvironment env{200}){\n"+ + " jobject _event = qtjambi_cast(env, event);\n"+ + " Java::QtCore::QMetaObject$Slot1::invoke(env, slot.object(), _event);\n"+ + " }\n"+ + " };"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 1 + metaName: "scxmlEventSpec" + } + ArgumentMap{ + index: 2 + metaName: "context" + } + ArgumentMap{ + index: 3 + metaName: "slot" + } + ArgumentMap{ + index: 4 + metaName: "type" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " if(metaMethod.parameterCount()!=1 && metaMethod.parameterType(0)!=io.qt.core.QMetaType.fromType(QScxmlEvent.class).id()) {\n"+ + " throw new IllegalArgumentException(\"Method does not take a single QScxmlEvent argument: \"+metaMethod.cppMethodSignature());\n"+ + " }\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " return connectToEvent(scxmlEventSpec, context, \"2\"+metaMethod.cppMethodSignature(), type);\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " return connectToEvent(scxmlEventSpec, context, \"1\"+metaMethod.cppMethodSignature(), type);\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"+ + "if(context==null)\n"+ + " context = this;\n"} + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot0" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = [slot = JObjectWrapper(%env, %in)](const QScxmlEvent&){\n"+ + " if(JniEnvironment env{200}){\n"+ + " Java::QtCore::QMetaObject$Slot0::invoke(env, slot.object());\n"+ + " }\n"+ + " };"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 1 + metaName: "scxmlEventSpec" + } + ArgumentMap{ + index: 2 + metaName: "context" + } + ArgumentMap{ + index: 3 + metaName: "slot" + } + ArgumentMap{ + index: 4 + metaName: "type" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " return connectToEvent(scxmlEventSpec, context, \"2\"+metaMethod.cppMethodSignature(), type);\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " return connectToEvent(scxmlEventSpec, context, \"1\"+metaMethod.cppMethodSignature(), type);\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"+ + "if(context==null)\n"+ + " context = this;\n"} + } + } + until: 6.5 + } + ModifyFunction{ + signature: "connectToState(const QString&,const QObject*,Functor,Qt::ConnectionType)" + ModifyArgument{ + index: 0 + replaceType: "io.qt.core.QMetaObject.@NonNull Connection" + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "%out = qtjambi_cast(%env, %in);"} + } + } + ModifyArgument{ + index: 4 + replaceType: "io.qt.core.Qt$@NonNull ConnectionType @NonNull..." + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "Qt::ConnectionType %out = Qt::AutoConnection;\n"+ + "JObjectArrayWrapper %inArray(%env, %in);\n"+ + "if(%inArray.length()>0){\n"+ + " for(jsize i=0, l=%inArray.length(); i(%inArray.at(%env, i)));\n"+ + " }\n"+ + "}"} + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot1<@QtPrimitiveType@NonNull Boolean>" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = [slot = JObjectWrapper(%env, %in)](bool b){\n"+ + " if(JniEnvironment env{200}){\n"+ + " Java::QtCore::QMetaObject$Slot1::invoke(env, slot.object(), Java::Runtime::Boolean::valueOf(env, b));\n"+ + " }\n"+ + " };"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 1 + metaName: "scxmlEventSpec" + } + ArgumentMap{ + index: 2 + metaName: "context" + } + ArgumentMap{ + index: 3 + metaName: "slot" + } + ArgumentMap{ + index: 4 + metaName: "type" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " if(metaMethod.parameterCount()!=1 && metaMethod.parameterType(0)!=io.qt.core.QMetaType.fromType(boolean.class).id()) {\n"+ + " throw new IllegalArgumentException(\"Method does not take a single QScxmlEvent argument: \"+metaMethod.cppMethodSignature());\n"+ + " }\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " return connectToState(scxmlEventSpec, context, \"2\"+metaMethod.cppMethodSignature(), type);\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " return connectToState(scxmlEventSpec, context, \"1\"+metaMethod.cppMethodSignature(), type);\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"+ + "if(context==null)\n"+ + " context = this;\n"} + } + } + Instantiation{ + Argument{ + type: "std::function" + isImplicit: true + } + ModifyArgument{ + index: 3 + NoNullPointer{} + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot0" + contextParameter: 2 + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "auto %out = [slot = JObjectWrapper(%env, %in)](bool){\n"+ + " if(JniEnvironment env{200}){\n"+ + " Java::QtCore::QMetaObject$Slot0::invoke(env, slot.object());\n"+ + " }\n"+ + " };"} + } + } + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 1 + metaName: "scxmlEventSpec" + } + ArgumentMap{ + index: 2 + metaName: "context" + } + ArgumentMap{ + index: 3 + metaName: "slot" + } + ArgumentMap{ + index: 4 + metaName: "type" + } + Text{content: "io.qt.core.QMetaMethod metaMethod = io.qt.core.QMetaMethod.fromMethod(java.util.Objects.requireNonNull(slot, \"Argument 'slot': null not expected.\"));\n"+ + "if(metaMethod!=null && metaMethod.isValid()) {\n"+ + " io.qt.core.QObject object = QtJambi_LibraryUtilities.internal.lambdaContext(slot);\n"+ + " if(context!=null && context==object) {\n"+ + " switch(metaMethod.methodType()) {\n"+ + " case Signal:\n"+ + " return connectToState(scxmlEventSpec, context, \"2\"+metaMethod.cppMethodSignature(), type);\n"+ + " case Method:\n"+ + " case Slot:\n"+ + " return connectToState(scxmlEventSpec, context, \"1\"+metaMethod.cppMethodSignature(), type);\n"+ + " default:\n"+ + " break;\n"+ + " }\n"+ + " }\n"+ + "}\n"+ + "if(context==null)\n"+ + " context = this;\n"} } } + until: 6.5 } InjectCode{ target: CodeClass.Java diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtSensors.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtSensors.qml index af0c4b83..c0fb8b37 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtSensors.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtSensors.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtSerialBus.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtSerialBus.qml index a59e8999..5812bd29 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtSerialBus.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtSerialBus.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtSerialPort.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtSerialPort.qml index d79985db..eab47ef6 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtSerialPort.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtSerialPort.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -35,44 +35,44 @@ TypeSystem{ qtLibrary: "QtSerialPort" module: "qtjambi.serialport" description: "Provides access to hardware and virtual serial ports." - EnumType{ - name: "QSerialPort::DataErrorPolicy" - } - - EnumType{ - name: "QSerialPort::BaudRate" - } - - EnumType{ - name: "QSerialPort::DataBits" - } - - EnumType{ - name: "QSerialPort::Direction" - } - - EnumType{ - name: "QSerialPort::FlowControl" - } - - EnumType{ - name: "QSerialPort::Parity" - } - - EnumType{ - name: "QSerialPort::PinoutSignal" - } - - EnumType{ - name: "QSerialPort::SerialPortError" - } - - EnumType{ - name: "QSerialPort::StopBits" - } ObjectType{ name: "QSerialPort" + EnumType{ + name: "DataErrorPolicy" + } + + EnumType{ + name: "BaudRate" + } + + EnumType{ + name: "DataBits" + } + + EnumType{ + name: "Direction" + } + + EnumType{ + name: "FlowControl" + } + + EnumType{ + name: "Parity" + } + + EnumType{ + name: "PinoutSignal" + } + + EnumType{ + name: "SerialPortError" + } + + EnumType{ + name: "StopBits" + } ModifyFunction{ signature: "handle()const" remove: RemoveFlag.All @@ -82,6 +82,18 @@ TypeSystem{ remove: RemoveFlag.All until: 5 } + ModifyFunction{ + signature: "bindableStopBits(Qt::Disambiguated_t)" + ModifyArgument{ + index: 1 + RemoveArgument{} + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "constexpr Qt::Disambiguated_t %out = Qt::Disambiguated;"} + } + } + since: 6.7 + } } ValueType{ diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtSpatialAudio.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtSpatialAudio.qml index be250056..2b157587 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtSpatialAudio.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtSpatialAudio.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtSql.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtSql.qml index 186ce4ae..84efb9eb 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtSql.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtSql.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtStateMachine.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtStateMachine.qml index b218ecc0..5be9c3c1 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtStateMachine.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtStateMachine.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtSvg.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtSvg.qml index 5dd00053..acc85729 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtSvg.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtSvg.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -35,51 +35,24 @@ TypeSystem{ qtLibrary: "QtSvg" module: "qtjambi.svg" description: "Classes for displaying the contents of SVG files. Supports a subset of the SVG 1.2 Tiny standard." - Rejection{ - className: "QGraphicsSvgItem" - enumName: "enum_1" - until: 5 - } - NamespaceType{ - name: "QSvg" - } - - EnumType{ - name: "QSvgGenerator::SvgVersion" - since: [6,5] - } - - EnumType{ - name: "QGraphicsSvgItem::enum_1" - until: 5 + name: "QtSvg" + EnumType{ + name: "Option" + } + since: 6.7 } ObjectType{ name: "QSvgRenderer" } - ObjectType{ - name: "QSvgWidget" - ExtraIncludes{ - Include{ - fileName: "QByteArray" - location: Include.Global - } - Include{ - fileName: "QSvgRenderer" - location: Include.Global - } - Include{ - fileName: "QSize" - location: Include.Global - } - } - until: 5 - } - ObjectType{ name: "QSvgGenerator" + EnumType{ + name: "SvgVersion" + since: [6,5] + } ModifyFunction{ signature: "setOutputDevice(QIODevice*)" ModifyArgument{ @@ -98,6 +71,7 @@ TypeSystem{ ObjectType{ name: "QGraphicsSvgItem" + Rejection{enumName: "enum_1"} ExtraIncludes{ Include{ fileName: "QtJambiWidgets/hashes.h" @@ -177,6 +151,25 @@ TypeSystem{ } until: 5 } + + ObjectType{ + name: "QSvgWidget" + ExtraIncludes{ + Include{ + fileName: "QByteArray" + location: Include.Global + } + Include{ + fileName: "QSvgRenderer" + location: Include.Global + } + Include{ + fileName: "QSize" + location: Include.Global + } + } + until: 5 + } SuppressedWarning{text: "WARNING(CppImplGenerator) :: protected function '*' in final class '*'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: visibility of function '*' modified in class '*'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: hiding of function '*' in class '*'"} diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtSvgWidgets.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtSvgWidgets.qml index 3e43ce4c..fa93c7d8 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtSvgWidgets.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtSvgWidgets.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -35,15 +35,6 @@ TypeSystem{ qtLibrary: "QtSvgWidgets" module: "qtjambi.svgwidgets" description: "Classes for displaying the contents of SVG files. Supports a subset of the SVG 1.2 Tiny standard." - - Rejection{ - className: "QGraphicsSvgItem" - enumName: "enum_1" - } - - EnumType{ - name: "QGraphicsSvgItem::enum_1" - } ObjectType{ name: "QSvgWidget" @@ -51,6 +42,7 @@ TypeSystem{ ObjectType{ name: "QGraphicsSvgItem" + Rejection{enumName: "enum_1"} ExtraIncludes{ Include{ fileName: "QtJambiWidgets/hashes.h" diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtTest.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtTest.qml index 18fa85f3..6d99ffba 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtTest.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtTest.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -481,6 +481,26 @@ TypeSystem{ } since: 6.7 } + ModifyFunction{ + signature: "qWaitForWindowFocused(QWindow*,QDeadlineTimer)" + ModifyArgument{ + index: 2 + ReplaceDefaultExpression{ + expression: "new io.qt.core.QDeadlineTimer(java.time.Duration.ofSeconds(5))" + } + } + since: 6.7 + } + ModifyFunction{ + signature: "qWaitForWindowFocused(QWidget*,QDeadlineTimer)" + ModifyArgument{ + index: 2 + ReplaceDefaultExpression{ + expression: "new io.qt.core.QDeadlineTimer(java.time.Duration.ofSeconds(5))" + } + } + since: 6.7 + } ModifyFunction{ signature: "addColumn(const char *, T *)" Instantiation{ @@ -1062,6 +1082,30 @@ TypeSystem{ location: Include.Local } } + ModifyFunction{ + signature: "QSignalSpy(const QObject*, const char*)" + InjectCode{ + target: CodeClass.Java + position: Position.Beginning + ArgumentMap{ + index: 2 + metaName: "slot" + } + ArgumentMap{ + index: 1 + metaName: "dest" + } + Text{content: "if(slot!=null && !slot.startsWith(\"1\") && !slot.startsWith(\"2\")) {\n"+ + " io.qt.core.QMetaMethod method = dest.metaObject().method(slot);\n"+ + " if(method!=null && method.isValid()) {\n"+ + " if(method.methodType()==io.qt.core.QMetaMethod.MethodType.Signal)\n"+ + " slot = \"2\" + method.cppMethodSignature();\n"+ + " else\n"+ + " slot = \"1\" + method.cppMethodSignature();\n"+ + " }\n"+ + "}"} + } + } ModifyFunction{ signature: "list()" access: Modification.Private diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtTextToSpeech.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtTextToSpeech.qml index 38a25918..5f4577b4 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtTextToSpeech.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtTextToSpeech.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -65,70 +65,88 @@ TypeSystem{ fileName: "utils_p.h" location: Include.Local } + Include{ + fileName: "QtJambi/JavaAPI" + location: Include.Global + since: 6.6 + } + Include{ + fileName: "QtJambi/JObjectWrapper" + location: Include.Global + since: 6.6 + } + } + + FunctionalType{ + name: "Prototype2" + using: "std::function" + generate: false + since: 6.6 + } + + FunctionalType{ + name: "Prototype1" + using: "std::function" + generate: false + since: 6.6 } ModifyFunction{ - signature: "synthesize(QString,Functor&&)" + signature: "synthesize(const QString&,const QtPrivate::ContextTypeForFunctor::ContextType*,Functor&&)" Instantiation{ Argument{ - type: "QAudioBuffer" + type: "std::function" + isImplicit: true } - proxyCall: "qtjambi_synthesize1" ModifyArgument{ - index: 2 + index: 3 NoNullPointer{} - ReplaceType{ - modifiedType: "io.qt.core.QMetaObject$Slot1" + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot2" + contextParameter: 2 } ConversionRule{ codeClass: CodeClass.Native - Text{content: "jobject %out = %in;"} + Text{content: "auto %out = [slot = JObjectWrapper(%env, %in)](const QAudioFormat& format, const QByteArray& buffer){\n"+ + " if(JniEnvironment env{200}){\n"+ + " jobject _format = QtJambiAPI::convertNativeToJavaObjectAsCopy(env, &format, Java::QtMultimedia::QAudioFormat::getClass(env));\n"+ + " jobject _buffer = qtjambi_cast(env, buffer);\n"+ + " Java::QtCore::QMetaObject$Slot2::invoke(env, slot.object(), _format, _buffer);\n"+ + " }\n"+ + " };"} } } - InjectCode{ - target: CodeClass.Java - position: Position.Beginning - ArgumentMap{metaName: "func"; index: 2} - Text{content: String.raw`if(context==null) - context = QtJambi_LibraryUtilities.internal.lambdaContext(func);`} - } - AddArgument{ - index: 2 - name: "context" - type: "io.qt.core.QObject" - } } Instantiation{ Argument{ - type: "QAudioFormat" + type: "std::function" + isImplicit: true } - proxyCall: "qtjambi_synthesize2" ModifyArgument{ - index: 2 + index: 3 NoNullPointer{} - ReplaceType{ - modifiedType: "io.qt.core.QMetaObject$Slot2" + AsSlot{ + targetType: "io.qt.core.QMetaObject$Slot1" + contextParameter: 2 } ConversionRule{ codeClass: CodeClass.Native - Text{content: "jobject %out = %in;"} + Text{content: "auto %out = [slot = JObjectWrapper(%env, %in)](const QAudioBuffer& buffer){\n"+ + " if(JniEnvironment env{200}){\n"+ + " jobject _buffer = QtJambiAPI::convertNativeToJavaObjectAsCopy(env, &buffer, Java::QtMultimedia::QAudioBuffer::getClass(env));\n"+ + " Java::QtCore::QMetaObject$Slot1::invoke(env, slot.object(), _buffer);\n"+ + " }\n"+ + " };"} } } - InjectCode{ - target: CodeClass.Java - position: Position.Beginning - ArgumentMap{metaName: "func"; index: 2} - Text{content: String.raw`if(context==null) - context = QtJambi_LibraryUtilities.internal.lambdaContext(func);`} - } - AddArgument{ - index: 2 - name: "context" - type: "io.qt.core.QObject" - } } since: 6.6 } + ModifyFunction{ + signature: "synthesize(QString,Functor&&)" + remove: RemoveFlag.All + since: 6.6 + } ModifyFunction{ signature: "findVoices(Args&&)const" remove: RemoveFlag.All @@ -139,26 +157,6 @@ TypeSystem{ position: Position.End since: 6.6 Text{content: String.raw` -/** - *

      Overloaded function for {@link #synthesize(String, io.qt.core.QObject, io.qt.core.QMetaObject.Slot1)} - * with context = null.

      - */ -@SuppressWarnings("exports") -@QtUninvokable -public final void synthesize(java.lang.@NonNull String text, io.qt.core.QMetaObject.@StrictNonNull Slot1 func){ - synthesize(text, null, func); -} - -/** - *

      Overloaded function for {@link #synthesize(String, io.qt.core.QObject, io.qt.core.QMetaObject.Slot2)} - * with context = null.

      - */ -@SuppressWarnings("exports") -@QtUninvokable -public final void synthesize(java.lang.@NonNull String text, io.qt.core.QMetaObject.@StrictNonNull Slot2 func){ - synthesize(text, null, func); -} - /** *

      See QTextToSpeech::findVoices<Args...>(Args...)

      */ diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtUiTools.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtUiTools.qml index 951c8df5..ed136afe 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtUiTools.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtUiTools.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtVirtualKeyboard.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtVirtualKeyboard.qml index d222a85f..d498ee2a 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtVirtualKeyboard.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtVirtualKeyboard.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebChannel.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebChannel.qml index 45977364..755d97dc 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebChannel.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebChannel.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebChannelQuick.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebChannelQuick.qml index 91f54de4..1c5d9852 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebChannelQuick.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebChannelQuick.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngine.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngine.qml index 1bc56af5..ec9b50bb 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngine.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngine.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngineCore.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngineCore.qml index 2cdee07b..4494bc9e 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngineCore.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngineCore.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -285,7 +285,7 @@ TypeSystem{ } ObjectType{ - name: "QWebEngineWebAuthUXRequest" + name: "QWebEngineWebAuthUxRequest" EnumType{ name: "WebAuthUXState" } @@ -647,32 +647,15 @@ TypeSystem{ name: "PersistentCookiesPolicy" } - FunctionalType{ - name: "IconAvailableCallback3" - using: "std::function" - ExtraIncludes{ - Include{ - fileName: "QtWebEngineCore/QWebEngineNotification" - location: Include.Global - } - } - } - - FunctionalType{ - name: "IconAvailableCallback2" - using: "std::function" - ExtraIncludes{ - Include{ - fileName: "QtWebEngineCore/QWebEngineNotification" - location: Include.Global - } - } - } ExtraIncludes{ Include{ fileName: "QtWebEngineCore/QWebEngineNotification" location: Include.Global } + Include{ + fileName: "QtGui/QIcon" + location: Include.Global + } Include{ fileName: "QtJambi/JavaAPI" location: Include.Global @@ -735,6 +718,89 @@ TypeSystem{ } } } + + FunctionalType{ + name: "IconAvailableCallback2" + generate: false + using: "std::function" + } + ModifyFunction{ + signature: "requestIconForIconURL(const QUrl &, int, std::function) const" + ModifyArgument{ + index: 3 + ReplaceType{ + modifiedType: "java.util.function.@Nullable BiConsumer" + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "std::function %out;\n"+ + "if(%in){\n"+ + " JObjectWrapper wrapper(%env, %in);\n"+ + " %out = [wrapper](const QIcon & icon, const QUrl & url){\n"+ + " if(JniEnvironment env{200}){\n"+ + " jobject _icon = qtjambi_cast(env, icon);\n"+ + " jobject _url = qtjambi_cast(env, url);\n"+ + " Java::Runtime::BiConsumer::accept(env, wrapper.object(), _icon, _url);\n"+ + " }\n"+ + " };\n"+ + "}"} + } + } + } + + FunctionalType{ + name: "IconAvailableCallback" + generate: false + using: "std::function" + } + ModifyFunction{ + signature: "requestIconForPageURL(const QUrl &, int, std::function) const" + ModifyArgument{ + index: 3 + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "std::function %out;\n"+ + "if(%in){\n"+ + " JObjectWrapper wrapper(%env, %in);\n"+ + " %out = [wrapper](const QIcon & icon, const QUrl & url, const QUrl & url2){\n"+ + " if(JniEnvironment env{200}){\n"+ + " jobject _icon = qtjambi_cast(env, icon);\n"+ + " jobject _url = qtjambi_cast(env, url);\n"+ + " jobject _url2 = qtjambi_cast(env, url2);\n"+ + " Java::QtWebEngineCore::QWebEngineProfile$IconAvailableCallback::accept(env, wrapper.object(), _icon, _url, _url2);\n"+ + " }\n"+ + " };\n"+ + "}"} + } + } + } + InjectCode{ + target: CodeClass.Java + Text{content: String.raw` +/** + *

      Java wrapper for Qt callable std::function<void(const QIcon&,const QUrl&,const QUrl&)>

      + */ +@FunctionalInterface +public interface IconAvailableCallback { + public void accept(io.qt.gui.@NonNull QIcon icon, io.qt.core.@NonNull QUrl url1, io.qt.core.@NonNull QUrl url2); +} + `} + } + InjectCode{ + target: CodeClass.Native + position: Position.Beginning + Text{content: String.raw` +namespace Java{ +namespace QtWebEngineCore{ +QTJAMBI_REPOSITORY_DECLARE_CLASS(QWebEngineProfile$IconAvailableCallback, + QTJAMBI_REPOSITORY_DECLARE_VOID_METHOD(accept)) +QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/webengine/core,QWebEngineProfile$IconAvailableCallback, + QTJAMBI_REPOSITORY_DEFINE_METHOD(accept,(Lio/qt/gui/QIcon;Lio/qt/core/QUrl;Lio/qt/core/QUrl;)V) + ) +} +} + `} + } since: [6, 2] } @@ -931,6 +997,35 @@ TypeSystem{ } since: [6, 2] } + + ObjectType{ + name: "QWebEngineDesktopMediaRequest" + since: 6.7 + } + ObjectType{ + name: "QWebEngineMediaSourceModel" + since: 6.7 + } + ObjectType{ + name: "QWebEngineWebAuthPinRequest" + since: 6.7 + } + ObjectType{ + name: "QWebEngineWebAuthUxRequest" + EnumType{ + name: "WebAuthUxState" + } + EnumType{ + name: "PinEntryReason" + } + EnumType{ + name: "PinEntryError" + } + EnumType{ + name: "RequestFailureReason" + } + since: 6.7 + } SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'QWebEngineClientCertificateStore::QWebEngineClientCertificateStore', unmatched parameter type 'QtWebEngineCore::ClientCertificateStoreData*'"} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping function 'QWebEngineNotification::QWebEngineNotification', unmatched parameter type 'const QSharedPointer&'"} diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngineQuick.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngineQuick.qml index c914e674..b6a28fc8 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngineQuick.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngineQuick.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngineWidgets.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngineWidgets.qml index 861196c9..84816a61 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngineWidgets.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebEngineWidgets.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -379,10 +379,11 @@ TypeSystem{ } NoNullPointer{ } - ConversionRule{ + /*ConversionRule{ codeClass: CodeClass.Shell Text{content: "%out = qtjambi_cast(%env, &%in);"} } + */ ConversionRule{ codeClass: CodeClass.Native Text{content: "QWebEngineFullScreenRequest& %out = *qtjambi_cast(%env, %in);"} @@ -637,6 +638,8 @@ TypeSystem{ ObjectType{ name: "QWebEngineFullScreenRequest" + notAssignable: true + notMoveAssignable: true until: 5 } @@ -656,6 +659,12 @@ TypeSystem{ location: Include.Global } } + + FunctionalType{ + name: "NotificationPresenter" + generate: false + using: "std::function)>" + } ModifyFunction{ signature: "installUrlSchemeHandler(QByteArray,QWebEngineUrlSchemeHandler*)" ModifyArgument{ @@ -725,19 +734,6 @@ TypeSystem{ until: 5 } - FunctionalType{ - name: "QWebEngineProfile::NotificationPresenter" - generate: false - using: "std::function)>" - ExtraIncludes{ - Include{ - fileName: "QtWebEngineCore/QWebEngineNotification" - location: Include.Global - } - } - until: 5 - } - ObjectType{ name: "QWebEngineScriptCollection" until: 5 @@ -748,49 +744,36 @@ TypeSystem{ until: 5 } - FunctionalType{ - name: "QWebEngineFullScreenRequest::BooleanConsumer" - generate: false - using: "std::function" - since: [6, 2] - } - - FunctionalType{ - name: "QWebEngineView::BooleanConsumer" - generate: false - using: "std::function" - since: [6, 2] - } - - FunctionalType{ - name: "QWebEngineView::DataConsumer" - generate: false - using: "std::function" - since: [6, 2] - } - - FunctionalType{ - name: "QWebEngineView::DataConsumer2" - generate: false - using: "std::function" - since: [6, 2] - } - - FunctionalType{ - name: "QWebEngineView::ResultConsumer" - generate: false - using: "std::function" - ExtraIncludes{ - Include{ - fileName: "QtWebEngineCore/QWebEngineFindTextResult" - location: Include.Global - } - } - since: [6, 2] - } - ObjectType{ name: "QWebEngineView" + + FunctionalType{ + name: "BooleanConsumer" + generate: false + using: "std::function" + since: [6, 2] + } + + FunctionalType{ + name: "DataConsumer" + generate: false + using: "std::function" + since: [6, 2] + } + + FunctionalType{ + name: "DataConsumer2" + generate: false + using: "std::function" + since: [6, 2] + } + + FunctionalType{ + name: "ResultConsumer" + generate: false + using: "std::function" + since: [6, 2] + } ExtraIncludes{ Include{ fileName: "QtWebEngineCore/QWebEngineFindTextResult" diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebSockets.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebSockets.qml index 8195a175..772bc95a 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebSockets.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebSockets.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebView.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebView.qml index 830b29a2..df3eef53 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtWebView.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtWebView.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtWidgets.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtWidgets.qml index d8fd03cb..9ab1169b 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtWidgets.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtWidgets.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -9831,22 +9831,22 @@ TypeSystem{ } } ModifyFunction{ - signature: "addAction(QIcon,QString,QKeySequence,Args&&)" + signature: "addAction>(QIcon,QString,QKeySequence,Args&&)" remove: RemoveFlag.All since: 6.3 } ModifyFunction{ - signature: "addAction(QString,QKeySequence,Args&&)" + signature: "addAction>(QString,QKeySequence,Args&&)" remove: RemoveFlag.All since: 6.3 } ModifyFunction{ - signature: "addAction(QIcon,QString,Args&&)" + signature: "addAction>(QIcon,QString,Args&&)" remove: RemoveFlag.All since: 6.3 } ModifyFunction{ - signature: "addAction(QString,Args&&)" + signature: "addAction>(QString,Args&&)" remove: RemoveFlag.All since: 6.3 } @@ -10793,6 +10793,38 @@ TypeSystem{ "}"} } } + until: 6.6 + } + ModifyFunction{ + signature: "getOpenFileContent(QString, std::function, QWidget*)" + threadAffinity: Affinity.UI + ModifyArgument{ + index: 2 + ReplaceType{ + modifiedType: "java.util.function.BiConsumer<@NonNull String,io.qt.core.@NonNull QByteArray>" + } + ConversionRule{ + codeClass: CodeClass.Native + Text{content: "std::function %out;\n"+ + "if(%in){\n"+ + " JObjectWrapper wrapper(%env, %in);\n"+ + " %out = [wrapper](const QString& value1,const QByteArray& value2){\n"+ + " if(JniEnvironment env{200}){\n"+ + " jstring _value1 = qtjambi_cast(env, value1);\n"+ + " jobject _value2 = qtjambi_cast(env, value2);\n"+ + " Java::Runtime::BiConsumer::accept(env, wrapper.object(), _value1, _value2);\n"+ + " }\n"+ + " };\n"+ + "}"} + } + } + ModifyArgument{ + index: 3 + ReplaceDefaultExpression{ + expression: "null" + } + } + since: 6.7 } ModifyFunction{ signature: "setIconProvider(QAbstractFileIconProvider *)" @@ -14223,6 +14255,15 @@ TypeSystem{ ObjectType{ name: "QScroller" + EnumType{ + name: "Input" + } + EnumType{ + name: "ScrollerGestureType" + } + EnumType{ + name: "State" + } ModifyFunction{ signature: "scroller(const QObject *)" remove: RemoveFlag.All @@ -14232,42 +14273,36 @@ TypeSystem{ ObjectType{ name: "QAccessibleWidget" } - - EnumType{ - name: "QScroller::Input" - } - - EnumType{ - name: "QScroller::ScrollerGestureType" - } - - EnumType{ - name: "QScroller::State" + + ObjectType{ + name: "QRhiWidget" + EnumType{ + name: "Api" + } + EnumType{ + name: "TextureFormat" + } + since: 6.7 } ValueType{ name: "QScrollerProperties" - } - - EnumType{ - name: "QScrollerProperties::FrameRates" - } - - EnumType{ - name: "QScrollerProperties::OvershootPolicy" - } - - EnumType{ - name: "QScrollerProperties::ScrollMetric" - } - - EnumType{ - name: "QOpenGLWidget::UpdateBehavior" - until: 5 + EnumType{ + name: "FrameRates" + } + EnumType{ + name: "OvershootPolicy" + } + EnumType{ + name: "ScrollMetric" + } } ObjectType{ name: "QOpenGLWidget" + EnumType{ + name: "UpdateBehavior" + } ModifyFunction{ signature: "paintGL()" isPaintMethod: true @@ -14522,4 +14557,5 @@ TypeSystem{ SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: signature 'hasEditFocus()const' for function modification in 'QWidget' not found. Possible candidates: "} SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: signature 'setEditFocus(bool)' for function modification in 'QWidget' not found. Possible candidates: "} SuppressedWarning{text: "WARNING(JavaGenerator) :: No ==/!= operator found for value type QTreeWidgetItem."} + SuppressedWarning{text: "WARNING(MetaJavaBuilder) :: skipping field 'QMessageBox::static_assert' with unmatched type ''"} } diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtWinExtras.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtWinExtras.qml index 919af71f..94ce0f67 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtWinExtras.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtWinExtras.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtX11Extras.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtX11Extras.qml index 2d5d2bbe..bcc85405 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtX11Extras.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtX11Extras.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -35,7 +35,7 @@ TypeSystem{ qtLibrary: "QtX11Extras" module: "qtjambi.x11extras" description: "Provides platform-specific APIs for X11." - defaultPPCondition: "defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)" + defaultPPCondition: "(defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_SOLARIS)" RequiredLibrary{ name: "QtGui" diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtXml.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtXml.qml index 6d168fd5..bc7a72b3 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtXml.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtXml.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtXmlPatterns.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtXmlPatterns.qml index 17a9de8e..ca816ae3 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/QtXmlPatterns.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtXmlPatterns.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/ui4.qml b/src/cpp/QtJambiGenerator/typesystem/qml/ui4.qml index 94c500ae..4538a63a 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml/ui4.qml +++ b/src/cpp/QtJambiGenerator/typesystem/qml/ui4.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_abstractobject.cpp b/src/cpp/QtJambiGenerator/typesystem/qml_abstractobject.cpp index 1f4dd46f..3416e768 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_abstractobject.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/qml_abstractobject.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qml_abstractobject.h" #include "../reporthandler.h" diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_abstractobject.h b/src/cpp/QtJambiGenerator/typesystem/qml_abstractobject.h index 503a6e95..fc6d0d9d 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_abstractobject.h +++ b/src/cpp/QtJambiGenerator/typesystem/qml_abstractobject.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef QML_ABSTRACTOBJECT_H #define QML_ABSTRACTOBJECT_H diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_include.cpp b/src/cpp/QtJambiGenerator/typesystem/qml_include.cpp index 22c41c8c..a84d7cab 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_include.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/qml_include.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qml_include.h" Include::Include(QObject *parent) diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_include.h b/src/cpp/QtJambiGenerator/typesystem/qml_include.h index 21121b5f..b5e08cd7 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_include.h +++ b/src/cpp/QtJambiGenerator/typesystem/qml_include.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef INCLUDE_H #define INCLUDE_H diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_injectcode.cpp b/src/cpp/QtJambiGenerator/typesystem/qml_injectcode.cpp index 1b0b2aba..d0309704 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_injectcode.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/qml_injectcode.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qml_injectcode.h" InjectCode::InjectCode(QObject *parent) diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_injectcode.h b/src/cpp/QtJambiGenerator/typesystem/qml_injectcode.h index 09d7f2b4..47e8438d 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_injectcode.h +++ b/src/cpp/QtJambiGenerator/typesystem/qml_injectcode.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef INJECTCODE_H #define INJECTCODE_H diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_loadtypesystem.cpp b/src/cpp/QtJambiGenerator/typesystem/qml_loadtypesystem.cpp index e0a83f48..5e17f7aa 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_loadtypesystem.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/qml_loadtypesystem.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qml_loadtypesystem.h" LoadTypeSystem::LoadTypeSystem(QObject *parent) diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_loadtypesystem.h b/src/cpp/QtJambiGenerator/typesystem/qml_loadtypesystem.h index 0df00482..a9e043ec 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_loadtypesystem.h +++ b/src/cpp/QtJambiGenerator/typesystem/qml_loadtypesystem.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef TS_LOADTYPESYSTEM_H #define TS_LOADTYPESYSTEM_H diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_modify.cpp b/src/cpp/QtJambiGenerator/typesystem/qml_modify.cpp index 1a55b42e..3b368862 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_modify.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/qml_modify.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qml_modify.h" ModifyArgument::ModifyArgument(QObject *parent) @@ -1506,3 +1537,55 @@ void AsBuffer::setLengthExpression(const QString &newLengthExpression) lengthExpression = newLengthExpression; emit lengthExpressionChanged(); } + +int AsSlot::getContextParameter() const +{ + return contextParameter; +} + +void AsSlot::setContextParameter(int newContextParameter) +{ + if (contextParameter == newContextParameter) + return; + contextParameter = newContextParameter; + emit contextParameterChanged(); +} + +bool AsSlot::getNoContext() const +{ + return noContext; +} + +void AsSlot::setNoContext(bool newNoContext) +{ + if (noContext == newNoContext) + return; + noContext = newNoContext; + emit noContextChanged(); +} + +bool AsSlot::getAddPlainDelegate() const +{ + return addPlainDelegate; +} + +void AsSlot::setAddPlainDelegate(bool newAddPlainDelegate) +{ + if (addPlainDelegate == newAddPlainDelegate) + return; + addPlainDelegate = newAddPlainDelegate; + emit addPlainDelegateChanged(); +} + +QString AsSlot::getTargetType() const +{ + return targetType; +} + +void AsSlot::setTargetType(const QString &newTargetType) +{ + if (targetType == newTargetType) + return; + targetType = newTargetType; + emit targetTypeChanged(); +} diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_modify.h b/src/cpp/QtJambiGenerator/typesystem/qml_modify.h index 5646c6e4..12e7771b 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_modify.h +++ b/src/cpp/QtJambiGenerator/typesystem/qml_modify.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef MODIFYARGUMENT_H #define MODIFYARGUMENT_H @@ -337,6 +368,44 @@ class AsArray : public AbstractObject Q_PROPERTY(QString lengthExpression READ getLengthExpression WRITE setLengthExpression NOTIFY lengthExpressionChanged FINAL) }; +class AsSlot : public AbstractObject +{ + Q_OBJECT + QML_ELEMENT +public: + explicit AsSlot(QObject *parent = nullptr):AbstractObject{parent}{} + int getContextParameter() const; + void setContextParameter(int newContextParameter); + + bool getNoContext() const; + void setNoContext(bool newNoContext); + + bool getAddPlainDelegate() const; + void setAddPlainDelegate(bool newAddPlainDelegate); + + QString getTargetType() const; + void setTargetType(const QString &newTargetType); + +signals: + void contextParameterChanged(); + + void noContextChanged(); + + void addPlainDelegateChanged(); + + void targetTypeChanged(); + +private: + QString targetType; + int contextParameter = 0; + bool noContext = false; + bool addPlainDelegate = true; + Q_PROPERTY(int contextParameter READ getContextParameter WRITE setContextParameter NOTIFY contextParameterChanged FINAL) + Q_PROPERTY(bool noContext READ getNoContext WRITE setNoContext NOTIFY noContextChanged FINAL) + Q_PROPERTY(bool addPlainDelegate READ getAddPlainDelegate WRITE setAddPlainDelegate NOTIFY addPlainDelegateChanged FINAL) + Q_PROPERTY(QString targetType READ getTargetType WRITE setTargetType NOTIFY targetTypeChanged FINAL) +}; + class ReplaceType : public AbstractObject { Q_OBJECT @@ -1178,6 +1247,7 @@ QML_DECLARE_TYPE(AddTypeParameter) QML_DECLARE_TYPE(Argument) QML_DECLARE_TYPE(AsArray) QML_DECLARE_TYPE(AsBuffer) +QML_DECLARE_TYPE(AsSlot) QML_DECLARE_TYPE(ConversionRule) QML_DECLARE_TYPE(CustomConstructor) QML_DECLARE_TYPE(CustomDestructor) diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_suppressedwarning.cpp b/src/cpp/QtJambiGenerator/typesystem/qml_suppressedwarning.cpp index d2378ba8..d8294b99 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_suppressedwarning.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/qml_suppressedwarning.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qml_suppressedwarning.h" SuppressedWarning::SuppressedWarning(QObject *parent) diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_suppressedwarning.h b/src/cpp/QtJambiGenerator/typesystem/qml_suppressedwarning.h index c2deccda..5e1f28fe 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_suppressedwarning.h +++ b/src/cpp/QtJambiGenerator/typesystem/qml_suppressedwarning.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef SUPPRESSEDWARNING_H #define SUPPRESSEDWARNING_H diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_template.cpp b/src/cpp/QtJambiGenerator/typesystem/qml_template.cpp index 858dc82b..9593ba75 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_template.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/qml_template.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qml_template.h" Template::Template(QObject *parent) diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_template.h b/src/cpp/QtJambiGenerator/typesystem/qml_template.h index 33c245d9..1d593a4c 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_template.h +++ b/src/cpp/QtJambiGenerator/typesystem/qml_template.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef TEMPLATE_H #define TEMPLATE_H diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_types.cpp b/src/cpp/QtJambiGenerator/typesystem/qml_types.cpp index d8b6f477..cf3f8807 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_types.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/qml_types.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qml_types.h" const QString &PrimitiveType::getJavaName() const @@ -526,6 +557,45 @@ void ComplexType::setNoImplicitConstructors(bool newNoImplicitConstructors) emit noImplicitConstructorsChanged(); } +bool ComplexType::getNotAssignable() const +{ + return notAssignable; +} + +void ComplexType::setNotAssignable(bool newNotAssignable) +{ + if (notAssignable == newNotAssignable) + return; + notAssignable = newNotAssignable; + emit notAssignableChanged(); +} + +bool ComplexType::getNotMoveAssignable() const +{ + return notMoveAssignable; +} + +void ComplexType::setNotMoveAssignable(bool newNotMoveAssignable) +{ + if (notMoveAssignable == newNotMoveAssignable) + return; + notMoveAssignable = newNotMoveAssignable; + emit notMoveAssignableChanged(); +} + +bool ComplexType::getNotCloneable() const +{ + return notCloneable; +} + +void ComplexType::setNotCloneable(bool newNotCloneable) +{ + if (notCloneable == newNotCloneable) + return; + notCloneable = newNotCloneable; + emit notCloneableChanged(); +} + bool ValueType::getIsPolymorphicBase() const { return isPolymorphicBase; @@ -748,3 +818,42 @@ void NamespaceType::setHasMetaObject(bool newHasMetaObject) m_hasMetaObject = newHasMetaObject; emit hasMetaObjectChanged(); } + +bool TypeAliasType::getAsNativePointer() const +{ + return asNativePointer; +} + +void TypeAliasType::setAsNativePointer(bool newAsNativePointer) +{ + if (asNativePointer == newAsNativePointer) + return; + asNativePointer = newAsNativePointer; + emit asNativePointerChanged(); +} + +QString TypeAliasType::getPpCondition() const +{ + return ppCondition; +} + +void TypeAliasType::setPpCondition(const QString &newPpCondition) +{ + if (ppCondition == newPpCondition) + return; + ppCondition = newPpCondition; + emit ppConditionChanged(); +} + +QString NativePointerType::getPpCondition() const +{ + return ppCondition; +} + +void NativePointerType::setPpCondition(const QString &newPpCondition) +{ + if (ppCondition == newPpCondition) + return; + ppCondition = newPpCondition; + emit ppConditionChanged(); +} diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_types.h b/src/cpp/QtJambiGenerator/typesystem/qml_types.h index 4f76fb13..e448f31d 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_types.h +++ b/src/cpp/QtJambiGenerator/typesystem/qml_types.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef PRIMITIVETYPE_H #define PRIMITIVETYPE_H @@ -135,6 +166,15 @@ class ComplexType : public AbstractType bool getNoImplicitConstructors() const; void setNoImplicitConstructors(bool newNoImplicitConstructors); + bool getNotAssignable() const; + void setNotAssignable(bool newNotAssignable); + + bool getNotMoveAssignable() const; + void setNotMoveAssignable(bool newNotMoveAssignable); + + bool getNotCloneable() const; + void setNotCloneable(bool newNotCloneable); + signals: void packageNameChanged(); @@ -174,6 +214,12 @@ class ComplexType : public AbstractType void noImplicitConstructorsChanged(); + void notAssignableChanged(); + + void notMoveAssignableChanged(); + + void notCloneableChanged(); + private: QString packageName; QString implementing; @@ -194,6 +240,9 @@ class ComplexType : public AbstractType QString ppCondition; bool noMetaType = false; bool noImplicitConstructors = false; + bool notAssignable = false; + bool notMoveAssignable = false; + bool notCloneable = false; Q_PROPERTY(QString packageName READ getPackageName WRITE setPackageName NOTIFY packageNameChanged) Q_PROPERTY(QString implementing READ getImplementing WRITE setImplementing NOTIFY implementingChanged) Q_PROPERTY(QString using READ getUsing WRITE setUsing NOTIFY usingChanged) @@ -213,6 +262,9 @@ class ComplexType : public AbstractType Q_PROPERTY(QString ppCondition READ getPpCondition WRITE setPpCondition NOTIFY ppConditionChanged) Q_PROPERTY(bool noMetaType READ getNoMetaType WRITE setNoMetaType NOTIFY noMetaTypeChanged) Q_PROPERTY(bool noImplicitConstructors READ getNoImplicitConstructors WRITE setNoImplicitConstructors NOTIFY noImplicitConstructorsChanged FINAL) + Q_PROPERTY(bool notAssignable READ getNotAssignable WRITE setNotAssignable NOTIFY notAssignableChanged FINAL) + Q_PROPERTY(bool notMoveAssignable READ getNotMoveAssignable WRITE setNotMoveAssignable NOTIFY notMoveAssignableChanged FINAL) + Q_PROPERTY(bool notCloneable READ getNotCloneable WRITE setNotCloneable NOTIFY notCloneableChanged FINAL) }; class ObjectType : public ComplexType @@ -397,8 +449,39 @@ class TypeAliasType : public AbstractType QML_ELEMENT public: explicit TypeAliasType(QObject *parent = nullptr):AbstractType{parent}{} + bool getAsNativePointer() const; + void setAsNativePointer(bool newAsNativePointer); + + QString getPpCondition() const; + void setPpCondition(const QString &newPpCondition); + signals: + void asNativePointerChanged(); + + void ppConditionChanged(); + private: + bool asNativePointer = false; + QString ppCondition; + Q_PROPERTY(bool asNativePointer READ getAsNativePointer WRITE setAsNativePointer NOTIFY asNativePointerChanged FINAL) + Q_PROPERTY(QString ppCondition READ getPpCondition WRITE setPpCondition NOTIFY ppConditionChanged FINAL) +}; + +class NativePointerType : public AbstractType +{ + Q_OBJECT + QML_ELEMENT +public: + explicit NativePointerType(QObject *parent = nullptr):AbstractType{parent}{} + QString getPpCondition() const; + void setPpCondition(const QString &newPpCondition); + +signals: + void ppConditionChanged(); + +private: + QString ppCondition; + Q_PROPERTY(QString ppCondition READ getPpCondition WRITE setPpCondition NOTIFY ppConditionChanged FINAL) }; class InterfaceType : public ComplexType @@ -551,5 +634,6 @@ QML_DECLARE_TYPE(IteratorType) QML_DECLARE_TYPE(PrimitiveType) QML_DECLARE_TYPE(TemplateType) QML_DECLARE_TYPE(TypeAliasType) +QML_DECLARE_TYPE(NativePointerType) #endif // PRIMITIVETYPE_H diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_typesystem.cpp b/src/cpp/QtJambiGenerator/typesystem/qml_typesystem.cpp index bd9940e4..225e3d7e 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_typesystem.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/qml_typesystem.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "qml_typesystem.h" TypeSystem::TypeSystem(QObject *parent) diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_typesystem.h b/src/cpp/QtJambiGenerator/typesystem/qml_typesystem.h index 185eebb6..2594f8a7 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qml_typesystem.h +++ b/src/cpp/QtJambiGenerator/typesystem/qml_typesystem.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef TS_TYPESYSTEM_H #define TS_TYPESYSTEM_H diff --git a/src/cpp/QtJambiGenerator/typesystem/qmltypesystemreader.cpp b/src/cpp/QtJambiGenerator/typesystem/qmltypesystemreader.cpp index 6ea987d5..5136b404 100644 --- a/src/cpp/QtJambiGenerator/typesystem/qmltypesystemreader.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/qmltypesystemreader.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -77,6 +77,11 @@ typedef TS::NamespaceTypeEntry NamespaceTypeEntry; typedef TS::ValueTypeEntry ValueTypeEntry; typedef TS::ImplementorTypeEntry ImplementorTypeEntry; typedef TS::AliasTypeEntry AliasTypeEntry; +typedef TS::NativePointerTypeEntry NativePointerTypeEntry; + +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) +#define qAsConst std::as_const +#endif class QmlTypeSystemReaderPrivate { struct NameSpacePrefix{ @@ -110,6 +115,7 @@ class QmlTypeSystemReaderPrivate { void parseTemplate(Template* element); void parseTemplateArguments(TemplateArguments* element, ComplexTypeEntry* entry); void parsePrimitiveType(const QString& nameSpace, PrimitiveType* element); + void parseNativePointerType(const QString& nameSpace, NativePointerType* element); void parseObjectType(const QString& nameSpace, ObjectType* element); void parseAttributesOfComplexType(ComplexType* element, ComplexTypeEntry* entry); QList parseChildrenOfComplexType(const QString& nameSpace, ComplexType* element, ComplexTypeEntry* entry); @@ -175,23 +181,25 @@ void QmlTypeSystemReaderPrivate::parse(const QString &filepath){ obj->setParent(&engine); if(TypeSystem* typeSystem = qobject_cast(obj)){ parseTypeSystem(typeSystem, QFileInfo(filepath).fileName()); - for(TypeSystemTypeEntry* entry : m_requiredModules.keys()){ - for(const QString& libraryName : m_requiredModules.values(entry)){ + const auto keys = m_requiredModules.keys(); + for(TypeSystemTypeEntry* entry : keys){ + const auto values = m_requiredModules.values(entry); + for(const QString& libraryName : values){ if(TypeSystemTypeEntry* ts = TypeDatabase::instance()->findTypeSystem(libraryName)){ entry->addRequiredTypeSystem(ts); }else{ - TypesystemException::raise(QString("Unable to find required package %1 (%2)").arg(libraryName, url.toString())); + TypesystemException::raise(QStringLiteral(u"Unable to find required package %1 (%2)").arg(libraryName, url.toString())); } } } return; }else if(obj){ - TypesystemException::raise(QString("QML Error: %1 defined in %2. Expected: TypeSystem. %2").arg(obj->metaObject()->className(), url.toString(), component.errorString())); + TypesystemException::raise(QStringLiteral(u"QML Error: %1 defined in %2. Expected: TypeSystem. %2").arg(obj->metaObject()->className(), url.toString(), component.errorString())); }else{ - TypesystemException::raise(QString("QML Error: No TypeSystem defined in %1 %2").arg(url.toString(), component.errorString())); + TypesystemException::raise(QStringLiteral(u"QML Error: No TypeSystem defined in %1 %2").arg(url.toString(), component.errorString())); } }else{ - TypesystemException::raise(QString("QML Error: %1 in %2").arg(component.errorString(), url.toString())); + TypesystemException::raise(QStringLiteral(u"QML Error: %1 in %2").arg(component.errorString(), url.toString())); } } @@ -223,13 +231,13 @@ void QmlTypeSystemReaderPrivate::parseTypeSystem(TypeSystem* typeSystem, const Q if(Module* mod = qobject_cast(item)){ if (checkQtVersion(mod)){ if(!moduleName.isEmpty()) - TypesystemException::raise(QStringLiteral("Duplicate module name specification")); + TypesystemException::raise(QStringLiteral(u"Duplicate module name specification")); moduleName = mod->getName(); } }else if(Description* desc = qobject_cast(item)){ if (checkQtVersion(desc)){ if(!description.isEmpty()) - TypesystemException::raise(QStringLiteral("Duplicate description specification")); + TypesystemException::raise(QStringLiteral(u"Duplicate description specification")); description = desc->getText(); } } @@ -240,7 +248,7 @@ void QmlTypeSystemReaderPrivate::parseTypeSystem(TypeSystem* typeSystem, const Q entry->setTargetName(typeSystem->getTargetName()); entry->setNoExports(noExports); entry->setDescription(description); - entry->setCodeGeneration(m_generate); + entry->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); //qDebug()<<"Adding element->entry (root)"<entry->name(); ReportHandler::debugTypes("Adding to TypeDatabase(3): " + entry->name()); TypeDatabase::instance()->addType(entry); @@ -248,8 +256,10 @@ void QmlTypeSystemReaderPrivate::parseTypeSystem(TypeSystem* typeSystem, const Q AbstractObject* item = childrenList[i]; if(Module* mod = qobject_cast(item)){ // already handled above + Q_UNUSED(mod) }else if(Description* desc = qobject_cast(item)){ // already handled above + Q_UNUSED(desc) }else if(RequiredLibrary* reqLib = qobject_cast(item)){ if (checkQtVersion(reqLib)){ QString libraryName = reqLib->getName(); @@ -292,6 +302,8 @@ void QmlTypeSystemReaderPrivate::parseTypeSystem(TypeSystem* typeSystem, const Q parseRejection(childElement); }else if(PrimitiveType* childElement = qobject_cast(item)){ parsePrimitiveType({}, childElement); + }else if(NativePointerType* childElement = qobject_cast(item)){ + parseNativePointerType({}, childElement); }else if(ObjectType* childElement = qobject_cast(item)){ parseObjectType({}, childElement); }else if(TemplateType* childElement = qobject_cast(item)){ @@ -341,13 +353,13 @@ void QmlTypeSystemReaderPrivate::parseTypeSystem(TypeSystem* typeSystem, const Q }else if(ModifyFunction* childElement = qobject_cast(item)){ parseModifyFunction(childElement, entry); }else{ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of element %2").arg(item->metaObject()->className(), typeSystem->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of element %2").arg(item->metaObject()->className(), typeSystem->metaObject()->className())); } } m_namespacePrefixes = currentNamespacePrefixes; } }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 in file %2").arg(QLatin1String(exn.what()), fileName)); + TypesystemException::raise(QStringLiteral(u"%1 in file %2").arg(QLatin1String(exn.what()), fileName)); } } @@ -366,7 +378,7 @@ void QmlTypeSystemReaderPrivate::parseSuppressedWarning(SuppressedWarning* eleme else m_database->addSuppressedWarning(element->getText()); for(AbstractObject* item : element->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); } } } @@ -375,7 +387,7 @@ TS::Include QmlTypeSystemReaderPrivate::parseInclude(Include* element){ TS::Include incl; if (checkQtVersion(element)){ QString fileName = element->getFileName(); - QString ppCondition = element->getPpCondition(); + //QString ppCondition = element->getPpCondition(); incl.inherited = element->getInherited(); incl.suppressed = element->getSuppressed(); incl.ckeckAvailability = element->getCkeckAvailability(); @@ -391,12 +403,12 @@ TS::Include QmlTypeSystemReaderPrivate::parseInclude(Include* element){ }; if (!locationNames.contains(element->getLocation())) { - TypesystemException::raise(QString("Location not recognized: '%1' referred by Include").arg(element->getLocation())); + TypesystemException::raise(QStringLiteral(u"Location not recognized: '%1' referred by Include").arg(element->getLocation())); } incl.type = locationNames[element->getLocation()]; incl.name = fileName; for(AbstractObject* item : element->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); } } return incl; @@ -424,7 +436,7 @@ void QmlTypeSystemReaderPrivate::parseExtraIncludes(ExtraIncludes* element, Type } } }else{ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); } } } @@ -434,7 +446,7 @@ void QmlTypeSystemReaderPrivate::parseTemplateArguments(TemplateArguments* eleme if (checkQtVersion(element)){ entry->addInstantiation(element->getArguments()); for(AbstractObject* item : element->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); } } } @@ -454,11 +466,11 @@ void QmlTypeSystemReaderPrivate::parseTemplate(Template* element){ if (checkQtVersion(childElement)){ entry->addCode(childElement->getContent()); for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } }else{ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of Template").arg(item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of Template").arg(item->metaObject()->className())); } } m_database->addTemplate(entry.release()); @@ -560,9 +572,10 @@ void QmlTypeSystemReaderPrivate::parseInjectCode(InjectCode* element,const QHash if((snip.position==CodeSnip::Equals || snip.position==CodeSnip::Compare || snip.position==CodeSnip::HashCode) && snip.language!=TS::TargetLangCode){ - QMetaEnum metaEnum1 = Position::staticMetaObject.enumerator(Position::staticMetaObject.indexOfEnumerator("Entries")); - QMetaEnum metaEnum2 = CodeClass::staticMetaObject.enumerator(CodeClass::staticMetaObject.indexOfEnumerator("Entries")); - TypesystemException::raise(QString("InjectCode{position: Position.%1; target: CodeClass.%2} invalid property combination for code injection").arg(metaEnum1.valueToKey(int(position)), metaEnum2.valueToKey(int(className)))); + auto indexOfEnumerator = &QMetaObject::indexOfEnumerator; + QMetaEnum metaEnum1 = Position::staticMetaObject.enumerator((Position::staticMetaObject.*indexOfEnumerator)("Entries")); + QMetaEnum metaEnum2 = CodeClass::staticMetaObject.enumerator((CodeClass::staticMetaObject.*indexOfEnumerator)("Entries")); + TypesystemException::raise(QStringLiteral(u"InjectCode{position: Position.%1; target: CodeClass.%2} invalid property combination for code injection").arg(metaEnum1.valueToKey(int(position)), metaEnum2.valueToKey(int(className)))); } const QList& childrenList = element->childrenList(); @@ -573,15 +586,15 @@ void QmlTypeSystemReaderPrivate::parseInjectCode(InjectCode* element,const QHash if (checkQtVersion(map)){ int pos = map->getIndex(); if (pos < 0) { - TypesystemException::raise(QString("Argument index must be a positive number")); + TypesystemException::raise(QStringLiteral(u"Argument index must be a positive number")); } QString meta_name = map->getMetaName(); if (meta_name.isEmpty()) { - TypesystemException::raise(QString("Argument meta-name must not be empty")); + TypesystemException::raise(QStringLiteral(u"Argument meta-name must not be empty")); } snip.argumentMap[pos] = meta_name; for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } }else if(InsertTemplate* childElement = qobject_cast(item)){ @@ -591,7 +604,7 @@ void QmlTypeSystemReaderPrivate::parseInjectCode(InjectCode* element,const QHash }else if(Text* childElement = qobject_cast(item)){ snip.addCode(childElement->getContent()); }else{ - TypesystemException::raise(QString("Unexpected tag %2").arg(item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected tag %2").arg(item->metaObject()->className())); } } appendCodeSnip(subTypeSystem, snip); @@ -609,7 +622,7 @@ void QmlTypeSystemReaderPrivate::parseInsertTemplate(InsertTemplate* element, co if (checkQtVersion(childElement)){ templateInstance->addReplaceRule(childElement->getFrom(), childElement->getTo()); for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } } @@ -622,7 +635,7 @@ void QmlTypeSystemReaderPrivate::parseImportFile(ImportFile* element, const std: if (checkQtVersion(element)){ QString fileName = element->getName(); if (fileName.isEmpty()) { - TypesystemException::raise(QString("Required attribute 'name' missing for element ImportFile")); + TypesystemException::raise(QStringLiteral(u"Required attribute 'name' missing for element ImportFile")); } QFile file(fileName); @@ -631,7 +644,7 @@ void QmlTypeSystemReaderPrivate::parseImportFile(ImportFile* element, const std: // Resolve QString filepath = resolveFilePath(fileName, 0, m_importInputDirectoryList); if(filepath.isNull()) { - TypesystemException::raise(QString("Could not resolve file path '%1'").arg(fileName)); + TypesystemException::raise(QStringLiteral(u"Could not resolve file path '%1'").arg(fileName)); } file.setFileName(filepath); } @@ -641,7 +654,7 @@ void QmlTypeSystemReaderPrivate::parseImportFile(ImportFile* element, const std: file.setFileName(":/io/qt/generator/" + fileName); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { #endif - TypesystemException::raise(QString("Could not open file '%1'").arg(fileName)); + TypesystemException::raise(QStringLiteral(u"Could not open file '%1'").arg(fileName)); #if 0 } #endif @@ -713,15 +726,15 @@ void QmlTypeSystemReaderPrivate::parseImportFile(ImportFile* element, const std: consumeCode(lines.join("\n") + "\n"); } if (!foundFromOk || !foundToOk) { - QString fromError = QString("Could not find quote-after-line='%1' in file '%2'.").arg(quoteFrom).arg(fileName); - QString toError = QString("Could not find quote-before-line='%1' closing quote-after-line='%2' in file '%3'.").arg(quoteTo).arg(quoteFrom).arg(fileName); + QString fromError = QStringLiteral(u"Could not find quote-after-line='%1' in file '%2'.").arg(quoteFrom, fileName); + QString toError = QStringLiteral(u"Could not find quote-before-line='%1' closing quote-after-line='%2' in file '%3'.").arg(quoteTo, quoteFrom, fileName); if (!foundToOk) TypesystemException::raise(toError); if (!foundFromOk) TypesystemException::raise(fromError); if (!foundFromOk && !foundToOk) - TypesystemException::raise(QString("%1 %2").arg(fromError, toError)); + TypesystemException::raise(QStringLiteral(u"%1 %2").arg(fromError, toError)); } @@ -731,13 +744,13 @@ void QmlTypeSystemReaderPrivate::parseImportFile(ImportFile* element, const std: void QmlTypeSystemReaderPrivate::parseLoadTypeSystem(LoadTypeSystem* loadTypeSystem){ if (checkQtVersion(loadTypeSystem)){ for(AbstractObject* item : loadTypeSystem->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item->metaObject()->className(), loadTypeSystem->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item->metaObject()->className(), loadTypeSystem->metaObject()->className())); } QString name = loadTypeSystem->getName(); if (name.isEmpty()) { - TypesystemException::raise(QString("No typesystem name specified")); + TypesystemException::raise(QStringLiteral(u"No typesystem name specified")); } - bool generated = loadTypeSystem->getGenerate() && m_generate==TypeEntry::GenerateAll; + bool generated = loadTypeSystem->getGenerate() && (m_generate & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll; bool optional = loadTypeSystem->getOptional(); m_database->parseFile(name, m_importInputDirectoryList, m_typesystemDirectoryList, generated, optional); } @@ -750,11 +763,11 @@ void QmlTypeSystemReaderPrivate::parseRejection(Rejection* element){ QString field = element->getFieldName(); QString enum_ = element->getEnumName(); if (cls == "*" && function.isEmpty() && field.isEmpty() && enum_.isEmpty()) { - TypesystemException::raise(QString("bad reject entry, neither 'className', 'functionName' nor 'fieldName'")); + TypesystemException::raise(QStringLiteral(u"bad reject entry, neither 'className', 'functionName' nor 'fieldName'")); } m_database->addRejection(cls, function, field, enum_); for(AbstractObject* item2 : element->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), element->metaObject()->className())); } } } @@ -766,7 +779,7 @@ void QmlTypeSystemReaderPrivate::parsePrimitiveType(const QString& nameSpace, Pr name = nameSpace+"::"+name; try{ if (name.isEmpty()) { - TypesystemException::raise(QString("No 'name' attribute specified for element PrimitiveType")); + TypesystemException::raise(QStringLiteral(u"No 'name' attribute specified for element PrimitiveType")); } QString java_name = element->getJavaName(); QString jni_name = element->getJniName(); @@ -775,7 +788,7 @@ void QmlTypeSystemReaderPrivate::parsePrimitiveType(const QString& nameSpace, Pr if (jni_name.isEmpty()) jni_name = name; PrimitiveTypeEntry *entry = new PrimitiveTypeEntry(name, m_defaultPackage); - entry->setCodeGeneration(m_generate); + entry->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); entry->setTargetLangName(java_name); entry->setJniName(jni_name); @@ -785,10 +798,32 @@ void QmlTypeSystemReaderPrivate::parsePrimitiveType(const QString& nameSpace, Pr ReportHandler::debugTypes("Adding to TypeDatabase(2): " + entry->name()); m_database->addType(entry); for(AbstractObject* item2 : element->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), element->metaObject()->className())); + } + }catch(const TypesystemException& exn){ + TypesystemException::raise(QStringLiteral(u"%1 of type %2").arg(QLatin1String(exn.what()), name)); + } + } +} + +void QmlTypeSystemReaderPrivate::parseNativePointerType(const QString& nameSpace, NativePointerType* element){ + if (checkQtVersion(element)){ + QString name = element->getName(); + if(!nameSpace.isEmpty()) + name = nameSpace+"::"+name; + try{ + if (name.isEmpty()) { + TypesystemException::raise(QStringLiteral(u"No 'name' attribute specified for element PrimitiveType")); + } + NativePointerTypeEntry *entry = new NativePointerTypeEntry(name); + entry->setPPCondition(element->getPpCondition()); + ReportHandler::debugTypes("Adding to TypeDatabase(2): " + entry->name()); + m_database->addType(entry); + for(AbstractObject* item2 : element->childrenList()){ + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), element->metaObject()->className())); } }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 of type %2").arg(QLatin1String(exn.what()), name)); + TypesystemException::raise(QStringLiteral(u"%1 of type %2").arg(QLatin1String(exn.what()), name)); } } } @@ -797,7 +832,7 @@ void QmlTypeSystemReaderPrivate::parseAttributesOfComplexType(ComplexType* eleme QString package = element->getPackageName().isEmpty() ? m_defaultPackage : element->getPackageName(); QString ppCondition = element->getPpCondition().isEmpty() ? m_defaultPPCondition : element->getPpCondition(); QString implements = element->getImplementing(); - QString _using = element->getUsing(); + //QString _using = element->getUsing(); QString javaName = element->getJavaName(); QString defaultSuperclass = element->getDefaultSuperClass(); QString extendType = element->getExtendType(); @@ -828,6 +863,9 @@ void QmlTypeSystemReaderPrivate::parseAttributesOfComplexType(ComplexType* eleme if (element->getDeprecated()) ctype->setDeprecated(); ctype->setNoImplicitConstructors(element->getNoImplicitConstructors()); + ctype->setNotAssignable(element->getNotAssignable()); + ctype->setNotMoveAssignable(element->getNotMoveAssignable()); + ctype->setNotCloneable(element->getNotCloneable()); if(!ctype->isNamespace() && !ctype->isIterator()){ QString threadAffine = element->getThreadAffinity(); if (!threadAffine.trimmed().isEmpty()){ @@ -841,32 +879,32 @@ void QmlTypeSystemReaderPrivate::parseAttributesOfComplexType(ComplexType* eleme if(element->getIsNativeInterface()){ ctype->setGenericClass(element->getIsGeneric()); ctype->setNativeInterface(true); - if(m_generate==TypeEntry::GenerateAll){ + if((m_generate & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll){ if((generate.userType()==QMetaType::QString && generate.value()=="no-shell") || (generate.userType()==QMetaType::Bool && generate.value())){ ctype->setCodeGeneration(TypeEntry::GenerateNoShell | TypeEntry::GenerateAll); }else{ ctype->setCodeGeneration(TypeEntry::GenerateForSubclass); } }else - ctype->setCodeGeneration(m_generate); + ctype->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); }else if(element->getTemplate()){ ctype->setTemplate(true); ctype->setGenericClass(true); - if(m_generate==TypeEntry::GenerateAll) + if((m_generate & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll) ctype->setCodeGeneration(TypeEntry::GenerateForSubclass); else - ctype->setCodeGeneration(m_generate); + ctype->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); }else{ ctype->setGenericClass(element->getIsGeneric()); - if(m_generate==TypeEntry::GenerateAll){ + if((m_generate & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll){ if(generate.userType()==QMetaType::QString && generate.value()=="no-shell"){ ctype->setCodeGeneration(TypeEntry::GenerateNoShell | TypeEntry::GenerateAll); }else if (generate.userType()==QMetaType::Bool && !generate.value()) ctype->setCodeGeneration(TypeEntry::GenerateForSubclass); else - ctype->setCodeGeneration(m_generate); + ctype->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); }else - ctype->setCodeGeneration(m_generate); + ctype->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); } ctype->setTargetTypeSystem(m_defaultPackage); ctype->setTargetLangPackage(package); @@ -938,9 +976,9 @@ void QmlTypeSystemReaderPrivate::parseObjectType(const QString& nameSpace, Objec entry->setIsPolymorphicBase(element->getIsPolymorphicBase()); entry->setPolymorphicIdValue(element->getPolymorphicIdExpression()); parseAttributesOfComplexType(element, entry.get()); - QList unhandledElements = parseChildrenOfComplexType(nameSpace, element, entry.get()); + const QList unhandledElements = parseChildrenOfComplexType(nameSpace, element, entry.get()); for(AbstractObject* unhandledElement : unhandledElements){ - TypesystemException::raise(QString("Unexpected child element %1 in %2.").arg(unhandledElement->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected child element %1 in %2.").arg(unhandledElement->metaObject()->className(), element->metaObject()->className())); } if(name.endsWith(">")){ auto idx = name.indexOf('<'); @@ -953,20 +991,20 @@ void QmlTypeSystemReaderPrivate::parseObjectType(const QString& nameSpace, Objec entry->setTargetLangName(templateType->targetLangName()); templateType->addInstantiation(templateArguments, entry.release()); }else{ - TypesystemException::raise(QString("Template %1<%2> already defined").arg(templateName).arg(templateArguments.join(","))); + TypesystemException::raise(QStringLiteral(u"Template %1<%2> already defined").arg(templateName, templateArguments.join(","))); } }else{ - TypesystemException::raise(QString("Type %1 not a template").arg(templateName)); + TypesystemException::raise(QStringLiteral(u"Type %1 not a template").arg(templateName)); } }else{ - TypesystemException::raise(QString("Template %1 not found").arg(templateName)); + TypesystemException::raise(QStringLiteral(u"Template %1 not found").arg(templateName)); } }else{ ReportHandler::debugTypes("Adding to TypeDatabase(2): " + entry->name()); m_database->addType(entry.release()); } }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 of type %2").arg(QLatin1String(exn.what()), name)); + TypesystemException::raise(QStringLiteral(u"%1 of type %2").arg(QLatin1String(exn.what()), name)); } } } @@ -1001,7 +1039,7 @@ QList QmlTypeSystemReaderPrivate::parseChildrenOfComplexType(co parseTemplate(childElement); }else if(TemplateArguments* childElement = qobject_cast(item)){ if(!entry->isTemplate()) - TypesystemException::raise(QString("Unexpected element Instantiation as child of non-template")); + TypesystemException::raise(QStringLiteral(u"Unexpected element Instantiation as child of non-template")); parseTemplateArguments(childElement, entry); }else if(ModifyFunction* childElement = qobject_cast(item)){ parseModifyFunction(childElement, entry); @@ -1048,23 +1086,23 @@ QList QmlTypeSystemReaderPrivate::parseChildrenOfComplexType(co } } }else{ - TypesystemException::raise(QString("Unable to find template-type '%1'.").arg(name)); + TypesystemException::raise(QStringLiteral(u"Unable to find template-type '%1'.").arg(name)); } } }else if(InterfacePolymorphy* childElement = qobject_cast(item)){ if(entry->isValue() || entry->isObject() || entry->isInterface()){ if (checkQtVersion(childElement)){ if(childElement->getInterfaceType().isEmpty()) - TypesystemException::raise(QString("No interfaceType specified for InterfacePolymorphy")); + TypesystemException::raise(QStringLiteral(u"No interfaceType specified for InterfacePolymorphy")); entry->addInterfacePolymorphicIdValue(childElement->getInterfaceType(), childElement->getCondition()); if(entry->designatedInterface()) entry->designatedInterface()->addInterfacePolymorphicIdValue(childElement->getInterfaceType(), childElement->getCondition()); } }else{ - TypesystemException::raise(QString("Unexpected child element InterfacePolymorphy of %1.").arg(element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected child element InterfacePolymorphy of %1.").arg(element->metaObject()->className())); } }else if(CustomConstructor* childElement = qobject_cast(item)){ - if(entry->isValue() || (entry->isInterface() && dynamic_cast(entry)->origin()->isValue())){ + //if(entry->isValue() || (entry->isInterface() && dynamic_cast(entry)->origin()->isValue())){ if (checkQtVersion(childElement)){ CustomFunction func = parseCustomStructor(childElement); func.name = childElement->getName(); @@ -1085,11 +1123,11 @@ QList QmlTypeSystemReaderPrivate::parseChildrenOfComplexType(co if(entry->designatedInterface()) entry->designatedInterface()->setCustomConstructor(func, types[childElement->getType()]); } - }else{ - TypesystemException::raise(QString("Unexpected child element CustomConstructor of %1.").arg(element->metaObject()->className())); - } + //}else{ + // TypesystemException::raise(QStringLiteral(u"Unexpected child element CustomConstructor of %1.").arg(element->metaObject()->className())); + //} }else if(CustomDestructor* childElement = qobject_cast(item)){ - if(entry->isValue() || (entry->isInterface() && dynamic_cast(entry)->origin()->isValue())){ + //if(entry->isValue() || (entry->isInterface() && dynamic_cast(entry)->origin()->isValue())){ if (checkQtVersion(childElement)){ CustomFunction func = parseCustomStructor(childElement); func.name = childElement->getName(); @@ -1102,14 +1140,19 @@ QList QmlTypeSystemReaderPrivate::parseChildrenOfComplexType(co if(entry->designatedInterface()) entry->designatedInterface()->setCustomDestructor(func); } - }else{ - TypesystemException::raise(QString("Unexpected child element CustomDestructor of %1.").arg(element->metaObject()->className())); - } + //}else{ + // TypesystemException::raise(QStringLiteral(u"Unexpected child element CustomDestructor of %1.").arg(element->metaObject()->className())); + //} }else if(PrimitiveType* childElement = qobject_cast(item)){ QString name = element->getName(); if(!nameSpace.isEmpty()) name = nameSpace+"::"+name; parsePrimitiveType(name, childElement); + }else if(NativePointerType* childElement = qobject_cast(item)){ + QString name = element->getName(); + if(!nameSpace.isEmpty()) + name = nameSpace+"::"+name; + parseNativePointerType(name, childElement); }else if(ObjectType* childElement = qobject_cast(item)){ QString name = element->getName(); if(!nameSpace.isEmpty()) @@ -1159,7 +1202,7 @@ QList QmlTypeSystemReaderPrivate::parseChildrenOfComplexType(co if (checkQtVersion(childElement)){ entry->addImplicitCast(childElement->getType()); for(AbstractObject* item2 : childElement->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), childElement->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), childElement->metaObject()->className())); } } }else if(Rejection* rejection = qobject_cast(item)){ @@ -1169,14 +1212,14 @@ QList QmlTypeSystemReaderPrivate::parseChildrenOfComplexType(co QString field = rejection->getFieldName(); QString enum_ = rejection->getEnumName(); if (cls == "*" && function.isEmpty() && field.isEmpty() && enum_.isEmpty()) { - TypesystemException::raise(QString("bad reject entry, neither 'enumName', 'functionFame' nor 'fieldName'")); + TypesystemException::raise(QStringLiteral(u"bad reject entry, neither 'enumName', 'functionFame' nor 'fieldName'")); } cls = cls=="*" ? element->getName() : element->getName() + "::" + cls; if(!nameSpace.isEmpty()) cls = nameSpace+"::"+cls; m_database->addRejection(cls, function, field, enum_); for(AbstractObject* item2 : rejection->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), childElement->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), rejection->metaObject()->className())); } } }else{ @@ -1199,11 +1242,11 @@ CustomFunction QmlTypeSystemReaderPrivate::parseCustomStructor(AbstractStructor* if (checkQtVersion(childElement)){ func.addCode(childElement->getContent()); for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } }else{ - TypesystemException::raise(QString("Unexpected child element %1 in %2.").arg(item->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected child element %1 in %2.").arg(item->metaObject()->className(), element->metaObject()->className())); } } return func; @@ -1223,7 +1266,7 @@ void QmlTypeSystemReaderPrivate::parseTemplateType(const QString& nameSpace, Tem parseTemplate(childElement); }else if(TemplateArguments* childElement = qobject_cast(item)){ if(!entry->isTemplate()) - TypesystemException::raise(QString("Unexpected element Instantiation as child of non-template")); + TypesystemException::raise(QStringLiteral(u"Unexpected element Instantiation as child of non-template")); parseTemplateArguments(childElement, entry.get()); }else if(ModifyFunction* childElement = qobject_cast(item)){ parseModifyFunction(childElement, entry.get()); @@ -1234,7 +1277,7 @@ void QmlTypeSystemReaderPrivate::parseTemplateType(const QString& nameSpace, Tem }else if(DelegateBaseClass* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } if(!childElement->getBaseClass().isEmpty()) entry->addDelegatedBaseClass(childElement->getBaseClass(), childElement->getDelegate()); @@ -1242,7 +1285,7 @@ void QmlTypeSystemReaderPrivate::parseTemplateType(const QString& nameSpace, Tem }else if(Implements* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } entry->setImplements(childElement->getInterface()); } @@ -1260,7 +1303,7 @@ void QmlTypeSystemReaderPrivate::parseTemplateType(const QString& nameSpace, Tem }else if(Import* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } QString name = childElement->getTemplate(); if(TemplateTypeEntry* templateEntry = m_database->findTemplateType(name)){ @@ -1279,23 +1322,23 @@ void QmlTypeSystemReaderPrivate::parseTemplateType(const QString& nameSpace, Tem } } }else{ - TypesystemException::raise(QString("Unable to find template-type '%1'.").arg(name)); + TypesystemException::raise(QStringLiteral(u"Unable to find template-type '%1'.").arg(name)); } } }else if(InterfacePolymorphy* childElement = qobject_cast(item)){ if(entry->isValue() || entry->isObject() || entry->isInterface()){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } if(childElement->getInterfaceType().isEmpty()) - TypesystemException::raise(QString("No interfaceType specified for InterfacePolymorphy")); + TypesystemException::raise(QStringLiteral(u"No interfaceType specified for InterfacePolymorphy")); entry->addInterfacePolymorphicIdValue(childElement->getInterfaceType(), childElement->getCondition()); if(entry->designatedInterface()) entry->designatedInterface()->addInterfacePolymorphicIdValue(childElement->getInterfaceType(), childElement->getCondition()); } }else{ - TypesystemException::raise(QString("Unexpected child element InterfacePolymorphy of %1.").arg(element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected child element InterfacePolymorphy of %1.").arg(element->metaObject()->className())); } }else if(CustomConstructor* childElement = qobject_cast(item)){ if(entry->isValue() || (entry->isInterface() && dynamic_cast(entry.get())->origin()->isValue())){ @@ -1320,7 +1363,7 @@ void QmlTypeSystemReaderPrivate::parseTemplateType(const QString& nameSpace, Tem entry->designatedInterface()->setCustomConstructor(func, types[childElement->getType()]); } }else{ - TypesystemException::raise(QString("Unexpected child element CustomConstructor of %1.").arg(element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected child element CustomConstructor of %1.").arg(element->metaObject()->className())); } }else if(CustomDestructor* childElement = qobject_cast(item)){ if(entry->isValue() || (entry->isInterface() && dynamic_cast(entry.get())->origin()->isValue())){ @@ -1337,15 +1380,15 @@ void QmlTypeSystemReaderPrivate::parseTemplateType(const QString& nameSpace, Tem entry->designatedInterface()->setCustomDestructor(func); } }else{ - TypesystemException::raise(QString("Unexpected child element CustomDestructor of %1.").arg(element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected child element CustomDestructor of %1.").arg(element->metaObject()->className())); } }else{ - TypesystemException::raise(QString("Unexpected child element %1 in %2.").arg(childElement->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected child element %1 in %2.").arg(item->metaObject()->className(), element->metaObject()->className())); } } m_database->addTemplateType(entry.release()); }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 of type %2").arg(QLatin1String(exn.what()), name)); + TypesystemException::raise(QStringLiteral(u"%1 of type %2").arg(QLatin1String(exn.what()), name)); } } } @@ -1392,7 +1435,7 @@ void QmlTypeSystemReaderPrivate::parseDelegate(Delegate* element, AbstractFuncti }; parseInjectCode(childElement, languageNames, positionNames, [&snips](const QString&,const CodeSnip &snip){snips<metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); } } mod.delegates << TS::Delegate{element->name(), element->isDeprecated(), element->isSelfReturning(), modifiers, snips}; @@ -1413,13 +1456,13 @@ void QmlTypeSystemReaderPrivate::parseModifyArgument(ModifyArgument* element, Ab if(!ok) element->getIndex().value().toInt(&ok); if(!ok) - TypesystemException::raise(QString("Can't convert ModifyArgument property index to integer")); + TypesystemException::raise(QStringLiteral(u"Can't convert ModifyArgument property index to integer")); } ArgumentModification argumentModification(index); argumentModification.replace_value = element->getReplaceValue(); if (!argumentModification.replace_value.isEmpty() && index != 0) - TypesystemException::raise(QString("ModifyArgument.replaceValue is only supported for return values (index=0)")); + TypesystemException::raise(QStringLiteral(u"ModifyArgument.replaceValue is only supported for return values (index=0)")); if(element->getThreadAffinity().userType()==QMetaType::Bool){ if(element->getThreadAffinity().toBool()){ argumentModification.thread_affine = TS::ThreadAffinity::Yes; @@ -1468,21 +1511,21 @@ void QmlTypeSystemReaderPrivate::parseModifyArgument(ModifyArgument* element, Ab if(RemoveDefaultExpression* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } argumentModification.removed_default_expression = true; } }else if(ReplaceDefaultExpression* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } argumentModification.replaced_default_expression = childElement->getExpression(); } }else if(ReferenceCount* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } TS::ReferenceCount rc; rc.threadSafe = childElement->getIsThreadSafe(); @@ -1499,11 +1542,11 @@ void QmlTypeSystemReaderPrivate::parseModifyArgument(ModifyArgument* element, Ab rc.action = actions[childElement->getAction()]; rc.variableName = childElement->getVariableName(); if (rc.action != TS::ReferenceCount::Ignore && rc.variableName.isEmpty()) { - TypesystemException::raise(QString("ReferenceCount.variableName must be specified")); + TypesystemException::raise(QStringLiteral(u"ReferenceCount.variableName must be specified")); } rc.keyArgument = childElement->getKeyArgument(); if (rc.action == TS::ReferenceCount::Put && rc.keyArgument<=0) { - TypesystemException::raise(QString("ReferenceCount.keyArgument must be specified and greater than 0")); + TypesystemException::raise(QStringLiteral(u"ReferenceCount.keyArgument must be specified and greater than 0")); } rc.declareVariable = childElement->getDeclareVariable(); rc.condition = childElement->getCondition(); @@ -1527,11 +1570,11 @@ void QmlTypeSystemReaderPrivate::parseModifyArgument(ModifyArgument* element, Ab if (checkQtVersion(childElement2)){ asArray = childElement2; for(AbstractObject* item3 : asArray->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item3->metaObject()->className(), asArray->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item3->metaObject()->className(), asArray->metaObject()->className())); } } }else{ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } TS::AsBufferTypes asBufferType = TS::AsBufferType::Yes; @@ -1539,9 +1582,9 @@ void QmlTypeSystemReaderPrivate::parseModifyArgument(ModifyArgument* element, Ab asBufferType |= TS::AsBufferType::Deref; argumentModification.useAsBufferType = asBufferType; if (childElement->getLengthParameter()>0) { - argumentModification.arrayLengthParameter = childElement->getLengthParameter(); + argumentModification.utilArgParameter = childElement->getLengthParameter(); }else{ - argumentModification.arrayLengthParameter = 0; + argumentModification.utilArgParameter = 0; if (childElement->getMinLength()>=0) { argumentModification.minArrayLength = childElement->getMinLength(); if (childElement->getMaxLength()>=0) { @@ -1570,7 +1613,7 @@ void QmlTypeSystemReaderPrivate::parseModifyArgument(ModifyArgument* element, Ab }else if(AsArray* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } TS::AsArrayTypes asArrayType = TS::AsArrayType::Yes; if(childElement->getDeref()) @@ -1586,9 +1629,9 @@ void QmlTypeSystemReaderPrivate::parseModifyArgument(ModifyArgument* element, Ab argumentModification.useAsArrayType = asArrayType; argumentModification.useAsBufferType = TS::AsBufferType::No; if (childElement->getLengthParameter()>0) { - argumentModification.arrayLengthParameter = childElement->getLengthParameter(); + argumentModification.utilArgParameter = childElement->getLengthParameter(); }else{ - argumentModification.arrayLengthParameter = 0; + argumentModification.utilArgParameter = 0; if (childElement->getMinLength()>=0) { argumentModification.minArrayLength = childElement->getMinLength(); if (childElement->getMaxLength()>=0) { @@ -1602,19 +1645,33 @@ void QmlTypeSystemReaderPrivate::parseModifyArgument(ModifyArgument* element, Ab argumentModification.arrayLengthExpression = childElement->getLengthExpression(); } } - if(argumentModification.arrayLengthParameter<1 + if(argumentModification.utilArgParameter<1 && argumentModification.minArrayLength<0 && argumentModification.arrayLengthExpression.isEmpty()){ - TypesystemException::raise(QStringLiteral("%1 requires to specify either lengthParameter, lengthExpression or minLength").arg(item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"%1 requires to specify either lengthParameter, lengthExpression or minLength").arg(item->metaObject()->className())); + } + } + }else if(AsSlot* childElement = qobject_cast(item)){ + if (checkQtVersion(childElement)){ + for(AbstractObject* item2 : item->childrenList()){ + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } + + argumentModification.useAsSlotType = TS::AsSlotType::Yes; + if(childElement->getNoContext()) + argumentModification.useAsSlotType |= TS::AsSlotType::NoContext; + if(childElement->getAddPlainDelegate()) + argumentModification.useAsSlotType |= TS::AsSlotType::AddPlainDelegate; + argumentModification.utilArgParameter = childElement->getContextParameter(); + argumentModification.modified_type = childElement->getTargetType(); } }else if(ReplaceType* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } if (childElement->getModifiedType().isEmpty()) { - TypesystemException::raise(QString("Missing required property ReplaceType.modifiedType")); + TypesystemException::raise(QStringLiteral(u"Missing required property ReplaceType.modifiedType")); } argumentModification.modified_type = childElement->getModifiedType(); argumentModification.modified_jni_type = childElement->getModifiedJniType(); @@ -1629,7 +1686,7 @@ void QmlTypeSystemReaderPrivate::parseModifyArgument(ModifyArgument* element, Ab }else if(NoNullPointer* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } argumentModification.no_null_pointers = true; if (argumentModification.index == 0) { @@ -1641,7 +1698,7 @@ void QmlTypeSystemReaderPrivate::parseModifyArgument(ModifyArgument* element, Ab }else if(DefineOwnership* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } static const QHash ownershipNames{ @@ -1655,7 +1712,7 @@ void QmlTypeSystemReaderPrivate::parseModifyArgument(ModifyArgument* element, Ab }; if(!ownershipNames.contains(childElement->getOwnership())) - TypesystemException::raise(QString("Unsupported ownership property")); + TypesystemException::raise(QStringLiteral(u"Unsupported ownership property")); static const QHash languageNames{ {CodeClass::Java, TS::TargetLangCode}, @@ -1667,14 +1724,14 @@ void QmlTypeSystemReaderPrivate::parseModifyArgument(ModifyArgument* element, Ab if(childElement->getOwnership()==Ownership::Ignore) _languageNames.insert(CodeClass::NoLanguage, TS::NoLanguage); if (!_languageNames.contains(childElement->getCodeClass())) - TypesystemException::raise(QString("Unsupported codeClass property")); + TypesystemException::raise(QStringLiteral(u"Unsupported codeClass property")); argumentModification.ownerships[_languageNames[childElement->getCodeClass()]] = TS::OwnershipRule{ownershipNames[childElement->getOwnership()], childElement->getCondition()}; } }else if(RemoveArgument* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } argumentModification.removed = true; } @@ -1687,12 +1744,12 @@ void QmlTypeSystemReaderPrivate::parseModifyArgument(ModifyArgument* element, Ab argumentModification.inhibitedImplicitCalls << childElement->getType(); } }else{ - TypesystemException::raise(QString("Unexpected child element %1 in %2.").arg(item->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected child element %1 in %2.").arg(item->metaObject()->className(), element->metaObject()->className())); } } mod.argument_mods << argumentModification; }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 of argument %2").arg(QLatin1String(exn.what())).arg(index)); + TypesystemException::raise(QStringLiteral(u"%1 of argument %2").arg(QLatin1String(exn.what())).arg(index)); } } } @@ -1701,7 +1758,7 @@ void QmlTypeSystemReaderPrivate::parseConversionRule(const QHashgetCodeClass())) - TypesystemException::raise(QString("Unsupported class attribute")); + TypesystemException::raise(QStringLiteral(u"Unsupported class attribute")); snip.language = languageNames[element->getCodeClass()]; @@ -1715,12 +1772,12 @@ void QmlTypeSystemReaderPrivate::parseConversionRule(const QHash(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } snip.addCode(childElement->getContent()); } }else{ - TypesystemException::raise(QString("Unexpected child element %1 in %2.").arg(item->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected child element %1 in %2.").arg(item->metaObject()->className(), element->metaObject()->className())); } } appendCodeSnip(snip); @@ -1801,7 +1858,7 @@ TemplateInstantiation QmlTypeSystemReaderPrivate::parseInstantiation(Instantiati if(Argument* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } QString type = childElement->getType(); bool implicit = childElement->getIsImplicit(); @@ -1809,7 +1866,7 @@ TemplateInstantiation QmlTypeSystemReaderPrivate::parseInstantiation(Instantiati QString parameter = childElement->getParameter(); QString extends = childElement->getExtending(); if(parameter.isEmpty()){ - TypesystemException::raise(QString("Attribute 'type' or 'parameter' required")); + TypesystemException::raise(QStringLiteral(u"Attribute 'type' or 'parameter' required")); } mod.arguments << TS::Parameter{type,parameter,extends,implicit}; }else{ @@ -1822,17 +1879,17 @@ TemplateInstantiation QmlTypeSystemReaderPrivate::parseInstantiation(Instantiati if (checkQtVersion(childElement)){ rename = childElement->getTo(); for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } }else if(Access* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ if(int(accesses)!=0){ - TypesystemException::raise(QString("ACCESS is already specified as property")); + TypesystemException::raise(QStringLiteral(u"ACCESS is already specified as property")); } accesses = childElement->getModifier(); for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } }else if(AddArgument* childElement = qobject_cast(item)){ @@ -1845,7 +1902,7 @@ TemplateInstantiation QmlTypeSystemReaderPrivate::parseInstantiation(Instantiati argumentModification.reset_after_use = childElement->getInvalidateAfterUse(); mod.argument_mods.append(argumentModification); for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } }else if(AddTypeParameter* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ @@ -1854,7 +1911,7 @@ TemplateInstantiation QmlTypeSystemReaderPrivate::parseInstantiation(Instantiati argumentModification.modified_type = childElement->getExtending(); mod.argument_mods.append(argumentModification); for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } }else if(InjectCode* childElement = qobject_cast(item)){ @@ -1882,7 +1939,7 @@ TemplateInstantiation QmlTypeSystemReaderPrivate::parseInstantiation(Instantiati [&mod](const QString&,const CodeSnip &snip){mod.snips << snip;}, true); }else{ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); } } @@ -1925,7 +1982,7 @@ void QmlTypeSystemReaderPrivate::parseModifyFunction(ModifyFunction* element, Ty signature = signature.replace(prefix.prefix, prefix._namespace); } if (signature.isEmpty()) { - TypesystemException::raise(QString("No signature")); + TypesystemException::raise(QStringLiteral(u"No signature")); } signature = QString::fromLatin1(QMetaObject::normalizedSignature(qPrintable(signature))); AccessModifications accesses = element->getAccess(); @@ -1989,7 +2046,7 @@ void QmlTypeSystemReaderPrivate::parseModifyFunction(ModifyFunction* element, Ty mod.removal = TS::NoLanguage; break; default: - TypesystemException::raise(QString("Unsupported remove attribute")); + TypesystemException::raise(QStringLiteral(u"Unsupported remove attribute")); break; } mod.association = element->getAssociatedTo(); @@ -2038,9 +2095,9 @@ void QmlTypeSystemReaderPrivate::parseModifyFunction(ModifyFunction* element, Ty }else if(Instantiation* childElement = qobject_cast(item)){ TemplateInstantiation templateInstantiation = parseInstantiation(childElement); if(!templateInstantiation.arguments.isEmpty()){ - for(const ArgumentModification& amod : mod.argument_mods){ + for(const ArgumentModification& amod : qAsConst(mod.argument_mods)){ bool found = false; - for(const ArgumentModification& amod2 : templateInstantiation.argument_mods){ + for(const ArgumentModification& amod2 : qAsConst(templateInstantiation.argument_mods)){ if(amod.index==amod2.index){ found = true; break; @@ -2054,7 +2111,7 @@ void QmlTypeSystemReaderPrivate::parseModifyFunction(ModifyFunction* element, Ty }else if(Remove* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ if(element->getRemove()!=RemoveFlag::None){ - TypesystemException::raise(QString("REMOVE is already specified as attribute")); + TypesystemException::raise(QStringLiteral(u"REMOVE is already specified as attribute")); } switch(childElement->getCodeClass()){ case RemoveFlag::All: @@ -2070,28 +2127,28 @@ void QmlTypeSystemReaderPrivate::parseModifyFunction(ModifyFunction* element, Ty mod.removal = TS::NoLanguage; break; default: - TypesystemException::raise(QString("Unsupported codeClass attribute")); + TypesystemException::raise(QStringLiteral(u"Unsupported codeClass attribute")); break; } for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } }else if(Rename* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ rename = childElement->getTo(); for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } }else if(Access* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ if(int(accesses)!=0){ - TypesystemException::raise(QString("ACCESS is already specified as property")); + TypesystemException::raise(QStringLiteral(u"ACCESS is already specified as property")); } accesses = childElement->getModifier(); for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } }else if(AddArgument* childElement = qobject_cast(item)){ @@ -2105,7 +2162,7 @@ void QmlTypeSystemReaderPrivate::parseModifyFunction(ModifyFunction* element, Ty argumentModification.reset_after_use = childElement->getInvalidateAfterUse(); mod.argument_mods.append(argumentModification); for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } }else if(AddTypeParameter* childElement = qobject_cast(item)){ @@ -2115,7 +2172,7 @@ void QmlTypeSystemReaderPrivate::parseModifyFunction(ModifyFunction* element, Ty argumentModification.modified_type = childElement->getExtending(); mod.argument_mods.append(argumentModification); for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } }else if(InjectCode* childElement = qobject_cast(item)){ @@ -2143,7 +2200,7 @@ void QmlTypeSystemReaderPrivate::parseModifyFunction(ModifyFunction* element, Ty [&mod](const QString&,const CodeSnip &snip){mod.snips << snip;}, true); }else{ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); } } @@ -2175,19 +2232,19 @@ void QmlTypeSystemReaderPrivate::parseModifyFunction(ModifyFunction* element, Ty } if(entry->isComplex()){ if(!mod.targetType.isEmpty()){ - TypesystemException::raise(QString("Unexpected atribute targetType")); + TypesystemException::raise(QStringLiteral(u"Unexpected atribute targetType")); } reinterpret_cast(entry)->addFunctionModification(mod); if(entry->designatedInterface()) entry->designatedInterface()->addFunctionModification(mod); }else if(entry->isTypeSystem()){ if(mod.targetType.isEmpty() && mod.removal != TS::All){ - TypesystemException::raise(QString("Either define target-type or remove all for global functions")); + TypesystemException::raise(QStringLiteral(u"Either define target-type or remove all for global functions")); } reinterpret_cast(entry)->addFunctionModification(mod); } }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 of function '%2'").arg(QLatin1String(exn.what()), signature)); + TypesystemException::raise(QStringLiteral(u"%1 of function '%2'").arg(QLatin1String(exn.what()), signature)); } } } @@ -2217,26 +2274,26 @@ void QmlTypeSystemReaderPrivate::parseModifyField(ModifyField* element, ComplexT if (checkQtVersion(childElement)){ rename = childElement->getTo(); for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } }else if(Access* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ if(int(accesses)!=0){ - TypesystemException::raise(QString("ACCESS is already specified as property")); + TypesystemException::raise(QStringLiteral(u"ACCESS is already specified as property")); } accesses = childElement->getModifier(); for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } } }else if(ReplaceType* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } if (childElement->getModifiedType().isEmpty()) { - TypesystemException::raise(QString("Missing required property ReplaceType.modifiedType")); + TypesystemException::raise(QStringLiteral(u"Missing required property ReplaceType.modifiedType")); } fm.modified_type = childElement->getModifiedType(); fm.modified_jni_type = childElement->getModifiedJniType(); @@ -2251,7 +2308,7 @@ void QmlTypeSystemReaderPrivate::parseModifyField(ModifyField* element, ComplexT }else if(ReferenceCount* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } TS::ReferenceCount rc; rc.threadSafe = childElement->getIsThreadSafe(); @@ -2268,13 +2325,13 @@ void QmlTypeSystemReaderPrivate::parseModifyField(ModifyField* element, ComplexT rc.action = actions[childElement->getAction()]; rc.variableName = childElement->getVariableName(); if (rc.action != TS::ReferenceCount::Ignore && rc.variableName.isEmpty()) { - TypesystemException::raise(QString("ReferenceCount.variableName must be specified")); + TypesystemException::raise(QStringLiteral(u"ReferenceCount.variableName must be specified")); } bool ok = false; uint ka = childElement->getKeyArgument(); rc.keyArgument = ok ? ka : 0; if (rc.action == TS::ReferenceCount::Put && rc.keyArgument<=0) { - TypesystemException::raise(QString("ReferenceCount.keyArgument must be specified and greater than 0")); + TypesystemException::raise(QStringLiteral(u"ReferenceCount.keyArgument must be specified and greater than 0")); } rc.declareVariable = childElement->getDeclareVariable(); rc.condition = childElement->getCondition(); @@ -2293,14 +2350,14 @@ void QmlTypeSystemReaderPrivate::parseModifyField(ModifyField* element, ComplexT }else if(NoNullPointer* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } fm.no_null_pointers = true; } }else if(DefineOwnership* childElement = qobject_cast(item)){ if (checkQtVersion(childElement)){ for(AbstractObject* item2 : item->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), item->metaObject()->className())); } static const QHash ownershipNames{ @@ -2314,7 +2371,7 @@ void QmlTypeSystemReaderPrivate::parseModifyField(ModifyField* element, ComplexT }; if(!ownershipNames.contains(childElement->getOwnership())) - TypesystemException::raise(QString("Unsupported ownership property")); + TypesystemException::raise(QStringLiteral(u"Unsupported ownership property")); static const QHash languageNames{ {CodeClass::Java, TS::TargetLangCode}, @@ -2325,11 +2382,11 @@ void QmlTypeSystemReaderPrivate::parseModifyField(ModifyField* element, ComplexT if(childElement->getOwnership()==Ownership::Ignore) _languageNames.insert(CodeClass::NoLanguage, TS::NoLanguage); if (!_languageNames.contains(childElement->getCodeClass())) - TypesystemException::raise(QString("Unsupported codeClass property")); + TypesystemException::raise(QStringLiteral(u"Unsupported codeClass property")); fm.ownerships[_languageNames[childElement->getCodeClass()]] = TS::OwnershipRule{ownershipNames[childElement->getOwnership()], childElement->getCondition()}; } }else{ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); } } @@ -2362,7 +2419,7 @@ void QmlTypeSystemReaderPrivate::parseModifyField(ModifyField* element, ComplexT if(entry->designatedInterface()) entry->designatedInterface()->addFieldModification(fm); }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 of field '%2'").arg(QLatin1String(exn.what()), fm.name)); + TypesystemException::raise(QStringLiteral(u"%1 of field '%2'").arg(QLatin1String(exn.what()), fm.name)); } } } @@ -2402,15 +2459,15 @@ void QmlTypeSystemReaderPrivate::parseFunctionalType(const QString& nameSpace, F } QVariant generate = element->getGenerate(); fentry->setFunctionName(element->getFunctionName()); - if(m_generate==TypeEntry::GenerateAll){ + if((m_generate & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll){ if(generate.userType()==QMetaType::QString && generate.value()=="no-shell"){ fentry->setCodeGeneration(TypeEntry::GenerateNoShell | TypeEntry::GenerateAll); }else if (generate.userType()==QMetaType::Bool && !generate.value()) fentry->setCodeGeneration(TypeEntry::GenerateNothing); else - fentry->setCodeGeneration(m_generate); + fentry->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); }else - fentry->setCodeGeneration(m_generate); + fentry->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); if (element->getDisableNativeIdUsage()) fentry->disableNativeIdUsage(); @@ -2444,7 +2501,7 @@ void QmlTypeSystemReaderPrivate::parseFunctionalType(const QString& nameSpace, F FunctionModification mod; mod.removal = TS::NoLanguage; parseModifyArgument(childElement, mod); - for(const ArgumentModification& am : mod.argument_mods){ + for(const ArgumentModification& am : qAsConst(mod.argument_mods)){ fentry->addArgumentModification(am); } }else if(InjectCode* childElement = qobject_cast(item)){ @@ -2452,12 +2509,12 @@ void QmlTypeSystemReaderPrivate::parseFunctionalType(const QString& nameSpace, F }else if(ExtraIncludes* childElement = qobject_cast(item)){ parseExtraIncludes(childElement, fentry.get()); }else{ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item->metaObject()->className(), element->metaObject()->className())); } } m_database->addType(fentry.release()); }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 of type %2").arg(QLatin1String(exn.what()), name)); + TypesystemException::raise(QStringLiteral(u"%1 of type %2").arg(QLatin1String(exn.what()), name)); } } } @@ -2489,10 +2546,10 @@ void QmlTypeSystemReaderPrivate::parseIteratorType(const QString& nameSpace, Ite ReportHandler::debugTypes("Adding to TypeDatabase(2): " + entry->name()); m_database->addType(entry.release()); for(AbstractObject* item2 : element->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), element->metaObject()->className())); } }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 of type %2").arg(QLatin1String(exn.what()), name)); + TypesystemException::raise(QStringLiteral(u"%1 of type %2").arg(QLatin1String(exn.what()), name)); } } } @@ -2528,7 +2585,7 @@ void QmlTypeSystemReaderPrivate::parseValueType(const QString& nameSpace, ValueT parseAttributesOfComplexType(element, entry.get()); QList unhandledElements = parseChildrenOfComplexType(nameSpace, element, entry.get()); for(AbstractObject* childElement : qAsConst(unhandledElements)){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(childElement->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(childElement->metaObject()->className(), element->metaObject()->className())); } if(name.endsWith(">")){ auto idx = name.indexOf('<'); @@ -2541,20 +2598,20 @@ void QmlTypeSystemReaderPrivate::parseValueType(const QString& nameSpace, ValueT entry->setTargetLangName(templateType->targetLangName()); templateType->addInstantiation(templateArguments, entry.release()); }else{ - TypesystemException::raise(QString("Template %1<%2> already defined").arg(templateName).arg(templateArguments.join(","))); + TypesystemException::raise(QStringLiteral(u"Template %1<%2> already defined").arg(templateName, templateArguments.join(","))); } }else{ - TypesystemException::raise(QString("Type %1 not a template").arg(templateName)); + TypesystemException::raise(QStringLiteral(u"Type %1 not a template").arg(templateName)); } }else{ - TypesystemException::raise(QString("Template %1 not found").arg(templateName)); + TypesystemException::raise(QStringLiteral(u"Template %1 not found").arg(templateName)); } }else{ ReportHandler::debugTypes("Adding to TypeDatabase(2): " + name); m_database->addType(entry.release()); } }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 of type %2").arg(QLatin1String(exn.what()), name)); + TypesystemException::raise(QStringLiteral(u"%1 of type %2").arg(QLatin1String(exn.what()), name)); } } } @@ -2574,8 +2631,10 @@ void QmlTypeSystemReaderPrivate::parseTypeAliasType(const QString& nameSpace, Ty } std::unique_ptr entry(new AliasTypeEntry(name, m_defaultPackage)); entry->setTargetTypeSystem(m_defaultPackage); + entry->setAsNativePointer(element->getAsNativePointer()); + entry->setPPCondition(element->getPpCondition()); for(AbstractObject* item2 : element->childrenList()){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(item2->metaObject()->className(), element->metaObject()->className())); } if(name.endsWith(">")){ auto idx = name.indexOf('<'); @@ -2588,20 +2647,20 @@ void QmlTypeSystemReaderPrivate::parseTypeAliasType(const QString& nameSpace, Ty entry->setTargetLangName(templateType->targetLangName()); templateType->addInstantiation(templateArguments, entry.release()); }else{ - TypesystemException::raise(QString("Template %1<%2> already defined").arg(templateName).arg(templateArguments.join(","))); + TypesystemException::raise(QStringLiteral(u"Template %1<%2> already defined").arg(templateName, templateArguments.join(","))); } }else{ - TypesystemException::raise(QString("Type %1 not a template").arg(templateName)); + TypesystemException::raise(QStringLiteral(u"Type %1 not a template").arg(templateName)); } }else{ - TypesystemException::raise(QString("Template %1 not found").arg(templateName)); + TypesystemException::raise(QStringLiteral(u"Template %1 not found").arg(templateName)); } }else{ ReportHandler::debugTypes("Adding to TypeDatabase(2): " + entry->name()); m_database->addType(entry.release()); } }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 of type %2").arg(QLatin1String(exn.what()), name)); + TypesystemException::raise(QStringLiteral(u"%1 of type %2").arg(QLatin1String(exn.what()), name)); } } } @@ -2640,12 +2699,12 @@ void QmlTypeSystemReaderPrivate::parseInterfaceType(const QString& nameSpace, In parseAttributesOfComplexType(element, otype.get()); QList unhandledElements = parseChildrenOfComplexType(nameSpace, element, otype.get()); for(AbstractObject* childElement : qAsConst(unhandledElements)){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(childElement->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(childElement->metaObject()->className(), element->metaObject()->className())); } m_database->addType(otype.release()); itype.release(); }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 of type %2").arg(QLatin1String(exn.what()), name)); + TypesystemException::raise(QStringLiteral(u"%1 of type %2").arg(QLatin1String(exn.what()), name)); } } } @@ -2679,12 +2738,12 @@ void QmlTypeSystemReaderPrivate::parseNamespaceType(const QString& nameSpace, Na parseAttributesOfComplexType(element, entry.get()); QList unhandledElements = parseChildrenOfComplexType(nameSpace, element, entry.get()); for(AbstractObject* childElement : qAsConst(unhandledElements)){ - TypesystemException::raise(QStringLiteral("Unexpected element %1 as child of %2").arg(childElement->metaObject()->className(), element->metaObject()->className())); + TypesystemException::raise(QStringLiteral(u"Unexpected element %1 as child of %2").arg(childElement->metaObject()->className(), element->metaObject()->className())); } ReportHandler::debugTypes("Adding to TypeDatabase(2): " + entry->name()); m_database->addType(entry.release()); }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 of type %2").arg(QLatin1String(exn.what()), name)); + TypesystemException::raise(QStringLiteral(u"%1 of type %2").arg(QLatin1String(exn.what()), name)); } } } @@ -2709,13 +2768,13 @@ void QmlTypeSystemReaderPrivate::parseEnumType(const QString& nameSpace, EnumTyp } else { eentry.reset(new EnumTypeEntry(QStringList(names.mid(0, names.size() - 1)).join("::"), names.last())); } - if(m_generate==TypeEntry::GenerateAll){ + if((m_generate & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll){ if (!element->getGenerate()) eentry->setCodeGeneration(TypeEntry::GenerateNothing); else - eentry->setCodeGeneration(m_generate); + eentry->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); }else - eentry->setCodeGeneration(m_generate); + eentry->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); eentry->setTargetLangPackage(element->getPackageName().isEmpty() ? m_defaultPackage : element->getPackageName()); eentry->setTargetTypeSystem(m_defaultPackage); eentry->setUpperBound(element->getUpperBound()); @@ -2734,7 +2793,7 @@ void QmlTypeSystemReaderPrivate::parseEnumType(const QString& nameSpace, EnumTyp if (checkQtVersion(childElement)){ QString name = childElement->getName(); if (name.isEmpty()) { - TypesystemException::raise(QString("No 'name' attribute specified for RejectEnumValue")); + TypesystemException::raise(QStringLiteral(u"No 'name' attribute specified for RejectEnumValue")); } eentry->addEnumValueRejection(name, childElement->getRemove()); } @@ -2742,11 +2801,11 @@ void QmlTypeSystemReaderPrivate::parseEnumType(const QString& nameSpace, EnumTyp if (checkQtVersion(childElement)){ QString name = childElement->getName(); if (name.isEmpty()) { - TypesystemException::raise(QString("No 'name' attribute specified for RenameEnumValue")); + TypesystemException::raise(QStringLiteral(u"No 'name' attribute specified for RenameEnumValue")); } QString rename = childElement->getRename(); if (rename.isEmpty()) { - TypesystemException::raise(QString("No 'rename' attribute specified for RenameEnumValue")); + TypesystemException::raise(QStringLiteral(u"No 'rename' attribute specified for RenameEnumValue")); } eentry->addRenamedEnumValue(name, rename); } @@ -2796,7 +2855,7 @@ void QmlTypeSystemReaderPrivate::parseEnumType(const QString& nameSpace, EnumTyp QStringList lst = n.split("::"); if (QStringList(lst.mid(0, lst.size() - 1)).join("::") != QStringList(names.mid(0, names.size() - 1)).join("::")) { - ReportHandler::warning(QString("Enum %1 and flags %2 differ in qualifiers") + ReportHandler::warning(QStringLiteral(u"Enum %1 and flags %2 differ in qualifiers") .arg(eentry->qualifiedCppName())); } @@ -2812,7 +2871,7 @@ void QmlTypeSystemReaderPrivate::parseEnumType(const QString& nameSpace, EnumTyp } m_database->addType(eentry.release()); }catch(const TypesystemException& exn){ - TypesystemException::raise(QString("%1 of type %2").arg(QLatin1String(exn.what()), name)); + TypesystemException::raise(QStringLiteral(u"%1 of type %2").arg(QLatin1String(exn.what()), name)); } } } diff --git a/src/cpp/QtJambiGenerator/typesystem/typedatabase.cpp b/src/cpp/QtJambiGenerator/typesystem/typedatabase.cpp index 9243d430..79a3369f 100644 --- a/src/cpp/QtJambiGenerator/typesystem/typedatabase.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/typedatabase.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** (in parts) ** ** This file is part of QtJambi. diff --git a/src/cpp/QtJambiGenerator/typesystem/typedatabase.h b/src/cpp/QtJambiGenerator/typesystem/typedatabase.h index 56d3745f..f0e40aa7 100644 --- a/src/cpp/QtJambiGenerator/typesystem/typedatabase.h +++ b/src/cpp/QtJambiGenerator/typesystem/typedatabase.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/typeentry.cpp b/src/cpp/QtJambiGenerator/typesystem/typeentry.cpp index 09482c17..fd9959c2 100644 --- a/src/cpp/QtJambiGenerator/typesystem/typeentry.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/typeentry.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** (in parts) ** ** This file is part of QtJambi. @@ -89,6 +89,607 @@ ComplexTypeEntry *ComplexTypeEntry::copy() const { return centry; } +bool ComplexTypeEntry::isComplex() const { + return true; +} + +const IncludeList& ComplexTypeEntry::extraIncludes() const { + return m_extra_includes; +} + +void ComplexTypeEntry::setExtraIncludes(const IncludeList &includes) { + m_extra_includes = includes; +} + +void ComplexTypeEntry::addExtraInclude(const Include &include) { + if (!m_includes_used.value(include.name, false)) { + m_extra_includes << include; + m_includes_used[include.name] = true; + } +} + +void ComplexTypeEntry::setLookupName(const QString &name) { + m_lookup_name = name; +} + +QString ComplexTypeEntry::lookupName() const { + return m_lookup_name.isEmpty() ? targetLangName() : m_lookup_name; +} + +QString ComplexTypeEntry::jniName() const { + return strings_jobject; +} + + +const Include& ComplexTypeEntry::include() const { + return m_include; +} +void ComplexTypeEntry::setInclude(const Include &inc) { + m_include = inc; +} + +void ComplexTypeEntry::setForceAbstract(){ + m_type_flags.setFlag(ForceAbstract); +} + +bool ComplexTypeEntry::isForceAbstract() const { + return m_type_flags.testFlag(ForceAbstract); +} + +void ComplexTypeEntry::setThreadAffine(){ + m_type_flags.setFlag(ThreadAffine); +} + +bool ComplexTypeEntry::isThreadAffine() const { + return m_type_flags.testFlag(ThreadAffine); +} + +void ComplexTypeEntry::setDeprecated(){ + m_type_flags.setFlag(Deprecated); +} + +bool ComplexTypeEntry::isDeprecated() const { + return m_type_flags.testFlag(Deprecated); +} + +void ComplexTypeEntry::setForceFriendly(){ + m_type_flags.setFlag(ForceFriendly); +} + +bool ComplexTypeEntry::isForceFriendly() const { + return m_type_flags.testFlag(ForceFriendly); +} + +void ComplexTypeEntry::setHasNonPublicFields(){ + m_type_flags.setFlag(HasFields); + m_type_flags.setFlag(HasNonPublicFields); +} + +bool ComplexTypeEntry::hasNonPublicFields() const { + return m_type_flags.testFlag(HasNonPublicFields); +} + +void ComplexTypeEntry::setHasFields(){ + m_type_flags.setFlag(HasFields); +} + +bool ComplexTypeEntry::hasFields() const { + return m_type_flags.testFlag(HasFields); +} + +ComplexTypeEntry::TypeFlags ComplexTypeEntry::typeFlags() const { + return m_type_flags; +} + +const CodeSnipList& ComplexTypeEntry::codeSnips() const { + return m_code_snips; +} +void ComplexTypeEntry::setCodeSnips(const CodeSnipList &codeSnips) { + m_code_snips = codeSnips; +} +void ComplexTypeEntry::addCodeSnips(const CodeSnipList &codeSnips) { + m_code_snips << codeSnips; +} +void ComplexTypeEntry::addCodeSnip(const CodeSnip &codeSnip) { + m_code_snips << codeSnip; +} + +const FunctionModificationList& ComplexTypeEntry::functionModifications() const { + return m_function_mods; +} +void ComplexTypeEntry::setFunctionModifications(const FunctionModificationList &functionModifications) { + m_function_mods = functionModifications; +} +void ComplexTypeEntry::addFunctionModifications(const FunctionModificationList &functionModifications) { + m_function_mods << functionModifications; +} +void ComplexTypeEntry::addFunctionModification(const FunctionModification &functionModification) { + m_function_mods << functionModification; +} + +void ComplexTypeEntry::setFieldModifications(const FieldModificationList &mods) { + m_field_mods = mods; +} +void ComplexTypeEntry::addFieldModifications(const FieldModificationList &mods) { + m_field_mods << mods; +} +void ComplexTypeEntry::addFieldModification(const FieldModification &mod) { + m_field_mods << mod; +} +const FieldModificationList& ComplexTypeEntry::fieldModifications() const { + return m_field_mods; +} + +QString ComplexTypeEntry::javaPackage() const { + return m_package; +} +void ComplexTypeEntry::setTargetLangPackage(const QString &package) { + m_package = package; +} + +QString ComplexTypeEntry::targetTypeSystem() const { + return m_target_typesystem; +} + +void ComplexTypeEntry::setTargetTypeSystem(const QString &qt_jambi_library) { + m_target_typesystem = qt_jambi_library; +} + +bool ComplexTypeEntry::isQObject() const { + return m_attributes.testFlag(IsQObject); +} +void ComplexTypeEntry::setQObject(bool qobject) { + m_attributes.setFlag(IsQObject, qobject); +} +bool ComplexTypeEntry::isQEvent() const { + return m_attributes.testFlag(IsQEvent); +} +void ComplexTypeEntry::setQEvent(bool b) { + m_attributes.setFlag(IsQEvent, b); +} +bool ComplexTypeEntry::isQByteArrayView() const { + return m_attributes.testFlag(IsQByteArrayView); +} +void ComplexTypeEntry::setQByteArrayView(bool b) { + m_attributes.setFlag(IsQByteArrayView, b); +} +bool ComplexTypeEntry::isGLsync() const { + return m_attributes.testFlag(IsGLsync); +} + +bool ComplexTypeEntry::isQWidget() const { + return m_attributes.testFlag(IsQWidget); +} +void ComplexTypeEntry::setQWidget(bool qWidget) { + m_attributes.setFlag(IsQWidget, qWidget); +} + +bool ComplexTypeEntry::isQWindow() const { + return m_attributes.testFlag(IsQWindow); +} +void ComplexTypeEntry::setQWindow(bool qw) { + m_attributes.setFlag(IsQWindow, qw); +} + +bool ComplexTypeEntry::isQAction() const { + return m_attributes.testFlag(IsQAction); +} +void ComplexTypeEntry::setQAction(bool qw) { + m_attributes.setFlag(IsQAction, qw); +} + +bool ComplexTypeEntry::isQMediaControl() const { + return m_attributes.testFlag(IsQMediaControl); +} +void ComplexTypeEntry::setQMediaControl(bool qw) { + m_attributes.setFlag(IsQMediaControl, qw); +} + +bool ComplexTypeEntry::isQCoreApplication() const { + return m_attributes.testFlag(IsQCoreApplication); +} +void ComplexTypeEntry::setQCoreApplication(bool qw) { + m_attributes.setFlag(IsQCoreApplication, qw); +} + +const QString& ComplexTypeEntry::defaultSuperclass() const { + return m_default_superclass; +} +void ComplexTypeEntry::setDefaultSuperclass(const QString &sc) { + m_default_superclass = sc; +} + +void ComplexTypeEntry::setImplements(const QString &implements) { + m_implements = implements; +} +const QString& ComplexTypeEntry::implements() const { + return m_implements; +} + +void ComplexTypeEntry::setIsPolymorphicBase(bool on) { + m_attributes.setFlag(IsPolymorphicBase, on); +} +bool ComplexTypeEntry::isPolymorphicBase() const { + return m_attributes.testFlag(IsPolymorphicBase); +} + +void ComplexTypeEntry::setPolymorphicIdValue(const QString &value) { + m_polymorphic_id_value = value; +} +const QString& ComplexTypeEntry::polymorphicIdValue() const { + return m_polymorphic_id_value; +} + +void ComplexTypeEntry::addInterfacePolymorphicIdValue(const QString &iface, const QString &value) { + m_interface_polymorphic_id_values[iface] = value; +} +const QMap& ComplexTypeEntry::interfacePolymorphicIdValues() const { + return m_interface_polymorphic_id_values; +} + +void ComplexTypeEntry::setExpensePolicy(const ExpensePolicy &policy) { + m_expense_policy = policy; +} +const ExpensePolicy &ComplexTypeEntry::expensePolicy() const { + return m_expense_policy; +} + +const QString& ComplexTypeEntry::targetType() const { + return m_target_type; +} +void ComplexTypeEntry::setTargetType(const QString &code) { + m_target_type = code; +} + +QString ComplexTypeEntry::targetLangName() const { + if(m_java_name.isEmpty()){ + return TypeEntry::targetLangName(); + }else{ + return m_java_name; + } +} +void ComplexTypeEntry::setTargetLangName(const QString &name) { + m_java_name = name; +} + +bool ComplexTypeEntry::isGenericClass() const { + return m_attributes.testFlag(IsGenericClass); +} +void ComplexTypeEntry::setGenericClass(bool isGeneric) { + m_attributes.setFlag(IsGenericClass, isGeneric); +} + +bool ComplexTypeEntry::isTemplate() const { + return m_attributes.testFlag(IsTemplate); +} +void ComplexTypeEntry::setTemplate(bool isTemplate) { + m_attributes.setFlag(IsTemplate, isTemplate); +} + +bool ComplexTypeEntry::isNativeInterface() const { + return m_attributes.testFlag(IsNativeInterface); +} +void ComplexTypeEntry::setNativeInterface(bool isNativeInterface) { + m_attributes.setFlag(IsNativeInterface, isNativeInterface); +} + +bool ComplexTypeEntry::inhibitMetaobject() const { + return m_attributes.testFlag(InhibitMetaobject); +} +void ComplexTypeEntry::setInhibitMetaobject(bool inhibitMetaobject) { + m_attributes.setFlag(InhibitMetaobject, inhibitMetaobject); +} + +const QString& ComplexTypeEntry::threadAffinity() const { + return m_threadAffinity; +} +void ComplexTypeEntry::setThreadAffinity(const QString &code) { + m_threadAffinity = code; +} + +const QString& ComplexTypeEntry::ppCondition() const { + return m_pp_condition; +} +void ComplexTypeEntry::setPPCondition(const QString &pp_condition) { + m_pp_condition = pp_condition; +} + +void ComplexTypeEntry::addDelegatedBaseClass(QString baseClass, QString delegate){ + m_delegatedBaseClasses.insert(baseClass, delegate); +} + +const QMap& ComplexTypeEntry::delegatedBaseClasses() const{ + return m_delegatedBaseClasses; +} + +bool ComplexTypeEntry::isNativeIdBased() const { + return m_attributes.testFlag(IsNativeIdBased); +} + +void ComplexTypeEntry::disableNativeIdUsage() { + m_attributes.setFlag(IsNativeIdBased, false); +} + +void ComplexTypeEntry::addInstantiation(const QStringList& instantiation, const ComplexTypeEntry* typeEntry){ + m_instantiations[instantiation] = typeEntry; +} + +const QMap& ComplexTypeEntry::instantiations() const { + return m_instantiations; +} +void ComplexTypeEntry::setExtendType(const QString& extendType){ m_extendType = extendType; } +const QString& ComplexTypeEntry::extendType() const { return m_extendType; } + +void ComplexTypeEntry::setCustomConstructor(const CustomFunction &func, ConstructorType type) { + m_customConstructors[type] = func; +} +CustomFunction ComplexTypeEntry::customConstructor(ConstructorType type) const { + return m_customConstructors[type]; +} + +void ComplexTypeEntry::setCustomDestructor(const CustomFunction &func) { + m_customDestructor = func; +} +const CustomFunction& ComplexTypeEntry::customDestructor() const { + return m_customDestructor; +} + +bool ComplexTypeEntry::skipMetaTypeRegistration() const { + return m_attributes.testFlag(SkipMetaTypeRegistration); +} + +void ComplexTypeEntry::setSkipMetaTypeRegistration(bool skipMetaTypeRegistration){ + m_attributes.setFlag(SkipMetaTypeRegistration, skipMetaTypeRegistration); +} + +void ComplexTypeEntry::setHasPrivateConstructors(){ + m_functionAttributes.setFlag(HasAnyPrivateConstructor); +} + +void ComplexTypeEntry::setHasNonPrivateConstructors(){ + m_functionAttributes.setFlag(HasAnyNonPrivateConstructor); +} + +bool ComplexTypeEntry::hasPrivateConstructors() const { + return m_functionAttributes.testFlag(HasAnyPrivateConstructor); +} + +bool ComplexTypeEntry::hasNonPrivateConstructors() const { + return m_functionAttributes.testFlag(HasAnyNonPrivateConstructor); +} + +bool ComplexTypeEntry::hasJustPrivateConstructors() const { + return hasPrivateConstructors() && !hasNonPrivateConstructors(); +} + +bool ComplexTypeEntry::hasPublicDefaultConstructor() const { + return m_functionAttributes.testFlag(HasPublicDefaultConstructor); +} + +bool ComplexTypeEntry::hasProtectedDefaultConstructor() const { + return m_functionAttributes.testFlag(HasProtectedDefaultConstructor); +} + +bool ComplexTypeEntry::hasPrivateDefaultConstructor() const { + return m_functionAttributes.testFlag(HasPrivateDefaultConstructor); +} + +void ComplexTypeEntry::setHasPublicDefaultConstructor(){ + m_functionAttributes.setFlag(HasProtectedDefaultConstructor, false); + m_functionAttributes.setFlag(HasPrivateDefaultConstructor, false); + m_functionAttributes.setFlag(HasPublicDefaultConstructor); +} + +void ComplexTypeEntry::setHasProtectedDefaultConstructor(){ + m_functionAttributes.setFlag(HasPublicDefaultConstructor, false); + m_functionAttributes.setFlag(HasPrivateDefaultConstructor, false); + m_functionAttributes.setFlag(HasProtectedDefaultConstructor); +} + +void ComplexTypeEntry::setHasPrivateDefaultConstructor(){ + m_functionAttributes.setFlag(HasProtectedDefaultConstructor, false); + m_functionAttributes.setFlag(HasPublicDefaultConstructor, false); + m_functionAttributes.setFlag(HasPrivateDefaultConstructor); +} + +bool ComplexTypeEntry::hasPublicCopyConstructor() const { + return m_functionAttributes.testFlag(HasPublicCopyConstructor); +} + +bool ComplexTypeEntry::hasProtectedCopyConstructor() const { + return m_functionAttributes.testFlag(HasProtectedCopyConstructor); +} + +bool ComplexTypeEntry::hasPrivateCopyConstructor() const { + return m_functionAttributes.testFlag(HasPrivateCopyConstructor); +} + +void ComplexTypeEntry::setHasPublicCopyConstructor(){ + m_functionAttributes.setFlag(HasProtectedCopyConstructor, false); + m_functionAttributes.setFlag(HasPrivateCopyConstructor, false); + m_functionAttributes.setFlag(HasPublicCopyConstructor); +} + +void ComplexTypeEntry::setHasProtectedCopyConstructor(){ + m_functionAttributes.setFlag(HasPublicCopyConstructor, false); + m_functionAttributes.setFlag(HasPrivateCopyConstructor, false); + m_functionAttributes.setFlag(HasProtectedCopyConstructor); +} + +void ComplexTypeEntry::setHasPrivateCopyConstructor(){ + m_functionAttributes.setFlag(HasProtectedCopyConstructor, false); + m_functionAttributes.setFlag(HasPublicCopyConstructor, false); + m_functionAttributes.setFlag(HasPrivateCopyConstructor); +} + +bool ComplexTypeEntry::hasPublicMoveConstructor() const { + return m_functionAttributes.testFlag(HasPublicMoveConstructor); +} + +bool ComplexTypeEntry::hasProtectedMoveConstructor() const { + return m_functionAttributes.testFlag(HasProtectedMoveConstructor); +} + +bool ComplexTypeEntry::hasPrivateMoveConstructor() const { + return m_functionAttributes.testFlag(HasPrivateMoveConstructor); +} + +void ComplexTypeEntry::setHasPublicMoveConstructor(){ + m_functionAttributes.setFlag(HasProtectedMoveConstructor, false); + m_functionAttributes.setFlag(HasPrivateMoveConstructor, false); + m_functionAttributes.setFlag(HasPublicMoveConstructor); +} + +void ComplexTypeEntry::setHasProtectedMoveConstructor(){ + m_functionAttributes.setFlag(HasPublicMoveConstructor, false); + m_functionAttributes.setFlag(HasPrivateMoveConstructor, false); + m_functionAttributes.setFlag(HasProtectedMoveConstructor); +} + +void ComplexTypeEntry::setHasPrivateMoveConstructor(){ + m_functionAttributes.setFlag(HasProtectedMoveConstructor, false); + m_functionAttributes.setFlag(HasPublicMoveConstructor, false); + m_functionAttributes.setFlag(HasPrivateMoveConstructor); +} + +bool ComplexTypeEntry::hasPublicMoveAssignment() const { + return m_functionAttributes.testFlag(HasPublicMoveAssignment); +} + +bool ComplexTypeEntry::hasProtectedMoveAssignment() const { + return m_functionAttributes.testFlag(HasProtectedMoveAssignment); +} + +bool ComplexTypeEntry::hasPrivateMoveAssignment() const { + return m_functionAttributes.testFlag(HasPrivateMoveAssignment); +} + +void ComplexTypeEntry::setHasPublicMoveAssignment(){ + m_functionAttributes.setFlag(HasPrivateMoveAssignment, false); + m_functionAttributes.setFlag(HasProtectedMoveAssignment, false); + m_functionAttributes.setFlag(HasPublicMoveAssignment); +} + +void ComplexTypeEntry::setHasProtectedMoveAssignment(){ + m_functionAttributes.setFlag(HasPrivateMoveAssignment, false); + m_functionAttributes.setFlag(HasPublicMoveAssignment, false); + m_functionAttributes.setFlag(HasProtectedMoveAssignment); +} + +void ComplexTypeEntry::setHasPrivateMoveAssignment(){ + m_functionAttributes.setFlag(HasPublicMoveAssignment, false); + m_functionAttributes.setFlag(HasProtectedMoveAssignment, false); + m_functionAttributes.setFlag(HasPrivateMoveAssignment); +} + +bool ComplexTypeEntry::hasPublicDefaultAssignment() const { + return m_functionAttributes.testFlag(HasPublicDefaultAssignment); +} + +bool ComplexTypeEntry::hasProtectedDefaultAssignment() const { + return m_functionAttributes.testFlag(HasProtectedDefaultAssignment); +} + +bool ComplexTypeEntry::hasPrivateDefaultAssignment() const { + return m_functionAttributes.testFlag(HasPrivateDefaultAssignment); +} + +void ComplexTypeEntry::setHasPublicDefaultAssignment(){ + m_functionAttributes.setFlag(HasPrivateDefaultAssignment, false); + m_functionAttributes.setFlag(HasProtectedDefaultAssignment, false); + m_functionAttributes.setFlag(HasPublicDefaultAssignment); +} + +void ComplexTypeEntry::setHasProtectedDefaultAssignment(){ + m_functionAttributes.setFlag(HasPrivateDefaultAssignment, false); + m_functionAttributes.setFlag(HasPublicDefaultAssignment, false); + m_functionAttributes.setFlag(HasProtectedDefaultAssignment); +} + +void ComplexTypeEntry::setHasPrivateDefaultAssignment(){ + m_functionAttributes.setFlag(HasPublicDefaultAssignment, false); + m_functionAttributes.setFlag(HasProtectedDefaultAssignment, false); + m_functionAttributes.setFlag(HasPrivateDefaultAssignment); +} + +void ComplexTypeEntry::setDestructorPrivate(){ + m_functionAttributes.setFlag(HasProtectedDestructor, false); + m_functionAttributes.setFlag(HasPrivateDestructor, true); +} + +bool ComplexTypeEntry::isDestructorPrivate() const { + return m_functionAttributes.testFlag(HasPrivateDestructor); +} + +void ComplexTypeEntry::setDestructorProtected(){ + m_functionAttributes.setFlag(HasPrivateDestructor, false); + m_functionAttributes.setFlag(HasProtectedDestructor, true); +} + +bool ComplexTypeEntry::isDestructorProtected() const { + return m_functionAttributes.testFlag(HasProtectedDestructor); +} + +void ComplexTypeEntry::setDestructorVirtual(){ + m_functionAttributes.setFlag(HasVirtualDestructor, true); +} + +bool ComplexTypeEntry::isDestructorVirtual() const { + return m_functionAttributes.testFlag(HasVirtualDestructor); +} + +bool ComplexTypeEntry::isDestructorPublic() const { + return !m_functionAttributes.testFlag(HasPrivateDestructor) && !m_functionAttributes.testFlag(HasProtectedDestructor); +} + +void ComplexTypeEntry::setHasEquals(){ + m_functionAttributes.setFlag(HasEquals, true); +} + +bool ComplexTypeEntry::hasEquals() const { + return m_functionAttributes.testFlag(HasEquals); +} + +void ComplexTypeEntry::setHasHash(){ + m_functionAttributes.setFlag(HasHash, true); +} + +bool ComplexTypeEntry::hasHash() const { + return m_functionAttributes.testFlag(HasHash); +} + +void ComplexTypeEntry::setHasVirtualFunctions(){ + m_functionAttributes.setFlag(HasVirtuals, true); +} + +bool ComplexTypeEntry::hasVirtualFunctions() const { + return m_functionAttributes.testFlag(HasVirtuals); +} + +void ComplexTypeEntry::setHasFinalFunctions(){ + m_functionAttributes.setFlag(HasFinals, true); +} + +bool ComplexTypeEntry::hasFinalFunctions() const { + return m_functionAttributes.testFlag(HasFinals); +} + +bool ComplexTypeEntry::hasPureVirtualFunctions(bool nonPrivate) const { + return m_functionAttributes.testFlag(nonPrivate ? HasPureVirtuals : HasPrivatePureVirtuals); +} + +void ComplexTypeEntry::setHasPureVirtualFunctions(bool nonPrivate){ + m_functionAttributes.setFlag(nonPrivate ? HasPureVirtuals : HasPrivatePureVirtuals); +} + +const QStringList& ComplexTypeEntry::implicitCasts() const { + return m_implicitCasts; +} + +void ComplexTypeEntry::addImplicitCast(const QString& cast){ + m_implicitCasts.append(cast); +} + QString PrimitiveTypeEntry::javaObjectName() const { static QMap table; if (table.isEmpty()) { @@ -323,6 +924,7 @@ QString ContainerTypeEntry::targetLangName() const { case std_chrono_template: if(qualifiedCppName()=="std::chrono::time_point") return "Instant"; + Q_FALLTHROUGH(); case std_chrono: return "Duration"; case QQmlListPropertyContainer: return "QQmlListProperty"; // new for QtQml module default: @@ -519,6 +1121,36 @@ void ComplexTypeEntry::setNoImplicitConstructors(bool newNoImplicitConstructors) noImplicitConstructors = newNoImplicitConstructors; } +bool ComplexTypeEntry::getNotAssignable() const +{ + return notAssignable; +} + +void ComplexTypeEntry::setNotAssignable(bool newNotAssignable) +{ + notAssignable = newNotAssignable; +} + +bool ComplexTypeEntry::getNotMoveAssignable() const +{ + return notMoveAssignable; +} + +void ComplexTypeEntry::setNotMoveAssignable(bool newNotMoveAssignable) +{ + notMoveAssignable = newNotMoveAssignable; +} + +bool ComplexTypeEntry::getNotCloneable() const +{ + return notCloneable; +} + +void ComplexTypeEntry::setNotCloneable(bool newNotCloneable) +{ + notCloneable = newNotCloneable; +} + bool ImplementorTypeEntry::isValueOwner() const { return m_attributes.testFlag(IsValueOwner); @@ -529,4 +1161,24 @@ void ImplementorTypeEntry::setIsValueOwner(bool is_value_owner) m_attributes.setFlag(IsValueOwner, is_value_owner); } +bool AliasTypeEntry::getAsNativePointer() const +{ + return asNativePointer; +} + +void AliasTypeEntry::setAsNativePointer(bool newAsNativePointer) +{ + asNativePointer = newAsNativePointer; +} + +bool AliasTypeEntry::getHasIndirections() const +{ + return hasIndirections; +} + +void AliasTypeEntry::setHasIndirections(bool newHasIndirections) +{ + hasIndirections = newHasIndirections; +} + } diff --git a/src/cpp/QtJambiGenerator/typesystem/typeentry.h b/src/cpp/QtJambiGenerator/typesystem/typeentry.h index cf95abaa..f44c2506 100644 --- a/src/cpp/QtJambiGenerator/typesystem/typeentry.h +++ b/src/cpp/QtJambiGenerator/typesystem/typeentry.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** @@ -126,17 +126,19 @@ class TypeEntry { QMetaObjectType, QMetaObjectConnectionType, GlobalType, + NativePointerType, UnknownType, }; enum CodeGeneration { - GenerateTargetLang = 0x0001, - GenerateCpp = 0x0002, - GenerateForSubclass = 0x0004, - GenerateNoShell = 0x0010, - - GenerateNothing = 0, - GenerateAll = 0xff0f, + GenerateTargetLang = 0x000001, + GenerateCpp = 0x000002, + GenerateForSubclass = 0x000004, + GenerateNoShell = 0x000010, + InheritedByTypeSystem = 0x010000, + + GenerateNothing = 0x000000, + GenerateAll = 0x00ff0f, GenerateCode = GenerateTargetLang | GenerateCpp }; @@ -280,6 +282,10 @@ class TypeEntry { return m_type == TypeSystemType; } + bool isNativePointer() const { + return m_type == NativePointerType; + } + virtual bool preferredConversion() const { return m_preferred_conversion; } @@ -553,6 +559,30 @@ class AutoTypeEntry : public TypeEntry { } }; +class NativePointerTypeEntry : public TypeEntry { +public: + NativePointerTypeEntry(const QString& name) : TypeEntry(name, NativePointerType) { + setCodeGeneration(GenerateNothing); + } + QString javaPackage() const override { + return QStringLiteral("io.qt"); + } + QString jniName() const override { + return QStringLiteral("jobject"); + } + QString targetLangName() const override { + return QStringLiteral("QNativePointer"); + } + + const QString& ppCondition() const override { + return m_pp_condition; + } + void setPPCondition(const QString &pp_condition) { + m_pp_condition = pp_condition; + } + QString m_pp_condition; +}; + class UnknownTypeEntry : public TypeEntry { public: UnknownTypeEntry(const QString &name) : TypeEntry(name, UnknownType) { @@ -587,7 +617,7 @@ class TemplateArgumentEntry : public TypeEntry { class ArrayTypeEntry : public TypeEntry { public: - ArrayTypeEntry(const TypeEntry *nested_type, int indirections) : TypeEntry("Array", ArrayType), m_nested_type(nested_type), m_indirections(indirections) { + ArrayTypeEntry(const QString& name, const TypeEntry *nested_type, int indirections) : TypeEntry(name, ArrayType), m_nested_type(nested_type), m_indirections(indirections) { Q_ASSERT(m_nested_type); } @@ -1152,617 +1182,271 @@ class ComplexTypeEntry : public TypeEntry { ComplexTypeEntry(const QString &name, Type t); - bool isComplex() const override { - return true; - } + QString qualifiedCppName() const override; - const IncludeList& extraIncludes() const { - return m_extra_includes; - } - void setExtraIncludes(const IncludeList &includes) { - m_extra_includes = includes; - } - void addExtraInclude(const Include &include) { - if (!m_includes_used.value(include.name, false)) { - m_extra_includes << include; - m_includes_used[include.name] = true; - } - } + bool isComplex() const override; + const IncludeList& extraIncludes() const; + void setExtraIncludes(const IncludeList &includes); + void addExtraInclude(const Include &include); ComplexTypeEntry *copy() const; - void setLookupName(const QString &name) { - m_lookup_name = name; - } + void setLookupName(const QString &name); - virtual QString lookupName() const override { - return m_lookup_name.isEmpty() ? targetLangName() : m_lookup_name; - } + QString lookupName() const override; - QString jniName() const override { - return strings_jobject; - } + QString jniName() const override; + const Include& include() const; + void setInclude(const Include &inc); - const Include& include() const { - return m_include; - } - void setInclude(const Include &inc) { - m_include = inc; - } + void setForceAbstract(); - void setForceAbstract(){ - m_type_flags.setFlag(ForceAbstract); - } + bool isForceAbstract() const; - bool isForceAbstract() const { - return m_type_flags.testFlag(ForceAbstract); - } + void setThreadAffine(); - void setThreadAffine(){ - m_type_flags.setFlag(ThreadAffine); - } + bool isThreadAffine() const; - bool isThreadAffine() const { - return m_type_flags.testFlag(ThreadAffine); - } + void setDeprecated(); - void setDeprecated(){ - m_type_flags.setFlag(Deprecated); - } + bool isDeprecated() const; - bool isDeprecated() const { - return m_type_flags.testFlag(Deprecated); - } + void setForceFriendly(); - void setForceFriendly(){ - m_type_flags.setFlag(ForceFriendly); - } + bool isForceFriendly() const; - bool isForceFriendly() const { - return m_type_flags.testFlag(ForceFriendly); - } + void setHasNonPublicFields(); - void setHasNonPublicFields(){ - m_type_flags.setFlag(HasFields); - m_type_flags.setFlag(HasNonPublicFields); - } + bool hasNonPublicFields() const; - bool hasNonPublicFields() const { - return m_type_flags.testFlag(HasNonPublicFields); - } + void setHasFields(); - void setHasFields(){ - m_type_flags.setFlag(HasFields); - } + bool hasFields() const; - bool hasFields() const { - return m_type_flags.testFlag(HasFields); - } + TypeFlags typeFlags() const; - TypeFlags typeFlags() const { - return m_type_flags; - } + const CodeSnipList& codeSnips() const; + void setCodeSnips(const CodeSnipList &codeSnips); + void addCodeSnips(const CodeSnipList &codeSnips); + void addCodeSnip(const CodeSnip &codeSnip); - const CodeSnipList& codeSnips() const { - return m_code_snips; - } - void setCodeSnips(const CodeSnipList &codeSnips) { - m_code_snips = codeSnips; - } - void addCodeSnips(const CodeSnipList &codeSnips) { - m_code_snips << codeSnips; - } - void addCodeSnip(const CodeSnip &codeSnip) { - m_code_snips << codeSnip; - } - - const FunctionModificationList& functionModifications() const { - return m_function_mods; - } - void setFunctionModifications(const FunctionModificationList &functionModifications) { - m_function_mods = functionModifications; - } - void addFunctionModifications(const FunctionModificationList &functionModifications) { - m_function_mods << functionModifications; - } - void addFunctionModification(const FunctionModification &functionModification) { - m_function_mods << functionModification; - } + const FunctionModificationList& functionModifications() const; + void setFunctionModifications(const FunctionModificationList &functionModifications); + void addFunctionModifications(const FunctionModificationList &functionModifications); + void addFunctionModification(const FunctionModification &functionModification); FunctionModificationList functionModifications(const QString &signature) const; bool hasFunctionCodeInjections(const QString &methodSignature, TS::Language language, const QSet& positions) const; FieldModification fieldModification(const QString &name) const; - void setFieldModifications(const FieldModificationList &mods) { - m_field_mods = mods; - } - void addFieldModifications(const FieldModificationList &mods) { - m_field_mods << mods; - } - void addFieldModification(const FieldModification &mod) { - m_field_mods << mod; - } - const FieldModificationList& fieldModifications() const { - return m_field_mods; - } + void setFieldModifications(const FieldModificationList &mods); + void addFieldModifications(const FieldModificationList &mods); + void addFieldModification(const FieldModification &mod); + const FieldModificationList& fieldModifications() const; - QString javaPackage() const override { - return m_package; - } - void setTargetLangPackage(const QString &package) { - m_package = package; - } + QString javaPackage() const override; + void setTargetLangPackage(const QString &package); - QString targetTypeSystem() const override { - return m_target_typesystem; - } + QString targetTypeSystem() const override; - void setTargetTypeSystem(const QString &qt_jambi_library) { - m_target_typesystem = qt_jambi_library; - } + void setTargetTypeSystem(const QString &qt_jambi_library); - bool isQObject() const { - return m_attributes.testFlag(IsQObject); - } - void setQObject(bool qobject) { - m_attributes.setFlag(IsQObject, qobject); - } - bool isQEvent() const { - return m_attributes.testFlag(IsQEvent); - } - void setQEvent(bool b) { - m_attributes.setFlag(IsQEvent, b); - } - bool isQByteArrayView() const { - return m_attributes.testFlag(IsQByteArrayView); - } - void setQByteArrayView(bool b) { - m_attributes.setFlag(IsQByteArrayView, b); - } - bool isGLsync() const { - return m_attributes.testFlag(IsGLsync); - } + bool isQObject() const; + void setQObject(bool qobject); + bool isQEvent() const; + void setQEvent(bool b); + bool isQByteArrayView() const; + void setQByteArrayView(bool b); + bool isGLsync() const; - bool isQWidget() const { - return m_attributes.testFlag(IsQWidget); - } - void setQWidget(bool qWidget) { - m_attributes.setFlag(IsQWidget, qWidget); - } + bool isQWidget() const; + void setQWidget(bool qWidget); - bool isQWindow() const { - return m_attributes.testFlag(IsQWindow); - } - void setQWindow(bool qw) { - m_attributes.setFlag(IsQWindow, qw); - } + bool isQWindow() const; + void setQWindow(bool qw); - bool isQAction() const { - return m_attributes.testFlag(IsQAction); - } - void setQAction(bool qw) { - m_attributes.setFlag(IsQAction, qw); - } + bool isQAction() const; + void setQAction(bool qw); - bool isQMediaControl() const { - return m_attributes.testFlag(IsQMediaControl); - } - void setQMediaControl(bool qw) { - m_attributes.setFlag(IsQMediaControl, qw); - } + bool isQMediaControl() const; + void setQMediaControl(bool qw); - bool isQCoreApplication() const { - return m_attributes.testFlag(IsQCoreApplication); - } - void setQCoreApplication(bool qw) { - m_attributes.setFlag(IsQCoreApplication, qw); - } + bool isQCoreApplication() const; + void setQCoreApplication(bool qw); - const QString& defaultSuperclass() const { - return m_default_superclass; - } - void setDefaultSuperclass(const QString &sc) { - m_default_superclass = sc; - } + const QString& defaultSuperclass() const; + void setDefaultSuperclass(const QString &sc); + void setImplements(const QString &implements); + const QString& implements() const; - QString qualifiedCppName() const override; + void setIsPolymorphicBase(bool on); + bool isPolymorphicBase() const; - /** - * the class-type attribute 'implements' can be used to extend the list of interfaces used by a class - * @brief setImplements - * @param implements - */ - void setImplements(const QString &implements) { - m_implements = implements; - } - const QString& implements() const { - return m_implements; - } + void setPolymorphicIdValue(const QString &value); + const QString& polymorphicIdValue() const; - void setIsPolymorphicBase(bool on) { - m_attributes.setFlag(IsPolymorphicBase, on); - } - bool isPolymorphicBase() const { - return m_attributes.testFlag(IsPolymorphicBase); - } + void addInterfacePolymorphicIdValue(const QString &iface, const QString &value); + const QMap& interfacePolymorphicIdValues() const; - void setPolymorphicIdValue(const QString &value) { - m_polymorphic_id_value = value; - } - const QString& polymorphicIdValue() const { - return m_polymorphic_id_value; - } + void setExpensePolicy(const ExpensePolicy &policy); + const ExpensePolicy &expensePolicy() const; - void addInterfacePolymorphicIdValue(const QString &iface, const QString &value) { - m_interface_polymorphic_id_values[iface] = value; - } - const QMap& interfacePolymorphicIdValues() const { - return m_interface_polymorphic_id_values; - } + const QString& targetType() const; + void setTargetType(const QString &code); - void setExpensePolicy(const ExpensePolicy &policy) { - m_expense_policy = policy; - } - const ExpensePolicy &expensePolicy() const { - return m_expense_policy; - } + QString targetLangName() const override; + void setTargetLangName(const QString &name); - const QString& targetType() const { - return m_target_type; - } - void setTargetType(const QString &code) { - m_target_type = code; - } + bool isGenericClass() const; + void setGenericClass(bool isGeneric); - QString targetLangName() const override { - if(m_java_name.isEmpty()){ - return TypeEntry::targetLangName(); - }else{ - return m_java_name; - } - } - void setTargetLangName(const QString &name) { - m_java_name = name; - } + bool isTemplate() const; + void setTemplate(bool isTemplate); - bool isGenericClass() const { - return m_attributes.testFlag(IsGenericClass); - } - void setGenericClass(bool isGeneric) { - m_attributes.setFlag(IsGenericClass, isGeneric); - } + bool isNativeInterface() const; + void setNativeInterface(bool isNativeInterface); - bool isTemplate() const { - return m_attributes.testFlag(IsTemplate); - } - void setTemplate(bool isTemplate) { - m_attributes.setFlag(IsTemplate, isTemplate); - } + bool inhibitMetaobject() const; + void setInhibitMetaobject(bool inhibitMetaobject); - bool isNativeInterface() const { - return m_attributes.testFlag(IsNativeInterface); - } - void setNativeInterface(bool isNativeInterface) { - m_attributes.setFlag(IsNativeInterface, isNativeInterface); - } + const QString& threadAffinity() const; + void setThreadAffinity(const QString &code); - bool inhibitMetaobject() const { - return m_attributes.testFlag(InhibitMetaobject); - } - void setInhibitMetaobject(bool inhibitMetaobject) { - m_attributes.setFlag(InhibitMetaobject, inhibitMetaobject); - } - - const QString& threadAffinity() const { - return m_threadAffinity; - } - void setThreadAffinity(const QString &code) { - m_threadAffinity = code; - } - - const QString& ppCondition() const override { - return m_pp_condition; - } - void setPPCondition(const QString &pp_condition) { - m_pp_condition = pp_condition; - } + const QString& ppCondition() const override; + void setPPCondition(const QString &pp_condition); - void addDelegatedBaseClass(QString baseClass, QString delegate){ - m_delegatedBaseClasses.insert(baseClass, delegate); - } + void addDelegatedBaseClass(QString baseClass, QString delegate); - const QMap& delegatedBaseClasses() const{ - return m_delegatedBaseClasses; - } + const QMap& delegatedBaseClasses() const; - virtual bool isNativeIdBased() const override { - return m_attributes.testFlag(IsNativeIdBased); - } + virtual bool isNativeIdBased() const override; - void disableNativeIdUsage() { - m_attributes.setFlag(IsNativeIdBased, false); - } + void disableNativeIdUsage(); - void addInstantiation(const QStringList& instantiation, const ComplexTypeEntry* typeEntry = nullptr){ - m_instantiations[instantiation] = typeEntry; - } + void addInstantiation(const QStringList& instantiation, const ComplexTypeEntry* typeEntry = nullptr); - const QMap& instantiations() const { - return m_instantiations; - } - void setExtendType(const QString& extendType){ m_extendType = extendType; } - const QString& extendType() const { return m_extendType; } + const QMap& instantiations() const; + void setExtendType(const QString& extendType); + const QString& extendType() const; - void setCustomConstructor(const CustomFunction &func, ConstructorType type = CopyConstructor) { - m_customConstructors[type] = func; - } - CustomFunction customConstructor(ConstructorType type = CopyConstructor) const { - return m_customConstructors[type]; - } + void setCustomConstructor(const CustomFunction &func, ConstructorType type = CopyConstructor); + CustomFunction customConstructor(ConstructorType type = CopyConstructor) const; - void setCustomDestructor(const CustomFunction &func) { - m_customDestructor = func; - } - const CustomFunction& customDestructor() const { - return m_customDestructor; - } + void setCustomDestructor(const CustomFunction &func); + const CustomFunction& customDestructor() const; - bool skipMetaTypeRegistration() const { - return m_attributes.testFlag(SkipMetaTypeRegistration); - } + bool skipMetaTypeRegistration() const; - void setSkipMetaTypeRegistration(bool skipMetaTypeRegistration){ - m_attributes.setFlag(SkipMetaTypeRegistration, skipMetaTypeRegistration); - } + void setSkipMetaTypeRegistration(bool skipMetaTypeRegistration); - void setHasPrivateConstructors(){ - m_functionAttributes.setFlag(HasAnyPrivateConstructor); - } + void setHasPrivateConstructors(); - void setHasNonPrivateConstructors(){ - m_functionAttributes.setFlag(HasAnyNonPrivateConstructor); - } + void setHasNonPrivateConstructors(); - bool hasPrivateConstructors() const { - return m_functionAttributes.testFlag(HasAnyPrivateConstructor); - } + bool hasPrivateConstructors() const; - bool hasNonPrivateConstructors() const { - return m_functionAttributes.testFlag(HasAnyNonPrivateConstructor); - } + bool hasNonPrivateConstructors() const; - bool hasJustPrivateConstructors() const { - return hasPrivateConstructors() && !hasNonPrivateConstructors(); - } + bool hasJustPrivateConstructors() const; - bool hasPublicDefaultConstructor() const { - return m_functionAttributes.testFlag(HasPublicDefaultConstructor); - } + bool hasPublicDefaultConstructor() const; - bool hasProtectedDefaultConstructor() const { - return m_functionAttributes.testFlag(HasProtectedDefaultConstructor); - } + bool hasProtectedDefaultConstructor() const; - bool hasPrivateDefaultConstructor() const { - return m_functionAttributes.testFlag(HasPrivateDefaultConstructor); - } + bool hasPrivateDefaultConstructor() const; - void setHasPublicDefaultConstructor(){ - m_functionAttributes.setFlag(HasProtectedDefaultConstructor, false); - m_functionAttributes.setFlag(HasPrivateDefaultConstructor, false); - m_functionAttributes.setFlag(HasPublicDefaultConstructor); - } + void setHasPublicDefaultConstructor(); - void setHasProtectedDefaultConstructor(){ - m_functionAttributes.setFlag(HasPublicDefaultConstructor, false); - m_functionAttributes.setFlag(HasPrivateDefaultConstructor, false); - m_functionAttributes.setFlag(HasProtectedDefaultConstructor); - } + void setHasProtectedDefaultConstructor(); - void setHasPrivateDefaultConstructor(){ - m_functionAttributes.setFlag(HasProtectedDefaultConstructor, false); - m_functionAttributes.setFlag(HasPublicDefaultConstructor, false); - m_functionAttributes.setFlag(HasPrivateDefaultConstructor); - } + void setHasPrivateDefaultConstructor(); - bool hasPublicCopyConstructor() const { - return m_functionAttributes.testFlag(HasPublicCopyConstructor); - } + bool hasPublicCopyConstructor() const; - bool hasProtectedCopyConstructor() const { - return m_functionAttributes.testFlag(HasProtectedCopyConstructor); - } + bool hasProtectedCopyConstructor() const; - bool hasPrivateCopyConstructor() const { - return m_functionAttributes.testFlag(HasPrivateCopyConstructor); - } + bool hasPrivateCopyConstructor() const; - void setHasPublicCopyConstructor(){ - m_functionAttributes.setFlag(HasProtectedCopyConstructor, false); - m_functionAttributes.setFlag(HasPrivateCopyConstructor, false); - m_functionAttributes.setFlag(HasPublicCopyConstructor); - } + void setHasPublicCopyConstructor(); - void setHasProtectedCopyConstructor(){ - m_functionAttributes.setFlag(HasPublicCopyConstructor, false); - m_functionAttributes.setFlag(HasPrivateCopyConstructor, false); - m_functionAttributes.setFlag(HasProtectedCopyConstructor); - } + void setHasProtectedCopyConstructor(); - void setHasPrivateCopyConstructor(){ - m_functionAttributes.setFlag(HasProtectedCopyConstructor, false); - m_functionAttributes.setFlag(HasPublicCopyConstructor, false); - m_functionAttributes.setFlag(HasPrivateCopyConstructor); - } + void setHasPrivateCopyConstructor(); - bool hasPublicMoveConstructor() const { - return m_functionAttributes.testFlag(HasPublicMoveConstructor); - } + bool hasPublicMoveConstructor() const; - bool hasProtectedMoveConstructor() const { - return m_functionAttributes.testFlag(HasProtectedMoveConstructor); - } + bool hasProtectedMoveConstructor() const; - bool hasPrivateMoveConstructor() const { - return m_functionAttributes.testFlag(HasPrivateMoveConstructor); - } + bool hasPrivateMoveConstructor() const; - void setHasPublicMoveConstructor(){ - m_functionAttributes.setFlag(HasProtectedMoveConstructor, false); - m_functionAttributes.setFlag(HasPrivateMoveConstructor, false); - m_functionAttributes.setFlag(HasPublicMoveConstructor); - } + void setHasPublicMoveConstructor(); - void setHasProtectedMoveConstructor(){ - m_functionAttributes.setFlag(HasPublicMoveConstructor, false); - m_functionAttributes.setFlag(HasPrivateMoveConstructor, false); - m_functionAttributes.setFlag(HasProtectedMoveConstructor); - } + void setHasProtectedMoveConstructor(); - void setHasPrivateMoveConstructor(){ - m_functionAttributes.setFlag(HasProtectedMoveConstructor, false); - m_functionAttributes.setFlag(HasPublicMoveConstructor, false); - m_functionAttributes.setFlag(HasPrivateMoveConstructor); - } + void setHasPrivateMoveConstructor(); - bool hasPublicMoveAssignment() const { - return m_functionAttributes.testFlag(HasPublicMoveAssignment); - } + bool hasPublicMoveAssignment() const; - bool hasProtectedMoveAssignment() const { - return m_functionAttributes.testFlag(HasProtectedMoveAssignment); - } + bool hasProtectedMoveAssignment() const; - bool hasPrivateMoveAssignment() const { - return m_functionAttributes.testFlag(HasPrivateMoveAssignment); - } + bool hasPrivateMoveAssignment() const; - void setHasPublicMoveAssignment(){ - m_functionAttributes.setFlag(HasPrivateMoveAssignment, false); - m_functionAttributes.setFlag(HasProtectedMoveAssignment, false); - m_functionAttributes.setFlag(HasPublicMoveAssignment); - } + void setHasPublicMoveAssignment(); - void setHasProtectedMoveAssignment(){ - m_functionAttributes.setFlag(HasPrivateMoveAssignment, false); - m_functionAttributes.setFlag(HasPublicMoveAssignment, false); - m_functionAttributes.setFlag(HasProtectedMoveAssignment); - } + void setHasProtectedMoveAssignment(); - void setHasPrivateMoveAssignment(){ - m_functionAttributes.setFlag(HasPublicMoveAssignment, false); - m_functionAttributes.setFlag(HasProtectedMoveAssignment, false); - m_functionAttributes.setFlag(HasPrivateMoveAssignment); - } + void setHasPrivateMoveAssignment(); - bool hasPublicDefaultAssignment() const { - return m_functionAttributes.testFlag(HasPublicDefaultAssignment); - } + bool hasPublicDefaultAssignment() const; - bool hasProtectedDefaultAssignment() const { - return m_functionAttributes.testFlag(HasProtectedDefaultAssignment); - } + bool hasProtectedDefaultAssignment() const; - bool hasPrivateDefaultAssignment() const { - return m_functionAttributes.testFlag(HasPrivateDefaultAssignment); - } + bool hasPrivateDefaultAssignment() const; - void setHasPublicDefaultAssignment(){ - m_functionAttributes.setFlag(HasPrivateDefaultAssignment, false); - m_functionAttributes.setFlag(HasProtectedDefaultAssignment, false); - m_functionAttributes.setFlag(HasPublicDefaultAssignment); - } + void setHasPublicDefaultAssignment(); - void setHasProtectedDefaultAssignment(){ - m_functionAttributes.setFlag(HasPrivateDefaultAssignment, false); - m_functionAttributes.setFlag(HasPublicDefaultAssignment, false); - m_functionAttributes.setFlag(HasProtectedDefaultAssignment); - } + void setHasProtectedDefaultAssignment(); - void setHasPrivateDefaultAssignment(){ - m_functionAttributes.setFlag(HasPublicDefaultAssignment, false); - m_functionAttributes.setFlag(HasProtectedDefaultAssignment, false); - m_functionAttributes.setFlag(HasPrivateDefaultAssignment); - } + void setHasPrivateDefaultAssignment(); - void setDestructorPrivate(){ - m_functionAttributes.setFlag(HasProtectedDestructor, false); - m_functionAttributes.setFlag(HasPrivateDestructor, true); - } + void setDestructorPrivate(); - bool isDestructorPrivate() const { - return m_functionAttributes.testFlag(HasPrivateDestructor); - } + bool isDestructorPrivate() const; - void setDestructorProtected(){ - m_functionAttributes.setFlag(HasPrivateDestructor, false); - m_functionAttributes.setFlag(HasProtectedDestructor, true); - } + void setDestructorProtected(); - bool isDestructorProtected() const { - return m_functionAttributes.testFlag(HasProtectedDestructor); - } + bool isDestructorProtected() const; - void setDestructorVirtual(){ - m_functionAttributes.setFlag(HasVirtualDestructor, true); - } + void setDestructorVirtual(); - bool isDestructorVirtual() const { - return m_functionAttributes.testFlag(HasVirtualDestructor); - } + bool isDestructorVirtual() const; - bool isDestructorPublic() const { - return !m_functionAttributes.testFlag(HasPrivateDestructor) && !m_functionAttributes.testFlag(HasProtectedDestructor); - } + bool isDestructorPublic() const; - void setHasEquals(){ - m_functionAttributes.setFlag(HasEquals, true); - } + void setHasEquals(); - bool hasEquals() const { - return m_functionAttributes.testFlag(HasEquals); - } + bool hasEquals() const; - void setHasHash(){ - m_functionAttributes.setFlag(HasHash, true); - } + void setHasHash(); - bool hasHash() const { - return m_functionAttributes.testFlag(HasHash); - } + bool hasHash() const; - void setHasVirtualFunctions(){ - m_functionAttributes.setFlag(HasVirtuals, true); - } + void setHasVirtualFunctions(); - bool hasVirtualFunctions() const { - return m_functionAttributes.testFlag(HasVirtuals); - } + bool hasVirtualFunctions() const; - void setHasFinalFunctions(){ - m_functionAttributes.setFlag(HasFinals, true); - } + void setHasFinalFunctions(); - bool hasFinalFunctions() const { - return m_functionAttributes.testFlag(HasFinals); - } + bool hasFinalFunctions() const; - bool hasPureVirtualFunctions(bool nonPrivate = true) const { - return m_functionAttributes.testFlag(nonPrivate ? HasPureVirtuals : HasPrivatePureVirtuals); - } + bool hasPureVirtualFunctions(bool nonPrivate = true) const; - void setHasPureVirtualFunctions(bool nonPrivate = true){ - m_functionAttributes.setFlag(nonPrivate ? HasPureVirtuals : HasPrivatePureVirtuals); - } + void setHasPureVirtualFunctions(bool nonPrivate = true); - const QStringList& implicitCasts() const { - return m_implicitCasts; - } + const QStringList& implicitCasts() const; - void addImplicitCast(const QString& cast){ - m_implicitCasts.append(cast); - } + void addImplicitCast(const QString& cast); template const QList& declImplicitCasts() const { @@ -1776,6 +1460,15 @@ class ComplexTypeEntry : public TypeEntry { bool getNoImplicitConstructors() const; void setNoImplicitConstructors(bool newNoImplicitConstructors); + bool getNotAssignable() const; + void setNotAssignable(bool newNotAssignable); + + bool getNotMoveAssignable() const; + void setNotMoveAssignable(bool newNotMoveAssignable); + + bool getNotCloneable() const; + void setNotCloneable(bool newNotCloneable); + protected: enum ComplexAttributeFlag{ IsQObject = 0x01, @@ -1859,6 +1552,9 @@ class ComplexTypeEntry : public TypeEntry { QList m_declImplicitCasts; QStringList m_implicitCasts; bool noImplicitConstructors = false; + bool notAssignable = false; + bool notMoveAssignable = false; + bool notCloneable = false; friend GeneratorApplication; friend class FunctionalTypeEntry; }; @@ -1884,6 +1580,16 @@ class AliasTypeEntry : public ComplexTypeEntry { } virtual void setPreferredTargetLangType(bool) { } + + bool getAsNativePointer() const; + void setAsNativePointer(bool newAsNativePointer); + + bool getHasIndirections() const; + void setHasIndirections(bool newHasIndirections); + + private: + bool asNativePointer = false; + bool hasIndirections = false; }; class NamespaceTypeEntry : public ComplexTypeEntry { diff --git a/src/cpp/QtJambiGenerator/typesystem/utils.cpp b/src/cpp/QtJambiGenerator/typesystem/utils.cpp index c78d7bfc..07c2f428 100644 --- a/src/cpp/QtJambiGenerator/typesystem/utils.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/utils.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/utils.h b/src/cpp/QtJambiGenerator/typesystem/utils.h index a174f268..908b3ff6 100644 --- a/src/cpp/QtJambiGenerator/typesystem/utils.h +++ b/src/cpp/QtJambiGenerator/typesystem/utils.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/xmltoqmlconverter.cpp b/src/cpp/QtJambiGenerator/typesystem/xmltoqmlconverter.cpp index b1fbb15c..d33d3ae6 100644 --- a/src/cpp/QtJambiGenerator/typesystem/xmltoqmlconverter.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/xmltoqmlconverter.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiGenerator/typesystem/xmltypesystemreader.cpp b/src/cpp/QtJambiGenerator/typesystem/xmltypesystemreader.cpp index be2130f5..7a6b2603 100644 --- a/src/cpp/QtJambiGenerator/typesystem/xmltypesystemreader.cpp +++ b/src/cpp/QtJambiGenerator/typesystem/xmltypesystemreader.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** (in parts) ** ** This file is part of QtJambi. @@ -237,7 +237,7 @@ void XmlTypeSystemReaderPrivate::parseTypeSystem(const QDomElement &element, con moduleName); entry->setNoExports(noExports); entry->setDescription(description); - entry->setCodeGeneration(m_generate); + entry->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); //qDebug()<<"Adding element->entry (root)"<entry->name(); ReportHandler::debugTypes("Adding to TypeDatabase(3): " + entry->name()); TypeDatabase::instance()->addType(entry); @@ -1090,7 +1090,7 @@ void XmlTypeSystemReaderPrivate::parseLoadTypeSystem(const QDomElement &element) if (name.isEmpty()) { TypesystemException::raise(QString("No typesystem name specified")); } - bool generated = convertBoolean(attributeValue(attributes.removeNamedItem("generate"), "yes"), "generate", true) && !skip && m_generate==TypeEntry::GenerateAll; + bool generated = convertBoolean(attributeValue(attributes.removeNamedItem("generate"), "yes"), "generate", true) && !skip && (m_generate & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll; bool optional = convertBoolean(attributeValue(attributes.removeNamedItem("optional"), "no"), "optional", false); if(attributes.count()){ TypesystemException::raise(QString("Unexpected attribute '%2' of tag <%1> in line %3").arg(element.localName()).arg(attributes.item(0).localName()).arg(element.lineNumber())); @@ -1144,7 +1144,7 @@ void XmlTypeSystemReaderPrivate::parsePrimitiveType(const QDomElement &element){ jni_name = name; PrimitiveTypeEntry *entry = new PrimitiveTypeEntry(name, m_defaultPackage); - entry->setCodeGeneration(m_generate); + entry->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); entry->setTargetLangName(java_name); entry->setJniName(jni_name); @@ -1209,32 +1209,32 @@ void XmlTypeSystemReaderPrivate::parseAttributesOfComplexType(const QDomElement if(convertBoolean(attributeValue(attributes.removeNamedItem("is-native-interface"), "no"), "is-native-interface", false)){ ctype->setGenericClass(convertBoolean(genericClass, "generic-class", false)); ctype->setNativeInterface(true); - if(m_generate==TypeEntry::GenerateAll){ + if((m_generate & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll){ if(generate=="no-shell" || convertBoolean(generate, "generate", true)){ ctype->setCodeGeneration(TypeEntry::GenerateNoShell | TypeEntry::GenerateAll); }else{ ctype->setCodeGeneration(TypeEntry::GenerateForSubclass); } }else - ctype->setCodeGeneration(m_generate); + ctype->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); }else if(convertBoolean(attributeValue(attributes.removeNamedItem("template"), "no"), "template", false)){ ctype->setTemplate(true); ctype->setGenericClass(true); - if(m_generate==TypeEntry::GenerateAll) + if((m_generate & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll) ctype->setCodeGeneration(TypeEntry::GenerateForSubclass); else - ctype->setCodeGeneration(m_generate); + ctype->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); }else{ ctype->setGenericClass(convertBoolean(genericClass, "generic-class", false)); - if(m_generate==TypeEntry::GenerateAll){ + if((m_generate & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll){ if(generate=="no-shell"){ ctype->setCodeGeneration(TypeEntry::GenerateNoShell | TypeEntry::GenerateAll); }else if (!convertBoolean(generate, "generate", true)) ctype->setCodeGeneration(TypeEntry::GenerateForSubclass); else - ctype->setCodeGeneration(m_generate); + ctype->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); }else - ctype->setCodeGeneration(m_generate); + ctype->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); } if(attributes.count()){ TypesystemException::raise(QString("Unexpected attribute '%2' of tag <%1> in line %3").arg(element.localName()).arg(attributes.item(0).localName()).arg(element.lineNumber())); @@ -1673,12 +1673,12 @@ void XmlTypeSystemReaderPrivate::parseModifyArgument(const QDomElement &element, QString lengthParameter = attributeValue(attributes.removeNamedItem("length-parameter")); if (!lengthParameter.isEmpty()) { bool ok = false; - argumentModification.arrayLengthParameter = int(lengthParameter.toUInt(&ok)); + argumentModification.utilArgParameter = int(lengthParameter.toUInt(&ok)); if (!ok) { TypesystemException::raise(QString("Cannot convert length-parameter '%3' to unsigned integer in tag <%1> in line %2").arg(childElement.localName()).arg(childElement.lineNumber()).arg(lengthParameter)); } }else{ - argumentModification.arrayLengthParameter = 0; + argumentModification.utilArgParameter = 0; QString minLength = attributeValue(attributes.removeNamedItem("min-length")); if (!minLength.isEmpty()) { bool ok = false; @@ -1703,7 +1703,7 @@ void XmlTypeSystemReaderPrivate::parseModifyArgument(const QDomElement &element, } { - if(argumentModification.arrayLengthParameter<1 + if(argumentModification.utilArgParameter<1 && argumentModification.minArrayLength<1){ TypesystemException::raise(QString("Both, length-parameter and min-length must not be < 1 in tag <%1> in line %2").arg(childElement.localName()).arg(childElement.lineNumber())); } @@ -2653,15 +2653,15 @@ void XmlTypeSystemReaderPrivate::parseFunctionalType(const QDomElement &element) fentry.reset(new FunctionalTypeEntry(QStringList(names.mid(0, names.size() - 1)).join("::"), names.last())); } fentry->setFunctionName(functionName); - if(m_generate==TypeEntry::GenerateAll){ + if((m_generate & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll){ if(generate=="no-shell"){ fentry->setCodeGeneration(TypeEntry::GenerateNoShell | TypeEntry::GenerateAll); }else if (!convertBoolean(generate, "generate", true)) fentry->setCodeGeneration(TypeEntry::GenerateNothing); else - fentry->setCodeGeneration(m_generate); + fentry->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); }else - fentry->setCodeGeneration(m_generate); + fentry->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); if (convertBoolean(disableNativeIdUsage, "disable-native-id-usage", false)) fentry->disableNativeIdUsage(); @@ -3025,15 +3025,15 @@ void XmlTypeSystemReaderPrivate::parseEnumType(const QDomElement &element){ } else { eentry.reset(new EnumTypeEntry(QStringList(names.mid(0, names.size() - 1)).join("::"), names.last())); } - if(m_generate==TypeEntry::GenerateAll){ + if((m_generate & ~TypeEntry::InheritedByTypeSystem)==TypeEntry::GenerateAll){ if(generate=="no-shell"){ eentry->setCodeGeneration(TypeEntry::GenerateNoShell | TypeEntry::GenerateAll); }else if (!convertBoolean(generate, "generate", true)) eentry->setCodeGeneration(TypeEntry::GenerateNothing); else - eentry->setCodeGeneration(m_generate); + eentry->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); }else - eentry->setCodeGeneration(m_generate); + eentry->setCodeGeneration(m_generate | TypeEntry::InheritedByTypeSystem); eentry->setTargetLangPackage(package); eentry->setTargetTypeSystem(m_defaultPackage); eentry->setUpperBound(upperBound); diff --git a/src/cpp/QtJambiGraphs/QtJambiGraphs.pro b/src/cpp/QtJambiGraphs/QtJambiGraphs.pro index 57288578..f6205fe5 100644 --- a/src/cpp/QtJambiGraphs/QtJambiGraphs.pro +++ b/src/cpp/QtJambiGraphs/QtJambiGraphs.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core gui graphs diff --git a/src/cpp/QtJambiGraphs/hashes.h b/src/cpp/QtJambiGraphs/hashes.h index e8b09fd2..df801946 100644 --- a/src/cpp/QtJambiGraphs/hashes.h +++ b/src/cpp/QtJambiGraphs/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGrpc/QtJambiGrpc.pro b/src/cpp/QtJambiGrpc/QtJambiGrpc.pro index 0eddeca0..53cfe2b2 100644 --- a/src/cpp/QtJambiGrpc/QtJambiGrpc.pro +++ b/src/cpp/QtJambiGrpc/QtJambiGrpc.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core grpc core-private diff --git a/src/cpp/QtJambiGrpc/channel.cpp b/src/cpp/QtJambiGrpc/channel.cpp index 3f69763e..08332f7e 100644 --- a/src/cpp/QtJambiGrpc/channel.cpp +++ b/src/cpp/QtJambiGrpc/channel.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "utils_p.h" class QAbstractGrpcClient{ diff --git a/src/cpp/QtJambiGrpc/hashes.h b/src/cpp/QtJambiGrpc/hashes.h index e1e076d8..79b46d61 100644 --- a/src/cpp/QtJambiGrpc/hashes.h +++ b/src/cpp/QtJambiGrpc/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGrpc/impl.cpp b/src/cpp/QtJambiGrpc/impl.cpp index e5e02ce9..33f4d7e2 100644 --- a/src/cpp/QtJambiGrpc/impl.cpp +++ b/src/cpp/QtJambiGrpc/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include "utils_p.h" jobject qtjambi_QGrpcOperation_read(JNIEnv *__jni_env, const QGrpcOperation *__qt_this, jclass type, jobjectArray instantiations){ diff --git a/src/cpp/QtJambiGrpc/utils_p.h b/src/cpp/QtJambiGrpc/utils_p.h index f36c450a..78311aa2 100644 --- a/src/cpp/QtJambiGrpc/utils_p.h +++ b/src/cpp/QtJambiGrpc/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGui/QtJambiGui.pro b/src/cpp/QtJambiGui/QtJambiGui.pro index 11f076a4..3fbf515c 100644 --- a/src/cpp/QtJambiGui/QtJambiGui.pro +++ b/src/cpp/QtJambiGui/QtJambiGui.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) # because QActionEvent refers to qaction.h diff --git a/src/cpp/QtJambiGui/hashes.h b/src/cpp/QtJambiGui/hashes.h index 7145f4c4..e0ffd67e 100644 --- a/src/cpp/QtJambiGui/hashes.h +++ b/src/cpp/QtJambiGui/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -752,21 +752,24 @@ hash_type qHash(const QColorTransform &value, hash_type seed = 0); #define QMATRIX(M,N) QMatrix##M##x##N #define QTJAMBI_MATRIX_CONTENT(M,N)\ - public:\ - QTJAMBIMATRIX(M,N)();\ - QTJAMBIMATRIX(M,N)(const QMATRIX(M,N)& other);\ - explicit QTJAMBIMATRIX(M,N)(const float *values);\ - QMATRIX(M,N)& operator/=(float divisor); - -#define QTJAMBI_MATRIX_EXTRACONTENT(M,N)\ - float& operator ()(int row, int column);\ - const float& operator ()(int row, int column) const;\ +public:\ + QTJAMBIMATRIX(M,N)();\ + QTJAMBIMATRIX(M,N)(const QMATRIX(M,N)& other);\ + explicit QTJAMBIMATRIX(M,N)(const float *values);\ bool isIdentity() const;\ void setToIdentity();\ void fill(float value);\ + float& operator ()(int row, int column);\ + const float& operator ()(int row, int column) const;\ + QMATRIX(M,N)& operator=(const QMATRIX(M,N)& other);\ QMATRIX(M,N)& operator+=(const QMATRIX(M,N)& other);\ QMATRIX(M,N)& operator-=(const QMATRIX(M,N)& other);\ QMATRIX(M,N)& operator*=(float factor);\ + QMATRIX(M,N)& operator/=(float divisor);\ + QMATRIX(M,N) operator+(const QMATRIX(M,N)& other);\ + QMATRIX(M,N) operator-(const QMATRIX(M,N)& other);\ + QMATRIX(M,N) operator*(float factor);\ + QMATRIX(M,N) operator/(float factor);\ bool operator==(const QMATRIX(M,N)& other) const;\ QMATRIX(N,M) transposed() const;\ void copyDataTo(float *values) const;\ @@ -777,7 +780,6 @@ hash_type qHash(const QColorTransform &value, hash_type seed = 0); #define QTJAMBI_MATRIX(M,N)\ class QTJAMBIMATRIX(M,N){\ QTJAMBI_MATRIX_CONTENT(M,N)\ - QTJAMBI_MATRIX_EXTRACONTENT(M,N)\ };\ hash_type qHash(const QTJAMBIMATRIX(M,N) &); QTJAMBI_MATRIX(2,2) diff --git a/src/cpp/QtJambiGui/impl.cpp b/src/cpp/QtJambiGui/impl.cpp index 6edf8858..36afd8b3 100644 --- a/src/cpp/QtJambiGui/impl.cpp +++ b/src/cpp/QtJambiGui/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGui/pch_p.h b/src/cpp/QtJambiGui/pch_p.h index 5d102833..19e10290 100644 --- a/src/cpp/QtJambiGui/pch_p.h +++ b/src/cpp/QtJambiGui/pch_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGui/qtmatrixes.cpp b/src/cpp/QtJambiGui/qtmatrixes.cpp index 6fc77e41..1307e325 100644 --- a/src/cpp/QtJambiGui/qtmatrixes.cpp +++ b/src/cpp/QtJambiGui/qtmatrixes.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGui/qtmatrixes.h b/src/cpp/QtJambiGui/qtmatrixes.h index ea346940..81371025 100644 --- a/src/cpp/QtJambiGui/qtmatrixes.h +++ b/src/cpp/QtJambiGui/qtmatrixes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGui/utils_p.h b/src/cpp/QtJambiGui/utils_p.h index 3e82aa9b..3250a6a0 100644 --- a/src/cpp/QtJambiGui/utils_p.h +++ b/src/cpp/QtJambiGui/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiGuiQpa/QtJambiGuiQpa.pro b/src/cpp/QtJambiGuiQpa/QtJambiGuiQpa.pro index fb1df534..30213b5b 100644 --- a/src/cpp/QtJambiGuiQpa/QtJambiGuiQpa.pro +++ b/src/cpp/QtJambiGuiQpa/QtJambiGuiQpa.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += core gui gui-private diff --git a/src/cpp/QtJambiGuiQpa/impl.cpp b/src/cpp/QtJambiGuiQpa/impl.cpp index 6de8033f..f300f53e 100644 --- a/src/cpp/QtJambiGuiQpa/impl.cpp +++ b/src/cpp/QtJambiGuiQpa/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include #include diff --git a/src/cpp/QtJambiGuiRhi/QtJambiGuiRhi.pro b/src/cpp/QtJambiGuiRhi/QtJambiGuiRhi.pro index 37432af3..a9ca9591 100644 --- a/src/cpp/QtJambiGuiRhi/QtJambiGuiRhi.pro +++ b/src/cpp/QtJambiGuiRhi/QtJambiGuiRhi.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core gui gui-private diff --git a/src/cpp/QtJambiGuiRhi/hashes.h b/src/cpp/QtJambiGuiRhi/hashes.h index 1c4e451d..db0059c5 100644 --- a/src/cpp/QtJambiGuiRhi/hashes.h +++ b/src/cpp/QtJambiGuiRhi/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiHelp/QtJambiHelp.pro b/src/cpp/QtJambiHelp/QtJambiHelp.pro index 637e89e6..0cc7d03e 100644 --- a/src/cpp/QtJambiHelp/QtJambiHelp.pro +++ b/src/cpp/QtJambiHelp/QtJambiHelp.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += help gui widgets core diff --git a/src/cpp/QtJambiHelp/hashes.h b/src/cpp/QtJambiHelp/hashes.h index f4dbdcec..b137d1a9 100644 --- a/src/cpp/QtJambiHelp/hashes.h +++ b/src/cpp/QtJambiHelp/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiHttpServer/QtJambiHttpServer.pro b/src/cpp/QtJambiHttpServer/QtJambiHttpServer.pro index b497ec5f..32337365 100644 --- a/src/cpp/QtJambiHttpServer/QtJambiHttpServer.pro +++ b/src/cpp/QtJambiHttpServer/QtJambiHttpServer.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core network httpserver core-private httpserver-private diff --git a/src/cpp/QtJambiHttpServer/impl.cpp b/src/cpp/QtJambiHttpServer/impl.cpp index 3558de52..49b091ad 100644 --- a/src/cpp/QtJambiHttpServer/impl.cpp +++ b/src/cpp/QtJambiHttpServer/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiLauncher/QtJambiLauncher.pro b/src/cpp/QtJambiLauncher/QtJambiLauncher.pro index 03872079..ac5c1e20 100644 --- a/src/cpp/QtJambiLauncher/QtJambiLauncher.pro +++ b/src/cpp/QtJambiLauncher/QtJambiLauncher.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) TEMPLATE = app @@ -15,7 +46,7 @@ win32:RC_FILE = icon.rc macx:QMAKE_SONAME_PREFIX = @rpath macx:QMAKE_RPATHDIR = @executable_path/. @executable_path/lib @executable_path/../lib @executable_path/../../lib @executable_path/Frameworks @executable_path/../Frameworks @executable_path/../../Frameworks -linux-g++*:{ +linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc*:{ QMAKE_RPATHDIR = $ORIGIN/. QMAKE_RPATHDIR += $ORIGIN/lib QMAKE_RPATHDIR += $ORIGIN/../lib diff --git a/src/cpp/QtJambiLauncher/main.cpp b/src/cpp/QtJambiLauncher/main.cpp index 3d15e605..34972391 100644 --- a/src/cpp/QtJambiLauncher/main.cpp +++ b/src/cpp/QtJambiLauncher/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiLocation/QtJambiLocation.pro b/src/cpp/QtJambiLocation/QtJambiLocation.pro index 7b637279..0aec9186 100644 --- a/src/cpp/QtJambiLocation/QtJambiLocation.pro +++ b/src/cpp/QtJambiLocation/QtJambiLocation.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core gui location diff --git a/src/cpp/QtJambiLocation/hashes.h b/src/cpp/QtJambiLocation/hashes.h index 884d57aa..5e0651ab 100644 --- a/src/cpp/QtJambiLocation/hashes.h +++ b/src/cpp/QtJambiLocation/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiLocation/impl.cpp b/src/cpp/QtJambiLocation/impl.cpp index c27df4af..77400c6c 100644 --- a/src/cpp/QtJambiLocation/impl.cpp +++ b/src/cpp/QtJambiLocation/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiLocation/utils_p.h b/src/cpp/QtJambiLocation/utils_p.h index e86ce9ce..537d88b5 100644 --- a/src/cpp/QtJambiLocation/utils_p.h +++ b/src/cpp/QtJambiLocation/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiMultimedia/QtJambiMultimedia.pro b/src/cpp/QtJambiMultimedia/QtJambiMultimedia.pro index 9cc1a0c2..1d37d1d7 100644 --- a/src/cpp/QtJambiMultimedia/QtJambiMultimedia.pro +++ b/src/cpp/QtJambiMultimedia/QtJambiMultimedia.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core gui multimedia diff --git a/src/cpp/QtJambiMultimedia/hashes.h b/src/cpp/QtJambiMultimedia/hashes.h index 01ff8af6..912aa40a 100644 --- a/src/cpp/QtJambiMultimedia/hashes.h +++ b/src/cpp/QtJambiMultimedia/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiMultimedia/impl.cpp b/src/cpp/QtJambiMultimedia/impl.cpp index 4ac8d428..873e17e7 100644 --- a/src/cpp/QtJambiMultimedia/impl.cpp +++ b/src/cpp/QtJambiMultimedia/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -67,8 +67,10 @@ extern "C" Q_DECL_EXPORT jlong JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_multim case QAudioFormat::ChannelConfigMono: return jlong(&QAudioFrame::positionToIndex); case QAudioFormat::ChannelConfigStereo: return jlong(&QAudioFrame::positionToIndex); case QAudioFormat::ChannelConfig2Dot1: return jlong(&QAudioFrame::positionToIndex); +#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0) case QAudioFormat::ChannelConfig3Dot0: return jlong(&QAudioFrame::positionToIndex); case QAudioFormat::ChannelConfig3Dot1: return jlong(&QAudioFrame::positionToIndex); +#endif case QAudioFormat::ChannelConfigSurround5Dot0: return jlong(&QAudioFrame::positionToIndex); case QAudioFormat::ChannelConfigSurround5Dot1: return jlong(&QAudioFrame::positionToIndex); case QAudioFormat::ChannelConfigSurround7Dot0: return jlong(&QAudioFrame::positionToIndex); diff --git a/src/cpp/QtJambiMultimedia/utils_p.h b/src/cpp/QtJambiMultimedia/utils_p.h index 4d2ec36e..3c73de2e 100644 --- a/src/cpp/QtJambiMultimedia/utils_p.h +++ b/src/cpp/QtJambiMultimedia/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/cpp/QtJambiMultimediaWidgets/QtJambiMultimediaWidgets.pro b/src/cpp/QtJambiMultimediaWidgets/QtJambiMultimediaWidgets.pro index cfee60c3..09382629 100644 --- a/src/cpp/QtJambiMultimediaWidgets/QtJambiMultimediaWidgets.pro +++ b/src/cpp/QtJambiMultimediaWidgets/QtJambiMultimediaWidgets.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core gui widgets multimedia multimediawidgets diff --git a/src/cpp/QtJambiNetwork/hashes.h b/src/cpp/QtJambiNetwork/hashes.h index c49f8f3e..5e9e63ae 100644 --- a/src/cpp/QtJambiNetwork/hashes.h +++ b/src/cpp/QtJambiNetwork/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiNetwork/impl.cpp b/src/cpp/QtJambiNetwork/impl.cpp index f33275a1..53f2f6a8 100644 --- a/src/cpp/QtJambiNetwork/impl.cpp +++ b/src/cpp/QtJambiNetwork/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -59,34 +59,6 @@ extern "C" Q_DECL_EXPORT bool JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_network #endif } -// QHostInfo::lookupHost(const QString & name, Functor functor) -extern "C" Q_DECL_EXPORT jint JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_network_QHostInfo_lookupHost) -(JNIEnv *__jni_env, - jclass, - jstring name0, - QtJambiNativeID context1, - jobject slot) -{ - jint _result{0}; - QTJAMBI_NATIVE_METHOD_CALL("QHostInfo::lookupHost(const QString & name, Functor functor)") - QTJAMBI_TRY{ - if(!slot) - JavaException::raiseNullPointerException(__jni_env, "slot must not be null." QTJAMBI_STACKTRACEINFO ); - const QString& __qt_name0 = qtjambi_cast(__jni_env, name0); - QObject* __qt_context1 = QtJambiAPI::objectFromNativeId(context1); - JObjectWrapper objectWrapper(__jni_env, slot); - _result = QHostInfo::lookupHost(__qt_name0, __qt_context1, [objectWrapper](const QHostInfo& info){ - if(JniEnvironment env{200}){ - jobject result = qtjambi_cast(env, info); - Java::QtCore::QMetaObject$Slot1::invoke(env, objectWrapper.object(), result); - } - }); - }QTJAMBI_CATCH(const JavaException& exn){ - exn.raiseInJava(__jni_env); - }QTJAMBI_TRY_END - return _result; -} - class QHttpMultiPartIODevice{ public: static const void* d(const QHttpPart &value){ diff --git a/src/cpp/QtJambiNetwork/pch_p.h b/src/cpp/QtJambiNetwork/pch_p.h index 7ed96370..f99ddbd9 100644 --- a/src/cpp/QtJambiNetwork/pch_p.h +++ b/src/cpp/QtJambiNetwork/pch_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiNetwork/utils_p.h b/src/cpp/QtJambiNetwork/utils_p.h index 5b8d3bdf..fefbd793 100644 --- a/src/cpp/QtJambiNetwork/utils_p.h +++ b/src/cpp/QtJambiNetwork/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiNetworkAuth/QtJambiNetworkAuth.pro b/src/cpp/QtJambiNetworkAuth/QtJambiNetworkAuth.pro index 67d5cf29..2a884b2e 100644 --- a/src/cpp/QtJambiNetworkAuth/QtJambiNetworkAuth.pro +++ b/src/cpp/QtJambiNetworkAuth/QtJambiNetworkAuth.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core network networkauth diff --git a/src/cpp/QtJambiNfc/QtJambiNfc.pro b/src/cpp/QtJambiNfc/QtJambiNfc.pro index fc84cf99..17b6c171 100644 --- a/src/cpp/QtJambiNfc/QtJambiNfc.pro +++ b/src/cpp/QtJambiNfc/QtJambiNfc.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core nfc diff --git a/src/cpp/QtJambiNfc/hashes.h b/src/cpp/QtJambiNfc/hashes.h index a928b4ee..22192ac2 100644 --- a/src/cpp/QtJambiNfc/hashes.h +++ b/src/cpp/QtJambiNfc/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiNfc/impl.cpp b/src/cpp/QtJambiNfc/impl.cpp index ebc20967..3af19ea2 100644 --- a/src/cpp/QtJambiNfc/impl.cpp +++ b/src/cpp/QtJambiNfc/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiOpenGL/QtJambiOpenGL.pro b/src/cpp/QtJambiOpenGL/QtJambiOpenGL.pro index bbfef35b..86130374 100644 --- a/src/cpp/QtJambiOpenGL/QtJambiOpenGL.pro +++ b/src/cpp/QtJambiOpenGL/QtJambiOpenGL.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core gui opengl diff --git a/src/cpp/QtJambiOpenGL/hashes.h b/src/cpp/QtJambiOpenGL/hashes.h index 816676cf..f5b224c9 100644 --- a/src/cpp/QtJambiOpenGL/hashes.h +++ b/src/cpp/QtJambiOpenGL/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiOpenGL/impl.cpp b/src/cpp/QtJambiOpenGL/impl.cpp index cb836988..c900bc7e 100644 --- a/src/cpp/QtJambiOpenGL/impl.cpp +++ b/src/cpp/QtJambiOpenGL/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiOpenGLWidgets/QtJambiOpenGLWidgets.pro b/src/cpp/QtJambiOpenGLWidgets/QtJambiOpenGLWidgets.pro index 4873abaf..fe1d1e46 100644 --- a/src/cpp/QtJambiOpenGLWidgets/QtJambiOpenGLWidgets.pro +++ b/src/cpp/QtJambiOpenGLWidgets/QtJambiOpenGLWidgets.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core gui widgets openglwidgets diff --git a/src/cpp/QtJambiPdf/QtJambiPdf.pro b/src/cpp/QtJambiPdf/QtJambiPdf.pro index 4b16f48a..a28eb2de 100644 --- a/src/cpp/QtJambiPdf/QtJambiPdf.pro +++ b/src/cpp/QtJambiPdf/QtJambiPdf.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core pdf diff --git a/src/cpp/QtJambiPdf/hashes.h b/src/cpp/QtJambiPdf/hashes.h index 496ad544..d9380214 100644 --- a/src/cpp/QtJambiPdf/hashes.h +++ b/src/cpp/QtJambiPdf/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiPdfWidgets/QtJambiPdfWidgets.pro b/src/cpp/QtJambiPdfWidgets/QtJambiPdfWidgets.pro index e5feeaf6..0f3e4708 100644 --- a/src/cpp/QtJambiPdfWidgets/QtJambiPdfWidgets.pro +++ b/src/cpp/QtJambiPdfWidgets/QtJambiPdfWidgets.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core pdfwidgets diff --git a/src/cpp/QtJambiPlugin/QtJambiPlugin.pro b/src/cpp/QtJambiPlugin/QtJambiPlugin.pro index 0837cba3..0c6ae347 100644 --- a/src/cpp/QtJambiPlugin/QtJambiPlugin.pro +++ b/src/cpp/QtJambiPlugin/QtJambiPlugin.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + QTJAMBI_PROJECT = $$basename(_PRO_FILE_) QTJAMBI_PROJECT = $$section(QTJAMBI_PROJECT, .pro, 0, 0) TARGET = $$QTJAMBI_PROJECT @@ -63,7 +94,7 @@ macx:{ } } -linux-g++*:{ +linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc*{ QMAKE_RPATHDIR = $ORIGIN/../lib QMAKE_RPATHDIR += $ORIGIN/../../lib QMAKE_RPATHDIR += $ORIGIN/../../../lib @@ -71,7 +102,7 @@ linux-g++*:{ QMAKE_RPATHDIR += $ORIGIN/../../../../../lib } -linux-g++* | freebsd-g++* | win32-g++* { +linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc* | win32-g++* { QMAKE_CXXFLAGS_WARN_OFF += -Wdollar-in-identifier-extension -Woverloaded-virtual QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined @@ -84,6 +115,11 @@ contains(QMAKE_CXX, "g++") | contains(QMAKE_CXX, "clang++") : { QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -g -fdebug-prefix-map=$$SOURCES_BASE=../sources } +android:{ + CONFIG -= android_install + TARGET = $${TARGET}_$${QT_ARCH} +} + HEADERS += SOURCES += plugin.cpp diff --git a/src/cpp/QtJambiPlugin/plugin.cpp b/src/cpp/QtJambiPlugin/plugin.cpp index abd3e2ec..3e6da1d7 100644 --- a/src/cpp/QtJambiPlugin/plugin.cpp +++ b/src/cpp/QtJambiPlugin/plugin.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiPositioning/QtJambiPositioning.pro b/src/cpp/QtJambiPositioning/QtJambiPositioning.pro index 18a7db1f..c9f769de 100644 --- a/src/cpp/QtJambiPositioning/QtJambiPositioning.pro +++ b/src/cpp/QtJambiPositioning/QtJambiPositioning.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core positioning diff --git a/src/cpp/QtJambiPositioning/hashes.h b/src/cpp/QtJambiPositioning/hashes.h index 0cf4de87..c5ae1486 100644 --- a/src/cpp/QtJambiPositioning/hashes.h +++ b/src/cpp/QtJambiPositioning/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiPositioning/impl.cpp b/src/cpp/QtJambiPositioning/impl.cpp index c23ec9b1..ead4e743 100644 --- a/src/cpp/QtJambiPositioning/impl.cpp +++ b/src/cpp/QtJambiPositioning/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiPositioning/utils_p.h b/src/cpp/QtJambiPositioning/utils_p.h index afa5cd5e..18165d2f 100644 --- a/src/cpp/QtJambiPositioning/utils_p.h +++ b/src/cpp/QtJambiPositioning/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiPrintSupport/QtJambiPrintSupport.pro b/src/cpp/QtJambiPrintSupport/QtJambiPrintSupport.pro index 6b43be38..2b96a910 100644 --- a/src/cpp/QtJambiPrintSupport/QtJambiPrintSupport.pro +++ b/src/cpp/QtJambiPrintSupport/QtJambiPrintSupport.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += core gui widgets printsupport diff --git a/src/cpp/QtJambiProtobuf/QtJambiProtobuf.pro b/src/cpp/QtJambiProtobuf/QtJambiProtobuf.pro index 4b13bf12..1a24bcd3 100644 --- a/src/cpp/QtJambiProtobuf/QtJambiProtobuf.pro +++ b/src/cpp/QtJambiProtobuf/QtJambiProtobuf.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core protobuf diff --git a/src/cpp/QtJambiQml/QtJambiQml.pro b/src/cpp/QtJambiQml/QtJambiQml.pro index a0c4bf2f..4b857288 100644 --- a/src/cpp/QtJambiQml/QtJambiQml.pro +++ b/src/cpp/QtJambiQml/QtJambiQml.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) HEADERS += \ diff --git a/src/cpp/QtJambiQml/hashes.h b/src/cpp/QtJambiQml/hashes.h index dbfb7feb..01c9893f 100644 --- a/src/cpp/QtJambiQml/hashes.h +++ b/src/cpp/QtJambiQml/hashes.h @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #ifndef QTJAMBIQML_HASHES_H #define QTJAMBIQML_HASHES_H diff --git a/src/cpp/QtJambiQml/impl.cpp b/src/cpp/QtJambiQml/impl.cpp index 4baa81a5..7d590aa9 100644 --- a/src/cpp/QtJambiQml/impl.cpp +++ b/src/cpp/QtJambiQml/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -2817,7 +2817,7 @@ extern "C" Q_DECL_EXPORT jobject JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_qml_ } // new QQmlListProperty() -void __qt_create_new_QQmlListProperty_0(void* __qtjambi_ptr, JNIEnv*, jobject, jvalue*) +void __qt_create_new_QQmlListProperty(void* __qtjambi_ptr, JNIEnv*, jobject, jvalue*, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QQmlListProperty()") QQmlListProperty *__qt_this = new(__qtjambi_ptr) QQmlListProperty(); @@ -2831,7 +2831,7 @@ typedef qsizetype list_int; #endif // new QQmlListProperty(QObject * o, QList & list) -void __qt_create_new_QQmlListProperty_1(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject, jvalue* __java_arguments) +void __qt_create_new_QQmlListProperty_QObject_QList_bool(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QQmlListProperty(QObject * o, QList & list)") jobject o0 = __java_arguments[0].l; @@ -3051,7 +3051,7 @@ struct FunctionUserData : QtJambiObjectData{ #endif }; -void __qt_create_new_QQmlListProperty_2(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject, jvalue* __java_arguments) +void __qt_create_new_QQmlListProperty_functions(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject, jvalue* __java_arguments, bool) { QTJAMBI_NATIVE_METHOD_CALL("construct QQmlListProperty(QObject * o, QList & list)()") QObject* object = QtJambiAPI::convertJavaObjectToQObject(__jni_env, __java_arguments[1].l); @@ -3134,7 +3134,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_qml_QQm { QTJAMBI_NATIVE_METHOD_CALL("QQmlListProperty::QQmlListProperty()") QTJAMBI_TRY{ - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_create_new_QQmlListProperty_0, sizeof(QQmlListProperty), typeid(QQmlListProperty), false, &deleter_QQmlListProperty, nullptr); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_create_new_QQmlListProperty, sizeof(QQmlListProperty), typeid(QQmlListProperty), false, &deleter_QQmlListProperty, nullptr); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END @@ -3155,7 +3155,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_qml_QQm arguments[0].l = o0; arguments[1].l = list1; arguments[2].z = readonly; - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_create_new_QQmlListProperty_1, sizeof(QQmlListProperty), typeid(QQmlListProperty), false, &deleter_QQmlListProperty, arguments); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_create_new_QQmlListProperty_QObject_QList_bool, sizeof(QQmlListProperty), typeid(QQmlListProperty), false, &deleter_QQmlListProperty, arguments); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END @@ -3187,7 +3187,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_qml_QQm arguments[6].l = replaceFunction; arguments[7].l = removeLastFunction; arguments[8].i = hash; - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_create_new_QQmlListProperty_2, sizeof(QQmlListProperty), typeid(QQmlListProperty), false, &deleter_QQmlListProperty, arguments); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_create_new_QQmlListProperty_functions, sizeof(QQmlListProperty), typeid(QQmlListProperty), false, &deleter_QQmlListProperty, arguments); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END @@ -3549,11 +3549,16 @@ void initialize_meta_info_QQmlListProperty(){ } } QmlAPI::setQmlReportDestruction(&QQmlPrivate::qdeclarativeelement_destructor); + QmlAPI::setQmlIsJavaScriptOwnership([](QObject * obj)->bool{ +#if QT_VERSION < QT_VERSION_CHECK(6,0,0) + return QQmlEngine::objectOwnership(obj)==QQmlEngine::JavaScriptOwnership; +#else + return QJSEngine::objectOwnership(obj)==QJSEngine::JavaScriptOwnership; +#endif + }); const std::type_info& typeId = registerUnspecificTypeInfo>("QQmlListProperty", "io/qt/qml/QQmlListProperty"); registerOperators>(); - registerConstructorInfos(typeId, &__qt_destruct_QQmlListProperty, {ConstructorInfo(&__qt_create_new_QQmlListProperty_0, nullptr), - ConstructorInfo(&__qt_create_new_QQmlListProperty_1, "Lio/qt/core/QObject;Lio/qt/core/QList;"), - ConstructorInfo(&__qt_create_new_QQmlListProperty_1, "Lio/qt/core/QObject;Lio/qt/core/QList;Z")} ); + registerConstructorInfos(typeId, &__qt_destruct_QQmlListProperty, {}); registerDeleter(typeId, &deleter_QQmlListProperty); #if QT_VERSION < QT_VERSION_CHECK(6,0,0) int metaTypeID = registerMetaType>("QQmlListProperty", diff --git a/src/cpp/QtJambiQml/utils_p.h b/src/cpp/QtJambiQml/utils_p.h index ae3ea6e2..ad856d56 100644 --- a/src/cpp/QtJambiQml/utils_p.h +++ b/src/cpp/QtJambiQml/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiQuick/QtJambiQuick.pro b/src/cpp/QtJambiQuick/QtJambiQuick.pro index ccaceec4..eee4bcc6 100644 --- a/src/cpp/QtJambiQuick/QtJambiQuick.pro +++ b/src/cpp/QtJambiQuick/QtJambiQuick.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += core gui qml quick quick-private diff --git a/src/cpp/QtJambiQuick/hashes.h b/src/cpp/QtJambiQuick/hashes.h index 98fdfefb..2f11d816 100644 --- a/src/cpp/QtJambiQuick/hashes.h +++ b/src/cpp/QtJambiQuick/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiQuick/impl.cpp b/src/cpp/QtJambiQuick/impl.cpp index 95749c23..0ef42d8a 100644 --- a/src/cpp/QtJambiQuick/impl.cpp +++ b/src/cpp/QtJambiQuick/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -272,16 +272,11 @@ QSGTexture * qtjambi_QSGVulkanTexture_fromNative(JNIEnv *, jlong image, jint lay return QNativeInterface::QSGVulkanTexture::fromNative(CastHelper::cast(image), VkImageLayout(layout), window, size, options); } +#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0) QQuickRenderTarget qtjambi_QQuickRenderTarget_fromVulkanImage(JNIEnv *, jlong image, jint layout, const QSize& pixelSize, int sampleCount){ return QQuickRenderTarget::fromVulkanImage(CastHelper::cast(image), VkImageLayout(layout), pixelSize, sampleCount); } -#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0) -QQuickRenderTarget qtjambi_QQuickRenderTarget_fromVulkanImage(JNIEnv *, jlong image, jint layout, jint format, const QSize& pixelSize, int sampleCount){ - return QQuickRenderTarget::fromVulkanImage(CastHelper::cast(image), VkImageLayout(layout), VkFormat(format), pixelSize, sampleCount); -} -#endif - QQuickGraphicsDevice qtjambi_QQuickGraphicsDevice_fromPhysicalDevice(JNIEnv *, jlong physicalDevice){ return QQuickGraphicsDevice::fromPhysicalDevice(VkPhysicalDevice(physicalDevice)); } @@ -289,6 +284,13 @@ QQuickGraphicsDevice qtjambi_QQuickGraphicsDevice_fromPhysicalDevice(JNIEnv *, j QQuickGraphicsDevice qtjambi_QQuickGraphicsDevice_fromDeviceObjects(JNIEnv *, jlong physicalDevice, jlong device, int queueFamilyIndex, int queueIndex){ return QQuickGraphicsDevice::fromDeviceObjects(VkPhysicalDevice(physicalDevice), VkDevice(device), queueFamilyIndex, queueIndex); } + +#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0) +QQuickRenderTarget qtjambi_QQuickRenderTarget_fromVulkanImage(JNIEnv *, jlong image, jint layout, jint format, const QSize& pixelSize, int sampleCount){ + return QQuickRenderTarget::fromVulkanImage(CastHelper::cast(image), VkImageLayout(layout), VkFormat(format), pixelSize, sampleCount); +} +#endif +#endif #endif @@ -296,6 +298,11 @@ namespace Java{ namespace QtQuick{ QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/quick,QQuickItem, ) +QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/quick,QSGGeometry, +) +QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/quick,QSGGeometry$AttributeSet, + QTJAMBI_REPOSITORY_DEFINE_METHOD(clone,()Lio/qt/quick/QSGGeometry$AttributeSet;) +) QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/quick,QSGGeometry$Point2DVertexData, QTJAMBI_REPOSITORY_DEFINE_CONSTRUCTOR(JI)) QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/quick,QSGGeometry$TexturedPoint2DVertexData, diff --git a/src/cpp/QtJambiQuick/utils_p.h b/src/cpp/QtJambiQuick/utils_p.h index 57bc66d4..9cb4578d 100644 --- a/src/cpp/QtJambiQuick/utils_p.h +++ b/src/cpp/QtJambiQuick/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -37,6 +37,12 @@ namespace Java{ namespace QtQuick { QTJAMBI_REPOSITORY_DECLARE_CLASS(QQuickItem,) + QTJAMBI_REPOSITORY_DECLARE_CLASS(QSGGeometry,) + + QTJAMBI_REPOSITORY_DECLARE_CLASS(QSGGeometry$AttributeSet, + QTJAMBI_REPOSITORY_DECLARE_OBJECT_METHOD(clone) + ) + QTJAMBI_REPOSITORY_DECLARE_CLASS(QSGGeometry$Point2DVertexData, QTJAMBI_REPOSITORY_DECLARE_CONSTRUCTOR()) QTJAMBI_REPOSITORY_DECLARE_CLASS(QSGGeometry$TexturedPoint2DVertexData, diff --git a/src/cpp/QtJambiQuick3D/QtJambiQuick3D.pro b/src/cpp/QtJambiQuick3D/QtJambiQuick3D.pro index 6499134d..7fcf51e3 100644 --- a/src/cpp/QtJambiQuick3D/QtJambiQuick3D.pro +++ b/src/cpp/QtJambiQuick3D/QtJambiQuick3D.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core gui qml quick3d diff --git a/src/cpp/QtJambiQuick3D/hashes.h b/src/cpp/QtJambiQuick3D/hashes.h index b9d566b0..453ac70c 100644 --- a/src/cpp/QtJambiQuick3D/hashes.h +++ b/src/cpp/QtJambiQuick3D/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiQuick3D/impl.cpp b/src/cpp/QtJambiQuick3D/impl.cpp index 46a9eaa2..33f1af47 100644 --- a/src/cpp/QtJambiQuick3D/impl.cpp +++ b/src/cpp/QtJambiQuick3D/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiQuick3D/utils_p.h b/src/cpp/QtJambiQuick3D/utils_p.h index 7ec29aed..bad1e96e 100644 --- a/src/cpp/QtJambiQuick3D/utils_p.h +++ b/src/cpp/QtJambiQuick3D/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiQuickControls2/QtJambiQuickControls2.pro b/src/cpp/QtJambiQuickControls2/QtJambiQuickControls2.pro index d1bf7fba..a01408a6 100644 --- a/src/cpp/QtJambiQuickControls2/QtJambiQuickControls2.pro +++ b/src/cpp/QtJambiQuickControls2/QtJambiQuickControls2.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += core quickcontrols2 diff --git a/src/cpp/QtJambiQuickTest/QtJambiQuickTest.pro b/src/cpp/QtJambiQuickTest/QtJambiQuickTest.pro index 97f1b162..7b275f29 100644 --- a/src/cpp/QtJambiQuickTest/QtJambiQuickTest.pro +++ b/src/cpp/QtJambiQuickTest/QtJambiQuickTest.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += core core-private qmltest quick diff --git a/src/cpp/QtJambiQuickTest/impl.cpp b/src/cpp/QtJambiQuickTest/impl.cpp index 0823f75c..ff7f8570 100644 --- a/src/cpp/QtJambiQuickTest/impl.cpp +++ b/src/cpp/QtJambiQuickTest/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiQuickWidgets/QtJambiQuickWidgets.pro b/src/cpp/QtJambiQuickWidgets/QtJambiQuickWidgets.pro index 0f66d998..d0754d0e 100644 --- a/src/cpp/QtJambiQuickWidgets/QtJambiQuickWidgets.pro +++ b/src/cpp/QtJambiQuickWidgets/QtJambiQuickWidgets.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += core gui widgets qml quick quickwidgets diff --git a/src/cpp/QtJambiRemoteObjects/QtJambiRemoteObjects.pro b/src/cpp/QtJambiRemoteObjects/QtJambiRemoteObjects.pro index 487db3d9..7fd2e7e4 100644 --- a/src/cpp/QtJambiRemoteObjects/QtJambiRemoteObjects.pro +++ b/src/cpp/QtJambiRemoteObjects/QtJambiRemoteObjects.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core remoteobjects diff --git a/src/cpp/QtJambiRemoteObjects/hashes.h b/src/cpp/QtJambiRemoteObjects/hashes.h index 45c7e41f..0c24609a 100644 --- a/src/cpp/QtJambiRemoteObjects/hashes.h +++ b/src/cpp/QtJambiRemoteObjects/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiRemoteObjects/impl.cpp b/src/cpp/QtJambiRemoteObjects/impl.cpp index 3e3cba0b..0ddedb45 100644 --- a/src/cpp/QtJambiRemoteObjects/impl.cpp +++ b/src/cpp/QtJambiRemoteObjects/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -45,8 +45,8 @@ using ClientIoDevice = QtROClientIoDevice; #endif -void __qt_construct_QRemoteObjectPendingCall_1(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments); -void __qt_construct_QRemoteObjectPendingCall_0(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments); +void __qt_construct_QRemoteObjectPendingCall(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool); +void __qt_construct_QRemoteObjectPendingCall_cref_QRemoteObjectPendingCall(void* __qtjambi_ptr, JNIEnv* __jni_env, jobject __jni_object, jvalue* __java_arguments, bool); void __qt_destruct_QRemoteObjectPendingCall(void* ptr); extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_remoteobjects_QRemoteObjectPendingReply_initialize_1native__Lio_qt_remoteobjects_QRemoteObjectPendingReply_2) @@ -56,7 +56,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_remoteo { QTJAMBI_NATIVE_METHOD_CALL("QRemoteObjectPendingReply::QRemoteObjectPendingReply()") QTJAMBI_TRY{ - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QRemoteObjectPendingCall_0, sizeof(QRemoteObjectPendingReply), typeid(QRemoteObjectPendingReply), false, nullptr); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QRemoteObjectPendingCall, sizeof(QRemoteObjectPendingReply), typeid(QRemoteObjectPendingReply), false, nullptr); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END @@ -73,7 +73,7 @@ extern "C" Q_DECL_EXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_remoteo QTJAMBI_TRY{ jvalue arguments; arguments.l = other0; - QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QRemoteObjectPendingCall_1, sizeof(QRemoteObjectPendingReply), typeid(QRemoteObjectPendingReply), false, &arguments); + QtJambiShell::initialize(__jni_env, __jni_class, __jni_object, &__qt_construct_QRemoteObjectPendingCall_cref_QRemoteObjectPendingCall, sizeof(QRemoteObjectPendingReply), typeid(QRemoteObjectPendingReply), false, &arguments); }QTJAMBI_CATCH(const JavaException& exn){ exn.raiseInJava(__jni_env); }QTJAMBI_TRY_END diff --git a/src/cpp/QtJambiRemoteObjects/utils_p.h b/src/cpp/QtJambiRemoteObjects/utils_p.h index 1c5c3c9a..cbbb7f54 100644 --- a/src/cpp/QtJambiRemoteObjects/utils_p.h +++ b/src/cpp/QtJambiRemoteObjects/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiScript/hashes.h b/src/cpp/QtJambiScript/hashes.h index d63dcfff..ce9f6bcf 100644 --- a/src/cpp/QtJambiScript/hashes.h +++ b/src/cpp/QtJambiScript/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiScxml/QtJambiScxml.pro b/src/cpp/QtJambiScxml/QtJambiScxml.pro index f0f44bff..0e2b3dca 100644 --- a/src/cpp/QtJambiScxml/QtJambiScxml.pro +++ b/src/cpp/QtJambiScxml/QtJambiScxml.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core scxml diff --git a/src/cpp/QtJambiScxml/impl.cpp b/src/cpp/QtJambiScxml/impl.cpp index 2291ec4d..6ec16011 100644 --- a/src/cpp/QtJambiScxml/impl.cpp +++ b/src/cpp/QtJambiScxml/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -33,83 +33,6 @@ #include #include -// QScxmlStateMachine::connectToState(const QString &scxmlStateName, Functor functor, Qt::ConnectionType type = Qt::AutoConnection) -extern "C" Q_DECL_EXPORT jobject JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_scxml_QScxmlStateMachine_connectToState) -(JNIEnv *__jni_env, - jobject __this, - QtJambiNativeID __this_nativeId, - jstring scxmlStateName0, - jobject slot1, - jint type2) -{ - Q_UNUSED(__this) - jobject _result{nullptr}; - QTJAMBI_TRY{ - QScxmlStateMachine *__qt_this = QtJambiAPI::objectFromNativeId(__this_nativeId); - QtJambiAPI::checkNullPointer(__jni_env, __qt_this); - QTJAMBI_NATIVE_INSTANCE_METHOD_CALL("QScxmlStateMachine::connectToState(const QString &scxmlStateName, Functor functor, Qt::ConnectionType type = Qt::AutoConnection)", __qt_this) - const QString& __qt_scxmlStateName0 = qtjambi_cast(__jni_env, scxmlStateName0); - JObjectWrapper pointer(__jni_env, slot1); - QMetaObject::Connection connection; - if(Java::QtCore::QMetaObject$Slot1::isInstanceOf(__jni_env, slot1)){ - connection = __qt_this->connectToState(__qt_scxmlStateName0, [pointer](bool isEnteringState){ - if(JniEnvironment env{300}){ - Java::QtCore::QMetaObject$Slot1::invoke(env, pointer.object(), QtJambiAPI::toJavaBooleanObject(env, isEnteringState)); - } - }, Qt::ConnectionType(type2)); - }else{ - connection = __qt_this->connectToState(__qt_scxmlStateName0, [pointer](bool){ - if(JniEnvironment env{300}){ - Java::QtCore::QMetaObject$Slot0::invoke(env, pointer.object()); - } - }, Qt::ConnectionType(type2)); - } - _result = qtjambi_cast(__jni_env, connection); - }QTJAMBI_CATCH(const JavaException& exn){ - exn.raiseInJava(__jni_env); - }QTJAMBI_TRY_END - return _result; -} - -// QScxmlStateMachine::connectToEvent(const QString &scxmlStateName, Functor functor, Qt::ConnectionType type = Qt::AutoConnection) -extern "C" Q_DECL_EXPORT jobject JNICALL QTJAMBI_FUNCTION_PREFIX(Java_io_qt_scxml_QScxmlStateMachine_connectToEvent) -(JNIEnv *__jni_env, - jobject __this, - QtJambiNativeID __this_nativeId, - jstring scxmlStateName0, - jobject slot1, - jint type2) -{ - Q_UNUSED(__this) - jobject _result{nullptr}; - QTJAMBI_TRY{ - QScxmlStateMachine *__qt_this = QtJambiAPI::objectFromNativeId(__this_nativeId); - QtJambiAPI::checkNullPointer(__jni_env, __qt_this); - QTJAMBI_NATIVE_INSTANCE_METHOD_CALL("QScxmlStateMachine::connectToEvent(const QString &scxmlStateName, Functor functor, Qt::ConnectionType type = Qt::AutoConnection)", __qt_this) - const QString& __qt_scxmlStateName0 = qtjambi_cast(__jni_env, scxmlStateName0); - JObjectWrapper pointer(__jni_env, slot1); - QMetaObject::Connection connection; - if(Java::QtCore::QMetaObject$Slot1::isInstanceOf(__jni_env, slot1)){ - connection = __qt_this->connectToEvent(__qt_scxmlStateName0, [pointer](const QScxmlEvent &event){ - if(JniEnvironment env{300}){ - Java::QtCore::QMetaObject$Slot1::invoke(env, pointer.object(), qtjambi_cast(env, event)); - } - }, Qt::ConnectionType(type2)); - }else{ - connection = __qt_this->connectToEvent(__qt_scxmlStateName0, [pointer](const QScxmlEvent &){ - if(JniEnvironment env{300}){ - Java::QtCore::QMetaObject$Slot0::invoke(env, pointer.object()); - } - }, Qt::ConnectionType(type2)); - } - - _result = qtjambi_cast(__jni_env, connection); - }QTJAMBI_CATCH(const JavaException& exn){ - exn.raiseInJava(__jni_env); - }QTJAMBI_TRY_END - return _result; -} - #if QT_VERSION < QT_VERSION_CHECK(5,12,0) #include diff --git a/src/cpp/QtJambiSensors/QtJambiSensors.pro b/src/cpp/QtJambiSensors/QtJambiSensors.pro index 7dc6b87c..df781249 100644 --- a/src/cpp/QtJambiSensors/QtJambiSensors.pro +++ b/src/cpp/QtJambiSensors/QtJambiSensors.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core sensors diff --git a/src/cpp/QtJambiSensors/impl.cpp b/src/cpp/QtJambiSensors/impl.cpp index da69498e..ed98e828 100644 --- a/src/cpp/QtJambiSensors/impl.cpp +++ b/src/cpp/QtJambiSensors/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiSensors/utils_p.h b/src/cpp/QtJambiSensors/utils_p.h index c4a6e23b..da49950f 100644 --- a/src/cpp/QtJambiSensors/utils_p.h +++ b/src/cpp/QtJambiSensors/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiSerialBus/QtJambiSerialBus.pro b/src/cpp/QtJambiSerialBus/QtJambiSerialBus.pro index 84af88a1..3460df5d 100644 --- a/src/cpp/QtJambiSerialBus/QtJambiSerialBus.pro +++ b/src/cpp/QtJambiSerialBus/QtJambiSerialBus.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core serialbus diff --git a/src/cpp/QtJambiSerialBus/hashes.h b/src/cpp/QtJambiSerialBus/hashes.h index dd7aa833..04b8b5af 100644 --- a/src/cpp/QtJambiSerialBus/hashes.h +++ b/src/cpp/QtJambiSerialBus/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiSerialBus/impl.cpp b/src/cpp/QtJambiSerialBus/impl.cpp index da38663d..3b0a34df 100644 --- a/src/cpp/QtJambiSerialBus/impl.cpp +++ b/src/cpp/QtJambiSerialBus/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiSerialBus/utils_p.h b/src/cpp/QtJambiSerialBus/utils_p.h index b11305cc..0f8405b5 100644 --- a/src/cpp/QtJambiSerialBus/utils_p.h +++ b/src/cpp/QtJambiSerialBus/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiSerialPort/QtJambiSerialPort.pro b/src/cpp/QtJambiSerialPort/QtJambiSerialPort.pro index a262c4c1..d8c07492 100644 --- a/src/cpp/QtJambiSerialPort/QtJambiSerialPort.pro +++ b/src/cpp/QtJambiSerialPort/QtJambiSerialPort.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core serialport diff --git a/src/cpp/QtJambiSpatialAudio/QtJambiSpatialAudio.pro b/src/cpp/QtJambiSpatialAudio/QtJambiSpatialAudio.pro index eca73fe1..b2ba84d1 100644 --- a/src/cpp/QtJambiSpatialAudio/QtJambiSpatialAudio.pro +++ b/src/cpp/QtJambiSpatialAudio/QtJambiSpatialAudio.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core multimedia spatialaudio diff --git a/src/cpp/QtJambiSql/QtJambiSql.pro b/src/cpp/QtJambiSql/QtJambiSql.pro index d1a2eb5e..3f9fb01f 100644 --- a/src/cpp/QtJambiSql/QtJambiSql.pro +++ b/src/cpp/QtJambiSql/QtJambiSql.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core sql diff --git a/src/cpp/QtJambiSql/hashes.h b/src/cpp/QtJambiSql/hashes.h index e9475bbe..52c98dc8 100644 --- a/src/cpp/QtJambiSql/hashes.h +++ b/src/cpp/QtJambiSql/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiSql/impl.cpp b/src/cpp/QtJambiSql/impl.cpp index 07960360..57f8b31f 100644 --- a/src/cpp/QtJambiSql/impl.cpp +++ b/src/cpp/QtJambiSql/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiStateMachine/QtJambiStateMachine.pro b/src/cpp/QtJambiStateMachine/QtJambiStateMachine.pro index e0ebf6c6..5b09cab3 100644 --- a/src/cpp/QtJambiStateMachine/QtJambiStateMachine.pro +++ b/src/cpp/QtJambiStateMachine/QtJambiStateMachine.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += statemachine diff --git a/src/cpp/QtJambiSvg/QtJambiSvg.pro b/src/cpp/QtJambiSvg/QtJambiSvg.pro index 2e8d0d1e..aa583f2c 100644 --- a/src/cpp/QtJambiSvg/QtJambiSvg.pro +++ b/src/cpp/QtJambiSvg/QtJambiSvg.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core svg diff --git a/src/cpp/QtJambiSvgWidgets/QtJambiSvgWidgets.pro b/src/cpp/QtJambiSvgWidgets/QtJambiSvgWidgets.pro index fc92885b..a8b4ee80 100644 --- a/src/cpp/QtJambiSvgWidgets/QtJambiSvgWidgets.pro +++ b/src/cpp/QtJambiSvgWidgets/QtJambiSvgWidgets.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core widgets svg svgwidgets diff --git a/src/cpp/QtJambiTest/QtJambiTest.pro b/src/cpp/QtJambiTest/QtJambiTest.pro index ea710334..2656de23 100644 --- a/src/cpp/QtJambiTest/QtJambiTest.pro +++ b/src/cpp/QtJambiTest/QtJambiTest.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += core gui widgets testlib diff --git a/src/cpp/QtJambiTest/impl.cpp b/src/cpp/QtJambiTest/impl.cpp index 8edf625c..2dee78af 100644 --- a/src/cpp/QtJambiTest/impl.cpp +++ b/src/cpp/QtJambiTest/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiTest/utils_p.h b/src/cpp/QtJambiTest/utils_p.h index 1bc89ffc..649271ca 100644 --- a/src/cpp/QtJambiTest/utils_p.h +++ b/src/cpp/QtJambiTest/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiTextToSpeech/QtJambiTextToSpeech.pro b/src/cpp/QtJambiTextToSpeech/QtJambiTextToSpeech.pro index 30bd8047..46be3451 100644 --- a/src/cpp/QtJambiTextToSpeech/QtJambiTextToSpeech.pro +++ b/src/cpp/QtJambiTextToSpeech/QtJambiTextToSpeech.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core texttospeech diff --git a/src/cpp/QtJambiTextToSpeech/hashes.h b/src/cpp/QtJambiTextToSpeech/hashes.h index 55314805..1cfe9541 100644 --- a/src/cpp/QtJambiTextToSpeech/hashes.h +++ b/src/cpp/QtJambiTextToSpeech/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiTextToSpeech/impl.cpp b/src/cpp/QtJambiTextToSpeech/impl.cpp index 684f96e1..d1ed99bc 100644 --- a/src/cpp/QtJambiTextToSpeech/impl.cpp +++ b/src/cpp/QtJambiTextToSpeech/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -43,52 +43,7 @@ namespace Java{ ) } namespace QtMultimedia{ - QTJAMBI_REPOSITORY_DECLARE_CLASS(QAudioFormat,) QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/multimedia,QAudioFormat,) - QTJAMBI_REPOSITORY_DECLARE_CLASS(QAudioBuffer,) QTJAMBI_REPOSITORY_DEFINE_CLASS(io/qt/multimedia,QAudioBuffer,) } } - -#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) - -struct Prototype1{ - Prototype1(JNIEnv *env, jobject func) : wrapper(env, func){} - void operator()(const QAudioBuffer& arg1){ - if(JniEnvironment env{200}){ - Java::QtCore::QMetaObject$Slot1::invoke(env, wrapper.object(), QtJambiAPI::convertNativeToJavaObjectAsCopy(env, &arg1, Java::QtMultimedia::QAudioBuffer::getClass(env))); - } - } - JObjectWrapper wrapper; -}; - -struct Prototype2{ - Prototype2(JNIEnv *env, jobject func) : wrapper(env, func){} - void operator()(const QAudioFormat& arg1, const QByteArray& arg2){ - if(JniEnvironment env{200}){ - Java::QtCore::QMetaObject$Slot2::invoke(env, wrapper.object(), QtJambiAPI::convertNativeToJavaObjectAsCopy(env, &arg1, Java::QtMultimedia::QAudioFormat::getClass(env)), qtjambi_cast(env, arg2)); - } - } - JObjectWrapper wrapper; -}; - -void qtjambi_synthesize1(JNIEnv *env, QTextToSpeech *_this, jobject _context, const QString& text, jobject func){ - QObject* context = qtjambi_cast(env, _context); - auto out = [wrapper = JObjectWrapper(env, func)](const QAudioBuffer& arg1){ - if(JniEnvironment env{200}){ - Java::QtCore::QMetaObject$Slot1::invoke(env, wrapper.object(), QtJambiAPI::convertNativeToJavaObjectAsCopy(env, &arg1, Java::QtMultimedia::QAudioBuffer::getClass(env))); - } - }; - _this->synthesize(text, context, std::move(out)); -} - -void qtjambi_synthesize2(JNIEnv *env, QTextToSpeech *_this, jobject _context, const QString& text, jobject func){ - QObject* context = qtjambi_cast(env, _context); - auto out = [wrapper = JObjectWrapper(env, func)](const QAudioFormat& arg1, const QByteArray& arg2){ - if(JniEnvironment env{200}){ - Java::QtCore::QMetaObject$Slot2::invoke(env, wrapper.object(), QtJambiAPI::convertNativeToJavaObjectAsCopy(env, &arg1, Java::QtMultimedia::QAudioFormat::getClass(env)), qtjambi_cast(env, arg2)); - } - }; - _this->synthesize(text, context, std::move(out)); -} -#endif diff --git a/src/cpp/QtJambiTextToSpeech/utils_p.h b/src/cpp/QtJambiTextToSpeech/utils_p.h index 7657df23..43d0a564 100644 --- a/src/cpp/QtJambiTextToSpeech/utils_p.h +++ b/src/cpp/QtJambiTextToSpeech/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -39,11 +39,11 @@ namespace Java{ QTJAMBI_REPOSITORY_DECLARE_THROWABLE_CONSTRUCTOR() QTJAMBI_REPOSITORY_DECLARE_STRING_METHOD(getMessage)) } -} -#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) -void qtjambi_synthesize1(JNIEnv *env, class QTextToSpeech *_this, jobject context, const QString& text, jobject func); -void qtjambi_synthesize2(JNIEnv *env, class QTextToSpeech *_this, jobject context, const QString& text, jobject func); -#endif + namespace QtMultimedia{ + QTJAMBI_REPOSITORY_DECLARE_CLASS(QAudioBuffer,) + QTJAMBI_REPOSITORY_DECLARE_CLASS(QAudioFormat,) + } +} #endif // UTILS_P_H diff --git a/src/cpp/QtJambiUIC/QtJambiUIC.pro b/src/cpp/QtJambiUIC/QtJambiUIC.pro index 13321e77..e18d0652 100644 --- a/src/cpp/QtJambiUIC/QtJambiUIC.pro +++ b/src/cpp/QtJambiUIC/QtJambiUIC.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += designer designer-private diff --git a/src/cpp/QtJambiUIC/impl.cpp b/src/cpp/QtJambiUIC/impl.cpp index 8cd3da93..8baa93d9 100644 --- a/src/cpp/QtJambiUIC/impl.cpp +++ b/src/cpp/QtJambiUIC/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiUiTools/QtJambiUiTools.pro b/src/cpp/QtJambiUiTools/QtJambiUiTools.pro index 847a0136..3c032c14 100644 --- a/src/cpp/QtJambiUiTools/QtJambiUiTools.pro +++ b/src/cpp/QtJambiUiTools/QtJambiUiTools.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += core gui widgets uitools diff --git a/src/cpp/QtJambiVirtualKeyboard/QtJambiVirtualKeyboard.pro b/src/cpp/QtJambiVirtualKeyboard/QtJambiVirtualKeyboard.pro index dc5ed304..1999c087 100644 --- a/src/cpp/QtJambiVirtualKeyboard/QtJambiVirtualKeyboard.pro +++ b/src/cpp/QtJambiVirtualKeyboard/QtJambiVirtualKeyboard.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += core gui virtualkeyboard diff --git a/src/cpp/QtJambiWebChannel/QtJambiWebChannel.pro b/src/cpp/QtJambiWebChannel/QtJambiWebChannel.pro index 22934c5e..1df97668 100644 --- a/src/cpp/QtJambiWebChannel/QtJambiWebChannel.pro +++ b/src/cpp/QtJambiWebChannel/QtJambiWebChannel.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core webchannel diff --git a/src/cpp/QtJambiWebChannelQuick/QtJambiWebChannelQuick.pro b/src/cpp/QtJambiWebChannelQuick/QtJambiWebChannelQuick.pro index 95e67870..a3170625 100644 --- a/src/cpp/QtJambiWebChannelQuick/QtJambiWebChannelQuick.pro +++ b/src/cpp/QtJambiWebChannelQuick/QtJambiWebChannelQuick.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core webchannel webchannelquick diff --git a/src/cpp/QtJambiWebEngineCore/QtJambiWebEngineCore.pro b/src/cpp/QtJambiWebEngineCore/QtJambiWebEngineCore.pro index 02e464c1..1c03d4f3 100644 --- a/src/cpp/QtJambiWebEngineCore/QtJambiWebEngineCore.pro +++ b/src/cpp/QtJambiWebEngineCore/QtJambiWebEngineCore.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += core qml webenginecore diff --git a/src/cpp/QtJambiWebEngineCore/hashes.h b/src/cpp/QtJambiWebEngineCore/hashes.h index d24a1eb2..0f498f28 100644 --- a/src/cpp/QtJambiWebEngineCore/hashes.h +++ b/src/cpp/QtJambiWebEngineCore/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiWebEngineQuick/QtJambiWebEngineQuick.pro b/src/cpp/QtJambiWebEngineQuick/QtJambiWebEngineQuick.pro index 0161c250..68fd8a7a 100644 --- a/src/cpp/QtJambiWebEngineQuick/QtJambiWebEngineQuick.pro +++ b/src/cpp/QtJambiWebEngineQuick/QtJambiWebEngineQuick.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += core qml quick webenginecore webenginequick core-private webenginequick-private diff --git a/src/cpp/QtJambiWebEngineQuick/impl.cpp b/src/cpp/QtJambiWebEngineQuick/impl.cpp index 1d71baef..32b21db5 100644 --- a/src/cpp/QtJambiWebEngineQuick/impl.cpp +++ b/src/cpp/QtJambiWebEngineQuick/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiWebEngineWidgets/QtJambiWebEngineWidgets.pro b/src/cpp/QtJambiWebEngineWidgets/QtJambiWebEngineWidgets.pro index 96e6a306..0eba7a05 100644 --- a/src/cpp/QtJambiWebEngineWidgets/QtJambiWebEngineWidgets.pro +++ b/src/cpp/QtJambiWebEngineWidgets/QtJambiWebEngineWidgets.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core qml quick widgets webenginecore webenginewidgets diff --git a/src/cpp/QtJambiWebEngineWidgets/hashes.h b/src/cpp/QtJambiWebEngineWidgets/hashes.h index 420b2e1e..637d53db 100644 --- a/src/cpp/QtJambiWebEngineWidgets/hashes.h +++ b/src/cpp/QtJambiWebEngineWidgets/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiWebSockets/QtJambiWebSockets.pro b/src/cpp/QtJambiWebSockets/QtJambiWebSockets.pro index 00d7ff84..5f9f1829 100644 --- a/src/cpp/QtJambiWebSockets/QtJambiWebSockets.pro +++ b/src/cpp/QtJambiWebSockets/QtJambiWebSockets.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core network websockets diff --git a/src/cpp/QtJambiWebSockets/hashes.h b/src/cpp/QtJambiWebSockets/hashes.h index 288b4155..be798b6c 100644 --- a/src/cpp/QtJambiWebSockets/hashes.h +++ b/src/cpp/QtJambiWebSockets/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiWebView/QtJambiWebView.pro b/src/cpp/QtJambiWebView/QtJambiWebView.pro index 561a6353..9c7b6e3e 100644 --- a/src/cpp/QtJambiWebView/QtJambiWebView.pro +++ b/src/cpp/QtJambiWebView/QtJambiWebView.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT += core webview diff --git a/src/cpp/QtJambiWidgets/QtJambiWidgets.pro b/src/cpp/QtJambiWidgets/QtJambiWidgets.pro index dc426951..c6d9a986 100644 --- a/src/cpp/QtJambiWidgets/QtJambiWidgets.pro +++ b/src/cpp/QtJambiWidgets/QtJambiWidgets.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) SOURCES += \ diff --git a/src/cpp/QtJambiWidgets/hashes.h b/src/cpp/QtJambiWidgets/hashes.h index d70fa480..48269c5f 100644 --- a/src/cpp/QtJambiWidgets/hashes.h +++ b/src/cpp/QtJambiWidgets/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiWidgets/impl.cpp b/src/cpp/QtJambiWidgets/impl.cpp index 7b084ce1..698ecebe 100644 --- a/src/cpp/QtJambiWidgets/impl.cpp +++ b/src/cpp/QtJambiWidgets/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiWidgets/pch_p.h b/src/cpp/QtJambiWidgets/pch_p.h index ffb50f5a..6e2359d8 100644 --- a/src/cpp/QtJambiWidgets/pch_p.h +++ b/src/cpp/QtJambiWidgets/pch_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiWidgets/utils_p.h b/src/cpp/QtJambiWidgets/utils_p.h index 2237a5f2..70d234eb 100644 --- a/src/cpp/QtJambiWidgets/utils_p.h +++ b/src/cpp/QtJambiWidgets/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiWinExtras/impl.cpp b/src/cpp/QtJambiWinExtras/impl.cpp index 2d2d7dec..53c58605 100644 --- a/src/cpp/QtJambiWinExtras/impl.cpp +++ b/src/cpp/QtJambiWinExtras/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiWinExtras/utils_p.h b/src/cpp/QtJambiWinExtras/utils_p.h index 62d0428b..fb23c20f 100644 --- a/src/cpp/QtJambiWinExtras/utils_p.h +++ b/src/cpp/QtJambiWinExtras/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiX11Extras/QtJambiX11Extras.pro b/src/cpp/QtJambiX11Extras/QtJambiX11Extras.pro index 81d62024..742646d9 100644 --- a/src/cpp/QtJambiX11Extras/QtJambiX11Extras.pro +++ b/src/cpp/QtJambiX11Extras/QtJambiX11Extras.pro @@ -1,4 +1,4 @@ include(../QtJambi/configure.pri) QT = core -linux-g++*: QT += x11extras +linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc*: QT += x11extras diff --git a/src/cpp/QtJambiXml/QtJambiXml.pro b/src/cpp/QtJambiXml/QtJambiXml.pro index 3339297a..7acd8dd0 100644 --- a/src/cpp/QtJambiXml/QtJambiXml.pro +++ b/src/cpp/QtJambiXml/QtJambiXml.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../QtJambi/configure.pri) QT = core xml diff --git a/src/cpp/QtJambiXml/hashes.h b/src/cpp/QtJambiXml/hashes.h index 5988c956..4e5079ed 100644 --- a/src/cpp/QtJambiXml/hashes.h +++ b/src/cpp/QtJambiXml/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiXml/impl.cpp b/src/cpp/QtJambiXml/impl.cpp index 47cd1cb4..1812c620 100644 --- a/src/cpp/QtJambiXml/impl.cpp +++ b/src/cpp/QtJambiXml/impl.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiXml/pch_p.h b/src/cpp/QtJambiXml/pch_p.h index 21b39cb3..f5094530 100644 --- a/src/cpp/QtJambiXml/pch_p.h +++ b/src/cpp/QtJambiXml/pch_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiXml/utils_p.h b/src/cpp/QtJambiXml/utils_p.h index 9c9fec76..1d81d95c 100644 --- a/src/cpp/QtJambiXml/utils_p.h +++ b/src/cpp/QtJambiXml/utils_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/QtJambiXmlPatterns/hashes.h b/src/cpp/QtJambiXmlPatterns/hashes.h index cab14e54..f64f40f7 100644 --- a/src/cpp/QtJambiXmlPatterns/hashes.h +++ b/src/cpp/QtJambiXmlPatterns/hashes.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/autotests/autotests.h b/src/cpp/autotests/autotests.h index 20605163..4826fc5f 100644 --- a/src/cpp/autotests/autotests.h +++ b/src/cpp/autotests/autotests.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/autotests/autotests.qml b/src/cpp/autotests/autotests.qml index 433326e8..acde2303 100644 --- a/src/cpp/autotests/autotests.qml +++ b/src/cpp/autotests/autotests.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/autotests/flagsandenumtest.cpp b/src/cpp/autotests/flagsandenumtest.cpp index a7d12f8f..dce62ca4 100644 --- a/src/cpp/autotests/flagsandenumtest.cpp +++ b/src/cpp/autotests/flagsandenumtest.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/autotests/flagsandenumtest.h b/src/cpp/autotests/flagsandenumtest.h index 13698819..d6d8a455 100644 --- a/src/cpp/autotests/flagsandenumtest.h +++ b/src/cpp/autotests/flagsandenumtest.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/autotests/general.h b/src/cpp/autotests/general.h index 3ab6c4d7..a682bb33 100644 --- a/src/cpp/autotests/general.h +++ b/src/cpp/autotests/general.h @@ -78,21 +78,9 @@ bool operator ==(const std::initializer_list& a,const std::initializer_listvulkanInstance(); -#else - Q_UNUSED(window) - return false; -#endif - } + static bool canVulkan(); + static bool hasVulkanInstance(QWindow* window); + static bool canCreateVulkanInstance(); #ifndef QTJAMBI_NO_WIDGETS static void callPaintCell(QCalendarWidget *w, QPainter *painter); diff --git a/src/cpp/autotests/global.cpp b/src/cpp/autotests/global.cpp index 2d64cc6a..a2b5af70 100644 --- a/src/cpp/autotests/global.cpp +++ b/src/cpp/autotests/global.cpp @@ -47,6 +47,9 @@ #include #include #include +#if QT_CONFIG(vulkan) && __has_include() +#include +#endif #ifndef QTJAMBI_NO_QUICK #include #endif @@ -96,6 +99,32 @@ void General::callPaintCellNull(QCalendarWidget *w) { } #endif +bool General::canVulkan(){ +#if QT_CONFIG(vulkan) + return true; +#else + return false; +#endif +} + +bool General::hasVulkanInstance(QWindow* window){ +#if QT_CONFIG(vulkan) + return window->vulkanInstance(); +#else + Q_UNUSED(window) + return false; +#endif +} + +bool General::canCreateVulkanInstance(){ +#if QT_CONFIG(vulkan) && __has_include() + QVulkanInstance inst; + return inst.create(); +#else + return false; +#endif +} + class Runner : public QThread{ public: void runMe(){run();} }; diff --git a/src/cpp/autotests/propertyandmethodcalltest.cpp b/src/cpp/autotests/propertyandmethodcalltest.cpp index bfd19b18..75c9562d 100644 --- a/src/cpp/autotests/propertyandmethodcalltest.cpp +++ b/src/cpp/autotests/propertyandmethodcalltest.cpp @@ -115,7 +115,7 @@ bool PropertyAndMethodCallTest::connectSignals(QObject* sender, bool useAnnotate connected &= bool(QObject::connect(sender, SIGNAL(customColorPtrChanged(QColor*)), this, SLOT(receiveColorPtr(QColor*)))); connected &= bool(QtJambiAPI::connect(sender, SIGNAL(customQtValueChanged(io::qt::autotests::TestPropertyAndMethodCall::TestQObject::CustomQtValue*)), this, SLOT(receiveCustomQtValue(QGraphicsItem*)))); connected &= bool(QtJambiAPI::connect(sender, SIGNAL(customQtInterfaceValueChanged(io::qt::autotests::TestPropertyAndMethodCall::TestQObject::CustomQtInterfaceValue*)), this, SLOT(receiveCustomQtInterfaceValue(QGraphicsItem*)))); - connected &= bool(QtJambiAPI::connect(sender, SIGNAL(customJavaTypeChanged(io::qt::autotests::TestPropertyAndMethodCall::TestQObject::CustomJavaType*)), this, SLOT(receiveCustomJavaType(JObjectWrapper)))); + connected &= bool(QtJambiAPI::connect(sender, SIGNAL(customJavaTypeChanged(JObjectWrapper)), this, SLOT(receiveCustomJavaType(JObjectWrapper)))); connected &= bool(QtJambiAPI::connect(sender, SIGNAL(derivedQObjectChanged(io::qt::autotests::TestPropertyAndMethodCall::TestQObject::DerivedQObject*)), this, SLOT(receiveDerivedQObject(QObject*)))); connected &= bool(QtJambiAPI::connect(sender, SIGNAL(extendedColorChanged(io::qt::autotests::TestPropertyAndMethodCall::TestQObject::ExtendedColor)), this, SLOT(receiveExtendedColor(JObjectWrapper)))); #else @@ -231,7 +231,7 @@ JObjectWrapper PropertyAndMethodCallTest::receivedQtFlags(){ } bool PropertyAndMethodCallTest::testMethodCallNumber(QObject* qobj){ - GETMETHOD_TEST(JObjectWrapper, java::lang::Number*, Number) + GETMETHOD_TEST(JObjectWrapper, JObjectWrapper, Number) } bool PropertyAndMethodCallTest::testMethodCallEnum(QObject* qobj){ @@ -280,7 +280,7 @@ bool PropertyAndMethodCallTest::testMethodCallCustomQtInterfaceValue(QObject* qo } bool PropertyAndMethodCallTest::testMethodCallCustomJavaType(QObject* qobj){ - GETMETHOD_TEST(JObjectWrapper, io::qt::autotests::TestPropertyAndMethodCall::TestQObject::CustomJavaType*, CustomJavaType) + GETMETHOD_TEST(JObjectWrapper, JObjectWrapper, CustomJavaType) } bool PropertyAndMethodCallTest::testMethodCallCustomQtEnum2(QObject* qobj){ @@ -300,7 +300,7 @@ bool PropertyAndMethodCallTest::testMethodCallExtendedColor(QObject* qobj){ } bool PropertyAndMethodCallTest::testFetchPropertyNumber(QObject* qobj){ - PROPERTY_TEST(JObjectWrapper, java::lang::Number*, Number) + PROPERTY_TEST(JObjectWrapper, JObjectWrapper, Number) } bool PropertyAndMethodCallTest::testFetchPropertyEnum(QObject* qobj){ @@ -364,7 +364,7 @@ bool PropertyAndMethodCallTest::testFetchPropertyCustomQtInterfaceValue(QObject* } bool PropertyAndMethodCallTest::testFetchPropertyCustomJavaType(QObject* qobj){ - PROPERTY_TEST(JObjectWrapper, io::qt::autotests::TestPropertyAndMethodCall::TestQObject::CustomJavaType*, CustomJavaType) + PROPERTY_TEST(JObjectWrapper, JObjectWrapper, CustomJavaType) } bool PropertyAndMethodCallTest::testFetchPropertyCustomQtEnum2(QObject* qobj){ diff --git a/src/cpp/functionpointers/BindingSetterFunction/BindingSetterFunction.pro b/src/cpp/functionpointers/BindingSetterFunction/BindingSetterFunction.pro index 8c5d77df..b7e2ead3 100644 --- a/src/cpp/functionpointers/BindingSetterFunction/BindingSetterFunction.pro +++ b/src/cpp/functionpointers/BindingSetterFunction/BindingSetterFunction.pro @@ -1,3 +1,32 @@ -include(../functionpointers.pri) +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### -#Qt += core +include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/BindingSetterFunction/impl.cpp b/src/cpp/functionpointers/BindingSetterFunction/impl.cpp index c19cbdac..c2287033 100644 --- a/src/cpp/functionpointers/BindingSetterFunction/impl.cpp +++ b/src/cpp/functionpointers/BindingSetterFunction/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include #include diff --git a/src/cpp/functionpointers/DoubleToDoubleFunction/DoubleToDoubleFunction.pro b/src/cpp/functionpointers/DoubleToDoubleFunction/DoubleToDoubleFunction.pro index 3f5a1dbd..b7e2ead3 100644 --- a/src/cpp/functionpointers/DoubleToDoubleFunction/DoubleToDoubleFunction.pro +++ b/src/cpp/functionpointers/DoubleToDoubleFunction/DoubleToDoubleFunction.pro @@ -1 +1,32 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/DoubleToDoubleFunction/impl.cpp b/src/cpp/functionpointers/DoubleToDoubleFunction/impl.cpp index 65d3d110..9e64646b 100644 --- a/src/cpp/functionpointers/DoubleToDoubleFunction/impl.cpp +++ b/src/cpp/functionpointers/DoubleToDoubleFunction/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include diff --git a/src/cpp/functionpointers/FloatToFloatFunction/FloatToFloatFunction.pro b/src/cpp/functionpointers/FloatToFloatFunction/FloatToFloatFunction.pro index 3f5a1dbd..b7e2ead3 100644 --- a/src/cpp/functionpointers/FloatToFloatFunction/FloatToFloatFunction.pro +++ b/src/cpp/functionpointers/FloatToFloatFunction/FloatToFloatFunction.pro @@ -1 +1,32 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/FloatToFloatFunction/impl.cpp b/src/cpp/functionpointers/FloatToFloatFunction/impl.cpp index 8be42677..acd7d345 100644 --- a/src/cpp/functionpointers/FloatToFloatFunction/impl.cpp +++ b/src/cpp/functionpointers/FloatToFloatFunction/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include diff --git a/src/cpp/functionpointers/Generic1Function/Generic1Function.pro b/src/cpp/functionpointers/Generic1Function/Generic1Function.pro index 3f5a1dbd..b7e2ead3 100644 --- a/src/cpp/functionpointers/Generic1Function/Generic1Function.pro +++ b/src/cpp/functionpointers/Generic1Function/Generic1Function.pro @@ -1 +1,32 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/Generic1Function/impl.cpp b/src/cpp/functionpointers/Generic1Function/impl.cpp index b8468cda..742e069a 100644 --- a/src/cpp/functionpointers/Generic1Function/impl.cpp +++ b/src/cpp/functionpointers/Generic1Function/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include diff --git a/src/cpp/functionpointers/Generic2Function/Generic2Function.pro b/src/cpp/functionpointers/Generic2Function/Generic2Function.pro index 3f5a1dbd..b7e2ead3 100644 --- a/src/cpp/functionpointers/Generic2Function/Generic2Function.pro +++ b/src/cpp/functionpointers/Generic2Function/Generic2Function.pro @@ -1 +1,32 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/Generic2Function/impl.cpp b/src/cpp/functionpointers/Generic2Function/impl.cpp index aa3f24a9..a3f94630 100644 --- a/src/cpp/functionpointers/Generic2Function/impl.cpp +++ b/src/cpp/functionpointers/Generic2Function/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include diff --git a/src/cpp/functionpointers/Generic3Function/Generic3Function.pro b/src/cpp/functionpointers/Generic3Function/Generic3Function.pro index 3f5a1dbd..b7e2ead3 100644 --- a/src/cpp/functionpointers/Generic3Function/Generic3Function.pro +++ b/src/cpp/functionpointers/Generic3Function/Generic3Function.pro @@ -1 +1,32 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/Generic3Function/impl.cpp b/src/cpp/functionpointers/Generic3Function/impl.cpp index 8931bde0..56c8620e 100644 --- a/src/cpp/functionpointers/Generic3Function/impl.cpp +++ b/src/cpp/functionpointers/Generic3Function/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include diff --git a/src/cpp/functionpointers/Generic4Function/Generic4Function.pro b/src/cpp/functionpointers/Generic4Function/Generic4Function.pro index 3f5a1dbd..b7e2ead3 100644 --- a/src/cpp/functionpointers/Generic4Function/Generic4Function.pro +++ b/src/cpp/functionpointers/Generic4Function/Generic4Function.pro @@ -1 +1,32 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/Generic4Function/impl.cpp b/src/cpp/functionpointers/Generic4Function/impl.cpp index 2b46064d..c53901b3 100644 --- a/src/cpp/functionpointers/Generic4Function/impl.cpp +++ b/src/cpp/functionpointers/Generic4Function/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include diff --git a/src/cpp/functionpointers/Generic5Function/Generic5Function.pro b/src/cpp/functionpointers/Generic5Function/Generic5Function.pro index 3f5a1dbd..b7e2ead3 100644 --- a/src/cpp/functionpointers/Generic5Function/Generic5Function.pro +++ b/src/cpp/functionpointers/Generic5Function/Generic5Function.pro @@ -1 +1,32 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/Generic5Function/impl.cpp b/src/cpp/functionpointers/Generic5Function/impl.cpp index 3eeecef7..0c2889b2 100644 --- a/src/cpp/functionpointers/Generic5Function/impl.cpp +++ b/src/cpp/functionpointers/Generic5Function/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include diff --git a/src/cpp/functionpointers/Generic6Function/Generic6Function.pro b/src/cpp/functionpointers/Generic6Function/Generic6Function.pro index 3f5a1dbd..b7e2ead3 100644 --- a/src/cpp/functionpointers/Generic6Function/Generic6Function.pro +++ b/src/cpp/functionpointers/Generic6Function/Generic6Function.pro @@ -1 +1,32 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/Generic6Function/impl.cpp b/src/cpp/functionpointers/Generic6Function/impl.cpp index c12d079c..1426fa3c 100644 --- a/src/cpp/functionpointers/Generic6Function/impl.cpp +++ b/src/cpp/functionpointers/Generic6Function/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include diff --git a/src/cpp/functionpointers/GenericFunction/GenericFunction.pro b/src/cpp/functionpointers/GenericFunction/GenericFunction.pro index 3f5a1dbd..b7e2ead3 100644 --- a/src/cpp/functionpointers/GenericFunction/GenericFunction.pro +++ b/src/cpp/functionpointers/GenericFunction/GenericFunction.pro @@ -1 +1,32 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/GenericFunction/impl.cpp b/src/cpp/functionpointers/GenericFunction/impl.cpp index 857987b6..c475a53f 100644 --- a/src/cpp/functionpointers/GenericFunction/impl.cpp +++ b/src/cpp/functionpointers/GenericFunction/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include diff --git a/src/cpp/functionpointers/MakeBindingFunction/MakeBindingFunction.pro b/src/cpp/functionpointers/MakeBindingFunction/MakeBindingFunction.pro index 8c5d77df..b7e2ead3 100644 --- a/src/cpp/functionpointers/MakeBindingFunction/MakeBindingFunction.pro +++ b/src/cpp/functionpointers/MakeBindingFunction/MakeBindingFunction.pro @@ -1,3 +1,32 @@ -include(../functionpointers.pri) +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### -#Qt += core +include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/MakeBindingFunction/impl.cpp b/src/cpp/functionpointers/MakeBindingFunction/impl.cpp index 6f59716b..50776718 100644 --- a/src/cpp/functionpointers/MakeBindingFunction/impl.cpp +++ b/src/cpp/functionpointers/MakeBindingFunction/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include #include diff --git a/src/cpp/functionpointers/MetaTypeFunction/MetaTypeFunction.pro b/src/cpp/functionpointers/MetaTypeFunction/MetaTypeFunction.pro index 8c5d77df..b7e2ead3 100644 --- a/src/cpp/functionpointers/MetaTypeFunction/MetaTypeFunction.pro +++ b/src/cpp/functionpointers/MetaTypeFunction/MetaTypeFunction.pro @@ -1,3 +1,32 @@ -include(../functionpointers.pri) +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### -#Qt += core +include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/MetaTypeFunction/impl.cpp b/src/cpp/functionpointers/MetaTypeFunction/impl.cpp index 803ca0d7..bf8950db 100644 --- a/src/cpp/functionpointers/MetaTypeFunction/impl.cpp +++ b/src/cpp/functionpointers/MetaTypeFunction/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include diff --git a/src/cpp/functionpointers/PluginMetaDataFunction/PluginMetaDataFunction.pro b/src/cpp/functionpointers/PluginMetaDataFunction/PluginMetaDataFunction.pro index 3f5a1dbd..b7e2ead3 100644 --- a/src/cpp/functionpointers/PluginMetaDataFunction/PluginMetaDataFunction.pro +++ b/src/cpp/functionpointers/PluginMetaDataFunction/PluginMetaDataFunction.pro @@ -1 +1,32 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/PluginMetaDataFunction/impl.cpp b/src/cpp/functionpointers/PluginMetaDataFunction/impl.cpp index 5bedb965..ffab2112 100644 --- a/src/cpp/functionpointers/PluginMetaDataFunction/impl.cpp +++ b/src/cpp/functionpointers/PluginMetaDataFunction/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include #include diff --git a/src/cpp/functionpointers/PropertyBindingWrapperFunction/PropertyBindingWrapperFunction.pro b/src/cpp/functionpointers/PropertyBindingWrapperFunction/PropertyBindingWrapperFunction.pro index 8c5d77df..b7e2ead3 100644 --- a/src/cpp/functionpointers/PropertyBindingWrapperFunction/PropertyBindingWrapperFunction.pro +++ b/src/cpp/functionpointers/PropertyBindingWrapperFunction/PropertyBindingWrapperFunction.pro @@ -1,3 +1,32 @@ -include(../functionpointers.pri) +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### -#Qt += core +include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/PropertyBindingWrapperFunction/impl.cpp b/src/cpp/functionpointers/PropertyBindingWrapperFunction/impl.cpp index fcd89389..3271c71a 100644 --- a/src/cpp/functionpointers/PropertyBindingWrapperFunction/impl.cpp +++ b/src/cpp/functionpointers/PropertyBindingWrapperFunction/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include #include diff --git a/src/cpp/functionpointers/QmlTypeCreatorFunction/QmlTypeCreatorFunction.pro b/src/cpp/functionpointers/QmlTypeCreatorFunction/QmlTypeCreatorFunction.pro index 861c2d64..b7e2ead3 100644 --- a/src/cpp/functionpointers/QmlTypeCreatorFunction/QmlTypeCreatorFunction.pro +++ b/src/cpp/functionpointers/QmlTypeCreatorFunction/QmlTypeCreatorFunction.pro @@ -1,3 +1,32 @@ -include(../functionpointers.pri) +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### -#QT += core +include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/QmlTypeCreatorFunction/impl.cpp b/src/cpp/functionpointers/QmlTypeCreatorFunction/impl.cpp index f9f03269..af846700 100644 --- a/src/cpp/functionpointers/QmlTypeCreatorFunction/impl.cpp +++ b/src/cpp/functionpointers/QmlTypeCreatorFunction/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include template diff --git a/src/cpp/functionpointers/VariantDataFunction/VariantDataFunction.pro b/src/cpp/functionpointers/VariantDataFunction/VariantDataFunction.pro index 3f5a1dbd..b7e2ead3 100644 --- a/src/cpp/functionpointers/VariantDataFunction/VariantDataFunction.pro +++ b/src/cpp/functionpointers/VariantDataFunction/VariantDataFunction.pro @@ -1 +1,32 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + include(../functionpointers.pri) diff --git a/src/cpp/functionpointers/VariantDataFunction/impl.cpp b/src/cpp/functionpointers/VariantDataFunction/impl.cpp index ed6882cf..288477f3 100644 --- a/src/cpp/functionpointers/VariantDataFunction/impl.cpp +++ b/src/cpp/functionpointers/VariantDataFunction/impl.cpp @@ -1,3 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + #include #include diff --git a/src/cpp/functionpointers/functionpointers.pri b/src/cpp/functionpointers/functionpointers.pri index 59375f1b..c0d508ed 100644 --- a/src/cpp/functionpointers/functionpointers.pri +++ b/src/cpp/functionpointers/functionpointers.pri @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + isEmpty(TARGET):{ PRO_FILE = $$basename(_PRO_FILE_) PRO_FILE = $$section(PRO_FILE, .pro, 0, 0) @@ -33,40 +64,51 @@ CONFIG(debug, debug|release) { } } -macx:CONFIG -= precompile_header -macx:CONFIG += no_default_rpath no_qt_rpath -macx:QMAKE_CXXFLAGS += -Wc++14-extensions -macx:QMAKE_CXXFLAGS += -F$$[QT_INSTALL_LIBS] -macx:QMAKE_CXXFLAGS_WARN_OFF += -Wdollar-in-identifier-extension -Woverloaded-virtual -android:CONFIG += rtti -android:CONFIG += exceptions -android:QMAKE_CXXFLAGS_EXCEPTIONS_ON += -fexceptions -android:QMAKE_CXXFLAGS += -fexceptions -frtti -android:QMAKE_LFLAGS += -Wl,--export-dynamic -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libunwind.a -Wl,--exclude-libs,libgcc.a -lunwind -android:QMAKE_CXXFLAGS += -funwind-tables +contains(QT_CONFIG, release):contains(QT_CONFIG, debug) { + # Qt was configued with both debug and release libs + CONFIG += debug_and_release build_all +} -greaterThan(QT_MAJOR_VERSION, 5):{ - DESTDIR = ../../QtJambi/$$QTJAMBICONF - macx { +android:{ + CONFIG += rtti + CONFIG += exceptions + CONFIG -= android_install + TARGET = $${TARGET}_$${QT_ARCH} + QMAKE_CXXFLAGS_EXCEPTIONS_ON += -fexceptions + QMAKE_CXXFLAGS += -fexceptions -frtti -funwind-tables + QMAKE_LFLAGS += -Wl,--export-dynamic -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libunwind.a -Wl,--exclude-libs,libgcc.a -lunwind + +# greaterThan(QT_MAJOR_VERSION, 5):{ +# DESTDIR = ../../QtJambi/$$QTJAMBICONF +# }else{ +# armeabi-v7a: DESTDIR = ../../QtJambi/$$QTJAMBICONF-armeabi-v7a +# arm64-v8a: DESTDIR = ../../QtJambi/$$QTJAMBICONF-arm64-v8a +# x86: DESTDIR = ../../QtJambi/$$QTJAMBICONF-x86 +# x86_64: DESTDIR = ../../QtJambi/$$QTJAMBICONF-x86_64 +# } +}else{ + macx:{ + CONFIG -= precompile_header + CONFIG += no_default_rpath no_qt_rpath + QMAKE_CXXFLAGS += -Wc++14-extensions + QMAKE_CXXFLAGS += -F$$[QT_INSTALL_LIBS] + QMAKE_CXXFLAGS_WARN_OFF += -Wdollar-in-identifier-extension -Woverloaded-virtual greaterThan(QT_MAJOR_VERSION, 6) | greaterThan(QT_MINOR_VERSION, 1):{ QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64 } } -}else{ - android:{ - armeabi-v7a: DESTDIR = ../../QtJambi/$$QTJAMBICONF-armeabi-v7a - arm64-v8a: DESTDIR = ../../QtJambi/$$QTJAMBICONF-arm64-v8a - x86: DESTDIR = ../../QtJambi/$$QTJAMBICONF-x86 - x86_64: DESTDIR = ../../QtJambi/$$QTJAMBICONF-x86_64 - }else{ - DESTDIR = ../../QtJambi/$$QTJAMBICONF + linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc* | win32-g++*:{ + QMAKE_CXXFLAGS_WARN_OFF += -Wdollar-in-identifier-extension -Woverloaded-virtual + QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function + QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined + QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF + CONFIG += rtti exceptions + QMAKE_CXXFLAGS += -fexceptions -frtti -funwind-tables } -} -DESTDIR = ../../lib -DLLDESTDIR = ../../lib -contains(QT_CONFIG, release):contains(QT_CONFIG, debug) { - # Qt was configued with both debug and release libs - CONFIG += debug_and_release build_all +# DESTDIR = ../../QtJambi/$$QTJAMBICONF +# DLLDESTDIR = $$DESTDIR } +DESTDIR = ../../lib +DLLDESTDIR = ../../lib diff --git a/src/cpp/functionpointers/functionpointers.pro b/src/cpp/functionpointers/functionpointers.pro index aced70fc..fc97046f 100644 --- a/src/cpp/functionpointers/functionpointers.pro +++ b/src/cpp/functionpointers/functionpointers.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + TEMPLATE = subdirs SUBDIRS += GenericFunction SUBDIRS += Generic1Function diff --git a/src/cpp/jarimport/jarimport.pro b/src/cpp/jarimport/jarimport.pro index 4cf7b855..0bf70c7f 100644 --- a/src/cpp/jarimport/jarimport.pro +++ b/src/cpp/jarimport/jarimport.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + QTJAMBI_PROJECT = $$basename(_PRO_FILE_) QTJAMBI_PROJECT = $$section(QTJAMBI_PROJECT, .pro, 0, 0) TARGET = $$QTJAMBI_PROJECT @@ -70,7 +101,7 @@ macx:{ } } -linux-g++*:{ +linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc* { QMAKE_RPATHDIR = $ORIGIN/../lib QMAKE_RPATHDIR += $ORIGIN/../../lib QMAKE_RPATHDIR += $ORIGIN/../../../lib @@ -84,13 +115,18 @@ linux-g++*:{ QMAKE_RPATHDIR += $ORIGIN/../../../../../../../../../../../lib } -linux-g++* | freebsd-g++* | win32-g++* { +linux-clang* | linux-g++* | freebsd-clang* | freebsd-g++* | netbsd-clang* | netbsd-g++* | openbsd-clang* | openbsd-g++* | solaris-g++* | solaris-cc* | win32-g++* { QMAKE_CXXFLAGS_WARN_OFF += -Wdollar-in-identifier-extension -Woverloaded-virtual QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF } +android:{ + CONFIG -= android_install + TARGET = $${TARGET}_$${QT_ARCH} +} + HEADERS += SOURCES += lib.cpp diff --git a/src/cpp/jarimport/lib.cpp b/src/cpp/jarimport/lib.cpp index 917eb80d..4489ee35 100644 --- a/src/cpp/jarimport/lib.cpp +++ b/src/cpp/jarimport/lib.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/cpp/modules.pro b/src/cpp/modules.pro index efe85844..3832e5fa 100644 --- a/src/cpp/modules.pro +++ b/src/cpp/modules.pro @@ -1,3 +1,34 @@ +################################################################################################### +## +## Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +## +## This file is part of Qt Jambi. +## +## $BEGIN_LICENSE$ +## +## GNU Lesser General Public License Usage +## 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. +## +## 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. +## +## $END_LICENSE$ +## +## This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +## WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +## +################################################################################################### + TEMPLATE = subdirs SUBDIRS = QtJambiCore diff --git a/src/java/ant/io/qt/tools/ant/AbstractInitializeTask.java b/src/java/ant/io/qt/tools/ant/AbstractInitializeTask.java index 826c8e52..e0014d31 100644 --- a/src/java/ant/io/qt/tools/ant/AbstractInitializeTask.java +++ b/src/java/ant/io/qt/tools/ant/AbstractInitializeTask.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -41,7 +41,7 @@ import org.apache.tools.ant.PropertyHelper; import org.apache.tools.ant.Task; -import io.qt.tools.ant.OSInfo.OS; +import io.qt.tools.ant.OSInfo.OperationSystem; public abstract class AbstractInitializeTask extends Task { @@ -158,8 +158,8 @@ protected String decideJavaHomeTarget() { if(s != null) { File home = new File(s); try { - while(Files.isSymbolicLink(home.toPath())) { - home = Files.readSymbolicLink(home.toPath()).toFile(); + if(Files.isSymbolicLink(home.toPath())) { + home = home.toPath().toRealPath().toFile(); } } catch (Exception e) { } @@ -169,7 +169,7 @@ protected String decideJavaHomeTarget() { sourceValue = " (from envvar:JAVA_HOME_TARGET)"; }else { File binDir = new File(home, "bin"); - File javaExe = new File(binDir, OSInfo.os()==OS.Windows ? "java.exe" : "java"); + File javaExe = new File(binDir, OSInfo.os()==OperationSystem.Windows ? "java.exe" : "java"); if(javaExe.isFile()) { error = "JDK does not provide headers: "+home.getAbsolutePath(); }else { @@ -187,8 +187,8 @@ protected String decideJavaHomeTarget() { if(s != null) { File home = new File(s); try { - while(Files.isSymbolicLink(home.toPath())) { - home = Files.readSymbolicLink(home.toPath()).toFile(); + if(Files.isSymbolicLink(home.toPath())) { + home = home.toPath().toRealPath().toFile(); } } catch (Exception e) { } @@ -199,7 +199,7 @@ protected String decideJavaHomeTarget() { error = null; }else { File binDir = new File(home, "bin"); - File javaExe = new File(binDir, OSInfo.os()==OS.Windows ? "java.exe" : "java"); + File javaExe = new File(binDir, OSInfo.os()==OperationSystem.Windows ? "java.exe" : "java"); if(javaExe.isFile()) { error = "JDK does not provide headers: "+home.getAbsolutePath(); }else { @@ -217,8 +217,8 @@ protected String decideJavaHomeTarget() { if(s != null) { File home = new File(s); try { - while(Files.isSymbolicLink(home.toPath())) { - home = Files.readSymbolicLink(home.toPath()).toFile(); + if(Files.isSymbolicLink(home.toPath())) { + home = home.toPath().toRealPath().toFile(); } } catch (Exception e) { } @@ -229,7 +229,10 @@ protected String decideJavaHomeTarget() { error = null; }else { s = null; + error = "Unable to find include/jni.h in JAVA_HOME. Please install headers for JDK."; } + }else { + error = "Unable to detect JAVA_HOME"; } } if(error!=null) { @@ -239,18 +242,20 @@ protected String decideJavaHomeTarget() { mySetProperty(-1, Constants.JAVA_HOME_TARGET, sourceValue, result, true); String targetJavaVersion = this.getProject().getProperty("target.java.version"); if(targetJavaVersion==null || targetJavaVersion.isEmpty()) { - File releaseFile = new File(new File(result), "release"); - targetJavaVersion = "11"; String javaVersion = null; - if(releaseFile.exists()) { - Properties properties = new Properties(); - try(FileInputStream stream = new FileInputStream(releaseFile)){ - properties.load(stream); - } catch (IOException e) { - getProject().log("reading java version", e, Project.MSG_ERR); - } - javaVersion = properties.getProperty("JAVA_VERSION", "\"11\""); - } + if(result!=null) { + File releaseFile = new File(new File(result), "release"); + targetJavaVersion = "11"; + if(releaseFile.exists()) { + Properties properties = new Properties(); + try(FileInputStream stream = new FileInputStream(releaseFile)){ + properties.load(stream); + } catch (IOException e) { + getProject().log("reading java version", e, Project.MSG_ERR); + } + javaVersion = properties.getProperty("JAVA_VERSION", "\"11\""); + } + } if(javaVersion!=null && !javaVersion.isEmpty()) { int offset = 0; if(javaVersion.startsWith("\"")) { @@ -289,7 +294,7 @@ protected String decideJavaHomeTarget() { } } String javaHome = AntUtil.getPropertyAsString(propertyHelper, Constants.JAVA_HOME_TARGET); - String app = OSInfo.os()==OSInfo.OS.Windows ? "%1$s.exe" : "%1$s"; + String app = OSInfo.os()==OSInfo.OperationSystem.Windows ? "%1$s.exe" : "%1$s"; File executable; if((executable = new File(new File(javaHome, "bin"), String.format(app, "java"))).exists()) { mySetProperty(-1, "tools.jvm", " (taken from "+Constants.JAVA_HOME_TARGET+")", executable.getAbsolutePath(), true); diff --git a/src/java/ant/io/qt/tools/ant/AidlTask.java b/src/java/ant/io/qt/tools/ant/AidlTask.java index cb88eed6..0dfd66ab 100644 --- a/src/java/ant/io/qt/tools/ant/AidlTask.java +++ b/src/java/ant/io/qt/tools/ant/AidlTask.java @@ -14,6 +14,8 @@ public void execute() throws BuildException { String buildtools = AntUtil.getPropertyAsString(propertyHelper, "qtjambi.android.buildtools").split("\\,")[0]; String platforms = AntUtil.getPropertyAsString(propertyHelper, "qtjambi.android.platform.dir"); String qtdir = AntUtil.getPropertyAsString(propertyHelper, "qtjambi.qtdir"); + System.out.println("qtjambi.android.buildtools="+buildtools); + System.out.println("qtjambi.android.platform.dir="+platforms); java.io.File buildtoolsDir, platformsDir; if(buildtools!=null && !buildtools.isEmpty() @@ -21,7 +23,7 @@ public void execute() throws BuildException { && platforms!=null && !platforms.isEmpty() && (platformsDir = new java.io.File(platforms)).isDirectory()) { - java.io.File aidlPath = new java.io.File(buildtoolsDir, OSInfo.os()==OSInfo.OS.Windows ? "aidl.exe" : "aidl"); + java.io.File aidlPath = new java.io.File(buildtoolsDir, OSInfo.os()==OSInfo.OperationSystem.Windows ? "aidl.exe" : "aidl"); java.io.File frameworkPath = new java.io.File(platformsDir, "framework.aidl"); java.io.File f1 = new java.io.File(qtdir, "src/android/java/src/org/kde/necessitas/ministro/IMinistroCallback.aidl"); java.io.File f2 = new java.io.File(qtdir, "src/android/java/src/org/kde/necessitas/ministro/IMinistro.aidl"); diff --git a/src/java/ant/io/qt/tools/ant/AntUtil.java b/src/java/ant/io/qt/tools/ant/AntUtil.java index 34ea504c..fd7e83c3 100644 --- a/src/java/ant/io/qt/tools/ant/AntUtil.java +++ b/src/java/ant/io/qt/tools/ant/AntUtil.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/ant/io/qt/tools/ant/Constants.java b/src/java/ant/io/qt/tools/ant/Constants.java index 29aeae8d..818c6fca 100644 --- a/src/java/ant/io/qt/tools/ant/Constants.java +++ b/src/java/ant/io/qt/tools/ant/Constants.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -297,7 +297,6 @@ public abstract class Constants { public static final String QML_QTGRAPHICALEFFECTS = "qtjambi.QtGraphicalEffects"; public static final String QML_QTAUDIOENGINE_DECLARATIVE_AUDIOENGINE = "qtjambi.QtAudioEngine.declarative_audioengine"; - public static final String QTJAMBI_CONFIG_ISMACOSX = "qtjambi.config.ismacosx"; public static final String QTJAMBI_MACOSX_QTMENUNIB_DIR = "qtjambi.macosx.qtmenunib.dir"; public static final String QTJAMBI_MACOSX_MAC_SDK = "qtjambi.macosx.macsdk"; diff --git a/src/java/ant/io/qt/tools/ant/CreateFunctionPointerQrcTask.java b/src/java/ant/io/qt/tools/ant/CreateFunctionPointerQrcTask.java index 8ffb2b4c..b71302c4 100644 --- a/src/java/ant/io/qt/tools/ant/CreateFunctionPointerQrcTask.java +++ b/src/java/ant/io/qt/tools/ant/CreateFunctionPointerQrcTask.java @@ -3,6 +3,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintWriter; +import java.nio.charset.StandardCharsets; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.PropertyHelper; @@ -12,6 +13,7 @@ public class CreateFunctionPointerQrcTask extends Task { @Override public void execute() throws BuildException { +// System.out.println("Initialize..."); PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(getProject()); int qtMajorVersion = Integer.parseInt(AntUtil.getPropertyAsString(propertyHelper, Constants.QT_VERSION_MAJOR)); int qtMinorVersion = Integer.parseInt(AntUtil.getPropertyAsString(propertyHelper, Constants.QT_VERSION_MINOR)); @@ -19,6 +21,7 @@ public void execute() throws BuildException { if("qtjambi".equals(module)) { String dlibFormat = "%1$sd.dll"; String libFormat = "%1$s.dll"; +// System.out.println("OS: "+OSInfo.crossOS()); switch(OSInfo.crossOS()) { case Windows: dlibFormat = "%1$sd.dll"; @@ -32,10 +35,6 @@ public void execute() throws BuildException { dlibFormat = "lib%1$s_debug.dylib"; libFormat = "lib%1$s.dylib"; break; - case Linux: - dlibFormat = "lib%1$s_debug.so"; - libFormat = "lib%1$s.so"; - break; case Android: if(qtMajorVersion<6) { libFormat = "lib%1$s_armeabi-v7a.so"; @@ -55,25 +54,35 @@ public void execute() throws BuildException { write(new java.io.File(new java.io.File(new java.io.File(dir), "QtJambi"), String.format(fileName, "release-x86_64")), libFormat, qtMajorVersion, qtMinorVersion); write(new java.io.File(new java.io.File(new java.io.File(dir), "QtJambi"), String.format(fileName, "debug-x86_64")), dlibFormat, qtMajorVersion, qtMinorVersion); return; - }else { - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: + }else if(OSInfo.crossArch()!=null){ + switch(OSInfo.crossArch()) { + case arm: dlibFormat = "lib%1$s_debug_armeabi-v7a.so"; libFormat = "lib%1$s_armeabi-v7a.so"; break; - case OSInfo.K_ANDROID_ARM64: + case arm64: dlibFormat = "lib%1$s_debug_arm64-v8a.so"; libFormat = "lib%1$s_arm64-v8a.so"; break; - case OSInfo.K_ANDROID_X86: + case x86: dlibFormat = "lib%1$s_debug_x86.so"; libFormat = "lib%1$s_x86.so"; break; - case OSInfo.K_ANDROID_X64: + case x86_64: dlibFormat = "lib%1$s_debug_x86_64.so"; libFormat = "lib%1$s_x86_64.so"; break; + case riscv64: + dlibFormat = "lib%1$s_debug_riscv64.so"; + libFormat = "lib%1$s_riscv64.so"; break; + default: break; } break; - } + }else return; default: - return; + if(OSInfo.crossOS().isUnixLike()) { + dlibFormat = "lib%1$s_debug.so"; + libFormat = "lib%1$s.so"; + }else { + return; + } + break; } write(new java.io.File(new java.io.File(new java.io.File(dir), "QtJambi"), String.format(fileName, "debug")), dlibFormat, qtMajorVersion, qtMinorVersion); write(new java.io.File(new java.io.File(new java.io.File(dir), "QtJambi"), String.format(fileName, "release")), libFormat, qtMajorVersion, qtMinorVersion); @@ -81,9 +90,10 @@ public void execute() throws BuildException { } private void write(java.io.File file, String libFormat, int qtMajorVersion, int qtMinorVersion) { +// System.out.println("Creating "+file.getAbsolutePath()); file.getParentFile().mkdirs(); try(FileOutputStream fos = new FileOutputStream(file); - PrintWriter stream = new PrintWriter(fos)){ + PrintWriter stream = new PrintWriter(fos, false, StandardCharsets.UTF_8)){ stream.println(""); stream.println(" "); // stream.append(" ").append(String.format(libFormat, "StaticMetaCallFunction")); diff --git a/src/java/ant/io/qt/tools/ant/CreateNativeDeploymentTask.java b/src/java/ant/io/qt/tools/ant/CreateNativeDeploymentTask.java index 31194008..23831bd1 100644 --- a/src/java/ant/io/qt/tools/ant/CreateNativeDeploymentTask.java +++ b/src/java/ant/io/qt/tools/ant/CreateNativeDeploymentTask.java @@ -121,20 +121,28 @@ public void execute() throws BuildException { String abi = null; switch(OSInfo.crossOS()) { case Android: - OSInfo.setCrossOSArchName(AntUtil.getPropertyAsString(propertyHelper, Constants.OSNAME)); - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: + switch(AntUtil.getPropertyAsString(propertyHelper, Constants.OSNAME)) { + case "android-arm": + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Android, OSInfo.Architecture.arm); abi = "armeabi-v7a"; break; - case OSInfo.K_ANDROID_ARM64: + case "android-x64": + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Android, OSInfo.Architecture.arm64); abi = "arm64-v8a"; break; - case OSInfo.K_ANDROID_X86: + case "android-x86": + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Android, OSInfo.Architecture.x86); abi = "x86"; break; - default: //case OSInfo.K_ANDROID_X64: + case "android-arm64": + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Android, OSInfo.Architecture.x86_64); abi = "x86_64"; break; + case "android-riscv64": + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Android, OSInfo.Architecture.riscv64); + abi = "riscv64"; + break; + default:break; } switch(moduleName) { case "qtjambi": @@ -152,23 +160,39 @@ public void execute() throws BuildException { libcdir = new java.io.File(ndkdir, "toolchains"); libcdir = new java.io.File(libcdir, "llvm"); libcdir = new java.io.File(libcdir, "prebuilt"); - libcdir = new java.io.File(libcdir, "windows-x86_64"); + switch(OSInfo.os()) { + case Windows: + libcdir = new java.io.File(libcdir, "windows-x86_64"); + break; + case MacOS: + libcdir = new java.io.File(libcdir, "darwin-x86_64"); + break; + case Linux: + libcdir = new java.io.File(libcdir, "linux-x86_64"); + break; + default: + break; + } libcdir = new java.io.File(libcdir, "sysroot"); libcdir = new java.io.File(libcdir, "usr"); libcdir = new java.io.File(libcdir, "lib"); - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: + switch(OSInfo.crossArch()) { + case arm: libcdir = new java.io.File(libcdir, "arm-linux-androideabi"); break; - case OSInfo.K_ANDROID_ARM64: + case arm64: libcdir = new java.io.File(libcdir, "aarch64-linux-android"); break; - case OSInfo.K_ANDROID_X86: + case x86: libcdir = new java.io.File(libcdir, "i686-linux-android"); break; - default: //case OSInfo.K_ANDROID_X64: + case x86_64: libcdir = new java.io.File(libcdir, "x86_64-linux-android"); break; + case riscv64: + libcdir = new java.io.File(libcdir, "riscv64-linux-android"); + break; + default: break; } libc_for_android = new java.io.File(libcdir, "libc++_shared.so"); } @@ -246,11 +270,6 @@ public void execute() throws BuildException { _libraries.add(f); } break; - case Linux: - if(f.endsWith(".so")) { - _libraries.add(f); - } - break; case MacOS: if(f.endsWith(".dylib")) { _libraries.add(f); @@ -258,25 +277,31 @@ public void execute() throws BuildException { break; case Android: String suffix = ".so"; - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: + switch(OSInfo.crossArch()) { + case arm: targetLibDir = new java.io.File(new java.io.File(directory, "lib"), "arm32"); suffix = "_armeabi-v7a.so"; break; - case OSInfo.K_ANDROID_ARM64: + case arm64: targetLibDir = new java.io.File(new java.io.File(directory, "lib"), "arm64"); suffix = "_arm64-v8a.so"; break; - case OSInfo.K_ANDROID_X86: + case x86: targetLibDir = new java.io.File(new java.io.File(directory, "lib"), "x86"); suffix = "_x86.so"; break; - case OSInfo.K_ANDROID_X64: + case x86_64: targetLibDir = new java.io.File(new java.io.File(directory, "lib"), "x86_64"); suffix = "_x86_64.so"; break; + default: break; } if(f.endsWith(suffix)) { _libraries.add(f); } break; default: + if(OSInfo.crossOS().isUnixLike()) { + if(f.endsWith(".so")) { + _libraries.add(f); + } + } break; } } @@ -342,21 +367,24 @@ public void execute() throws BuildException { } } continue; - }else if(OSInfo.crossOS()==OSInfo.OS.MacOS && useFrameworks) { + }else if(OSInfo.crossOS()==OSInfo.OperationSystem.MacOS && useFrameworks) { libName = name + (debug ? "_debug.framework" : ".framework"); isMacBundle = true; }else { libName = formatQtJambiName(name, debug, qtMajorVersion, qtMinorVersion, qtjambiPatchlevelVersion); - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - jarpath += "/armeabi-v7a"; break; - case OSInfo.K_ANDROID_ARM64: - jarpath += "/arm64-v8a"; break; - case OSInfo.K_ANDROID_X86: - jarpath += "/x86"; break; - case OSInfo.K_ANDROID_X64: - jarpath += "/x86_64"; break; - } + if(OSInfo.crossOS()==OSInfo.OperationSystem.Android) { + switch(OSInfo.crossArch()) { + case arm: + jarpath += "/armeabi-v7a"; break; + case arm64: + jarpath += "/arm64-v8a"; break; + case x86: + jarpath += "/x86"; break; + case x86_64: + jarpath += "/x86_64"; break; + default: break; + } + } } break; } @@ -587,16 +615,19 @@ public void execute() throws BuildException { noSymlinks = true; break; default: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - _libdir += "/armeabi-v7a"; break; - case OSInfo.K_ANDROID_ARM64: - _libdir += "/arm64-v8a"; break; - case OSInfo.K_ANDROID_X86: - _libdir += "/x86"; break; - case OSInfo.K_ANDROID_X64: - _libdir += "/x86_64"; break; - } + if(OSInfo.crossOS()==OSInfo.OperationSystem.Android) { + switch(OSInfo.crossArch()) { + case arm: + _libdir += "/armeabi-v7a"; break; + case arm64: + _libdir += "/arm64-v8a"; break; + case x86: + _libdir += "/x86"; break; + case x86_64: + _libdir += "/x86_64"; break; + default: break; + } + } break; } if(debug || !forceDebugInfo) { @@ -669,7 +700,7 @@ public void execute() throws BuildException { if(!Files.isSymbolicLink(link)){ create = true; }else { - Path targetPath = Files.readSymbolicLink(link); + Path targetPath = link.toRealPath(); if(!Path.of(target.getName()).equals(targetPath)) { create = true; } @@ -697,7 +728,7 @@ public void execute() throws BuildException { if(!Files.isSymbolicLink(link)){ create = true; }else { - Path targetPath = Files.readSymbolicLink(link); + Path targetPath = link.toRealPath(); if(!Path.of(target.getName()).equals(targetPath)) { create = true; } @@ -725,7 +756,7 @@ public void execute() throws BuildException { if(!Files.isSymbolicLink(link)){ create = true; }else { - Path targetPath = Files.readSymbolicLink(link); + Path targetPath = link.toRealPath(); if(!Path.of(target.getName()).equals(targetPath)) { create = true; } @@ -852,7 +883,7 @@ private void symlinkSubdirs(File root, File srcDir, File destDir, boolean debug, File destFile = new File(destDir, content.getName()); Path target = null; try { - target = Files.readSymbolicLink(content.toPath()); + target = content.toPath().toRealPath(); if(target.isAbsolute()) target = srcDir.toPath().relativize(target); if(!Files.exists(destFile.toPath())) { @@ -895,21 +926,28 @@ public static String formatPluginName(String name, boolean debug, int qtMajorVer return "lib" + name + ".dylib"; } case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + "_x86.so"; - case OSInfo.K_ANDROID_X64: + if(OSInfo.crossArch()==null) { return "lib" + name + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + "_armeabi-v7a.so"; + case arm64: + return "lib" + name + "_arm64-v8a.so"; + case x86: + return "lib" + name + "_x86.so"; + case x86_64: + return "lib" + name + "_x86_64.so"; + case riscv64: + return "lib" + name + "_riscv64.so"; + default: break; + } } - case Linux: - return "lib" + name + ".so"; case IOS: return "lib" + name + "_debug.a"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + ".so"; break; } } else { @@ -919,21 +957,28 @@ public static String formatPluginName(String name, boolean debug, int qtMajorVer case MacOS: return "lib" + name + ".dylib"; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + "_x86.so"; - case OSInfo.K_ANDROID_X64: + if(OSInfo.crossArch()==null) { return "lib" + name + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + "_armeabi-v7a.so"; + case arm64: + return "lib" + name + "_arm64-v8a.so"; + case x86: + return "lib" + name + "_x86.so"; + case x86_64: + return "lib" + name + "_x86_64.so"; + case riscv64: + return "lib" + name + "_riscv64.so"; + default: break; + } } - case Linux: - return "lib" + name + ".so"; case IOS: return "lib" + name + ".a"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + ".so"; break; } } @@ -949,19 +994,27 @@ public static String formatQmlPluginName(String name, boolean debug, int qtMajor return "lib" + name + "_debug.dylib"; else return "lib" + name + ".dylib"; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + "_x86.so"; - case OSInfo.K_ANDROID_X64: + if(OSInfo.crossArch()==null) { return "lib" + name + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + "_armeabi-v7a.so"; + case arm64: + return "lib" + name + "_arm64-v8a.so"; + case x86: + return "lib" + name + "_x86.so"; + case x86_64: + return "lib" + name + "_x86_64.so"; + case riscv64: + return "lib" + name + "_riscv64.so"; + default: break; + } } - case Linux: return "lib" + name + ".so"; case IOS: return "lib" + name + "_debug.a"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + ".so"; break; } } else { @@ -969,19 +1022,27 @@ public static String formatQmlPluginName(String name, boolean debug, int qtMajor case Windows: return name + ".dll"; case MacOS: return "lib" + name + ".dylib"; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + "_x86.so"; - case OSInfo.K_ANDROID_X64: + if(OSInfo.crossArch()==null) { return "lib" + name + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + "_armeabi-v7a.so"; + case arm64: + return "lib" + name + "_arm64-v8a.so"; + case x86: + return "lib" + name + "_x86.so"; + case x86_64: + return "lib" + name + "_x86_64.so"; + case riscv64: + return "lib" + name + "_riscv64.so"; + default: break; + } } - case Linux: return "lib" + name + ".so"; case IOS: return "lib" + name + ".a"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + ".so"; break; } } @@ -1051,24 +1112,34 @@ public static String formatQtName(String name, String infix, boolean debug, int }else{ return libPrefix + name + infix + tmpDotVersionString + ".dylib"; } - case Linux: - return libPrefix + name + infix + ".so" + tmpDotVersionString; case Android: if(infix==null || infix.isEmpty()) { - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return libPrefix + name + infix + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return libPrefix + name + infix + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return libPrefix + name + infix + "_x86.so"; - case OSInfo.K_ANDROID_X64: - return libPrefix + name + infix + "_x86_64.so"; - } + if(OSInfo.crossArch()==null) { + if(infix.isEmpty()) + return libPrefix + name + infix + "_x86_64.so"; + else + return libPrefix + name + infix + ".so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return libPrefix + name + infix + "_armeabi-v7a.so"; + case arm64: + return libPrefix + name + infix + "_arm64-v8a.so"; + case x86: + return libPrefix + name + infix + "_x86.so"; + case x86_64: + return libPrefix + name + infix + "_x86_64.so"; + case riscv64: + return libPrefix + name + infix + "_riscv64.so"; + default: break; + } + } } return libPrefix + name + infix + ".so"; case IOS: return "lib" + name + infix + "_debug.a"; default: + if(OSInfo.crossOS().isUnixLike()) + return libPrefix + name + infix + ".so" + tmpDotVersionString; break; } } else { @@ -1091,22 +1162,32 @@ public static String formatQtName(String name, String infix, boolean debug, int return name + infix + tmpVersionString + ".dll"; case MacOS: return libPrefix + name + infix + tmpDotVersionString + ".dylib"; - case Linux: - return libPrefix + name + infix + ".so" + tmpDotVersionString; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return libPrefix + name + infix + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return libPrefix + name + infix + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return libPrefix + name + infix + "_x86.so"; - case OSInfo.K_ANDROID_X64: - return libPrefix + name + infix + "_x86_64.so"; + if(OSInfo.crossArch()==null) { + if(infix.isEmpty()) + return libPrefix + name + infix + "_x86_64.so"; + else + return libPrefix + name + infix + ".so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return libPrefix + name + infix + "_armeabi-v7a.so"; + case arm64: + return libPrefix + name + infix + "_arm64-v8a.so"; + case x86: + return libPrefix + name + infix + "_x86.so"; + case x86_64: + return libPrefix + name + infix + "_x86_64.so"; + case riscv64: + return libPrefix + name + infix + "_riscv64.so"; + default: break; + } } return libPrefix + name + infix + ".so"; case IOS: return "lib" + name + infix + ".a"; default: + if(OSInfo.crossOS().isUnixLike()) + return libPrefix + name + infix + ".so" + tmpDotVersionString; break; } } @@ -1144,19 +1225,26 @@ public static String formatQtPrlName(String name, String infix, boolean debug, i return "lib" + name + infix + ".prl"; else return "lib" + name + infix + tmpDebugSuffix + ".prl"; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + infix + "_armeabi-v7a.prl"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + infix + "_arm64-v8a.prl"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + infix + "_x86.prl"; - case OSInfo.K_ANDROID_X64: - return "lib" + name + infix + "_x86_64.prl"; + if(OSInfo.crossArch()==null) { + return "lib" + name + infix + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + infix + "_armeabi-v7a.prl"; + case arm64: + return "lib" + name + infix + "_arm64-v8a.prl"; + case x86: + return "lib" + name + infix + "_x86.prl"; + case x86_64: + return "lib" + name + infix + "_x86_64.prl"; + case riscv64: + return "lib" + name + infix + "_riscv64.prl"; + default: break; + } } - case Linux: - return "lib" + name + infix + ".prl"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + infix + ".prl"; break; } } else { @@ -1167,19 +1255,26 @@ public static String formatQtPrlName(String name, String infix, boolean debug, i case IOS: return "lib" + name + infix + ".prl"; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + infix + "_armeabi-v7a.prl"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + infix + "_arm64-v8a.prl"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + infix + "_x86.prl"; - case OSInfo.K_ANDROID_X64: - return "lib" + name + infix + "_x86_64.prl"; + if(OSInfo.crossArch()==null) { + return "lib" + name + infix + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + infix + "_armeabi-v7a.prl"; + case arm64: + return "lib" + name + infix + "_arm64-v8a.prl"; + case x86: + return "lib" + name + infix + "_x86.prl"; + case x86_64: + return "lib" + name + infix + "_x86_64.prl"; + case riscv64: + return "lib" + name + infix + "_riscv64.prl"; + default: break; + } } - case Linux: - return "lib" + name + infix + ".prl"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + infix + ".prl"; break; } } @@ -1197,21 +1292,28 @@ public static String formatUnversionedPluginName(String name, boolean debug, int return "lib" + name + tmpDebugSuffix + ".dylib"; else return "lib" + name + ".dylib"; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + "_x86.so"; - case OSInfo.K_ANDROID_X64: + if(OSInfo.crossArch()==null) { return "lib" + name + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + "_armeabi-v7a.so"; + case arm64: + return "lib" + name + "_arm64-v8a.so"; + case x86: + return "lib" + name + "_x86.so"; + case x86_64: + return "lib" + name + "_x86_64.so"; + case riscv64: + return "lib" + name + "_riscv64.so"; + default: break; + } } - case Linux: - return "lib" + name + ".so"; case IOS: return "lib" + name + ".a"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + ".so"; break; } } else { @@ -1221,21 +1323,28 @@ public static String formatUnversionedPluginName(String name, boolean debug, int case MacOS: return "lib" + name + ".dylib"; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + "_x86.so"; - case OSInfo.K_ANDROID_X64: + if(OSInfo.crossArch()==null) { return "lib" + name + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + "_armeabi-v7a.so"; + case arm64: + return "lib" + name + "_arm64-v8a.so"; + case x86: + return "lib" + name + "_x86.so"; + case x86_64: + return "lib" + name + "_x86_64.so"; + case riscv64: + return "lib" + name + "_riscv64.so"; + default: break; + } } - case Linux: - return "lib" + name + ".so"; case IOS: return "lib" + name + ".a"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + ".so"; break; } } @@ -1266,21 +1375,28 @@ public static String formatQtJambiName(String name, boolean debug, int qtMajorVe case MacOS: return "lib" + name + tmpDebugSuffix + tmpDotVersionString + ".jnilib"; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + tmpDebugSuffix + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + tmpDebugSuffix + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + tmpDebugSuffix + "_x86.so"; - case OSInfo.K_ANDROID_X64: + if(OSInfo.crossArch()==null) { return "lib" + name + tmpDebugSuffix + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + tmpDebugSuffix + "_armeabi-v7a.so"; + case arm64: + return "lib" + name + tmpDebugSuffix + "_arm64-v8a.so"; + case x86: + return "lib" + name + tmpDebugSuffix + "_x86.so"; + case x86_64: + return "lib" + name + tmpDebugSuffix + "_x86_64.so"; + case riscv64: + return "lib" + name + tmpDebugSuffix + "_riscv64.so"; + default: break; + } } return "lib" + name + tmpDebugSuffix + ".so"; - case Linux: - return "lib" + name + tmpDebugSuffix + ".so" + tmpDotVersionString; case IOS: return "lib" + name + tmpDebugSuffix + ".a"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + tmpDebugSuffix + ".so" + tmpDotVersionString; break; } } else { @@ -1290,21 +1406,28 @@ public static String formatQtJambiName(String name, boolean debug, int qtMajorVe case MacOS: return "lib" + name + tmpDotVersionString + ".jnilib"; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + "_x86.so"; - case OSInfo.K_ANDROID_X64: + if(OSInfo.crossArch()==null) { return "lib" + name + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + "_armeabi-v7a.so"; + case arm64: + return "lib" + name + "_arm64-v8a.so"; + case x86: + return "lib" + name + "_x86.so"; + case x86_64: + return "lib" + name + "_x86_64.so"; + case riscv64: + return "lib" + name + "_riscv64.so"; + default: break; + } } return "lib" + name + ".so"; - case Linux: - return "lib" + name + ".so" + tmpDotVersionString; case IOS: return "lib" + name + ".a"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + ".so" + tmpDotVersionString; break; } } @@ -1318,21 +1441,28 @@ public static String formatQtJambiPluginName(String name, boolean debug, String case MacOS: return "lib" + name + "_debug.dylib"; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + "_x86.so"; - case OSInfo.K_ANDROID_X64: + if(OSInfo.crossArch()==null) { return "lib" + name + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + "_armeabi-v7a.so"; + case arm64: + return "lib" + name + "_arm64-v8a.so"; + case x86: + return "lib" + name + "_x86.so"; + case x86_64: + return "lib" + name + "_x86_64.so"; + case riscv64: + return "lib" + name + "_riscv64.so"; + default: break; + } } - case Linux: - return "lib" + name + "_debug.so"; case IOS: return "lib" + name + "_debug.a"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + "_debug.so"; break; } } else { @@ -1342,21 +1472,28 @@ public static String formatQtJambiPluginName(String name, boolean debug, String case MacOS: return "lib" + name + ".dylib"; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + "_x86.so"; - case OSInfo.K_ANDROID_X64: + if(OSInfo.crossArch()==null) { return "lib" + name + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + "_armeabi-v7a.so"; + case arm64: + return "lib" + name + "_arm64-v8a.so"; + case x86: + return "lib" + name + "_x86.so"; + case x86_64: + return "lib" + name + "_x86_64.so"; + case riscv64: + return "lib" + name + "_riscv64.so"; + default: break; + } } - case Linux: - return "lib" + name + ".so"; case IOS: return "lib" + name + ".a"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + ".so"; break; } } @@ -1373,20 +1510,27 @@ public static String formatQtJambiQmlPluginName(String name, boolean debug, Stri case MacOS: return "lib" + name + tmpDebugSuffix + ".dylib"; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + "_x86.so"; - case OSInfo.K_ANDROID_X64: - return "lib" + name + "_x86_64.so"; - } - case Linux: - return "lib" + name + tmpDebugSuffix + ".so"; + if(OSInfo.crossArch()==null) { + return "lib" + name + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + "_armeabi-v7a.so"; + case arm64: + return "lib" + name + "_arm64-v8a.so"; + case x86: + return "lib" + name + "_x86.so"; + case x86_64: + return "lib" + name + "_x86_64.so"; + case riscv64: + return "lib" + name + "_riscv64.so"; + default: break; + } + } case IOS: return "lib" + name + tmpDebugSuffix + ".a"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + tmpDebugSuffix + ".so"; break; } } else { @@ -1396,20 +1540,27 @@ public static String formatQtJambiQmlPluginName(String name, boolean debug, Stri case MacOS: return "lib" + name + ".dylib"; case Android: - switch(OSInfo.crossOSArchName()) { - case OSInfo.K_ANDROID_ARM32: - return "lib" + name + "_armeabi-v7a.so"; - case OSInfo.K_ANDROID_ARM64: - return "lib" + name + "_arm64-v8a.so"; - case OSInfo.K_ANDROID_X86: - return "lib" + name + "_x86.so"; - case OSInfo.K_ANDROID_X64: - return "lib" + name + "_x86_64.so"; - } - case Linux: - return "lib" + name + ".so"; + if(OSInfo.crossArch()==null) { + return "lib" + name + "_x86_64.so"; + }else { + switch(OSInfo.crossArch()) { + case arm: + return "lib" + name + "_armeabi-v7a.so"; + case arm64: + return "lib" + name + "_arm64-v8a.so"; + case x86: + return "lib" + name + "_x86.so"; + case x86_64: + return "lib" + name + "_x86_64.so"; + case riscv64: + return "lib" + name + "_riscv64.so"; + default: break; + } + } case IOS: return "lib" + name + ".a"; default: + if(OSInfo.crossOS().isUnixLike()) + return "lib" + name + ".so"; break; } } diff --git a/src/java/ant/io/qt/tools/ant/Dirent.java b/src/java/ant/io/qt/tools/ant/Dirent.java index b881f11a..f15fd5bc 100644 --- a/src/java/ant/io/qt/tools/ant/Dirent.java +++ b/src/java/ant/io/qt/tools/ant/Dirent.java @@ -2,7 +2,7 @@ ** ** Copyright (C) 2011 Darryl L. Miles. All rights reserved. ** Copyright (C) 2011 D L Miles Consulting Ltd. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/ant/io/qt/tools/ant/Exec.java b/src/java/ant/io/qt/tools/ant/Exec.java index e4a24ac5..1e482c56 100644 --- a/src/java/ant/io/qt/tools/ant/Exec.java +++ b/src/java/ant/io/qt/tools/ant/Exec.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -135,7 +135,7 @@ private static String prependEnvironmentWithPathSeparator(Map en private static void setupEnvironment(Map env, PropertyHelper props, String path, String ldpath) { String s; - if(OSInfo.os()==OSInfo.OS.Linux) { + if(OSInfo.os().isUnixLike()) { if(ldpath != null) { prependEnvironmentWithPathSeparator(env, K_LD_LIBRARY_PATH, ldpath); } else { @@ -143,7 +143,7 @@ private static void setupEnvironment(Map env, PropertyHelper pro if(s != null) prependEnvironmentWithPathSeparator(env, K_LD_LIBRARY_PATH, s); } - }else if(OSInfo.os()==OSInfo.OS.MacOS) { + }else if(OSInfo.os()==OSInfo.OperationSystem.MacOS) { if(ldpath != null) { prependEnvironmentWithPathSeparator(env, K_DYLD_LIBRARY_PATH, ldpath); prependEnvironmentWithPathSeparator(env, K_DYLD_FRAMEWORK_PATH, ldpath); diff --git a/src/java/ant/io/qt/tools/ant/FileDirent.java b/src/java/ant/io/qt/tools/ant/FileDirent.java index 23b4fb47..a3dfa352 100644 --- a/src/java/ant/io/qt/tools/ant/FileDirent.java +++ b/src/java/ant/io/qt/tools/ant/FileDirent.java @@ -2,7 +2,7 @@ ** ** Copyright (C) 2011 Darryl L. Miles. All rights reserved. ** Copyright (C) 2011 D L Miles Consulting Ltd. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/ant/io/qt/tools/ant/FindCompiler.java b/src/java/ant/io/qt/tools/ant/FindCompiler.java index b9a8e6c2..f96a8915 100644 --- a/src/java/ant/io/qt/tools/ant/FindCompiler.java +++ b/src/java/ant/io/qt/tools/ant/FindCompiler.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -203,19 +203,34 @@ else if(compiler == Compiler.MSVC2017_x64) * check if trying to mix 32 bit vm with 64 bit compiler and other way around */ void checkCompilerBits() { - if(OSInfo.os() == OSInfo.OS.Windows) { - boolean vmx64 = OSInfo.osArchName().equals(OSInfo.K_WIN_X64); - boolean compiler64 = compiler == Compiler.MSVC2005_x64 || compiler == Compiler.MSVC2008_x64 || compiler == Compiler.MSVC2010_x64 || compiler == Compiler.MSVC2012_x64 || compiler == Compiler.MSVC2013_x64 || compiler == Compiler.MSVC2015_x64 || compiler == Compiler.MSVC2017_x64; - if(vmx64 != compiler64) { - // This is allowed and is not an outright build failure, but warn the user. - if(vmx64) - System.err.println("WARNING: You are not building for 64-bit on a 64-bit operating system with MSVC compiler..."); - else - System.err.println("WARNING: You are not building for 32-bit on a 32-bit operating system with MSVC compiler..."); - if(compilerDetectionLine != null) - System.err.println(" decideCompiler(): " + compilerDetectionLine); - } - } + if(OSInfo.crossOS()==null) { + if(OSInfo.os() == OSInfo.OperationSystem.Windows) { + switch(OSInfo.arch()) { + case x86: + if(compiler!=null && compiler.name.endsWith("64")) { + System.err.println("WARNING: You are not building for x86 with "+compiler+" compiler..."); + if(compilerDetectionLine != null) + System.err.println(" decideCompiler(): " + compilerDetectionLine); + } + break; + case x86_64: + if(compiler!=null && !compiler.name.endsWith("x64")) { + System.err.println("WARNING: You are not building for x86_64 with "+compiler+" compiler..."); + if(compilerDetectionLine != null) + System.err.println(" decideCompiler(): " + compilerDetectionLine); + } + break; + case arm64: + if(compiler!=null && !compiler.name.endsWith("arm64")) { + System.err.println("WARNING: You are not building for arm64 with "+compiler+" compiler..."); + if(compilerDetectionLine != null) + System.err.println(" decideCompiler(): " + compilerDetectionLine); + } + break; + default: break; + } + } + } } private void checkWindowsCompilers(boolean isTools) { @@ -284,6 +299,11 @@ Compiler decideCompiler() { compiler = testForCLANG(); break; default: + if(OSInfo.crossOS().isUnixLike()) { + compiler = testForCLANG(); + if(compiler==null) + compiler = testForGCC(); + } break; } @@ -308,6 +328,11 @@ Compiler decideCompiler() { compiler = testForCLANG(); break; default: + if(OSInfo.crossOS().isUnixLike()) { + compiler = testForCLANG(); + if(compiler==null) + compiler = testForGCC(); + } break; } }catch(BuildException e) { @@ -338,7 +363,7 @@ private Compiler testForGCC() { try { List cmdAndArgs = new ArrayList(); String cmd = "gcc"; - if(OSInfo.os()==OSInfo.OS.Windows) + if(OSInfo.os()==OSInfo.OperationSystem.Windows) cmd += ".exe"; if(compilerPathValue!=null) cmd = compilerPathValue+File.separator+cmd; diff --git a/src/java/ant/io/qt/tools/ant/ForeachVersionTask.java b/src/java/ant/io/qt/tools/ant/ForeachVersionTask.java index d87863bd..e633344e 100644 --- a/src/java/ant/io/qt/tools/ant/ForeachVersionTask.java +++ b/src/java/ant/io/qt/tools/ant/ForeachVersionTask.java @@ -1,5 +1,7 @@ package io.qt.tools.ant; +import java.io.File; +import java.nio.file.Files; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -82,12 +84,12 @@ public void execute() throws BuildException { if(base==null) { takeDefaultQt = "default".equals(dirs); if (!takeDefaultQt) { - if(OSInfo.os()==OSInfo.OS.Windows) { + if(OSInfo.os()==OSInfo.OperationSystem.Windows) { base = "C:\\Qt"; if(base==null || !new java.io.File(base).isDirectory()) { base = null; } - }else if(OSInfo.os()==OSInfo.OS.MacOS) { + }else if(OSInfo.os()==OSInfo.OperationSystem.MacOS) { base = "/Library/Qt"; if(base==null || !new java.io.File(base).isDirectory()) { base = "/System/Qt"; @@ -98,7 +100,7 @@ public void execute() throws BuildException { if(base==null || !new java.io.File(base).isDirectory()) { base = null; } - }else if(OSInfo.os()==OSInfo.OS.Linux) { + }else if(OSInfo.os().isUnixLike()) { base = "/opt/Qt"; if(base==null || !new java.io.File(base).isDirectory()) { base = null; @@ -122,36 +124,80 @@ public void execute() throws BuildException { List qmakes = new ArrayList<>(); java.io.File qmake; switch(OSInfo.os()) { - case MacOS: - case Linux: - qmake = Util.LOCATE_EXEC("qmake", "/usr/bin", ""); - if(qmake.exists()) - qmakes.add(qmake); - qmake = Util.LOCATE_EXEC("qmake5", "/usr/bin", ""); - if(qmake.exists()) - qmakes.add(qmake); - qmake = Util.LOCATE_EXEC("qmake-qt5", "/usr/bin", ""); - if(qmake.exists()) - qmakes.add(qmake); - qmake = Util.LOCATE_EXEC("qmake6", "/usr/bin", ""); - if(qmake.exists()) - qmakes.add(qmake); - qmake = Util.LOCATE_EXEC("qmake-qt6", "/usr/bin", ""); - if(qmake.exists()) - qmakes.add(qmake); - break; case Windows: - qmake = Util.LOCATE_EXEC("qmake.exe", "", ""); - if(qmake.exists()) { + qmake = Util.TRY_LOCATE_EXEC("qmake.exe", "", ""); + if(qmake!=null && qmake.exists()) { qmakes.add(qmake); }else { - qmake = Util.LOCATE_EXEC("qmake.bat", "", ""); - if(qmake.exists()) + qmake = Util.TRY_LOCATE_EXEC("qmake.bat", "", ""); + if(qmake!=null && qmake.exists()) qmakes.add(qmake); } break; - default: + default: + if(!OSInfo.os().isUnixLike()) { break; + } + case MacOS: + List paths = new ArrayList<>(Arrays.asList(System.getProperty("java.library.path", "").split("\\"+File.pathSeparator))); + paths.add(0, "/usr/pkg"); + paths.add(0, "/usr/local/bin"); + paths.add(0, "/usr/bin"); + String _paths = String.join(File.pathSeparator, paths); + qmake = Util.TRY_LOCATE_EXEC("qt5/bin/qmake5", _paths, ""); + if(qmake!=null && qmake.exists()) { + qmakes.add(qmake); + }else { + qmake = Util.TRY_LOCATE_EXEC("qt5/bin/qmake-qt5", _paths, ""); + if(qmake!=null && qmake.exists()) { + qmakes.add(qmake); + }else { + qmake = Util.TRY_LOCATE_EXEC("qt5/bin/qmake", _paths, ""); + if(qmake!=null && qmake.exists()) { + qmakes.add(qmake); + }else { + qmake = Util.TRY_LOCATE_EXEC("qmake5", _paths, ""); + if(qmake!=null && qmake.exists()) { + qmakes.add(qmake); + }else { + qmake = Util.TRY_LOCATE_EXEC("qmake-qt5", _paths, ""); + if(qmake!=null && qmake.exists()) { + qmakes.add(qmake); + } + } + } + } + } + qmake = Util.TRY_LOCATE_EXEC("qt6/bin/qmake6", _paths, ""); + if(qmake!=null && qmake.exists()) { + qmakes.add(qmake); + }else { + qmake = Util.TRY_LOCATE_EXEC("qt6/bin/qmake-qt6", _paths, ""); + if(qmake!=null && qmake.exists()) { + qmakes.add(qmake); + }else { + qmake = Util.TRY_LOCATE_EXEC("qt6/bin/qmake", _paths, ""); + if(qmake!=null && qmake.exists()) { + qmakes.add(qmake); + }else { + qmake = Util.TRY_LOCATE_EXEC("qmake-qt6", _paths, ""); + if(qmake!=null && qmake.exists()) { + qmakes.add(qmake); + }else { + qmake = Util.TRY_LOCATE_EXEC("qmake6", _paths, ""); + if(qmake!=null && qmake.exists()) { + qmakes.add(qmake); + } + } + } + } + } + if(qmakes.isEmpty()) { + qmake = Util.TRY_LOCATE_EXEC("qmake", "/usr/bin", ""); + if(qmake!=null && qmake.exists()) + qmakes.add(qmake); + } + break; } if(qmakes.isEmpty()) { // to cause an error... @@ -170,20 +216,48 @@ public void execute() throws BuildException { Properties lastProperties = null; Properties versionProperties = (Properties)targetProperties.clone(); Set> queries = new HashSet<>(); + + String versions = AntUtil.getPropertyAsString(propertyHelper, "qtjambi.qtversions"); + if(versions==null) + versions = AntUtil.getPropertyAsString(propertyHelper, "qt"); + if(versions==null) + versions = AntUtil.getPropertyAsString(propertyHelper, "QTVERSION"); + if(versions==null) + versions = AntUtil.getPropertyAsString(propertyHelper, "QTVERSIONS"); + if(versions==null) + versions = System.getenv("QTVERSION"); + if(versions==null) + versions = System.getenv("QTVERSIONS"); + for (java.io.File file : qmakes) { - Map query = QMakeTask.query(this, file.getAbsolutePath()); + String absolutePath; + try { + java.nio.file.Path path = file.toPath(); + if(Files.isSymbolicLink(path)) { + path = path.toRealPath(); + } + absolutePath = path.toFile().getAbsolutePath(); + } catch (Throwable e) { + absolutePath = file.getAbsolutePath(); + } + Map query = QMakeTask.query(this, absolutePath); if(queries.contains(query)) continue; queries.add(query); Properties specProperties = (Properties)versionProperties.clone(); - specProperties.setProperty("qmake", file.getAbsolutePath()); + specProperties.setProperty("qmake", absolutePath); if(containsTestReport) specProperties.setProperty("skip.report", "true"); InitializeBuildTask.setTargetProperties(specProperties); for(String target : targets) { if(!target.equals("tests.report")) { AntUtil.setProperty(propertyHelper, "proxy.target", target); - getProject().executeTarget("targetproxy"); + if(versions!=null) { + AntUtil.setProperty(propertyHelper, "targetversions", versions); + } + try { + getProject().executeTarget("targetproxy"); + }catch(InitializeBuildTask.VersionSkip s) {} } } InitializeBuildTask.setTargetProperties(null); @@ -306,9 +380,6 @@ public void execute() throws BuildException { case IOS: qtDirs.add(new java.io.File(versionDir, "ios")); break; - case Linux: - qtDirs.add(new java.io.File(versionDir, "gcc_64")); - break; case MacOS: if(!"only".equalsIgnoreCase(AntUtil.getPropertyAsString(propertyHelper, "ios"))) { if(iVersion[0]<6) { @@ -337,6 +408,9 @@ public void execute() throws BuildException { } break; default: + if(OSInfo.crossOS().isUnixLike()){ + qtDirs.add(new java.io.File(versionDir, "gcc_64")); + } break; } } diff --git a/src/java/ant/io/qt/tools/ant/GeneratorTask.java b/src/java/ant/io/qt/tools/ant/GeneratorTask.java index 51080cef..d6c2a98f 100644 --- a/src/java/ant/io/qt/tools/ant/GeneratorTask.java +++ b/src/java/ant/io/qt/tools/ant/GeneratorTask.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -86,7 +86,7 @@ private String generatorExecutable() { File fileExe = new File(generatorExe); if(fileExe.isFile() /*&& fileExe.isExecutable()*/) return fileExe.getAbsolutePath(); - if(OSInfo.os() == OSInfo.OS.Windows) { + if(OSInfo.os() == OSInfo.OperationSystem.Windows) { fileExe = new File(generatorExe + ".exe"); if(fileExe.isFile() /*&& fileExe.isExecutable()*/) return fileExe.getAbsolutePath(); diff --git a/src/java/ant/io/qt/tools/ant/InitializeBuildTask.java b/src/java/ant/io/qt/tools/ant/InitializeBuildTask.java index d2adc5b5..69c5a51e 100644 --- a/src/java/ant/io/qt/tools/ant/InitializeBuildTask.java +++ b/src/java/ant/io/qt/tools/ant/InitializeBuildTask.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -45,7 +45,6 @@ import java.util.Collection; import java.util.Collections; import java.util.Date; -import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -62,7 +61,6 @@ import org.apache.tools.ant.PropertyHelper; import io.qt.tools.ant.FindCompiler.Compiler; -import io.qt.tools.ant.OSInfo.OS; public class InitializeBuildTask extends AbstractInitializeTask { @@ -74,6 +72,7 @@ public class InitializeBuildTask extends AbstractInitializeTask { private int qtMinorVersion; private int qtPatchlevelVersion; private int qtJambiVersion; + private int qtJambiReleaseVersion; private boolean useQtFramework; private String qtVersionSource = ""; private String versionSuffix; // beta4 @@ -359,9 +358,27 @@ public void executeInitialize() throws BuildException { Map qmakeQuery; if(qtQmake!=null && !qtQmake.isEmpty()) { sourceValue = " (from property:qmake)"; - mySetProperty(-1, Constants.QMAKE, sourceValue, new File(qtQmake).getName(), true); - mySetProperty(-1, Constants.QMAKE_ABSPATH, sourceValue, new File(qtQmake).getAbsolutePath(), true); qmakeQuery = QMakeTask.query(this, qtQmake); + if(new File(qtQmake).isAbsolute() || new File(qtQmake).exists()) { + mySetProperty(-1, Constants.QMAKE, sourceValue, new File(qtQmake).getName(), true); + mySetProperty(-1, Constants.QMAKE_ABSPATH, sourceValue, new File(qtQmake).getAbsolutePath(), true); + }else{ + String binDir = qmakeQuery.get("QT_INSTALL_BINS"); + File qmakeFile = new File(binDir, QMakeTask.executableName()); + if(qmakeFile.exists()) { + mySetProperty(-1, Constants.QMAKE, sourceValue, qmakeFile.getName(), true); + mySetProperty(-1, Constants.QMAKE_ABSPATH, sourceValue, qtQmake = qmakeFile.getAbsolutePath(), true); + }else { + qmakeFile = Util.TRY_LOCATE_EXEC(qtQmake, "", ""); + if(qmakeFile.exists()) { + mySetProperty(-1, Constants.QMAKE, sourceValue, qmakeFile.getName(), true); + mySetProperty(-1, Constants.QMAKE_ABSPATH, sourceValue, qtQmake = qmakeFile.getAbsolutePath(), true); + }else { + mySetProperty(-1, Constants.QMAKE, sourceValue, qtQmake, true); + mySetProperty(-1, Constants.QMAKE_ABSPATH, sourceValue, qtQmake, true); + } + } + } }else { String QTDIR = AntUtil.getPropertyAsString(propertyHelper, "QTDIR"); // used here if (QTDIR == null || QTDIR.isEmpty()) { @@ -437,9 +454,18 @@ public void executeInitialize() throws BuildException { inStream = new FileInputStream("releases.properties"); Properties releases = new Properties(); releases.load(inStream); - String value = releases.getProperty(qtVersionShort, "0"); try { - qtJambiVersion = Integer.parseInt(value); + String value = releases.getProperty("current", "0"); + qtJambiReleaseVersion = Integer.parseInt(value); + } catch (NumberFormatException e) { + qtJambiReleaseVersion = 0; + } + try { + String value = releases.getProperty(String.format("%1$s.%2$s.0", qtMajorVersion, qtMinorVersion), ""); + if(value!=null && !value.isEmpty()) + qtJambiVersion = qtJambiReleaseVersion - Integer.parseInt(value); + else + qtJambiVersion = 0; } catch (NumberFormatException e) { qtJambiVersion = 0; } @@ -460,30 +486,78 @@ public void executeInitialize() throws BuildException { mySetProperty(-1, "qtjambi.patchversion", sourceValue, "" + qtJambiVersion, true); // report value String qtjambiFullVersion = qtVersionShort + "." + qtJambiVersion; mySetProperty(-1, "qtjambi.jar.version", sourceValue, qtjambiFullVersion, true); // report - // value - String detectedOsname = OSInfo.crossOSArchName(); + + if(compiler!=null && compiler.name().startsWith("MSVC")) { + if(compiler.name().endsWith("_arm64")) { + if(OSInfo.arch()!=OSInfo.Architecture.arm64) { + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Windows, OSInfo.Architecture.arm64); + }else { + qmakeQuery = new TreeMap<>(qmakeQuery); + qmakeQuery.put("QMAKE_SPEC", qmakeQuery.get("QMAKE_XSPEC")); + qmakeQuery.put("QT_HOST_BINS", qmakeQuery.get("QT_INSTALL_BINS")); + qmakeQuery.put("QT_HOST_LIBS", qmakeQuery.get("QT_INSTALL_LIBS")); + qmakeQuery.put("QT_HOST_LIBEXECS", qmakeQuery.get("QT_INSTALL_LIBEXECS")); + qmakeQuery.put("QT_HOST_PREFIX", qmakeQuery.get("QT_INSTALL_PREFIX")); + qmakeQuery = Collections.unmodifiableMap(qmakeQuery); + } + }else if(compiler.name().endsWith("_x64")) { + if(OSInfo.arch()!=OSInfo.Architecture.x86_64) + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Windows, OSInfo.Architecture.x86_64); + } + } + if (!decideQMAKE_XSPEC(qmakeQuery)) + throw new BuildException("Unable to determine QMAKE_XSPEC"); + for(Map.Entry entry : qtContents.entrySet()) { + String value = AntUtil.getPropertyAsString(propertyHelper, entry.getKey()); + if(value==null || value.isEmpty()) { + value = qmakeQuery.get(entry.getValue().query); + switch(entry.getKey()) { + case Constants.RESOURCESDIR: + value += "/" + entry.getValue().dir; + break; + } + mySetProperty(-1, entry.getKey(), sourceValue, value, true); + } + } + String targetversions = AntUtil.getPropertyAsString(propertyHelper, "targetversions"); + if(targetversions!=null && !targetversions.isEmpty()) { + List versions = new ArrayList<>(Arrays.asList(targetversions.split("[\\,\\:\\;\\ \\+]"))); + String shortVersion = qtMajorVersion + "." + qtMinorVersion; + boolean found = false; + for(String version : versions) { + if(version.contains(".")) { + if(version.equals(shortVersion)) { + found = true; + break; + } + }else { + if(version.equals(""+qtMajorVersion)) { + found = true; + break; + } + } + } + if(!found) + throw new VersionSkip(); + } + // value String osname = AntUtil.getPropertyAsString(propertyHelper, Constants.OSNAME); if (osname == null || osname.isEmpty()) { sourceValue = " (auto-detected)"; - osname = detectedOsname; - if("android".equals(detectedOsname)) { + if(OSInfo.crossOS()==OSInfo.OperationSystem.Android && OSInfo.crossArch()==null) { if(androidAbis.size()==1) { switch(androidAbis.get(0)) { case "arm64-v8a": - osname += "-arm64"; - OSInfo.setCrossOSArchName(osname); + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Android, OSInfo.Architecture.arm64); break; case "armeabi-v7a": - osname += "-arm"; - OSInfo.setCrossOSArchName(osname); + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Android, OSInfo.Architecture.arm); break; case "x86": - osname += "-x86"; - OSInfo.setCrossOSArchName(osname); + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Android, OSInfo.Architecture.x86); break; case "x86_64": - osname += "-x64"; - OSInfo.setCrossOSArchName(osname); + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Android, OSInfo.Architecture.x86_64); break; } }else { @@ -492,62 +566,35 @@ public void executeInitialize() throws BuildException { String androidSpec = new File(QTDIR).getName(); switch(androidSpec) { case "android_arm64_v8a": - osname += "-arm64"; - OSInfo.setCrossOSArchName(osname); + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Android, OSInfo.Architecture.arm64); break; case "android_armv7": - osname += "-arm"; - OSInfo.setCrossOSArchName(osname); + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Android, OSInfo.Architecture.arm); break; case "android_x86": - osname += "-x86"; - OSInfo.setCrossOSArchName(osname); + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Android, OSInfo.Architecture.x86); break; case "android_x86_64": - osname += "-x64"; - OSInfo.setCrossOSArchName(osname); + OSInfo.setCrossCompilation(OSInfo.OperationSystem.Android, OSInfo.Architecture.x86_64); break; } }else { - OSInfo.setCrossOSArchName(null); + OSInfo.setCrossCompilation(null, null); } } }else { - OSInfo.setCrossOSArchName(null); + OSInfo.setCrossCompilation(null, null); } + osname = OSInfo.targetPlatform(); } else { if ("help".equals(osname) || "?".equals(osname)) { - OSInfo.OS[] values = OSInfo.OS.values(); + OSInfo.OperationSystem[] values = OSInfo.OperationSystem.values(); s = Arrays.toString(values); throw new BuildException(Constants.OSNAME + " valid values: " + s); } - sourceValue = " (detected: " + detectedOsname + ")"; + sourceValue = " (predefined " + Constants.OSNAME + ")"; } mySetProperty(-1, Constants.OSNAME, sourceValue, osname, true); // report value - - if(compiler!=null && compiler.name().endsWith("_arm64")) { - qmakeQuery = new TreeMap<>(qmakeQuery); - qmakeQuery.put("QMAKE_SPEC", qmakeQuery.get("QMAKE_XSPEC")); - qmakeQuery.put("QT_HOST_BINS", qmakeQuery.get("QT_INSTALL_BINS")); - qmakeQuery.put("QT_HOST_LIBS", qmakeQuery.get("QT_INSTALL_LIBS")); - qmakeQuery.put("QT_HOST_LIBEXECS", qmakeQuery.get("QT_INSTALL_LIBEXECS")); - qmakeQuery.put("QT_HOST_PREFIX", qmakeQuery.get("QT_INSTALL_PREFIX")); - qmakeQuery = Collections.unmodifiableMap(qmakeQuery); - } - if (!decideQMAKE_XSPEC(qmakeQuery)) - throw new BuildException("Unable to determine QMAKE_XSPEC"); - for(Map.Entry entry : qtContents.entrySet()) { - String value = AntUtil.getPropertyAsString(propertyHelper, entry.getKey()); - if(value==null || value.isEmpty()) { - value = qmakeQuery.get(entry.getValue().query); - switch(entry.getKey()) { - case Constants.RESOURCESDIR: - value += "/resources"; - break; - } - mySetProperty(-1, entry.getKey(), sourceValue, value, true); - } - } String vsredistdirValue = AntUtil.getPropertyAsString(propertyHelper, Constants.VSREDISTDIR); if (vsredistdirValue != null && !vsredistdirValue.isEmpty()) { @@ -573,37 +620,28 @@ public void executeInitialize() throws BuildException { getProject().log(this, "CROSS_COMPILE is set: " + prettyValue(CROSS_COMPILE), Project.MSG_INFO); s = null; - switch (OSInfo.os()) { - case Linux: - s = OSInfo.K_LINUX; - break; - case Windows: - s = OSInfo.K_WINDOWS; - break; - case Android: - s = OSInfo.K_ANDROID; + switch (OSInfo.crossOS()) { + case Unknown: break; case MacOS: - s = OSInfo.K_MACOS; - mySetProperty(0, Constants.QTJAMBI_CONFIG_ISMACOSX, " (set by init)", "true", true); if (qtMajorVersion >= 6 && qtMinorVersion >= 2 && AntUtil.getProperty(propertyHelper, "qtjambi.pluginloader.build.from.source") == null) { AntUtil.setProperty(propertyHelper, "qtjambi.pluginloader.build.from.source", "true"); } - break; default: + s = OSInfo.crossOS().name().toLowerCase(); break; } if (s != null) AntUtil.setProperty(propertyHelper, Constants.OSPLATFORM, s); + if(OSInfo.crossOS().isUnixLike()) + AntUtil.setProperty(propertyHelper, "qtjambi.osplatform.islinuxorunix", "true"); s = null; { Properties props = System.getProperties(); - Enumeration e = props.propertyNames(); - while (e.hasMoreElements()) { - String k = (String) e.nextElement(); + for(String k : props.stringPropertyNames()) { Object v = System.getProperty(k); getProject().log("systemProperty[" + k + "] = " + v, Project.MSG_VERBOSE); } @@ -633,7 +671,7 @@ public void executeInitialize() throws BuildException { String javaOsarchTarget = decideJavaOsarchTarget(); if (javaOsarchTarget == null) { - if (OSInfo.os() != OSInfo.OS.MacOS) // On MacOSX there is no sub-dir inside the JDK include directory that + if (OSInfo.os() != OSInfo.OperationSystem.MacOS) // On MacOSX there is no sub-dir inside the JDK include directory that // contains jni.h throw new BuildException( "Unable to determine JAVA_OSARCH_TARGET, setup environment variable JAVA_OSARCH_TARGET or edit build.properties"); @@ -745,7 +783,7 @@ public void executeInitialize() throws BuildException { if(pm!=null) privateModules.addAll(Arrays.asList(pm.split(","))); } - if (OSInfo.os() == OSInfo.OS.MacOS) { + if (OSInfo.os() == OSInfo.OperationSystem.MacOS) { String wantedSdk = AntUtil.getPropertyAsString(propertyHelper, Constants.QTJAMBI_MACOSX_MAC_SDK); detectMacosxSdk(wantedSdk); String generatorIncludepaths = AntUtil.getPropertyAsString(propertyHelper, Constants.MAC_OS_GENERATE_FRAMEWORKS); @@ -753,10 +791,56 @@ public void executeInitialize() throws BuildException { AntUtil.setProperty(propertyHelper, Constants.MAC_OS_GENERATE_FRAMEWORKS, "true"); } } + if (qtMajorVersion >= 5) { + AntUtil.setProperty(propertyHelper, "qt.feature.QT_NO_STYLE_PLASTIQUE", "true"); + } + + s = String.valueOf(qtVersion); + getProject().log(this, Constants.QT_VERSION + " is " + s + qtVersionSource, Project.MSG_VERBOSE); + AntUtil.setProperty(propertyHelper, Constants.QT_VERSION, s); + AntUtil.setProperty(propertyHelper, Constants.VERSION, s); // this won't overwrite existing value + { + String docs = AntUtil.getPropertyAsString(propertyHelper, Constants.DOCSDIR); + if(docs==null) { + String QTDIR = AntUtil.getPropertyAsString(propertyHelper, "qtjambi.qtdir"); + File tryPath = new File(new File(new File(QTDIR).getParentFile().getParentFile(), "Docs"), "Qt-" + s); + if(tryPath.isDirectory()) + mySetProperty(-1, Constants.DOCSDIR, " (auto-detected)", tryPath.getAbsolutePath(), true); + } + } + + s = String.valueOf(qtMajorVersion); + getProject().log(this, Constants.QT_VERSION_MAJOR + " is " + s, Project.MSG_VERBOSE); + AntUtil.setProperty(propertyHelper, Constants.QT_VERSION_MAJOR, s); + AntUtil.setProperty(propertyHelper, Constants.QT_VERSION_MAJOR_NEXT, String.valueOf(qtMajorVersion + 1)); + AntUtil.setProperty(propertyHelper, Constants.QT_VERSION_MINOR, String.valueOf(qtMinorVersion)); + AntUtil.setProperty(propertyHelper, Constants.QT_VERSION_MINOR_NEXT, String.valueOf(qtMinorVersion + 1)); + AntUtil.setProperty(propertyHelper, Constants.QT_VERSION_PATCHLEVEL, String.valueOf(qtPatchlevelVersion)); + decideAlternativeJavaHomesTarget(); + + versionSuffix = AntUtil.getPropertyAsString(propertyHelper, Constants.SUFFIX_VERSION); + mySetProperty(-1, Constants.SUFFIX_VERSION, null, null, true); // report + + String canonVersionSuffix; + if (versionSuffix != null) + canonVersionSuffix = versionSuffix; + else + canonVersionSuffix = ""; + String bundleVersionMode = AntUtil.getPropertyAsString(propertyHelper, Constants.BUNDLE_VERSION_MODE); + if (bundleVersionMode != null) { + if (bundleVersionMode.equals("auto-suffix-date")) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + s = qtVersion + "." + sdf.format(new Date()) + canonVersionSuffix; + } + } else { + s = qtVersion + canonVersionSuffix; + } + mySetProperty(-1, Constants.BUNDLE_VERSION, null, s, true); + analyzeLibinfix(); { List includePaths = new ArrayList<>(); String generatorIncludepaths = AntUtil.getPropertyAsString(propertyHelper, Constants.GENERATOR_INCLUDEPATHS); - if (OSInfo.os() == OSInfo.OS.MacOS && useQtFramework) { + if (OSInfo.crossOS() == OSInfo.OperationSystem.MacOS && useQtFramework) { String libdir = AntUtil.getPropertyAsString(propertyHelper, Constants.LIBDIR); for (File frameworkDir : new File(libdir).listFiles()) { if (frameworkDir.isDirectory() && frameworkDir.getName().endsWith(".framework")) { @@ -803,52 +887,6 @@ public void executeInitialize() throws BuildException { Constants.GENERATOR_INCLUDEPATHS + ": " + String.join(File.pathSeparator, includePaths), Project.MSG_INFO); } - if (qtMajorVersion >= 5) { - AntUtil.setProperty(propertyHelper, "qt.feature.QT_NO_STYLE_PLASTIQUE", "true"); - } - - s = String.valueOf(qtVersion); - getProject().log(this, Constants.QT_VERSION + " is " + s + qtVersionSource, Project.MSG_VERBOSE); - AntUtil.setProperty(propertyHelper, Constants.QT_VERSION, s); - AntUtil.setProperty(propertyHelper, Constants.VERSION, s); // this won't overwrite existing value - { - String docs = AntUtil.getPropertyAsString(propertyHelper, Constants.DOCSDIR); - if(docs==null) { - String QTDIR = AntUtil.getPropertyAsString(propertyHelper, "qtjambi.qtdir"); - File tryPath = new File(new File(new File(QTDIR).getParentFile().getParentFile(), "Docs"), "Qt-" + s); - if(tryPath.isDirectory()) - mySetProperty(-1, Constants.DOCSDIR, " (auto-detected)", tryPath.getAbsolutePath(), true); - } - } - - s = String.valueOf(qtMajorVersion); - getProject().log(this, Constants.QT_VERSION_MAJOR + " is " + s, Project.MSG_VERBOSE); - AntUtil.setProperty(propertyHelper, Constants.QT_VERSION_MAJOR, s); - AntUtil.setProperty(propertyHelper, Constants.QT_VERSION_MAJOR_NEXT, String.valueOf(qtMajorVersion + 1)); - AntUtil.setProperty(propertyHelper, Constants.QT_VERSION_MINOR, String.valueOf(qtMinorVersion)); - AntUtil.setProperty(propertyHelper, Constants.QT_VERSION_MINOR_NEXT, String.valueOf(qtMinorVersion + 1)); - AntUtil.setProperty(propertyHelper, Constants.QT_VERSION_PATCHLEVEL, String.valueOf(qtPatchlevelVersion)); - decideAlternativeJavaHomesTarget(); - - versionSuffix = AntUtil.getPropertyAsString(propertyHelper, Constants.SUFFIX_VERSION); - mySetProperty(-1, Constants.SUFFIX_VERSION, null, null, true); // report - - String canonVersionSuffix; - if (versionSuffix != null) - canonVersionSuffix = versionSuffix; - else - canonVersionSuffix = ""; - String bundleVersionMode = AntUtil.getPropertyAsString(propertyHelper, Constants.BUNDLE_VERSION_MODE); - if (bundleVersionMode != null) { - if (bundleVersionMode.equals("auto-suffix-date")) { - SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); - s = qtVersion + "." + sdf.format(new Date()) + canonVersionSuffix; - } - } else { - s = qtVersion + canonVersionSuffix; - } - mySetProperty(-1, Constants.BUNDLE_VERSION, null, s, true); - analyzeLibinfix(); { // Need to detect the version of Qt we a reworking with before deciding // configuration @@ -943,7 +981,7 @@ else if (Constants.CONFIG_TEST.equals(getConfiguration())) sourceValue = null; s = null; // s = AntUtil.getPropertyAsString(propertyHelper, Constants.QTJAMBI_MACOSX_QTMENUNIB_DIR); - if (OSInfo.os() == OSInfo.OS.MacOS) { + if (OSInfo.os() == OSInfo.OperationSystem.MacOS) { s = doesQtLibExistDir(qtjambiQtLibdir, "Resources/qt_menu.nib"); if (s == null) s = doesQtLibExistDir(qtjambiQtLibdir, "qt_menu.nib"); @@ -958,7 +996,7 @@ else if (Constants.CONFIG_TEST.equals(getConfiguration())) sourceValue = " (auto-detected)"; } if (s == null) { - if (OSInfo.os() == OSInfo.OS.MacOS) + if (OSInfo.os() == OSInfo.OperationSystem.MacOS) sourceValue = " (WARNING you should resolve this for targetting MacOSX)"; else sourceValue = " (expected for non-MacOSX platform)"; @@ -1020,50 +1058,6 @@ else if (Constants.CONFIG_TEST.equals(getConfiguration())) } switch(OSInfo.os()) { - case Linux: { // Check we have libQtCore.so.4 in one of the paths in LD_LIBRARY_PATH - String LD_LIBRARY_PATH = System.getenv("LD_LIBRARY_PATH"); - getProject().log(this, - "LD_LIBRARY_PATH is set: " + ((LD_LIBRARY_PATH == null) ? "" : LD_LIBRARY_PATH), - Project.MSG_INFO); - if (LD_LIBRARY_PATH != null) { - String[] sA = LD_LIBRARY_PATH.split(File.pathSeparator); // should regex escape it - String filename = CreateNativeDeploymentTask.formatQtName("QtCore", libInfix, isConfigurationDebug(), qtMajorVersion, - qtMinorVersion, qtPatchlevelVersion); - int found = 0; - for (String element : sA) { - File testDir = new File(element); - if (testDir.isDirectory() == false) - getProject().log(this, " WARNING: LD_LIBRARY_PATH directory does not exit: " + element, - Project.MSG_INFO); - File testFile = new File(element, filename); - if (testFile.isFile()) { - getProject().log(this, - " FOUND: LD_LIBRARY_PATH directory contains QtCore: " + testFile.getAbsolutePath(), - Project.MSG_INFO); - found++; - } - } - - // FIXME: Refactor this duplicate code later (we look for !debug here but don't - // WARNING is we dont find it) - filename = CreateNativeDeploymentTask.formatQtName("QtCore", libInfix, !isConfigurationDebug(), qtMajorVersion, - qtMinorVersion, qtPatchlevelVersion); - found = 0; - for (String element : sA) { - File testDir = new File(element); - // we already warned about non-existing directory here - File testFile = new File(testDir, filename); - if (testFile.isFile()) { - getProject().log(this, - " XFOUND: LD_LIBRARY_PATH directory contains QtCore: " + testFile.getAbsolutePath(), - Project.MSG_INFO); - found++; - } - } - } else { // Maybe we should check to see if (QTDIR != null) before warning - } - } - break; case Windows: { // Check we have QtCore4.dll/Qt5Core.dll in one of the paths in PATH String PATH = System.getenv("PATH"); getProject().log(this, "PATH is set: " + ((PATH == null) ? "" : PATH), Project.MSG_INFO); @@ -1156,7 +1150,51 @@ else if (Constants.CONFIG_TEST.equals(getConfiguration())) } } break; - default: break; + default: + if(OSInfo.os().isUnixLike()) { + String LD_LIBRARY_PATH = System.getenv("LD_LIBRARY_PATH"); + getProject().log(this, + "LD_LIBRARY_PATH is set: " + ((LD_LIBRARY_PATH == null) ? "" : LD_LIBRARY_PATH), + Project.MSG_INFO); + if (LD_LIBRARY_PATH != null) { + String[] sA = LD_LIBRARY_PATH.split(File.pathSeparator); // should regex escape it + String filename = CreateNativeDeploymentTask.formatQtName("QtCore", libInfix, isConfigurationDebug(), qtMajorVersion, + qtMinorVersion, qtPatchlevelVersion); + int found = 0; + for (String element : sA) { + File testDir = new File(element); + if (testDir.isDirectory() == false) + getProject().log(this, " WARNING: LD_LIBRARY_PATH directory does not exit: " + element, + Project.MSG_INFO); + File testFile = new File(element, filename); + if (testFile.isFile()) { + getProject().log(this, + " FOUND: LD_LIBRARY_PATH directory contains QtCore: " + testFile.getAbsolutePath(), + Project.MSG_INFO); + found++; + } + } + + // FIXME: Refactor this duplicate code later (we look for !debug here but don't + // WARNING is we dont find it) + filename = CreateNativeDeploymentTask.formatQtName("QtCore", libInfix, !isConfigurationDebug(), qtMajorVersion, + qtMinorVersion, qtPatchlevelVersion); + found = 0; + for (String element : sA) { + File testDir = new File(element); + // we already warned about non-existing directory here + File testFile = new File(testDir, filename); + if (testFile.isFile()) { + getProject().log(this, + " XFOUND: LD_LIBRARY_PATH directory contains QtCore: " + testFile.getAbsolutePath(), + Project.MSG_INFO); + found++; + } + } + } else { // Maybe we should check to see if (QTDIR != null) before warning + } + } + break; } // Setup some properties to be silently set to an empty string for safe ANT @@ -1188,7 +1226,7 @@ else if (Constants.CONFIG_TEST.equals(getConfiguration())) mySetProperty(-1, "java.outsrcdir", null, new File(buildDir, "java-src").getAbsolutePath(), true); File platformBuildDir = new File(buildDir, osname); mySetProperty(-1, "qtjambi.builddir", null, new File(platformBuildDir, "qtjambi").getAbsolutePath(), true); - if(Objects.equals(OSInfo.osArchName(), OSInfo.crossOSArchName())) { + if(Objects.equals(OSInfo.os(), OSInfo.crossOS()) && Objects.equals(OSInfo.arch(), OSInfo.crossArch())) { mySetProperty(-1, "generator.builddir", null, new File(new File(platformBuildDir, "qtjambi"), "QtJambiGenerator").getAbsolutePath(), true); }else { mySetProperty(-1, "generator.builddir", null, new File(new File(platformBuildDir, "generator"), "QtJambiGenerator").getAbsolutePath(), true); @@ -1257,6 +1295,7 @@ public static String listJoinToString(Collection list, CharSequence delim) { } private String detectConfiguration(String wantedConfiguration) { + System.out.println("InitializeBuildTask.detectConfiguration("+wantedConfiguration+")"); String dsoName = "QtCore"; boolean isStatic = false; String dsoPath = doesQtLibExist(dsoName, libInfix, qtMajorVersion, qtMinorVersion, qtPatchlevelVersion, null, Boolean.FALSE, false); @@ -1273,6 +1312,8 @@ private String detectConfiguration(String wantedConfiguration) { dsoDebugPath = doesQtStaticLibExist(dsoName, libInfix, qtMajorVersion, qtMinorVersion, qtPatchlevelVersion, null, Boolean.TRUE, false); isStatic = dsoDebugPath != null; } + System.out.println("dsoPath="+dsoPath); + System.out.println("dsoDebugPath="+dsoDebugPath); String thisConfiguration = null; String sourceValue = null; if (wantedConfiguration != null) { @@ -1310,12 +1351,12 @@ private String detectConfiguration(String wantedConfiguration) { sourceValue = "detected"; break; } - }else if(dsoDebugPath!=null) { - thisConfiguration = Constants.CONFIG_DEBUG; - sourceValue = "detected"; }else if(dsoPath!=null) { thisConfiguration = Constants.CONFIG_RELEASE; sourceValue = "detected"; + }else if(dsoDebugPath!=null) { + thisConfiguration = Constants.CONFIG_DEBUG; + sourceValue = "detected"; } else { thisConfiguration = Constants.CONFIG_DEBUG_AND_RELEASE; // this is the configuration of last resort sourceValue = "default"; @@ -1335,7 +1376,7 @@ private String detectConfiguration(String wantedConfiguration) { // wantedSdk maybe "MacOSX10.5.sdk" or "/Developer/SDKs/MacOSX10.5.sdk" private String detectMacosxSdk(String wantedSdk) { - if (OSInfo.os() == OSInfo.OS.MacOS == false || qtMajorVersion >= 5) + if (OSInfo.os() == OSInfo.OperationSystem.MacOS == false || qtMajorVersion >= 5) return null; // QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.5.sdk @@ -1643,14 +1684,14 @@ && new File(new File(qtdir), case Private: File privateHeaders = new File(includePath + "/" + info.libraryName + "/" + version + "/" + info.libraryName + "/private"); if((!privateHeaders.exists() || !privateHeaders.isDirectory()) - && OSInfo.crossOS()==OSInfo.OS.MacOS && useQtFramework) { + && OSInfo.crossOS()==OSInfo.OperationSystem.MacOS && useQtFramework) { if(qtMajorVersion==5) privateHeaders = new File(libPath, info.libraryName+".framework/Versions/5/Headers/" + version + "/" + info.libraryName + "/private"); else privateHeaders = new File(libPath, info.libraryName+".framework/Versions/A/Headers/" + version + "/" + info.libraryName + "/private"); } if(!privateHeaders.exists() || !privateHeaders.isDirectory()) { - if(OSInfo.crossOS()==OSInfo.OS.Linux) { + if(OSInfo.crossOS().isUnixLike()) { File dir = new File(includePath, info.libraryName); if(dir.isDirectory()) { String versionX = String.format("%1$s.%2$s.", qtMajorVersion, qtMinorVersion); @@ -1687,6 +1728,7 @@ && new File(new File(qtdir), } getProject().log(this, "qtjambi." + module + ": private headers missing. Expecting: "+privateHeaders.getAbsolutePath(), Project.MSG_WARN); }else { + AntUtil.setProperty(propertyHelper, module + ".privateheaders.true", "true"); if(info.preprocdef!=null) { if(!modules.contains(qtjambiLibName+"-private")) modules.add(qtjambiLibName+"-private"); @@ -1874,7 +1916,7 @@ && new File(new File(qtdir), if(!opengldir.isDirectory()) { File originalIncludeDir = new File(includePath, "QtOpenGL"); if((!originalIncludeDir.exists() || !originalIncludeDir.isDirectory()) - && OSInfo.crossOS()==OSInfo.OS.MacOS && useQtFramework) { + && OSInfo.crossOS()==OSInfo.OperationSystem.MacOS && useQtFramework) { originalIncludeDir = new File(libPath, "QtOpenGL.framework/Versions/A/Headers"); } File moduleDir = new File(new File(qtsources), "qtbase" + File.separator + "src" + File.separator + "opengl"); @@ -1895,7 +1937,7 @@ && new File(new File(qtdir), if(!coredir.isDirectory()) { File originalIncludeDir = new File(includePath, "QtCore"); if((!originalIncludeDir.exists() || !originalIncludeDir.isDirectory()) - && OSInfo.crossOS()==OSInfo.OS.MacOS && useQtFramework) { + && OSInfo.crossOS()==OSInfo.OperationSystem.MacOS && useQtFramework) { originalIncludeDir = new File(libPath, "QtCore.framework/Versions/A/Headers"); } File moduleDir = new File(new File(qtsources), "qtbase" + File.separator + "src" + File.separator + "corelib" + File.separator + "kernel"); @@ -1915,7 +1957,7 @@ && new File(new File(qtdir), if(!guidir.isDirectory()) { File originalIncludeDir = new File(includePath, "QtGui"); if((!originalIncludeDir.exists() || !originalIncludeDir.isDirectory()) - && OSInfo.crossOS()==OSInfo.OS.MacOS && useQtFramework) { + && OSInfo.crossOS()==OSInfo.OperationSystem.MacOS && useQtFramework) { originalIncludeDir = new File(libPath, "QtGui.framework/Versions/A/Headers"); } File moduleDir = new File(new File(qtsources), "qtbase" + File.separator + "src" + File.separator + "gui" + File.separator + "platform" + File.separator + "darwin"); @@ -1977,7 +2019,7 @@ private String doesQtLibExistDir(String librarydir, String name) { private String doesQtDsoExist(String name, String infix, int majorVersion, int minorVersion, int patchVersion, String librarydir, Boolean debugValue, boolean prl, boolean staticLib, String propName) { - if ((infix == null || infix.isEmpty()) && OSInfo.crossOSArchName().equalsIgnoreCase("android") && !androidAbis.isEmpty()) { + if ((infix == null || infix.isEmpty()) && OSInfo.crossOS()==OSInfo.OperationSystem.Android && OSInfo.crossArch()==null && !androidAbis.isEmpty()) { infix = "_" + androidAbis.get(0); } String path = null; @@ -2018,14 +2060,14 @@ private String doesQtDsoExist(String name, String infix, int majorVersion, int m } catch (IOException e) { return testForFile.getAbsolutePath(); } - }else if(OSInfo.crossOS()==OS.Linux && !staticLib){ + }else if(OSInfo.crossOS().isUnixLike() && !staticLib){ filename = CreateNativeDeploymentTask.formatQtName(name, infix, thisDebug, majorVersion, minorVersion, -1, staticLib); testForFile = new File(new File(path), filename); if(testForFile.exists()) { if(Files.isSymbolicLink(testForFile.toPath())) { try { - testForFile = Files.readSymbolicLink(testForFile.toPath()).toFile(); + testForFile = testForFile.toPath().toRealPath().toFile(); } catch (Exception e) { } } @@ -2245,7 +2287,7 @@ private String decideQtLibDso(String attrName, String name, String infix, int[][ private void analyzeLibinfix() { if (qtMajorVersion > 4) { File libraryPath; - if (OSInfo.crossOS() == OSInfo.OS.Windows) { + if (OSInfo.crossOS() == OSInfo.OperationSystem.Windows) { libraryPath = new File(AntUtil.getPropertyAsString(propertyHelper, Constants.BINDIR)); } else { libraryPath = new File(AntUtil.getPropertyAsString(propertyHelper, Constants.LIBDIR)); @@ -2272,11 +2314,14 @@ private void analyzeLibinfix() { libSuffixes = new String[] { ".a" }; libName = "lib" + libName; break; - case Linux: case Unknown: default: - libSuffixes = new String[] { ".so." + qtVersion }; - libName = "lib" + libName; + if(OSInfo.crossOS().isUnixLike()) { + libSuffixes = new String[] { ".so." + qtVersion }; + libName = "lib" + libName; + }else { + libSuffixes = new String[0]; + } break; } @@ -2297,7 +2342,7 @@ private void analyzeLibinfix() { libInfix = fileName; break loop; } - } else if (OSInfo.os() == OSInfo.OS.MacOS && libfile.isDirectory() + } else if (OSInfo.crossOS() == OSInfo.OperationSystem.MacOS && libfile.isDirectory() && fileName.equals("QtGui.framework")) { mySetProperty(-1, Constants.MAC_OS_USE_FRAMEWORK, " (as detected in lib directory)", "true", true); useQtFramework = true; @@ -2309,6 +2354,7 @@ private void analyzeLibinfix() { } if (isAndroid) { mySetProperty(-1, Constants.QTJAMBI_ABIS, " (taken from library name)", availableAbis.trim(), true); + getProject().log(this, "qtjambi.android.ndk: " + getProject().getProperty("qtjambi.android.ndk"), Project.MSG_INFO); } mySetProperty(-1, Constants.QTJAMBI_QT_LIBINFIX, " (taken from library name)", libInfix, true); } @@ -2317,4 +2363,8 @@ private void analyzeLibinfix() { public static void setTargetProperties(Properties targetProperties) { InitializeBuildTask.targetProperties = targetProperties; } + + public static class VersionSkip extends BuildException { + private static final long serialVersionUID = -8078599301090344345L; + } } diff --git a/src/java/ant/io/qt/tools/ant/InitializeTask.java b/src/java/ant/io/qt/tools/ant/InitializeTask.java index 512ecba8..29112a8d 100644 --- a/src/java/ant/io/qt/tools/ant/InitializeTask.java +++ b/src/java/ant/io/qt/tools/ant/InitializeTask.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/ant/io/qt/tools/ant/InstallNameToolTask.java b/src/java/ant/io/qt/tools/ant/InstallNameToolTask.java index d3398fb5..b1bb4a08 100644 --- a/src/java/ant/io/qt/tools/ant/InstallNameToolTask.java +++ b/src/java/ant/io/qt/tools/ant/InstallNameToolTask.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/ant/io/qt/tools/ant/MakeTask.java b/src/java/ant/io/qt/tools/ant/MakeTask.java index 81f390d9..a9e8bdff 100644 --- a/src/java/ant/io/qt/tools/ant/MakeTask.java +++ b/src/java/ant/io/qt/tools/ant/MakeTask.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -41,7 +41,7 @@ import org.apache.tools.ant.PropertyHelper; import org.apache.tools.ant.Task; -import io.qt.tools.ant.OSInfo.OS; +import io.qt.tools.ant.OSInfo.OperationSystem; public class MakeTask extends Task { @@ -100,7 +100,7 @@ private String compilerName() { return make_tool; } - if(OSInfo.crossOS()!=OSInfo.os() && OSInfo.crossOS()==OS.Android) { + if(OSInfo.crossOS()!=OSInfo.os() && OSInfo.crossOS()==OperationSystem.Android) { String ndkRoot = (String)PropertyHelper.getProperty(getProject(), "qtjambi.android.ndk"); if(ndkRoot!=null && !ndkRoot.isEmpty()) { File nrkRootFile = new File(ndkRoot); @@ -108,6 +108,10 @@ private String compilerName() { switch(OSInfo.os()) { case Windows: return nrkRootFile.getAbsolutePath() + "\\prebuilt\\windows-x86_64\\bin\\make.exe"; + case MacOS: + return nrkRootFile.getAbsolutePath() + "/prebuilt/darwin-x86_64/bin/make"; + case Linux: + return nrkRootFile.getAbsolutePath() + "/prebuilt/linux-x86_64/bin/make"; default: break; } @@ -146,7 +150,7 @@ public void execute() throws BuildException { List commandArray = new ArrayList(); commandArray.add(compilerName); - if(silent && OSInfo.os() != OSInfo.OS.Windows) { + if(silent && OSInfo.os() != OSInfo.OperationSystem.Windows) { commandArray.add("-s"); } @@ -196,7 +200,7 @@ public void execute() throws BuildException { }else { String path = null; Map newEnv = null; - if(OSInfo.crossOS()!=OSInfo.os() && OSInfo.crossOS()==OS.Android) { + if(OSInfo.crossOS()!=OSInfo.os() && OSInfo.crossOS()==OperationSystem.Android) { String ndkRoot = (String)PropertyHelper.getProperty(getProject(), "qtjambi.android.ndk"); if(ndkRoot!=null) { newEnv = new TreeMap<>(); @@ -206,6 +210,12 @@ public void execute() throws BuildException { case Windows: path = nrkRootFile.getAbsolutePath() + "\\prebuilt\\windows-x86_64\\bin;" + nrkRootFile.getAbsolutePath() + "\\toolchains\\llvm\\prebuilt\\windows-x86_64\\bin"; + case MacOS: + path = nrkRootFile.getAbsolutePath() + "/prebuilt/darwin-x86_64/bin;" + + nrkRootFile.getAbsolutePath() + "/toolchains/llvm/prebuilt/darwin-x86_64/bin"; + case Linux: + path = nrkRootFile.getAbsolutePath() + "/prebuilt/linux-x86_64/bin;" + + nrkRootFile.getAbsolutePath() + "/toolchains/llvm/prebuilt/linux-x86_64/bin"; default: break; } diff --git a/src/java/ant/io/qt/tools/ant/ModifyTestResultsTask.java b/src/java/ant/io/qt/tools/ant/ModifyTestResultsTask.java index 11f7d36f..91032c92 100644 --- a/src/java/ant/io/qt/tools/ant/ModifyTestResultsTask.java +++ b/src/java/ant/io/qt/tools/ant/ModifyTestResultsTask.java @@ -23,7 +23,7 @@ public class ModifyTestResultsTask extends Task { @Override public void execute() throws BuildException { - String nbsp = Character.toString(160); + String nbsp = "_"; String suffix = nbsp+"("+version+","+nbsp+mode; if(jdk!=null && !jdk.isEmpty()) suffix += ","+nbsp+jdk; @@ -40,15 +40,17 @@ public void execute() throws BuildException { transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); loop: for(String file : directory.list()){ - if(file.endsWith(".xml")) { + if(file.startsWith("TEST") && file.endsWith(".xml")) { java.io.File xml = new java.io.File(directory, file); Document doc; try(FileInputStream fis = new FileInputStream(xml)){ doc = builder.parse(fis); }catch(org.xml.sax.SAXParseException e) { - throw new org.xml.sax.SAXParseException(xml.getName()+" "+e.getMessage(), null, e); + System.err.println(xml.getAbsolutePath()); + e.printStackTrace(System.err); + continue; }catch(IOException e) { - throw new IOException(xml.getName()+" "+e.getMessage(), e); + throw new org.xml.sax.SAXParseException(xml.getName()+"; "+e.getMessage(), null, e); } NodeList childNodes = doc.getChildNodes(); for(int i=0, length=childNodes.getLength(); i parseParameters() { } if("true".equals(AntUtil.getPropertyAsString(propertyHelper, Constants.QTJAMBI_DEBUG_TOOLS))) parameters.add("DEFINES+=QTJAMBI_DEBUG_TOOLS"); - if(OSInfo.crossOS()==OSInfo.OS.MacOS) { + if(OSInfo.crossOS()==OSInfo.OperationSystem.MacOS) { parameters.add("DEFINES+=_XOPEN_SOURCE"); if(Boolean.valueOf(AntUtil.getPropertyAsString(propertyHelper, Constants.MAC_OS_GENERATE_FRAMEWORKS))) { parameters.add("QTJAMBI_GENERATE_FRAMEWORKS=true"); @@ -219,7 +219,7 @@ private List parseParameters() { } } */ - if(OSInfo.os()==OSInfo.OS.MacOS) { + if(OSInfo.crossOS()==OSInfo.OperationSystem.MacOS) { if(Boolean.valueOf(AntUtil.getPropertyAsString(propertyHelper, Constants.MAC_OS_CONVERT_QT_FRAMEWORK))) { parameters.add("DEFINES+=\"QTJAMBI_NO_DEBUG_PLUGINS\""); } @@ -310,13 +310,17 @@ else if(Constants.CONFIG_TEST.equals(thisQtjambiConfig)) // command.add(AntUtil.getPropertyAsString(propertyHelper, Constants.QT_SPEC)); String binpath = AntUtil.getPropertyAsString(propertyHelper, Constants.BINDIR); Map env = null; - if(OSInfo.crossOS()==OS.Android) { + if(OSInfo.crossOS()==OperationSystem.Android) { + System.out.println("Preparing NDK for android..."); String ndkRoot = AntUtil.getPropertyAsString(propertyHelper, "qtjambi.android.ndk"); if(ndkRoot!=null) { + System.out.println("Preparing NDK for android: "+ndkRoot); env = new HashMap<>(); File nrkRootFile = new File(ndkRoot); env.put("ANDROID_NDK_ROOT", nrkRootFile.getAbsolutePath().replace('\\', '/')); command.add("\"ANDROID_ABIS="+AntUtil.getPropertyAsString(propertyHelper, Constants.QTJAMBI_ABIS)+"\""); + }else { + System.out.println("...failed"); } } Exec.execute(this, command, dirExecute, getProject(), binpath, null, env); diff --git a/src/java/ant/io/qt/tools/ant/ResolvePathTask.java b/src/java/ant/io/qt/tools/ant/ResolvePathTask.java index 915b7604..9293ac21 100644 --- a/src/java/ant/io/qt/tools/ant/ResolvePathTask.java +++ b/src/java/ant/io/qt/tools/ant/ResolvePathTask.java @@ -2,7 +2,7 @@ ** ** Copyright (C) 2011 Darryl L. Miles. All rights reserved. ** Copyright (C) 2011 D L Miles Consulting Ltd. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/ant/io/qt/tools/ant/StreamConsumer.java b/src/java/ant/io/qt/tools/ant/StreamConsumer.java index df5be489..4abd13e5 100644 --- a/src/java/ant/io/qt/tools/ant/StreamConsumer.java +++ b/src/java/ant/io/qt/tools/ant/StreamConsumer.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/ant/io/qt/tools/ant/Util.java b/src/java/ant/io/qt/tools/ant/Util.java index 410823cc..fbd27620 100644 --- a/src/java/ant/io/qt/tools/ant/Util.java +++ b/src/java/ant/io/qt/tools/ant/Util.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -46,6 +46,14 @@ import org.apache.tools.ant.Project; abstract class Util { + + public static File TRY_LOCATE_EXEC(String name, String prepend, String append) { + try { + return LOCATE_EXEC(name, prepend, append); + } catch (BuildException e) { + return null; + } + } public static File LOCATE_EXEC(String name, String prepend, String append) { String searchPath = ""; @@ -207,10 +215,10 @@ public static File findInLibraryPath(String name, String javaLibDir) { //System.out.println("library path is: " + libraryPath); // Make /usr/lib an implicit part of library path - if(OSInfo.os() == OSInfo.OS.Linux) { - String archName = OSInfo.crossOSArchName(); + if(OSInfo.os().isUnixLike()) { boolean match = false; - if(archName.equals(OSInfo.K_LINUX_X86)) { + switch(OSInfo.arch()) { + case x86: // (some non-FHS) Linux 32bit might have lib32 directory most Linux // distros (FHS compliant) will not have a /usr/lib32. File lib32Dir = new File("/usr/lib32"); @@ -218,10 +226,14 @@ public static File findInLibraryPath(String name, String javaLibDir) { libraryPath += File.pathSeparator + lib32Dir.getAbsolutePath(); match = true; } - } else if(archName.equals(OSInfo.K_LINUX_X64)) { + break; + case x86_64: + case arm64: // Linux 64bit libraryPath += File.pathSeparator + "/usr/lib64"; match = true; + break; + default: } if(!match) { // Normal Unix diff --git a/src/java/ant/io/qt/tools/ant/ant-qtjambi.xml b/src/java/ant/io/qt/tools/ant/ant-qtjambi.xml index 89a057d9..2f137c8f 100644 --- a/src/java/ant/io/qt/tools/ant/ant-qtjambi.xml +++ b/src/java/ant/io/qt/tools/ant/ant-qtjambi.xml @@ -2,7 +2,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/Accessor.java b/src/java/autotests/io/qt/autotests/Accessor.java index a15f9ffe..c7c4ce98 100644 --- a/src/java/autotests/io/qt/autotests/Accessor.java +++ b/src/java/autotests/io/qt/autotests/Accessor.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/ApplicationInitializer.java b/src/java/autotests/io/qt/autotests/ApplicationInitializer.java index 4d4a7c9d..9879c5b5 100644 --- a/src/java/autotests/io/qt/autotests/ApplicationInitializer.java +++ b/src/java/autotests/io/qt/autotests/ApplicationInitializer.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/Deployment.java b/src/java/autotests/io/qt/autotests/Deployment.java index 7d332209..39853811 100644 --- a/src/java/autotests/io/qt/autotests/Deployment.java +++ b/src/java/autotests/io/qt/autotests/Deployment.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/DeploymentSql.java b/src/java/autotests/io/qt/autotests/DeploymentSql.java index b8a7cb78..43be5a68 100644 --- a/src/java/autotests/io/qt/autotests/DeploymentSql.java +++ b/src/java/autotests/io/qt/autotests/DeploymentSql.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/DisposeCounter.java b/src/java/autotests/io/qt/autotests/DisposeCounter.java index 969eadb9..9475a70e 100644 --- a/src/java/autotests/io/qt/autotests/DisposeCounter.java +++ b/src/java/autotests/io/qt/autotests/DisposeCounter.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/MemoryManagement.java b/src/java/autotests/io/qt/autotests/MemoryManagement.java index 0a51308c..b4f8231e 100644 --- a/src/java/autotests/io/qt/autotests/MemoryManagement.java +++ b/src/java/autotests/io/qt/autotests/MemoryManagement.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/MyQObject.java b/src/java/autotests/io/qt/autotests/MyQObject.java index 233d656c..2bcc725e 100644 --- a/src/java/autotests/io/qt/autotests/MyQObject.java +++ b/src/java/autotests/io/qt/autotests/MyQObject.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/RunTests.java b/src/java/autotests/io/qt/autotests/RunTests.java index e152c05f..6650adbc 100644 --- a/src/java/autotests/io/qt/autotests/RunTests.java +++ b/src/java/autotests/io/qt/autotests/RunTests.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestActiveX.java b/src/java/autotests/io/qt/autotests/TestActiveX.java index 0b9e32b3..58bf622a 100644 --- a/src/java/autotests/io/qt/autotests/TestActiveX.java +++ b/src/java/autotests/io/qt/autotests/TestActiveX.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestApplicationArgs.java b/src/java/autotests/io/qt/autotests/TestApplicationArgs.java index cd432017..5b11c48d 100644 --- a/src/java/autotests/io/qt/autotests/TestApplicationArgs.java +++ b/src/java/autotests/io/qt/autotests/TestApplicationArgs.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestAuthInterfaces.java b/src/java/autotests/io/qt/autotests/TestAuthInterfaces.java index 46a91ffb..c6c36b52 100644 --- a/src/java/autotests/io/qt/autotests/TestAuthInterfaces.java +++ b/src/java/autotests/io/qt/autotests/TestAuthInterfaces.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestBluetooth.java b/src/java/autotests/io/qt/autotests/TestBluetooth.java index b6caebbb..86644214 100644 --- a/src/java/autotests/io/qt/autotests/TestBluetooth.java +++ b/src/java/autotests/io/qt/autotests/TestBluetooth.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestBluetoothDiscovery.java b/src/java/autotests/io/qt/autotests/TestBluetoothDiscovery.java index 527fbc73..f7a47fee 100644 --- a/src/java/autotests/io/qt/autotests/TestBluetoothDiscovery.java +++ b/src/java/autotests/io/qt/autotests/TestBluetoothDiscovery.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestBluetoothInjectedCodeQt5.java b/src/java/autotests/io/qt/autotests/TestBluetoothInjectedCodeQt5.java index a3d57034..d87b5a73 100644 --- a/src/java/autotests/io/qt/autotests/TestBluetoothInjectedCodeQt5.java +++ b/src/java/autotests/io/qt/autotests/TestBluetoothInjectedCodeQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestBluetoothInjectedCodeQt6.java b/src/java/autotests/io/qt/autotests/TestBluetoothInjectedCodeQt6.java index ee822317..79659255 100644 --- a/src/java/autotests/io/qt/autotests/TestBluetoothInjectedCodeQt6.java +++ b/src/java/autotests/io/qt/autotests/TestBluetoothInjectedCodeQt6.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestCharts.java b/src/java/autotests/io/qt/autotests/TestCharts.java index eb20e610..529f8a99 100644 --- a/src/java/autotests/io/qt/autotests/TestCharts.java +++ b/src/java/autotests/io/qt/autotests/TestCharts.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestClassFunctionality.java b/src/java/autotests/io/qt/autotests/TestClassFunctionality.java index 80ec3ecb..8ec6091b 100644 --- a/src/java/autotests/io/qt/autotests/TestClassFunctionality.java +++ b/src/java/autotests/io/qt/autotests/TestClassFunctionality.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestClassFunctionalityProblem.java b/src/java/autotests/io/qt/autotests/TestClassFunctionalityProblem.java index 6d3a85de..7ea4e2d8 100644 --- a/src/java/autotests/io/qt/autotests/TestClassFunctionalityProblem.java +++ b/src/java/autotests/io/qt/autotests/TestClassFunctionalityProblem.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestClassFunctionalityXpm.java b/src/java/autotests/io/qt/autotests/TestClassFunctionalityXpm.java index 199d1ecb..ae83c571 100644 --- a/src/java/autotests/io/qt/autotests/TestClassFunctionalityXpm.java +++ b/src/java/autotests/io/qt/autotests/TestClassFunctionalityXpm.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestClipboard.java b/src/java/autotests/io/qt/autotests/TestClipboard.java index c8e03bca..71b8820a 100644 --- a/src/java/autotests/io/qt/autotests/TestClipboard.java +++ b/src/java/autotests/io/qt/autotests/TestClipboard.java @@ -2,7 +2,7 @@ ** ** Copyright (C) 2012 Darryl L. Miles. All rights reserved. ** Copyright (C) 2012 D L Miles Consulting Ltd. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestCloneable.java b/src/java/autotests/io/qt/autotests/TestCloneable.java index debfc707..28d1a17d 100644 --- a/src/java/autotests/io/qt/autotests/TestCloneable.java +++ b/src/java/autotests/io/qt/autotests/TestCloneable.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestCloneableQt5.java b/src/java/autotests/io/qt/autotests/TestCloneableQt5.java index ae14b854..c95a4965 100644 --- a/src/java/autotests/io/qt/autotests/TestCloneableQt5.java +++ b/src/java/autotests/io/qt/autotests/TestCloneableQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestCollator.java b/src/java/autotests/io/qt/autotests/TestCollator.java index ad7066b6..73cdf76b 100644 --- a/src/java/autotests/io/qt/autotests/TestCollator.java +++ b/src/java/autotests/io/qt/autotests/TestCollator.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestConcurrent.java b/src/java/autotests/io/qt/autotests/TestConcurrent.java index 80e7bda0..838883c5 100644 --- a/src/java/autotests/io/qt/autotests/TestConcurrent.java +++ b/src/java/autotests/io/qt/autotests/TestConcurrent.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestConnections.java b/src/java/autotests/io/qt/autotests/TestConnections.java index edc995e7..8a42c270 100644 --- a/src/java/autotests/io/qt/autotests/TestConnections.java +++ b/src/java/autotests/io/qt/autotests/TestConnections.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestConstruction.java b/src/java/autotests/io/qt/autotests/TestConstruction.java index 994fda6d..a6abf8d6 100644 --- a/src/java/autotests/io/qt/autotests/TestConstruction.java +++ b/src/java/autotests/io/qt/autotests/TestConstruction.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestContainers.java b/src/java/autotests/io/qt/autotests/TestContainers.java index 7dc37271..7a573cab 100644 --- a/src/java/autotests/io/qt/autotests/TestContainers.java +++ b/src/java/autotests/io/qt/autotests/TestContainers.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestContainersModification.java b/src/java/autotests/io/qt/autotests/TestContainersModification.java index 907b9c45..c858dc76 100644 --- a/src/java/autotests/io/qt/autotests/TestContainersModification.java +++ b/src/java/autotests/io/qt/autotests/TestContainersModification.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestContainersQt5.java b/src/java/autotests/io/qt/autotests/TestContainersQt5.java index 1b74c2e7..0dd55e1b 100644 --- a/src/java/autotests/io/qt/autotests/TestContainersQt5.java +++ b/src/java/autotests/io/qt/autotests/TestContainersQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestDBus.java b/src/java/autotests/io/qt/autotests/TestDBus.java index e7f58ac0..e173784a 100644 --- a/src/java/autotests/io/qt/autotests/TestDBus.java +++ b/src/java/autotests/io/qt/autotests/TestDBus.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestDBusConnect.java b/src/java/autotests/io/qt/autotests/TestDBusConnect.java index 9a5e9df0..5c64ac86 100644 --- a/src/java/autotests/io/qt/autotests/TestDBusConnect.java +++ b/src/java/autotests/io/qt/autotests/TestDBusConnect.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestDanglingPointers1.java b/src/java/autotests/io/qt/autotests/TestDanglingPointers1.java index 9cde3a42..e4de8564 100644 --- a/src/java/autotests/io/qt/autotests/TestDanglingPointers1.java +++ b/src/java/autotests/io/qt/autotests/TestDanglingPointers1.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestDanglingPointers2.java b/src/java/autotests/io/qt/autotests/TestDanglingPointers2.java index 358e4f46..38350daa 100644 --- a/src/java/autotests/io/qt/autotests/TestDanglingPointers2.java +++ b/src/java/autotests/io/qt/autotests/TestDanglingPointers2.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestDanglingPointers3.java b/src/java/autotests/io/qt/autotests/TestDanglingPointers3.java index 713e3da1..e66c7a4f 100644 --- a/src/java/autotests/io/qt/autotests/TestDanglingPointers3.java +++ b/src/java/autotests/io/qt/autotests/TestDanglingPointers3.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestDanglingPointers4.java b/src/java/autotests/io/qt/autotests/TestDanglingPointers4.java index 36d39b52..6402d9ef 100644 --- a/src/java/autotests/io/qt/autotests/TestDanglingPointers4.java +++ b/src/java/autotests/io/qt/autotests/TestDanglingPointers4.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestDataVis.java b/src/java/autotests/io/qt/autotests/TestDataVis.java index 9036738e..427e21d6 100644 --- a/src/java/autotests/io/qt/autotests/TestDataVis.java +++ b/src/java/autotests/io/qt/autotests/TestDataVis.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestDefaultSignals.java b/src/java/autotests/io/qt/autotests/TestDefaultSignals.java index d22f52b7..c5f8dd39 100644 --- a/src/java/autotests/io/qt/autotests/TestDefaultSignals.java +++ b/src/java/autotests/io/qt/autotests/TestDefaultSignals.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestDeployer.java b/src/java/autotests/io/qt/autotests/TestDeployer.java index ccfbf103..3543c64d 100644 --- a/src/java/autotests/io/qt/autotests/TestDeployer.java +++ b/src/java/autotests/io/qt/autotests/TestDeployer.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestDeployerSql.java b/src/java/autotests/io/qt/autotests/TestDeployerSql.java index c1b7bd29..701c4f32 100644 --- a/src/java/autotests/io/qt/autotests/TestDeployerSql.java +++ b/src/java/autotests/io/qt/autotests/TestDeployerSql.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestDesignerHelp.java b/src/java/autotests/io/qt/autotests/TestDesignerHelp.java index e2233c9c..fb900074 100644 --- a/src/java/autotests/io/qt/autotests/TestDesignerHelp.java +++ b/src/java/autotests/io/qt/autotests/TestDesignerHelp.java @@ -67,7 +67,7 @@ public void testHelpWidgets() { lib = "plugins/"+lib; QPluginLoader pluginLoader = new QPluginLoader(lib); if(!pluginLoader.load()) - Assert.assertTrue(pluginLoader.errorString()+" "+lib, false); + Assert.assertTrue(pluginLoader.errorString()+" "+lib+" in "+QCoreApplication.libraryPaths(), false); else{ QObject servicePlugin = pluginLoader.instance(); Assert.assertTrue(servicePlugin != null); diff --git a/src/java/autotests/io/qt/autotests/TestDesignerMultimedia.java b/src/java/autotests/io/qt/autotests/TestDesignerMultimedia.java index 2cf90647..6e2b006b 100644 --- a/src/java/autotests/io/qt/autotests/TestDesignerMultimedia.java +++ b/src/java/autotests/io/qt/autotests/TestDesignerMultimedia.java @@ -67,7 +67,7 @@ public void testMultimediaWidgets() { lib = "plugins/"+lib; QPluginLoader pluginLoader = new QPluginLoader(lib); if(!pluginLoader.load()) - Assert.assertTrue(pluginLoader.errorString()+" "+lib, false); + Assert.assertTrue(pluginLoader.errorString()+" "+lib+" in "+QCoreApplication.libraryPaths(), false); else{ QObject servicePlugin = pluginLoader.instance(); Assert.assertTrue(servicePlugin != null); diff --git a/src/java/autotests/io/qt/autotests/TestDestruction.java b/src/java/autotests/io/qt/autotests/TestDestruction.java index f4dfe4c2..88a14ec0 100644 --- a/src/java/autotests/io/qt/autotests/TestDestruction.java +++ b/src/java/autotests/io/qt/autotests/TestDestruction.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestExceptions.java b/src/java/autotests/io/qt/autotests/TestExceptions.java index edacbf34..84a3110e 100644 --- a/src/java/autotests/io/qt/autotests/TestExceptions.java +++ b/src/java/autotests/io/qt/autotests/TestExceptions.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestExceptions2.java b/src/java/autotests/io/qt/autotests/TestExceptions2.java index b5aaf563..cd39c468 100644 --- a/src/java/autotests/io/qt/autotests/TestExceptions2.java +++ b/src/java/autotests/io/qt/autotests/TestExceptions2.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestFileEngine.java b/src/java/autotests/io/qt/autotests/TestFileEngine.java index 88218d5c..6a5603e1 100644 --- a/src/java/autotests/io/qt/autotests/TestFileEngine.java +++ b/src/java/autotests/io/qt/autotests/TestFileEngine.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -511,7 +511,7 @@ public void testResourceFileEngine() throws Exception { } } } - + public static void main(String args[]) { org.junit.runner.JUnitCore.main(TestFileEngine.class.getName()); } diff --git a/src/java/autotests/io/qt/autotests/TestFileEngineQt63.java b/src/java/autotests/io/qt/autotests/TestFileEngineQt63.java new file mode 100644 index 00000000..01c1aaaa --- /dev/null +++ b/src/java/autotests/io/qt/autotests/TestFileEngineQt63.java @@ -0,0 +1,126 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2009 Nokia. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ +package io.qt.autotests; + +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.util.Optional; + +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +import io.qt.NonNull; +import io.qt.Nullable; +import io.qt.core.QFile; +import io.qt.core.QFileDevice.FileError; +import io.qt.core.QFileDevice.Permissions; +import io.qt.core.QIODevice; +import io.qt.core.Qt; +import io.qt.core.internal.QAbstractFileEngine; +import io.qt.core.internal.QAbstractFileEngineHandler; +import io.qt.gui.QPixmap; + +public class TestFileEngineQt63 extends ApplicationInitializer { + + @BeforeClass + public static void testInitialize() throws Exception { + ApplicationInitializer.testInitializeWithWidgets(); + } + + @Test + public void testCustomFileEngine() { + byte[][] result = {null}; + QAbstractFileEngineHandler handler = new QAbstractFileEngineHandler() { + @Override + public @Nullable QAbstractFileEngine create(@NonNull String fileName) { + if(fileName.startsWith("/#/")) { + return new QAbstractFileEngine(){ + + ByteArrayOutputStream stream; + + @Override + public boolean close() { + System.out.println("TestFileEngine.close()"); + if(stream!=null) { + result[0] = stream.toByteArray(); + stream = null; + return true; + } + return false; + } + + @Override + public boolean open(QIODevice.@NonNull OpenMode openMode, + @NonNull Optional permissions) { + System.out.println("TestFileEngine.open("+openMode+")"); + if(openMode.testFlags(QFile.OpenModeFlag.WriteOnly)) { + stream = new ByteArrayOutputStream(); + setError(FileError.NoError, null); + return true; + } + return false; + } + + @Override + public int write(@Nullable ByteBuffer data) { + System.out.print("TestFileEngine.write("+data.remaining()+")"); + int counter = 0; + while(data.hasRemaining()) { + stream.write(data.get()); + ++counter; + } + System.out.println(" -> "+counter); + return counter; + } + +// @Override + public boolean flush() { + return true; + } + }; + } + return null; + } + }; + try { + QPixmap pm = new QPixmap(12800, 12800); + pm.fill(Qt.GlobalColor.red); + Assert.assertTrue(pm.save("/#/test.png", "png")); +// System.out.println(result[0].length); + }finally { + handler.dispose(); + } + } + + public static void main(String args[]) { + org.junit.runner.JUnitCore.main(TestFileEngineQt63.class.getName()); + } +} diff --git a/src/java/autotests/io/qt/autotests/TestFlagsAndEnumParameters.java b/src/java/autotests/io/qt/autotests/TestFlagsAndEnumParameters.java index cd9780bf..bcb0df99 100644 --- a/src/java/autotests/io/qt/autotests/TestFlagsAndEnumParameters.java +++ b/src/java/autotests/io/qt/autotests/TestFlagsAndEnumParameters.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** instance file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestFunctionalQt6.java b/src/java/autotests/io/qt/autotests/TestFunctionalQt6.java new file mode 100644 index 00000000..1eda3318 --- /dev/null +++ b/src/java/autotests/io/qt/autotests/TestFunctionalQt6.java @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ +package io.qt.autotests; + +import static org.junit.Assert.*; + +import org.junit.Test; + +import io.qt.core.QByteArray; +import io.qt.core.QString; + +public class TestFunctionalQt6 extends ApplicationInitializer{ + +// @BeforeClass +// public static void testInitialize() throws Exception { +// testInitializeWithWidgets(); +// } + + @Test + public void testQStringPredicate() { + QString value = new QString("ABCDEFEDCBA"); + value.removeIf(c->c=='E'); + assertEquals(new QString("ABCDFDCBA"), value); + } + + @Test + public void testQByteArrayPredicate() { + QByteArray value = new QByteArray("ABCDEFEDCBA"); + value.removeIf(b->b=='E'); + assertEquals(new QByteArray("ABCDFDCBA"), value); + } + + @Test + public void test() { + } +} diff --git a/src/java/autotests/io/qt/autotests/TestFuture.java b/src/java/autotests/io/qt/autotests/TestFuture.java index c0c6c0b1..d551061e 100644 --- a/src/java/autotests/io/qt/autotests/TestFuture.java +++ b/src/java/autotests/io/qt/autotests/TestFuture.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -50,6 +50,7 @@ import io.qt.core.QLibraryInfo; import io.qt.core.QObject; import io.qt.core.QOperatingSystemVersion; +import io.qt.core.QTimer; import io.qt.core.QUnhandledException; public class TestFuture extends ApplicationInitializer { @@ -107,6 +108,7 @@ public void testJavaQFutureWatcher() { watcher.resultReadyAt.connect(i-> count[0] = Math.max(count[0], i)); watcher.resultsReadyAt.connect((a,b)-> count[0] = Math.max(count[0], b)); watcher.finished.connect(loop::quit); + QTimer.singleShot(5000, loop::quit); watcher.setFuture(FutureHandler.returnInTheFuture(Arrays.asList("testNativeQFutureWatcher1", "testNativeQFutureWatcher2", "testNativeQFutureWatcher3", @@ -133,6 +135,7 @@ public void testJavaQFutureWatcher_nested() { watcher.resultReadyAt.connect(i-> count[0] = Math.max(count[0], i)); watcher.resultsReadyAt.connect((a,b)-> count[0] = Math.max(count[0], b)); watcher.finished.connect(loop::quit); + QTimer.singleShot(5000, loop::quit); watcher.setFuture(FutureHandler.forward(FutureHandler.returnInTheFuture(Arrays.asList("testNativeQFutureWatcher1", "testNativeQFutureWatcher2", "testNativeQFutureWatcher3", @@ -160,6 +163,7 @@ public void testNativeQFutureWatcher() { watcher.resultReadyAt.connect(i-> count[0] = Math.max(count[0], i)); watcher.resultsReadyAt.connect((a,b)-> count[0] = Math.max(count[0], b)); watcher.finished.connect(loop::quit); + QTimer.singleShot(5000, loop::quit); QFuture future = FutureHandler.returnInTheFuture(Arrays.asList("testNativeQFutureWatcher1", "testNativeQFutureWatcher2", "testNativeQFutureWatcher3", diff --git a/src/java/autotests/io/qt/autotests/TestGLVersionFunctionsQt5.java b/src/java/autotests/io/qt/autotests/TestGLVersionFunctionsQt5.java index 13bcc181..23b57c31 100644 --- a/src/java/autotests/io/qt/autotests/TestGLVersionFunctionsQt5.java +++ b/src/java/autotests/io/qt/autotests/TestGLVersionFunctionsQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestGraphs.java b/src/java/autotests/io/qt/autotests/TestGraphs.java index 72786554..287ff601 100644 --- a/src/java/autotests/io/qt/autotests/TestGraphs.java +++ b/src/java/autotests/io/qt/autotests/TestGraphs.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -195,6 +195,7 @@ public void testQCustom3DVolume() { @Test public void testQBarDataProxy(){ + Assume.assumeTrue(QLibraryInfo.version().compareTo(new QVersionNumber(6,6,0))<=0); QBarDataProxy proxy = new QBarDataProxy(); QBarDataArray array = new QBarDataArray(); proxy.resetArray(array); @@ -210,6 +211,7 @@ public void testQBarDataProxy(){ @Test public void testQSurfaceDataProxy(){ + Assume.assumeTrue(QLibraryInfo.version().compareTo(new QVersionNumber(6,6,0))<=0); QSurfaceDataProxy proxy = new QSurfaceDataProxy(); QSurfaceDataArray array = new QSurfaceDataArray(); proxy.resetArray(array); diff --git a/src/java/autotests/io/qt/autotests/TestHelpCloneable.java b/src/java/autotests/io/qt/autotests/TestHelpCloneable.java index 805bcedd..bab62f3b 100644 --- a/src/java/autotests/io/qt/autotests/TestHelpCloneable.java +++ b/src/java/autotests/io/qt/autotests/TestHelpCloneable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestI18N.java b/src/java/autotests/io/qt/autotests/TestI18N.java index 53168d88..bf4b83aa 100644 --- a/src/java/autotests/io/qt/autotests/TestI18N.java +++ b/src/java/autotests/io/qt/autotests/TestI18N.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationActiveX.java b/src/java/autotests/io/qt/autotests/TestInitializationActiveX.java index 669aec95..936656cd 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationActiveX.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationActiveX.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationBluetooth.java b/src/java/autotests/io/qt/autotests/TestInitializationBluetooth.java index fdeccd74..d0e8e201 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationBluetooth.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationBluetooth.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationCharts.java b/src/java/autotests/io/qt/autotests/TestInitializationCharts.java index 0285edd0..9b1712bc 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationCharts.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationCharts.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationConcurrent.java b/src/java/autotests/io/qt/autotests/TestInitializationConcurrent.java index 1e71bad5..c61718e0 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationConcurrent.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationConcurrent.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationCore.java b/src/java/autotests/io/qt/autotests/TestInitializationCore.java index b4b05dd4..43b0e297 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationCore.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationCore.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationDBus.java b/src/java/autotests/io/qt/autotests/TestInitializationDBus.java index 46da92ec..d3952fcd 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationDBus.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationDBus.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationDataVisualization.java b/src/java/autotests/io/qt/autotests/TestInitializationDataVisualization.java index 4453f7d1..64335954 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationDataVisualization.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationDataVisualization.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationDesigner.java b/src/java/autotests/io/qt/autotests/TestInitializationDesigner.java index 89bd1664..33a3ae1d 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationDesigner.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationDesigner.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationGamepad.java b/src/java/autotests/io/qt/autotests/TestInitializationGamepad.java index eb63c080..375c85d4 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationGamepad.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationGamepad.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationGraphs.java b/src/java/autotests/io/qt/autotests/TestInitializationGraphs.java index a6bbe80c..fe48290b 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationGraphs.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationGraphs.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationGui.java b/src/java/autotests/io/qt/autotests/TestInitializationGui.java index 3c3ec119..76bb5be1 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationGui.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationGui.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationGuiRhiQt66.java b/src/java/autotests/io/qt/autotests/TestInitializationGuiRhiQt66.java new file mode 100644 index 00000000..4b93351b --- /dev/null +++ b/src/java/autotests/io/qt/autotests/TestInitializationGuiRhiQt66.java @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2009 Nokia. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ +package io.qt.autotests; + +import org.junit.Assert; +import org.junit.Test; + +import io.qt.gui.QGuiApplication; +import io.qt.gui.rhi.QRhi; +import io.qt.gui.rhi.QRhiInitParams; + +public class TestInitializationGuiRhiQt66 extends UnitTestInitializer { + @Test + public void initialize() { + Assert.assertTrue(io.qt.QtUtilities.initializePackage("io.qt.gui.rhi")); + QGuiApplication.initialize(new String[0]); + QRhiInitParams params = new QRhiInitParams(); + QRhi.probe(QRhi.Implementation.Null, params); + } +} diff --git a/src/java/autotests/io/qt/autotests/TestInitializationHelp.java b/src/java/autotests/io/qt/autotests/TestInitializationHelp.java index a6f79409..c1d21db0 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationHelp.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationHelp.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationHttpServer.java b/src/java/autotests/io/qt/autotests/TestInitializationHttpServer.java index d6658d46..c33bbb08 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationHttpServer.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationHttpServer.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationLocation.java b/src/java/autotests/io/qt/autotests/TestInitializationLocation.java index 079304c0..ff9e5335 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationLocation.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationLocation.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationMacExtras.java b/src/java/autotests/io/qt/autotests/TestInitializationMacExtras.java index f2f81c3e..044e4fe6 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationMacExtras.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationMacExtras.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationMultimedia.java b/src/java/autotests/io/qt/autotests/TestInitializationMultimedia.java index dc87f3fe..ba75e658 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationMultimedia.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationMultimedia.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationMultimediaWidgets.java b/src/java/autotests/io/qt/autotests/TestInitializationMultimediaWidgets.java index dea5fcbf..b332155a 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationMultimediaWidgets.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationMultimediaWidgets.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationNetwork.java b/src/java/autotests/io/qt/autotests/TestInitializationNetwork.java index 1b9c8acd..ae8fef37 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationNetwork.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationNetwork.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationNetworkAuth.java b/src/java/autotests/io/qt/autotests/TestInitializationNetworkAuth.java index 2532f8d3..2d965b03 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationNetworkAuth.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationNetworkAuth.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationNfc.java b/src/java/autotests/io/qt/autotests/TestInitializationNfc.java index 92c1e745..a9e362ff 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationNfc.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationNfc.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationOpenGL.java b/src/java/autotests/io/qt/autotests/TestInitializationOpenGL.java index 583d8ec0..100c2f45 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationOpenGL.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationOpenGL.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationOpenGLWidgets.java b/src/java/autotests/io/qt/autotests/TestInitializationOpenGLWidgets.java index 31a6871d..0a86f5ae 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationOpenGLWidgets.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationOpenGLWidgets.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationPdf.java b/src/java/autotests/io/qt/autotests/TestInitializationPdf.java index 6c95a4b4..0179abf6 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationPdf.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationPdf.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationPdfWidgets.java b/src/java/autotests/io/qt/autotests/TestInitializationPdfWidgets.java index 11e9bc0a..065b2558 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationPdfWidgets.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationPdfWidgets.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationPositioning.java b/src/java/autotests/io/qt/autotests/TestInitializationPositioning.java index af8d1aa2..3906383b 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationPositioning.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationPositioning.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationPrintSupport.java b/src/java/autotests/io/qt/autotests/TestInitializationPrintSupport.java index 905644e0..bc45b5a0 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationPrintSupport.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationPrintSupport.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationPurchasing.java b/src/java/autotests/io/qt/autotests/TestInitializationPurchasing.java index 1417cbfd..76c15e13 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationPurchasing.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationPurchasing.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQml.java b/src/java/autotests/io/qt/autotests/TestInitializationQml.java index e908095e..925e23e1 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQml.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQml.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQt3DAnimation.java b/src/java/autotests/io/qt/autotests/TestInitializationQt3DAnimation.java index 0cc760c8..af3415d8 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQt3DAnimation.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQt3DAnimation.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQt3DCore.java b/src/java/autotests/io/qt/autotests/TestInitializationQt3DCore.java index 04045e55..1db6acb7 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQt3DCore.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQt3DCore.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQt3DExtras.java b/src/java/autotests/io/qt/autotests/TestInitializationQt3DExtras.java index a7fd75fe..d931f6f1 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQt3DExtras.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQt3DExtras.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQt3DInput.java b/src/java/autotests/io/qt/autotests/TestInitializationQt3DInput.java index d8e7faac..836b12db 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQt3DInput.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQt3DInput.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQt3DLogic.java b/src/java/autotests/io/qt/autotests/TestInitializationQt3DLogic.java index 313a4fc1..6d0d3405 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQt3DLogic.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQt3DLogic.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQt3DQuick.java b/src/java/autotests/io/qt/autotests/TestInitializationQt3DQuick.java index a4382524..10b88d1d 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQt3DQuick.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQt3DQuick.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQt3DQuickExtras.java b/src/java/autotests/io/qt/autotests/TestInitializationQt3DQuickExtras.java index 6033c808..09e25d26 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQt3DQuickExtras.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQt3DQuickExtras.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQt3DQuickScene2D.java b/src/java/autotests/io/qt/autotests/TestInitializationQt3DQuickScene2D.java index 3db84a90..a4547f1f 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQt3DQuickScene2D.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQt3DQuickScene2D.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQt3DRender.java b/src/java/autotests/io/qt/autotests/TestInitializationQt3DRender.java index 1abbaa62..3d809abc 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQt3DRender.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQt3DRender.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQuick.java b/src/java/autotests/io/qt/autotests/TestInitializationQuick.java index 9fd797a0..e11acf33 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQuick.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQuick.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQuick3D.java b/src/java/autotests/io/qt/autotests/TestInitializationQuick3D.java index 9f1e2ac3..9b8ea750 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQuick3D.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQuick3D.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQuickControls.java b/src/java/autotests/io/qt/autotests/TestInitializationQuickControls.java index 6630980d..3f115d36 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQuickControls.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQuickControls.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQuickTest.java b/src/java/autotests/io/qt/autotests/TestInitializationQuickTest.java index f65b4de7..a599f1a8 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQuickTest.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQuickTest.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationQuickWidgets.java b/src/java/autotests/io/qt/autotests/TestInitializationQuickWidgets.java index 06cff18e..0b696012 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationQuickWidgets.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationQuickWidgets.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationRemoteObjects.java b/src/java/autotests/io/qt/autotests/TestInitializationRemoteObjects.java index f0df7101..89700294 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationRemoteObjects.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationRemoteObjects.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationScript.java b/src/java/autotests/io/qt/autotests/TestInitializationScript.java index 250385ba..72744512 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationScript.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationScript.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationScriptTools.java b/src/java/autotests/io/qt/autotests/TestInitializationScriptTools.java index 1100cf8f..548e09a4 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationScriptTools.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationScriptTools.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationScxml.java b/src/java/autotests/io/qt/autotests/TestInitializationScxml.java index d9dab4bd..fc3a7751 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationScxml.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationScxml.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationSensors.java b/src/java/autotests/io/qt/autotests/TestInitializationSensors.java index ca51bdf8..43af52e1 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationSensors.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationSensors.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationSerialBus.java b/src/java/autotests/io/qt/autotests/TestInitializationSerialBus.java index 86f4a5f0..f2d3b933 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationSerialBus.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationSerialBus.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationSerialPort.java b/src/java/autotests/io/qt/autotests/TestInitializationSerialPort.java index 5bc13c7d..95d1f80a 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationSerialPort.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationSerialPort.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationSpatialAudio.java b/src/java/autotests/io/qt/autotests/TestInitializationSpatialAudio.java index 2f6e7709..06eff572 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationSpatialAudio.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationSpatialAudio.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationSql.java b/src/java/autotests/io/qt/autotests/TestInitializationSql.java index 722f8789..6bb523e4 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationSql.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationSql.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationStatemachine.java b/src/java/autotests/io/qt/autotests/TestInitializationStatemachine.java index ba032e1e..d95107eb 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationStatemachine.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationStatemachine.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationSvg.java b/src/java/autotests/io/qt/autotests/TestInitializationSvg.java index ffd09b6c..bd70281c 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationSvg.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationSvg.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationSvgWidgets.java b/src/java/autotests/io/qt/autotests/TestInitializationSvgWidgets.java index e7d01de9..7a63ac82 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationSvgWidgets.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationSvgWidgets.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationTest.java b/src/java/autotests/io/qt/autotests/TestInitializationTest.java index 47e719ac..1f10be1f 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationTest.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationTest.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationTextToSpeech.java b/src/java/autotests/io/qt/autotests/TestInitializationTextToSpeech.java index e2467c37..01265858 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationTextToSpeech.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationTextToSpeech.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationUITools.java b/src/java/autotests/io/qt/autotests/TestInitializationUITools.java index 7f2879c9..83480bc7 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationUITools.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationUITools.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationVirtualKeyboard.java b/src/java/autotests/io/qt/autotests/TestInitializationVirtualKeyboard.java index 5515acb6..48fbf2fb 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationVirtualKeyboard.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationVirtualKeyboard.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationWebChannel.java b/src/java/autotests/io/qt/autotests/TestInitializationWebChannel.java index 84b902aa..94914061 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationWebChannel.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationWebChannel.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationWebEngine.java b/src/java/autotests/io/qt/autotests/TestInitializationWebEngine.java index 7cf72371..62f8107d 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationWebEngine.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationWebEngine.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationWebEngineCore.java b/src/java/autotests/io/qt/autotests/TestInitializationWebEngineCore.java index 2f839c71..3f694b73 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationWebEngineCore.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationWebEngineCore.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationWebEngineQuick.java b/src/java/autotests/io/qt/autotests/TestInitializationWebEngineQuick.java index 1e4e8276..bbf1a8c4 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationWebEngineQuick.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationWebEngineQuick.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -29,12 +29,45 @@ ****************************************************************************/ package io.qt.autotests; +import static org.junit.Assume.assumeTrue; + import org.junit.Assert; import org.junit.Test; +import io.qt.core.QByteArray; +import io.qt.core.QCoreApplication; +import io.qt.core.QList; +import io.qt.core.QLogging; +import io.qt.core.QObject; +import io.qt.core.QTimer; +import io.qt.core.Qt; +import io.qt.core.QtMsgType; +import io.qt.gui.*; +import io.qt.qml.QQmlApplicationEngine; +import io.qt.webengine.core.QWebEngineProfile; +import io.qt.webengine.core.QWebEngineSettings; +import io.qt.widgets.QApplication; + public class TestInitializationWebEngineQuick extends UnitTestInitializer { @Test public void initialize() { Assert.assertTrue(io.qt.QtUtilities.initializePackage("io.qt.webengine.quick")); + QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_ShareOpenGLContexts); + io.qt.webengine.quick.QtWebEngineQuick.initialize(); + QGuiApplication.initialize(new String[0]); + QLogging.qInstallLoggingMessageHandler(QtMsgType.QtWarningMsg); + assumeTrue("A screen is required to create a window.", QGuiApplication.primaryScreen()!=null); + assumeTrue("global share context not available.", QOpenGLContext.globalShareContext()!=null); + QWebEngineProfile.defaultProfile().settings().setAttribute(QWebEngineSettings.WebAttribute.PluginsEnabled, true); + QWebEngineProfile.defaultProfile().settings().setAttribute(QWebEngineSettings.WebAttribute.DnsPrefetchEnabled, true); + QWebEngineProfile.defaultProfile().setPersistentCookiesPolicy(QWebEngineProfile.PersistentCookiesPolicy.AllowPersistentCookies); + QQmlApplicationEngine engine = new QQmlApplicationEngine(); + engine.loadData(new QByteArray("import QtWebEngine\nWebEngineView{\n" + + "url: \"http://info.cern.ch/\"\n" + + "}")); + QList rootObjects = engine.rootObjects(); + Assert.assertTrue(rootObjects.get(0)!=null); + QTimer.singleShot(2000, QApplication::quit); + QApplication.exec(); } } diff --git a/src/java/autotests/io/qt/autotests/TestInitializationWebEngineWidgets.java b/src/java/autotests/io/qt/autotests/TestInitializationWebEngineWidgets.java index f43bac12..1fabbf68 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationWebEngineWidgets.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationWebEngineWidgets.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -32,22 +32,22 @@ import org.junit.Assert; import org.junit.Test; -import io.qt.core.QCoreApplication; -import io.qt.core.Qt; +import io.qt.core.*; import io.qt.webengine.core.*; import io.qt.webengine.widgets.*; -import io.qt.widgets.QApplication; +import io.qt.widgets.*; public class TestInitializationWebEngineWidgets extends UnitTestInitializer { @Test public void initialize() { - Assert.assertTrue(io.qt.QtUtilities.initializePackage("io.qt.webengine.widgets")); + Assert.assertTrue(io.qt.QtUtilities.initializePackage("io.qt.webengine.widgets")); QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_ShareOpenGLContexts); QApplication.initialize(new String[0]); QWebEngineProfile.defaultProfile().settings().setAttribute(QWebEngineSettings.WebAttribute.PluginsEnabled, true); QWebEngineProfile.defaultProfile().settings().setAttribute(QWebEngineSettings.WebAttribute.DnsPrefetchEnabled, true); QWebEngineProfile.defaultProfile().setPersistentCookiesPolicy(QWebEngineProfile.PersistentCookiesPolicy.AllowPersistentCookies); QWebEngineView window = new QWebEngineView(); + window.setUrl("http://info.cern.ch"); window.show(); QApplication.processEvents(); window.hide(); diff --git a/src/java/autotests/io/qt/autotests/TestInitializationWebSockets.java b/src/java/autotests/io/qt/autotests/TestInitializationWebSockets.java index 695bbad9..2cdd9158 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationWebSockets.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationWebSockets.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationWebView.java b/src/java/autotests/io/qt/autotests/TestInitializationWebView.java index 91b8d276..cdfb3e8a 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationWebView.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationWebView.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationWidgets.java b/src/java/autotests/io/qt/autotests/TestInitializationWidgets.java index 21f1b6a1..61dcaaf3 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationWidgets.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationWidgets.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationWinExtras.java b/src/java/autotests/io/qt/autotests/TestInitializationWinExtras.java index f62cc9f8..8b15e993 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationWinExtras.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationWinExtras.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationX11Extras.java b/src/java/autotests/io/qt/autotests/TestInitializationX11Extras.java index 9abd47b1..edc424e6 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationX11Extras.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationX11Extras.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationXml.java b/src/java/autotests/io/qt/autotests/TestInitializationXml.java index 5557efc1..c4e15933 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationXml.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationXml.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInitializationXmlPatterns.java b/src/java/autotests/io/qt/autotests/TestInitializationXmlPatterns.java index c5ac2da0..748f62ff 100644 --- a/src/java/autotests/io/qt/autotests/TestInitializationXmlPatterns.java +++ b/src/java/autotests/io/qt/autotests/TestInitializationXmlPatterns.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInjectedCode.java b/src/java/autotests/io/qt/autotests/TestInjectedCode.java index fc01c4d0..eb1ba911 100644 --- a/src/java/autotests/io/qt/autotests/TestInjectedCode.java +++ b/src/java/autotests/io/qt/autotests/TestInjectedCode.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -651,7 +651,7 @@ public void testQLockFile_getLockInfo() { lockFile.unlock(); lockFile.removeStaleLockFile(); assertEquals(QCoreApplication.applicationPid(), info.pid); - if(!QOperatingSystemVersion.current().isAnyOfType(QOperatingSystemVersion.OSType.Android)) { + if(!QOperatingSystemVersion.current().isAnyOfType(QOperatingSystemVersion.OSType.Android) && !QCoreApplication.applicationFilePath().isEmpty()) { QFileInfo applicationFilePath = new QFileInfo(QCoreApplication.applicationFilePath()); String fileName = applicationFilePath.fileName(); if(fileName.endsWith(".exe")) { @@ -1725,6 +1725,8 @@ public void testByteArrayFrombytearray() { @Test public void testByteArray() { io.qt.core.QByteArray bv = new io.qt.core.QByteArray("Byte\0Array"); + for(Byte b : bv) { + } assertArrayEquals("Byte\0Array".getBytes(), bv.toArray()); assertEquals("Byte\0Array", new String(bv.toArray())); bv.dispose(); diff --git a/src/java/autotests/io/qt/autotests/TestInjectedCodeQt5.java b/src/java/autotests/io/qt/autotests/TestInjectedCodeQt5.java index c09f97fe..499c7371 100644 --- a/src/java/autotests/io/qt/autotests/TestInjectedCodeQt5.java +++ b/src/java/autotests/io/qt/autotests/TestInjectedCodeQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestInjectedCodeQt6.java b/src/java/autotests/io/qt/autotests/TestInjectedCodeQt6.java index 34ca78ef..f3a29457 100644 --- a/src/java/autotests/io/qt/autotests/TestInjectedCodeQt6.java +++ b/src/java/autotests/io/qt/autotests/TestInjectedCodeQt6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -45,6 +45,8 @@ public class TestInjectedCodeQt6 extends ApplicationInitializer { @Test public void testByteArrayView() { io.qt.core.QByteArrayView bv = new io.qt.core.QByteArrayView("ByteArray\0View".getBytes()); + for(Byte b : bv) { + } assertEquals(new io.qt.core.QByteArray("ByteArray\0View".getBytes()), bv.toByteArray()); assertEquals("ByteArray\0View", bv.toString()); assertEquals("ByteArray\0View", new String(bv.toArray())); diff --git a/src/java/autotests/io/qt/autotests/TestInterfaces.java b/src/java/autotests/io/qt/autotests/TestInterfaces.java index 267caa89..a4058f17 100644 --- a/src/java/autotests/io/qt/autotests/TestInterfaces.java +++ b/src/java/autotests/io/qt/autotests/TestInterfaces.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestItemEditorCreator.java b/src/java/autotests/io/qt/autotests/TestItemEditorCreator.java index 792473a7..5ac20e87 100644 --- a/src/java/autotests/io/qt/autotests/TestItemEditorCreator.java +++ b/src/java/autotests/io/qt/autotests/TestItemEditorCreator.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestIterators.java b/src/java/autotests/io/qt/autotests/TestIterators.java index fa567c2e..5a749e40 100644 --- a/src/java/autotests/io/qt/autotests/TestIterators.java +++ b/src/java/autotests/io/qt/autotests/TestIterators.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestLocationInjectedCode.java b/src/java/autotests/io/qt/autotests/TestLocationInjectedCode.java index 9397d964..29ae9eb3 100644 --- a/src/java/autotests/io/qt/autotests/TestLocationInjectedCode.java +++ b/src/java/autotests/io/qt/autotests/TestLocationInjectedCode.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementNonPolymorphicObject.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementNonPolymorphicObject.java index fd654696..a89f3cf7 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementNonPolymorphicObject.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementNonPolymorphicObject.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementNonPolymorphicOwnedObject.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementNonPolymorphicOwnedObject.java index ed966ed9..b93af178 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementNonPolymorphicOwnedObject.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementNonPolymorphicOwnedObject.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicObject.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicObject.java index ad23a68d..31b453bb 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicObject.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicObject.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicObjectInterfaces.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicObjectInterfaces.java index 5ff79310..95511d1f 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicObjectInterfaces.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicObjectInterfaces.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicOwnedObject.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicOwnedObject.java index aec5c6d0..b825feab 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicOwnedObject.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicOwnedObject.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicOwnedObjectInterfaces.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicOwnedObjectInterfaces.java index f3c21f72..5e8aaced 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicOwnedObjectInterfaces.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementPolymorphicOwnedObjectInterfaces.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementQObjectType.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementQObjectType.java index 973e083b..0f9bc486 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementQObjectType.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementQObjectType.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementQObjectTypeInterfaces.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementQObjectTypeInterfaces.java index 5a534c48..b3c65c08 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementQObjectTypeInterfaces.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementQObjectTypeInterfaces.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedNonPolymorphicObject.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedNonPolymorphicObject.java index cf2ab055..bcb8473c 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedNonPolymorphicObject.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedNonPolymorphicObject.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedPolymorphicObject.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedPolymorphicObject.java index e3f7d81f..aaa8f5b7 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedPolymorphicObject.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedPolymorphicObject.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedPolymorphicObjectInterfaces.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedPolymorphicObjectInterfaces.java index a2d87d98..69cae683 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedPolymorphicObjectInterfaces.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedPolymorphicObjectInterfaces.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedQObjectType.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedQObjectType.java index 071838c5..783a1389 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedQObjectType.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedQObjectType.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedQObjectTypeInterfaces.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedQObjectTypeInterfaces.java index 51d55c59..e9661651 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedQObjectTypeInterfaces.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementSharedQObjectTypeInterfaces.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMemoryManagementValueType.java b/src/java/autotests/io/qt/autotests/TestMemoryManagementValueType.java index 4e174fb9..d8adf0cb 100644 --- a/src/java/autotests/io/qt/autotests/TestMemoryManagementValueType.java +++ b/src/java/autotests/io/qt/autotests/TestMemoryManagementValueType.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMetaObject.java b/src/java/autotests/io/qt/autotests/TestMetaObject.java index cf64cb80..67892dbe 100644 --- a/src/java/autotests/io/qt/autotests/TestMetaObject.java +++ b/src/java/autotests/io/qt/autotests/TestMetaObject.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMetaObjectQtMetaCast.java b/src/java/autotests/io/qt/autotests/TestMetaObjectQtMetaCast.java index 576ba0cc..aa06068d 100644 --- a/src/java/autotests/io/qt/autotests/TestMetaObjectQtMetaCast.java +++ b/src/java/autotests/io/qt/autotests/TestMetaObjectQtMetaCast.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMetaProgramming.java b/src/java/autotests/io/qt/autotests/TestMetaProgramming.java index 21c2e924..60b0f81b 100644 --- a/src/java/autotests/io/qt/autotests/TestMetaProgramming.java +++ b/src/java/autotests/io/qt/autotests/TestMetaProgramming.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -1952,6 +1952,7 @@ public double applyAsDouble(double progress) { Class parameter = QSet.class; invokableMethod = b.metaObject().method("test", parameter); Assert.assertTrue(invokableMethod!=null); + Assert.assertEquals("test(QSet)", invokableMethod.cppMethodSignature().toString()); b.invoked.set(false); b.parameter = null; Object value = QSet.of(new QSpinBox(), new QDoubleSpinBox()); diff --git a/src/java/autotests/io/qt/autotests/TestMetaProgrammingQt5.java b/src/java/autotests/io/qt/autotests/TestMetaProgrammingQt5.java index 5e55a882..299f84b7 100644 --- a/src/java/autotests/io/qt/autotests/TestMetaProgrammingQt5.java +++ b/src/java/autotests/io/qt/autotests/TestMetaProgrammingQt5.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMetaProgrammingQt6.java b/src/java/autotests/io/qt/autotests/TestMetaProgrammingQt6.java index a57e5983..f8f164ca 100644 --- a/src/java/autotests/io/qt/autotests/TestMetaProgrammingQt6.java +++ b/src/java/autotests/io/qt/autotests/TestMetaProgrammingQt6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMetaType.java b/src/java/autotests/io/qt/autotests/TestMetaType.java index ae2ed1b0..74937935 100644 --- a/src/java/autotests/io/qt/autotests/TestMetaType.java +++ b/src/java/autotests/io/qt/autotests/TestMetaType.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -73,14 +73,14 @@ public static void testInitialize() throws Exception { @Test public void testFromClassLoader() throws Exception { Assume.assumeTrue("Qt version >= 6.0", QLibraryInfo.version().compareTo(new QVersionNumber(6,0))>=0); - Assume.assumeTrue("no qtjambi.antcontrib set", System.getProperties().containsKey("qtjambi.antcontrib")); + Assume.assumeTrue("no qtjambi.antcontrib set", System.getProperties().stringPropertyNames().contains("qtjambi.antcontrib")); try(URLClassLoader cl = new URLClassLoader(new URL[]{new File(System.getProperty("qtjambi.antcontrib", ".")).toURI().toURL()})){ Class cls2 = cl.loadClass("org.apache.tools.ant.taskdefs.Echo"); QtUtilities.usePackageContentAsGadgets(cls2.getPackage().getName()); QtUtilities.usePackageContentAsGadgets("org.apache.tools.ant"); QMetaObject mo2 = QMetaObject.forType(cls2); QMetaProperty location = mo2.property("location"); - assertEquals("org::apache::tools::ant::Location*", location.typeName()); + assertEquals("JObjectWrapper", location.typeName()); // mo2.properties().forEach(p->System.out.println(p.typeName()+" "+p.name()+" ("+p.userType()+" "+p.classType()+")")); } } diff --git a/src/java/autotests/io/qt/autotests/TestMetaTypeQt6.java b/src/java/autotests/io/qt/autotests/TestMetaTypeQt6.java index c7a21d85..50710d1a 100644 --- a/src/java/autotests/io/qt/autotests/TestMetaTypeQt6.java +++ b/src/java/autotests/io/qt/autotests/TestMetaTypeQt6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMultiSignals.java b/src/java/autotests/io/qt/autotests/TestMultiSignals.java index f0a463e7..718059a0 100644 --- a/src/java/autotests/io/qt/autotests/TestMultiSignals.java +++ b/src/java/autotests/io/qt/autotests/TestMultiSignals.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMultimediaCloneableQt5.java b/src/java/autotests/io/qt/autotests/TestMultimediaCloneableQt5.java index 06e06103..4ad2793e 100644 --- a/src/java/autotests/io/qt/autotests/TestMultimediaCloneableQt5.java +++ b/src/java/autotests/io/qt/autotests/TestMultimediaCloneableQt5.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMultimediaCloneableQt6.java b/src/java/autotests/io/qt/autotests/TestMultimediaCloneableQt6.java index ccc56cea..ad94583d 100644 --- a/src/java/autotests/io/qt/autotests/TestMultimediaCloneableQt6.java +++ b/src/java/autotests/io/qt/autotests/TestMultimediaCloneableQt6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMultimediaInjectedCodeQt5.java b/src/java/autotests/io/qt/autotests/TestMultimediaInjectedCodeQt5.java index ec13f036..ae22eb45 100644 --- a/src/java/autotests/io/qt/autotests/TestMultimediaInjectedCodeQt5.java +++ b/src/java/autotests/io/qt/autotests/TestMultimediaInjectedCodeQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestMultimediaServicesQt5.java b/src/java/autotests/io/qt/autotests/TestMultimediaServicesQt5.java index d076a680..3c1d5df4 100644 --- a/src/java/autotests/io/qt/autotests/TestMultimediaServicesQt5.java +++ b/src/java/autotests/io/qt/autotests/TestMultimediaServicesQt5.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestNamespace.java b/src/java/autotests/io/qt/autotests/TestNamespace.java index 872e008e..07ac70cc 100644 --- a/src/java/autotests/io/qt/autotests/TestNamespace.java +++ b/src/java/autotests/io/qt/autotests/TestNamespace.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestNativeInterfacesQt6.java b/src/java/autotests/io/qt/autotests/TestNativeInterfacesQt6.java index 39903bd2..c1f3f9fb 100644 --- a/src/java/autotests/io/qt/autotests/TestNativeInterfacesQt6.java +++ b/src/java/autotests/io/qt/autotests/TestNativeInterfacesQt6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestNativePointer.java b/src/java/autotests/io/qt/autotests/TestNativePointer.java index 83eecd36..2dbd9481 100644 --- a/src/java/autotests/io/qt/autotests/TestNativePointer.java +++ b/src/java/autotests/io/qt/autotests/TestNativePointer.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestNetworkCloneable.java b/src/java/autotests/io/qt/autotests/TestNetworkCloneable.java index 2d78c171..e8cd4d97 100644 --- a/src/java/autotests/io/qt/autotests/TestNetworkCloneable.java +++ b/src/java/autotests/io/qt/autotests/TestNetworkCloneable.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestNetworkCloneableQt5.java b/src/java/autotests/io/qt/autotests/TestNetworkCloneableQt5.java index 1dba23c7..98a3f5e3 100644 --- a/src/java/autotests/io/qt/autotests/TestNetworkCloneableQt5.java +++ b/src/java/autotests/io/qt/autotests/TestNetworkCloneableQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestNetworkConnections.java b/src/java/autotests/io/qt/autotests/TestNetworkConnections.java index 8a41465e..57a8b6fa 100644 --- a/src/java/autotests/io/qt/autotests/TestNetworkConnections.java +++ b/src/java/autotests/io/qt/autotests/TestNetworkConnections.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestNetworkInjectedCode.java b/src/java/autotests/io/qt/autotests/TestNetworkInjectedCode.java index 9a3f9308..947aeb54 100644 --- a/src/java/autotests/io/qt/autotests/TestNetworkInjectedCode.java +++ b/src/java/autotests/io/qt/autotests/TestNetworkInjectedCode.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestNetworkThreadAffinity.java b/src/java/autotests/io/qt/autotests/TestNetworkThreadAffinity.java index 2d28baaa..3883d7b8 100644 --- a/src/java/autotests/io/qt/autotests/TestNetworkThreadAffinity.java +++ b/src/java/autotests/io/qt/autotests/TestNetworkThreadAffinity.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestNonVirtualOverride.java b/src/java/autotests/io/qt/autotests/TestNonVirtualOverride.java index 2de12a9b..3f6d3475 100644 --- a/src/java/autotests/io/qt/autotests/TestNonVirtualOverride.java +++ b/src/java/autotests/io/qt/autotests/TestNonVirtualOverride.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestNullPointers.java b/src/java/autotests/io/qt/autotests/TestNullPointers.java index b07e437d..17a39579 100644 --- a/src/java/autotests/io/qt/autotests/TestNullPointers.java +++ b/src/java/autotests/io/qt/autotests/TestNullPointers.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestOpenGLCloneable.java b/src/java/autotests/io/qt/autotests/TestOpenGLCloneable.java index 0374a5b7..0d61df15 100644 --- a/src/java/autotests/io/qt/autotests/TestOpenGLCloneable.java +++ b/src/java/autotests/io/qt/autotests/TestOpenGLCloneable.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestOpenGLVersionFunctionsQt6.java b/src/java/autotests/io/qt/autotests/TestOpenGLVersionFunctionsQt6.java index 95ecbea3..4513a05f 100644 --- a/src/java/autotests/io/qt/autotests/TestOpenGLVersionFunctionsQt6.java +++ b/src/java/autotests/io/qt/autotests/TestOpenGLVersionFunctionsQt6.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestOverrideCursor.java b/src/java/autotests/io/qt/autotests/TestOverrideCursor.java index 67210166..27b83c61 100644 --- a/src/java/autotests/io/qt/autotests/TestOverrideCursor.java +++ b/src/java/autotests/io/qt/autotests/TestOverrideCursor.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestOwnedDestruction.java b/src/java/autotests/io/qt/autotests/TestOwnedDestruction.java index b7b2c277..e19b7d82 100644 --- a/src/java/autotests/io/qt/autotests/TestOwnedDestruction.java +++ b/src/java/autotests/io/qt/autotests/TestOwnedDestruction.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestPaintEngine.java b/src/java/autotests/io/qt/autotests/TestPaintEngine.java index f6937f4b..2a8a9ba4 100644 --- a/src/java/autotests/io/qt/autotests/TestPaintEngine.java +++ b/src/java/autotests/io/qt/autotests/TestPaintEngine.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -116,7 +116,13 @@ public void testPaintEngineState() { painter.setFont(f); painter.drawRect(1, 2, 3, 4); painter.end(); - Assert.assertEquals(f.toString(), ""+fontResult[0]); + Assert.assertTrue("fontResult[0] is null", fontResult[0]!=null); + Assert.assertEquals(f.family(), fontResult[0].family()); + Assert.assertEquals(f.pointSize(), fontResult[0].pointSize()); + Assert.assertEquals(f.weight(), fontResult[0].weight()); + Assert.assertEquals(f.style(), fontResult[0].style()); + Assert.assertEquals(f.underline(), fontResult[0].underline()); + Assert.assertEquals(f.strikeOut(), fontResult[0].strikeOut()); } // For ARM float/double conversion values must be within precision of a float diff --git a/src/java/autotests/io/qt/autotests/TestPaintOnWidget.java b/src/java/autotests/io/qt/autotests/TestPaintOnWidget.java index e3290c03..bd8d5fde 100644 --- a/src/java/autotests/io/qt/autotests/TestPaintOnWidget.java +++ b/src/java/autotests/io/qt/autotests/TestPaintOnWidget.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestPaintOnWidgetQt5.java b/src/java/autotests/io/qt/autotests/TestPaintOnWidgetQt5.java index 52c5ebb0..da3e6da3 100644 --- a/src/java/autotests/io/qt/autotests/TestPaintOnWidgetQt5.java +++ b/src/java/autotests/io/qt/autotests/TestPaintOnWidgetQt5.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestPaintOnWidgetQt6.java b/src/java/autotests/io/qt/autotests/TestPaintOnWidgetQt6.java index 3f0b0b61..0ab10e8b 100644 --- a/src/java/autotests/io/qt/autotests/TestPaintOnWidgetQt6.java +++ b/src/java/autotests/io/qt/autotests/TestPaintOnWidgetQt6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestPlugin.java b/src/java/autotests/io/qt/autotests/TestPlugin.java index ed65aa32..d1f3fa70 100644 --- a/src/java/autotests/io/qt/autotests/TestPlugin.java +++ b/src/java/autotests/io/qt/autotests/TestPlugin.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestPluginImageFormats.java b/src/java/autotests/io/qt/autotests/TestPluginImageFormats.java index aa6530b0..94fff28a 100644 --- a/src/java/autotests/io/qt/autotests/TestPluginImageFormats.java +++ b/src/java/autotests/io/qt/autotests/TestPluginImageFormats.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestPolymorphicTypes.java b/src/java/autotests/io/qt/autotests/TestPolymorphicTypes.java index 7b2a524b..11595dca 100644 --- a/src/java/autotests/io/qt/autotests/TestPolymorphicTypes.java +++ b/src/java/autotests/io/qt/autotests/TestPolymorphicTypes.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestPrivateSignals.java b/src/java/autotests/io/qt/autotests/TestPrivateSignals.java index 577a2ae0..5fb39951 100644 --- a/src/java/autotests/io/qt/autotests/TestPrivateSignals.java +++ b/src/java/autotests/io/qt/autotests/TestPrivateSignals.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestPropertyAndMethodCall.java b/src/java/autotests/io/qt/autotests/TestPropertyAndMethodCall.java index fbf81e1e..a7b55f2c 100644 --- a/src/java/autotests/io/qt/autotests/TestPropertyAndMethodCall.java +++ b/src/java/autotests/io/qt/autotests/TestPropertyAndMethodCall.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQBindableQt65.java b/src/java/autotests/io/qt/autotests/TestQBindableQt65.java index 55857993..8bc3793c 100644 --- a/src/java/autotests/io/qt/autotests/TestQBindableQt65.java +++ b/src/java/autotests/io/qt/autotests/TestQBindableQt65.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQDataStream.java b/src/java/autotests/io/qt/autotests/TestQDataStream.java index 32f974d9..f927b1fd 100644 --- a/src/java/autotests/io/qt/autotests/TestQDataStream.java +++ b/src/java/autotests/io/qt/autotests/TestQDataStream.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQFlags.java b/src/java/autotests/io/qt/autotests/TestQFlags.java index 54693c40..c55fb2d2 100644 --- a/src/java/autotests/io/qt/autotests/TestQFlags.java +++ b/src/java/autotests/io/qt/autotests/TestQFlags.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQFunctionPointer.java b/src/java/autotests/io/qt/autotests/TestQFunctionPointer.java index e82812fa..8c0eef9f 100644 --- a/src/java/autotests/io/qt/autotests/TestQFunctionPointer.java +++ b/src/java/autotests/io/qt/autotests/TestQFunctionPointer.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -57,6 +57,7 @@ import io.qt.core.QRect; import io.qt.core.QRectF; import io.qt.core.QStringList; +import io.qt.core.QSysInfo; import io.qt.core.Qt; import io.qt.gui.QColor; import io.qt.gui.QFont; @@ -69,7 +70,6 @@ public void testFunctionExtraction() { List list = new ArrayList<>(); QEasingCurve c = new QEasingCurve(); - c.setType(QEasingCurve.Type.Custom); for (int i = 0; i < 5; ++i) { int _i = i; QEasingCurve.EasingFunction f = d->d/(_i+1); @@ -244,14 +244,16 @@ public void testReturningFunctions_char() throws Throwable { @Test public void testReturningFunctions_QChar() throws Throwable { - Assume.assumeFalse(QOperatingSystemVersion.current().isAnyOfType(QOperatingSystemVersion.OSType.Android)); + Assume.assumeFalse("Cannot run on Android", QOperatingSystemVersion.current().isAnyOfType(QOperatingSystemVersion.OSType.Android)); + Assume.assumeFalse("Cannot run on Windows arm64", QOperatingSystemVersion.current().isAnyOfType(QOperatingSystemVersion.OSType.Windows) && QSysInfo.buildCpuArchitecture().equals("arm64")); QFunctionPointer fp = FunctionalTest.getFunction(25); Assert.assertEquals((Object)'W', fp.invoke(char.class, 'W')); } @Test public void testReturningFunctions_flags() throws Throwable { - Assume.assumeFalse(QOperatingSystemVersion.current().isAnyOfType(QOperatingSystemVersion.OSType.Android)); + Assume.assumeFalse("Cannot run on Android", QOperatingSystemVersion.current().isAnyOfType(QOperatingSystemVersion.OSType.Android)); + Assume.assumeFalse("Cannot run on Windows arm64", QOperatingSystemVersion.current().isAnyOfType(QOperatingSystemVersion.OSType.Windows) && QSysInfo.buildCpuArchitecture().equals("arm64")); QFunctionPointer fp = FunctionalTest.getFunction(45); Assert.assertEquals(Qt.AlignmentFlag.AlignVCenter.combined(Qt.AlignmentFlag.AlignJustify), fp.invoke(Qt.Alignment.class)); fp = FunctionalTest.getFunction(32); @@ -289,6 +291,7 @@ public void testReturningFunctions_pointer() throws Throwable { @Test public void testStructReturningFunctions() throws Throwable { Assume.assumeTrue("Windows only", QOperatingSystemVersion.current().isAnyOfType(OSType.Windows)); + Assume.assumeFalse("Cannot run on Windows arm64", QOperatingSystemVersion.current().isAnyOfType(QOperatingSystemVersion.OSType.Windows) && QSysInfo.buildCpuArchitecture().equals("arm64")); QFunctionPointer fp = FunctionalTest.getFunction(34); Object variant = new Object(); Assert.assertEquals(variant, fp.invoke(QGenericArgument.returning(new QMetaType(QMetaType.Type.QVariant)), QGenericArgument.of(variant).as(new QMetaType(QMetaType.Type.QVariant)).asConstRef())); @@ -445,6 +448,7 @@ public void testFunctionPointerCast() throws Throwable { @Test public void testStructReturningFunctionPointerCast() throws Throwable { Assume.assumeTrue("Windows only", QOperatingSystemVersion.current().isAnyOfType(OSType.Windows)); + Assume.assumeFalse("Cannot run on Windows arm64", QOperatingSystemVersion.current().isAnyOfType(QOperatingSystemVersion.OSType.Windows) && QSysInfo.buildCpuArchitecture().equals("arm64")); QObject obj = new QObject(); obj.setObjectName("QObject Test"); diff --git a/src/java/autotests/io/qt/autotests/TestQImage.java b/src/java/autotests/io/qt/autotests/TestQImage.java index f2b8c00c..b6552d44 100644 --- a/src/java/autotests/io/qt/autotests/TestQImage.java +++ b/src/java/autotests/io/qt/autotests/TestQImage.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQLayout.java b/src/java/autotests/io/qt/autotests/TestQLayout.java index 0445aa6a..2b076752 100644 --- a/src/java/autotests/io/qt/autotests/TestQLayout.java +++ b/src/java/autotests/io/qt/autotests/TestQLayout.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQMessageHandler.java b/src/java/autotests/io/qt/autotests/TestQMessageHandler.java index e9c4246e..931bc7d5 100644 --- a/src/java/autotests/io/qt/autotests/TestQMessageHandler.java +++ b/src/java/autotests/io/qt/autotests/TestQMessageHandler.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQObject.java b/src/java/autotests/io/qt/autotests/TestQObject.java index 2bc058a1..d8441438 100644 --- a/src/java/autotests/io/qt/autotests/TestQObject.java +++ b/src/java/autotests/io/qt/autotests/TestQObject.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQObjectPropertyQt6.java b/src/java/autotests/io/qt/autotests/TestQObjectPropertyQt6.java index c6772093..6f2b136a 100644 --- a/src/java/autotests/io/qt/autotests/TestQObjectPropertyQt6.java +++ b/src/java/autotests/io/qt/autotests/TestQObjectPropertyQt6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQPair.java b/src/java/autotests/io/qt/autotests/TestQPair.java index cbdbc2ed..22c51774 100644 --- a/src/java/autotests/io/qt/autotests/TestQPair.java +++ b/src/java/autotests/io/qt/autotests/TestQPair.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQPdfWidgets.java b/src/java/autotests/io/qt/autotests/TestQPdfWidgets.java index 2e12bf52..d503c401 100644 --- a/src/java/autotests/io/qt/autotests/TestQPdfWidgets.java +++ b/src/java/autotests/io/qt/autotests/TestQPdfWidgets.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQPermissionQt65.java b/src/java/autotests/io/qt/autotests/TestQPermissionQt65.java index 668a2b6a..d818fa90 100644 --- a/src/java/autotests/io/qt/autotests/TestQPermissionQt65.java +++ b/src/java/autotests/io/qt/autotests/TestQPermissionQt65.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQPropertyQt6.java b/src/java/autotests/io/qt/autotests/TestQPropertyQt6.java index b34991c8..e538bb8b 100644 --- a/src/java/autotests/io/qt/autotests/TestQPropertyQt6.java +++ b/src/java/autotests/io/qt/autotests/TestQPropertyQt6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQQmlListProperty.java b/src/java/autotests/io/qt/autotests/TestQQmlListProperty.java index 305ee1b0..940c1b5e 100644 --- a/src/java/autotests/io/qt/autotests/TestQQmlListProperty.java +++ b/src/java/autotests/io/qt/autotests/TestQQmlListProperty.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQScriptEngine.java b/src/java/autotests/io/qt/autotests/TestQScriptEngine.java index a52be419..f262b1c0 100644 --- a/src/java/autotests/io/qt/autotests/TestQScriptEngine.java +++ b/src/java/autotests/io/qt/autotests/TestQScriptEngine.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQScriptValue.java b/src/java/autotests/io/qt/autotests/TestQScriptValue.java index 16590e59..0db0b994 100644 --- a/src/java/autotests/io/qt/autotests/TestQScriptValue.java +++ b/src/java/autotests/io/qt/autotests/TestQScriptValue.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQSettings.java b/src/java/autotests/io/qt/autotests/TestQSettings.java index 2ba05fa2..5cb8fa7a 100644 --- a/src/java/autotests/io/qt/autotests/TestQSettings.java +++ b/src/java/autotests/io/qt/autotests/TestQSettings.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQSslSocket.java b/src/java/autotests/io/qt/autotests/TestQSslSocket.java index 8b4bd282..1670c5b5 100644 --- a/src/java/autotests/io/qt/autotests/TestQSslSocket.java +++ b/src/java/autotests/io/qt/autotests/TestQSslSocket.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQTest.java b/src/java/autotests/io/qt/autotests/TestQTest.java index 9b576d85..99ca3697 100644 --- a/src/java/autotests/io/qt/autotests/TestQTest.java +++ b/src/java/autotests/io/qt/autotests/TestQTest.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQTextStream.java b/src/java/autotests/io/qt/autotests/TestQTextStream.java index 41f72d1a..e18d591b 100644 --- a/src/java/autotests/io/qt/autotests/TestQTextStream.java +++ b/src/java/autotests/io/qt/autotests/TestQTextStream.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQThread.java b/src/java/autotests/io/qt/autotests/TestQThread.java index 13b0706e..5a9f3b6e 100644 --- a/src/java/autotests/io/qt/autotests/TestQThread.java +++ b/src/java/autotests/io/qt/autotests/TestQThread.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQThreadPool.java b/src/java/autotests/io/qt/autotests/TestQThreadPool.java index 4055d9a4..30a74623 100644 --- a/src/java/autotests/io/qt/autotests/TestQThreadPool.java +++ b/src/java/autotests/io/qt/autotests/TestQThreadPool.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQTransform.java b/src/java/autotests/io/qt/autotests/TestQTransform.java index 73009c31..2910cb11 100644 --- a/src/java/autotests/io/qt/autotests/TestQTransform.java +++ b/src/java/autotests/io/qt/autotests/TestQTransform.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQVariant.java b/src/java/autotests/io/qt/autotests/TestQVariant.java index c12280c0..7305e48d 100644 --- a/src/java/autotests/io/qt/autotests/TestQVariant.java +++ b/src/java/autotests/io/qt/autotests/TestQVariant.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -1772,7 +1772,7 @@ public void testVariantGC() throws Exception { QObject prop = new QObject(); prop.destroyed.connect(()->destroyed.set(true)); carrier.setProperty("customProperty", prop); - assertEquals("JObjectWrapper", Variants.propertyType(carrier, "customProperty").name().toString()); + assertTrue(Variants.propertyType(carrier, "customProperty").name().toString().startsWith("JObjectWrapper")); assertEquals(new QColor(), Variants.fetchColorProperty(carrier, "customProperty")); assertEquals(prop, Variants.fetchObjectProperty(carrier, "customProperty")); assertEquals(null, Variants.fetchEventProperty(carrier, "customProperty")); @@ -1795,7 +1795,7 @@ public void testVariantGC() throws Exception { QColor prop = new QColor(0xff23ab){}; QtUtilities.getSignalOnDispose(prop).connect(()->destroyed.set(true)); carrier.setProperty("customProperty", prop); - assertEquals("JObjectWrapper", Variants.propertyType(carrier, "customProperty").name().toString()); + assertTrue(Variants.propertyType(carrier, "customProperty").name().toString().startsWith("JObjectWrapper")); assertEquals(prop, Variants.fetchColorProperty(carrier, "customProperty")); assertEquals(null, Variants.fetchObjectProperty(carrier, "customProperty")); assertEquals(null, Variants.fetchEventProperty(carrier, "customProperty")); @@ -1818,7 +1818,7 @@ public void testVariantGC() throws Exception { QEvent prop = new QEvent(QEvent.Type.ActionAdded); QtUtilities.getSignalOnDispose(prop).connect(()->destroyed.set(true)); carrier.setProperty("customProperty", prop); - assertEquals("JObjectWrapper", Variants.propertyType(carrier, "customProperty").name().toString()); + assertTrue(Variants.propertyType(carrier, "customProperty").name().toString().startsWith("JObjectWrapper")); assertEquals(new QColor(), Variants.fetchColorProperty(carrier, "customProperty")); assertEquals(null, Variants.fetchObjectProperty(carrier, "customProperty")); assertEquals(prop, Variants.fetchEventProperty(carrier, "customProperty")); @@ -1841,7 +1841,7 @@ public void testVariantGC() throws Exception { QEvent prop = new QEvent(QEvent.Type.ActionAdded){}; QtUtilities.getSignalOnDispose(prop).connect(()->destroyed.set(true)); carrier.setProperty("customProperty", prop); - assertEquals("JObjectWrapper", Variants.propertyType(carrier, "customProperty").name().toString()); + assertTrue(Variants.propertyType(carrier, "customProperty").name().toString().startsWith("JObjectWrapper")); assertEquals(new QColor(), Variants.fetchColorProperty(carrier, "customProperty")); assertEquals(null, Variants.fetchObjectProperty(carrier, "customProperty")); assertEquals(prop, Variants.fetchEventProperty(carrier, "customProperty")); @@ -1874,7 +1874,7 @@ public void run() { Prop prop = new Prop(); prop.destroyed.connect(()->destroyed.set(true)); carrier.setProperty("customProperty", prop); - assertEquals("JObjectWrapper", Variants.propertyType(carrier, "customProperty").name().toString()); + assertTrue(Variants.propertyType(carrier, "customProperty").name().toString().startsWith("JObjectWrapper")); assertEquals(new QColor(), Variants.fetchColorProperty(carrier, "customProperty")); assertEquals(prop, Variants.fetchObjectProperty(carrier, "customProperty")); assertEquals(null, Variants.fetchEventProperty(carrier, "customProperty")); @@ -1911,7 +1911,7 @@ public void run() { Prop prop = new Prop(); QtUtilities.getSignalOnDispose(prop).connect(()->destroyed.set(true)); carrier.setProperty("customProperty", prop); - assertEquals("JObjectWrapper", Variants.propertyType(carrier, "customProperty").name().toString()); + assertTrue(Variants.propertyType(carrier, "customProperty").name().toString().startsWith("JObjectWrapper")); assertEquals(new QColor(), Variants.fetchColorProperty(carrier, "customProperty")); assertEquals(null, Variants.fetchObjectProperty(carrier, "customProperty")); assertEquals(prop, Variants.fetchEventProperty(carrier, "customProperty")); @@ -1935,7 +1935,7 @@ public void run() { prop.isDisposed(); QtUtilities.getSignalOnDispose(prop).connect(()->destroyed.set(true)); carrier.setProperty("customProperty", prop); - assertEquals("JObjectWrapper", Variants.propertyType(carrier, "customProperty").name().toString()); + assertTrue(Variants.propertyType(carrier, "customProperty").name().toString().startsWith("JObjectWrapper")); assertEquals(new QColor(), Variants.fetchColorProperty(carrier, "customProperty")); assertEquals(null, Variants.fetchObjectProperty(carrier, "customProperty")); assertEquals(null, Variants.fetchEventProperty(carrier, "customProperty")); @@ -1959,7 +1959,7 @@ public void run() { prop.isDisposed(); QtUtilities.getSignalOnDispose(prop).connect(()->destroyed.set(true)); carrier.setProperty("customProperty", prop); - assertEquals("JObjectWrapper", Variants.propertyType(carrier, "customProperty").name().toString()); + assertTrue(Variants.propertyType(carrier, "customProperty").name().toString().startsWith("JObjectWrapper")); assertEquals(new QColor(), Variants.fetchColorProperty(carrier, "customProperty")); assertEquals(null, Variants.fetchObjectProperty(carrier, "customProperty")); assertEquals(null, Variants.fetchEventProperty(carrier, "customProperty")); @@ -1996,7 +1996,7 @@ public void run() { Prop prop = new Prop(); QtUtilities.getSignalOnDispose(prop).connect(()->destroyed.set(true)); carrier.setProperty("customProperty", prop); - assertEquals("JObjectWrapper", Variants.propertyType(carrier, "customProperty").name().toString()); + assertTrue(Variants.propertyType(carrier, "customProperty").name().toString().startsWith("JObjectWrapper")); assertEquals(new QColor(), Variants.fetchColorProperty(carrier, "customProperty")); assertEquals(null, Variants.fetchObjectProperty(carrier, "customProperty")); assertEquals(null, Variants.fetchEventProperty(carrier, "customProperty")); diff --git a/src/java/autotests/io/qt/autotests/TestQVariantQt5.java b/src/java/autotests/io/qt/autotests/TestQVariantQt5.java index 82406b51..805703f8 100644 --- a/src/java/autotests/io/qt/autotests/TestQVariantQt5.java +++ b/src/java/autotests/io/qt/autotests/TestQVariantQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQXmlPatterns.java b/src/java/autotests/io/qt/autotests/TestQXmlPatterns.java index 02696820..730c11df 100644 --- a/src/java/autotests/io/qt/autotests/TestQXmlPatterns.java +++ b/src/java/autotests/io/qt/autotests/TestQXmlPatterns.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQml.java b/src/java/autotests/io/qt/autotests/TestQml.java index 5a04297f..e582a34e 100644 --- a/src/java/autotests/io/qt/autotests/TestQml.java +++ b/src/java/autotests/io/qt/autotests/TestQml.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQml2.java b/src/java/autotests/io/qt/autotests/TestQml2.java index 5b8b2a66..042928bb 100644 --- a/src/java/autotests/io/qt/autotests/TestQml2.java +++ b/src/java/autotests/io/qt/autotests/TestQml2.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQmlInterfacesQt5.java b/src/java/autotests/io/qt/autotests/TestQmlInterfacesQt5.java index d5fe1d53..4c336c3a 100644 --- a/src/java/autotests/io/qt/autotests/TestQmlInterfacesQt5.java +++ b/src/java/autotests/io/qt/autotests/TestQmlInterfacesQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQmlMultimedia.java b/src/java/autotests/io/qt/autotests/TestQmlMultimedia.java index 8435c177..4bdf4e3a 100644 --- a/src/java/autotests/io/qt/autotests/TestQmlMultimedia.java +++ b/src/java/autotests/io/qt/autotests/TestQmlMultimedia.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQmlPlugin.java b/src/java/autotests/io/qt/autotests/TestQmlPlugin.java index 15765776..2861daf5 100644 --- a/src/java/autotests/io/qt/autotests/TestQmlPlugin.java +++ b/src/java/autotests/io/qt/autotests/TestQmlPlugin.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -43,6 +43,7 @@ import io.qt.core.QUrl; import io.qt.qml.QQmlComponent; import io.qt.qml.QQmlEngine; +import io.qt.qml.QtQml; public class TestQmlPlugin extends ApplicationInitializer{ @@ -92,6 +93,7 @@ public void run_testQmlPlugin() { QObject wheel = (QObject)wheelsList.at(i); Assert.assertEquals(53., wheel.property("radius")); } + QtQml.qmlClearTypeRegistrations(); } @Test @@ -141,5 +143,6 @@ public void run_testQmlPlugin2() { QObject wheel = (QObject)wheelsList.at(i); Assert.assertEquals(53., wheel.property("radius")); } + QtQml.qmlClearTypeRegistrations(); } } diff --git a/src/java/autotests/io/qt/autotests/TestQmlQt6.java b/src/java/autotests/io/qt/autotests/TestQmlQt6.java index a73fc277..8a69c022 100644 --- a/src/java/autotests/io/qt/autotests/TestQmlQt6.java +++ b/src/java/autotests/io/qt/autotests/TestQmlQt6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -637,7 +637,7 @@ public void testCustomTypes() { Assert.assertEquals(QMetaType.fromType(CustomGadgetType.class), QVariant.fromValue(new CustomGadgetType()).metaType()); Assert.assertEquals(QMetaType.fromType(CustomValueType.class), QVariant.fromValue(new CustomValueType()).metaType()); - Assert.assertEquals(QMetaType.fromName("JObjectWrapper"), QVariant.fromValue(new ObjectType()).metaType()); + Assert.assertTrue(QVariant.fromValue(new ObjectType()).metaType().name().startsWith("JObjectWrapper<")); // QMetaObject.forType(ObjectType.class).properties().forEach(p->System.out.println(p.typeName()+" "+p.name())); // System.out.println(QMetaType.fromType(java.lang.Runnable.class).flags()); // System.out.println(QMetaObject.forType(Runnable.class).methods()); @@ -744,7 +744,7 @@ public void testAutoGadgetTypes() { Assert.assertEquals(QMetaType.fromType(AutoGadgetType.class), QVariant.fromValue(new AutoGadgetType()).metaType()); Assert.assertEquals(QMetaType.fromType(AutoGadgetValueType.class), QVariant.fromValue(new AutoGadgetValueType()).metaType()); - Assert.assertEquals(QMetaType.fromName("JObjectWrapper"), QVariant.fromValue(new ObjectType()).metaType()); + Assert.assertTrue(QVariant.fromValue(new ObjectType()).metaType().name().startsWith("JObjectWrapper<")); // QMetaObject.forType(ObjectType.class).properties().forEach(p->System.out.println(p.typeName()+" "+p.name())); // System.out.println(QMetaType.fromType(java.lang.Runnable.class).flags()); // System.out.println(QMetaObject.forType(Runnable.class).methods()); diff --git a/src/java/autotests/io/qt/autotests/TestQmlThreadAffinity.java b/src/java/autotests/io/qt/autotests/TestQmlThreadAffinity.java index 3ede2d09..124a9643 100644 --- a/src/java/autotests/io/qt/autotests/TestQmlThreadAffinity.java +++ b/src/java/autotests/io/qt/autotests/TestQmlThreadAffinity.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQmlTypes.java b/src/java/autotests/io/qt/autotests/TestQmlTypes.java index 9619b374..e2d97acb 100644 --- a/src/java/autotests/io/qt/autotests/TestQmlTypes.java +++ b/src/java/autotests/io/qt/autotests/TestQmlTypes.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQmlTypesQt6.java b/src/java/autotests/io/qt/autotests/TestQmlTypesQt6.java index 121298f3..a5b141d1 100644 --- a/src/java/autotests/io/qt/autotests/TestQmlTypesQt6.java +++ b/src/java/autotests/io/qt/autotests/TestQmlTypesQt6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQmlVariantQt6.java b/src/java/autotests/io/qt/autotests/TestQmlVariantQt6.java new file mode 100644 index 00000000..779fbfb0 --- /dev/null +++ b/src/java/autotests/io/qt/autotests/TestQmlVariantQt6.java @@ -0,0 +1,229 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ +package io.qt.autotests; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Test; + +import io.qt.Nullable; +import io.qt.autotests.generated.General; +import io.qt.core.QCoreApplication; +import io.qt.core.QLibraryInfo; +import io.qt.core.QLogging; +import io.qt.core.QMetaMethod; +import io.qt.core.QObject; +import io.qt.core.QVariant; +import io.qt.core.QVersionNumber; +import io.qt.gui.QColor; +import io.qt.gui.QVector3D; +import io.qt.location.QPlaceUser; +import io.qt.qml.QJSEngine; +import io.qt.qml.QQmlComponent; +import io.qt.qml.QQmlEngine; +import io.qt.qml.QQmlListProperty; + +public class TestQmlVariantQt6 extends ApplicationInitializer{ + + static class Custom extends QObject{ + + private String text; + + Custom() { + this(null); + } + + Custom(@Nullable QObject parent) { + super(parent); + text = parent==null ? "qobj-java" : "qobj-c++"; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + } + + static class Context extends QObject{ + QQmlEngine engine; + private String text; + List references = new ArrayList<>(); + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + public final QObject asQObject(Object variant) { + return QVariant.convert(variant, QObject.class); + } + + public final Object data(int type) { + QObject qobj; + switch(type) { + case 0: + return new QVector3D(1, 2, 3); + case 1: + // this object is by default in c++ ownership and should not be GCed + qobj = new Custom(this); + return qobj; + case 2: + // this object is getting JavaScript ownership and should therefore not be GCed + // JavaScript ownership is detected during destruction of QVariant. + qobj = new Custom(); + return qobj; + case 3: + qobj = new Custom(); + references.add(qobj); + QJSEngine.setObjectOwnership(qobj, QJSEngine.ObjectOwnership.JavaOwnership); + return qobj; + case 4: + QPlaceUser pu = new QPlaceUser(); + pu.setUserId("PlaceUserId"); + pu.setName("PlaceUserName"); + return pu; + default: break; + } + return null; + } + } + + public static class MyColor extends QColor{ + public MyColor() { + super(); + } + + public MyColor(MyColor c) { + super(c); + } + + @Override + public MyColor clone() { + return new MyColor(this); + } + } + + @Test + public void test() { + QVariant v = QVariant.fromValue(new MyColor()); + assertEquals(MyColor.class.getName().replace(".", "::").replace("$", "::"), v.metaType().name()); + QLogging.qInstallMessageHandler((t,c,m)->System.out.println(m)); + QQmlEngine engine = new QQmlEngine(); + QQmlComponent component = new QQmlComponent(engine); + Context context = new Context(); + context.engine = engine; + engine.rootContext().setContextProperty("context", context); + String data = "import QtQml\n" + + "QtObject{\n" + + "id: testObject\n" + + "objectName: \"TestObject\"\n" + + "property list variants\n" + + "property list objects\n" + + "property QtObject object\n" + + "function test(){\n" + + "var vec3d = context.data(0);\n" + + "variants.push(vec3d);\n" +// + "console.log(vec3d);\n" + + "var qobj = context.data(1);\n" + + "variants.push(qobj);\n" + + "variants.push(qobj.text);\n" + + "objects.push(qobj);\n" +// + "console.log(qobj);\n" +// + "console.log(qobj.text);\n" + + "var qobj2 = context.data(2);\n" + + "variants.push(qobj2);\n" + + "variants.push(qobj2.text);\n" + + "objects.push(qobj2);\n" + + "object = qobj2;\n" +// + "console.log(qobj2);\n" +// + "console.log(qobj2.text);\n" + + "var qobj3 = context.data(3);\n" + + "variants.push(qobj3);\n" + + "variants.push(qobj3.text);\n" + + "objects.push(qobj3);\n" + + "object = qobj3;\n" +// + "console.log(qobj3);\n" +// + "console.log(qobj3.text);\n" + + "var pu = context.data(4);\n" + + "variants.push(pu);\n" + + "variants.push(pu.name);\n" + + "variants.push(pu.userId);\n" + + "}\n" + + "}"; + component.setData(data, ""); + QObject object = component.create(); + assertTrue(component.errorString(), object!=null); + QMetaMethod testMethod = object.metaObject().method("test"); +// object.metaObject().properties().forEach(p->System.out.println(p.typeName()+" "+p.name())); + testMethod.invoke(object); + System.gc(); + QCoreApplication.processEvents(); + List variants = (List)object.property("variants"); + assertEquals(10, variants.size()); + int i=0; + assertEquals(context.data(0), variants.get(i++)); + assertTrue(variants.get(i++) instanceof Custom); + assertEquals("qobj-c++", variants.get(i++)); + assertTrue(variants.get(i++) instanceof Custom); + assertEquals("qobj-java", variants.get(i++)); + assertTrue(variants.get(i++) instanceof Custom); + assertEquals("qobj-java", variants.get(i++)); + assertTrue(variants.get(i++) instanceof QPlaceUser); + assertEquals("PlaceUserName", variants.get(i++)); + assertEquals("PlaceUserId", variants.get(i++)); + QQmlListProperty objects = (QQmlListProperty)object.property("objects"); + assertEquals(3, objects.count()); + i = 0; + Object c1 = objects.at(i++); + assertTrue(c1 instanceof Custom); + assertEquals(QJSEngine.ObjectOwnership.JavaScriptOwnership, QJSEngine.objectOwnership((QObject)c1)); + assertTrue(General.internalAccess.isCppOwnership((QObject)c1)); + Object c2 = objects.at(i++); + assertTrue(c2 instanceof Custom); + assertEquals(QJSEngine.ObjectOwnership.JavaScriptOwnership, QJSEngine.objectOwnership((QObject)c2)); + assertTrue(General.internalAccess.isCppOwnership((QObject)c2)); + Object c3 = objects.at(i++); + assertTrue(c3 instanceof Custom); + assertEquals(QJSEngine.ObjectOwnership.JavaOwnership, QJSEngine.objectOwnership((QObject)c3)); + assertTrue(General.internalAccess.isJavaOwnership((QObject)c3)); + c3 = object.property("object"); + assertTrue(c3 instanceof Custom); + assertEquals(QJSEngine.ObjectOwnership.JavaOwnership, QJSEngine.objectOwnership((QObject)c3)); + assertTrue(General.internalAccess.isJavaOwnership((QObject)c3)); + } +} diff --git a/src/java/autotests/io/qt/autotests/TestQt3DCore.java b/src/java/autotests/io/qt/autotests/TestQt3DCore.java index d41bad0c..e5868b9c 100644 --- a/src/java/autotests/io/qt/autotests/TestQt3DCore.java +++ b/src/java/autotests/io/qt/autotests/TestQt3DCore.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQtJambiInternal.java b/src/java/autotests/io/qt/autotests/TestQtJambiInternal.java index 283d3728..5c5d47e2 100644 --- a/src/java/autotests/io/qt/autotests/TestQtJambiInternal.java +++ b/src/java/autotests/io/qt/autotests/TestQtJambiInternal.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuick3D.java b/src/java/autotests/io/qt/autotests/TestQuick3D.java index 7801073b..7b35e95c 100644 --- a/src/java/autotests/io/qt/autotests/TestQuick3D.java +++ b/src/java/autotests/io/qt/autotests/TestQuick3D.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuickFramebufferObjectQt5.java b/src/java/autotests/io/qt/autotests/TestQuickFramebufferObjectQt5.java index 9faf3c2e..4759e0ad 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickFramebufferObjectQt5.java +++ b/src/java/autotests/io/qt/autotests/TestQuickFramebufferObjectQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuickFramebufferObjectQt6.java b/src/java/autotests/io/qt/autotests/TestQuickFramebufferObjectQt6.java index cb06912c..b7db5390 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickFramebufferObjectQt6.java +++ b/src/java/autotests/io/qt/autotests/TestQuickFramebufferObjectQt6.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuickInjectedCode.java b/src/java/autotests/io/qt/autotests/TestQuickInjectedCode.java index 515c33d4..8d8ed778 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickInjectedCode.java +++ b/src/java/autotests/io/qt/autotests/TestQuickInjectedCode.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -65,4 +65,25 @@ public void testQSGGeometry_vertexData_TexturedPoint2D() QtObjectInterface p1 = vertexData.get(0); Assert.assertTrue(p1 instanceof QSGGeometry.TexturedPoint2D); } + + @Test + public void testQSGGeometry_AttributeSet() { + QSGGeometry.AttributeSet attributeSet = new QSGGeometry.AttributeSet(5, + new QSGGeometry.Attribute(0, 0, 0, false, QSGGeometry.AttributeType.UnknownAttribute, 0), + new QSGGeometry.Attribute(1, 0, 0, false, QSGGeometry.AttributeType.UnknownAttribute, 0), + new QSGGeometry.Attribute(2, 0, 0, false, QSGGeometry.AttributeType.UnknownAttribute, 0), + new QSGGeometry.Attribute(3, 0, 0, false, QSGGeometry.AttributeType.UnknownAttribute, 0), + new QSGGeometry.Attribute(4, 0, 0, false, QSGGeometry.AttributeType.UnknownAttribute, 0)); + QSGGeometry.Attribute[] attributes = attributeSet.attributes(); + Assert.assertEquals(5, attributes.length); + for (int i = 0; i < attributes.length; i++) { + Assert.assertEquals(i, attributes[i].position()); + } + QSGGeometry geometry = new QSGGeometry(attributeSet, 4); + attributes = geometry.attributes(); + Assert.assertEquals(5, attributes.length); + for (int i = 0; i < attributes.length; i++) { + Assert.assertEquals(i, attributes[i].position()); + } + } } diff --git a/src/java/autotests/io/qt/autotests/TestQuickPaintItemQt5.java b/src/java/autotests/io/qt/autotests/TestQuickPaintItemQt5.java index 81780381..0b010df5 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickPaintItemQt5.java +++ b/src/java/autotests/io/qt/autotests/TestQuickPaintItemQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuickPaintItemQt6.java b/src/java/autotests/io/qt/autotests/TestQuickPaintItemQt6.java index 59afc7a1..ae474e2b 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickPaintItemQt6.java +++ b/src/java/autotests/io/qt/autotests/TestQuickPaintItemQt6.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuickQt5.java b/src/java/autotests/io/qt/autotests/TestQuickQt5.java index 0536c20c..8ab25058 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickQt5.java +++ b/src/java/autotests/io/qt/autotests/TestQuickQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuickQt6.java b/src/java/autotests/io/qt/autotests/TestQuickQt6.java index 712994fc..5b5d9627 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickQt6.java +++ b/src/java/autotests/io/qt/autotests/TestQuickQt6.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuickTextureD3DQt6.java b/src/java/autotests/io/qt/autotests/TestQuickTextureD3DQt6.java index 5fa46a22..9da6bab6 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickTextureD3DQt6.java +++ b/src/java/autotests/io/qt/autotests/TestQuickTextureD3DQt6.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuickTextureMetalQt6.java b/src/java/autotests/io/qt/autotests/TestQuickTextureMetalQt6.java index 600779de..36346a46 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickTextureMetalQt6.java +++ b/src/java/autotests/io/qt/autotests/TestQuickTextureMetalQt6.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuickTextureOpenGLQt6.java b/src/java/autotests/io/qt/autotests/TestQuickTextureOpenGLQt6.java index 167ec914..3a194e12 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickTextureOpenGLQt6.java +++ b/src/java/autotests/io/qt/autotests/TestQuickTextureOpenGLQt6.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuickTextureVulkanQt6.java b/src/java/autotests/io/qt/autotests/TestQuickTextureVulkanQt6.java index 2042b20d..6654581f 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickTextureVulkanQt6.java +++ b/src/java/autotests/io/qt/autotests/TestQuickTextureVulkanQt6.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -54,7 +54,7 @@ public class TestQuickTextureVulkanQt6 extends ApplicationInitializer { @BeforeClass public static void testInitialize() throws Exception { - Assume.assumeTrue("Qt build has no Vulkan support.", General.canVulkan()); + Assume.assumeTrue("Qt build has no Vulkan support.", General.canVulkan() && General.canCreateVulkanInstance()); ApplicationInitializer.testInitializeWithGui(); Assume.assumeTrue("A screen is required to create a window.", QGuiApplication.primaryScreen()!=null); io.qt.QtUtilities.loadQtLibrary("OpenGL"); diff --git a/src/java/autotests/io/qt/autotests/TestQuickThreadAffinity.java b/src/java/autotests/io/qt/autotests/TestQuickThreadAffinity.java index 5cb6047a..816a02bc 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickThreadAffinity.java +++ b/src/java/autotests/io/qt/autotests/TestQuickThreadAffinity.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuickWidgetsQt5.java b/src/java/autotests/io/qt/autotests/TestQuickWidgetsQt5.java index eb5724ed..18768ebd 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickWidgetsQt5.java +++ b/src/java/autotests/io/qt/autotests/TestQuickWidgetsQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuickWidgetsQt6.java b/src/java/autotests/io/qt/autotests/TestQuickWidgetsQt6.java index 6e2de1ea..cd63bfb4 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickWidgetsQt6.java +++ b/src/java/autotests/io/qt/autotests/TestQuickWidgetsQt6.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestQuickWidgetsThreadAffinity.java b/src/java/autotests/io/qt/autotests/TestQuickWidgetsThreadAffinity.java index 1fe9ecb4..91d4ad5b 100644 --- a/src/java/autotests/io/qt/autotests/TestQuickWidgetsThreadAffinity.java +++ b/src/java/autotests/io/qt/autotests/TestQuickWidgetsThreadAffinity.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestReferenceCounting.java b/src/java/autotests/io/qt/autotests/TestReferenceCounting.java index 3ac6247f..0d22e32d 100644 --- a/src/java/autotests/io/qt/autotests/TestReferenceCounting.java +++ b/src/java/autotests/io/qt/autotests/TestReferenceCounting.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestReferenceCountingContainers.java b/src/java/autotests/io/qt/autotests/TestReferenceCountingContainers.java index 56cc080f..a5e82113 100644 --- a/src/java/autotests/io/qt/autotests/TestReferenceCountingContainers.java +++ b/src/java/autotests/io/qt/autotests/TestReferenceCountingContainers.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestReferenceCountingQGraphicsWidget.java b/src/java/autotests/io/qt/autotests/TestReferenceCountingQGraphicsWidget.java index cbefb2a2..932e3340 100644 --- a/src/java/autotests/io/qt/autotests/TestReferenceCountingQGraphicsWidget.java +++ b/src/java/autotests/io/qt/autotests/TestReferenceCountingQGraphicsWidget.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestReferenceCountingQLayout.java b/src/java/autotests/io/qt/autotests/TestReferenceCountingQLayout.java index 34cedb5a..f934cc81 100644 --- a/src/java/autotests/io/qt/autotests/TestReferenceCountingQLayout.java +++ b/src/java/autotests/io/qt/autotests/TestReferenceCountingQLayout.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestReferenceCountingQWidget.java b/src/java/autotests/io/qt/autotests/TestReferenceCountingQWidget.java index 3f1b42cf..599e6118 100644 --- a/src/java/autotests/io/qt/autotests/TestReferenceCountingQWidget.java +++ b/src/java/autotests/io/qt/autotests/TestReferenceCountingQWidget.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestRemoteObjects.java b/src/java/autotests/io/qt/autotests/TestRemoteObjects.java index 186907e9..4f7cfa64 100644 --- a/src/java/autotests/io/qt/autotests/TestRemoteObjects.java +++ b/src/java/autotests/io/qt/autotests/TestRemoteObjects.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestRemoteObjectsInjectedCodeQt5.java b/src/java/autotests/io/qt/autotests/TestRemoteObjectsInjectedCodeQt5.java index 01289c1e..f081762f 100644 --- a/src/java/autotests/io/qt/autotests/TestRemoteObjectsInjectedCodeQt5.java +++ b/src/java/autotests/io/qt/autotests/TestRemoteObjectsInjectedCodeQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestRetroHelper.java b/src/java/autotests/io/qt/autotests/TestRetroHelper.java index e689a65b..f5e4ecd1 100644 --- a/src/java/autotests/io/qt/autotests/TestRetroHelper.java +++ b/src/java/autotests/io/qt/autotests/TestRetroHelper.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestRhiQt66.java b/src/java/autotests/io/qt/autotests/TestRhiQt66.java new file mode 100644 index 00000000..2ff226c9 --- /dev/null +++ b/src/java/autotests/io/qt/autotests/TestRhiQt66.java @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** +** This file is part of Qt Jambi. +** +** $BEGIN_LICENSE$ +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** $END_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ +package io.qt.autotests; + +import static org.junit.Assert.*; + +import org.junit.Test; + +import io.qt.gui.rhi.QRhiReadbackResult; + +public class TestRhiQt66 extends ApplicationInitializer{ + + @Test + public void test() { + QRhiReadbackResult value = new QRhiReadbackResult(); + assertEquals(null, value.completed()); + QRhiReadbackResult.CompletedFunction cf = ()->{}; + value.setCompleted(cf); + assertEquals(cf, value.completed()); + } +} diff --git a/src/java/autotests/io/qt/autotests/TestSQLInjectedCodeQt5.java b/src/java/autotests/io/qt/autotests/TestSQLInjectedCodeQt5.java index 9c0989d0..6cc32880 100644 --- a/src/java/autotests/io/qt/autotests/TestSQLInjectedCodeQt5.java +++ b/src/java/autotests/io/qt/autotests/TestSQLInjectedCodeQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestScriptCloneable.java b/src/java/autotests/io/qt/autotests/TestScriptCloneable.java index 91711896..527ef164 100644 --- a/src/java/autotests/io/qt/autotests/TestScriptCloneable.java +++ b/src/java/autotests/io/qt/autotests/TestScriptCloneable.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestScxml.java b/src/java/autotests/io/qt/autotests/TestScxml.java index 2df078bc..39b55db0 100644 --- a/src/java/autotests/io/qt/autotests/TestScxml.java +++ b/src/java/autotests/io/qt/autotests/TestScxml.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -31,6 +31,9 @@ import org.junit.Assert; import org.junit.Test; +import io.qt.NonNull; +import io.qt.QtInvokable; +import io.qt.QtPrimitiveType; import io.qt.core.QBuffer; import io.qt.core.QByteArray; import io.qt.core.QIODevice; @@ -66,9 +69,16 @@ public void test() { connection = sm.connectToEvent("hello", event->{}); Assert.assertTrue("not connected", connection.isConnected()); class Receiver extends QObject{ + @QtInvokable + Receiver(){} void receive(){} void receiveBoolean(boolean b){} void receiveEvent(QScxmlEvent e){} + @QtInvokable + int invokable() {return 0;} + public final Signal0 plainSignal = new Signal0(); + public final Signal1<@QtPrimitiveType@NonNull Boolean> booleanSignal = new Signal1<>(); + public final Signal1<@NonNull QScxmlEvent> eventSignal = new Signal1<>(); } Receiver r = new Receiver(); connection = sm.connectToState("hello", r::receive); @@ -83,10 +93,28 @@ void receiveEvent(QScxmlEvent e){} Assert.assertTrue("not connected", connection.isConnected()); connection = sm.connectToState("hello", r, "receiveBoolean(boolean)"); Assert.assertTrue("not connected", connection.isConnected()); + connection = sm.connectToState("hello", r.plainSignal); + Assert.assertTrue("not connected", connection.isConnected()); + connection = sm.connectToState("hello", r.booleanSignal); + Assert.assertTrue("not connected", connection.isConnected()); connection = sm.connectToEvent("hello", r, "receive()"); Assert.assertTrue("not connected", connection.isConnected()); connection = sm.connectToEvent("hello", r, "receiveEvent(QScxmlEvent)"); Assert.assertTrue("not connected", connection.isConnected()); + connection = sm.connectToEvent("hello", r.plainSignal); + Assert.assertTrue("not connected", connection.isConnected()); + connection = sm.connectToEvent("hello", r.eventSignal); + Assert.assertTrue("not connected", connection.isConnected()); + connection = sm.connectToState("hello", r, "invokable()"); + Assert.assertTrue("not connected", connection.isConnected()); + connection = sm.connectToEvent("hello", r, "invokable()"); + Assert.assertTrue("not connected", connection.isConnected()); + connection = sm.connectToState("hello", r::invokable); + Assert.assertTrue("not connected", connection.isConnected()); + connection = sm.connectToEvent("hello", r::invokable); + Assert.assertTrue("not connected", connection.isConnected()); + connection = sm.connectToEvent("hello", Receiver::new); + Assert.assertTrue("not connected", connection.isConnected()); data.close(); } diff --git a/src/java/autotests/io/qt/autotests/TestSensorsQt5.java b/src/java/autotests/io/qt/autotests/TestSensorsQt5.java index f9aa2fa8..9d01275e 100644 --- a/src/java/autotests/io/qt/autotests/TestSensorsQt5.java +++ b/src/java/autotests/io/qt/autotests/TestSensorsQt5.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSharedMemory.java b/src/java/autotests/io/qt/autotests/TestSharedMemory.java index a107eac5..c595fd86 100644 --- a/src/java/autotests/io/qt/autotests/TestSharedMemory.java +++ b/src/java/autotests/io/qt/autotests/TestSharedMemory.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSharedPointer.java b/src/java/autotests/io/qt/autotests/TestSharedPointer.java index 914dee9a..d327d919 100644 --- a/src/java/autotests/io/qt/autotests/TestSharedPointer.java +++ b/src/java/autotests/io/qt/autotests/TestSharedPointer.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSignalCrossThread.java b/src/java/autotests/io/qt/autotests/TestSignalCrossThread.java index da54e4b6..a116ea93 100644 --- a/src/java/autotests/io/qt/autotests/TestSignalCrossThread.java +++ b/src/java/autotests/io/qt/autotests/TestSignalCrossThread.java @@ -2,7 +2,7 @@ ** ** Copyright (C) 2011 Darryl L. Miles. All rights reserved. ** Copyright (C) 2011 D L Miles Consulting Ltd. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSignalMapperQt5.java b/src/java/autotests/io/qt/autotests/TestSignalMapperQt5.java index bd61ca38..6f86fa3e 100644 --- a/src/java/autotests/io/qt/autotests/TestSignalMapperQt5.java +++ b/src/java/autotests/io/qt/autotests/TestSignalMapperQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSignalOnDispose.java b/src/java/autotests/io/qt/autotests/TestSignalOnDispose.java index e9adb77f..9ab0c006 100644 --- a/src/java/autotests/io/qt/autotests/TestSignalOnDispose.java +++ b/src/java/autotests/io/qt/autotests/TestSignalOnDispose.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSignalSlotGC.java b/src/java/autotests/io/qt/autotests/TestSignalSlotGC.java index aaa34cdd..7364a70f 100644 --- a/src/java/autotests/io/qt/autotests/TestSignalSlotGC.java +++ b/src/java/autotests/io/qt/autotests/TestSignalSlotGC.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2011 Poalo Pacussi -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSignalSlotWithCustomTypes.java b/src/java/autotests/io/qt/autotests/TestSignalSlotWithCustomTypes.java index 86dd7c09..c2c269b4 100644 --- a/src/java/autotests/io/qt/autotests/TestSignalSlotWithCustomTypes.java +++ b/src/java/autotests/io/qt/autotests/TestSignalSlotWithCustomTypes.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSignals.java b/src/java/autotests/io/qt/autotests/TestSignals.java index 2246e678..3e22ec9f 100644 --- a/src/java/autotests/io/qt/autotests/TestSignals.java +++ b/src/java/autotests/io/qt/autotests/TestSignals.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSlotSameMethodName.java b/src/java/autotests/io/qt/autotests/TestSlotSameMethodName.java index 341ae02a..c4c49755 100644 --- a/src/java/autotests/io/qt/autotests/TestSlotSameMethodName.java +++ b/src/java/autotests/io/qt/autotests/TestSlotSameMethodName.java @@ -2,7 +2,7 @@ ** ** Copyright (C) 2011 Darryl L. Miles. All rights reserved. ** Copyright (C) 2011 D L Miles Consulting Ltd. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSql.java b/src/java/autotests/io/qt/autotests/TestSql.java index c7f24d00..42f5b5c8 100644 --- a/src/java/autotests/io/qt/autotests/TestSql.java +++ b/src/java/autotests/io/qt/autotests/TestSql.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSqlCloneable.java b/src/java/autotests/io/qt/autotests/TestSqlCloneable.java index 6db656ea..1394688b 100644 --- a/src/java/autotests/io/qt/autotests/TestSqlCloneable.java +++ b/src/java/autotests/io/qt/autotests/TestSqlCloneable.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSqlInjectedCodeQt6.java b/src/java/autotests/io/qt/autotests/TestSqlInjectedCodeQt6.java index 603e5b02..376afa05 100644 --- a/src/java/autotests/io/qt/autotests/TestSqlInjectedCodeQt6.java +++ b/src/java/autotests/io/qt/autotests/TestSqlInjectedCodeQt6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestStringConverterQt6.java b/src/java/autotests/io/qt/autotests/TestStringConverterQt6.java index 75fdf7f1..b6570f4a 100644 --- a/src/java/autotests/io/qt/autotests/TestStringConverterQt6.java +++ b/src/java/autotests/io/qt/autotests/TestStringConverterQt6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSwap.java b/src/java/autotests/io/qt/autotests/TestSwap.java index 19baf31b..6a6cb055 100644 --- a/src/java/autotests/io/qt/autotests/TestSwap.java +++ b/src/java/autotests/io/qt/autotests/TestSwap.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestSwapQt5.java b/src/java/autotests/io/qt/autotests/TestSwapQt5.java index ad71512b..fac880da 100644 --- a/src/java/autotests/io/qt/autotests/TestSwapQt5.java +++ b/src/java/autotests/io/qt/autotests/TestSwapQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestTableModel.java b/src/java/autotests/io/qt/autotests/TestTableModel.java index 4260b8a1..56ea3e88 100644 --- a/src/java/autotests/io/qt/autotests/TestTableModel.java +++ b/src/java/autotests/io/qt/autotests/TestTableModel.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestTestlib.java b/src/java/autotests/io/qt/autotests/TestTestlib.java index 8136d9f8..d9aa3e01 100644 --- a/src/java/autotests/io/qt/autotests/TestTestlib.java +++ b/src/java/autotests/io/qt/autotests/TestTestlib.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestThreadAffinity.java b/src/java/autotests/io/qt/autotests/TestThreadAffinity.java index 4cf61522..0050a021 100644 --- a/src/java/autotests/io/qt/autotests/TestThreadAffinity.java +++ b/src/java/autotests/io/qt/autotests/TestThreadAffinity.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -492,10 +492,10 @@ public void testQWidget() throws Throwable{ QFileDialog.getExistingDirectoryUrl(); fail("QThreadAffinityException expected to be thrown."); }catch(QThreadAffinityException e) {} - try{ - QFileDialog.getOpenFileContent(null, null); - fail("QThreadAffinityException expected to be thrown."); - }catch(QThreadAffinityException e) {} +// try{ +// QFileDialog.getOpenFileContent((String)null, null); +// fail("QThreadAffinityException expected to be thrown."); +// }catch(QThreadAffinityException e) {} try{ QFileDialog.getOpenFileName(); fail("QThreadAffinityException expected to be thrown."); diff --git a/src/java/autotests/io/qt/autotests/TestThreads.java b/src/java/autotests/io/qt/autotests/TestThreads.java index 23347463..dd1fd65f 100644 --- a/src/java/autotests/io/qt/autotests/TestThreads.java +++ b/src/java/autotests/io/qt/autotests/TestThreads.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestUIC.java b/src/java/autotests/io/qt/autotests/TestUIC.java index 5549b349..9d5766d9 100644 --- a/src/java/autotests/io/qt/autotests/TestUIC.java +++ b/src/java/autotests/io/qt/autotests/TestUIC.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestUtilities.java b/src/java/autotests/io/qt/autotests/TestUtilities.java index 130c5381..3942969e 100644 --- a/src/java/autotests/io/qt/autotests/TestUtilities.java +++ b/src/java/autotests/io/qt/autotests/TestUtilities.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestUtilitiesQt5.java b/src/java/autotests/io/qt/autotests/TestUtilitiesQt5.java index fd61dca1..f6816e2d 100644 --- a/src/java/autotests/io/qt/autotests/TestUtilitiesQt5.java +++ b/src/java/autotests/io/qt/autotests/TestUtilitiesQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestUtilitiesQt6.java b/src/java/autotests/io/qt/autotests/TestUtilitiesQt6.java index 4eca8e35..1fa0342f 100644 --- a/src/java/autotests/io/qt/autotests/TestUtilitiesQt6.java +++ b/src/java/autotests/io/qt/autotests/TestUtilitiesQt6.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestVirtualFunctions.java b/src/java/autotests/io/qt/autotests/TestVirtualFunctions.java index 8441c045..9611a4ac 100644 --- a/src/java/autotests/io/qt/autotests/TestVirtualFunctions.java +++ b/src/java/autotests/io/qt/autotests/TestVirtualFunctions.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestVirtualKeyboard.java b/src/java/autotests/io/qt/autotests/TestVirtualKeyboard.java index d5538616..c60be046 100644 --- a/src/java/autotests/io/qt/autotests/TestVirtualKeyboard.java +++ b/src/java/autotests/io/qt/autotests/TestVirtualKeyboard.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestWebEngineQuickQt5.java b/src/java/autotests/io/qt/autotests/TestWebEngineQuickQt5.java index f99fabc2..f42e68fd 100644 --- a/src/java/autotests/io/qt/autotests/TestWebEngineQuickQt5.java +++ b/src/java/autotests/io/qt/autotests/TestWebEngineQuickQt5.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestWebEngineQuickQt6.java b/src/java/autotests/io/qt/autotests/TestWebEngineQuickQt6.java index fdda1df7..e2fa02b1 100644 --- a/src/java/autotests/io/qt/autotests/TestWebEngineQuickQt6.java +++ b/src/java/autotests/io/qt/autotests/TestWebEngineQuickQt6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestWebEngineWidgets.java b/src/java/autotests/io/qt/autotests/TestWebEngineWidgets.java index a70b00c9..d8f34066 100644 --- a/src/java/autotests/io/qt/autotests/TestWebEngineWidgets.java +++ b/src/java/autotests/io/qt/autotests/TestWebEngineWidgets.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestWebView.java b/src/java/autotests/io/qt/autotests/TestWebView.java index 32dd51de..e56a5c11 100644 --- a/src/java/autotests/io/qt/autotests/TestWebView.java +++ b/src/java/autotests/io/qt/autotests/TestWebView.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestWidgets.java b/src/java/autotests/io/qt/autotests/TestWidgets.java index 197f2d87..709e6d06 100644 --- a/src/java/autotests/io/qt/autotests/TestWidgets.java +++ b/src/java/autotests/io/qt/autotests/TestWidgets.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestWidgetsWithShutdown.java b/src/java/autotests/io/qt/autotests/TestWidgetsWithShutdown.java index 9e85f968..3144158a 100644 --- a/src/java/autotests/io/qt/autotests/TestWidgetsWithShutdown.java +++ b/src/java/autotests/io/qt/autotests/TestWidgetsWithShutdown.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestWidgetsWithoutShutdown.java b/src/java/autotests/io/qt/autotests/TestWidgetsWithoutShutdown.java index 4007abb9..0fa1f079 100644 --- a/src/java/autotests/io/qt/autotests/TestWidgetsWithoutShutdown.java +++ b/src/java/autotests/io/qt/autotests/TestWidgetsWithoutShutdown.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestWinExtrasInjectedCode.java b/src/java/autotests/io/qt/autotests/TestWinExtrasInjectedCode.java index 15cb0903..f77fa61c 100644 --- a/src/java/autotests/io/qt/autotests/TestWinExtrasInjectedCode.java +++ b/src/java/autotests/io/qt/autotests/TestWinExtrasInjectedCode.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestXml.java b/src/java/autotests/io/qt/autotests/TestXml.java index dc1b405b..456931ad 100644 --- a/src/java/autotests/io/qt/autotests/TestXml.java +++ b/src/java/autotests/io/qt/autotests/TestXml.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestXmlCloneable.java b/src/java/autotests/io/qt/autotests/TestXmlCloneable.java index 35b99049..6ac63178 100644 --- a/src/java/autotests/io/qt/autotests/TestXmlCloneable.java +++ b/src/java/autotests/io/qt/autotests/TestXmlCloneable.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestXmlInjectedCode.java b/src/java/autotests/io/qt/autotests/TestXmlInjectedCode.java index a437f513..9b9a2d96 100644 --- a/src/java/autotests/io/qt/autotests/TestXmlInjectedCode.java +++ b/src/java/autotests/io/qt/autotests/TestXmlInjectedCode.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestXmlInjectedCodeQt5.java b/src/java/autotests/io/qt/autotests/TestXmlInjectedCodeQt5.java index 474cded5..3a706c87 100644 --- a/src/java/autotests/io/qt/autotests/TestXmlInjectedCodeQt5.java +++ b/src/java/autotests/io/qt/autotests/TestXmlInjectedCodeQt5.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/TestXmlpatternsCloneable.java b/src/java/autotests/io/qt/autotests/TestXmlpatternsCloneable.java index 1e30a476..a61f81db 100644 --- a/src/java/autotests/io/qt/autotests/TestXmlpatternsCloneable.java +++ b/src/java/autotests/io/qt/autotests/TestXmlpatternsCloneable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/autotests/io/qt/autotests/Utils.java b/src/java/autotests/io/qt/autotests/Utils.java index e52c86f4..04a24fbf 100644 --- a/src/java/autotests/io/qt/autotests/Utils.java +++ b/src/java/autotests/io/qt/autotests/Utils.java @@ -2,7 +2,7 @@ ** ** Copyright (C) 2011 Darryl L. Miles. All rights reserved. ** Copyright (C) 2011 D L Miles Consulting Ltd. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/modules.xml b/src/java/modules/modules.xml index bdd82453..a7c34d93 100644 --- a/src/java/modules/modules.xml +++ b/src/java/modules/modules.xml @@ -1,3 +1,33 @@ + @@ -232,12 +262,8 @@ - - - - @@ -266,12 +292,8 @@ - - - - @@ -416,6 +438,25 @@ + + + + + + + + + + + + + + + + + + + @@ -513,25 +554,6 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/java/modules/qtjambi.activex/build.xml b/src/java/modules/qtjambi.activex/build.xml index 3f3c29eb..ab94d16b 100644 --- a/src/java/modules/qtjambi.activex/build.xml +++ b/src/java/modules/qtjambi.activex/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.bluetooth/build.xml b/src/java/modules/qtjambi.bluetooth/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.bluetooth/build.xml +++ b/src/java/modules/qtjambi.bluetooth/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.charts/build.xml b/src/java/modules/qtjambi.charts/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.charts/build.xml +++ b/src/java/modules/qtjambi.charts/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.concurrent/build.xml b/src/java/modules/qtjambi.concurrent/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.concurrent/build.xml +++ b/src/java/modules/qtjambi.concurrent/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.datavisualization/build.xml b/src/java/modules/qtjambi.datavisualization/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.datavisualization/build.xml +++ b/src/java/modules/qtjambi.datavisualization/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.dbus/build.xml b/src/java/modules/qtjambi.dbus/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.dbus/build.xml +++ b/src/java/modules/qtjambi.dbus/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusMetaType.java b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusMetaType.java index d248b01f..639a4178 100644 --- a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusMetaType.java +++ b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusMetaType.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply.java b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply.java index 390464ae..9158043c 100644 --- a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply.java +++ b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply2.java b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply2.java index bf413152..e7d9767a 100644 --- a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply2.java +++ b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply2.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply3.java b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply3.java index fd60cb7a..711d518f 100644 --- a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply3.java +++ b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply3.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply4.java b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply4.java index 0c022329..7f7de87f 100644 --- a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply4.java +++ b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply4.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply5.java b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply5.java index 32f8645c..f2d1ac38 100644 --- a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply5.java +++ b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply5.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply6.java b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply6.java index 0199762b..e20b3854 100644 --- a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply6.java +++ b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply6.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply7.java b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply7.java index a76b375c..518e7c33 100644 --- a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply7.java +++ b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply7.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply8.java b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply8.java index 7f6e9373..40d8aa42 100644 --- a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply8.java +++ b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusPendingReply8.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusReply.java b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusReply.java index 9ea16225..2b9df0ef 100644 --- a/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusReply.java +++ b/src/java/modules/qtjambi.dbus/io/qt/dbus/QDBusReply.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.deployer/build.xml b/src/java/modules/qtjambi.deployer/build.xml index 7dada7f2..6bcb462d 100644 --- a/src/java/modules/qtjambi.deployer/build.xml +++ b/src/java/modules/qtjambi.deployer/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/AppGenerator.java b/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/AppGenerator.java index 0d87dc72..53f47fc5 100644 --- a/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/AppGenerator.java +++ b/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/AppGenerator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -29,6 +29,8 @@ ****************************************************************************/ package io.qt.qtjambi.deployer; +import static io.qt.qtjambi.deployer.QMLGenerator.isCompatible; + import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; @@ -203,7 +205,7 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio if(!exeFile.isFile()) { throw new Error("Specified launcher executable does not exist: "+exeinfo[0]); } - os = "linux"; + os = "linux_unix"; } if(os!=null) { executables.add(new SimpleEntry<>(os, exeFile.toURI().toURL())); @@ -226,7 +228,7 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio }else if(entry.equals("QtJambiLauncher_arm64-v8a")) { os = "android-arm64"; }else if(entry.equals("QtJambiLauncher")) { - os = "linux"; + os = "linux_unix"; } if(os!=null && entry.contains("QtJambiLauncher")) { File libFile = new File(location.absoluteFilePath(entry)); @@ -341,12 +343,17 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio for(Map.Entry entry : executables) { String os = entry.getKey(); - if(os!=null && (platform==null || platform.startsWith(os))) { + if(os!=null && (platform==null || isCompatible(platform, os))) { URL url = entry.getValue(); QFile newFile; URL debuginfoURL = null; QFile debuginfoFile = null; - switch(os.toLowerCase()) { + String _os = os.toLowerCase(); + if(os.contains("bsd-") || os.startsWith("solaris-")) { + _os = "linux_unix"; + } + switch(_os) { + case "linux_unix": case "linux": case "linux32": case "linux64": diff --git a/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/BundleGenerator.java b/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/BundleGenerator.java index a4b4cad8..8c582593 100644 --- a/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/BundleGenerator.java +++ b/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/BundleGenerator.java @@ -8,6 +8,7 @@ import java.io.OutputStream; import java.net.URL; import java.nio.file.Files; +import java.nio.file.Path; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -431,7 +432,7 @@ && new File(subdir, "plugins").isDirectory()) { if(subdir.getName().endsWith("_64")) osArchName = "windows-x64"; else if(subdir.getName().endsWith("_arm64")) - osArchName = null; // "windows-arm64"; + osArchName = "windows-arm64"; else osArchName = "windows-x86"; }else if(subdir.getName().startsWith("gcc")) { @@ -484,7 +485,7 @@ && new File(subdir, "plugins").isDirectory()) { if(qtdir.getName().endsWith("_64")) osArchName = "windows-x64"; else if(qtdir.getName().endsWith("_arm64")) - osArchName = null; // "windows-arm64"; + osArchName = "windows-arm64"; else osArchName = "windows-x86"; }else if(qtdir.getName().startsWith("gcc")) { @@ -855,12 +856,12 @@ private static void generateBundles(File targetDir, plugins.put(pluginDir.getName(), pluginDir); } } - }else if(osArchName.startsWith("linux-")) { + }else if(osArchName.startsWith("linux-") || osArchName.startsWith("solaris-") || osArchName.contains("bsd-")) { isDebug = false; String prefix = "libQt" + version.majorVersion(); String suffix = ".so."+version; + String suffix2 = ".so."+version.majorVersion()+"."+version.minorVersion(); String prefix2 = "libicu"; - String suffix2 = ".so.56.1"; for(String lib : libDir.list()) { if(lib.startsWith(prefix) && lib.endsWith(suffix)) { String name = lib.substring(prefix.length(), lib.length() - suffix.length()).toLowerCase(); @@ -877,7 +878,31 @@ private static void generateBundles(File targetDir, list.add(0, new File(libDir, lib)); else list.add(new File(libDir, lib)); - }else if(lib.startsWith(prefix2) && lib.endsWith(suffix2)) { + }else if(lib.startsWith(prefix) && lib.endsWith(suffix2)) { + String name = lib.substring(prefix.length(), lib.length() - suffix2.length()).toLowerCase(); + if(name.startsWith("3d")) + name = "qt"+name; + boolean prepend = true; + String targetModule = findTargetModule(name); + if(targetModule!=null) { + name = targetModule; + prepend = false; + } + Path link = new File(libDir, lib).toPath(); + try { + if(Files.isSymbolicLink(link)) { + File libFile = link.toRealPath().toFile(); + if(libFile.getName().startsWith(prefix) && !libFile.getName().endsWith(suffix)) { + List list = libraries.computeIfAbsent(name, getArrayListFactory()); + if(prepend) + list.add(0, libFile); + else + list.add(libFile); + } + } + } catch (IOException e) { + } + }else if(lib.startsWith(prefix2) && lib.contains(".so.") && !Files.isSymbolicLink(new File(libDir, lib).toPath())) { libraries.computeIfAbsent("core", getArrayListFactory()).add(new File(libDir, lib)); } } @@ -1129,12 +1154,12 @@ public void close() throws IOException { symlinkElement.setAttribute("target", libraryFile.getParentFile().getName()+"/"+libraryFile.getName()+"/Versions/Current/"+libName); libDoc.getDocumentElement().appendChild(symlinkElement); } - }else if(osArchName.startsWith("linux-")) { - libBundleJarFile.putNextEntry(new ZipEntry(libraryFile.getParentFile().getName()+"/"+libraryFile.getName())); + }else if(osArchName.startsWith("linux-") || osArchName.startsWith("solaris-") || osArchName.contains("bsd-")) { + libBundleJarFile.putNextEntry(new ZipEntry("lib/"+libraryFile.getName())); Files.copy(libraryFile.toPath(), libBundleJarFile); libBundleJarFile.closeEntry(); Element libraryElement = libDoc.createElement("library"); - libraryElement.setAttribute("name", libraryFile.getParentFile().getName()+"/"+libraryFile.getName()); + libraryElement.setAttribute("name", "lib/"+libraryFile.getName()); libDoc.getDocumentElement().appendChild(libraryElement); String libName = libraryFile.getName(); if(libName.endsWith(".so."+version)) { @@ -1146,11 +1171,11 @@ public void close() throws IOException { debugSym = new File(libraryFile.getParentFile(), _libName); } if(debugSym.exists()) { - debugJarFile.putNextEntry(new ZipEntry(libraryFile.getParentFile().getName()+"/"+debugSym.getName())); + debugJarFile.putNextEntry(new ZipEntry("lib/"+debugSym.getName())); Files.copy(debugSym.toPath(), debugJarFile); debugJarFile.closeEntry(); libraryElement = debugDoc.createElement("file"); - libraryElement.setAttribute("name", libraryFile.getParentFile().getName()+"/"+debugSym.getName()); + libraryElement.setAttribute("name", "lib/"+debugSym.getName()); debugDoc.getDocumentElement().appendChild(libraryElement); } } @@ -1160,8 +1185,8 @@ public void close() throws IOException { int idx = libName.lastIndexOf('.'); libName = libName.substring(0, idx); Element symlinkElement = libDoc.createElement("symlink"); - symlinkElement.setAttribute("name", libraryFile.getParentFile().getName()+"/"+libName); - symlinkElement.setAttribute("target", libraryFile.getParentFile().getName()+"/"+libraryFile.getName()); + symlinkElement.setAttribute("name", "lib/"+libName); + symlinkElement.setAttribute("target", "lib/"+libraryFile.getName()); libDoc.getDocumentElement().appendChild(symlinkElement); } } @@ -1314,7 +1339,7 @@ public void close() throws IOException { if(osArchName.startsWith("windows-")) { path = "bin"; exe = new File(binDir, isDebug ? "QtWebEngineProcessd.exe" : "QtWebEngineProcess.exe"); - }else if(osArchName.startsWith("linux-")) { + }else if(osArchName.startsWith("linux-") || osArchName.startsWith("solaris-") || osArchName.contains("bsd-")) { path = "libexec"; exe = new File(libexecDir, "QtWebEngineProcess"); } @@ -1905,7 +1930,7 @@ private static void copyDirectory(File dir, JarOutputStream jarFile, JarOutputSt } if(isLibrary && !file.getName().endsWith(suffix)) continue; - }else if(osArchName.startsWith("linux-")) { + }else if(osArchName.startsWith("linux-") || osArchName.startsWith("solaris-") || osArchName.contains("bsd-")) { isLibrary = file.getName().endsWith(".so"); if(file.getName().endsWith(".debug")) { if(isForceDebugInfo) { diff --git a/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/Main.java b/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/Main.java index f7e587bc..833609f1 100644 --- a/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/Main.java +++ b/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/Main.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -88,78 +88,75 @@ private static void printout(QByteArray data) { public static void main(String[] args) throws InterruptedException, IOException { if(args.length>0) { - try { - boolean doInit = QCoreApplication.instance()==null; - if(doInit) { - QCoreApplication.setApplicationName("deployer "+args[0]); - QCoreApplication.setApplicationVersion(QtUtilities.qtjambiVersion().toString()); - QCoreApplication.initialize(args); - QCoreApplication.setApplicationName("deployer"); - } - try(QScopeGuard guard = new QScopeGuard(QCoreApplication::shutdown)){ - if(!doInit) - guard.dismiss(); - QCommandLineParser parser = new QCommandLineParser(); - parser.setSingleDashWordOptionMode(QCommandLineParser.SingleDashWordOptionMode.ParseAsLongOptions); - parser.setApplicationDescription(String.format("QtJambi Deployer version %1$s", QtUtilities.qtjambiVersion().toString())); - parser.addHelpOption(); - parser.addVersionOption(); - //common - QCommandLineOption platformOption = new QCommandLineOption(QList.of("platform"), "Target platform", "platform"); - QCommandLineOption dirOption = new QCommandLineOption(QList.of("d", "dir", "target-directory"), "Target directory", "dir"); - QCommandLineOption classPathOption = new QCommandLineOption(QList.of("cp", "class-path"), "Class path for plugin/app execution", "path"); - QCommandLineOption configurationOption = new QCommandLineOption(QList.of("c", "configuration"), "Library configuration", "debug|release", "release"); - switch(args[0]) { - case "plugin": - case "pluginlib": - PluginGenerator.generate(parser, - args, - platformOption, - dirOption, - classPathOption, - configurationOption); - break; - case "qml": - case "qmllib": - QMLGenerator.generate(parser, - args, - platformOption, - dirOption, - classPathOption, - configurationOption); - break; - case "app": - case "application": - AppGenerator.generate(parser, - args, - platformOption, - dirOption, - classPathOption, - configurationOption); - break; - case "qt": - case "qtlib": - case "qtbundles": - BundleGenerator.generate(parser, - args, - platformOption, - dirOption, - configurationOption); - break; - case "container": - case "containeraccess": - case "ca": - ContainerAccessGenerator.generate(parser, - args, - dirOption); - break; - default: - throw new Error("QtJambi Deployer, illegal argument: "+args[0]+", expected: one of plugin|qml|application|qtbundles|containeraccess"); - } + boolean doInit = QCoreApplication.instance()==null; + if(doInit) { + QCoreApplication.setApplicationName("deployer "+args[0]); + QCoreApplication.setApplicationVersion(QtUtilities.qtjambiVersion().toString()); + QCoreApplication.initialize(args); + QCoreApplication.setApplicationName("deployer"); + } + try(QScopeGuard guard = new QScopeGuard(QCoreApplication::shutdown)){ + if(!doInit) + guard.dismiss(); + QCommandLineParser parser = new QCommandLineParser(); + parser.setSingleDashWordOptionMode(QCommandLineParser.SingleDashWordOptionMode.ParseAsLongOptions); + parser.setApplicationDescription(String.format("QtJambi Deployer version %1$s", QtUtilities.qtjambiVersion().toString())); + parser.addHelpOption(); + parser.addVersionOption(); + //common + QCommandLineOption platformOption = new QCommandLineOption(QList.of("platform"), "Target platform", "platform"); + QCommandLineOption dirOption = new QCommandLineOption(QList.of("d", "dir", "target-directory"), "Target directory", "dir"); + QCommandLineOption classPathOption = new QCommandLineOption(QList.of("cp", "class-path"), "Class path for plugin/app execution", "path"); + QCommandLineOption configurationOption = new QCommandLineOption(QList.of("c", "configuration"), "Library configuration", "debug|release", "release"); + switch(args[0]) { + case "plugin": + case "pluginlib": + PluginGenerator.generate(parser, + args, + platformOption, + dirOption, + classPathOption, + configurationOption); + break; + case "qml": + case "qmllib": + QMLGenerator.generate(parser, + args, + platformOption, + dirOption, + classPathOption, + configurationOption); + break; + case "app": + case "application": + AppGenerator.generate(parser, + args, + platformOption, + dirOption, + classPathOption, + configurationOption); + break; + case "qt": + case "qtlib": + case "qtbundles": + BundleGenerator.generate(parser, + args, + platformOption, + dirOption, + configurationOption); + break; + case "container": + case "containeraccess": + case "ca": + ContainerAccessGenerator.generate(parser, + args, + dirOption); + break; + default: + System.err.println("QtJambi Deployer, illegal argument: "+args[0]+", expected: one of plugin|qml|application|qtbundles|containeraccess"); + System.exit(-1); + break; } - } catch (Error e) { - System.err.println(e.getMessage()); - System.exit(-1); } }else{ String version = QtUtilities.qtjambiVersion().toString(); diff --git a/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/PluginGenerator.java b/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/PluginGenerator.java index 5cd9c142..cf04e622 100644 --- a/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/PluginGenerator.java +++ b/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/PluginGenerator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -29,6 +29,8 @@ ****************************************************************************/ package io.qt.qtjambi.deployer; +import static io.qt.qtjambi.deployer.QMLGenerator.isCompatible; + import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -208,7 +210,7 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio }else if(libinfo[0].endsWith("_armeabi-v7a.so")) { os = "android-arm"; }else if(libinfo[0].endsWith(".so")) { - os = "linux"; + os = "linux_unix"; } if(os!=null) { File libFile = new File(libinfo[0]); @@ -235,32 +237,32 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio os = "windows"; }else if(entry.getName().equals("libQtJambiPlugin_debug.dylib")) { os = "macos"; - }else if(entry.getName().equals("libjarimport_debug_x86_64.so") || entry.getName().equals("libjarimport_x86_64.so")) { + }else if(entry.getName().equals("libQtJambiPlugin_debug_x86_64.so") || entry.getName().equals("libQtJambiPlugin_x86_64.so")) { os = "android-x64"; - }else if(entry.getName().equals("libjarimport_debug_x86.so") || entry.getName().equals("libjarimport_x86.so")) { + }else if(entry.getName().equals("libQtJambiPlugin_debug_x86.so") || entry.getName().equals("libQtJambiPlugin_x86.so")) { os = "android-x86"; - }else if(entry.getName().equals("libjarimport_debug_arm64-v8a.so") || entry.getName().equals("libjarimport_arm64-v8a.so")) { + }else if(entry.getName().equals("libQtJambiPlugin_debug_arm64-v8a.so") || entry.getName().equals("libQtJambiPlugin_arm64-v8a.so")) { os = "android-arm64"; - }else if(entry.getName().equals("libjarimport_debug_armeabi-v7a.so") || entry.getName().equals("libjarimport_armeabi-v7a.so")) { + }else if(entry.getName().equals("libQtJambiPlugin_debug_armeabi-v7a.so") || entry.getName().equals("libQtJambiPlugin_armeabi-v7a.so")) { os = "android-arm"; }else if(entry.getName().equals("libQtJambiPlugin_debug.so")) { - os = "linux"; + os = "linux_unix"; } }else{ if(entry.getName().equals("QtJambiPlugin.dll")) { os = "windows"; }else if(entry.getName().equals("libQtJambiPlugin.dylib")) { os = "macos"; - }else if(entry.getName().equals("libjarimport_x86_64.so")) { + }else if(entry.getName().equals("libQtJambiPlugin_x86_64.so")) { os = "android-x64"; - }else if(entry.getName().equals("libjarimport_x86.so")) { + }else if(entry.getName().equals("libQtJambiPlugin_x86.so")) { os = "android-x86"; - }else if(entry.getName().equals("libjarimport_arm64-v8a.so")) { + }else if(entry.getName().equals("libQtJambiPlugin_arm64-v8a.so")) { os = "android-arm64"; - }else if(entry.getName().equals("libjarimport_armeabi-v7a.so")) { + }else if(entry.getName().equals("libQtJambiPlugin_armeabi-v7a.so")) { os = "android-arm"; }else if(entry.getName().equals("libQtJambiPlugin.so")) { - os = "linux"; + os = "linux_unix"; } } if(os!=null && entry.getName().contains("QtJambiPlugin")) { @@ -452,7 +454,7 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio cborValue.setValue(/*QtPluginMetaDataKeys::IID*/ 2, new QCborValue(iid)); cborValue.setValue(/*QtPluginMetaDataKeys::ClassName*/ 3, new QCborValue(className.replace(".", "::"))); cborValue.setValue(/*QtPluginMetaDataKeys::MetaData*/ 4, new QCborValue(QCborMap.fromJsonObject(metaData))); - cborValue.setValue(0x0_CAFEBABE_0L, new QCborValue(pluginName)); + cborValue.setValue(0x0_CAFE_0L, new QCborValue(pluginName)); QByteArray cborData = cborValue.toCborValue().toCbor(); System.gc(); if(generateSource) { @@ -506,9 +508,13 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio for(Map.Entry entry : libraries) { String os = entry.getKey(); - if(os!=null && (platform==null || platform.startsWith(os))) { + if(os!=null && (platform==null || isCompatible(platform, os))) { File newFile; - if(os.toLowerCase().startsWith("android-")) { + String _os = os.toLowerCase(); + if(os.contains("bsd-") || os.startsWith("solaris-")) { + _os = "linux_unix"; + } + if(_os.startsWith("android-")) { subdirectory = dir; }else { if(subdir!=null) { @@ -517,7 +523,7 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio } else subdirectory = dir; } - switch(os.toLowerCase()) { + switch(_os) { case "win32": case "win64": case "windows": @@ -543,6 +549,7 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio // } newFile = new File(subdirectory, "lib" + pluginName + ".dylib"); break; + case "linux_unix": case "linux": case "linux32": case "linux64": diff --git a/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/QMLGenerator.java b/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/QMLGenerator.java index bb898559..62494ee3 100644 --- a/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/QMLGenerator.java +++ b/src/java/modules/qtjambi.deployer/io/qt/qtjambi/deployer/QMLGenerator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -36,6 +36,7 @@ import java.io.PrintWriter; import java.net.URISyntaxException; import java.net.URL; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.util.AbstractMap.SimpleEntry; @@ -138,7 +139,7 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio }else if(libinfo[0].endsWith("_armeabi-v7a.so")) { os = "android-arm"; }else if(libinfo[0].endsWith(".so")) { - os = "linux"; + os = "linux_unix"; } if(os!=null) { File libFile = new File(libinfo[0]); @@ -171,7 +172,7 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio }else if(entry.equals("libjarimport_debug_armeabi-v7a.so") || entry.equals("libjarimport_armeabi-v7a.so")) { os = "android-arm"; }else if(entry.equals("libjarimport_debug.so") || entry.equals("libjarimport.so")) { - os = "linux"; + os = "linux_unix"; } }else{ if(entry.equals("jarimport.dll")) { @@ -187,7 +188,7 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio }else if(entry.equals("libjarimport_armeabi-v7a.so")) { os = "android-arm"; }else if(entry.equals("libjarimport.so")) { - os = "linux"; + os = "linux_unix"; } } if(os!=null && entry.contains("jarimport")) { @@ -284,18 +285,20 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio for(Map.Entry entry : libraries) { String os = entry.getKey(); boolean isAndroid = false; - if(os!=null && (platform==null || platform.startsWith(os))) { + if(os!=null && (platform==null || isCompatible(platform, os))) { File targetLibFile; URL debuginfoURL = null; File targetDebuginfoFile = null; - switch(os.toLowerCase()) { + String _os = os.toLowerCase(); + if(os.contains("bsd-") || os.startsWith("solaris-") || os.startsWith("linux-")) { + _os = "linux_unix"; + }else if(os.startsWith("windows-")) { + _os = "windows"; + } + switch(_os) { case "win32": case "win64": case "windows": - case "windows-aarch64": - case "windows-arm64": - case "windows-x86": - case "windows-x64": if(isDebug==null){ targetLibFile = new File(dir, "jarimport" + (entry.getValue().toExternalForm().endsWith("d.dll") ? "d.dll" : ".dll")); }else{ @@ -441,13 +444,7 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio } } break; - case "linux": - case "linux32": - case "linux64": - case "linux-arm64": - case "linux-aarch64": - case "linux-x86": - case "linux-x64": + case "linux_unix": targetLibFile = new File(dir, "libjarimport.so"); if(Boolean.FALSE.equals(isDebug)) { URL url = entry.getValue(); @@ -529,7 +526,7 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio } } } - try(PrintWriter writer = new PrintWriter(new File(dir, "qmldir"))){ + try(PrintWriter writer = new PrintWriter(new File(dir, "qmldir"), StandardCharsets.UTF_8)){ writer.print("module "); writer.println(packageName.replace('/', '.')); if(isAndroid) { @@ -551,4 +548,21 @@ static void generate(QCommandLineParser parser, String[] args, QCommandLineOptio throw new Error(String.format("Unable to create directory %1$s.", dir.getAbsolutePath())); } } + + static boolean isCompatible(String platform, String os) { + os = os.toLowerCase(); + platform = platform.toLowerCase(); + if(platform.startsWith(os)) { + return true; + }else if(os.equals("linux_unix")){ + if(platform.contains("bsd-") || platform.startsWith("solaris-") || platform.startsWith("linux-")) { + return true; + } + }else if(platform.equals("linux_unix")){ + if(os.contains("bsd-") || os.startsWith("solaris-") || os.startsWith("linux-")) { + return true; + } + } + return false; + } } diff --git a/src/java/modules/qtjambi.deployer/module-info.java b/src/java/modules/qtjambi.deployer/module-info.java index 8e6e3aa3..cf4d85bd 100644 --- a/src/java/modules/qtjambi.deployer/module-info.java +++ b/src/java/modules/qtjambi.deployer/module-info.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.designer/build.xml b/src/java/modules/qtjambi.designer/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.designer/build.xml +++ b/src/java/modules/qtjambi.designer/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.designer/io/qt/designer/util/CustomWidgetInterface.java b/src/java/modules/qtjambi.designer/io/qt/designer/util/CustomWidgetInterface.java index fe1ca687..5d17829b 100644 --- a/src/java/modules/qtjambi.designer/io/qt/designer/util/CustomWidgetInterface.java +++ b/src/java/modules/qtjambi.designer/io/qt/designer/util/CustomWidgetInterface.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.gamepad/build.xml b/src/java/modules/qtjambi.gamepad/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.gamepad/build.xml +++ b/src/java/modules/qtjambi.gamepad/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.generator/build.xml b/src/java/modules/qtjambi.generator/build.xml index c72e17c3..8ac6043b 100644 --- a/src/java/modules/qtjambi.generator/build.xml +++ b/src/java/modules/qtjambi.generator/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.generator/io/qt/qtjambi/generator/Main.java b/src/java/modules/qtjambi.generator/io/qt/qtjambi/generator/Main.java index c546e9e0..629e5b29 100644 --- a/src/java/modules/qtjambi.generator/io/qt/qtjambi/generator/Main.java +++ b/src/java/modules/qtjambi.generator/io/qt/qtjambi/generator/Main.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.generator/module-info.java b/src/java/modules/qtjambi.generator/module-info.java index bbe4011c..56cf7063 100644 --- a/src/java/modules/qtjambi.generator/module-info.java +++ b/src/java/modules/qtjambi.generator/module-info.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.graphs/build.xml b/src/java/modules/qtjambi.graphs/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.graphs/build.xml +++ b/src/java/modules/qtjambi.graphs/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.help/build.xml b/src/java/modules/qtjambi.help/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.help/build.xml +++ b/src/java/modules/qtjambi.help/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.httpserver/build.xml b/src/java/modules/qtjambi.httpserver/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.httpserver/build.xml +++ b/src/java/modules/qtjambi.httpserver/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.location/build.xml b/src/java/modules/qtjambi.location/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.location/build.xml +++ b/src/java/modules/qtjambi.location/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.macextras/build.xml b/src/java/modules/qtjambi.macextras/build.xml index 6c2894b3..828ea514 100644 --- a/src/java/modules/qtjambi.macextras/build.xml +++ b/src/java/modules/qtjambi.macextras/build.xml @@ -1,3 +1,33 @@ + @@ -5,7 +35,7 @@ - + diff --git a/src/java/modules/qtjambi.multimedia/build.xml b/src/java/modules/qtjambi.multimedia/build.xml index fa0a6d74..d797d8e1 100644 --- a/src/java/modules/qtjambi.multimedia/build.xml +++ b/src/java/modules/qtjambi.multimedia/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.multimediawidgets/build.xml b/src/java/modules/qtjambi.multimediawidgets/build.xml index a945ab5e..290a12e0 100644 --- a/src/java/modules/qtjambi.multimediawidgets/build.xml +++ b/src/java/modules/qtjambi.multimediawidgets/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.network/build.xml b/src/java/modules/qtjambi.network/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.network/build.xml +++ b/src/java/modules/qtjambi.network/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.network/io/qt/network/QTimeoutException.java b/src/java/modules/qtjambi.network/io/qt/network/QTimeoutException.java index 5b805feb..342f8f32 100644 --- a/src/java/modules/qtjambi.network/io/qt/network/QTimeoutException.java +++ b/src/java/modules/qtjambi.network/io/qt/network/QTimeoutException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.networkauth/build.xml b/src/java/modules/qtjambi.networkauth/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.networkauth/build.xml +++ b/src/java/modules/qtjambi.networkauth/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.nfc/build.xml b/src/java/modules/qtjambi.nfc/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.nfc/build.xml +++ b/src/java/modules/qtjambi.nfc/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.opengl/build.xml b/src/java/modules/qtjambi.opengl/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.opengl/build.xml +++ b/src/java/modules/qtjambi.opengl/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.openglwidgets/build.xml b/src/java/modules/qtjambi.openglwidgets/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.openglwidgets/build.xml +++ b/src/java/modules/qtjambi.openglwidgets/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.pdf/build.xml b/src/java/modules/qtjambi.pdf/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.pdf/build.xml +++ b/src/java/modules/qtjambi.pdf/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.pdfwidgets/build.xml b/src/java/modules/qtjambi.pdfwidgets/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.pdfwidgets/build.xml +++ b/src/java/modules/qtjambi.pdfwidgets/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.positioning/build.xml b/src/java/modules/qtjambi.positioning/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.positioning/build.xml +++ b/src/java/modules/qtjambi.positioning/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.printsupport/build.xml b/src/java/modules/qtjambi.printsupport/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.printsupport/build.xml +++ b/src/java/modules/qtjambi.printsupport/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.purchasing/build.xml b/src/java/modules/qtjambi.purchasing/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.purchasing/build.xml +++ b/src/java/modules/qtjambi.purchasing/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.qml/build.xml b/src/java/modules/qtjambi.qml/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.qml/build.xml +++ b/src/java/modules/qtjambi.qml/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/QQmlListProperty.java b/src/java/modules/qtjambi.qml/io/qt/qml/QQmlListProperty.java index 36b8a219..54cdcb9f 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/QQmlListProperty.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/QQmlListProperty.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/QmlClassInfoProvider.java b/src/java/modules/qtjambi.qml/io/qt/qml/QmlClassInfoProvider.java index 57a3fea4..faf68a7d 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/QmlClassInfoProvider.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/QmlClassInfoProvider.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAddedInMinorVersion.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAddedInMinorVersion.java index e6c63c2b..ec889d17 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAddedInMinorVersion.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAddedInMinorVersion.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAddedInVersion.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAddedInVersion.java index 842dbbdb..4b5b50da 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAddedInVersion.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAddedInVersion.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAnonymous.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAnonymous.java index f6182189..7dde1fb5 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAnonymous.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAnonymous.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAttached.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAttached.java index 694433a8..2454ea5f 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAttached.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlAttached.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlElement.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlElement.java index 99c004b5..ca2660f7 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlElement.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlElement.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlExtended.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlExtended.java index b74e8808..103573b6 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlExtended.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlExtended.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlExtraVersion.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlExtraVersion.java index da7df038..0dd11ed2 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlExtraVersion.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlExtraVersion.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlForeign.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlForeign.java index 5b60f2ab..074bcef1 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlForeign.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlForeign.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlImport.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlImport.java index 62279a42..8634e6d4 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlImport.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlImport.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlImportMajorVersion.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlImportMajorVersion.java index db66b6cb..8b30b6b3 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlImportMajorVersion.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlImportMajorVersion.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlInterface.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlInterface.java index e147344c..43cc7586 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlInterface.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlInterface.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlListPropertyAssignBehavior.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlListPropertyAssignBehavior.java index ea71dc9f..97d32ea9 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlListPropertyAssignBehavior.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlListPropertyAssignBehavior.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlNamedElement.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlNamedElement.java index cb4af2df..5cef79ca 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlNamedElement.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlNamedElement.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlNoMajorVersionException.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlNoMajorVersionException.java index 6d7046f7..b2e685cc 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlNoMajorVersionException.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlNoMajorVersionException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlRemovedInMinorVersion.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlRemovedInMinorVersion.java index 41e17ba9..a571704b 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlRemovedInMinorVersion.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlRemovedInMinorVersion.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlRemovedInVersion.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlRemovedInVersion.java index 1a283e6b..f321d0f2 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlRemovedInVersion.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlRemovedInVersion.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlSequencialContainer.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlSequencialContainer.java index 9f2b57b6..41e43923 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlSequencialContainer.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlSequencialContainer.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlSingleton.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlSingleton.java index cf5ce6f3..6ba2ee93 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlSingleton.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlSingleton.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlTypeRegistrationException.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlTypeRegistrationException.java index 98ba8da4..ce237784 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlTypeRegistrationException.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlTypeRegistrationException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlTypes.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlTypes.java index 1da46021..4b3c07d8 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlTypes.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlTypes.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlUnavailable.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlUnavailable.java index f092962c..6f4a06a7 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlUnavailable.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlUnavailable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlUncreatable.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlUncreatable.java index 9e840764..2bafb374 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlUncreatable.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlUncreatable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlValueType.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlValueType.java index c1f6426d..f337d7b6 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlValueType.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QmlValueType.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qml/io/qt/qml/util/QtJambi_LibraryUtilities.java b/src/java/modules/qtjambi.qml/io/qt/qml/util/QtJambi_LibraryUtilities.java index 56107fc5..6be5d991 100644 --- a/src/java/modules/qtjambi.qml/io/qt/qml/util/QtJambi_LibraryUtilities.java +++ b/src/java/modules/qtjambi.qml/io/qt/qml/util/QtJambi_LibraryUtilities.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.qt3danimation/build.xml b/src/java/modules/qtjambi.qt3danimation/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.qt3danimation/build.xml +++ b/src/java/modules/qtjambi.qt3danimation/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.qt3dcore/build.xml b/src/java/modules/qtjambi.qt3dcore/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.qt3dcore/build.xml +++ b/src/java/modules/qtjambi.qt3dcore/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.qt3dextras/build.xml b/src/java/modules/qtjambi.qt3dextras/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.qt3dextras/build.xml +++ b/src/java/modules/qtjambi.qt3dextras/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.qt3dinput/build.xml b/src/java/modules/qtjambi.qt3dinput/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.qt3dinput/build.xml +++ b/src/java/modules/qtjambi.qt3dinput/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.qt3dlogic/build.xml b/src/java/modules/qtjambi.qt3dlogic/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.qt3dlogic/build.xml +++ b/src/java/modules/qtjambi.qt3dlogic/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.qt3dquick/build.xml b/src/java/modules/qtjambi.qt3dquick/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.qt3dquick/build.xml +++ b/src/java/modules/qtjambi.qt3dquick/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.qt3dquickextras/build.xml b/src/java/modules/qtjambi.qt3dquickextras/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.qt3dquickextras/build.xml +++ b/src/java/modules/qtjambi.qt3dquickextras/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.qt3dquickscene2d/build.xml b/src/java/modules/qtjambi.qt3dquickscene2d/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.qt3dquickscene2d/build.xml +++ b/src/java/modules/qtjambi.qt3dquickscene2d/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.qt3drender/build.xml b/src/java/modules/qtjambi.qt3drender/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.qt3drender/build.xml +++ b/src/java/modules/qtjambi.qt3drender/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.quick/build.xml b/src/java/modules/qtjambi.quick/build.xml index c4933b6a..9d7018f2 100644 --- a/src/java/modules/qtjambi.quick/build.xml +++ b/src/java/modules/qtjambi.quick/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.quick/io/qt/quick/QSGSimpleMaterial.java b/src/java/modules/qtjambi.quick/io/qt/quick/QSGSimpleMaterial.java index d899762f..79944713 100644 --- a/src/java/modules/qtjambi.quick/io/qt/quick/QSGSimpleMaterial.java +++ b/src/java/modules/qtjambi.quick/io/qt/quick/QSGSimpleMaterial.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.quick/io/qt/quick/QSGSimpleMaterialComparableMaterial.java b/src/java/modules/qtjambi.quick/io/qt/quick/QSGSimpleMaterialComparableMaterial.java index b328b938..5569c5ed 100644 --- a/src/java/modules/qtjambi.quick/io/qt/quick/QSGSimpleMaterialComparableMaterial.java +++ b/src/java/modules/qtjambi.quick/io/qt/quick/QSGSimpleMaterialComparableMaterial.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.quick/io/qt/quick/QSGSimpleMaterialShader.java b/src/java/modules/qtjambi.quick/io/qt/quick/QSGSimpleMaterialShader.java index 2e91260b..1ec39965 100644 --- a/src/java/modules/qtjambi.quick/io/qt/quick/QSGSimpleMaterialShader.java +++ b/src/java/modules/qtjambi.quick/io/qt/quick/QSGSimpleMaterialShader.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.quick3d/build.xml b/src/java/modules/qtjambi.quick3d/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.quick3d/build.xml +++ b/src/java/modules/qtjambi.quick3d/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.quickcontrols/build.xml b/src/java/modules/qtjambi.quickcontrols/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.quickcontrols/build.xml +++ b/src/java/modules/qtjambi.quickcontrols/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.quicktest/build.xml b/src/java/modules/qtjambi.quicktest/build.xml index a719f066..f9c1b76e 100644 --- a/src/java/modules/qtjambi.quicktest/build.xml +++ b/src/java/modules/qtjambi.quicktest/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.quickwidgets/build.xml b/src/java/modules/qtjambi.quickwidgets/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.quickwidgets/build.xml +++ b/src/java/modules/qtjambi.quickwidgets/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.remoteobjects/Qt5/io/qt/remoteobjects/QRemoteObjectPendingReply.java b/src/java/modules/qtjambi.remoteobjects/Qt5/io/qt/remoteobjects/QRemoteObjectPendingReply.java index 2d2720eb..d1d0b393 100644 --- a/src/java/modules/qtjambi.remoteobjects/Qt5/io/qt/remoteobjects/QRemoteObjectPendingReply.java +++ b/src/java/modules/qtjambi.remoteobjects/Qt5/io/qt/remoteobjects/QRemoteObjectPendingReply.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.remoteobjects/Qt6/io/qt/remoteobjects/QRemoteObjectPendingReply.java b/src/java/modules/qtjambi.remoteobjects/Qt6/io/qt/remoteobjects/QRemoteObjectPendingReply.java index 995dfa77..bd3874d2 100644 --- a/src/java/modules/qtjambi.remoteobjects/Qt6/io/qt/remoteobjects/QRemoteObjectPendingReply.java +++ b/src/java/modules/qtjambi.remoteobjects/Qt6/io/qt/remoteobjects/QRemoteObjectPendingReply.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.remoteobjects/build.xml b/src/java/modules/qtjambi.remoteobjects/build.xml index e41f90c5..6e334a09 100644 --- a/src/java/modules/qtjambi.remoteobjects/build.xml +++ b/src/java/modules/qtjambi.remoteobjects/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.script/build.xml b/src/java/modules/qtjambi.script/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.script/build.xml +++ b/src/java/modules/qtjambi.script/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.scripttools/build.xml b/src/java/modules/qtjambi.scripttools/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.scripttools/build.xml +++ b/src/java/modules/qtjambi.scripttools/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.scxml/build.xml b/src/java/modules/qtjambi.scxml/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.scxml/build.xml +++ b/src/java/modules/qtjambi.scxml/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.sensors/build.xml b/src/java/modules/qtjambi.sensors/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.sensors/build.xml +++ b/src/java/modules/qtjambi.sensors/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.serialbus/build.xml b/src/java/modules/qtjambi.serialbus/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.serialbus/build.xml +++ b/src/java/modules/qtjambi.serialbus/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.serialbus/io/qt/serialbus/QCanBusException.java b/src/java/modules/qtjambi.serialbus/io/qt/serialbus/QCanBusException.java index ef25b6d0..fec75c87 100644 --- a/src/java/modules/qtjambi.serialbus/io/qt/serialbus/QCanBusException.java +++ b/src/java/modules/qtjambi.serialbus/io/qt/serialbus/QCanBusException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.serialport/build.xml b/src/java/modules/qtjambi.serialport/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.serialport/build.xml +++ b/src/java/modules/qtjambi.serialport/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.spatialaudio/build.xml b/src/java/modules/qtjambi.spatialaudio/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.spatialaudio/build.xml +++ b/src/java/modules/qtjambi.spatialaudio/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.sql/Qt5/io/qt/sql/QSqlRelationalDelegate.java b/src/java/modules/qtjambi.sql/Qt5/io/qt/sql/QSqlRelationalDelegate.java index e09d5a57..e4f27275 100644 --- a/src/java/modules/qtjambi.sql/Qt5/io/qt/sql/QSqlRelationalDelegate.java +++ b/src/java/modules/qtjambi.sql/Qt5/io/qt/sql/QSqlRelationalDelegate.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.sql/Qt6/io/qt/sql/QSqlRelationalDelegate.java b/src/java/modules/qtjambi.sql/Qt6/io/qt/sql/QSqlRelationalDelegate.java index beffea03..bed51576 100644 --- a/src/java/modules/qtjambi.sql/Qt6/io/qt/sql/QSqlRelationalDelegate.java +++ b/src/java/modules/qtjambi.sql/Qt6/io/qt/sql/QSqlRelationalDelegate.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.sql/build.xml b/src/java/modules/qtjambi.sql/build.xml index d5384c38..99bff958 100644 --- a/src/java/modules/qtjambi.sql/build.xml +++ b/src/java/modules/qtjambi.sql/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.sql/main/io/qt/sql/QSqlDriverCreator.java b/src/java/modules/qtjambi.sql/main/io/qt/sql/QSqlDriverCreator.java index f556204e..7fc79fff 100644 --- a/src/java/modules/qtjambi.sql/main/io/qt/sql/QSqlDriverCreator.java +++ b/src/java/modules/qtjambi.sql/main/io/qt/sql/QSqlDriverCreator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.statemachine/build.xml b/src/java/modules/qtjambi.statemachine/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.statemachine/build.xml +++ b/src/java/modules/qtjambi.statemachine/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.svg/build.xml b/src/java/modules/qtjambi.svg/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.svg/build.xml +++ b/src/java/modules/qtjambi.svg/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.svgwidgets/build.xml b/src/java/modules/qtjambi.svgwidgets/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.svgwidgets/build.xml +++ b/src/java/modules/qtjambi.svgwidgets/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.test/build.xml b/src/java/modules/qtjambi.test/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.test/build.xml +++ b/src/java/modules/qtjambi.test/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.texttospeech/build.xml b/src/java/modules/qtjambi.texttospeech/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.texttospeech/build.xml +++ b/src/java/modules/qtjambi.texttospeech/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.uic/build.xml b/src/java/modules/qtjambi.uic/build.xml index b5efe08f..deda45e6 100644 --- a/src/java/modules/qtjambi.uic/build.xml +++ b/src/java/modules/qtjambi.uic/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/ClassInfoEntries.java b/src/java/modules/qtjambi.uic/io/qt/uic/ClassInfoEntries.java index 62b88563..195a2ac8 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/ClassInfoEntries.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/ClassInfoEntries.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/ClassInfoEntry.java b/src/java/modules/qtjambi.uic/io/qt/uic/ClassInfoEntry.java index 2b44a29c..39f8a032 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/ClassInfoEntry.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/ClassInfoEntry.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/Comparators.java b/src/java/modules/qtjambi.uic/io/qt/uic/Comparators.java index 99a902a9..8f6e6f00 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/Comparators.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/Comparators.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/ConnectionSyntax.java b/src/java/modules/qtjambi.uic/io/qt/uic/ConnectionSyntax.java index e19c84c0..c864be64 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/ConnectionSyntax.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/ConnectionSyntax.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/CustomWidgetsInfo.java b/src/java/modules/qtjambi.uic/io/qt/uic/CustomWidgetsInfo.java index 97251779..79d800c1 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/CustomWidgetsInfo.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/CustomWidgetsInfo.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/DatabaseInfo.java b/src/java/modules/qtjambi.uic/io/qt/uic/DatabaseInfo.java index 942fbf02..07b4c46f 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/DatabaseInfo.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/DatabaseInfo.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/Driver.java b/src/java/modules/qtjambi.uic/io/qt/uic/Driver.java index b9557eb2..1c6f75c4 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/Driver.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/Driver.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/Encoding.java b/src/java/modules/qtjambi.uic/io/qt/uic/Encoding.java index 0f3b6cbd..f6a030c5 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/Encoding.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/Encoding.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/Main.java b/src/java/modules/qtjambi.uic/io/qt/uic/Main.java index 19f34c8f..a85d6b0a 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/Main.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/Main.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/Option.java b/src/java/modules/qtjambi.uic/io/qt/uic/Option.java index 301bd709..69ede246 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/Option.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/Option.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/SignalSlot.java b/src/java/modules/qtjambi.uic/io/qt/uic/SignalSlot.java index 2e1ace11..7708a6ea 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/SignalSlot.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/SignalSlot.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/TreeWalker.java b/src/java/modules/qtjambi.uic/io/qt/uic/TreeWalker.java index e4e8e187..f29d6a58 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/TreeWalker.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/TreeWalker.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/Uic.java b/src/java/modules/qtjambi.uic/io/qt/uic/Uic.java index b35b5829..f70ce437 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/Uic.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/Uic.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/Utils.java b/src/java/modules/qtjambi.uic/io/qt/uic/Utils.java index 08b90322..41a67a6d 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/Utils.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/Utils.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/Validator.java b/src/java/modules/qtjambi.uic/io/qt/uic/Validator.java index de4d0c28..2b21760b 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/Validator.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/Validator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/WriteIncludesBase.java b/src/java/modules/qtjambi.uic/io/qt/uic/WriteIncludesBase.java index 6bf31e4d..2b550959 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/WriteIncludesBase.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/WriteIncludesBase.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteClass.java b/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteClass.java index 32a87cff..1a34311f 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteClass.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteClass.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteDeclaration.java b/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteDeclaration.java index 34521312..c144ec43 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteDeclaration.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteDeclaration.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteImports.java b/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteImports.java index a9599499..5640eded 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteImports.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteImports.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteInitialization.java b/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteInitialization.java index ec9aed54..f4013e79 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteInitialization.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/java/WriteInitialization.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteClass.java b/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteClass.java index 54d76faa..4f5f82a5 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteClass.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteClass.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteDeclaration.java b/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteDeclaration.java index 6d82c63a..638f4e99 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteDeclaration.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteDeclaration.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteImports.java b/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteImports.java index 247b9491..f4610b85 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteImports.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteImports.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteInitialization.java b/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteInitialization.java index 5d4a74c4..e1053c35 100644 --- a/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteInitialization.java +++ b/src/java/modules/qtjambi.uic/io/qt/uic/kotlin/WriteInitialization.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi.uitools/build.xml b/src/java/modules/qtjambi.uitools/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.uitools/build.xml +++ b/src/java/modules/qtjambi.uitools/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.virtualkeyboard/build.xml b/src/java/modules/qtjambi.virtualkeyboard/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.virtualkeyboard/build.xml +++ b/src/java/modules/qtjambi.virtualkeyboard/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.webchannel/build.xml b/src/java/modules/qtjambi.webchannel/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.webchannel/build.xml +++ b/src/java/modules/qtjambi.webchannel/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.webchannelquick/build.xml b/src/java/modules/qtjambi.webchannelquick/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.webchannelquick/build.xml +++ b/src/java/modules/qtjambi.webchannelquick/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.webengine/build.xml b/src/java/modules/qtjambi.webengine/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.webengine/build.xml +++ b/src/java/modules/qtjambi.webengine/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.webenginecore/build.xml b/src/java/modules/qtjambi.webenginecore/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.webenginecore/build.xml +++ b/src/java/modules/qtjambi.webenginecore/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.webenginequick/build.xml b/src/java/modules/qtjambi.webenginequick/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.webenginequick/build.xml +++ b/src/java/modules/qtjambi.webenginequick/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.webenginewidgets/build.xml b/src/java/modules/qtjambi.webenginewidgets/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.webenginewidgets/build.xml +++ b/src/java/modules/qtjambi.webenginewidgets/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.websockets/build.xml b/src/java/modules/qtjambi.websockets/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.websockets/build.xml +++ b/src/java/modules/qtjambi.websockets/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.webview/build.xml b/src/java/modules/qtjambi.webview/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.webview/build.xml +++ b/src/java/modules/qtjambi.webview/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.winextras/build.xml b/src/java/modules/qtjambi.winextras/build.xml index 775438f9..1b0f376d 100644 --- a/src/java/modules/qtjambi.winextras/build.xml +++ b/src/java/modules/qtjambi.winextras/build.xml @@ -1,3 +1,33 @@ + @@ -5,10 +35,7 @@ - - - - + diff --git a/src/java/modules/qtjambi.x11extras/build.xml b/src/java/modules/qtjambi.x11extras/build.xml index 577ea13f..4ff4b22d 100644 --- a/src/java/modules/qtjambi.x11extras/build.xml +++ b/src/java/modules/qtjambi.x11extras/build.xml @@ -1,3 +1,33 @@ + @@ -5,10 +35,7 @@ - - - - + diff --git a/src/java/modules/qtjambi.xml/build.xml b/src/java/modules/qtjambi.xml/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.xml/build.xml +++ b/src/java/modules/qtjambi.xml/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi.xmlpatterns/build.xml b/src/java/modules/qtjambi.xmlpatterns/build.xml index ad757d1e..0d7a5786 100644 --- a/src/java/modules/qtjambi.xmlpatterns/build.xml +++ b/src/java/modules/qtjambi.xmlpatterns/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi/Qt5-JDK21/io/qt/core/QStack.java b/src/java/modules/qtjambi/Qt5-JDK21/io/qt/core/QStack.java index 24cd82ed..7ac3a3ff 100644 --- a/src/java/modules/qtjambi/Qt5-JDK21/io/qt/core/QStack.java +++ b/src/java/modules/qtjambi/Qt5-JDK21/io/qt/core/QStack.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt5-JDK8/io/qt/core/QStack.java b/src/java/modules/qtjambi/Qt5-JDK8/io/qt/core/QStack.java index 58f3c167..74593163 100644 --- a/src/java/modules/qtjambi/Qt5-JDK8/io/qt/core/QStack.java +++ b/src/java/modules/qtjambi/Qt5-JDK8/io/qt/core/QStack.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt5/io/qt/core/QLinkedList.java b/src/java/modules/qtjambi/Qt5/io/qt/core/QLinkedList.java index f861dc98..a2dc910a 100644 --- a/src/java/modules/qtjambi/Qt5/io/qt/core/QLinkedList.java +++ b/src/java/modules/qtjambi/Qt5/io/qt/core/QLinkedList.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt5/io/qt/core/QList.java b/src/java/modules/qtjambi/Qt5/io/qt/core/QList.java index cec4d7de..e8ca92ae 100644 --- a/src/java/modules/qtjambi/Qt5/io/qt/core/QList.java +++ b/src/java/modules/qtjambi/Qt5/io/qt/core/QList.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt5/io/qt/core/QVector.java b/src/java/modules/qtjambi/Qt5/io/qt/core/QVector.java index 9822dac2..c700898c 100644 --- a/src/java/modules/qtjambi/Qt5/io/qt/core/QVector.java +++ b/src/java/modules/qtjambi/Qt5/io/qt/core/QVector.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt5/io/qt/internal/AbstractMetaObjectUtility.java b/src/java/modules/qtjambi/Qt5/io/qt/internal/AbstractMetaObjectUtility.java index a9a24207..35b933d8 100644 --- a/src/java/modules/qtjambi/Qt5/io/qt/internal/AbstractMetaObjectUtility.java +++ b/src/java/modules/qtjambi/Qt5/io/qt/internal/AbstractMetaObjectUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6-JDK21/io/qt/core/QStack.java b/src/java/modules/qtjambi/Qt6-JDK21/io/qt/core/QStack.java index 2bf60819..30d477c9 100644 --- a/src/java/modules/qtjambi/Qt6-JDK21/io/qt/core/QStack.java +++ b/src/java/modules/qtjambi/Qt6-JDK21/io/qt/core/QStack.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6-JDK8/io/qt/core/QStack.java b/src/java/modules/qtjambi/Qt6-JDK8/io/qt/core/QStack.java index 22125597..45db63c7 100644 --- a/src/java/modules/qtjambi/Qt6-JDK8/io/qt/core/QStack.java +++ b/src/java/modules/qtjambi/Qt6-JDK8/io/qt/core/QStack.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QBindable.java b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QBindable.java index 060d7030..0838eef2 100644 --- a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QBindable.java +++ b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QBooleanBindable.java b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QBooleanBindable.java index 69cb2939..44e71c21 100644 --- a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QBooleanBindable.java +++ b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QBooleanBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QByteBindable.java b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QByteBindable.java index 3addd77a..e36af72d 100644 --- a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QByteBindable.java +++ b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QByteBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QCharBindable.java b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QCharBindable.java index 809b61ea..214d32d9 100644 --- a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QCharBindable.java +++ b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QCharBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QDoubleBindable.java b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QDoubleBindable.java index 62d05cbb..e6b91514 100644 --- a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QDoubleBindable.java +++ b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QDoubleBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QFloatBindable.java b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QFloatBindable.java index 6256f2da..c2a09424 100644 --- a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QFloatBindable.java +++ b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QFloatBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QIntBindable.java b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QIntBindable.java index 324f6661..2b1b1dfc 100644 --- a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QIntBindable.java +++ b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QIntBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QLongBindable.java b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QLongBindable.java index e8cfb969..74addcfd 100644 --- a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QLongBindable.java +++ b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QLongBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QShortBindable.java b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QShortBindable.java index 28970b15..73792002 100644 --- a/src/java/modules/qtjambi/Qt6.0/io/qt/core/QShortBindable.java +++ b/src/java/modules/qtjambi/Qt6.0/io/qt/core/QShortBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QBindable.java b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QBindable.java index 3781647b..b7045d45 100644 --- a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QBindable.java +++ b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QBooleanBindable.java b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QBooleanBindable.java index 89bccc24..2b121c2c 100644 --- a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QBooleanBindable.java +++ b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QBooleanBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QByteBindable.java b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QByteBindable.java index 7d52565f..ebbcb3cd 100644 --- a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QByteBindable.java +++ b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QByteBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QCharBindable.java b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QCharBindable.java index a9501d0a..05c00681 100644 --- a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QCharBindable.java +++ b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QCharBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QDoubleBindable.java b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QDoubleBindable.java index 3d137712..0adcfd14 100644 --- a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QDoubleBindable.java +++ b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QDoubleBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QFloatBindable.java b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QFloatBindable.java index b1c503f0..75d9ecb0 100644 --- a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QFloatBindable.java +++ b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QFloatBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QIntBindable.java b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QIntBindable.java index 3fd00185..bc33b094 100644 --- a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QIntBindable.java +++ b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QIntBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QLongBindable.java b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QLongBindable.java index 692eb072..f8602474 100644 --- a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QLongBindable.java +++ b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QLongBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QShortBindable.java b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QShortBindable.java index efd731e1..177a6497 100644 --- a/src/java/modules/qtjambi/Qt6.5/io/qt/core/QShortBindable.java +++ b/src/java/modules/qtjambi/Qt6.5/io/qt/core/QShortBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/QtPropertyBindable.java b/src/java/modules/qtjambi/Qt6/io/qt/QtPropertyBindable.java index 2f823740..9f648733 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/QtPropertyBindable.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/QtPropertyBindable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QAbstractPropertyAlias.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QAbstractPropertyAlias.java index b066e521..b21e0ca2 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QAbstractPropertyAlias.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QAbstractPropertyAlias.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanProperty.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanProperty.java index 13ba620c..9105d9dd 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanProperty.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanProperty.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanPropertyAlias.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanPropertyAlias.java index 492fd339..7f1be060 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanPropertyAlias.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanPropertyAlias.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanPropertyBinding.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanPropertyBinding.java index 3f608a28..16e174e2 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanPropertyBinding.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanPropertyBinding.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanPropertyData.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanPropertyData.java index ea1ec34d..1e3093fc 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanPropertyData.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QBooleanPropertyData.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QByteProperty.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QByteProperty.java index 1bf04b3b..7674afbc 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QByteProperty.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QByteProperty.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QBytePropertyAlias.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QBytePropertyAlias.java index cb2bc2c0..4fd57dee 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QBytePropertyAlias.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QBytePropertyAlias.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QBytePropertyBinding.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QBytePropertyBinding.java index 4c7c65b0..d0ebf3f7 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QBytePropertyBinding.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QBytePropertyBinding.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QBytePropertyData.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QBytePropertyData.java index 3e901392..27934b73 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QBytePropertyData.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QBytePropertyData.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QCharProperty.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QCharProperty.java index 096fe267..4cfab238 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QCharProperty.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QCharProperty.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QCharPropertyAlias.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QCharPropertyAlias.java index ae8aa4a3..97a82807 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QCharPropertyAlias.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QCharPropertyAlias.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QCharPropertyBinding.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QCharPropertyBinding.java index d1149b32..1c507b8c 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QCharPropertyBinding.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QCharPropertyBinding.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QCharPropertyData.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QCharPropertyData.java index 2de76995..e5c432ef 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QCharPropertyData.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QCharPropertyData.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QDoubleProperty.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QDoubleProperty.java index 2fd5cf84..a404e114 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QDoubleProperty.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QDoubleProperty.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QDoublePropertyAlias.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QDoublePropertyAlias.java index 000fd709..e7e1f2e3 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QDoublePropertyAlias.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QDoublePropertyAlias.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QDoublePropertyBinding.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QDoublePropertyBinding.java index 20b87542..dc3680ee 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QDoublePropertyBinding.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QDoublePropertyBinding.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QDoublePropertyData.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QDoublePropertyData.java index de004e25..5a171831 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QDoublePropertyData.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QDoublePropertyData.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatProperty.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatProperty.java index 7d589dd3..8808f7e7 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatProperty.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatProperty.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatPropertyAlias.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatPropertyAlias.java index d563fc24..14255044 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatPropertyAlias.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatPropertyAlias.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatPropertyBinding.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatPropertyBinding.java index d0988cd1..1575a8e6 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatPropertyBinding.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatPropertyBinding.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatPropertyData.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatPropertyData.java index d348c097..b62da87f 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatPropertyData.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QFloatPropertyData.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QFuture.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QFuture.java index 56c04398..515915b3 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QFuture.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QFuture.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QFutureInterface.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QFutureInterface.java index ffbc201f..02555715 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QFutureInterface.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QFutureInterface.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QIntProperty.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QIntProperty.java index 22dec467..f560f90f 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QIntProperty.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QIntProperty.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QIntPropertyAlias.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QIntPropertyAlias.java index 86e16a74..4c66d6cf 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QIntPropertyAlias.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QIntPropertyAlias.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QIntPropertyBinding.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QIntPropertyBinding.java index 3785b8f9..1ccc4e48 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QIntPropertyBinding.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QIntPropertyBinding.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QIntPropertyData.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QIntPropertyData.java index 3ce0b616..b63241f0 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QIntPropertyData.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QIntPropertyData.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QList.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QList.java index bb01c469..85f67693 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QList.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QList.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QLongProperty.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QLongProperty.java index 83808f85..d04a0fc6 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QLongProperty.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QLongProperty.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QLongPropertyAlias.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QLongPropertyAlias.java index 81f65da1..100d4290 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QLongPropertyAlias.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QLongPropertyAlias.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QLongPropertyBinding.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QLongPropertyBinding.java index ff3e3e14..f4115c7e 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QLongPropertyBinding.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QLongPropertyBinding.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QLongPropertyData.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QLongPropertyData.java index 3a97586d..53302961 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QLongPropertyData.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QLongPropertyData.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QPromise.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QPromise.java index a48150c0..6b5a2f27 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QPromise.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QPromise.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QProperty.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QProperty.java index 69205843..27ebf5f1 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QProperty.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QProperty.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyAlias.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyAlias.java index acefa129..0764ca21 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyAlias.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyAlias.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyBinding.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyBinding.java index 62ab99d4..aefe3298 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyBinding.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyBinding.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyChangeHandler.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyChangeHandler.java index 913c8ebd..9d633038 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyChangeHandler.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyChangeHandler.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyData.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyData.java index 68816ff0..7414c2f9 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyData.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyData.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyNotifier.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyNotifier.java index aba34d98..98ac1258 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyNotifier.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QPropertyNotifier.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QShortProperty.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QShortProperty.java index c3678219..57d6b367 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QShortProperty.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QShortProperty.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QShortPropertyAlias.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QShortPropertyAlias.java index 89ee64c1..154ce528 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QShortPropertyAlias.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QShortPropertyAlias.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QShortPropertyBinding.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QShortPropertyBinding.java index d38e49a2..cb446931 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QShortPropertyBinding.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QShortPropertyBinding.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/core/QShortPropertyData.java b/src/java/modules/qtjambi/Qt6/io/qt/core/QShortPropertyData.java index 8765836b..f97f6a80 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/core/QShortPropertyData.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/core/QShortPropertyData.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/internal/AbstractMetaObjectUtility.java b/src/java/modules/qtjambi/Qt6/io/qt/internal/AbstractMetaObjectUtility.java index acaaa8ce..058aa861 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/internal/AbstractMetaObjectUtility.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/internal/AbstractMetaObjectUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Qt6/io/qt/internal/PropertyInfo.java b/src/java/modules/qtjambi/Qt6/io/qt/internal/PropertyInfo.java index c0bc5421..a4ecbf9f 100644 --- a/src/java/modules/qtjambi/Qt6/io/qt/internal/PropertyInfo.java +++ b/src/java/modules/qtjambi/Qt6/io/qt/internal/PropertyInfo.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/Retro-JDK11/io/qt/internal/RetroHelper.java b/src/java/modules/qtjambi/Retro-JDK11/io/qt/internal/RetroHelper.java index b5b65ce2..5e2073a6 100644 --- a/src/java/modules/qtjambi/Retro-JDK11/io/qt/internal/RetroHelper.java +++ b/src/java/modules/qtjambi/Retro-JDK11/io/qt/internal/RetroHelper.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -276,8 +276,6 @@ public T getAnnotatedOwnerType(T actualType) { @Override public boolean isProcessAlive(String pid) { switch (LibraryUtility.operatingSystem) { - case Linux: - return new File("/proc/"+pid+"/exe").exists(); case MacOS: try { Process process = Runtime.getRuntime().exec(new String[]{"ps", "-p", pid}); @@ -293,6 +291,8 @@ public boolean isProcessAlive(String pid) { } break; default: + if(LibraryUtility.operatingSystem.isUnixLike()) + return new File("/proc/"+pid+"/exe").exists(); break; } return true; //...because unknown diff --git a/src/java/modules/qtjambi/Retro-JDK8/io/qt/internal/RetroHelper.java b/src/java/modules/qtjambi/Retro-JDK8/io/qt/internal/RetroHelper.java index 6faae062..0b08203b 100644 --- a/src/java/modules/qtjambi/Retro-JDK8/io/qt/internal/RetroHelper.java +++ b/src/java/modules/qtjambi/Retro-JDK8/io/qt/internal/RetroHelper.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/build.xml b/src/java/modules/qtjambi/build.xml index a3e5dfda..cd8271a6 100644 --- a/src/java/modules/qtjambi/build.xml +++ b/src/java/modules/qtjambi/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/modules/qtjambi/jsr305/io/qt/NonNull.java b/src/java/modules/qtjambi/jsr305/io/qt/NonNull.java index 4c88e193..f0cb6aba 100644 --- a/src/java/modules/qtjambi/jsr305/io/qt/NonNull.java +++ b/src/java/modules/qtjambi/jsr305/io/qt/NonNull.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/jsr305/io/qt/Nullable.java b/src/java/modules/qtjambi/jsr305/io/qt/Nullable.java index 9652ddcf..1c8e977d 100644 --- a/src/java/modules/qtjambi/jsr305/io/qt/Nullable.java +++ b/src/java/modules/qtjambi/jsr305/io/qt/Nullable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/jsr305/io/qt/StrictNonNull.java b/src/java/modules/qtjambi/jsr305/io/qt/StrictNonNull.java index 7393e38d..33639a86 100644 --- a/src/java/modules/qtjambi/jsr305/io/qt/StrictNonNull.java +++ b/src/java/modules/qtjambi/jsr305/io/qt/StrictNonNull.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/InternalAccess.java b/src/java/modules/qtjambi/main/io/qt/InternalAccess.java index 95995e77..ee786857 100644 --- a/src/java/modules/qtjambi/main/io/qt/InternalAccess.java +++ b/src/java/modules/qtjambi/main/io/qt/InternalAccess.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/MemberAccess.java b/src/java/modules/qtjambi/main/io/qt/MemberAccess.java index 4a090ecd..d01f36e4 100644 --- a/src/java/modules/qtjambi/main/io/qt/MemberAccess.java +++ b/src/java/modules/qtjambi/main/io/qt/MemberAccess.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/NativeAccess.java b/src/java/modules/qtjambi/main/io/qt/NativeAccess.java index 14e9113e..d672ecaa 100644 --- a/src/java/modules/qtjambi/main/io/qt/NativeAccess.java +++ b/src/java/modules/qtjambi/main/io/qt/NativeAccess.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QClassCannotBeSubclassedException.java b/src/java/modules/qtjambi/main/io/qt/QClassCannotBeSubclassedException.java index ca705a87..835e0b33 100644 --- a/src/java/modules/qtjambi/main/io/qt/QClassCannotBeSubclassedException.java +++ b/src/java/modules/qtjambi/main/io/qt/QClassCannotBeSubclassedException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QConnectionException.java b/src/java/modules/qtjambi/main/io/qt/QConnectionException.java index ff8905e4..0b4f2c96 100644 --- a/src/java/modules/qtjambi/main/io/qt/QConnectionException.java +++ b/src/java/modules/qtjambi/main/io/qt/QConnectionException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QDanglingPointerException.java b/src/java/modules/qtjambi/main/io/qt/QDanglingPointerException.java index 41c26cf7..ec2074b6 100644 --- a/src/java/modules/qtjambi/main/io/qt/QDanglingPointerException.java +++ b/src/java/modules/qtjambi/main/io/qt/QDanglingPointerException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QFlags.java b/src/java/modules/qtjambi/main/io/qt/QFlags.java index 3d7e4159..62d69535 100644 --- a/src/java/modules/qtjambi/main/io/qt/QFlags.java +++ b/src/java/modules/qtjambi/main/io/qt/QFlags.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QInterfaceCannotBeSubclassedException.java b/src/java/modules/qtjambi/main/io/qt/QInterfaceCannotBeSubclassedException.java index bf44d089..ecd1fa91 100644 --- a/src/java/modules/qtjambi/main/io/qt/QInterfaceCannotBeSubclassedException.java +++ b/src/java/modules/qtjambi/main/io/qt/QInterfaceCannotBeSubclassedException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QLibraryNotFoundError.java b/src/java/modules/qtjambi/main/io/qt/QLibraryNotFoundError.java index aa735685..362688f2 100644 --- a/src/java/modules/qtjambi/main/io/qt/QLibraryNotFoundError.java +++ b/src/java/modules/qtjambi/main/io/qt/QLibraryNotFoundError.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QLibraryNotLoadedError.java b/src/java/modules/qtjambi/main/io/qt/QLibraryNotLoadedError.java index 0a603ba0..31c9f9e4 100644 --- a/src/java/modules/qtjambi/main/io/qt/QLibraryNotLoadedError.java +++ b/src/java/modules/qtjambi/main/io/qt/QLibraryNotLoadedError.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QMisfittingSignatureException.java b/src/java/modules/qtjambi/main/io/qt/QMisfittingSignatureException.java index 0de35f62..462f8285 100644 --- a/src/java/modules/qtjambi/main/io/qt/QMisfittingSignatureException.java +++ b/src/java/modules/qtjambi/main/io/qt/QMisfittingSignatureException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QMissingVirtualOverridingException.java b/src/java/modules/qtjambi/main/io/qt/QMissingVirtualOverridingException.java index c2d730b2..00c731b1 100644 --- a/src/java/modules/qtjambi/main/io/qt/QMissingVirtualOverridingException.java +++ b/src/java/modules/qtjambi/main/io/qt/QMissingVirtualOverridingException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QNativePointer.java b/src/java/modules/qtjambi/main/io/qt/QNativePointer.java index bbf48293..4b78fcfb 100644 --- a/src/java/modules/qtjambi/main/io/qt/QNativePointer.java +++ b/src/java/modules/qtjambi/main/io/qt/QNativePointer.java @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 1992-2009 Nokia. All rights reserved. -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of QtJambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QNoDefaultValueException.java b/src/java/modules/qtjambi/main/io/qt/QNoDefaultValueException.java index 2bc49a3d..51ba8565 100644 --- a/src/java/modules/qtjambi/main/io/qt/QNoDefaultValueException.java +++ b/src/java/modules/qtjambi/main/io/qt/QNoDefaultValueException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QNoImplementationException.java b/src/java/modules/qtjambi/main/io/qt/QNoImplementationException.java index ff4cf2bc..e70816ff 100644 --- a/src/java/modules/qtjambi/main/io/qt/QNoImplementationException.java +++ b/src/java/modules/qtjambi/main/io/qt/QNoImplementationException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QNoNativeResourcesException.java b/src/java/modules/qtjambi/main/io/qt/QNoNativeResourcesException.java index 78790e59..af6c538e 100644 --- a/src/java/modules/qtjambi/main/io/qt/QNoNativeResourcesException.java +++ b/src/java/modules/qtjambi/main/io/qt/QNoNativeResourcesException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QNoSuchEnumValueException.java b/src/java/modules/qtjambi/main/io/qt/QNoSuchEnumValueException.java index f232ebf5..8a51f5e5 100644 --- a/src/java/modules/qtjambi/main/io/qt/QNoSuchEnumValueException.java +++ b/src/java/modules/qtjambi/main/io/qt/QNoSuchEnumValueException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QNoSuchMethodException.java b/src/java/modules/qtjambi/main/io/qt/QNoSuchMethodException.java index 60feddab..6ab2e9e2 100644 --- a/src/java/modules/qtjambi/main/io/qt/QNoSuchMethodException.java +++ b/src/java/modules/qtjambi/main/io/qt/QNoSuchMethodException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QNoSuchSignalException.java b/src/java/modules/qtjambi/main/io/qt/QNoSuchSignalException.java index fdd37291..82e7c2e0 100644 --- a/src/java/modules/qtjambi/main/io/qt/QNoSuchSignalException.java +++ b/src/java/modules/qtjambi/main/io/qt/QNoSuchSignalException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QNoSuchSlotException.java b/src/java/modules/qtjambi/main/io/qt/QNoSuchSlotException.java index ac4b49d8..8cba6ab9 100644 --- a/src/java/modules/qtjambi/main/io/qt/QNoSuchSlotException.java +++ b/src/java/modules/qtjambi/main/io/qt/QNoSuchSlotException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QNonVirtualOverridingException.java b/src/java/modules/qtjambi/main/io/qt/QNonVirtualOverridingException.java index 22074fda..f82064a4 100644 --- a/src/java/modules/qtjambi/main/io/qt/QNonVirtualOverridingException.java +++ b/src/java/modules/qtjambi/main/io/qt/QNonVirtualOverridingException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QPropertyDeclarationException.java b/src/java/modules/qtjambi/main/io/qt/QPropertyDeclarationException.java index 245d2d5d..60dda8d4 100644 --- a/src/java/modules/qtjambi/main/io/qt/QPropertyDeclarationException.java +++ b/src/java/modules/qtjambi/main/io/qt/QPropertyDeclarationException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QSignalAccessException.java b/src/java/modules/qtjambi/main/io/qt/QSignalAccessException.java index 4fc21421..6c739b22 100644 --- a/src/java/modules/qtjambi/main/io/qt/QSignalAccessException.java +++ b/src/java/modules/qtjambi/main/io/qt/QSignalAccessException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QSignalDeclarationException.java b/src/java/modules/qtjambi/main/io/qt/QSignalDeclarationException.java index 1dbba01d..13e9b8ba 100644 --- a/src/java/modules/qtjambi/main/io/qt/QSignalDeclarationException.java +++ b/src/java/modules/qtjambi/main/io/qt/QSignalDeclarationException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QSignalInitializationException.java b/src/java/modules/qtjambi/main/io/qt/QSignalInitializationException.java index cc1ac266..2b4bdf7f 100644 --- a/src/java/modules/qtjambi/main/io/qt/QSignalInitializationException.java +++ b/src/java/modules/qtjambi/main/io/qt/QSignalInitializationException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QSignalInvocationException.java b/src/java/modules/qtjambi/main/io/qt/QSignalInvocationException.java index 78a8856a..33df789b 100644 --- a/src/java/modules/qtjambi/main/io/qt/QSignalInvocationException.java +++ b/src/java/modules/qtjambi/main/io/qt/QSignalInvocationException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QThreadAffinityException.java b/src/java/modules/qtjambi/main/io/qt/QThreadAffinityException.java index 33b97afd..502e1c85 100644 --- a/src/java/modules/qtjambi/main/io/qt/QThreadAffinityException.java +++ b/src/java/modules/qtjambi/main/io/qt/QThreadAffinityException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QUninvokableSlotException.java b/src/java/modules/qtjambi/main/io/qt/QUninvokableSlotException.java index 414919a6..f123605e 100644 --- a/src/java/modules/qtjambi/main/io/qt/QUninvokableSlotException.java +++ b/src/java/modules/qtjambi/main/io/qt/QUninvokableSlotException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QUnsuccessfulInvocationException.java b/src/java/modules/qtjambi/main/io/qt/QUnsuccessfulInvocationException.java index 6ea08c8f..8274d2b7 100644 --- a/src/java/modules/qtjambi/main/io/qt/QUnsuccessfulInvocationException.java +++ b/src/java/modules/qtjambi/main/io/qt/QUnsuccessfulInvocationException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtAbstractEnumerator.java b/src/java/modules/qtjambi/main/io/qt/QtAbstractEnumerator.java index 476d9ea6..5cd07e91 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtAbstractEnumerator.java +++ b/src/java/modules/qtjambi/main/io/qt/QtAbstractEnumerator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtAbstractFlagEnumerator.java b/src/java/modules/qtjambi/main/io/qt/QtAbstractFlagEnumerator.java index de413741..938fcb60 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtAbstractFlagEnumerator.java +++ b/src/java/modules/qtjambi/main/io/qt/QtAbstractFlagEnumerator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtAllowedTypeSet.java b/src/java/modules/qtjambi/main/io/qt/QtAllowedTypeSet.java index d74d5fa1..55ade9de 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtAllowedTypeSet.java +++ b/src/java/modules/qtjambi/main/io/qt/QtAllowedTypeSet.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtAllowedTypeSets.java b/src/java/modules/qtjambi/main/io/qt/QtAllowedTypeSets.java index 069402fd..5ef4e3d3 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtAllowedTypeSets.java +++ b/src/java/modules/qtjambi/main/io/qt/QtAllowedTypeSets.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtArgument.java b/src/java/modules/qtjambi/main/io/qt/QtArgument.java index 1c38a51e..88b78750 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtArgument.java +++ b/src/java/modules/qtjambi/main/io/qt/QtArgument.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtAsGadget.java b/src/java/modules/qtjambi/main/io/qt/QtAsGadget.java index 4ec0b37c..afb0cb4e 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtAsGadget.java +++ b/src/java/modules/qtjambi/main/io/qt/QtAsGadget.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtByteEnumerator.java b/src/java/modules/qtjambi/main/io/qt/QtByteEnumerator.java index 973b1533..aed7c704 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtByteEnumerator.java +++ b/src/java/modules/qtjambi/main/io/qt/QtByteEnumerator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtByteFlagEnumerator.java b/src/java/modules/qtjambi/main/io/qt/QtByteFlagEnumerator.java index 1f76995a..8a728339 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtByteFlagEnumerator.java +++ b/src/java/modules/qtjambi/main/io/qt/QtByteFlagEnumerator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtClassInfo.java b/src/java/modules/qtjambi/main/io/qt/QtClassInfo.java index fa39be33..4daadf5e 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtClassInfo.java +++ b/src/java/modules/qtjambi/main/io/qt/QtClassInfo.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtClassInfos.java b/src/java/modules/qtjambi/main/io/qt/QtClassInfos.java index 6f9d183b..1d9fa7cc 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtClassInfos.java +++ b/src/java/modules/qtjambi/main/io/qt/QtClassInfos.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtDeclaredFinal.java b/src/java/modules/qtjambi/main/io/qt/QtDeclaredFinal.java index 6d494abb..4708060e 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtDeclaredFinal.java +++ b/src/java/modules/qtjambi/main/io/qt/QtDeclaredFinal.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtEnumerator.java b/src/java/modules/qtjambi/main/io/qt/QtEnumerator.java index 091be7fa..b64b2002 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtEnumerator.java +++ b/src/java/modules/qtjambi/main/io/qt/QtEnumerator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtExtensibleEnum.java b/src/java/modules/qtjambi/main/io/qt/QtExtensibleEnum.java index de7c9a85..62bd2500 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtExtensibleEnum.java +++ b/src/java/modules/qtjambi/main/io/qt/QtExtensibleEnum.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtFinalOverride.java b/src/java/modules/qtjambi/main/io/qt/QtFinalOverride.java index 2c65e540..9846b187 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtFinalOverride.java +++ b/src/java/modules/qtjambi/main/io/qt/QtFinalOverride.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtFlagEnumerator.java b/src/java/modules/qtjambi/main/io/qt/QtFlagEnumerator.java index 67a4e61b..880bc803 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtFlagEnumerator.java +++ b/src/java/modules/qtjambi/main/io/qt/QtFlagEnumerator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtGadget.java b/src/java/modules/qtjambi/main/io/qt/QtGadget.java index 26fac143..c4e9beb8 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtGadget.java +++ b/src/java/modules/qtjambi/main/io/qt/QtGadget.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtInvokable.java b/src/java/modules/qtjambi/main/io/qt/QtInvokable.java index 1c57c8a2..ae64cf20 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtInvokable.java +++ b/src/java/modules/qtjambi/main/io/qt/QtInvokable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtLongEnumerator.java b/src/java/modules/qtjambi/main/io/qt/QtLongEnumerator.java index 9f64acf2..71fbbf6c 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtLongEnumerator.java +++ b/src/java/modules/qtjambi/main/io/qt/QtLongEnumerator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtLongFlagEnumerator.java b/src/java/modules/qtjambi/main/io/qt/QtLongFlagEnumerator.java index 6af5e101..57fc8521 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtLongFlagEnumerator.java +++ b/src/java/modules/qtjambi/main/io/qt/QtLongFlagEnumerator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtMetaType.java b/src/java/modules/qtjambi/main/io/qt/QtMetaType.java index 5672c99f..6240b85c 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtMetaType.java +++ b/src/java/modules/qtjambi/main/io/qt/QtMetaType.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtObject.java b/src/java/modules/qtjambi/main/io/qt/QtObject.java index 6c2e709f..fa1bb8d3 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtObject.java +++ b/src/java/modules/qtjambi/main/io/qt/QtObject.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtObjectInterface.java b/src/java/modules/qtjambi/main/io/qt/QtObjectInterface.java index cd80ab47..f97abe56 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtObjectInterface.java +++ b/src/java/modules/qtjambi/main/io/qt/QtObjectInterface.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPointerType.java b/src/java/modules/qtjambi/main/io/qt/QtPointerType.java index 3c339389..62af8354 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPointerType.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPointerType.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPrimitiveType.java b/src/java/modules/qtjambi/main/io/qt/QtPrimitiveType.java index 6fc1dc0e..fe6cfe8e 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPrimitiveType.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPrimitiveType.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPrivateOverride.java b/src/java/modules/qtjambi/main/io/qt/QtPrivateOverride.java index 935aa5c8..27aacb87 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPrivateOverride.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPrivateOverride.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPropertyConstant.java b/src/java/modules/qtjambi/main/io/qt/QtPropertyConstant.java index 2ed8d763..5218ab4b 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPropertyConstant.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPropertyConstant.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPropertyDesignable.java b/src/java/modules/qtjambi/main/io/qt/QtPropertyDesignable.java index 100d3c50..6ffb4ab6 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPropertyDesignable.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPropertyDesignable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPropertyMember.java b/src/java/modules/qtjambi/main/io/qt/QtPropertyMember.java index a33abbfb..fb81ae57 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPropertyMember.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPropertyMember.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPropertyNotify.java b/src/java/modules/qtjambi/main/io/qt/QtPropertyNotify.java index c1741c65..0a595c7f 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPropertyNotify.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPropertyNotify.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPropertyReader.java b/src/java/modules/qtjambi/main/io/qt/QtPropertyReader.java index 0b8eea05..191827ef 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPropertyReader.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPropertyReader.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPropertyRequired.java b/src/java/modules/qtjambi/main/io/qt/QtPropertyRequired.java index 7ed15f1a..10e97118 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPropertyRequired.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPropertyRequired.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPropertyResetter.java b/src/java/modules/qtjambi/main/io/qt/QtPropertyResetter.java index 6058b643..7ddd7f6f 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPropertyResetter.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPropertyResetter.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPropertyScriptable.java b/src/java/modules/qtjambi/main/io/qt/QtPropertyScriptable.java index 343b0e30..2c270e6e 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPropertyScriptable.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPropertyScriptable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPropertyStored.java b/src/java/modules/qtjambi/main/io/qt/QtPropertyStored.java index 39a7db76..83af3678 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPropertyStored.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPropertyStored.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPropertyUser.java b/src/java/modules/qtjambi/main/io/qt/QtPropertyUser.java index 0eb10046..a331fa1f 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPropertyUser.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPropertyUser.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtPropertyWriter.java b/src/java/modules/qtjambi/main/io/qt/QtPropertyWriter.java index 5ae3c948..55c750e7 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtPropertyWriter.java +++ b/src/java/modules/qtjambi/main/io/qt/QtPropertyWriter.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtReferenceType.java b/src/java/modules/qtjambi/main/io/qt/QtReferenceType.java index 180e4c61..bf2c849f 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtReferenceType.java +++ b/src/java/modules/qtjambi/main/io/qt/QtReferenceType.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtRejectedEntries.java b/src/java/modules/qtjambi/main/io/qt/QtRejectedEntries.java index 1f2bd2bd..843e2730 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtRejectedEntries.java +++ b/src/java/modules/qtjambi/main/io/qt/QtRejectedEntries.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtResources.java b/src/java/modules/qtjambi/main/io/qt/QtResources.java index 916846c9..6d06b6d9 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtResources.java +++ b/src/java/modules/qtjambi/main/io/qt/QtResources.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtShortEnumerator.java b/src/java/modules/qtjambi/main/io/qt/QtShortEnumerator.java index 7035aea2..278a3d55 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtShortEnumerator.java +++ b/src/java/modules/qtjambi/main/io/qt/QtShortEnumerator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtShortFlagEnumerator.java b/src/java/modules/qtjambi/main/io/qt/QtShortFlagEnumerator.java index eed1d4c2..4e539fc0 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtShortFlagEnumerator.java +++ b/src/java/modules/qtjambi/main/io/qt/QtShortFlagEnumerator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtSignalBlockerInterface.java b/src/java/modules/qtjambi/main/io/qt/QtSignalBlockerInterface.java index e1b2daf2..c5cc1735 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtSignalBlockerInterface.java +++ b/src/java/modules/qtjambi/main/io/qt/QtSignalBlockerInterface.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtSignalEmitterInterface.java b/src/java/modules/qtjambi/main/io/qt/QtSignalEmitterInterface.java index 7a8220aa..4a1c3004 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtSignalEmitterInterface.java +++ b/src/java/modules/qtjambi/main/io/qt/QtSignalEmitterInterface.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtThreadAffineInterface.java b/src/java/modules/qtjambi/main/io/qt/QtThreadAffineInterface.java index 6f7988f3..91a4e334 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtThreadAffineInterface.java +++ b/src/java/modules/qtjambi/main/io/qt/QtThreadAffineInterface.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtUninvokable.java b/src/java/modules/qtjambi/main/io/qt/QtUninvokable.java index 23bd3c72..dd7ea9f9 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtUninvokable.java +++ b/src/java/modules/qtjambi/main/io/qt/QtUninvokable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtUnlistedEnum.java b/src/java/modules/qtjambi/main/io/qt/QtUnlistedEnum.java index 96157f41..21b4018e 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtUnlistedEnum.java +++ b/src/java/modules/qtjambi/main/io/qt/QtUnlistedEnum.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/QtUtilities.java b/src/java/modules/qtjambi/main/io/qt/QtUtilities.java index 8c8a8bba..12b8b755 100644 --- a/src/java/modules/qtjambi/main/io/qt/QtUtilities.java +++ b/src/java/modules/qtjambi/main/io/qt/QtUtilities.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/AbstractAssociativeContainer.java b/src/java/modules/qtjambi/main/io/qt/core/AbstractAssociativeContainer.java index 47f21072..49f99675 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/AbstractAssociativeContainer.java +++ b/src/java/modules/qtjambi/main/io/qt/core/AbstractAssociativeContainer.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/AbstractContainer.java b/src/java/modules/qtjambi/main/io/qt/core/AbstractContainer.java index ec4b0f4b..da254221 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/AbstractContainer.java +++ b/src/java/modules/qtjambi/main/io/qt/core/AbstractContainer.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/AbstractIterator.java b/src/java/modules/qtjambi/main/io/qt/core/AbstractIterator.java index 879294ed..5e016b5b 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/AbstractIterator.java +++ b/src/java/modules/qtjambi/main/io/qt/core/AbstractIterator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/AbstractList.java b/src/java/modules/qtjambi/main/io/qt/core/AbstractList.java index 13f83d59..20739607 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/AbstractList.java +++ b/src/java/modules/qtjambi/main/io/qt/core/AbstractList.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/AbstractMultiAssociativeContainer.java b/src/java/modules/qtjambi/main/io/qt/core/AbstractMultiAssociativeContainer.java index 092f1b50..ebd6eebe 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/AbstractMultiAssociativeContainer.java +++ b/src/java/modules/qtjambi/main/io/qt/core/AbstractMultiAssociativeContainer.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/AbstractSequentialContainer.java b/src/java/modules/qtjambi/main/io/qt/core/AbstractSequentialContainer.java index 536df381..e3f45e91 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/AbstractSequentialContainer.java +++ b/src/java/modules/qtjambi/main/io/qt/core/AbstractSequentialContainer.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QAssociativeConstIterator.java b/src/java/modules/qtjambi/main/io/qt/core/QAssociativeConstIterator.java index 4a3f5adf..009b769c 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QAssociativeConstIterator.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QAssociativeConstIterator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QAssociativeIterator.java b/src/java/modules/qtjambi/main/io/qt/core/QAssociativeIterator.java index cc09d830..a62780df 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QAssociativeIterator.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QAssociativeIterator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QDeclarableSignals.java b/src/java/modules/qtjambi/main/io/qt/core/QDeclarableSignals.java index 38b2278f..03c604f7 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QDeclarableSignals.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QDeclarableSignals.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QException.java b/src/java/modules/qtjambi/main/io/qt/core/QException.java index 14d50239..d72b9518 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QException.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QFunctionPointerUtil.java b/src/java/modules/qtjambi/main/io/qt/core/QFunctionPointerUtil.java index dfe599f7..aaff27b7 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QFunctionPointerUtil.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QFunctionPointerUtil.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QGenericArgument.java b/src/java/modules/qtjambi/main/io/qt/core/QGenericArgument.java index f3e32050..aafc80ca 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QGenericArgument.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QGenericArgument.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QGenericArgumentType.java b/src/java/modules/qtjambi/main/io/qt/core/QGenericArgumentType.java index 0845f285..3383f7cc 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QGenericArgumentType.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QGenericArgumentType.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QGenericReturnType.java b/src/java/modules/qtjambi/main/io/qt/core/QGenericReturnType.java index 8e4aafd8..75e73a7d 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QGenericReturnType.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QGenericReturnType.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QHash.java b/src/java/modules/qtjambi/main/io/qt/core/QHash.java index 81141106..dfc190fc 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QHash.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QHash.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QInstanceMemberSignals.java b/src/java/modules/qtjambi/main/io/qt/core/QInstanceMemberSignals.java index c991054b..78f19b32 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QInstanceMemberSignals.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QInstanceMemberSignals.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QLogging.java b/src/java/modules/qtjambi/main/io/qt/core/QLogging.java index d178761e..e2daa9fa 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QLogging.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QLogging.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QMap.java b/src/java/modules/qtjambi/main/io/qt/core/QMap.java index aaaa39ee..054c2ebc 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QMap.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QMap.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QMetaObject.java b/src/java/modules/qtjambi/main/io/qt/core/QMetaObject.java index 373e0e7b..39342bce 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QMetaObject.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QMetaObject.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -12936,8 +12936,11 @@ private static String cppNormalizedSignature(@StrictNonNull String signalName, C List possibleMethods = new ArrayList<>(); while(classType!=null) { for(Method method : classType.getDeclaredMethods()) { - if(method.getParameterCount()==argumentTypes.length) - possibleMethods.add(method.getParameters()); + if(method.getParameterCount()==argumentTypes.length) { + try { + possibleMethods.add(method.getParameters()); + }catch(java.lang.reflect.MalformedParametersException e) {} + } } classType = classType.getSuperclass(); } diff --git a/src/java/modules/qtjambi/main/io/qt/core/QMultiHash.java b/src/java/modules/qtjambi/main/io/qt/core/QMultiHash.java index c8baa38a..5d43a67a 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QMultiHash.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QMultiHash.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QMultiMap.java b/src/java/modules/qtjambi/main/io/qt/core/QMultiMap.java index 3bd1e150..4ee25d23 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QMultiMap.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QMultiMap.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QPair.java b/src/java/modules/qtjambi/main/io/qt/core/QPair.java index 9fb863d7..28c89004 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QPair.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QPair.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QPointer.java b/src/java/modules/qtjambi/main/io/qt/core/QPointer.java index ff34ec57..123f3b11 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QPointer.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QPointer.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QQueue.java b/src/java/modules/qtjambi/main/io/qt/core/QQueue.java index 3cc4a5aa..97c18651 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QQueue.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QQueue.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QScope.java b/src/java/modules/qtjambi/main/io/qt/core/QScope.java index c9e9c677..0ec09b8b 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QScope.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QScope.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QScopeGuard.java b/src/java/modules/qtjambi/main/io/qt/core/QScopeGuard.java index 942898b4..59454cd6 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QScopeGuard.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QScopeGuard.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QScopedArrayPointer.java b/src/java/modules/qtjambi/main/io/qt/core/QScopedArrayPointer.java index f65490d9..bb7a5417 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QScopedArrayPointer.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QScopedArrayPointer.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QScopedPointer.java b/src/java/modules/qtjambi/main/io/qt/core/QScopedPointer.java index f110d3a7..a548a804 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QScopedPointer.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QScopedPointer.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QSequentialConstIterator.java b/src/java/modules/qtjambi/main/io/qt/core/QSequentialConstIterator.java index ed8ee979..fa3acbc1 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QSequentialConstIterator.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QSequentialConstIterator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QSequentialIterator.java b/src/java/modules/qtjambi/main/io/qt/core/QSequentialIterator.java index 09c8fcd6..256b106d 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QSequentialIterator.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QSequentialIterator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QSet.java b/src/java/modules/qtjambi/main/io/qt/core/QSet.java index 1a97d989..04e71246 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QSet.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QSet.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QStaticMemberSignals.java b/src/java/modules/qtjambi/main/io/qt/core/QStaticMemberSignals.java index e1d4a5c0..c8dc5827 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QStaticMemberSignals.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QStaticMemberSignals.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QUnhandledException.java b/src/java/modules/qtjambi/main/io/qt/core/QUnhandledException.java index 94368011..2b3b3037 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QUnhandledException.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QUnhandledException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/QWeakPointer.java b/src/java/modules/qtjambi/main/io/qt/core/QWeakPointer.java index 8aa2f8d8..d4d9fd76 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/QWeakPointer.java +++ b/src/java/modules/qtjambi/main/io/qt/core/QWeakPointer.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/StackDeque.java b/src/java/modules/qtjambi/main/io/qt/core/StackDeque.java index cd25a378..9b97fef3 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/StackDeque.java +++ b/src/java/modules/qtjambi/main/io/qt/core/StackDeque.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/core/internal/QtPluginMetaData.java b/src/java/modules/qtjambi/main/io/qt/core/internal/QtPluginMetaData.java index c011629f..d3cff5ba 100644 --- a/src/java/modules/qtjambi/main/io/qt/core/internal/QtPluginMetaData.java +++ b/src/java/modules/qtjambi/main/io/qt/core/internal/QtPluginMetaData.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/gui/QPaintingOutsidePaintEventException.java b/src/java/modules/qtjambi/main/io/qt/gui/QPaintingOutsidePaintEventException.java index d1f640cb..3228f3b0 100644 --- a/src/java/modules/qtjambi/main/io/qt/gui/QPaintingOutsidePaintEventException.java +++ b/src/java/modules/qtjambi/main/io/qt/gui/QPaintingOutsidePaintEventException.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/gui/gl/GLsync.java b/src/java/modules/qtjambi/main/io/qt/gui/gl/GLsync.java index e0012145..c22b28fa 100644 --- a/src/java/modules/qtjambi/main/io/qt/gui/gl/GLsync.java +++ b/src/java/modules/qtjambi/main/io/qt/gui/gl/GLsync.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/internal/AccessUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/AccessUtility.java index 97166388..b9304c23 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/AccessUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/AccessUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/internal/ClassAnalyzerUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/ClassAnalyzerUtility.java index d9de21a1..fcc3a15c 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/ClassAnalyzerUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/ClassAnalyzerUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -227,13 +227,24 @@ private static void checkImplementation(Class origi builder.append(' '); builder.append(method.getName()); builder.append('('); - Parameter[] ptypes = method.getParameters(); - for (int i = 0; i < ptypes.length; i++) { - if (i > 0) - builder.append(','); - builder.append(ptypes[i].getType().getName().replace('$', '.')); - builder.append(' '); - builder.append(ptypes[i].getName()); + try { + Parameter[] ptypes = method.getParameters(); + for (int i = 0; i < ptypes.length; i++) { + if (i > 0) + builder.append(','); + builder.append(ptypes[i].getType().getName().replace('$', '.')); + builder.append(' '); + builder.append(ptypes[i].getName()); + } + }catch(java.lang.reflect.MalformedParametersException e) { + Class[] ptypes = method.getParameterTypes(); + for (int i = 0; i < ptypes.length; i++) { + if (i > 0) + builder.append(','); + builder.append(ptypes[i].getName().replace('$', '.')); + builder.append(' '); + builder.append("arg__"+(i+1)); + } } builder.append(')'); return new Throwing(new QMissingVirtualOverridingException(String.format( @@ -255,13 +266,24 @@ private static void checkImplementation(Class origi builder.append(' '); builder.append(method.getName()); builder.append('('); - Parameter[] ptypes = method.getParameters(); - for (int i = 0; i < ptypes.length; i++) { - if (i > 0) - builder.append(','); - builder.append(ptypes[i].getType().getName().replace('$', '.')); - builder.append(' '); - builder.append(ptypes[i].getName()); + try { + Parameter[] ptypes = method.getParameters(); + for (int i = 0; i < ptypes.length; i++) { + if (i > 0) + builder.append(','); + builder.append(ptypes[i].getType().getName().replace('$', '.')); + builder.append(' '); + builder.append(ptypes[i].getName()); + } + }catch(java.lang.reflect.MalformedParametersException e) { + Class[] ptypes = method.getParameterTypes(); + for (int i = 0; i < ptypes.length; i++) { + if (i > 0) + builder.append(','); + builder.append(ptypes[i].getName().replace('$', '.')); + builder.append(' '); + builder.append("arg__"+(i+1)); + } } builder.append(')'); } @@ -283,13 +305,24 @@ private static void checkImplementation(Class origi builder.append(' '); builder.append(method.getName()); builder.append('('); - Parameter[] ptypes = method.getParameters(); - for (int i = 0; i < ptypes.length; i++) { - if (i > 0) - builder.append(','); - builder.append(ptypes[i].getType().getName().replace('$', '.')); - builder.append(' '); - builder.append(ptypes[i].getName()); + try { + Parameter[] ptypes = method.getParameters(); + for (int i = 0; i < ptypes.length; i++) { + if (i > 0) + builder.append(','); + builder.append(ptypes[i].getType().getName().replace('$', '.')); + builder.append(' '); + builder.append(ptypes[i].getName()); + } + }catch(java.lang.reflect.MalformedParametersException e) { + Class[] ptypes = method.getParameterTypes(); + for (int i = 0; i < ptypes.length; i++) { + if (i > 0) + builder.append(','); + builder.append(ptypes[i].getName().replace('$', '.')); + builder.append(' '); + builder.append("arg__"+(i+1)); + } } builder.append(')'); return new Throwing(new QNonVirtualOverridingException(String.format( @@ -312,13 +345,24 @@ private static void checkImplementation(Class origi builder.append(' '); builder.append(method.getName()); builder.append('('); - Parameter[] ptypes = method.getParameters(); - for (int i = 0; i < ptypes.length; i++) { - if (i > 0) - builder.append(','); - builder.append(ptypes[i].getType().getName().replace('$', '.')); - builder.append(' '); - builder.append(ptypes[i].getName()); + try { + Parameter[] ptypes = method.getParameters(); + for (int i = 0; i < ptypes.length; i++) { + if (i > 0) + builder.append(','); + builder.append(ptypes[i].getType().getName().replace('$', '.')); + builder.append(' '); + builder.append(ptypes[i].getName()); + } + }catch(java.lang.reflect.MalformedParametersException e) { + Class[] ptypes = method.getParameterTypes(); + for (int i = 0; i < ptypes.length; i++) { + if (i > 0) + builder.append(','); + builder.append(ptypes[i].getName().replace('$', '.')); + builder.append(' '); + builder.append("arg__"+(i+1)); + } } builder.append(')'); } @@ -340,13 +384,24 @@ private static void checkImplementation(Class origi builder.append(' '); builder.append(method.getName()); builder.append('('); - Parameter[] ptypes = method.getParameters(); - for (int i = 0; i < ptypes.length; i++) { - if (i > 0) - builder.append(','); - builder.append(ptypes[i].getType().getName().replace('$', '.')); - builder.append(' '); - builder.append(ptypes[i].getName()); + try { + Parameter[] ptypes = method.getParameters(); + for (int i = 0; i < ptypes.length; i++) { + if (i > 0) + builder.append(','); + builder.append(ptypes[i].getType().getName().replace('$', '.')); + builder.append(' '); + builder.append(ptypes[i].getName()); + } + }catch(java.lang.reflect.MalformedParametersException e) { + Class[] ptypes = method.getParameterTypes(); + for (int i = 0; i < ptypes.length; i++) { + if (i > 0) + builder.append(','); + builder.append(ptypes[i].getName().replace('$', '.')); + builder.append(' '); + builder.append("arg__"+(i+1)); + } } builder.append(')'); return new Throwing(new QNonVirtualOverridingException( @@ -370,13 +425,24 @@ private static void checkImplementation(Class origi builder.append(' '); builder.append(method.getName()); builder.append('('); - Parameter[] ptypes = method.getParameters(); - for (int i = 0; i < ptypes.length; i++) { - if (i > 0) - builder.append(','); - builder.append(ptypes[i].getType().getName().replace('$', '.')); - builder.append(' '); - builder.append(ptypes[i].getName()); + try { + Parameter[] ptypes = method.getParameters(); + for (int i = 0; i < ptypes.length; i++) { + if (i > 0) + builder.append(','); + builder.append(ptypes[i].getType().getName().replace('$', '.')); + builder.append(' '); + builder.append(ptypes[i].getName()); + } + }catch(java.lang.reflect.MalformedParametersException e) { + Class[] ptypes = method.getParameterTypes(); + for (int i = 0; i < ptypes.length; i++) { + if (i > 0) + builder.append(','); + builder.append(ptypes[i].getName().replace('$', '.')); + builder.append(' '); + builder.append("arg__"+(i+1)); + } } builder.append(')'); } @@ -641,6 +707,20 @@ public static LambdaInfo lambdaInfo(Serializable slotObject) { return new LambdaInfo(ownerClass, owner, qobject, false, methodHandle, reflectiveMethod, reflectiveConstructor, lambdaArgsList == Collections.emptyList() ? lambdaArgsList : Collections.unmodifiableList(lambdaArgsList)); + } else if(reflectiveConstructor!=null + && serializedLambda.getCapturedArgCount() > 0 + && ( + (ownerClass.getEnclosingClass()!=null && ownerClass.getEnclosingClass().isInstance(serializedLambda.getCapturedArg(0))) + || (ownerClass.getDeclaringClass()!=null && ownerClass.getDeclaringClass().isInstance(serializedLambda.getCapturedArg(0))) + ) + ) { + lambdaArgsList = new ArrayList<>(); + for (int i = 0; i < serializedLambda.getCapturedArgCount(); i++) { + lambdaArgsList.add(serializedLambda.getCapturedArg(i)); + } + return new LambdaInfo(ownerClass, owner, qobject, false, methodHandle, reflectiveMethod, + reflectiveConstructor, lambdaArgsList == Collections.emptyList() ? lambdaArgsList + : Collections.unmodifiableList(lambdaArgsList)); } } } @@ -814,9 +894,18 @@ static int[] lambdaMetaTypes(Class type, S l Class returnType = lamdaInfo.reflectiveMethod.getReturnType(); Type genericReturnType = lamdaInfo.reflectiveMethod.getGenericReturnType(); metaTypes[0] = MetaTypeUtility.registerMetaType(returnType, genericReturnType, rt, false, false); - Parameter[] parameters = lamdaInfo.reflectiveMethod.getParameters(); - for (int i = 0; i < parameters.length; i++) { - metaTypes[i+1] = MetaTypeUtility.registerMetaType(parameters[i]); + try { + Parameter[] parameters = lamdaInfo.reflectiveMethod.getParameters(); + for (int i = 0; i < parameters.length; i++) { + metaTypes[i+1] = MetaTypeUtility.registerMetaType(parameters[i]); + } + }catch(java.lang.reflect.MalformedParametersException e) { + for (int i = 0; i < lamdaInfo.reflectiveMethod.getParameterCount(); i++) { + AnnotatedElement annotatedParameterType = null; + if(useAnnotatedType) + annotatedParameterType = lamdaInfo.reflectiveMethod.getAnnotatedParameterTypes()[i]; + metaTypes[i+1] = MetaTypeUtility.registerMetaType(lamdaInfo.reflectiveMethod.getParameterTypes()[i], lamdaInfo.reflectiveMethod.getGenericParameterTypes()[i], annotatedParameterType, false, false); + } } return metaTypes; }else { @@ -856,9 +945,18 @@ static int[] lambdaMetaTypes(Class type, S l Type genericReturnType = mtd.getGenericReturnType(); metaTypes[0] = MetaTypeUtility.registerMetaType(returnType, genericReturnType, ae, false, false); } - Parameter[] params = mtd.getParameters(); - for (int i = 0; i < params.length; i++) { - metaTypes[i+1] = MetaTypeUtility.registerMetaType(params[i]); + try { + Parameter[] parameters = mtd.getParameters(); + for (int i = 0; i < parameters.length; i++) { + metaTypes[i+1] = MetaTypeUtility.registerMetaType(parameters[i]); + } + }catch(java.lang.reflect.MalformedParametersException e) { + for (int i = 0; i < mtd.getParameterCount(); i++) { + AnnotatedElement annotatedParameterType = null; + if(useAnnotatedType) + annotatedParameterType = mtd.getAnnotatedParameterTypes()[i]; + metaTypes[i+1] = MetaTypeUtility.registerMetaType(mtd.getParameterTypes()[i], mtd.getGenericParameterTypes()[i], annotatedParameterType, false, false); + } } return metaTypes; } @@ -875,10 +973,12 @@ static Class[] lambdaClassTypes(Class typ if (lamdaInfo!=null && lamdaInfo.reflectiveMethod != null) { Class[] classTypes = new Class[1+lamdaInfo.reflectiveMethod.getParameterCount()]; classTypes[0] = lamdaInfo.reflectiveMethod.getReturnType(); - Parameter[] parameters = lamdaInfo.reflectiveMethod.getParameters(); - for (int i = 0; i < parameters.length; i++) { - classTypes[i+1] = parameters[i].getType(); - } + try { + Class[] parameters = lamdaInfo.reflectiveMethod.getParameterTypes(); + for (int i = 0; i < parameters.length; i++) { + classTypes[i+1] = parameters[i]; + } + }catch(java.lang.reflect.MalformedParametersException e) {} return classTypes; }else { Class objectType = ClassAnalyzerUtility.getClass(lambdaExpression); @@ -911,9 +1011,9 @@ static Class[] lambdaClassTypes(Class typ }else { classTypes[0] = mtd.getReturnType(); } - Parameter[] params = mtd.getParameters(); + Class[] params = mtd.getParameterTypes(); for (int i = 0; i < params.length; i++) { - classTypes[i+1] = params[i].getType(); + classTypes[i+1] = params[i]; } return classTypes; } diff --git a/src/java/modules/qtjambi/main/io/qt/internal/CoreUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/CoreUtility.java index c5cd33f0..f7e8e598 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/CoreUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/CoreUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/internal/Dependency.java b/src/java/modules/qtjambi/main/io/qt/internal/Dependency.java index 6c5f1894..40a18f92 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/Dependency.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/Dependency.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/internal/DeployerUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/DeployerUtility.java index 9e10f20f..a6c463a4 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/DeployerUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/DeployerUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/internal/EnumUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/EnumUtility.java index ee4ac3e3..2d50f471 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/EnumUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/EnumUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -207,7 +207,7 @@ private static > boolean extendEnum(Class enumClass, T[] ar } return true; } catch (Throwable e1) { - if(LibraryUtility.operatingSystem!=LibraryUtility.OperatingSystem.Android) { + if(!LibraryUtility.operatingSystem.isAndroid()) { e.addSuppressed(e1); e.printStackTrace(); } diff --git a/src/java/modules/qtjambi/main/io/qt/internal/ExceptionUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/ExceptionUtility.java index 95897833..1e009385 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/ExceptionUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/ExceptionUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/internal/LibraryBundle.java b/src/java/modules/qtjambi/main/io/qt/internal/LibraryBundle.java index 48366452..c9e7b612 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/LibraryBundle.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/LibraryBundle.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/internal/LibraryUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/LibraryUtility.java index 4f2f3d79..2847a99f 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/LibraryUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/LibraryUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -31,8 +31,10 @@ import java.io.ByteArrayOutputStream; import java.io.File; +import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.io.PrintStream; import java.net.JarURLConnection; import java.net.MalformedURLException; import java.net.URISyntaxException; @@ -62,9 +64,11 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.BiConsumer; import java.util.function.Function; +import java.util.jar.JarOutputStream; import java.util.logging.Level; import java.util.logging.Logger; import java.util.prefs.Preferences; +import java.util.zip.ZipEntry; import java.util.zip.ZipException; import javax.xml.parsers.ParserConfigurationException; @@ -91,6 +95,97 @@ */ final class LibraryUtility { + enum Architecture{ + x86, + x86_64, + arm, + arm64, + sparc, + mips, + mips64; + + static Architecture decideArchitecture() { + String arch = System.getProperty("os.arch").toLowerCase(); + switch(arch) { + case "arm": + case "armv": + case "armv6": + case "armv7": + case "arm32": + return arm; + case "arm64": + case "aarch64": + return arm64; + case "x86_64": + case "x64": + case "amd64": + return x86_64; + case "i386": + case "x86": + return x86; + case "sparc": + return sparc; + case "mips": + return mips; + case "mips64": + return mips64; + default: + if(arch.startsWith("arm-")) + return arm; + else if(arch.startsWith("aarch64-")) + return arm64; + else + return x86; + } + } + } + + enum OperatingSystem { + Windows, + MacOS, + Linux, + Android, + IOS, + FreeBSD, + NetBSD, + OpenBSD, + Solaris + ; + final boolean isAndroid() { + return this==Android; + } + final boolean isUnixLike() { + switch (this) { + case FreeBSD: + case NetBSD: + case OpenBSD: + case Solaris: + case Linux: + return true; + default: + return false; + } + } + + static OperatingSystem decideOperatingSystem() { + String osName = System.getProperty("os.name").toLowerCase(); + if (osName.startsWith("windows")) return Windows; + else if (osName.startsWith("mac")) return MacOS; + else if (osName.startsWith("ios")) return IOS; + else if (osName.startsWith("freebsd")) return FreeBSD; + else if (osName.startsWith("netbsd")) return NetBSD; + else if (osName.startsWith("openbsd")) return OpenBSD; + else if (osName.startsWith("solaris") || osName.startsWith("sunos")) return Solaris; + else if (osName.startsWith("linux")) { + if(System.getProperty("java.runtime.name").toLowerCase().startsWith("android")) + return OperatingSystem.Android; + else + return OperatingSystem.Linux; + } + return OperatingSystem.Linux; + } + } + private LibraryUtility() { throw new RuntimeException();} private static final String DEPLOY_XML = "!/META-INF/qtjambi-deployment.xml"; @@ -102,8 +197,8 @@ final class LibraryUtility { private static final List jniLibdirList; private static boolean isMinGWBuilt = false; - static final OperatingSystem operatingSystem = decideOperatingSystem(); - static final Architecture architecture = decideArchitecture(); + static final OperatingSystem operatingSystem = OperatingSystem.decideOperatingSystem(); + static final Architecture architecture = Architecture.decideArchitecture(); static final String osArchName; private static LibraryBundle.Configuration configuration = null; @@ -181,7 +276,11 @@ private static class LibVersion{ List jniLibdirs = null; try { libInfix = QtJambi_LibraryUtilities.properties.getProperty("qtjambi.libinfix"); - icuVersion = QtJambi_LibraryUtilities.properties.getProperty("qtjambi.icu.version", "56.1"); + if(QtJambi_LibraryUtilities.qtMajorVersion>6 || (Integer.compare(QtJambi_LibraryUtilities.qtMajorVersion, 6)==0 && QtJambi_LibraryUtilities.qtMinorVersion>=7)) { + icuVersion = QtJambi_LibraryUtilities.properties.getProperty("qtjambi.icu.version", "73.2"); + }else { + icuVersion = QtJambi_LibraryUtilities.properties.getProperty("qtjambi.icu.version", "56.1"); + } SortedMap tmpSystemLibrariesMap = new TreeMap(); SortedMap tmpJniLibdirBeforeMap = new TreeMap(); @@ -236,48 +335,18 @@ private static class LibVersion{ } switch (operatingSystem) { - case Windows: - switch(architecture) { - case arm: - osArchName = "windows-arm"; break; - case arm64: - osArchName = "windows-arm64"; break; - case x86_64: - osArchName = "windows-x64"; break; - default: - osArchName = "windows-x86"; break; - } - break; - case Linux: - switch(architecture) { - case arm: - osArchName = "linux-arm"; break; - case arm64: - osArchName = "linux-arm64"; break; - case x86_64: - osArchName = "linux-x64"; break; - default: - osArchName = "linux-x86"; break; - } + case MacOS: + case IOS: + osArchName = operatingSystem.name().toLowerCase(); break; - case Android: + default: switch(architecture) { - case arm: - osArchName = "android-arm"; break; - case arm64: - osArchName = "android-arm64"; break; case x86_64: - osArchName = "android-x64"; break; + osArchName = operatingSystem.name().toLowerCase()+"-x64"; break; default: - osArchName = "android-x86"; break; + osArchName = operatingSystem.name().toLowerCase()+"-"+architecture.name().toLowerCase(); break; } break; - case MacOS: - osArchName = "macos"; - break; - default: - osArchName = "unknown"; - break; } if(operatingSystem!=OperatingSystem.Android) { @@ -316,19 +385,14 @@ private static class LibVersion{ File jambiLibraryDir = null; if(!loadQtJambiFromLibraryPath){ List libraryPaths = new ArrayList<>(); - if (System.getProperties().contains("io.qt.library-path-override")) { + if (System.getProperties().containsKey("io.qt.library-path-override")) { libraryPaths.addAll(javaLibraryPathOverrides.computeIfAbsent(System.getProperty("io.qt.library-path-override"), LibraryUtility::splitPath)); } else { libraryPaths.addAll(javaLibraryPaths.computeIfAbsent(System.getProperty("java.library.path"), LibraryUtility::splitPath)); switch(operatingSystem) { - case Linux: - String ldPath = System.getenv("LD_LIBRARY_PATH"); - if(ldPath!=null) - libraryPaths.addAll(ldLibraryPaths.computeIfAbsent(ldPath, LibraryUtility::splitPath)); - break; case IOS: case MacOS: - ldPath = System.getenv("DYLD_FRAMEWORK_PATH"); + String ldPath = System.getenv("DYLD_FRAMEWORK_PATH"); if(ldPath!=null) libraryPaths.addAll(ldLibraryPaths.computeIfAbsent(ldPath, LibraryUtility::splitPath)); ldPath = System.getenv("DYLD_LIBRARY_PATH"); @@ -336,6 +400,12 @@ private static class LibVersion{ libraryPaths.addAll(ldLibraryPaths.computeIfAbsent(ldPath, LibraryUtility::splitPath)); break; default: + if(operatingSystem.isUnixLike()) { + ldPath = System.getenv("LD_LIBRARY_PATH"); + if(ldPath!=null) + libraryPaths.addAll(ldLibraryPaths.computeIfAbsent(ldPath, LibraryUtility::splitPath)); + break; + } break; } } @@ -508,15 +578,14 @@ private static class LibVersion{ lib = String.format(libFormat, iter.next()); } File f = new File(path, lib); - switch(operatingSystem) { - case Linux: + if(operatingSystem.isUnixLike()) { // libQt5Core.so.5 could point to libQt5Core.so.5.x with x < qtMinorVersion if(f.exists() && ( lib.endsWith(".so."+QtJambi_LibraryUtilities.qtMajorVersion) || lib.endsWith(".so") ) && Files.isSymbolicLink(f.toPath())) { try { - File link = Files.readSymbolicLink(f.toPath()).toFile(); + File link = f.toPath().toRealPath().toFile(); if(lib.endsWith(".so")) { if(!link.getName().startsWith(lib+"."+QtJambi_LibraryUtilities.qtMajorVersion+"."+QtJambi_LibraryUtilities.qtMinorVersion)) { f = null; @@ -531,10 +600,7 @@ private static class LibVersion{ } catch (IOException e) { } } - break; - default: - break; - } + } if (f!=null && f.exists()) { loadQtFromLibraryPath = true; break loop1; @@ -558,13 +624,12 @@ private static class LibVersion{ case Windows: tmpDir = new File(System.getProperty("user.home"), "AppData\\Local\\QtJambi"); break; - case Linux: - tmpDir = new File(System.getProperty("user.home"), ".local/share/QtJambi"); - break; case MacOS: tmpDir = new File(System.getProperty("user.home"), "Library/Application Support/QtJambi"); break; default: + if(operatingSystem.isUnixLike()) + tmpDir = new File(System.getProperty("user.home"), ".local/share/QtJambi"); break; } }else if("common".equalsIgnoreCase(deploymentdir)) { @@ -572,13 +637,12 @@ private static class LibVersion{ case Windows: tmpDir = new File("C:\\ProgramData\\QtJambi"); break; - case Linux: - tmpDir = new File("/usr/local/share/QtJambi"); - break; case MacOS: tmpDir = new File("/Library/Application Support/QtJambi"); break; default: + if(operatingSystem.isUnixLike()) + tmpDir = new File("/usr/local/share/QtJambi"); break; } }else { @@ -594,12 +658,13 @@ private static class LibVersion{ }else { if(keepDeployment) { switch (operatingSystem) { - case Linux: - if(!tmpDir.getAbsolutePath().startsWith(System.getProperty("user.home"))) { - jambiDeploymentDir = new File(tmpDir, "QtJambi" + QtJambi_LibraryUtilities.qtMajorVersion + "." + QtJambi_LibraryUtilities.qtMinorVersion + "." + QtJambi_LibraryUtilities.qtJambiPatch + "_" + System.getProperty("user.name")); - break; - } default: + if(operatingSystem.isUnixLike()) { + if(!tmpDir.getAbsolutePath().startsWith(System.getProperty("user.home"))) { + jambiDeploymentDir = new File(tmpDir, "QtJambi" + QtJambi_LibraryUtilities.qtMajorVersion + "." + QtJambi_LibraryUtilities.qtMinorVersion + "." + QtJambi_LibraryUtilities.qtJambiPatch + "_" + System.getProperty("user.name")); + break; + } + } jambiDeploymentDir = new File(tmpDir, "QtJambi" + QtJambi_LibraryUtilities.qtMajorVersion + "." + QtJambi_LibraryUtilities.qtMinorVersion + "." + QtJambi_LibraryUtilities.qtJambiPatch); break; } @@ -633,13 +698,12 @@ private static class LibVersion{ case Windows: tmpDir = new File(System.getProperty("user.home"), "AppData\\Local\\QtJambi"); break; - case Linux: - tmpDir = new File(System.getProperty("user.home"), ".local/share/QtJambi"); - break; case MacOS: tmpDir = new File(System.getProperty("user.home"), "Library/Application Support/QtJambi"); break; default: + if(operatingSystem.isUnixLike()) + tmpDir = new File(System.getProperty("user.home"), ".local/share/QtJambi"); break; } }else if("common".equalsIgnoreCase(headersdir)) { @@ -647,13 +711,12 @@ private static class LibVersion{ case Windows: tmpDir = new File("C:\\ProgramData\\QtJambi"); break; - case Linux: - tmpDir = new File("/usr/local/share/QtJambi"); - break; case MacOS: tmpDir = new File("/Library/Application Support/QtJambi"); break; default: + if(operatingSystem.isUnixLike()) + tmpDir = new File("/usr/local/share/QtJambi"); break; } }else { @@ -670,12 +733,13 @@ private static class LibVersion{ || "temp".equalsIgnoreCase(headersdir)){ if(deleteTmpDeployment) { switch (operatingSystem) { - case Linux: - if(!tmpDir.getAbsolutePath().startsWith(System.getProperty("user.home"))) { - jambiHeadersDir = new File(tmpDir, "QtJambi" + QtJambi_LibraryUtilities.qtMajorVersion + "." + QtJambi_LibraryUtilities.qtMinorVersion + "." + QtJambi_LibraryUtilities.qtJambiPatch + "_" + System.getProperty("user.name")); - break; - } default: + if(operatingSystem.isUnixLike()) { + if(!tmpDir.getAbsolutePath().startsWith(System.getProperty("user.home"))) { + jambiHeadersDir = new File(tmpDir, "QtJambi" + QtJambi_LibraryUtilities.qtMajorVersion + "." + QtJambi_LibraryUtilities.qtMinorVersion + "." + QtJambi_LibraryUtilities.qtJambiPatch + "_" + System.getProperty("user.name")); + break; + } + } jambiHeadersDir = new File(tmpDir, "QtJambi" + QtJambi_LibraryUtilities.qtMajorVersion + "." + QtJambi_LibraryUtilities.qtMinorVersion + "." + QtJambi_LibraryUtilities.qtJambiPatch); break; } @@ -710,13 +774,12 @@ private static class LibVersion{ case Windows: tmpDir = new File(System.getProperty("user.home"), "AppData\\Local\\QtJambi"); break; - case Linux: - tmpDir = new File(System.getProperty("user.home"), ".local/share/QtJambi"); - break; case MacOS: tmpDir = new File(System.getProperty("user.home"), "Library/Application Support/QtJambi"); break; default: + if(operatingSystem.isUnixLike()) + tmpDir = new File(System.getProperty("user.home"), ".local/share/QtJambi"); break; } }else if("common".equalsIgnoreCase(sourcesdir)) { @@ -724,13 +787,12 @@ private static class LibVersion{ case Windows: tmpDir = new File("C:\\ProgramData\\QtJambi"); break; - case Linux: - tmpDir = new File("/usr/local/share/QtJambi"); - break; case MacOS: tmpDir = new File("/Library/Application Support/QtJambi"); break; default: + if(operatingSystem.isUnixLike()) + tmpDir = new File("/usr/local/share/QtJambi"); break; } }else { @@ -747,12 +809,13 @@ private static class LibVersion{ || "temp".equalsIgnoreCase(sourcesdir)){ if(deleteTmpDeployment) { switch (operatingSystem) { - case Linux: - if(!tmpDir.getAbsolutePath().startsWith(System.getProperty("user.home"))) { - jambiSourcesDir = new File(tmpDir, "QtJambi" + QtJambi_LibraryUtilities.qtMajorVersion + "." + QtJambi_LibraryUtilities.qtMinorVersion + "." + QtJambi_LibraryUtilities.qtJambiPatch + "_" + System.getProperty("user.name")); - break; - } default: + if(operatingSystem.isUnixLike()) { + if(!tmpDir.getAbsolutePath().startsWith(System.getProperty("user.home"))) { + jambiSourcesDir = new File(tmpDir, "QtJambi" + QtJambi_LibraryUtilities.qtMajorVersion + "." + QtJambi_LibraryUtilities.qtMinorVersion + "." + QtJambi_LibraryUtilities.qtJambiPatch + "_" + System.getProperty("user.name")); + break; + } + } jambiSourcesDir = new File(tmpDir, "QtJambi" + QtJambi_LibraryUtilities.qtMajorVersion + "." + QtJambi_LibraryUtilities.qtMinorVersion + "." + QtJambi_LibraryUtilities.qtJambiPatch); break; } @@ -1317,47 +1380,6 @@ private static List resolveSystemLibraries(List tmpSystemLibrari } return Collections.unmodifiableList(resolvedList); } - - private static Architecture decideArchitecture() { - String arch = System.getProperty("os.arch").toLowerCase(); - switch(arch) { - case "arm": - case "armv": - case "arm32": - return Architecture.arm; - case "arm64": - case "aarch64": - return Architecture.arm64; - case "x86_64": - case "x64": - case "amd64": - return Architecture.x86_64; - case "i386": - case "x86": - return Architecture.x86; - default: - if(arch.startsWith("arm-")) - return Architecture.arm; - else if(arch.startsWith("aarch64-")) - return Architecture.arm64; - else - return Architecture.x86; - } - } - - private static OperatingSystem decideOperatingSystem() { - String osName = System.getProperty("os.name").toLowerCase(); - if (osName.startsWith("windows")) return OperatingSystem.Windows; - else if (osName.startsWith("mac")) return OperatingSystem.MacOS; - else if (osName.startsWith("ios")) return OperatingSystem.IOS; - else if (osName.startsWith("linux")) { - if(System.getProperty("java.runtime.name").toLowerCase().startsWith("android")) - return OperatingSystem.Android; - else - return OperatingSystem.Linux; - } - return OperatingSystem.Linux; - } static LibraryBundle.Configuration configuration() { return configuration; @@ -1431,10 +1453,11 @@ private static void extractContainerAccessLib(String library) { break; } return; // never extract on android - case Linux: - libraryPlatformName = "plugins/containeraccess/lib" + library + ".so"; - break; default: + if(operatingSystem.isUnixLike()) { + libraryPlatformName = "plugins/containeraccess/lib" + library + ".so"; + break; + } return; } LibraryBundle.deploy(libraryPlatformName); @@ -1550,10 +1573,11 @@ static void loadLibrary(String library) { } // libraryPlatformName = "lib" + libraryPlatformName + ".so"; break; - case Linux: - libraryPlatformName = "lib" + library + ".so"; - break; default: + if(operatingSystem.isUnixLike()) { + libraryPlatformName = "lib" + library + ".so"; + break; + } return; } } @@ -1602,6 +1626,61 @@ static void loadQtJambiLibrary() { } } } + if(!availability.isAvailable() && operatingSystem.isUnixLike() && !System.getProperties().containsKey("io.qt.library-path-override")) { + String key = QtJambi_LibraryUtilities.qtMajorVersion+"."+QtJambi_LibraryUtilities.qtMinorVersion; + String qtlibpath; + Preferences preferences = Preferences.userNodeForPackage(LibraryUtility.class); + Preferences pathsPref = preferences.node("qt.library.path"); + qtlibpath = pathsPref.get(key, ""); + boolean setPref = false; + if(!qtlibpath.isEmpty()){ + File libDir = new File(qtlibpath); + if(!libDir.exists()) { + qtlibpath = ""; + pathsPref.remove(key); + } + } + if(qtlibpath.isEmpty()) { + String exeName = "qmake"; + if(Integer.compare(QtJambi_LibraryUtilities.qtMajorVersion, 5)==0) { + exeName += "-qt5"; + }else { + exeName += QtJambi_LibraryUtilities.qtMajorVersion; + } + try { + Process process = Runtime.getRuntime().exec(new String[]{exeName, "-query", "QT_INSTALL_LIBS"}); + byte[] data; + try(InputStream input = process.getInputStream()){ + process.waitFor(); + data = input.readAllBytes(); + } + if(data!=null) { + qtlibpath = new String(data); + setPref = true; + } + } catch (Exception e) { + } + } + if(!qtlibpath.isEmpty()){ + File libDir = new File(qtlibpath); + if(libDir.exists()) { + String libPaths = System.getProperty("java.library.path"); + if(libPaths==null) + libPaths = libDir.getAbsolutePath(); + else + libPaths += File.pathSeparator + libDir.getAbsolutePath(); + System.setProperty("java.library.path", libPaths); + if(setPref) { + pathsPref.put(key, libDir.getAbsolutePath()); + try { + pathsPref.sync(); + preferences.sync(); + } catch (Exception e) { + } + } + } + } + } if(jambiSourcesDir!=null) { switch (operatingSystem) { case MacOS: @@ -1632,7 +1711,7 @@ static void loadQtJambiLibrary() { } try{ java.io.File qtjambiLib = loadQtJambiLibrary(LibraryUtility.class, null, "QtJambi", QtJambi_LibraryUtilities.qtMajorVersion, QtJambi_LibraryUtilities.qtMinorVersion, QtJambi_LibraryUtilities.qtJambiPatch); - if(LibraryUtility.operatingSystem!=LibraryUtility.OperatingSystem.Android) { + if(LibraryUtility.operatingSystem!=OperatingSystem.Android) { List paths = new ArrayList<>(); String path; switch(LibraryUtility.operatingSystem) { @@ -1980,8 +2059,18 @@ static void loadUtilityLibrary(String library, String version, LibraryRequiremen availability.extractLibrary(); return; case Optional: - if(!availability.isAvailable()) + if(!availability.isAvailable()) { + if(library.startsWith("icu")) { + if(LIBINFIX==null || LIBINFIX.isEmpty()) { + availability = getLibraryAvailability(null, library, null, "", configuration, null); + }else { + availability = getLibraryAvailability(null, library, null, version, configuration, null); + if(!availability.isAvailable()) + availability = getLibraryAvailability(null, library, null, "", configuration, null); + } + } return; + } break; default: break; @@ -2170,7 +2259,7 @@ private static List computeLibraryPaths(){ break; } - if (System.getProperties().contains("io.qt.library-path-override")) { + if (System.getProperties().containsKey("io.qt.library-path-override")) { // reporter.report(" - using 'io.qt.library-path-override'"); libraryPaths.addAll(javaLibraryPathOverrides.computeIfAbsent(System.getProperty("io.qt.library-path-override"), LibraryUtility::splitPath)); } else { @@ -2287,7 +2376,7 @@ private static File loadNativeLibrary(Class callerClass, Availability availab if(availability.entry!=null) { message = String.format("Library %1$s (%2$s) was not found in %3$s", availability.libraryRawName, String.join(", ", fileNames), availability.entry.source()); }else { - if (System.getProperties().contains("io.qt.library-path-override")) { + if (System.getProperties().containsKey("io.qt.library-path-override")) { message = String.format("Library %1$s (%2$s) was not found in 'io.qt.library-path-override=%3$s%4$s%5$s'", availability.libraryRawName, String.join(", ", fileNames), System.getProperty("io.qt.library-path-override"), File.pathSeparator, jambiDeploymentDir); }else { message = String.format("Library %1$s (%2$s) was not found in 'java.library.path=%3$s%4$s%5$s'", availability.libraryRawName, String.join(", ", fileNames), System.getProperty("java.library.path"), File.pathSeparator, jambiDeploymentDir); @@ -2334,7 +2423,7 @@ private static File loadNativeLibrary(Class callerClass, Availability availab if(availability.entry!=null) { message = String.format("Library %1$s (%2$s) was not found in %3$s", availability.libraryRawName, libFile.getName(), availability.entry.source()); }else { - if (System.getProperties().contains("io.qt.library-path-override")) { + if (System.getProperties().containsKey("io.qt.library-path-override")) { message = String.format("Library %1$s (%2$s) was not found in 'io.qt.library-path-override=%3$s'", availability.libraryRawName, libFile.getName(), System.getProperty("io.qt.library-path-override")); }else { message = String.format("Library %1$s (%2$s) was not found in 'java.library.path=%3$s'", availability.libraryRawName, libFile.getName(), System.getProperty("java.library.path")); @@ -2456,19 +2545,10 @@ private static Library.ExtractionFunction getLibraryExtractor(String urlBase, St } } break; - case Linux: - prefix = "libQt"+QtJambi_LibraryUtilities.qtMajorVersion; - int dot = qtLibName.indexOf('.'); - if(dot>0) { - qtLibName = qtLibName.substring(0, dot); - }else { - qtLibName = null; - } - break; case MacOS: if(!libName.contains(".framework/")) { prefix = "libQt"+QtJambi_LibraryUtilities.qtMajorVersion; - dot = qtLibName.indexOf('.'); + int dot = qtLibName.indexOf('.'); if(dot>0) { qtLibName = qtLibName.substring(0, dot); }else { @@ -2486,6 +2566,15 @@ private static Library.ExtractionFunction getLibraryExtractor(String urlBase, St } break; default: + if(operatingSystem.isUnixLike()) { + prefix = "libQt"+QtJambi_LibraryUtilities.qtMajorVersion; + int dot = qtLibName.indexOf('.'); + if(dot>0) { + qtLibName = qtLibName.substring(0, dot); + }else { + qtLibName = null; + } + } break; } } @@ -2682,7 +2771,59 @@ private static LibraryBundle prepareNativeDeployment(URL deploymentSpec, URL deb executor = new ExecutorThread(spec.module()); executor.start(); } - + if(isQtLib && "qt.lib.core".equals(spec.module()) && !spec.isDebuginfo()) { + switch(operatingSystem) { + case Android: + case IOS: + case MacOS: + break; + default: + File qtConf = new File(jambiDeploymentDir, "qtconf.jar"); + if((jambiDeploymentDir.isDirectory() || jambiDeploymentDir.mkdirs()) && !qtConf.exists()) { + File binFolder = new File(jambiDeploymentDir, "bin"); + binFolder.mkdirs(); + File confFile = new File(binFolder, "qt.conf"); + try { + try(PrintStream out = new PrintStream(new FileOutputStream(confFile), false, "UTF-8")){ + out.println("[Paths]"); + out.print("Prefix="); + if(File.separatorChar=='/') + out.println(jambiDeploymentDir.getAbsolutePath()); + else + out.println(jambiDeploymentDir.getAbsolutePath().replace(File.separator, "/")); + out.println("Libraries=lib"); + out.println(operatingSystem==OperatingSystem.Windows ? "LibraryExecutables=bin" : "LibraryExecutables=libexec"); + out.println("Binaries=bin"); + out.println("Plugins=plugins"); + out.println("QmlImports=qml"); + out.println("Translations=translations"); + out.println("ArchData=."); + out.println("Data=."); + out.println("Headers=include"); + out.flush(); + } + }catch(Throwable t){ + confFile.delete(); + } + if(confFile.exists()) { + if(operatingSystem!=OperatingSystem.Windows) { + File libFolder = new File(jambiDeploymentDir, "libexec"); + libFolder.mkdirs(); + Files.copy(confFile.toPath(), new File(libFolder, "qt.conf").toPath()); + } + try(JarOutputStream confJar = new JarOutputStream(new FileOutputStream(qtConf))){ + confJar.putNextEntry(new ZipEntry("qt/etc/qt.conf")); + Files.copy(confFile.toPath(), confJar); + confJar.closeEntry(); + } + } + } + if(qtConf.exists()) { + ResourceUtility.addSearchPath(qtConf.toURI().toURL()); + } + break; + } + } try { List libraries = spec.libraries(); if(debuginfoSpec!=null) { @@ -3071,21 +3212,6 @@ private static String qtjambiLibraryName(String prefix, String lib, boolean dont lib += "_debug"; return lib + ".framework/Versions/%1$s/"+lib; } - case Linux: - switch(version.length) { - default: - replacements.add("."+version[0]+"."+version[1]+"."+version[2]); - case 2: - replacements.add("."+version[0]+"."+version[1]); - case 1: - replacements.add("."+version[0]); - case 0: - replacements.add(""); - break; - } - if (configuration == LibraryBundle.Configuration.Debug) - return "lib" + lib + "_debug.so%1$s"; - else return "lib" + lib + ".so%1$s"; case Android: if (configuration == LibraryBundle.Configuration.Debug) switch(architecture) { @@ -3110,6 +3236,22 @@ private static String qtjambiLibraryName(String prefix, String lib, boolean dont return lib + "_x86"; } default: + if(operatingSystem.isUnixLike()) { + switch(version.length) { + default: + replacements.add("."+version[0]+"."+version[1]+"."+version[2]); + case 2: + replacements.add("."+version[0]+"."+version[1]); + case 1: + replacements.add("."+version[0]); + case 0: + replacements.add(""); + break; + } + if (configuration == LibraryBundle.Configuration.Debug) + return "lib" + lib + "_debug.so%1$s"; + else return "lib" + lib + ".so%1$s"; + } break; } throw new RuntimeException("Unreachable statement"); @@ -3186,31 +3328,6 @@ private static String qtLibraryName(String qtprefix, String libraryName, String : prefix + qtXlibName + "%1$s.dylib"; // "libQtFoo.4.dylib" } } - case Linux: - if(version!=null) { - switch(version.length) { - default: - replacements.add("."+version[0]+"."+version[1]+"."+version[2]); - case 2: - replacements.add("."+version[0]+"."+version[1]); - case 1: - replacements.add("."+version[0]); - case 0: - replacements.add(""); - break; - } - }else if(versionStrg!=null && !versionStrg.isEmpty()) { - List parts = new ArrayList<>(); - parts.addAll(Arrays.asList(versionStrg.split("\\."))); - while(!parts.isEmpty()) { - replacements.add("."+String.join(".", parts)); - parts.remove(parts.size()-1); - } - replacements.add(""); - }else { - replacements.add(""); - } - return prefix + qtXlibName + ".so%1$s"; case Android: switch (architecture) { case arm: @@ -3227,6 +3344,32 @@ private static String qtLibraryName(String qtprefix, String libraryName, String // Linux doesn't have a dedicated "debug" library since 4.2 return prefix + qtXlibName + ".so"; // "libQtFoo.so.4" default: + if(operatingSystem.isUnixLike()) { + if(version!=null) { + switch(version.length) { + default: + replacements.add("."+version[0]+"."+version[1]+"."+version[2]); + case 2: + replacements.add("."+version[0]+"."+version[1]); + case 1: + replacements.add("."+version[0]); + case 0: + replacements.add(""); + break; + } + }else if(versionStrg!=null && !versionStrg.isEmpty()) { + List parts = new ArrayList<>(); + parts.addAll(Arrays.asList(versionStrg.split("\\."))); + while(!parts.isEmpty()) { + replacements.add("."+String.join(".", parts)); + parts.remove(parts.size()-1); + } + replacements.add(""); + }else { + replacements.add(""); + } + return prefix + qtXlibName + ".so%1$s"; + } break; } } @@ -3272,24 +3415,6 @@ static void loadSystemLibraries() { } } - /** - * Enum for defining the operation system. - */ - enum OperatingSystem { - Windows, - MacOS, - Linux, - Android, - IOS - } - - enum Architecture{ - x86, - x86_64, - arm, - arm64 - } - static String qtJambiLibraryPath() { synchronized(loadedNativeDeploymentUrls) { return qtJambiLibraryPath; @@ -3322,13 +3447,13 @@ private static int findSequence(int offset, byte[] array, byte[] sequence) { private static void analyzeUnsatisfiedLinkError(UnsatisfiedLinkError t, java.io.File coreLib, boolean atCoreLoad) { final String architecture; - if(LibraryUtility.architecture==LibraryUtility.Architecture.x86) { + if(LibraryUtility.architecture==Architecture.x86) { architecture = "i386-"+ByteOrder.nativeOrder().toString().toLowerCase(); }else { architecture = LibraryUtility.architecture.name()+"-"+ByteOrder.nativeOrder().toString().toLowerCase(); } - final boolean canUniversalBuild = LibraryUtility.operatingSystem==LibraryUtility.OperatingSystem.MacOS - || LibraryUtility.operatingSystem==LibraryUtility.OperatingSystem.IOS; + final boolean canUniversalBuild = LibraryUtility.operatingSystem==OperatingSystem.MacOS + || LibraryUtility.operatingSystem==OperatingSystem.IOS; final List qtLibraryBuilds = new ArrayList<>(); final List qtjambiLibraryBuilds = new ArrayList<>(); try { diff --git a/src/java/modules/qtjambi/main/io/qt/internal/MetaObjectUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/MetaObjectUtility.java index 8b104bce..0ff1efa3 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/MetaObjectUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/MetaObjectUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -1439,14 +1439,21 @@ else if (Modifier.isPublic(constructor.getModifiers())) } intdataComments.add("slot["+i+"]: parameter["+(j-1)+"].arg"); } - Parameter[] parameters = method.getParameters(); - for (int j = 0; j < parameters.length; j++) { - if(parameters[j].isNamePresent()) { - metaObjectData.intData.add(metaObjectData.addStringDataAndReturnIndex(parameters[j].getName())); - }else { + try { + Parameter[] parameters = method.getParameters(); + for (int j = 0; j < parameters.length; j++) { + if(parameters[j].isNamePresent()) { + metaObjectData.intData.add(metaObjectData.addStringDataAndReturnIndex(parameters[j].getName())); + }else { + metaObjectData.intData.add(metaObjectData.addStringDataAndReturnIndex("arg__"+(j+1))); + } + intdataComments.add("slot["+i+"]: parameter["+j+"].argName"); + } + }catch(java.lang.reflect.MalformedParametersException e) { + for (int j = 0; j < method.getParameterCount(); j++) { metaObjectData.intData.add(metaObjectData.addStringDataAndReturnIndex("arg__"+(j+1))); - } - intdataComments.add("slot["+i+"]: parameter["+j+"].argName"); + intdataComments.add("slot["+i+"]: parameter["+(j)+"].argName"); + } } } @@ -1476,14 +1483,21 @@ else if (Modifier.isPublic(constructor.getModifiers())) } intdataComments.add("constructor["+i+"]: parameter["+(j)+"].arg"); } - Parameter[] parameters = constructor.getParameters(); - for (int j = 0; j < parameters.length; j++) { - if(parameters[j].isNamePresent()) { - metaObjectData.intData.add(metaObjectData.addStringDataAndReturnIndex(parameters[j].getName())); - }else { + try { + Parameter[] parameters = constructor.getParameters(); + for (int j = 0; j < parameters.length; j++) { + if(parameters[j].isNamePresent()) { + metaObjectData.intData.add(metaObjectData.addStringDataAndReturnIndex(parameters[j].getName())); + }else { + metaObjectData.intData.add(metaObjectData.addStringDataAndReturnIndex("arg__"+(j+1))); + } + intdataComments.add("constructor["+i+"]: parameter["+(j)+"].argName"); + } + }catch(java.lang.reflect.MalformedParametersException e) { + for (int j = 0; j < constructor.getParameterCount(); j++) { metaObjectData.intData.add(metaObjectData.addStringDataAndReturnIndex("arg__"+(j+1))); - } - intdataComments.add("constructor["+i+"]: parameter["+(j)+"].argName"); + intdataComments.add("constructor["+i+"]: parameter["+(j)+"].argName"); + } } } diff --git a/src/java/modules/qtjambi/main/io/qt/internal/MetaTypeUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/MetaTypeUtility.java index cddeb5ad..080aa7c2 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/MetaTypeUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/MetaTypeUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/internal/NativeUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/NativeUtility.java index 3e3793da..538232d4 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/NativeUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/NativeUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -283,6 +283,14 @@ public void setReferenceCount(Class declaringClass, c -> Collections.synchronizedMap(new HashMap<>())); referenceCountsVariables.put(fieldName, newValue); } + + public java.lang.Object getReferenceCount(Class declaringClass, String fieldName) { + if (referenceCounts != null) { + Map referenceCountsVariables = referenceCounts.get(declaringClass); + if(referenceCountsVariables!=null) + return referenceCountsVariables.get(fieldName); + }return null; + } public java.lang.Object getReferenceCountCollection(Class declaringClass, String fieldName, Supplier collectionSupplier) { diff --git a/src/java/modules/qtjambi/main/io/qt/internal/ReferenceUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/ReferenceUtility.java index 1f0e0c7e..f01b9ce7 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/ReferenceUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/ReferenceUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -405,7 +405,7 @@ public boolean remove(Object key, Object value) { static void removeFromMapReferenceCount(QtObjectInterface owner, Class declaringClass, String fieldName, boolean isStatic, Object value) { Object collection = null; boolean got = false; - if (declaringClass.isInterface() && !isStatic) { + if (declaringClass!=null && declaringClass.isInterface() && !isStatic) { NativeLink link = NativeUtility.findInterfaceLink(owner, false); if (link instanceof NativeUtility.InterfaceNativeLink) { collection = ((NativeUtility.InterfaceNativeLink) link).getReferenceCountCollection(declaringClass, fieldName, null); @@ -414,9 +414,11 @@ static void removeFromMapReferenceCount(QtObjectInterface owner, Class objectClass = ClassAnalyzerUtility.getClass(owner); @@ -440,7 +442,7 @@ static void removeFromMapReferenceCount(QtObjectInterface owner, Class declaringClass, String fieldName, boolean isStatic, Object value) { Object collection = null; boolean got = false; - if (declaringClass.isInterface() && !isStatic) { + if (declaringClass!=null && declaringClass.isInterface() && !isStatic) { NativeLink link = NativeUtility.findInterfaceLink(owner, false); if (link instanceof NativeUtility.InterfaceNativeLink) { collection = ((NativeUtility.InterfaceNativeLink) link).getReferenceCountCollection(declaringClass, fieldName, null); @@ -449,9 +451,11 @@ static void removeFromCollectionReferenceCount(QtObjectInterface owner, Class objectClass = ClassAnalyzerUtility.getClass(owner); @@ -476,7 +480,7 @@ static void removeFromCollectionReferenceCount(QtObjectInterface owner, Class declaringClass, String fieldName, boolean isThreadSafe, boolean isStatic, Collection values) { Object collection = null; boolean got = false; - if (declaringClass.isInterface() && !isStatic) { + if (declaringClass!=null && declaringClass.isInterface() && !isStatic) { NativeLink link = NativeUtility.findInterfaceLink(owner, false); if (link instanceof NativeUtility.InterfaceNativeLink) { collection = ((NativeUtility.InterfaceNativeLink) link).getReferenceCountCollection(declaringClass, fieldName, RCList::new); @@ -485,9 +489,11 @@ static void addAllReferenceCount(QtObjectInterface owner, Class objectClass = ClassAnalyzerUtility.getClass(owner); @@ -520,7 +526,7 @@ static void addAllReferenceCount(QtObjectInterface owner, Class declaringClass, String fieldName, boolean isThreadSafe, boolean isStatic, Object key, Object value) { Object map = null; boolean got = false; - if (declaringClass.isInterface() && !isStatic) { + if (declaringClass!=null && declaringClass.isInterface() && !isStatic) { NativeLink link = NativeUtility.findInterfaceLink(owner, false); if (link instanceof NativeUtility.InterfaceNativeLink) { map = ((NativeUtility.InterfaceNativeLink) link).getReferenceCountCollection(declaringClass, fieldName, () -> { @@ -535,9 +541,11 @@ static void putReferenceCount(QtObjectInterface owner, Class objectClass = ClassAnalyzerUtility.getClass(owner); @@ -569,7 +577,7 @@ static void putReferenceCount(QtObjectInterface owner, Class declaringClass, String fieldName, boolean isStatic) { Object collection = null; boolean got = false; - if (declaringClass.isInterface() && !isStatic) { + if (declaringClass!=null && declaringClass.isInterface() && !isStatic) { NativeLink link = NativeUtility.findInterfaceLink(owner, false); if (link instanceof NativeUtility.InterfaceNativeLink) { collection = ((NativeUtility.InterfaceNativeLink) link).getReferenceCountCollection(declaringClass, fieldName, null); @@ -578,9 +586,11 @@ static void clearReferenceCount(QtObjectInterface owner, Class objectClass = ClassAnalyzerUtility.getClass(owner); @@ -607,7 +617,7 @@ static void clearReferenceCount(QtObjectInterface owner, Class declaringClass, String fieldName, boolean isThreadSafe, boolean isStatic, Object value) { Object collection = null; boolean got = false; - if (declaringClass.isInterface() && !isStatic) { + if (declaringClass!=null && declaringClass.isInterface() && !isStatic) { NativeLink link = NativeUtility.findInterfaceLink(owner, false); if (link instanceof NativeUtility.InterfaceNativeLink) { collection = ((NativeUtility.InterfaceNativeLink) link).getReferenceCountCollection(declaringClass, fieldName, RCList::new); @@ -616,9 +626,11 @@ static void addReferenceCount(QtObjectInterface owner, Class objectClass = ClassAnalyzerUtility.getClass(owner); @@ -647,6 +659,51 @@ static void addReferenceCount(QtObjectInterface owner, Class declaringClass, String fieldName, QtObjectInterface copy) { + Field field = null; + Object newValue = null; + if(declaringClass!=null) { + if (declaringClass.isInterface()) { + NativeLink link = NativeUtility.findInterfaceLink(copy, true); + if (link instanceof NativeUtility.InterfaceNativeLink) { + newValue = ((NativeUtility.InterfaceNativeLink) link).getReferenceCount(declaringClass, fieldName); + link = NativeUtility.findInterfaceLink(owner, true); + if (link instanceof NativeUtility.InterfaceNativeLink) { + ((NativeUtility.InterfaceNativeLink) link).setReferenceCount(declaringClass, fieldName, newValue); + return; + } + } + } + try { + field = declaringClass.getDeclaredField(fieldName); + } catch (NoSuchFieldException | SecurityException e2) { + } + } + if (field == null && copy != null) { + Class objectClass = ClassAnalyzerUtility.getClass(copy); + do { + try { + field = objectClass.getDeclaredField(fieldName); + } catch (NoSuchFieldException | SecurityException e2) { + } + objectClass = objectClass.getSuperclass(); + } while (objectClass != null && field == null); + } + if (field != null) { + if(newValue==null) { + newValue = ReflectionUtility.readField(copy, field); + } + if (declaringClass!=null && declaringClass.isInterface()) { + NativeLink link = NativeUtility.findInterfaceLink(owner, true); + if (link instanceof NativeUtility.InterfaceNativeLink) { + ((NativeUtility.InterfaceNativeLink) link).setReferenceCount(declaringClass, fieldName, newValue); + return; + } + } + ReflectionUtility.writeField(owner, field, newValue); + } + } + static void setReferenceCount(QtObjectInterface owner, Class declaringClass, String fieldName, boolean threadSafe, boolean isStatic, Object newValue) { if (threadSafe) { synchronized (isStatic ? declaringClass : owner) { @@ -657,19 +714,21 @@ static void setReferenceCount(QtObjectInterface owner, Class declaringClass, + private static void setReferenceCount(QtObjectInterface owner, Class declaringClass, String fieldName, boolean isStatic, Object newValue) { - if (declaringClass.isInterface() && !isStatic) { - NativeLink link = NativeUtility.findInterfaceLink(owner, true); - if (link instanceof NativeUtility.InterfaceNativeLink) { - ((NativeUtility.InterfaceNativeLink) link).setReferenceCount(declaringClass, fieldName, newValue); - return; - } - } Field field = null; - try { - field = declaringClass.getDeclaredField(fieldName); - } catch (NoSuchFieldException | SecurityException e2) { + if(declaringClass!=null) { + if (declaringClass.isInterface() && !isStatic) { + NativeLink link = NativeUtility.findInterfaceLink(owner, true); + if (link instanceof NativeUtility.InterfaceNativeLink) { + ((NativeUtility.InterfaceNativeLink) link).setReferenceCount(declaringClass, fieldName, newValue); + return; + } + } + try { + field = declaringClass.getDeclaredField(fieldName); + } catch (NoSuchFieldException | SecurityException e2) { + } } if (field == null && owner != null) { Class objectClass = ClassAnalyzerUtility.getClass(owner); diff --git a/src/java/modules/qtjambi/main/io/qt/internal/ReflectionUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/ReflectionUtility.java index e5b4d08d..1b9991dc 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/ReflectionUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/ReflectionUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/internal/ResourceUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/ResourceUtility.java index edc37c65..0ff43e60 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/ResourceUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/ResourceUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** @@ -43,12 +43,9 @@ import java.nio.file.Files; import java.nio.file.attribute.FileTime; import java.util.ArrayList; -import java.util.Calendar; import java.util.Collection; import java.util.Collections; -import java.util.Date; import java.util.Enumeration; -import java.util.GregorianCalendar; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -63,12 +60,8 @@ import java.util.zip.ZipException; import io.qt.NativeAccess; -import io.qt.core.QDate; -import io.qt.core.QDateTime; import io.qt.core.QDir; import io.qt.core.QLocale; -import io.qt.core.QTime; -import io.qt.core.internal.QAbstractFileEngine; /** * @hidden @@ -128,6 +121,8 @@ private static class UrlOrFile { final File file; } + private static final Function> newSetFactory = s -> new HashSet<>(); + private final static JarCache cache = new JarCache(); static void addSearchPath(URL url) { @@ -684,13 +679,14 @@ InputStream getInputStream(ZipEntry ze) throws IOException { } @NativeAccess - private void entryList(List result, QDir.Filters filters, Collection filterNames, String mentryName){ + private void entryList(List result, int _filters, Collection filterNames, String mentryName){ if (!mentryName.endsWith("/") && mentryName.length() > 0) mentryName = mentryName + "/"; Enumeration entries = entries(); HashSet used = new HashSet(); + QDir.Filters filters = new QDir.Filters(_filters); while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); @@ -741,36 +737,22 @@ private void entryList(List result, QDir.Filters filters, Collection> newSetFactory = s -> new HashSet<>(); - Collection pathToJarFiles(String entry) { synchronized(cache) { Set result = cache.get(entry); diff --git a/src/java/modules/qtjambi/main/io/qt/internal/SignalUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/SignalUtility.java index a358defe..f1b0e9a5 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/SignalUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/SignalUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/internal/TestUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/TestUtility.java index 6feae31b..79604d96 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/TestUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/TestUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/internal/ThreadUtility.java b/src/java/modules/qtjambi/main/io/qt/internal/ThreadUtility.java index 8fab1b6b..bfab81e1 100644 --- a/src/java/modules/qtjambi/main/io/qt/internal/ThreadUtility.java +++ b/src/java/modules/qtjambi/main/io/qt/internal/ThreadUtility.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/widgets/QItemEditorCreator.java b/src/java/modules/qtjambi/main/io/qt/widgets/QItemEditorCreator.java index 688846af..a4423329 100644 --- a/src/java/modules/qtjambi/main/io/qt/widgets/QItemEditorCreator.java +++ b/src/java/modules/qtjambi/main/io/qt/widgets/QItemEditorCreator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/main/io/qt/widgets/QStandardItemEditorCreator.java b/src/java/modules/qtjambi/main/io/qt/widgets/QStandardItemEditorCreator.java index eab63831..956ea71e 100644 --- a/src/java/modules/qtjambi/main/io/qt/widgets/QStandardItemEditorCreator.java +++ b/src/java/modules/qtjambi/main/io/qt/widgets/QStandardItemEditorCreator.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/non-jsr305/io/qt/NonNull.java b/src/java/modules/qtjambi/non-jsr305/io/qt/NonNull.java index 31ecaa33..3c86c41f 100644 --- a/src/java/modules/qtjambi/non-jsr305/io/qt/NonNull.java +++ b/src/java/modules/qtjambi/non-jsr305/io/qt/NonNull.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/non-jsr305/io/qt/Nullable.java b/src/java/modules/qtjambi/non-jsr305/io/qt/Nullable.java index c9b068bb..ddf5624d 100644 --- a/src/java/modules/qtjambi/non-jsr305/io/qt/Nullable.java +++ b/src/java/modules/qtjambi/non-jsr305/io/qt/Nullable.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/modules/qtjambi/non-jsr305/io/qt/StrictNonNull.java b/src/java/modules/qtjambi/non-jsr305/io/qt/StrictNonNull.java index ecad50ec..b7a1e8f3 100644 --- a/src/java/modules/qtjambi/non-jsr305/io/qt/StrictNonNull.java +++ b/src/java/modules/qtjambi/non-jsr305/io/qt/StrictNonNull.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/plugins/customwidgets/build.xml b/src/java/plugins/customwidgets/build.xml index 26b4b6d2..4050ef51 100644 --- a/src/java/plugins/customwidgets/build.xml +++ b/src/java/plugins/customwidgets/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/plugins/helpwidgets/build.xml b/src/java/plugins/helpwidgets/build.xml index 2f3ec806..c54dcf7c 100644 --- a/src/java/plugins/helpwidgets/build.xml +++ b/src/java/plugins/helpwidgets/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/plugins/multimediawidgets/build.xml b/src/java/plugins/multimediawidgets/build.xml index 02181967..4db51ea5 100644 --- a/src/java/plugins/multimediawidgets/build.xml +++ b/src/java/plugins/multimediawidgets/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/plugins/plugins.xml b/src/java/plugins/plugins.xml index 08af4d1f..43ec9639 100644 --- a/src/java/plugins/plugins.xml +++ b/src/java/plugins/plugins.xml @@ -1,3 +1,33 @@ + @@ -126,9 +156,10 @@ + - + - - - diff --git a/src/java/plugins/qsqljdbc/Qt5/io/qt/sql/jdbc/QJdbcSqlVariantUtil.java b/src/java/plugins/qsqljdbc/Qt5/io/qt/sql/jdbc/QJdbcSqlVariantUtil.java index c3cf8b1c..47b46ba6 100644 --- a/src/java/plugins/qsqljdbc/Qt5/io/qt/sql/jdbc/QJdbcSqlVariantUtil.java +++ b/src/java/plugins/qsqljdbc/Qt5/io/qt/sql/jdbc/QJdbcSqlVariantUtil.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/plugins/qsqljdbc/Qt6/io/qt/sql/jdbc/QJdbcSqlVariantUtil.java b/src/java/plugins/qsqljdbc/Qt6/io/qt/sql/jdbc/QJdbcSqlVariantUtil.java index 7e8565cc..9ad06601 100644 --- a/src/java/plugins/qsqljdbc/Qt6/io/qt/sql/jdbc/QJdbcSqlVariantUtil.java +++ b/src/java/plugins/qsqljdbc/Qt6/io/qt/sql/jdbc/QJdbcSqlVariantUtil.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/plugins/qsqljdbc/build.xml b/src/java/plugins/qsqljdbc/build.xml index 7272465a..1dfec63c 100644 --- a/src/java/plugins/qsqljdbc/build.xml +++ b/src/java/plugins/qsqljdbc/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbc.java b/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbc.java index b8bc83e4..e5b4232d 100644 --- a/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbc.java +++ b/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbc.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbcSqlDriver.java b/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbcSqlDriver.java index 2fe17a26..f15e0ac5 100644 --- a/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbcSqlDriver.java +++ b/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbcSqlDriver.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbcSqlResult.java b/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbcSqlResult.java index 665f9e35..26f6279f 100644 --- a/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbcSqlResult.java +++ b/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbcSqlResult.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbcSqlUtil.java b/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbcSqlUtil.java index adf1dbb1..fab3b1c4 100644 --- a/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbcSqlUtil.java +++ b/src/java/plugins/qsqljdbc/main/io/qt/sql/jdbc/QJdbcSqlUtil.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/qml/qml.xml b/src/java/qml/qml.xml index cb7bee48..1be95441 100644 --- a/src/java/qml/qml.xml +++ b/src/java/qml/qml.xml @@ -1,3 +1,33 @@ + @@ -210,19 +240,13 @@ - - - - - - @@ -232,7 +256,6 @@ - @@ -255,24 +278,33 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -311,12 +343,7 @@ - - - - - - + @@ -361,10 +388,7 @@ - - - - + diff --git a/src/java/qml/testcar/build.xml b/src/java/qml/testcar/build.xml index 28b7da9b..c1d717f7 100644 --- a/src/java/qml/testcar/build.xml +++ b/src/java/qml/testcar/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/qml/testcar/io/qt/test/car/Engine.java b/src/java/qml/testcar/io/qt/test/car/Engine.java index 72e87322..8f437651 100644 --- a/src/java/qml/testcar/io/qt/test/car/Engine.java +++ b/src/java/qml/testcar/io/qt/test/car/Engine.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/qml/testcar/io/qt/test/car/package-info.java b/src/java/qml/testcar/io/qt/test/car/package-info.java index 678e9875..8575994d 100644 --- a/src/java/qml/testcar/io/qt/test/car/package-info.java +++ b/src/java/qml/testcar/io/qt/test/car/package-info.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/qml/testcar/module-info.java b/src/java/qml/testcar/module-info.java index cfac8dce..5346006a 100644 --- a/src/java/qml/testcar/module-info.java +++ b/src/java/qml/testcar/module-info.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/qml/testgarage/build.xml b/src/java/qml/testgarage/build.xml index 911ded86..9a40a207 100644 --- a/src/java/qml/testgarage/build.xml +++ b/src/java/qml/testgarage/build.xml @@ -1,3 +1,33 @@ + diff --git a/src/java/qml/testgarage/io/qt/test/garage/Garage.java b/src/java/qml/testgarage/io/qt/test/garage/Garage.java index d7840eb9..b44b0c2b 100644 --- a/src/java/qml/testgarage/io/qt/test/garage/Garage.java +++ b/src/java/qml/testgarage/io/qt/test/garage/Garage.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/qml/testgarage/io/qt/test/garage/package-info.java b/src/java/qml/testgarage/io/qt/test/garage/package-info.java index f462ba3c..8627b2ce 100644 --- a/src/java/qml/testgarage/io/qt/test/garage/package-info.java +++ b/src/java/qml/testgarage/io/qt/test/garage/package-info.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/src/java/qml/testgarage/module-info.java b/src/java/qml/testgarage/module-info.java index 84d0e587..f0123448 100644 --- a/src/java/qml/testgarage/module-info.java +++ b/src/java/qml/testgarage/module-info.java @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009-2023 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. +** Copyright (C) 2009-2024 Dr. Peter Droste, Omix Visualization GmbH & Co. KG. All rights reserved. ** ** This file is part of Qt Jambi. ** diff --git a/www/Android.md b/www/Android.md index c8a32efb..cffef402 100644 --- a/www/Android.md +++ b/www/Android.md @@ -56,10 +56,10 @@ Android projects need Qt to be available as jar bundles. Therefore, follow the instructions [here](How-to-bundle-Qt-libraries.md) to create Qt bundles. Copy the required bundles to the app folder of your software project, e.g. for ABI arm64-v8a: -- `qt-lib-core-native-android-arm64-6.5.4.jar` -- `qt-lib-core-native-android-common-6.5.4.jar` -- `qt-lib-gui-native-android-arm64-6.5.4.jar` -- `qt-lib-widgets-native-android-arm64-6.5.4.jar` +- `qt-lib-core-native-android-arm64-6.5.5.jar` +- `qt-lib-core-native-android-common-6.5.5.jar` +- `qt-lib-gui-native-android-arm64-6.5.5.jar` +- `qt-lib-widgets-native-android-arm64-6.5.5.jar` Several libraries have a `native-android-common` component. @@ -68,8 +68,8 @@ Therefore, open the file `app/build.gradle`. Add the following lines to the `dependencies` section (for ABI arm64-v8a): ```gradle - implementation 'io.qtjambi:qtjambi:6.5.4' - implementation 'io.qtjambi:qtjambi-native-android-arm64:6.5.4' + implementation 'io.qtjambi:qtjambi:6.5.5' + implementation 'io.qtjambi:qtjambi-native-android-arm64:6.5.5' implementation files('qt-lib-core-native-android-arm64-6.5.3.jar', 'qt-lib-core-native-android-common-6.5.3.jar', 'qt-lib-gui-native-android-arm64-6.5.3.jar', diff --git a/www/Characteristics-of-QtJambi.md b/www/Characteristics-of-QtJambi.md index 4ae09216..e47a4569 100644 --- a/www/Characteristics-of-QtJambi.md +++ b/www/Characteristics-of-QtJambi.md @@ -265,8 +265,49 @@ Here, sending a Qt container is much faster than a Java container because the ja ### QVariant -The generic Qt type `QVariant` is directly mapped to `java.lang.Object` int Java. -However, the Java class `ioqt.core.QVariant` makes type management functionalities available. +The generic Qt type `QVariant` is directly mapped to `java.lang.Object` as a method's argument or return type for instance in `QAbstractItemModel.data(QModelIndex,int)`. +The internal `QVariant` value is converted to the actual carried value type in Java. +For instance, a variant carrying `QFont` (`QVariant(QFont)`) is converted to `io.qt.gui.QFont`, +`QVariant(QString)` is converted to `java.lang.String`, `QVariant(int)` is converted to the boxed primitive type `java.lang.Integer` +and `QVariant(QObject*)` is converted to `io.qt..core.QObject` (which can also be `null`). + +The way Java objects are converted to native `QVariant` values depends on wether the type is a (cloneable) value or object type. +Value types like `io.qt.gui.QFont` are converted to `QVariant(QFont)`, whereas the variant contains a copy of the value. +This also applies to boxed primitives and `String`. All native object types like `QObject` (i.e. types not copyable) +have a pointer-based `QVariant` representation, e.g. `QVariant(QObject*)`. Here, the conversion of a Java object to native `QVariant` +depends on wether the object is owned by Java or C++. An object is owned by Java if it has been created in Java and its life cycle +is managed by Java. A `QObject` instance is owned by C++ if it has a parent because parents destroy all of their child objects when being deleted. +If a Java object of pointer-based type (e.g. `QObject`) is converted to native `QVariant` it uses the direct pointer representation (e.g. `QVariant(QObject*)`). +However, if the object is managed by Java, the variant also keeps the reference of the Java object along with the native pointer. +This is represented by `QVariant(JObjectWrapper)` in C++. The type automatically converts to `QVariant(QObject*)` if necessary. + +The Java `null` always converts to invalid `QVariant`. If you need to represent `nullptr` as a result of e.g. `QAbstractItemModel.data(QModelIndex,int)` +you need to return an instance of `QVariant` carrying a typed `nullptr`: + +```java + +@Override +public Object data(QModelIndex index, int role){ + switch(index.row()){ + case 1: + // return (void*)nullptr + return new QVariant(QMetaType.Type.VoidStar, null); + case 2: + // return (QObject*)nullptr + return new QVariant(QMetaType.Type.ObjectStar, null); + case 3: + // return (QWidget*)nullptr + return new QVariant(QMetaType.fromType(QWidget.class), null); + default: + // return nullptr + return QVariant.nullVariant(); + // similar to new QVariant(QMetaType.Type.Nullptr, null) + } +} +``` +If you convert cloneable pure-Java objects to native `QVariant` the original Java object is cloned. + +In addition to Qt API, the Java class `io.qt.core.QVariant` provides static methods for type check and conversion. ## Operator Overloads @@ -1099,7 +1140,7 @@ device.close(); ``` shell java -Djava.library.path= - -p qtjambi-6.5.4.jar:qtjambi-uic-6.5.4.jar + -p qtjambi-6.5.5.jar:qtjambi-uic-6.5.5.jar -m qtjambi.uic --output=src --package=com.myapplication.widgets com/myapplication/widgets/mainwindow.ui ``` @@ -1107,7 +1148,7 @@ Alternative way to call it: ``` shell java -Djava.library.path= - -cp qtjambi-6.5.4.jar:qtjambi-uic-6.5.4.jar + -cp qtjambi-6.5.5.jar:qtjambi-uic-6.5.5.jar io.qt.uic.Main --output=src --package=com.myapplication.widgets com/myapplication/widgets/mainwindow.ui ``` @@ -1428,7 +1469,7 @@ and *QtJambi* libraries: ``` shell java -Djava.library.path= - -p qtjambi-6.5.4.jar:qtjambi-deployer-6.5.4.jar + -p qtjambi-6.5.5.jar:qtjambi-deployer-6.5.5.jar -m qtjambi.deployer plugin --class-name=my.company.CustomImageIOPlugin --class-path=my-company-library.jar @@ -1440,7 +1481,7 @@ Alternative way to call it: ``` shell java -Djava.library.path= - -cp qtjambi-6.5.4.jar:qtjambi-deployer-6.5.4.jar + -cp qtjambi-6.5.5.jar:qtjambi-deployer-6.5.5.jar io.qt.qtjambi.deployer.Main plugin --class-name=my.company.CustomImageIOPlugin --class-path=my-company-library.jar @@ -1467,7 +1508,7 @@ This is especially necessary on macOS (arm64). ``` shell java -Djava.library.path= - -p qtjambi-6.5.4.jar:qtjambi-deployer-6.5.4.jar + -p qtjambi-6.5.5.jar:qtjambi-deployer-6.5.5.jar -m qtjambi.deployer plugin --class-name=my.company.CustomImageIOPlugin --class-path=my-company-library.jar diff --git a/www/How-to-bundle-Qt-libraries.md b/www/How-to-bundle-Qt-libraries.md index 344f5a92..43f19624 100644 --- a/www/How-to-bundle-Qt-libraries.md +++ b/www/How-to-bundle-Qt-libraries.md @@ -10,7 +10,7 @@ on *Linux* and *macOS*. ``` shell java -Djava.library.path= - -p qtjambi-6.5.4.jar:qtjambi-deployer-6.5.4.jar + -p qtjambi-6.5.5.jar:qtjambi-deployer-6.5.5.jar -m qtjambi.deployer qt ``` @@ -18,7 +18,7 @@ Alternative way to call it: ``` shell java -Djava.library.path= - -cp qtjambi-6.5.4.jar:qtjambi-deployer-6.5.4.jar + -cp qtjambi-6.5.5.jar:qtjambi-deployer-6.5.5.jar io.qt.qtjambi.deployer.Main qt ``` diff --git a/www/How-to-debug.md b/www/How-to-debug.md index 844ad869..b411983f 100644 --- a/www/How-to-debug.md +++ b/www/How-to-debug.md @@ -22,7 +22,7 @@ Now, follow the instructions for [QML debugging](https://doc.qt.io/qt/qtquick-de ## Native Debugger For native debugging you need the debuginfo bundle for every native bundle your application is using. -For instance, on Windows you need **qtjambi-debuginfo-windows-x64-6.5.4.jar** placed next to **qtjambi-native-windows-x64-6.5.4.jar**. +For instance, on Windows you need **qtjambi-debuginfo-windows-x64-6.5.5.jar** placed next to **qtjambi-native-windows-x64-6.5.5.jar**. The debuginfo bundle contains platform-dependent debug symbol files for the native debugger and corresponding source code. It is necessary to enable the extraction of these files during program start by using the system property `io.qt.provide-debuginfo=true` (`io.qt.no-native-deployment` must not be `true`). By default, QtJambi does not extract source files unless you specify a target directory for those files with property `io.qt.sourcesdir`. diff --git a/www/How-to-deploy-QtJambi-applications.md b/www/How-to-deploy-QtJambi-applications.md index 43a117fa..2785d4b7 100644 --- a/www/How-to-deploy-QtJambi-applications.md +++ b/www/How-to-deploy-QtJambi-applications.md @@ -7,7 +7,7 @@ along with platform-dependent **qtjambi-deployer-native-X.jar** for all platform In the examples below, we assume you created an application in a jar file `my-company-app.jar` with main class `my.company.app.Main` -depending on `qtjambi-6.5.4.jar`. +depending on `qtjambi-6.5.5.jar`. Call the app deployer as shown below. Make sure the library path points to the *Qt* libraries being `bin` on *Windows* and `lib` @@ -15,7 +15,7 @@ on *Linux* and *macOS*. ``` shell java -Djava.library.path= - -p qtjambi-6.5.4.jar:qtjambi-deployer-6.5.4.jar + -p qtjambi-6.5.5.jar:qtjambi-deployer-6.5.5.jar -m qtjambi.deployer app ``` @@ -23,7 +23,7 @@ Alternative way to call it: ``` shell java -Djava.library.path= - -cp qtjambi-6.5.4.jar:qtjambi-deployer-6.5.4.jar + -cp qtjambi-6.5.5.jar:qtjambi-deployer-6.5.5.jar io.qt.qtjambi.deployer.Main app ``` @@ -73,8 +73,8 @@ installation directory | plugins | ... (platforms, styles and others) | lib - | qtjambi-6.5.4.jar - | qtjambi-native-windows-x64-6.5.4.jar + | qtjambi-6.5.5.jar + | qtjambi-native-windows-x64-6.5.5.jar | my-company-app.jar | jre | ... (Java Runtime Environment) @@ -85,11 +85,11 @@ append the following commands to the above listed *QtJambi deployer* command: ``` shell java -Djava.library.path= - -p qtjambi-6.5.4.jar:qtjambi-deployer-6.5.4.jar + -p qtjambi-6.5.5.jar:qtjambi-deployer-6.5.5.jar -m qtjambi.deployer app --application=MyCompanyApp --executable=utilities/QtJambiLauncher.exe - --class-path=../lib/my-company-app.jar:../lib/qtjambi-6.5.4.jar:../lib/qtjambi-native-windows-x64-6.5.4.jar + --class-path=../lib/my-company-app.jar:../lib/qtjambi-6.5.5.jar:../lib/qtjambi-native-windows-x64-6.5.5.jar --library-path=. --jvm-path=../jre --main-class=my.company.app.Main @@ -114,8 +114,8 @@ installation directory | libQt6Core.so[.6.5.3] | libQt6Gui.so[.6.5.3] | libQt6Widgets.so[.6.5.3] - | qtjambi-6.5.4.jar - | qtjambi-native-linux-x64-6.5.4.jar + | qtjambi-6.5.5.jar + | qtjambi-native-linux-x64-6.5.5.jar | my-company-app.jar | jre | ... (Java Runtime Environment) @@ -126,11 +126,11 @@ the following commands to the above listed *QtJambi deployer* command: ``` shell java -Djava.library.path= - -p qtjambi-6.5.4.jar:qtjambi-deployer-6.5.4.jar + -p qtjambi-6.5.5.jar:qtjambi-deployer-6.5.5.jar -m qtjambi.deployer app --application=MyCompanyApp --executable=utilities/QtJambiLauncher - --class-path=lib/my-company-app.jar:lib/qtjambi-6.5.4.jar:lib/qtjambi-native-linux-x64-6.5.4.jar + --class-path=lib/my-company-app.jar:lib/qtjambi-6.5.5.jar:lib/qtjambi-native-linux-x64-6.5.5.jar --library-path=lib --jvm-path=jre --main-class=my.company.app.Main @@ -158,8 +158,8 @@ installation directory | QtGui.framework | QtWidgets.framework | lib - | qtjambi-6.5.4.jar - | qtjambi-native-macos-6.5.4.jar + | qtjambi-6.5.5.jar + | qtjambi-native-macos-6.5.5.jar | my-company-app.jar | jre | ... (Java Runtime Environment) @@ -173,11 +173,11 @@ append the following commands to the above listed *QtJambi deployer* command: ``` shell java -Djava.library.path= - -p qtjambi-6.5.4.jar:qtjambi-deployer-6.5.4.jar + -p qtjambi-6.5.5.jar:qtjambi-deployer-6.5.5.jar -m qtjambi.deployer app --application=MyCompanyApp --executable=utilities/QtJambiLauncher.app - --class-path=../lib/my-company-app.jar:../lib/qtjambi-6.5.4.jar:../lib/qtjambi-native-macos-6.5.4.jar + --class-path=../lib/my-company-app.jar:../lib/qtjambi-6.5.5.jar:../lib/qtjambi-native-macos-6.5.5.jar --library-path=../Frameworks --jvm-path=../jre --main-class=my.company.app.Main diff --git a/www/How-to-develop-Qt-in-Java.md b/www/How-to-develop-Qt-in-Java.md index 1011e8fe..a85fd7d6 100644 --- a/www/How-to-develop-Qt-in-Java.md +++ b/www/How-to-develop-Qt-in-Java.md @@ -13,7 +13,7 @@ to your project: $VERSION ``` -(exchange `$VERSION` either by `5.15.18`, by `6.5.4` or by `6.6.1`). +(exchange `$VERSION` either by `5.15.19`, by `6.5.5` or by `6.6.2`). Otherwise, download QtJambi JAR file from [Maven Central Repository](https://search.maven.org/artifact/io.qtjambi/qtjambi/). Find the [list of all available QtJambi modules](www/Modules.md). @@ -36,7 +36,7 @@ public class Test { Compile the file: ``` powershell -javac -cp qtjambi-6.5.4.jar Test.java +javac -cp qtjambi-6.5.5.jar Test.java ``` ## Executing Example @@ -57,19 +57,19 @@ macOS) or the Java runtime property **java.library.path**. The example program can be executed this way on Windows: ``` powershell -java -cp qtjambi-6.5.4.jar;qtjambi-native-windows-x64-6.5.4.jar;. -Djava.library.path=C:\Qt\6.5.3\msvc2019_64\bin Test +java -cp qtjambi-6.5.5.jar;qtjambi-native-windows-x64-6.5.5.jar;. -Djava.library.path=C:\Qt\6.5.3\msvc2019_64\bin Test ``` On Linux it looks this way: ``` bash -java -cp qtjambi-6.5.4.jar:qtjambi-native-linux-x64-6.5.4.jar:. -Djava.library.path=/Qt/6.5.3/gcc_64/lib Test +java -cp qtjambi-6.5.5.jar:qtjambi-native-linux-x64-6.5.5.jar:. -Djava.library.path=/Qt/6.5.3/gcc_64/lib Test ``` On macOS you additionally need to use the start parameter -XstartOnFirstThread: ``` bash -java -cp qtjambi-6.5.4.jar:qtjambi-native-macos-6.5.4.jar:. -Djava.library.path=/Qt/6.5.3/macos/lib -XstartOnFirstThread Test +java -cp qtjambi-6.5.5.jar:qtjambi-native-macos-6.5.5.jar:. -Djava.library.path=/Qt/6.5.3/macos/lib -XstartOnFirstThread Test ``` If the example fails with a `UnsatisfiedLinkError` QtJambi libraries and Qt libraries seem to be incompatible. @@ -80,7 +80,7 @@ If the example fails with a `UnsatisfiedLinkError` QtJambi libraries and Qt libr QtJambi automatically detects the required native component jars if they are located next to their Java counterparts or in a subfolder `native`. You can simply skip `qtjambi-native-OS-VERSION.jar` in your classpath (`-cp`). -If you intend to use automatic module loading (`java -p `) you strictly need to place native components in `native` subfolder next to `qtjambi-6.5.4.jar`. +If you intend to use automatic module loading (`java -p `) you strictly need to place native components in `native` subfolder next to `qtjambi-6.5.5.jar`. Native bundles are extracted every time at program startup. By default, this is a process specific temporal directory purged after program shutdown. Alternatively, you can use Java system property `io.qt.deploymentdir` to let libraries to be exctacted and persist in user @@ -101,9 +101,9 @@ here](How-to-deploy-QtJambi-applications.md). [Read more about developing applications for Android](Android.md). See [QtJambi 5.15 API Reference -Documentation](https://doc.qtjambi.io/5.15.18/), +Documentation](https://doc.qtjambi.io/5.15.19/), and [QtJambi 6.5 API Reference -Documentation](https://doc.qtjambi.io/6.5.4/) +Documentation](https://doc.qtjambi.io/6.5.5/) ## Useful Java System Properties for QtJambi diff --git a/www/Modules.md b/www/Modules.md index f7de1717..8c7c2760 100644 --- a/www/Modules.md +++ b/www/Modules.md @@ -11,12 +11,12 @@ QtJambi is available for Qt5 and Qt6. All modules are published as Maven Artifac $VERSION ``` -Here, exchange `$VERSION` either by `5.15.18`, by `6.5.4` or by `6.6.1`. Exchange `$MODULE` by *QtJambi* module name as listed below. +Here, exchange `$VERSION` either by `5.15.19`, by `6.5.5` or by `6.6.2`. Exchange `$MODULE` by *QtJambi* module name as listed below. Alternatively, you can download corresponding QtJambi modules as JAR file from [Maven Central Repository](https://search.maven.org/search?q=io.qtjambi). All *QtJambi* modules consist of a Java part (minimum java version: JDK8) and a native component. -Native components are avaiable for Windows (x64), Linux (x64), macOS (x64 and arm64) and Android (x86, x86_64, armeabi-v7a, arm64-v8a). +Native components are avaiable for Windows (x64 and arm64), Linux (x64), macOS (x64 and arm64) and Android (x86, x86_64, armeabi-v7a, arm64-v8a). Debug info for native debugging is avaiable for Windows, Linux and macOS. ## Requirements and Compatibility @@ -27,32 +27,36 @@ Debug info for native debugging is avaiable for Windows, Linux and macOS. Search for qtjambi modules by name in Maven repository. Each java module requires the corresponding platform bundle. Therefore search for either **-native-windows-x64**, **-native-linux-x64**, **-native-macos** or **-native-android**. Info files for native debugging can be found in **-debuginfo-windows-x64**, **-debuginfo-linux-x64** and **-debuginfo-macos**. +**By default, the native components of only essential modules are made available on Maven. Please make a request via [/issues](Issues) if you require native components not yet available.** -QtJambi 6.6.1 requires Qt 6.6.x whereas x can be any patch version greater or equals 1 (except **qtjambi-activex**). -This release has been built with Qt 6.6.1. Qt 6.6.0 is not binary compatible to higher versions. +QtJambi 6.6.2 requires Qt 6.6.x whereas x can be any patch version. +This release has been built with Qt 6.6.2. On some platforms these QtJambi binaries might be incompatible to Qt 6.6.0. -QtJambi 6.5.4 requires Qt 6.5.x whereas x can be any patch version less or equals 3 (except **qtjambi-activex**). -This release has been built with Qt 6.5.3. Qt 6.5.3 is most likely not binary compatible to higher versions. +QtJambi 6.5.5 requires Qt 6.5.x whereas x can be any patch version. +This release has been built with Qt 6.5.3. Compatibility to higher versions is unknown. -QtJambi 5.15.18 requires Qt 5.15.x whereas x can be any patch version (except **qtjambi-activex**). -This release has been built with Qt 5.15.2. +QtJambi 5.15.19 requires Qt 5.15.x whereas x can be any patch version. +This release has been built with Qt 5.15.2. Compatibility to higher versions is unknown. + +In any case, **qtjambi-activex** native binaries are only compatible to the exact Qt version they have been built with. ## Qt Essentials Following Qt modules are provided by QtJambi: * [QtCore](https://doc.qt.io/qt-6/qtcore-index.html), [QtGui](https://doc.qt.io/qt-6/qtgui-index.html) and [QtWidgets](https://doc.qt.io/qt-6/qtwidgets-index.html) in module **qtjambi**: - * [**qtjambi-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi/6.5.4/jar) - * [**qtjambi-native-windows-x64-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-windows-x64/6.5.4/jar) - * [**qtjambi-debuginfo-windows-x64-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-debuginfo-windows-x64/6.5.4/jar) - * [**qtjambi-native-linux-x64-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-linux-x64/6.5.4/jar) - * [**qtjambi-debuginfo-linux-x64-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-debuginfo-linux-x64/6.5.4/jar) - * [**qtjambi-native-macos-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-macos/6.5.4/jar) - * [**qtjambi-debuginfo-macos-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-debuginfo-macos/6.5.4/jar) - * [**qtjambi-native-android-x86-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-android-x86/6.5.4/jar) - * [**qtjambi-native-android-x64-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-android-x64/6.5.4/jar) - * [**qtjambi-native-android-arm-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-android-arm/6.5.4/jar) - * [**qtjambi-native-android-arm64-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-android-arm64/6.5.4/jar) + * [**qtjambi-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi/6.5.5/jar) + * [**qtjambi-native-windows-x64-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-windows-x64/6.5.5/jar) + * [**qtjambi-native-windows-arm64-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-windows-arm64/6.5.5/jar) + * [**qtjambi-debuginfo-windows-x64-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-debuginfo-windows-x64/6.5.5/jar) + * [**qtjambi-native-linux-x64-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-linux-x64/6.5.5/jar) + * [**qtjambi-debuginfo-linux-x64-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-debuginfo-linux-x64/6.5.5/jar) + * [**qtjambi-native-macos-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-macos/6.5.5/jar) + * [**qtjambi-debuginfo-macos-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-debuginfo-macos/6.5.5/jar) + * [**qtjambi-native-android-x86-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-android-x86/6.5.5/jar) + * [**qtjambi-native-android-x64-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-android-x64/6.5.5/jar) + * [**qtjambi-native-android-arm-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-android-arm/6.5.5/jar) + * [**qtjambi-native-android-arm64-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-android-arm64/6.5.5/jar) * [QtDBus](https://doc.qt.io/qt-6/qtdbus-index.html) in module **qtjambi-dbus**: * [QtNetwork](https://doc.qt.io/qt-6/qtnetwork-index.html) in module **qtjambi-network**: * [QtQml](https://doc.qt.io/qt-6/qtqml-index.html) in module **qtjambi-qml**: @@ -119,24 +123,24 @@ Following Qt modules are provided by QtJambi: ## QtJambi Plugins * JDBC Sql Plugin: - * [**qtjambi-plugin-qsqljdbc-windows-x64-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-windows-x64/6.5.4/jar) - * [**qtjambi-plugin-qsqljdbc-linux-x64-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-linux-x64/6.5.4/jar) - * [**qtjambi-plugin-qsqljdbc-macos-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-macos/6.5.4/jar) - * [**qtjambi-plugin-qsqljdbc-native-android-common-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-native-android-common/6.5.4/jar) - * [**qtjambi-plugin-qsqljdbc-native-android-x86-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-native-android-x86/6.5.4/jar) - * [**qtjambi-plugin-qsqljdbc-native-android-x86-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-native-android-x86/6.5.4/jar) - * [**qtjambi-plugin-qsqljdbc-native-android-x64-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-native-android-x64/6.5.4/jar) - * [**qtjambi-plugin-qsqljdbc-native-android-arm-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-native-android-arm/6.5.4/jar) - * [**qtjambi-plugin-qsqljdbc-native-android-arm64-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-native-android-arm64/6.5.4/jar) + * [**qtjambi-plugin-qsqljdbc-windows-x64-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-windows-x64/6.5.5/jar) + * [**qtjambi-plugin-qsqljdbc-linux-x64-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-linux-x64/6.5.5/jar) + * [**qtjambi-plugin-qsqljdbc-macos-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-macos/6.5.5/jar) + * [**qtjambi-plugin-qsqljdbc-native-android-common-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-native-android-common/6.5.5/jar) + * [**qtjambi-plugin-qsqljdbc-native-android-x86-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-native-android-x86/6.5.5/jar) + * [**qtjambi-plugin-qsqljdbc-native-android-x86-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-native-android-x86/6.5.5/jar) + * [**qtjambi-plugin-qsqljdbc-native-android-x64-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-native-android-x64/6.5.5/jar) + * [**qtjambi-plugin-qsqljdbc-native-android-arm-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-native-android-arm/6.5.5/jar) + * [**qtjambi-plugin-qsqljdbc-native-android-arm64-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-plugin-qsqljdbc-native-android-arm64/6.5.5/jar) ## QtJambi Tools * [QtJambi User Interface Compiler (UIC)](https://doc.qt.io/qt-6/designer-using-a-ui-file.html#compile-time-form-processing): - * [**qtjambi-uic-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-uic/6.5.4/jar) + * [**qtjambi-uic-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-uic/6.5.5/jar) * patform bundles for **windows-x64**, **linux-x64** and **macos** * QtJambi Deployer: - * [**qtjambi-deployer-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-deployer/6.5.4/jar) + * [**qtjambi-deployer-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-deployer/6.5.5/jar) * patform bundles for **windows-x64**, **linux-x64**, **macos** and **android** * QtJambi Generator: - * [**qtjambi-generator-6.5.4.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-generator/6.5.4/jar) + * [**qtjambi-generator-6.5.5.jar**](https://search.maven.org/artifact/io.qtjambi/qtjambi-generator/6.5.5/jar) * patform bundles for **windows-x64**, **linux-x64** and **macos** diff --git a/www/Whats-New.md b/www/Whats-New.md index 159c0ff4..5bafb6a8 100644 --- a/www/Whats-New.md +++ b/www/Whats-New.md @@ -1,20 +1,15 @@ -# What's new in QtJambi 6.6.1 +# What's new in QtJambi 6.6.2 ## Bugfixes Solved issue: -* [Issue 168](../../../issues/168): QtJambi does not build from sources using JDK 21 - further improvements - -Blindfix for issue: -* [Issue 184](../../../issues/184): QtJambi 6.6.0 seems to not update cache of Java resources accessible via Qt? +* [Issue 185](../../../issues/185): QtJambi build from scratch on windows has missing opengl classes +* Java-written `QObject`s wrapped as native `QVariant` can be now used in Qml/JavaScript. ## Further Changes -* `std::chrono` types now map to `java.time` classes. -* New class `QScope` to manage resources in a try-with-resources block. -* QtJambi API changes its type mapping of data pointers from arrays to NIO buffers. This is especially relevant for virtual functions like `QIODevice::readData`, `QIODevice::writeData` and similar methods. They are now buffer-based. The former array-based API is available as final delegate functions. Subclasses of `QIODevice`, `QAbstractFileEngine` and `QPicture` implementing read/write need to be changed to using buffers instead. -* The native pointer corresponds to a NIO buffer's position. -* Java arrays can be specified with offset and length parameter to be translated to native pointer and length. -* QtJambi API now provides function overloads for all possibles calls according to implicit constructors of argument types. For legacy code, this may lead to ambiguous situations when using `null` as argument. -* Automatic download of Android SDK/NDK during the build process -* Made some array arguments of `QPaintEngine` and `QPainter`'s draw functions vararg. +* QtJambi's build system is now able to run on Windows arm64 and FreeBSD. +* Java-based QML plugins now survive a reset by `qmlClearTypeRegistrations()` without crash +* QVariant-wrapped QObject pointers can now be used in QML/JavaScript even when they are Java-owned +* binary compatibility to Qt 6.6.2 +* ready for Qt 6.7 \ No newline at end of file