QDebug(String string)
@QtUninvokable
public final @NonNull QDebug append(java.lang.Object obj){
- QMetaType metaType = QList.getMetaType(obj);
- debugStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(metaType), obj);
+ if(!disabled){
+ QMetaType metaType = QList.getMetaType(obj);
+ debugStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(metaType), obj);
+ }
return this;
}
@QtUninvokable
private native static void debugStream(long debug, long metaType, Object value);
+
+ @QtPropertyMember(enabled=false)
+ @NativeAccess
+ private boolean disabled;
}// class
class QTextStream___ extends QTextStream {
@@ -11421,6 +11394,14 @@ public final boolean startsWith(String str) {
return startsWith(new QByteArray(str));
}
+ /**
+ * See QByteArray::startsWith(const char*)const
+ */
+ @QtUninvokable
+ public final boolean startsWith(byte[] str) {
+ return startsWith(java.nio.ByteBuffer.wrap(str));
+ }
+
/**
* See QByteArray::contains(const char*)const
*/
@@ -11445,6 +11426,14 @@ public final boolean endsWith(String str) {
return endsWith(new QByteArray(str));
}
+ /**
+ * See QByteArray::endsWith(const char*)const
+ */
+ @QtUninvokable
+ public final boolean endsWith(byte[] str) {
+ return endsWith(java.nio.ByteBuffer.wrap(str));
+ }
+
/**
* See QByteArray::prepend(const char*)
*/
@@ -11594,6 +11583,14 @@ public final boolean endsWith(java.nio.ByteBuffer str) {
return endsWith(new QByteArrayView(str));
}
+ /**
+ * See QByteArray::endsWith(const char*)const
+ */
+ @QtUninvokable
+ public final boolean endsWith(QByteArray str) {
+ return endsWith(new QByteArrayView(str));
+ }
+
/**
* See QByteArray::prepend(const char*)
*/
@@ -11625,6 +11622,14 @@ public final boolean startsWith(byte[] str) {
public final boolean startsWith(java.nio.ByteBuffer str) {
return startsWith(new QByteArrayView(str));
}
+
+ /**
+ * See QByteArray::startsWith(const char*)const
+ */
+ @QtUninvokable
+ public final boolean startsWith(QByteArray str) {
+ return startsWith(new QByteArrayView(str));
+ }
/**
* See QByteArray::append(const char*)
@@ -11681,6 +11686,22 @@ public final int compare(byte[] b) {
public final int compare(byte[] b, Qt.CaseSensitivity cs) {
return compare(new QByteArrayView(b), cs);
}
+
+ /**
+ * See QByteArray::compare(const char*, Qt::CaseSensitivity)const
+ */
+ @QtUninvokable
+ public final int compare(QByteArray b) {
+ return compare(b, Qt.CaseSensitivity.CaseSensitive);
+ }
+
+ /**
+ * See QByteArray::compare(const char*, Qt::CaseSensitivity)const
+ */
+ @QtUninvokable
+ public final int compare(QByteArray b, Qt.CaseSensitivity cs) {
+ return compare(new QByteArrayView(b), cs);
+ }
/**
* See QByteArray::count(const char*)const
@@ -11690,6 +11711,14 @@ public final long count(java.nio.ByteBuffer data) {
return count(new QByteArrayView(data));
}
+ /**
+ * See QByteArray::count(const char*)const
+ */
+ @QtUninvokable
+ public final long count(QByteArray data) {
+ return count(new QByteArrayView(data));
+ }
+
/**
* See QByteArray::contains(const char*)const
*/
@@ -11697,6 +11726,14 @@ public final long count(java.nio.ByteBuffer data) {
public final boolean contains(java.nio.ByteBuffer data) {
return contains(new QByteArrayView(data));
}
+
+ /**
+ * See QByteArray::contains(const char*)const
+ */
+ @QtUninvokable
+ public final boolean contains(QByteArray data) {
+ return contains(new QByteArrayView(data));
+ }
/**
* See QByteArray::compare(const char*, Qt::CaseSensitivity)const
@@ -12096,7 +12133,7 @@ public final boolean contains(java.nio.ByteBuffer a){
}
/**
- * See QByteArrayView::QtUninvokable(QByteArray)const
+ * See QByteArrayView::endsWith(QByteArray)const
*/
@QtUninvokable
public final boolean endsWith(QByteArray a){
diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtCore.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtCore.qml
index e07cf107..d02d4028 100644
--- a/src/cpp/QtJambiGenerator/typesystem/qml/QtCore.qml
+++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtCore.qml
@@ -34,12 +34,13 @@ TypeSystem{
defaultSuperClass: "QtObject"
qtLibrary: "QtCore"
module: "qtjambi"
- description: "QtJambi base module containing QtCore, QtGui and QtWidgets.
\n"+
- "\n"+
- "QtCore - Core non-graphical classes used by other modules. \n"+
- "QtGui - Base classes for graphical user interface (GUI) components. Includes OpenGL. \n"+
- "QtWidgets - Classes to extend Qt GUI with C++ widgets. \n"+
- " "
+ description: String.raw
+`QtJambi base module containing QtCore, QtGui and QtWidgets.
+
+QtCore - Core non-graphical classes used by other modules.
+QtGui - Base classes for graphical user interface (GUI) components. Includes OpenGL.
+QtWidgets - Classes to extend Qt GUI with C++ widgets.
+ `
InjectCode{
target: CodeClass.MetaInfo
position: Position.Position1
@@ -63,9 +64,11 @@ TypeSystem{
packageName: "io.qt.internal"
target: CodeClass.Java
position: Position.Beginning
- Text{content: "final static Properties properties = new Properties();\n"+
- "\n"+
- "@QtUninvokable private static native void shutdown();"}
+ Text{content: String.raw
+`final static Properties properties = new Properties();
+
+@QtUninvokable private static native void shutdown();`
+ }
}
InjectCode{
@@ -79,10 +82,13 @@ TypeSystem{
packageName: "io.qt.internal"
target: CodeClass.Java
position: Position.Position2
- ImportFile{
- name: ":/io/qtjambi/generator/typesystem/QtJambiCore.java"
- quoteAfterLine: "class QtJambi_LibraryUtilities_2_"
- quoteBeforeLine: "}// class"
+ Text{content: String.raw
+`if(!Boolean.getBoolean("io.qt.no-library-shutdown-hook")) {
+ shutdownHook = RetroHelper.newShutdownThread(QtJambi_LibraryUtilities::shutdown, "QtJambi_LibraryShutdown");
+ shutdownHook.setContextClassLoader(null);
+ Runtime.getRuntime().addShutdownHook(shutdownHook);
+}
+LibraryUtility.loadQtJambiLibrary();`
}
}
@@ -90,80 +96,94 @@ TypeSystem{
packageName: "io.qt.internal"
target: CodeClass.Java
position: Position.Position4
- Text{content: "if(shutdownHook!=null)\n"+
- " Runtime.getRuntime().removeShutdownHook(shutdownHook);\n"+
- "LibraryUtility.clear();"}
+ Text{content: String.raw
+`if(shutdownHook!=null)
+ Runtime.getRuntime().removeShutdownHook(shutdownHook);
+LibraryUtility.clear();`
+ }
}
InjectCode{
target: CodeClass.ModuleInfo
position: Position.End
- Text{content: "requires transitive java.logging;\n"+
- "requires java.xml;\n"+
- "requires java.prefs;\n"+
- "opens io.qt.internal to qtjambi.autotests;\n"+
- "exports io.qt.internal to qtjambi.deployer, qtjambi.generator, qtjambi.autotests;\n"+
- "exports io.qt;"}
+ Text{content: String.raw
+`requires transitive java.logging;
+requires java.xml;
+requires java.prefs;
+opens io.qt.internal to qtjambi.autotests;
+exports io.qt.internal to qtjambi.deployer, qtjambi.generator, qtjambi.autotests;
+exports io.qt;`
+ }
}
Template{
name: "core.comsumer.function"
- Text{content: "std::function %out;\n"+
- "if(%in){\n"+
- " JObjectWrapper wrapper(%env, %in);\n"+
- " %out = [wrapper](%TYPE value){\n"+
- " if(JniEnvironment env{200}){\n"+
- " jobject _value = qtjambi_cast(env, value);\n"+
- " Java::Runtime::Consumer::accept(env, wrapper.object(), _value);\n"+
- " }\n"+
- " };\n"+
- "}"}
+ Text{content: String.raw
+`std::function %out;
+if(%in){
+ JObjectWrapper wrapper(%env, %in);
+ %out = [wrapper](%TYPE value){
+ if(JniEnvironment env{200}){
+ jobject _value = qtjambi_cast(env, value);
+ Java::Runtime::Consumer::accept(env, wrapper.object(), _value);
+ }
+ };
+}`
+ }
}
Template{
name: "core.runnable.function"
- Text{content: "std::function %out;\n"+
- "if(%in){\n"+
- " JObjectWrapper wrapper(%env, %in);\n"+
- " %out = [wrapper](){\n"+
- " if(JniEnvironment env{200}){\n"+
- " Java::Runtime::Runnable::run(env, wrapper.object());\n"+
- " }\n"+
- " };\n"+
- "}"}
+ Text{content: String.raw
+`std::function %out;
+if(%in){
+ JObjectWrapper wrapper(%env, %in);
+ %out = [wrapper](){
+ if(JniEnvironment env{200}){
+ Java::Runtime::Runnable::run(env, wrapper.object());
+ }
+ };
+}`
+ }
}
Template{
name: "core.supplier.function"
- Text{content: "std::function<%TYPE()> %out;\n"+
- "if(%in){\n"+
- " JObjectWrapper wrapper(%env, %in);\n"+
- " %out = [wrapper]() -> %TYPE {\n"+
- " if(JniEnvironment env{200}){\n"+
- " jobject value = Java::Runtime::Supplier::get(env, wrapper.object());\n"+
- " return qtjambi_cast<%TYPE>(env, value);\n"+
- " }\n"+
- " return {};\n"+
- " };\n"+
- "}"}
+ Text{content: String.raw
+`std::function<%TYPE()> %out;
+if(%in){
+ JObjectWrapper wrapper(%env, %in);
+ %out = [wrapper]() -> %TYPE {
+ if(JniEnvironment env{200}){
+ jobject value = Java::Runtime::Supplier::get(env, wrapper.object());
+ return qtjambi_cast<%TYPE>(env, value);
+ }
+ return {};
+ };
+}`
+ }
}
Template{
name: "core.self_iterator"
- Text{content: "@Override\n"+
- "@QtUninvokable\n"+
- "public final java.util.Iterator<%ELEMENT_TYPE> iterator() {\n"+
- " return this;\n"+
- "}"}
+ Text{content: String.raw
+`@Override
+@QtUninvokable
+public final java.util.Iterator<%ELEMENT_TYPE> iterator() {
+ return this;
+}`
+ }
}
Template{
name: "core.to_iterator"
- Text{content: "@Override\n"+
- "@QtUninvokable\n"+
- "public final %ITERATOR_TYPE iterator() {\n"+
- " return new %ITERATOR_TYPE(this);\n"+
- "}"}
+ Text{content: String.raw
+`@Override
+@QtUninvokable
+public final %ITERATOR_TYPE iterator() {
+ return new %ITERATOR_TYPE(this);
+}`
+ }
}
PrimitiveType{
@@ -7875,6 +7895,16 @@ if(destinationChild<0)
}
}
}
+ InjectCode{
+ target: CodeClass.Java
+ position: Position.Equals
+ until: 5
+ Text{content: "if (other instanceof byte[]) {\n"+
+ " other = new io.qt.core.QByteArray((byte[]) other);\n"+
+ "}else if (other instanceof java.nio.ByteBuffer) {\n"+
+ " other = new io.qt.core.QByteArray((java.nio.ByteBuffer) other);\n"+
+ "}"}
+ }
InjectCode{
target: CodeClass.Java
position: Position.Equals
@@ -7885,6 +7915,16 @@ if(destinationChild<0)
" other = new io.qt.core.QByteArrayView((java.nio.ByteBuffer) other);\n"+
"}"}
}
+ InjectCode{
+ target: CodeClass.Java
+ position: Position.Compare
+ until: 5
+ Text{content: "if (other instanceof byte[]) {\n"+
+ " other = new io.qt.core.QByteArray((byte[]) other);\n"+
+ "}else if (other instanceof java.nio.ByteBuffer) {\n"+
+ " other = new io.qt.core.QByteArray((java.nio.ByteBuffer) other);\n"+
+ "}"}
+ }
InjectCode{
target: CodeClass.Java
position: Position.Compare
@@ -19030,6 +19070,11 @@ if(destinationChild<0)
quoteBeforeLine: "}// class"
}
}
+ InjectCode{
+ position: Position.Clone
+ Text{content: "clone.__rcDevice = this.__rcDevice;\n"
+ + "clone.disabled = this.disabled;"}
+ }
ModifyFunction{
signature: "QDebug(QIODevice *)"
ModifyArgument{
@@ -19043,7 +19088,8 @@ if(destinationChild<0)
ModifyFunction{
signature: "QDebug(QDebug)"
InjectCode{
- Text{content: "__rcDevice = o.__rcDevice;"}
+ Text{content: "this.__rcDevice = o.__rcDevice;\n"
+ + "this.disabled = o.disabled;"}
}
}
ModifyFunction{
@@ -19051,16 +19097,21 @@ if(destinationChild<0)
InjectCode{
Text{content: "Object __rcDevice = this.__rcDevice;\n"+
"this.__rcDevice = other.__rcDevice;\n"+
- "other.__rcDevice = __rcDevice;"}
+ "other.__rcDevice = __rcDevice;\n"+
+ "boolean disabled = this.disabled;\n"+
+ "this.disabled = other.disabled;\n"+
+ "other.disabled = disabled;\n"}
}
}
ModifyFunction{
signature: "operator<<(QChar)"
rename: "append"
+ InjectCode{ Text{content: "if(disabled) return this;"} }
}
ModifyFunction{
signature: "operator<<(const char*)"
rename: "append"
+ InjectCode{ Text{content: "if(disabled) return this;"} }
}
ModifyFunction{
signature: "operator<<(QString)"
@@ -19075,43 +19126,61 @@ if(destinationChild<0)
Text{content: "QString %out = qtjambi_cast(%env, %1);"}
}
}
+ InjectCode{ Text{content: "if(disabled) return this;"} }
}
ModifyFunction{
signature: "operator<<(bool)"
rename: "append"
+ InjectCode{ Text{content: "if(disabled) return this;"} }
}
ModifyFunction{
signature: "operator<<(char)"
rename: "append"
+ InjectCode{ Text{content: "if(disabled) return this;"} }
}
ModifyFunction{
signature: "operator<<(QByteArray)"
rename: "append"
+ InjectCode{ Text{content: "if(disabled) return this;"} }
}
ModifyFunction{
signature: "operator<<(QByteArrayView)"
rename: "append"
+ InjectCode{ Text{content: "if(disabled) return this;"} }
since: 6
}
ModifyFunction{
signature: "operator<<(double)"
rename: "append"
+ InjectCode{ Text{content: "if(disabled) return this;"} }
}
ModifyFunction{
signature: "operator<<(float)"
rename: "append"
+ InjectCode{ Text{content: "if(disabled) return this;"} }
}
ModifyFunction{
signature: "operator<<(qint64)"
rename: "append"
+ InjectCode{ Text{content: "if(disabled) return this;"} }
}
ModifyFunction{
signature: "operator<<(signed short)"
rename: "append"
+ InjectCode{ Text{content: "if(disabled) return this;"} }
}
ModifyFunction{
signature: "operator<<(signed int)"
rename: "append"
+ InjectCode{ Text{content: "if(disabled) return this;"} }
+ }
+ ModifyFunction{
+ signature: "maybeQuote(char)"
+ InjectCode{ Text{content: "if(disabled) return this;"} }
+ }
+ ModifyFunction{
+ signature: "maybeSpace()"
+ InjectCode{ Text{content: "if(disabled) return this;"} }
}
}
diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtGui.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtGui.qml
index ba84d838..a75a1eb1 100644
--- a/src/cpp/QtJambiGenerator/typesystem/qml/QtGui.qml
+++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtGui.qml
@@ -18673,6 +18673,7 @@ TypeSystem{
name: "StyleHint"
}
+ Rejection{functionName: "call"}
Rejection{functionName: "createPlatformPixmap"}
Rejection{functionName: "createPlatformWindow"}
Rejection{functionName: "createForeignWindow"}
@@ -18700,6 +18701,25 @@ TypeSystem{
Text{content: "@QtUninvokable\n"+
"public native static QPlatformIntegration instance();"}
}
+
+ ModifyFunction{
+ signature: "themeNames() const"
+ ModifyArgument{
+ index: 0
+ ReplaceType{
+ modifiedType: "io.qt.core.@NonNull QStringList"
+ }
+ }
+ }
+ ModifyFunction{
+ signature: "possibleKeys(const QKeyEvent *) const"
+ ModifyArgument{
+ index: 0
+ ReplaceType{
+ modifiedType: "io.qt.core.@NonNull QList"
+ }
+ }
+ }
}
Rejection{
diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtPdf.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtPdf.qml
index a6190ff1..204f5b10 100644
--- a/src/cpp/QtJambiGenerator/typesystem/qml/QtPdf.qml
+++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtPdf.qml
@@ -215,6 +215,39 @@ TypeSystem{
}
until: [6, 3]
}
+
+ ObjectType{
+ name: "QPdfLinkModel"
+ EnumType{
+ name: "Role"
+ }
+ ModifyFunction{
+ signature: "setDocument(QPdfDocument *)"
+ ModifyArgument{
+ index: 1
+ ReferenceCount{
+ variableName: "__rcDocument"
+ action: ReferenceCount.Set
+ }
+ }
+ }
+ since: [6, 6]
+ }
+
+ ObjectType{
+ name: "QPdfPageSelector"
+ ModifyFunction{
+ signature: "setDocument(QPdfDocument *)"
+ ModifyArgument{
+ index: 1
+ ReferenceCount{
+ variableName: "__rcDocument"
+ action: ReferenceCount.Set
+ }
+ }
+ }
+ since: [6, 6]
+ }
SuppressedWarning{text: "WARNING(CppImplGenerator) :: Value type 'QPdfDestination' is missing a default constructor.*"}
SuppressedWarning{text: "WARNING(CppImplGenerator) :: Value type 'QPdfSelection' is missing a default constructor.*"}
diff --git a/src/cpp/QtJambiGenerator/typesystem/qml/QtTextToSpeech.qml b/src/cpp/QtJambiGenerator/typesystem/qml/QtTextToSpeech.qml
index e65dbafd..e2e79d26 100644
--- a/src/cpp/QtJambiGenerator/typesystem/qml/QtTextToSpeech.qml
+++ b/src/cpp/QtJambiGenerator/typesystem/qml/QtTextToSpeech.qml
@@ -35,23 +35,27 @@ TypeSystem{
qtLibrary: "QtTextToSpeech"
module: "qtjambi.texttospeech"
description: "Provides support for accessibility features such as text-to-speech."
-
- EnumType{
- name: "QTextToSpeech::State"
- }
-
- EnumType{
- name: "QTextToSpeech::BoundaryHint"
- since: [6, 4]
- }
-
- EnumType{
- name: "QTextToSpeech::ErrorReason"
- since: [6, 4]
- }
ObjectType{
name: "QTextToSpeech"
+
+ EnumType{
+ name: "State"
+ }
+ EnumType{
+ name: "BoundaryHint"
+ since: [6, 4]
+ }
+
+ EnumType{
+ name: "ErrorReason"
+ since: [6, 4]
+ }
+
+ EnumType{
+ name: "Capability"
+ since: [6, 6]
+ }
ExtraIncludes{
Include{
fileName: "hashes.h"
@@ -151,15 +155,15 @@ TypeSystem{
}
}
- EnumType{
- name: "QVoice::Age"
- }
-
- EnumType{
- name: "QVoice::Gender"
- }
-
ValueType{
name: "QVoice"
+
+ EnumType{
+ name: "Age"
+ }
+
+ EnumType{
+ name: "Gender"
+ }
}
}
diff --git a/src/cpp/QtJambiGenerator/typesystem/qml_abstractobject.h b/src/cpp/QtJambiGenerator/typesystem/qml_abstractobject.h
index 94059441..503a6e95 100644
--- a/src/cpp/QtJambiGenerator/typesystem/qml_abstractobject.h
+++ b/src/cpp/QtJambiGenerator/typesystem/qml_abstractobject.h
@@ -6,6 +6,7 @@
struct Ownership : public QObject{
Q_OBJECT
QML_ELEMENT
+ QML_UNCREATABLE("enum carrier")
public:
enum Entries {
Invalid,
@@ -18,12 +19,13 @@ struct Ownership : public QObject{
};
Q_ENUM(Entries)
Ownership() = delete;
- Q_DISABLE_COPY(Ownership)
+ Q_DISABLE_COPY_MOVE(Ownership)
};
struct Affinity : public QObject{
Q_OBJECT
QML_ELEMENT
+ QML_UNCREATABLE("enum carrier")
public:
enum Entries {
UI = 0x00800000,
@@ -31,12 +33,13 @@ struct Affinity : public QObject{
};
Q_ENUM(Entries)
Affinity() = delete;
- Q_DISABLE_COPY(Affinity)
+ Q_DISABLE_COPY_MOVE(Affinity)
};
struct CodeClass : public QObject{
Q_OBJECT
QML_ELEMENT
+ QML_UNCREATABLE("enum carrier")
public:
enum Entries {
NoLanguage = 0x0000,
@@ -59,12 +62,13 @@ struct CodeClass : public QObject{
};
Q_ENUM(Entries)
CodeClass() = delete;
- Q_DISABLE_COPY(CodeClass)
+ Q_DISABLE_COPY_MOVE(CodeClass)
};
struct RemoveFlag : public QObject{
Q_OBJECT
QML_ELEMENT
+ QML_UNCREATABLE("enum carrier")
public:
enum Entries {
None = CodeClass::NoLanguage,
@@ -74,12 +78,13 @@ struct RemoveFlag : public QObject{
};
Q_ENUM(Entries)
RemoveFlag() = delete;
- Q_DISABLE_COPY(RemoveFlag)
+ Q_DISABLE_COPY_MOVE(RemoveFlag)
};
struct Position : public QObject{
Q_OBJECT
QML_ELEMENT
+ QML_UNCREATABLE("enum carrier")
public:
enum Entries {
Beginning = 0,
@@ -92,17 +97,19 @@ struct Position : public QObject{
Compare,
HashCode,
ToString,
+ Clone,
Comment,
End = 1024
};
Q_ENUM(Entries)
Position() = delete;
- Q_DISABLE_COPY(Position)
+ Q_DISABLE_COPY_MOVE(Position)
};
struct Modification : public QObject{
Q_OBJECT
QML_ELEMENT
+ QML_UNCREATABLE("enum carrier")
public:
enum Entries {
Private = 0x01000,
@@ -117,7 +124,7 @@ struct Modification : public QObject{
};
Q_ENUM(Entries)
Modification() = delete;
- Q_DISABLE_COPY(Modification)
+ Q_DISABLE_COPY_MOVE(Modification)
};
Q_DECLARE_FLAGS(AccessModifications,Modification::Entries)
diff --git a/src/cpp/QtJambiGenerator/typesystem/qmltypesystemreader.cpp b/src/cpp/QtJambiGenerator/typesystem/qmltypesystemreader.cpp
index 9bc0959e..c9f44a0a 100644
--- a/src/cpp/QtJambiGenerator/typesystem/qmltypesystemreader.cpp
+++ b/src/cpp/QtJambiGenerator/typesystem/qmltypesystemreader.cpp
@@ -489,6 +489,7 @@ void QmlTypeSystemReaderPrivate::parseInjectCode(InjectCode* element, ComplexTyp
{Position::Compare, CodeSnip::Compare},
{Position::HashCode, CodeSnip::HashCode},
{Position::ToString, CodeSnip::ToString},
+ {Position::Clone, CodeSnip::Clone},
{Position::Comment, CodeSnip::Comment},
{Position::End, CodeSnip::End}
};
@@ -535,6 +536,7 @@ void QmlTypeSystemReaderPrivate::parseInjectCode(InjectCode* element, Functional
{Position::Compare, CodeSnip::Compare},
{Position::HashCode, CodeSnip::HashCode},
{Position::ToString, CodeSnip::ToString},
+ {Position::Clone, CodeSnip::Clone},
{Position::Comment, CodeSnip::Comment},
{Position::End, CodeSnip::End}
};
@@ -554,10 +556,11 @@ void QmlTypeSystemReaderPrivate::parseInjectCode(InjectCode* element,const QHash
snip.language = languageNames[className];
snip.position = positionNames[position];
if((snip.position==CodeSnip::Equals
- || snip.position==CodeSnip::Compare
- || snip.position==CodeSnip::HashCode
- || snip.position==CodeSnip::ToString) && snip.language!=TS::TargetLangCode){
- TypesystemException::raise(QString("Invalid position '%1' for language '%2'").arg(position).arg(className));
+ || 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))));
}
const QList& childrenList = element->childrenList();
diff --git a/src/cpp/QtJambiGenerator/typesystem/xmltypesystemreader.cpp b/src/cpp/QtJambiGenerator/typesystem/xmltypesystemreader.cpp
index c7c8c5ff..abae7bed 100644
--- a/src/cpp/QtJambiGenerator/typesystem/xmltypesystemreader.cpp
+++ b/src/cpp/QtJambiGenerator/typesystem/xmltypesystemreader.cpp
@@ -851,8 +851,7 @@ void XmlTypeSystemReaderPrivate::parseInjectCode(const QDomElement &element,cons
snip.position = positionNames[position];
if((snip.position==CodeSnip::Equals
|| snip.position==CodeSnip::Compare
- || snip.position==CodeSnip::HashCode
- || snip.position==CodeSnip::ToString) && snip.language!=TS::TargetLangCode){
+ || snip.position==CodeSnip::HashCode) && snip.language!=TS::TargetLangCode){
TypesystemException::raise(QString("Invalid position '%1' for language '%2' of tag <%3> in line %4").arg(position).arg(className).arg(element.localName()).arg(element.lineNumber()));
}
diff --git a/src/java/ant/io/qt/tools/ant/InitializeBuildTask.java b/src/java/ant/io/qt/tools/ant/InitializeBuildTask.java
index 8f654dc0..43659a6f 100644
--- a/src/java/ant/io/qt/tools/ant/InitializeBuildTask.java
+++ b/src/java/ant/io/qt/tools/ant/InitializeBuildTask.java
@@ -1148,7 +1148,7 @@ else if (Constants.CONFIG_TEST.equals(getConfiguration()))
throw new BuildException("ERROR: " + Constants.GENERATOR_INCLUDEPATHS
+ " property is not configured, please ensure you read and edit build.properties");
- mySetProperty(-1, "TODAY", null, new SimpleDateFormat("yyyy-MM-dd").format(new Date()), true);
+ mySetProperty(-1, "TODAY", null, new SimpleDateFormat("yyyy-MM-dd").format(new Date()), false);
java.io.File buildDir = new java.io.File(new java.io.File(qtjambiFullVersion), "build");
mySetProperty(-1, "outputDir", null, buildDir.getAbsolutePath(), true);
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 e05a140c..143874fc 100644
--- a/src/java/modules/qtjambi/Qt5/io/qt/core/QLinkedList.java
+++ b/src/java/modules/qtjambi/Qt5/io/qt/core/QLinkedList.java
@@ -48,6 +48,10 @@ public class QLinkedList extends io.qt.internal.AbstractSequentialContainernull.
+ */
@NativeAccess
protected QLinkedList(QPrivateConstructor p) {
super(p);
@@ -60,32 +64,23 @@ public QLinkedList(QMetaType.Type metaType) {
public QLinkedList(Class elementType) {
super(null);
QMetaType metaType = QMetaType.fromType(elementType);
- if(metaType.id()==0)
- throw new IllegalArgumentException("QMetaType::UnknownType cannot be type of QLinkedList.");
- if(metaType.id()==QMetaType.Type.Void.value())
- throw new IllegalArgumentException("void cannot be type of QLinkedList.");
initialize(elementType, QtJambi_LibraryUtilities.internal.nativeId(metaType), null);
}
public QLinkedList(QMetaType metaType) {
super(null);
- if(metaType.id()==0)
- throw new IllegalArgumentException("QMetaType::UnknownType cannot be type of QLinkedList.");
- if(metaType.id()==QMetaType.Type.Void.value())
- throw new IllegalArgumentException("void cannot be type of QLinkedList.");
initialize(metaType.javaType(), QtJambi_LibraryUtilities.internal.nativeId(metaType), null);
}
public QLinkedList(Collection other) {
super(null);
QMetaType metaType = QList.findElementMetaType(Objects.requireNonNull(other));
- if(metaType==null || metaType.id()==0)
- throw new IllegalArgumentException("QMetaType::UnknownType cannot be type of QLinkedList.");
- if(metaType.id()==QMetaType.Type.Void.value())
- throw new IllegalArgumentException("void cannot be type of QLinkedList.");
initialize(metaType.javaType(), QtJambi_LibraryUtilities.internal.nativeId(metaType), other);
}
+ /**
+ * Creating a container of type QVariant.
+ */
public static QLinkedList createVariantLinkedList(){
return new QLinkedList<>(new QMetaType(QMetaType.Type.QVariant));
}
@@ -93,13 +88,16 @@ public static QLinkedList createVariantLinkedList(){
@QtUninvokable
private native void initialize(Class> elementType, long elementMetaType, Collection other);
+ /**
+ * Creates and returns a copy of this object.
+ */
@Override
public QLinkedList clone(){
return new QLinkedList<>(this);
}
@QtUninvokable
- public final void append(T t) {
+ public final void append(T t) {
try {
append(QtJambi_LibraryUtilities.internal.nativeId(this), t);
}catch(QNoNativeResourcesException e) {
@@ -112,14 +110,14 @@ public final void append(T t) {
private static native void append(long __this__nativeId, T t);
@QtUninvokable
- public final void clear() {
+ public final void clear() {
clear(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private static native void clear(long __this__nativeId);
@QtUninvokable
- public final boolean contains(Object t) {
+ public final boolean contains(Object t) {
try{
return contains(QtJambi_LibraryUtilities.internal.nativeId(this), t);
}catch(QNoNativeResourcesException e) {
@@ -137,12 +135,12 @@ public final boolean contains(Object t) {
private static native boolean contains(long __this__nativeId, T t);
@QtUninvokable
- public final int count() {
+ public final int count() {
return size();
}
@QtUninvokable
- public final int count(T t) {
+ public final int count(T t) {
try{
return count(QtJambi_LibraryUtilities.internal.nativeId(this), t);
}catch(QNoNativeResourcesException e) {
@@ -155,35 +153,35 @@ public final int count(T t) {
private static native