diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6206425
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,22 @@
+/doc/
+/generated_cpp/
+/plugins/
+/qtbindings/*/debug/
+/qtbindings/*/release/
+/qtbindings/Makefile
+/qtbindings/*/Makefile
+/qtbindings/*/Makefile.Debug
+/qtbindings/*/Makefile.Release
+/generator/.preprocessed.tmp
+/qtbindings/qs_eval/qs_eval
+
+*.log
+*.o
+qtbindings/*/moc_*.cpp
+
+/generator/generator
+/generator/Makefile
+/generator/Makefile.Debug
+/generator/Makefile.Release
+/generator/release/
+.qmake.stash
diff --git a/README b/README
index 1106334..f226be8 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
Qt Script Generator labs package, version 0.2
-
-The Qt Script Generator is a tool that generates Qt bindings for Qt Script.
+The Qt Script Generator is a tool that generates Qt bindings for Qt Script. This should work
+with Qt 5.6.0/5.7.0 (tested with 5.7.0+ICU) and MSVC 2015 Update 3.
---
diff --git a/examples/WebKitPlugins.html b/examples/WebKitPlugins.html
deleted file mode 100644
index 9146696..0000000
--- a/examples/WebKitPlugins.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-My Nifty Plugin
-
-
-
-
-
-
diff --git a/examples/WebKitPlugins.js b/examples/WebKitPlugins.js
deleted file mode 100644
index 5f8f2c7..0000000
--- a/examples/WebKitPlugins.js
+++ /dev/null
@@ -1,147 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Script Generator project on Qt Labs.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-function getArgumentValue(name, names, values, from)
-{
- var i = (from == undefined) ? 0 : from;
- for ( ; i < names.length; ++i) {
- if (names[i] == name)
- return values[i];
- }
- return undefined;
-}
-
-//
-// Plugin class
-//
-
-function MyWebPlugin(formUrl, scriptUrl, parent)
-{
- QWidget.call(this, parent);
-
- this.initialized = false;
- this.formReply = this.downloadFile(formUrl, this.formDownloaded);
- if (scriptUrl == undefined)
- this.script = "";
- else
- this.scriptReply = this.downloadFile(scriptUrl, this.scriptDownloaded);
-}
-
-MyWebPlugin.prototype = new QWidget();
-
-MyWebPlugin.prototype.downloadFile = function(url, callback)
-{
- if (this.accessManager == undefined)
- this.accessManager = new QNetworkAccessManager();
- var reply = this.accessManager.get(new QNetworkRequest(url));
- reply.finished.connect(this, callback);
- return reply;
-}
-
-MyWebPlugin.prototype.formDownloaded = function()
-{
- var loader = new QUiLoader();
- this.form = loader.load(this.formReply);
- var layout = new QVBoxLayout(this);
- layout.addWidget(this.form, 0, Qt.AlignCenter);
- this.initialize();
-}
-
-MyWebPlugin.prototype.scriptDownloaded = function()
-{
- var stream = new QTextStream(this.scriptReply);
- this.script = stream.readAll();
- this.initialize();
-}
-
-MyWebPlugin.prototype.initialize = function()
-{
- if (this.initialized)
- return;
- if ((this.form == undefined) || (this.script == undefined))
- return;
- var ctor = eval(this.script);
- if (typeof ctor != "function")
- return;
- this.instance = new ctor(this.form);
- this.initialized = true;
-}
-
-
-//
-// QWebPluginFactory subclass
-//
-
-function MyWebPluginFactory(parent)
-{
- QWebPluginFactory.call(this, parent);
-}
-
-MyWebPluginFactory.prototype = new QWebPluginFactory();
-
-MyWebPluginFactory.prototype.create = function(mimeType, url, argumentNames, argumentValues)
-{
- if (mimeType != "application/x-qtform")
- return null;
-
- var formUrl = getArgumentValue("form", argumentNames, argumentValues);
- var scriptUrl = getArgumentValue("script", argumentNames, argumentValues);
- if (formUrl == undefined)
- return null;
-
- return new MyWebPlugin(new QUrl(formUrl), new QUrl(scriptUrl));
-}
-
-
-//
-// Main
-//
-
-var view = new QWebView();
-view.settings().setAttribute(QWebSettings.PluginsEnabled, true);
-
-var factory = new MyWebPluginFactory();
-view.page().setPluginFactory(factory);
-
-view.load(new QUrl("WebKitPlugins.html"));
-view.show();
-
-QCoreApplication.exec();
diff --git a/generator/abstractmetabuilder.cpp b/generator/abstractmetabuilder.cpp
index 34fb4db..9eab325 100644
--- a/generator/abstractmetabuilder.cpp
+++ b/generator/abstractmetabuilder.cpp
@@ -313,21 +313,21 @@ void AbstractMetaBuilder::traverseStreamOperator(FunctionModelItem item)
}
void AbstractMetaBuilder::fixQObjectForScope(TypeDatabase *types,
- NamespaceModelItem scope)
+ NamespaceModelItem scope)
{
foreach (ClassModelItem item, scope->classes()) {
QString qualified_name = item->qualifiedName().join("::");
TypeEntry *entry = types->findType(qualified_name);
if (entry) {
- if (isQObject(qualified_name) && entry->isComplex()) {
+ if (isQObject(qualified_name) && entry->isComplex()) {
((ComplexTypeEntry *) entry)->setQObject(true);
- }
- }
+ }
+ }
}
foreach (NamespaceModelItem item, scope->namespaceMap().values()) {
if (scope != item)
- fixQObjectForScope(types, item);
+ fixQObjectForScope(types, item);
}
}
@@ -876,9 +876,13 @@ void AbstractMetaBuilder::figureOutDefaultEnumArguments()
if (classes.front() != 0) {
classes << classes.front()->baseClass();
+ qDebug() << "Search enum value '" << expr << "' in '" << meta_class->name() << "' and its super classes";
+
AbstractMetaClassList interfaces = classes.front()->interfaces();
- foreach (AbstractMetaClass *interface, interfaces)
- classes << interface->primaryInterfaceImplementor();
+ foreach (AbstractMetaClass *interface, interfaces) {
+ if(classes.front() != interface->primaryInterfaceImplementor())
+ classes << interface->primaryInterfaceImplementor();
+ }
e = classes.front()->findEnumForValue(expr);
}
@@ -1524,7 +1528,7 @@ AbstractMetaFunction *AbstractMetaBuilder::traverseFunction(FunctionModelItem fu
if (!meta_function->isAbstract())
*meta_function += AbstractMetaAttributes::Native;
- if (!function_item->isVirtual())
+ if (!function_item->isVirtual() && !meta_function->isAbstract())
*meta_function += AbstractMetaAttributes::Final;
if (function_item->isInvokable())
@@ -1799,7 +1803,7 @@ AbstractMetaType *AbstractMetaBuilder::translateType(const TypeInfo &_typei, boo
return t;
ClassModelItem item = m_dom->findClass(contexts.at(0));
- if (item != 0)
+ if (item)
contexts += item->baseClasses();
contexts.pop_front();
diff --git a/generator/abstractmetalang.cpp b/generator/abstractmetalang.cpp
index 463227d..79415e4 100644
--- a/generator/abstractmetalang.cpp
+++ b/generator/abstractmetalang.cpp
@@ -53,7 +53,7 @@ AbstractMetaType *AbstractMetaType::copy() const
cpy->setConstant(isConstant());
cpy->setReference(isReference());
cpy->setIndirections(indirections());
- cpy->setInstantiations(instantiations());
+ cpy->setInstantiations(instantiations());
cpy->setArrayElementCount(arrayElementCount());
cpy->setOriginalTypeDescription(originalTypeDescription());
cpy->setOriginalTemplateType(originalTemplateType() ? originalTemplateType()->copy() : 0);
@@ -439,7 +439,7 @@ bool AbstractMetaFunction::resetObjectAfterUse(int argument_idx) const
QList argumentModifications = modification.argument_mods;
foreach (ArgumentModification argumentModification, argumentModifications) {
if (argumentModification.index == argument_idx && argumentModification.reset_after_use)
- return true;
+ return true;
}
}
@@ -1169,7 +1169,7 @@ QPropertySpec *AbstractMetaClass::propertySpecForReset(const QString &name) cons
static bool functions_contains(const AbstractMetaFunctionList &l, const AbstractMetaFunction *func)
{
foreach (const AbstractMetaFunction *f, l) {
- if ((f->compareTo(func) & AbstractMetaFunction::PrettySimilar) == AbstractMetaFunction::PrettySimilar)
+ if ((f->compareTo(func) & AbstractMetaFunction::PrettySimilar) == AbstractMetaFunction::PrettySimilar)
return true;
}
return false;
@@ -1862,7 +1862,7 @@ QString AbstractMetaType::minimalSignature() const
if (isConstant())
minimalSignature += "const ";
minimalSignature += typeEntry()->qualifiedCppName();
- if (hasInstantiations()) {
+ if (hasInstantiationInCpp()) {
QList instantiations = this->instantiations();
minimalSignature += "<";
for (int i=0;iminimalSignature();
}
- minimalSignature += ">";
+ minimalSignature += " >";
}
+ for (int j=0; jqualifiedCppName();
+ if (hasInstantiationInCpp()) {
+ QList instantiations = this->instantiations();
+ minimalSignature += "<";
+ for (int i=0;i 0)
+ minimalSignature += ",";
+ minimalSignature += instantiations.at(i)->minimalSignature();
+ }
+ minimalSignature += " >";
+ }
+
+ for (int j=0; jqualifiedCppName();
+ if (hasInstantiationInCpp()) {
+ QList instantiations = this->instantiations();
+ minimalSignature += "<";
+ for (int i=0;i 0)
+ minimalSignature += ",";
+ minimalSignature += instantiations.at(i)->minimalSignature();
+ }
+ minimalSignature += " >";
+ }
+
for (int j=0; j &insts) { m_instantiations = insts; }
+ void setInstantiations(const QList &insts) { m_instantiations = insts; }
QList instantiations() const { return m_instantiations; }
void setInstantiationInCpp(bool incpp) { m_cpp_instantiation = incpp; }
bool hasInstantiationInCpp() const { return hasInstantiations() && m_cpp_instantiation; }
QString minimalSignature() const;
+ QString minimalRef2PtrSignature() const;
+ QString minimalNoRefNoConstSignature() const;
// true when the type is a QtJambiObject subclass
bool hasNativeId() const;
diff --git a/generator/build_all.txt b/generator/build_all.txt
index e3cbcd6..69e942d 100644
--- a/generator/build_all.txt
+++ b/generator/build_all.txt
@@ -1,13 +1,14 @@
+
+
+
-
-
diff --git a/generator/build_phonon.txt b/generator/build_phonon.txt
deleted file mode 100644
index dc62d2e..0000000
--- a/generator/build_phonon.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/generator/build_printsupport.txt b/generator/build_printsupport.txt
new file mode 100644
index 0000000..9f2023e
--- /dev/null
+++ b/generator/build_printsupport.txt
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/generator/build_webkit.txt b/generator/build_webkit.txt
deleted file mode 100644
index 86696b1..0000000
--- a/generator/build_webkit.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/generator/build_widgets.txt b/generator/build_widgets.txt
new file mode 100644
index 0000000..8b52876
--- /dev/null
+++ b/generator/build_widgets.txt
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/generator/classgenerator.cpp b/generator/classgenerator.cpp
index 98d89fc..52af071 100644
--- a/generator/classgenerator.cpp
+++ b/generator/classgenerator.cpp
@@ -65,18 +65,24 @@ bool ClassGenerator::shouldGenerate(const AbstractMetaClass *meta_class) const
return (cg & TypeEntry::GenerateCode) != 0;
}
-static QString normalizedType(const AbstractMetaType *type)
+static QString normalizedType(QString typeName)
{
- QString str = QString::fromLatin1(QMetaObject::normalizedType(type->cppSignature().toLatin1()));
- if (str.endsWith(QLatin1Char('&')))
- str.chop(1);
- else if (str.startsWith("const ")) {
- if (str.endsWith('*') || type->hasInstantiations() || type->typeEntry()->isValue())
- str.remove(0, 6);
+ if (typeName.endsWith(QLatin1Char('&'))) {
+ typeName.chop(1);
+ }
+ if (!typeName.endsWith(QLatin1Char('*'))) {
+ if (typeName.startsWith("const ")) {
+ typeName.remove(0, 6);
+ }
}
- if (str == QLatin1String("QBool")) // ### hack
- str = QLatin1String("bool");
- return str;
+
+ if (typeName == QLatin1String("QBool")) // ### hack
+ typeName = QLatin1String("bool");
+ return typeName;
+}
+static QString normalizedType(const AbstractMetaType *type)
+{
+ return normalizedType(QMetaObject::normalizedType(type->cppSignature().toLatin1()));
}
/*!
@@ -503,7 +509,7 @@ static void writeFunctionCallAndReturn(QTextStream &stream, const AbstractMetaFu
bool constCastResult = false;
if (retType && !ignoreReturnValue) {
QString rsig = retType->cppSignature();
- QString typeName = normalizedType(retType);
+ QString typeName = retType->minimalSignature();//normalizedType(retType); //
stream << typeName << " _q_result = ";
constCastResult = rsig.endsWith('*') && rsig.startsWith("const ");
if (constCastResult)
@@ -1044,10 +1050,21 @@ static void writeEnumClass(QTextStream &stream, const AbstractMetaClass *meta_cl
void maybeDeclareMetaType(QTextStream &stream, const QString &typeName,
QSet ®isteredTypeNames)
{
- QString name = typeName;
- if (name.endsWith(QLatin1Char('&')))
- name.chop(1);
- if (registeredTypeNames.contains(name) || (QMetaType::type(typeName.toLatin1()) != 0))
+ QString name = normalizedType(typeName);
+ QString nameFootPrint = name;
+
+ nameFootPrint.replace("uint", "unsigned int");
+ nameFootPrint.replace(" ", "");
+ if ((nameFootPrint == QLatin1String("QStringList")) ||
+ (nameFootPrint == QLatin1String("QItemSelection")) ||
+ (nameFootPrint == QLatin1String("QItemSelectionRange")) ||
+ (nameFootPrint == QLatin1String("QList")) ||
+ (nameFootPrint == QLatin1String("QModelIndexList")))
+ {
+ return;
+ }
+
+ if (registeredTypeNames.contains(nameFootPrint) || (QMetaType::type(name.toLatin1()) != 0))
return;
if (name.contains(QLatin1Char(','))) {
// need to expand the Q_DECLARE_METATYPE macro manually,
@@ -1059,15 +1076,15 @@ void maybeDeclareMetaType(QTextStream &stream, const QString &typeName,
<< " static int qt_metatype_id() \\" << endl
<< " { \\" << endl
<< " static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \\" << endl
- << " if (!metatype_id) \\" << endl
- << " metatype_id = qRegisterMetaType< " << name << " >(\"" << name << "\"); \\" << endl
- << " return metatype_id; \\" << endl
+ << " if (!metatype_id.load()) \\" << endl
+ << " metatype_id.store(qRegisterMetaType< " << name << " >(\"" << name << "\")); \\" << endl
+ << " return metatype_id.load(); \\" << endl
<< " } \\" << endl
<< "};" << endl;
} else {
stream << "Q_DECLARE_METATYPE(" << name << ")" << endl;
}
- registeredTypeNames << name;
+ registeredTypeNames << nameFootPrint;
}
/*!
@@ -1082,9 +1099,7 @@ static void declareTypeRecursive(QTextStream &stream, const AbstractMetaType *ty
QList subTypes = type->instantiations();
for (int i = 0; i < subTypes.size(); ++i)
declareTypeRecursive(stream, subTypes.at(i), registeredTypeNames);
- QString typeName = normalizedType(type);
- if (typeName == QLatin1String("QStringList"))
- return; // ### wtf...
+ QString typeName = type->minimalSignature();
maybeDeclareMetaType(stream, typeName, registeredTypeNames);
}
@@ -1111,6 +1126,9 @@ void declareFunctionMetaTypes(QTextStream &stream, const AbstractMetaFunctionLis
} else {
const AbstractMetaArgument *arg = arguments.at(j);
declareTypeRecursive(stream, arg->type(), registeredTypeNames);
+ if (arguments.at(j)->type()->isReference()) {
+ maybeDeclareMetaType(stream, arguments.at(j)->type()->minimalNoRefNoConstSignature(), registeredTypeNames);
+ }
}
}
QString retRepl = fun->typeReplaced(0);
@@ -1484,6 +1502,8 @@ void ClassGenerator::write(QTextStream &stream, const AbstractMetaClass *meta_cl
stream << "#include " << endl;
stream << "#include " << endl;
stream << "#include " << endl;
+
+ stream << "#include <__package_shared.h>" << endl;
stream << endl;
// write class-specific includes
diff --git a/generator/generate.sh b/generator/generate.sh
index c49fbe0..bcc9856 100755
--- a/generator/generate.sh
+++ b/generator/generate.sh
@@ -2,6 +2,12 @@ xsltproc --stringparam source $PWD/typesystem_core-qtscript.xml merge.xsl typesy
xsltproc --stringparam source $PWD/typesystem_gui-qtscript.xml merge.xsl typesystem_gui-common.xml > typesystem_gui.xml
+xsltproc --stringparam source $PWD/typesystem_widgets-qtscript.xml merge.xsl typesystem_widgets-common.xml > typesystem_widgets.xml
+
+xsltproc --stringparam source $PWD/typesystem_multimedia-qtscript.xml merge.xsl typesystem_multimedia-common.xml > typesystem_multimedia.xml
+
+xsltproc --stringparam source $PWD/typesystem_printsupport-qtscript.xml merge.xsl typesystem_printsupport-common.xml > typesystem_printsupport.xml
+
xsltproc --stringparam source $PWD/typesystem_svg-qtscript.xml merge.xsl typesystem_svg-common.xml > typesystem_svg.xml
xsltproc --stringparam source $PWD/typesystem_network-qtscript.xml merge.xsl typesystem_network-common.xml > typesystem_network.xml
@@ -12,10 +18,6 @@ xsltproc --stringparam source $PWD/typesystem_xml-qtscript.xml merge.xsl typesys
xsltproc --stringparam source $PWD/typesystem_sql-qtscript.xml merge.xsl typesystem_sql-common.xml > typesystem_sql.xml
-xsltproc --stringparam source $PWD/typesystem_phonon-qtscript.xml merge.xsl typesystem_phonon-common.xml > typesystem_phonon.xml
-
-xsltproc --stringparam source $PWD/typesystem_webkit-qtscript.xml merge.xsl typesystem_webkit-common.xml > typesystem_webkit.xml
-
xsltproc --stringparam source $PWD/typesystem_xmlpatterns-qtscript.xml merge.xsl typesystem_xmlpatterns-common.xml > typesystem_xmlpatterns.xml
# ./generator qtscript_masterinclude.h typesystem_core.xml --diff
diff --git a/generator/generator.pri b/generator/generator.pri
index c8a651a..5fdd927 100644
--- a/generator/generator.pri
+++ b/generator/generator.pri
@@ -38,9 +38,6 @@ HEADERS += \
$$GENERATORPATH/abstractmetalang.h \
$$GENERATORPATH/prigenerator.h \
-
-
-
SOURCES += \
$$GENERATORPATH/generator.cpp \
$$GENERATORPATH/main.cpp \
@@ -56,8 +53,6 @@ SOURCES += \
$$GENERATORPATH/abstractmetalang.cpp \
$$GENERATORPATH/prigenerator.cpp \
-
-
QT = core xml
win32-msvc.net {
diff --git a/generator/generator.pro b/generator/generator.pro
index 6eac5ac..e8ecd42 100644
--- a/generator/generator.pro
+++ b/generator/generator.pro
@@ -10,8 +10,9 @@ HEADERS += \
shellimplgenerator.h \
shellheadergenerator.h \
setupgenerator.h \
- docgenerator.h
-
+ docgenerator.h \
+ jsxgenerator.h
+
SOURCES += \
generatorsetqtscript.cpp \
metaqtscriptbuilder.cpp \
@@ -21,7 +22,8 @@ SOURCES += \
shellimplgenerator.cpp \
shellheadergenerator.cpp \
setupgenerator.cpp \
- docgenerator.cpp
+ docgenerator.cpp \
+ jsxgenerator.cpp
CONFIG -= debug
CONFIG += release
diff --git a/generator/generator.qrc b/generator/generator.qrc
index 77d1b3c..58ccdc5 100644
--- a/generator/generator.qrc
+++ b/generator/generator.qrc
@@ -4,14 +4,16 @@
build_all.txt
typesystem_core.xml
typesystem_gui.xml
+typesystem_widgets.xml
+typesystem_multimedia.xml
+typesystem_printsupport.xml
typesystem_sql.xml
typesystem_opengl.xml
typesystem_svg.xml
typesystem_network.xml
typesystem_xml.xml
-typesystem_phonon.xml
-typesystem_webkit.xml
typesystem_xmlpatterns.xml
+typesystem_uitools.xml
parser/rpp/pp-qt-configuration
diff --git a/generator/generatorsetqtscript.cpp b/generator/generatorsetqtscript.cpp
index 217a5ca..464b7f4 100644
--- a/generator/generatorsetqtscript.cpp
+++ b/generator/generatorsetqtscript.cpp
@@ -45,12 +45,13 @@
#include "shellheadergenerator.h"
#include "shellimplgenerator.h"
#include "docgenerator.h"
+#include "jsxgenerator.h"
GeneratorSet *GeneratorSet::getInstance() {
return new GeneratorSetQtScript();
}
-GeneratorSetQtScript::GeneratorSetQtScript()
+GeneratorSetQtScript::GeneratorSetQtScript()
{}
QString GeneratorSetQtScript::usage() {
@@ -80,6 +81,7 @@ QString GeneratorSetQtScript::generate() {
AbstractMetaClassList classes = builder.classesTopologicalSorted();
QSet declaredTypeNames = builder.qtMetaTypeDeclaredTypeNames();
+ /* Generate C++ */
PriGenerator priGenerator;
priGenerator.setOutputDirectory(outDir);
@@ -104,11 +106,18 @@ QString GeneratorSetQtScript::generate() {
shellHeaderGenerator.setClasses(classes);
shellHeaderGenerator.generate();
+ /* Generate Document */
DocGenerator docGenerator;
docGenerator.setOutputDirectory(outDir);
docGenerator.setClasses(classes);
docGenerator.generate();
+ /* Generate JSX */
+ JSXGenerator jsxGenerator;
+ jsxGenerator.setOutputDirectory(outDir);
+ jsxGenerator.setClasses(classes);
+ jsxGenerator.generate();
+
priGenerator.generate();
setupGenerator.generate();
@@ -120,7 +129,6 @@ QString GeneratorSetQtScript::generate() {
" - modules...: %8 (%9)\n"
" - pri.......: %10 (%11)\n"
)
- .arg(builder.classes().size())
.arg(classGenerator.numGenerated())
.arg(classGenerator.numGeneratedAndWritten())
diff --git a/generator/jsxgenerator.cpp b/generator/jsxgenerator.cpp
new file mode 100644
index 0000000..4dee247
--- /dev/null
+++ b/generator/jsxgenerator.cpp
@@ -0,0 +1,1065 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Script Generator project on Qt Labs.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "jsxgenerator.h"
+#include "fileout.h"
+#include
+
+QList uniqueEnumValueIndexes(const AbstractMetaEnumValueList &values);
+
+JSXGenerator::JSXGenerator()
+{
+ _ignoreFileList.insert("long");
+ _ignoreFileList.insert("intlist");
+ _ignoreFileList.insert("qhttpresponseheader");
+ _ignoreFileList.insert("qstring");
+ _ignoreFileList.insert("qlist");
+ _ignoreFileList.insert("qstringlist");
+ _ignoreFileList.insert("qvariant");
+ _ignoreFileList.insert("qnoimplicitboolcast");
+ _ignoreFileList.insert("qvarlengtharray");
+ _ignoreFileList.insert("qpair");
+ _ignoreFileList.insert("qvector");
+ _ignoreFileList.insert("qtconcurrentreducekernel");
+ _ignoreFileList.insert("qtconcurrentthreadengine");
+ _ignoreFileList.insert("qgenericmatrix");
+ _ignoreFileList.insert("qabstracttextdocumentlayout");
+ _ignoreFileList.insert("qprinterinfo");
+ _ignoreFileList.insert("qtextoption");
+ _ignoreFileList.insert("qcoreevent");
+
+ addRelatedFile("qrect", "qrectf");
+ addRelatedFile("qpoint", "qpointf");
+ addRelatedFile("qsize", "qsizef");
+ addRelatedFile("qline", "qlinef");
+ addRelatedFile("qpolygon", "qpolygonf");
+}
+
+QString JSXGenerator::fileNameForClass(const AbstractMetaClass *meta_class) const
+{
+ return QString::fromLatin1("%0.jsx").arg(meta_class->name().toLower());
+}
+
+QString JSXGenerator::subDirectoryForClass(const AbstractMetaClass*) const
+{
+ return "jsx/qt/";
+}
+
+static void writeSourceHeader(QTextStream &s, const QString &title)
+{
+ s << "/*" << endl
+ << " * JSX wrapper code generated by JSXgenerator." << endl
+ << " *" << endl
+ << " * " << title << endl
+ << " *" << endl
+ << " * Note: DO NOT EDIT THIS FILE" << endl
+ << " */" << endl;
+}
+
+void JSXGenerator::addRelatedFile(QString target, QString relatedfile)
+{
+ if (_relatedFileList.contains(target))
+ {
+ _relatedFileList.value(target)->append(relatedfile);
+ }
+ else
+ {
+ QStringList* list = new QStringList;
+ list->append(relatedfile);
+ _relatedFileList[target] = list;
+ }
+}
+
+static bool classLessThan(const AbstractMetaClass *c1, const AbstractMetaClass *c2)
+{
+ return c1->name() < c2->name();
+}
+
+static void writeInclude(QTextStream &stream, const QString filename)
+{
+ stream << "import \"qt/" << filename << ".jsx\";" << endl;
+}
+
+static void addIncludeFile(QSet &includes, QString name)
+{
+ if (name.endsWith("[]"))
+ {
+ name.chop(2);
+ }
+ switch (name.count("_"))
+ {
+ case 0:
+ includes.insert(name.toLower());
+ break;
+ case 1:
+ if (name.startsWith("Qt_"))
+ {
+ includes.insert("qt");
+ }
+ else
+ {
+ includes.insert(name.toLower());
+ }
+ break;
+ case 2:
+ if (name.startsWith("Qt_"))
+ {
+ name.remove(0, 3);
+ includes.insert(name.left(name.indexOf("_")).toLower());
+ }
+ break;
+ }
+}
+
+bool JSXGenerator::shouldGenerate(const AbstractMetaClass *meta_class) const
+{
+ uint cg = meta_class->typeEntry()->codeGeneration();
+ return (cg & TypeEntry::GenerateCode) != 0;
+}
+
+void JSXGenerator::generate()
+{
+ Generator::generate();
+
+ QHash > packHash;
+ for (int i = 0; i < m_classes.size(); ++i) {
+ const AbstractMetaClass *cls = m_classes.at(i);
+ if (shouldGenerate(cls))
+ {
+ packHash[cls->package()].append(cls);
+ }
+ }
+ {
+ // package pages
+ QHash >::const_iterator it;
+ for (it = packHash.constBegin(); it != packHash.constEnd(); ++it) {
+ QString package = it.key();
+ QList classesInPackage = it.value();
+ qSort(classesInPackage.begin(), classesInPackage.end(), classLessThan);
+
+ QString packageName = QStringList(package.split(".").mid(2)).join("_");
+ FileOut file(m_out_dir + "/jsx/" + packageName + ".jsx");
+
+ writeSourceHeader(file.stream, package + " Package");
+
+ for (int i = 0; i < classesInPackage.size(); ++i) {
+ const AbstractMetaClass *cls = classesInPackage.at(i);
+ if (cls->name() == "Global")
+ continue; /// ### fixme
+ QString fileName = fileNameForClass(cls);
+ file.stream << "import \"qt/" << fileName << "\"; // " << cls->name() << endl;
+ }
+ }
+ }
+
+ {
+ // signal page
+ FileOut file(m_out_dir + "/jsx/qt/_signals.jsx");
+ writeSourceHeader(file.stream, "Signals");
+
+ writeInclude(file.stream, "qabstractanimation");
+ writeInclude(file.stream, "qabstractbutton");
+ writeInclude(file.stream, "qabstractitemdelegate");
+ writeInclude(file.stream, "qabstractsocket");
+ writeInclude(file.stream, "qaction");
+ writeInclude(file.stream, "qbrush");
+ writeInclude(file.stream, "qcolor");
+ writeInclude(file.stream, "qclipboard");
+ writeInclude(file.stream, "qdoublevalidator");
+ writeInclude(file.stream, "qdate");
+ writeInclude(file.stream, "qdockwidget");
+ writeInclude(file.stream, "qfont");
+ writeInclude(file.stream, "qgraphicsitem");
+ writeInclude(file.stream, "qgraphicsblureffect");
+ writeInclude(file.stream, "qheaderview");
+ writeInclude(file.stream, "qicon");
+ writeInclude(file.stream, "qimagereader");
+ writeInclude(file.stream, "qitemselection");
+ writeInclude(file.stream, "qlistwidgetitem");
+ writeInclude(file.stream, "qlocalsocket");
+ writeInclude(file.stream, "qmdisubwindow");
+ writeInclude(file.stream, "qmodelindex");
+ writeInclude(file.stream, "qmovie");
+ writeInclude(file.stream, "qnetworkproxy");
+ writeInclude(file.stream, "qauthenticator");
+ writeInclude(file.stream, "qnetworkaccessmanager");
+ writeInclude(file.stream, "qnetworkreply");
+ writeInclude(file.stream, "qnetworkrequest");
+ writeInclude(file.stream, "qobject");
+ writeInclude(file.stream, "qpoint");
+ writeInclude(file.stream, "qpointf");
+ writeInclude(file.stream, "qprinter");
+ writeInclude(file.stream, "qprocess");
+ writeInclude(file.stream, "qrect");
+ writeInclude(file.stream, "qrectf");
+ writeInclude(file.stream, "qsessionmanager");
+ writeInclude(file.stream, "qsize");
+ writeInclude(file.stream, "qsqlrecord");
+ writeInclude(file.stream, "qsslerror");
+ writeInclude(file.stream, "qsslsocket");
+ writeInclude(file.stream, "qstandarditem");
+ writeInclude(file.stream, "qsystemtrayicon");
+ writeInclude(file.stream, "qtablewidgetitem");
+ writeInclude(file.stream, "qtextcharformat");
+ writeInclude(file.stream, "qtextcursor");
+ writeInclude(file.stream, "qtime");
+ writeInclude(file.stream, "qtimeline");
+ writeInclude(file.stream, "qtreewidgetitem");
+ writeInclude(file.stream, "qundostack");
+ writeInclude(file.stream, "qurl");
+ writeInclude(file.stream, "qwebframe");
+ writeInclude(file.stream, "qwidget");
+ writeInclude(file.stream, "qt");
+
+ QMap::const_iterator it;
+ for (it = _signals.constBegin(); it != _signals.constEnd(); ++it) {
+ file.stream << "native __fake__ class QtJSX" << it.key() << "Signal {" << endl
+ << " function connect(callback : ("
+ << it.value() << ") -> void): void;" << endl
+ << " function disconnect(callback : ("
+ << it.value() << ") -> void): void;" << endl
+ << "}" << endl << endl;
+ }
+ }
+
+ {
+ // hub file
+ FileOut file(m_out_dir + "/jsx/qt/qdom.jsx");
+ writeSourceHeader(file.stream, "QXML DOM Objects");
+ writeInclude(file.stream, "qdomattr");
+ writeInclude(file.stream, "qdomnode");
+ writeInclude(file.stream, "qdomcharacterdata");
+ writeInclude(file.stream, "qdomcomment");
+ writeInclude(file.stream, "qdomdocument");
+ writeInclude(file.stream, "qdomdocumentfragment");
+ writeInclude(file.stream, "qdomdocumenttype");
+ writeInclude(file.stream, "qdomelement");
+ writeInclude(file.stream, "qdomentityreference");
+ writeInclude(file.stream, "qdomimplementation");
+ writeInclude(file.stream, "qdomnamednodemap");
+ writeInclude(file.stream, "qdomnodelist");
+ writeInclude(file.stream, "qdomprocessinginstruction");
+ writeInclude(file.stream, "qdomtext");
+ }
+
+ {
+ // hub file
+ FileOut file(m_out_dir + "/jsx/qt/qxml.jsx");
+ writeSourceHeader(file.stream, "QXML SAX Objects");
+ writeInclude(file.stream, "qxmlattributes");
+ writeInclude(file.stream, "qxmlcontenthandler");
+ writeInclude(file.stream, "qxmldeclhandler");
+ writeInclude(file.stream, "qxmldtdhandler");
+ writeInclude(file.stream, "qxmlentityresolver");
+ writeInclude(file.stream, "qxmlerrorhandler");
+ writeInclude(file.stream, "qxmlinputsource");
+ writeInclude(file.stream, "qxmllexicalhandler");
+ }
+
+ {
+ // hub file
+ FileOut file(m_out_dir + "/jsx/qt/qxmlstream.jsx");
+ writeSourceHeader(file.stream, "QXML Stream Objects");
+ writeInclude(file.stream, "qxmlstreamattribute");
+ writeInclude(file.stream, "qxmlstreamattributes");
+ writeInclude(file.stream, "qxmlstreamentityresolver");
+ writeInclude(file.stream, "qxmlstreamreader");
+ writeInclude(file.stream, "qxmlstreamentitydeclaration");
+ writeInclude(file.stream, "qxmlstreamnamespacedeclaration");
+ writeInclude(file.stream, "qxmlstreamnotationdeclaration");
+ }
+
+ {
+ // hub file
+ FileOut file(m_out_dir + "/jsx/qt/qgl.jsx");
+ writeSourceHeader(file.stream, "QOpenGL Objects");
+ writeInclude(file.stream, "qglcontext");
+ writeInclude(file.stream, "qglshader");
+ }
+
+ {
+ // hub file
+ FileOut file(m_out_dir + "/jsx/qt/qvariant.jsx");
+ writeSourceHeader(file.stream, "QVariant class");
+ file.stream << endl
+ << "native __fake__ class Qt_QVariant_Type {}" << endl
+ << "native class QVariant {" << endl
+ << " static const Invalid : Qt_QVariant_Type;" << endl
+ << " static const BitArray : Qt_QVariant_Type;" << endl
+ << " static const Bitmap : Qt_QVariant_Type;" << endl
+ << " static const Bool : Qt_QVariant_Type;" << endl
+ << " static const Brush : Qt_QVariant_Type;" << endl
+ << " static const ByteArray : Qt_QVariant_Type;" << endl
+ << " static const Char : Qt_QVariant_Type;" << endl
+ << " static const Color : Qt_QVariant_Type;" << endl
+ << " static const Cursor : Qt_QVariant_Type;" << endl
+ << " static const Date : Qt_QVariant_Type;" << endl
+ << " static const DateTime : Qt_QVariant_Type;" << endl
+ << " static const Double : Qt_QVariant_Type;" << endl
+ << " static const EasingCurve : Qt_QVariant_Type;" << endl
+ << " static const Font : Qt_QVariant_Type;" << endl
+ << " static const Hash : Qt_QVariant_Type;" << endl
+ << " static const Icon : Qt_QVariant_Type;" << endl
+ << " static const Image : Qt_QVariant_Type;" << endl
+ << " static const Int : Qt_QVariant_Type;" << endl
+ << " static const KeySequence : Qt_QVariant_Type;" << endl
+ << " static const Line : Qt_QVariant_Type;" << endl
+ << " static const LineF : Qt_QVariant_Type;" << endl
+ << " static const List : Qt_QVariant_Type;" << endl
+ << " static const Locale : Qt_QVariant_Type;" << endl
+ << " static const LongLong : Qt_QVariant_Type;" << endl
+ << " static const Map : Qt_QVariant_Type;" << endl
+ << " static const Matrix : Qt_QVariant_Type;" << endl
+ << " static const Transform : Qt_QVariant_Type;" << endl
+ << " static const Matrix4x4 : Qt_QVariant_Type;" << endl
+ << " static const Palette : Qt_QVariant_Type;" << endl
+ << " static const Pen : Qt_QVariant_Type;" << endl
+ << " static const Pixmap : Qt_QVariant_Type;" << endl
+ << " static const Point : Qt_QVariant_Type;" << endl
+ << " static const PointArray : Qt_QVariant_Type;" << endl
+ << " static const PointF : Qt_QVariant_Type;" << endl
+ << " static const Polygon : Qt_QVariant_Type;" << endl
+ << " static const Quaternion : Qt_QVariant_Type;" << endl
+ << " static const Rect : Qt_QVariant_Type;" << endl
+ << " static const RectF : Qt_QVariant_Type;" << endl
+ << " static const RegExp : Qt_QVariant_Type;" << endl
+ << " static const Region : Qt_QVariant_Type;" << endl
+ << " static const Size : Qt_QVariant_Type;" << endl
+ << " static const SizeF : Qt_QVariant_Type;" << endl
+ << " static const SizePolicy : Qt_QVariant_Type;" << endl
+ << " static const String : Qt_QVariant_Type;" << endl
+ << " static const StringList : Qt_QVariant_Type;" << endl
+ << " static const TextFormat : Qt_QVariant_Type;" << endl
+ << " static const TextLength : Qt_QVariant_Type;" << endl
+ << " static const Time : Qt_QVariant_Type;" << endl
+ << " static const UInt : Qt_QVariant_Type;" << endl
+ << " static const ULongLong : Qt_QVariant_Type;" << endl
+ << " static const Url : Qt_QVariant_Type;" << endl
+ << " static const Vector2D : Qt_QVariant_Type;" << endl
+ << " static const Vector3D : Qt_QVariant_Type;" << endl
+ << " static const Vector4D : Qt_QVariant_Type;" << endl
+ << " static const UserType : Qt_QVariant_Type;" << endl
+ << "}" << endl;
+ }
+}
+
+static bool shouldIgnoreEnum(const AbstractMetaEnum *enom)
+{
+ return !enom->wasPublic() || (enom->name() == "enum_1");
+}
+
+static bool skipType(QString& type)
+{
+ return (type.contains("QPair") || type.contains("QMap") ||
+ type.contains("QHash") || type.contains("QSet") ||
+ type.contains("QMultiMap") || type == "QGLFormat" ||
+ type.contains("QWebHistory") || type == "QAbstractFileEngine" ||
+ type == "QThread" || type == "QInputMethodEvent" || type == "WId" ||
+ type == "quintptr" || type == "QPrinterInfo" || type == "QGraphicsEffectSource" ||
+ type == "QIconEngineV2" || type.contains("QTextOption") ||
+ type.contains("QAbstractTextDocumentLayout") || type.contains("QGraphicsItem_Extension") ||
+ type == "Qt_HANDLE" || type.startsWith("QWebPluginFactory") ||
+ type.endsWith("iterator") || type == "Qt_QAbstractItemView_CursorAction" ||
+ type == "Qt_QAbstractSlider_SliderChange" || type.startsWith("Qt_QTextLayout_FormatRange") ||
+ type == "Qt_QPainterPath_Element" || type == "Qt_QTextCodec_ConverterState" ||
+ type == "Qt_QAbstractItemView_DropIndicatorPosition" || type == "Qt_QAbstractItemView_State" ||
+ type == "QAbstractProxyModel" || type == "Qt_QFontDatabase_WritingSystem" ||
+ type == "Qt_QTextEdit_ExtraSelection[]" || type == "Qt_QSqlResult_BindingSyntax");
+}
+
+static bool skipMethod(const AbstractMetaClass* meta_class, const AbstractMetaFunction* func)
+{
+ QString classname = meta_class->name();
+ QString methodname = func->modifiedName();
+ if (classname == "QWidget")
+ {
+ return (methodname == "windowOpacity" || methodname == "setWindowOpacity");
+ }
+ else if (classname == "QAbstractSocket" || classname == "QProcess" || classname == "QNetworkReply" || classname == "QLocalSocket")
+ {
+ return (methodname == "error");
+ }
+ else if (classname == "QDockWidget")
+ {
+ return (methodname == "allowedAreas" || methodname == "setAllowedAreas");
+ }
+ else if (classname == "QSslSocket")
+ {
+ return (methodname == "sslErrors");
+ }
+ else if (classname == "QSvgGenerator" || classname == "QSvgRenderer")
+ {
+ return (methodname == "viewBox" || methodname == "setViewBox");
+ }
+ else if (classname == "QByteArray")
+ {
+ return (methodname == "replace" && func->arguments().at(0)->argumentName() == "c");
+ }
+ else if (classname == "QFontMetrics")
+ {
+ return (methodname == "boundingRect" && func->arguments().at(0)->argumentName() == "arg__1");
+ }
+ else if (classname == "QFontMetricsF")
+ {
+ if (methodname == "boundingRect" || methodname == "width")
+ {
+ return (func->arguments().at(0)->argumentName() == "arg__1");
+ }
+ }
+ else if (methodname == "minimumSizeHint" || methodname == "sizeHint")
+ {
+ return (classname != "QWidget");
+ }
+ else if (methodname == "spacing")
+ {
+ return (classname == "QBoxLayout" || classname == "QGridLayout" || classname == "QFormLayout");
+ }
+ return (methodname == "toString");
+}
+
+static bool skipProperty(const AbstractMetaClass* meta_class, const QPropertySpec *prop)
+{
+ QString classname = meta_class->name();
+ QString propname = prop->name();
+ if (propname == "duration")
+ {
+ return (classname == "QPauseAnimation" || classname == "QVariantAnimation");
+ }
+ else if (classname == "QDockWidget")
+ {
+ return (propname == "windowTitle");
+ }
+ else if (classname == "QDialog")
+ {
+ return (propname == "modal");
+ }
+ else if (classname == "QPrintDialog")
+ {
+ return (propname == "accepted");
+ }
+ else if (classname == "QCommandLinkButton")
+ {
+ return (propname == "flat");
+ }
+ else if (classname == "VideoWidget")
+ {
+ return (propname == "fullScreen");
+ }
+ return false;
+}
+
+void filterFunctions(
+ const AbstractMetaClass *meta_class,
+ QMap &prototypeFunctions,
+ QMap &staticFunctions,
+ QMap &signalFunctions,
+ QMap &slotFunctions
+ )
+{
+ AbstractMetaFunctionList functions = meta_class->functionsInTargetLang() + meta_class->cppSignalFunctions();
+ for (int i = 0; i < functions.size(); ++i) {
+ AbstractMetaFunction* func = functions.at(i);
+ if (func->declaringClass() != meta_class)
+ continue; // function inherited through prototype
+ if (func->isSignal())
+ {
+ signalFunctions[func->originalName()].append(func);
+ continue;
+ }
+ if (!func->isNormal())
+ continue;
+#ifdef GENERATOR_NO_PROTECTED_FUNCTIONS
+ if (func->wasProtected())
+ continue;
+#endif
+ if (func->isPropertyReader() || func->isPropertyWriter())
+ continue; // no point in including property accessors
+ //if (func->isInvokable())
+ // continue; // no point in including signals and slots
+ else if (func->isSlot())
+ {
+ slotFunctions[func->modifiedName()].append(func);
+ }
+ else if (func->isStatic())
+ {
+ staticFunctions[func->modifiedName()].append(func);
+ }
+ else
+ {
+ prototypeFunctions[func->modifiedName()].append(func);
+ }
+ }
+}
+
+static QString normalizedType(QString str, bool forArg = true)
+{
+ if (str.contains("char*"))
+ {
+ str = "string";
+ }
+ else if (str.endsWith("**"))
+ {
+ str.chop(2);
+ str = str + "[]";
+ }
+ else if (str.endsWith("*"))
+ {
+ str.chop(1);
+ }
+ if (str.startsWith("QList<"))
+ {
+ str.remove(0, 6);
+ str = str.left(str.lastIndexOf(">")).trimmed();
+ if (str.endsWith("*"))
+ {
+ str.chop(1);
+ }
+ str = str + (forArg ? "[]" : "List");
+ }
+ else if (str.startsWith("QVector<"))
+ {
+ str.remove(0, 8);
+ str = str.left(str.lastIndexOf(">")).trimmed();
+ if (str.endsWith("*"))
+ {
+ str.chop(1);
+ }
+ str = str + (forArg ? "[]" : "List");
+ }
+ else if (str.startsWith("QFlags<"))
+ {
+ str.remove(0, 7);
+ str = str.left(str.lastIndexOf(">")).trimmed();
+ if (str == "Qt::WindowType")
+ {
+ str = "Qt::WindowFlags";
+ }
+ else if (str.endsWith("ty"))
+ {
+ str.chop(1);
+ str = str + "ies";
+ }
+ else
+ {
+ str = str + "s";
+ }
+ }
+ if (str.contains("::"))
+ {
+ str = str.replace("::", "_");
+ if (!str.startsWith("Qt_"))
+ {
+ str.insert(0, "Qt_");
+ }
+ }
+ else if (str == QLatin1String("QBool")) // ### hack
+ str = QLatin1String("boolean");
+ return str;
+}
+
+static QString normalizedType(const AbstractMetaType *type, bool forArg = true)
+{
+ QString str = QString::fromLatin1(QMetaObject::normalizedType(type->cppSignature().toLatin1()));
+ if (str.endsWith(QLatin1Char('&')))
+ str.chop(1);
+ else if (str.startsWith("const ")) {
+ if (str.endsWith('*') || type->hasInstantiations() || type->typeEntry()->isValue())
+ str.remove(0, 6);
+ }
+ return normalizedType(str, forArg);
+}
+
+static void writeFunction(QTextStream &o, const AbstractMetaFunction *fun, QMap &nativeTypes, QSet &existingMethods, QSet& includes, bool isStatic = false)
+{
+ QMap keywords;
+ keywords["in"] = "in_";
+ keywords["var"] = "var_";
+
+ QTextStream s("", QIODevice::ReadWrite);
+ if (isStatic)
+ {
+ s << " static function ";
+ }
+ else
+ {
+ s << " function ";
+ }
+
+ // Attributes...
+
+ if (fun->isConstructor())
+ {
+ s << "constructor";
+ }
+ else
+ {
+ s << fun->modifiedName();
+ }
+ s << " (";
+
+ int j = 0;
+ for (int i=0; i< fun->arguments().size(); ++i) {
+ if (fun->argumentRemoved(i+1))
+ continue;
+ if (j != 0) {
+ s << "," << QLatin1Char(' ');
+ }
+ QString type = normalizedType(fun->arguments().at(i)->type());
+ // QtScript binding can't treat QPair
+ if (skipType(type))
+ {
+ return;
+ }
+ QString varname = fun->arguments().at(i)->argumentName();
+ QString finaltype = nativeTypes.value(type, type);
+ s << keywords.value(varname, varname) << " : " << finaltype;
+ addIncludeFile(includes, finaltype);
+ ++j;
+ }
+ if (fun->isConstructor())
+ {
+ s << ");" << endl;
+ }
+ else
+ {
+ s << ") : ";
+ // Return type
+ if (fun->type()) {
+ QString sig = normalizedType(fun->type());
+ // QtScript binding can't treat QPair
+ if (skipType(sig))
+ {
+ return;
+ }
+ QString finalsig = nativeTypes.value(sig, sig);
+ s << finalsig << ";" << endl;
+ addIncludeFile(includes, finalsig);
+ } else {
+ s << "void;" << endl;
+ }
+ }
+ s.seek(0);
+ QString definition = s.readAll();
+ if (!existingMethods.contains(definition))
+ {
+ o << definition;
+ existingMethods.insert(definition);
+ }
+}
+
+static void writeSignal(QTextStream &s, const AbstractMetaClass *meta_class, const AbstractMetaFunctionList &funs, QMap &nativeTypes, QMap &signalFunctions, QSet &includes, QStringList &signalAliases)
+{
+ AbstractMetaFunction* shortestfun = 0;
+ int length = 10000;
+ QString signalNameString;
+ QString signalArgsString;
+ AbstractMetaFunctionList::const_iterator it;
+ for (it = funs.constBegin(); it != funs.constEnd(); ++it) {
+ AbstractMetaFunction* fun = *it;
+ QTextStream signalName("", QIODevice::ReadWrite);
+ QTextStream signalArgs("", QIODevice::ReadWrite);
+ int j = 0;
+ for (int i=0; i< fun->arguments().size(); ++i) {
+ if (fun->argumentRemoved(i+1))
+ continue;
+ if (j != 0) {
+ signalArgs << "," << QLatin1Char(' ');
+ }
+ QString type = normalizedType(fun->arguments().at(i)->type(), false);
+ // QtScript binding can't treat QPair
+ if (skipType(type))
+ {
+ return;
+ }
+ QString name = type;
+ signalName << name.replace(' ', '_');
+ QString finaltype = nativeTypes.value(type, type);
+ signalArgs << finaltype;
+ addIncludeFile(includes, finaltype);
+ ++j;
+ }
+ signalName.seek(0);
+ QString tmpSignalNameString = signalName.readAll();
+ if (tmpSignalNameString.length() < length)
+ {
+ signalNameString = tmpSignalNameString;
+ signalArgs.seek(0);
+ signalArgsString = signalArgs.readAll();
+ shortestfun = fun;
+ }
+ }
+ if (shortestfun)
+ {
+ // JSX can't override property! Now this genertor ignores these properties!
+ if (meta_class->name() == "QPrintDialog" && shortestfun->originalName() == "accepted")
+ {
+ return;
+ }
+ s << " var " << shortestfun->originalName();
+ s << " : QtJSX";
+ s << signalNameString << "Signal;" << endl;
+ if (!signalFunctions.contains(signalNameString))
+ {
+ signalFunctions[signalNameString] = signalArgsString;
+ }
+ if (funs.length() > 1 && shortestfun->arguments().size() == 1)
+ {
+ QTextStream alias("", QIODevice::ReadWrite);
+ alias << meta_class->name() << ".prototype." << shortestfun->originalName() << " = "
+ << meta_class->name() << ".prototype['" << shortestfun->originalName() << "("
+ << normalizedType(shortestfun->arguments().at(0)->type(), false) << ")'];";
+ alias.seek(0);
+ signalAliases.append(alias.readAll());
+ }
+ }
+}
+
+static void writeProperty(QTextStream &s, const AbstractMetaClass *meta_class, const QPropertySpec *prop, QMap &nativeTypes, QSet &includes)
+{
+ QString typeName = normalizedType(prop->type()->name());
+ QString propName = prop->name();
+ QString className = meta_class->name();
+ if (className == "QGraphicsObject")
+ {
+ // JSX can't override property! Now this genertor ignores these properties!
+ if (propName == "*")
+ {
+ propName = "parent";
+ return;
+ }
+ else if (propName == "*effect")
+ {
+ propName = "effect";
+ }
+ }
+ else if (className == "QAbstractTransition" && propName == "targetStates")
+ {
+ typeName = "QAbstractAnimation[]";
+ }
+ else if (className == "QObject" && propName == "parent")
+ {
+ // JSX can't override property! Now this genertor ignores these properties!
+ typeName = "variant";
+ }
+ QString finalTypeName = nativeTypes.value(typeName, typeName);
+ if (skipType(finalTypeName))
+ {
+ return;
+ }
+ s << " var " << propName << " : " << finalTypeName << ";" << endl;
+ addIncludeFile(includes, finalTypeName);
+}
+
+void JSXGenerator::write(QTextStream &o, const AbstractMetaClass *meta_class)
+{
+ QMap nativeTypes;
+ nativeTypes["QDateTime"] = "Date";
+ nativeTypes["QString"] = "string";
+ nativeTypes["QStringRef"] = "string";
+ nativeTypes["QChar"] = "string";
+ nativeTypes["char"] = "string";
+ nativeTypes["intList"] = "int[]";
+ nativeTypes["unsigned char"] = "int";
+ nativeTypes["signed int"] = "int";
+ nativeTypes["signed short"] = "int";
+ nativeTypes["unsigned short"] = "int";
+ nativeTypes["uchar"] = "int";
+ nativeTypes["ushort"] = "int";
+ nativeTypes["ulong"] = "int";
+ nativeTypes["long"] = "int";
+ nativeTypes["short"] = "int";
+ nativeTypes["uint"] = "int";
+ nativeTypes["uint[]"] = "int[]";
+ nativeTypes["qint64"] = "number";
+ nativeTypes["unsigned long long"] = "number";
+ nativeTypes["qlonglong"] = "number";
+ nativeTypes["qulonglong"] = "number";
+ nativeTypes["qreal"] = "number";
+ nativeTypes["qreal[]"] = "number[]";
+ nativeTypes["float"] = "number";
+ nativeTypes["double"] = "number";
+ nativeTypes["bool"] = "boolean";
+ nativeTypes["QStringList"] = "string[]";
+ nativeTypes["QRegExp"] = "RegExp";
+ nativeTypes["QVariant"] = "variant";
+ nativeTypes["QVariant[]"] = "variant[]";
+ nativeTypes["void"] = "variant";
+ nativeTypes["QUrlList"] = "QUrl[]";
+ nativeTypes["QRectFList"] = "QRectF[]";
+ nativeTypes["QSslErrorList"] = "QSslError[]";
+ nativeTypes["QModelIndexList"] = "QModelIndex[]";
+ nativeTypes["Qt_AlignmentFlags"] = "Qt_Alignment";
+ nativeTypes["Qt_QAccessible_StateFlags"] = "Qt_QAccessible_State";
+ nativeTypes["Qt_QAccessible_RelationFlags"] = "Qt_QAccessible_Relation";
+ nativeTypes["Qt_QGraphicsView_CacheModeFlags"] = "Qt_QGraphicsView_CacheMode";
+ nativeTypes["Qt_QAbstractSpinBox_StepEnabledFlags"] = "Qt_QAbstractSpinBox_StepEnabled";
+ nativeTypes["Qt_QTextEdit_AutoFormattingFlags"] = "Qt_QTextEdit_AutoFormatting";
+ nativeTypes["Qt_QUdpSocket_BindFlags"] = "Qt_QUdpSocket_BindMode";
+ nativeTypes["Qt_QGLShader_ShaderTypeBits"] = "Qt_QGLShader_ShaderType";
+ nativeTypes["Qt_QIODevice_OpenModeFlags"] = "Qt_QIODevice_OpenMode";
+ nativeTypes["Qt_QWebPage_ExtensionOption"] = "QWebPage_ExtensionOption";
+ nativeTypes["Qt_QWebPage_ExtensionReturn"] = "QWebPage_ExtensionReturn";
+ nativeTypes["Qt_QWebPluginFactory_MimeType"] = "QWebPluginFactory_MimeType";
+ nativeTypes["Qt_QWebPluginFactory_ExtensionOption"] = "QWebPluginFactory_ExtensionOption";
+ nativeTypes["Qt_QWebPluginFactory_ExtensionReturn"] = "QWebPluginFactory_ExtensionReturn";
+ nativeTypes["Qt_QWebPluginFactory_Plugin[]"] = "QWebPluginFactory_Plugin[]";
+ nativeTypes["Qt_QSql_ParamTypeFlags"] = "Qt_QSql_ParamType";
+ nativeTypes["QtMsgType"] = "Qt_Global_QtMsgType";
+ nativeTypes["Qt_QTouchEvent_TouchPoint"] = "QTouchEvent_TouchPoint";
+ nativeTypes["Qt_QTouchEvent_TouchPoint[]"] = "QTouchEvent_TouchPoint[]";
+ nativeTypes["Qt_QPixmapCache_Key"] = "QPixmapCache_Key";
+ nativeTypes[QString("const ") + meta_class->name() + " &"] = meta_class->name();
+
+ QSet methods;
+ QSet includes;
+
+ QString title = meta_class->name();
+ title.append(" ");
+ if (meta_class->isNamespace())
+ title.append("namespace");
+ else
+ title.append("class");
+ writeSourceHeader(o, title);
+
+ QMap prototypeFunctions;
+ QMap staticFunctions;
+ QMap signalFunctions;
+ QMap slotFunctions;
+ QStringList signalAliases;
+ filterFunctions(meta_class, prototypeFunctions, staticFunctions, signalFunctions, slotFunctions);
+
+ QTextStream s("", QIODevice::ReadWrite);
+
+ {
+ AbstractMetaEnumList enums = meta_class->enums();
+ for (int i = 0; i < enums.size(); ++i) {
+ const AbstractMetaEnum *enom = enums.at(i);
+ if (shouldIgnoreEnum(enom))
+ continue;
+ QString classname = meta_class->name();
+ if (meta_class->name() != "Qt")
+ {
+ classname = QString("Qt_") + classname;
+ }
+ s << "final native class " << classname << "_" << enom->name() << " {}" << endl << endl;
+ FlagsTypeEntry *flags = enom->typeEntry()->flags();
+ if (flags)
+ {
+ QString jsxName = classname + "_" + flags->flagsName();
+ QString cppName = QString("QFlags<") + meta_class->name() + "::" + enom->name() + ">";
+ s << "final native class " << jsxName << " {}" << endl << endl;
+ nativeTypes[cppName] = jsxName;
+ }
+ }
+ }
+
+ if (meta_class->baseClass())
+ {
+ s << "native class " << meta_class->name() << " extends " << meta_class->baseClassName() << endl;
+ addIncludeFile(includes, meta_class->baseClassName());
+ }
+ else if (!meta_class->interfaces().isEmpty())
+ {
+ AbstractMetaClass *iface = meta_class->interfaces().first();
+ AbstractMetaClass *impl = iface->primaryInterfaceImplementor();
+ if (impl != meta_class) {
+ s << "native class " << meta_class->name() << " extends " << impl->name() << endl;
+ addIncludeFile(includes, impl->name());
+ } else {
+ s << "native class " << meta_class->name() << endl;
+ }
+ }
+ else
+ {
+ s << "native class " << meta_class->name() << endl;
+ }
+ s << "{" << endl;
+
+ AbstractMetaFunctionList ctors;
+ ctors = meta_class->queryFunctions(AbstractMetaClass::Constructors
+ | AbstractMetaClass::WasPublic
+ | AbstractMetaClass::NotRemovedFromTargetLang);
+
+ // Constructor
+ if (!ctors.isEmpty()) {
+ for (int i = 0; i < ctors.size(); ++i) {
+ writeFunction(s, ctors.at(i), nativeTypes, methods, includes);
+ }
+ }
+
+ {
+ if (!staticFunctions.isEmpty()) {
+ s << endl;
+ s << " // Static Members" << endl;
+ QMap::const_iterator it;
+ for (it = staticFunctions.constBegin(); it != staticFunctions.constEnd(); ++it) {
+ writeFunction(s, it.value().first(), nativeTypes, methods, includes, true);
+ }
+ }
+ }
+
+ {
+ AbstractMetaEnumList enums = meta_class->enums();
+ for (int i = 0; i < enums.size(); ++i) {
+ const AbstractMetaEnum *enom = enums.at(i);
+ if (shouldIgnoreEnum(enom))
+ continue;
+ AbstractMetaEnumValueList values = enom->values();
+ QList indexes = uniqueEnumValueIndexes(values);
+ s << endl;
+ QString enomName = meta_class->name() + "_" + enom->name();
+ if (!enomName.startsWith("Qt_")) {
+ enomName.insert(0, "Qt_");
+ }
+ for (int j = 0; j < indexes.size(); ++j) {
+ AbstractMetaEnumValue *val = values.at(indexes.at(j));
+ s << " static const " << val->name() << " : " << enomName << ";" << endl;
+ }
+ s << " static function " << enom->name() << "(value : " << enomName << ") : " << enomName << ";" << endl;
+ nativeTypes[enom->name()] = enomName;
+ FlagsTypeEntry *flags = enom->typeEntry()->flags();
+ if (flags) {
+ QString flagName = meta_class->name() + "_" + flags->flagsName();
+ if (!flagName.startsWith("Qt_")) {
+ flagName.insert(0, "Qt_");
+ }
+ s << " static function " << flags->flagsName() << "(...value : " << enomName << ") : "
+ << flagName << ";" << endl;
+ nativeTypes[flags->flagsName()] = flagName;
+ }
+ }
+ }
+
+ if (!prototypeFunctions.isEmpty()) {
+ s << endl;
+ s << " // Methods" << endl;
+ QMap::const_iterator it;
+ for (it = prototypeFunctions.constBegin(); it != prototypeFunctions.constEnd(); ++it) {
+ AbstractMetaFunctionList::const_iterator it2;
+ for (it2 = it.value().constBegin(); it2 != it.value().constEnd(); ++it2) {
+ if (!skipMethod(meta_class, *it2))
+ {
+ writeFunction(s, *it2, nativeTypes, methods, includes);
+ }
+ }
+ }
+ if (meta_class->name() == "QPainter")
+ {
+ s << " function begin (arg__1 : QWidget) : boolean;" << endl;
+ includes.insert("qwidget");
+ }
+ }
+
+ if (!slotFunctions.isEmpty()) {
+ s << endl;
+ s << " // Slots" << endl;
+ QMap::const_iterator it;
+ for (it = slotFunctions.constBegin(); it != slotFunctions.constEnd(); ++it) {
+ AbstractMetaFunctionList::const_iterator it2;
+ for (it2 = it.value().constBegin(); it2 != it.value().constEnd(); ++it2) {
+ writeFunction(s, *it2, nativeTypes, methods, includes);
+ }
+ }
+ }
+
+ if (!signalFunctions.isEmpty()) {
+ s << endl;
+ s << " // Signals" << endl;
+ QMap::const_iterator it;
+ for (it = signalFunctions.constBegin(); it != signalFunctions.constEnd(); ++it) {
+ writeSignal(s, meta_class, it.value(), nativeTypes, _signals, includes, signalAliases);
+ }
+ }
+
+ if (!meta_class->isNamespace()) {
+ QList props = meta_class->propertySpecs();
+ if (!props.isEmpty()) {
+ s << endl;
+ s << " // Instance Properties" << endl;
+ for (int i = 0; i < props.size(); ++i) {
+ if (!skipProperty(meta_class, props.at(i)))
+ {
+ writeProperty(s, meta_class, props.at(i), nativeTypes, includes);
+ }
+ }
+ }
+ }
+ s << "}";
+ if (signalAliases.length() == 0)
+ {
+ s << endl;
+ }
+ else
+ {
+ s << " = '''" << meta_class->name() << ";" << endl;
+ foreach (const QString &alias, signalAliases) {
+ s << alias << endl;
+ }
+ s << "''';" << endl;
+ }
+
+ {
+ includes.remove(meta_class->name().toLower());
+ includes.remove("int");
+ includes.remove("intlist");
+ includes.remove("boolean");
+ includes.remove("string");
+ includes.remove("number");
+ includes.remove("variant");
+ includes.remove("qlist");
+ includes.remove("qvector");
+ includes.remove("date");
+ includes.remove("regexp");
+ QStringList includeFiles = includes.toList();
+ qSort(includeFiles.begin(), includeFiles.end());
+
+ foreach (const QString &i, includeFiles) {
+ writeInclude(o, i);
+ }
+ if (!signalFunctions.isEmpty()) {
+ writeInclude(o, "_signals");
+ }
+ o << endl;
+ }
+ s.seek(0);
+ o << s.readAll();
+}
+
diff --git a/generator/jsxgenerator.h b/generator/jsxgenerator.h
new file mode 100644
index 0000000..ed07675
--- /dev/null
+++ b/generator/jsxgenerator.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Script Generator project on Qt Labs.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef JSXGENERATOR_H
+#define JSXGENERATOR_H
+
+#include "generator.h"
+#include
+
+class JSXGenerator : public Generator
+{
+ QSet _ignoreFileList;
+ QMap _relatedFileList;
+ QMap _additionalIncludeList;
+ QMap _signals;
+
+public:
+ JSXGenerator();
+
+ virtual bool shouldGenerate(const AbstractMetaClass *meta_class) const;
+ virtual void generate();
+ virtual QString fileNameForClass(const AbstractMetaClass *meta_class) const;
+ virtual QString subDirectoryForClass(const AbstractMetaClass *cls) const;
+ virtual void write(QTextStream &s, const AbstractMetaClass *meta_class);
+
+ void addRelatedFile(QString target, QString relatedfile);
+ void addAdditionalInclude(QString target, QString includefile);
+};
+
+#endif
diff --git a/generator/main.h b/generator/main.h
index ebf153d..b9e2380 100644
--- a/generator/main.h
+++ b/generator/main.h
@@ -72,7 +72,7 @@ struct Preprocess
includes << QString(".");
#if defined(Q_OS_WIN32)
- char *path_splitter = ";";
+ const char *path_splitter = ";";
#else
const char *path_splitter = ":";
#endif
@@ -80,11 +80,11 @@ struct Preprocess
// Environment INCLUDE
QString includePath = getenv("INCLUDE");
if (!includePath.isEmpty())
- includes += includePath.split(path_splitter);
+ includes += includePath.split(path_splitter);
// Includes from the command line
if (!commandLineIncludes.isEmpty())
- includes += commandLineIncludes.split(path_splitter);
+ includes += commandLineIncludes.split(path_splitter);
// Include Qt
QString qtdir = getenv ("QTDIR");
@@ -111,12 +111,13 @@ struct Preprocess
includes << qtdir;
}
- foreach (QString include, includes)
- preprocess.push_include_path(QDir::convertSeparators(include).toStdString());
+ foreach (QString include, includes) {
+ preprocess.push_include_path(QDir::toNativeSeparators(include).toStdString());
+ }
QString currentDir = QDir::current().absolutePath();
QFileInfo sourceInfo(sourceFile);
- QDir::setCurrent(sourceInfo.absolutePath());
+ QDir::setCurrent(sourceInfo.absolutePath());
std::string result;
result.reserve (20 * 1024); // 20K
diff --git a/generator/parser/binder.cpp b/generator/parser/binder.cpp
index 884a724..d5fe08d 100644
--- a/generator/parser/binder.cpp
+++ b/generator/parser/binder.cpp
@@ -359,7 +359,7 @@ void Binder::visitFunctionDefinition(FunctionDefinitionAST *node)
CodeModelFinder finder(model(), this);
ScopeModelItem functionScope = finder.resolveScope(declarator->id, scope);
- if (! functionScope)
+ if (! functionScope || ! declarator->id)
{
name_cc.run(declarator->id);
std::cerr << "** WARNING scope not found for function definition:"
@@ -748,7 +748,7 @@ static QString strip_preprocessor_lines(const QString &name)
void Binder::visitEnumerator(EnumeratorAST *node)
{
- Q_ASSERT(_M_current_enum != 0);
+ Q_ASSERT(_M_current_enum.data() != 0);
EnumeratorModelItem e = model()->create();
updateItemPosition (e->toItem(), node);
e->setName(decode_symbol(node->id)->as_string());
diff --git a/generator/parser/codemodel.cpp b/generator/parser/codemodel.cpp
index 51b9b72..59b51b3 100644
--- a/generator/parser/codemodel.cpp
+++ b/generator/parser/codemodel.cpp
@@ -165,10 +165,15 @@ TypeInfo TypeInfo::resolveType (TypeInfo const &__type, CodeModelItem __scope)
TypeInfo otherType(__type);
if (__item && __item->qualifiedName().size() > 1) {
otherType.setQualifiedName(__item->qualifiedName());
+ return otherType;
}
if (TypeAliasModelItem __alias = model_dynamic_cast (__item))
- return resolveType (TypeInfo::combine (__alias->type (), otherType), __scope);
+ {
+ TypeInfo combined = TypeInfo::combine(__alias->type(), otherType);
+ if (combined != __type)
+ return resolveType(combined, __scope);
+ }
return otherType;
}
diff --git a/generator/parser/codemodel_finder.cpp b/generator/parser/codemodel_finder.cpp
index 634b46b..982f930 100644
--- a/generator/parser/codemodel_finder.cpp
+++ b/generator/parser/codemodel_finder.cpp
@@ -59,7 +59,7 @@ CodeModelFinder::~CodeModelFinder()
ScopeModelItem CodeModelFinder::resolveScope(NameAST *name, ScopeModelItem scope)
{
- Q_ASSERT(scope != 0);
+ Q_ASSERT(scope.data() != 0);
ResolvePolicy saved_resolve_policy = _M_resolve_policy;
_M_resolve_policy = ResolveScope;
diff --git a/generator/parser/codemodel_pointer.h b/generator/parser/codemodel_pointer.h
index ac575fe..3153c5a 100644
--- a/generator/parser/codemodel_pointer.h
+++ b/generator/parser/codemodel_pointer.h
@@ -44,6 +44,7 @@
#include
+
// Since the atomic API changed in 4.4 we need to hack a little here
// to make it work with both 4.3 and 4.4 until that is not required
@@ -109,6 +110,7 @@ template class CodeModelPointer
private:
T *d;
#else // QT_VERSION < 0x040400
+
inline CodeModelPointer(T *value = 0) : QAtomicPointer(value) {}
inline CodeModelPointer &operator=(T *o) {
@@ -119,6 +121,24 @@ template class CodeModelPointer
inline T *data() { return (T *) *this; }
inline const T *data() const { return (const T *) *this; }
inline const T *constData() const { return (const T *) *this; }
+
+
+# if QT_VERSION >= 0x050000
+ operator T * () const {
+ return QAtomicPointer::load();
+ }
+ inline bool operator!() const { return !(bool)*this; }
+ operator bool () const {
+ return (bool)QAtomicPointer::load();
+ }
+
+ inline T *operator->() { return QAtomicPointer::load(); }
+ inline const T *operator->() const { return QAtomicPointer::load(); }
+ inline bool operator==(const CodeModelPointer &other) const { return (T*)*this == (T*)other; }
+ inline bool operator!=(const CodeModelPointer &other) const { return (T*)*this != (T*)other; }
+ inline bool operator==(const T *ptr) const { return (T*)*this == ptr; }
+ inline bool operator!=(const T *ptr) const { return (T*)*this != ptr; }
+# endif
#endif
};
@@ -127,5 +147,4 @@ template
Q_INLINE_TEMPLATE CodeModelPointer::CodeModelPointer(T *adata) : d(adata)
{ if (d) d->ref.ref(); }
#endif
-
#endif // CODEMODEL_POINTER_H
diff --git a/generator/parser/rpp/pp-iterator.h b/generator/parser/rpp/pp-iterator.h
index d982efb..0fec0bb 100644
--- a/generator/parser/rpp/pp-iterator.h
+++ b/generator/parser/rpp/pp-iterator.h
@@ -83,8 +83,18 @@ class pp_output_iterator
inline pp_output_iterator &operator * () { return *this; }
inline pp_output_iterator &operator ++ () { return *this; }
inline pp_output_iterator operator ++ (int) { return *this; }
+ // Fix C2582 in MSVC2010/2012: http://stackoverflow.com/questions/2791525/stl-operator-behavior-change-with-visual-studio-2010
+ // Also works with MSVC 2015
+#ifdef _MSC_BUILD
+ inline pp_output_iterator &operator=(const typename pp_output_iterator<_Container>& __v)
+#else
+ inline pp_output_iterator &operator=(const pp_output_iterator<_Container>& __v)
+#endif
+ {
+ _M_result = __v._M_result;
+ return *this;
+ }
};
-
} // namespace rpp
#endif // PP_ITERATOR_H
diff --git a/generator/qtscript_masterinclude.h b/generator/qtscript_masterinclude.h
index b80188f..1e70d2c 100644
--- a/generator/qtscript_masterinclude.h
+++ b/generator/qtscript_masterinclude.h
@@ -42,10 +42,13 @@
#define QT_NO_STL
#include
#include
+#include
+#include
#include
#include
#include
#include
+#include
#include
@@ -53,10 +56,6 @@
# include
#endif
-#ifndef QT_NO_WEBKIT
-# include
-#endif
-
#ifndef QT_NO_PHONON
# include
#endif
diff --git a/generator/setupgenerator.cpp b/generator/setupgenerator.cpp
index 030f1fc..3eb2f61 100644
--- a/generator/setupgenerator.cpp
+++ b/generator/setupgenerator.cpp
@@ -66,13 +66,6 @@ void SetupGenerator::generate()
continue;
QString packName = pack.key();
- QStringList components = packName.split(".");
- if ((components.size() > 2) && (components.at(0) == "com")
- && (components.at(1) == "trolltech")) {
- // kill com.trolltech in key
- components.removeAt(0);
- components.removeAt(0);
- }
packName.replace(".", "_");
{
@@ -253,83 +246,5 @@ void SetupGenerator::generate()
++m_num_generated_written;
++m_num_generated;
}
-
- {
- FileOut pluginFile(m_out_dir + "/generated_cpp/" + packName + "/plugin.cpp");
- QTextStream &s = pluginFile.stream;
-
- if (FileOut::license)
- writeQtScriptQtBindingsLicense(s);
-
- s << "#include " << endl
- << "#include " << endl
- << "#include " << endl << endl;
-
- // declare the init function
- s << "void qtscript_initialize_" << packName << "_bindings(QScriptValue &);" << endl << endl;
-
- // plugin class declaration
- s << "class " << packName << "_ScriptPlugin : public QScriptExtensionPlugin" << endl
- << "{" << endl
- << "public:" << endl
- << " QStringList keys() const;" << endl
- << " void initialize(const QString &key, QScriptEngine *engine);" << endl
- << "};" << endl
- << "" << endl;
-
- // keys()
- s << "QStringList " << packName << "_ScriptPlugin::keys() const" << endl
- << "{" << endl
- << " QStringList list;" << endl;
- {
- QString key;
- for (int i = 0; i < components.size(); ++i) {
- if (i > 0)
- key.append(".");
- key.append(components.at(i));
- s << " list << QLatin1String(\"" << key << "\");" << endl;
- }
- }
- s << " return list;" << endl
- << "}" << endl;
-
- // initialize()
- s << endl
- << "void " << packName << "_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine)" << endl
- << "{";
- {
- QString key;
- for (int i = 0; i < components.size(); ++i) {
- s << endl << " ";
- if (i > 0) {
- key.append(".");
- s << "} else ";
- }
- key.append(components.at(i));
- s << "if (key == QLatin1String(\"" << key << "\")) {";
- }
- }
- s << endl << " QScriptValue extensionObject = ";
- // ### generalize
- if (packName == "com.trolltech.qt.phonon")
- s << "setupPackage(\"phonon\", engine)";
- else
- s << "engine->globalObject()";
- s << ";" << endl;
-
- s << " qtscript_initialize_" << packName << "_bindings(extensionObject);" << endl;
-
- s << " } else {" << endl
- << " Q_ASSERT_X(false, \"" << packName << "::initialize\", qPrintable(key));" << endl
- << " }" << endl
- << "}" << endl << endl;
-
- s << "Q_EXPORT_STATIC_PLUGIN(" << packName << "_ScriptPlugin)" << endl
- << "Q_EXPORT_PLUGIN2(qtscript_" << packName.toLower() << ", " << packName << "_ScriptPlugin)" << endl;
-
- if (pluginFile.done())
- ++m_num_generated_written;
- ++m_num_generated;
- }
}
}
diff --git a/generator/shellheadergenerator.cpp b/generator/shellheadergenerator.cpp
index bbd4459..d48953f 100644
--- a/generator/shellheadergenerator.cpp
+++ b/generator/shellheadergenerator.cpp
@@ -76,7 +76,9 @@ void ShellHeaderGenerator::write(QTextStream &s, const AbstractMetaClass *meta_c
s << "\"";
s << endl << endl;
- s << "#include " << endl << endl;
+ s << "#include " << endl;
+ s << "#include <__package_shared.h>" << endl;
+ s << endl;
QString packName = meta_class->package().replace(".", "_");
diff --git a/generator/shellimplgenerator.cpp b/generator/shellimplgenerator.cpp
index 047a4c0..d58c55e 100644
--- a/generator/shellimplgenerator.cpp
+++ b/generator/shellimplgenerator.cpp
@@ -52,7 +52,7 @@ QString ShellImplGenerator::fileNameForClass(const AbstractMetaClass *meta_class
return QString("qtscriptshell_%1.cpp").arg(meta_class->name());
}
-static bool include_less_than(const Include &a, const Include &b)
+static bool include_less_than(const Include &a, const Include &b)
{
return a.name < b.name;
}
@@ -211,8 +211,9 @@ void ShellImplGenerator::write(QTextStream &s, const AbstractMetaClass *meta_cla
AbstractMetaType *atype = args.at(j)->type();
QString asig = atype->cppSignature();
bool constCastArg = asig.endsWith('*') && asig.startsWith("const ");
- if (constCastArg)
- s << "const_cast<" << asig.mid(6) << ">(";
+ if (constCastArg) {
+ s << "const_cast<" << asig << ">(";
+ }
s << args.at(i)->argumentName() << ")";
if (constCastArg)
s << ")";
diff --git a/generator/typesystem_core-common.xml b/generator/typesystem_core-common.xml
index 0b2673b..eac3030 100644
--- a/generator/typesystem_core-common.xml
+++ b/generator/typesystem_core-common.xml
@@ -280,6 +280,7 @@
+
@@ -355,6 +356,7 @@
+
@@ -362,8 +364,6 @@
-
-
@@ -392,6 +392,8 @@
+
+
@@ -412,6 +414,7 @@
+
@@ -469,12 +472,16 @@
-
-
-
+
+
+
+
+
+
+
@@ -498,11 +505,14 @@
-
+
+
+
+
@@ -866,10 +876,6 @@
-
-
-
-
@@ -941,25 +947,23 @@
-
+
-
-
-
-
-
+
+
+
-
+
@@ -1315,6 +1319,9 @@
+
+
+
@@ -1400,7 +1407,17 @@
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/generator/typesystem_core-qtscript.xml b/generator/typesystem_core-qtscript.xml
index 9982ea9..cb7e6dd 100644
--- a/generator/typesystem_core-qtscript.xml
+++ b/generator/typesystem_core-qtscript.xml
@@ -66,6 +66,7 @@
+
@@ -77,7 +78,12 @@
-
+
+
+
+
+
+
@@ -85,7 +91,7 @@
QFile & %out% = *qscriptvalue_cast<QFile*>(%in%);
-
+
@@ -102,12 +108,19 @@
- QFile & %out% = *qscriptvalue_cast<QFile*>(%in%);
-
+ QFile & %out% = *qscriptvalue_cast<QFile*>(%in%);
+
+
+
+
+
+
+
+ QFile & %out% = *qscriptvalue_cast<QFile*>(%in%);
+
-
@@ -212,11 +225,11 @@
-
+
@@ -1037,12 +1050,18 @@
-
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
@@ -1052,12 +1071,18 @@
-
+
+
+ const QtScriptVoidFuture & %out% = *qscriptvalue_cast<QtScriptVoidFuture*>(%in%);
+
-
+
+
+ const QtScriptVoidFuture & %out% = *qscriptvalue_cast<QtScriptVoidFuture*>(%in%);
+
@@ -1065,7 +1090,10 @@
-
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
@@ -1073,7 +1101,10 @@
-
+
+
+ const QtScriptVoidFuture & %out% = *qscriptvalue_cast<QtScriptVoidFuture*>(%in%);
+
@@ -1081,17 +1112,26 @@
-
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
-
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
-
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
@@ -1099,17 +1139,26 @@
-
+
+
+ const QtScriptVoidFuture & %out% = *qscriptvalue_cast<QtScriptVoidFuture*>(%in%);
+
-
+
+
+ const QtScriptVoidFuture & %out% = *qscriptvalue_cast<QtScriptVoidFuture*>(%in%);
+
-
+
+
+ const QtScriptVoidFuture & %out% = *qscriptvalue_cast<QtScriptVoidFuture*>(%in%);
+
@@ -1118,7 +1167,10 @@
-
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
diff --git a/generator/typesystem_core.xml b/generator/typesystem_core.xml
index 3e5d7e0..f0734e6 100644
--- a/generator/typesystem_core.xml
+++ b/generator/typesystem_core.xml
@@ -33,7 +33,7 @@
}
QString %out% = %in%.toString();
-
+
@@ -314,6 +314,7 @@
+
@@ -389,6 +390,7 @@
+
@@ -396,8 +398,6 @@
-
-
@@ -426,6 +426,8 @@
+
+
@@ -446,6 +448,7 @@
+
@@ -507,12 +510,16 @@
-
-
-
+
+
+
+
+
+
+
@@ -536,11 +543,14 @@
-
+
+
+
+
@@ -1033,7 +1043,10 @@
-
+
+
+
+
@@ -1096,7 +1109,7 @@
QFile & %out% = *qscriptvalue_cast<QFile*>(%in%);
-
+
@@ -1113,10 +1126,6 @@
-
-
-
-
@@ -1443,28 +1452,21 @@
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -1478,6 +1480,7 @@
+
@@ -1489,8 +1492,16 @@
- QFile & %out% = *qscriptvalue_cast<QFile*>(%in%);
-
+ QFile & %out% = *qscriptvalue_cast<QFile*>(%in%);
+
+
+
+
+
+
+
+ QFile & %out% = *qscriptvalue_cast<QFile*>(%in%);
+
@@ -2123,6 +2134,9 @@
+
+
+
@@ -2205,6 +2219,10 @@
+
+
+
+
@@ -2365,24 +2383,36 @@
-
+
+
+ const QtScriptVoidFuture & %out% = *qscriptvalue_cast<QtScriptVoidFuture*>(%in%);
+
-
+
+
+ const QtScriptVoidFuture & %out% = *qscriptvalue_cast<QtScriptVoidFuture*>(%in%);
+
-
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
@@ -2396,7 +2426,10 @@
-
+
+
+ const QtScriptVoidFuture & %out% = *qscriptvalue_cast<QtScriptVoidFuture*>(%in%);
+
@@ -2407,7 +2440,10 @@
-
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
@@ -2416,17 +2452,26 @@
-
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
-
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
-
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
@@ -2434,17 +2479,26 @@
-
+
+
+ const QtScriptVoidFuture & %out% = *qscriptvalue_cast<QtScriptVoidFuture*>(%in%);
+
-
+
+
+ const QtScriptVoidFuture & %out% = *qscriptvalue_cast<QtScriptVoidFuture*>(%in%);
+
-
+
+
+ const QtScriptVoidFuture & %out% = *qscriptvalue_cast<QtScriptVoidFuture*>(%in%);
+
@@ -2457,7 +2511,10 @@
-
+
+
+ const QtScriptFuture & %out% = *qscriptvalue_cast<QtScriptFuture*>(%in%);
+
@@ -2772,7 +2829,17 @@
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/generator/typesystem_gui-common.xml b/generator/typesystem_gui-common.xml
index 61f33e4..273b17e 100644
--- a/generator/typesystem_gui-common.xml
+++ b/generator/typesystem_gui-common.xml
@@ -1,57 +1,37 @@
-
-
-
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
@@ -59,20 +39,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -84,130 +53,39 @@
+
-
-
-
+
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -215,26 +93,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -242,139 +105,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -382,8 +121,6 @@
-
-
@@ -397,59 +134,20 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -461,18 +159,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -483,21 +169,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -506,24 +177,18 @@
-
-
-
-
-
-
-
-
+
+
+
-
@@ -537,73 +202,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -617,12 +219,13 @@
+
-
-
+
+
@@ -631,21 +234,21 @@
+
-
-
-
+
+
@@ -690,7 +293,6 @@
-
@@ -705,24 +307,21 @@
-
-
-
+
+
-
+
-
-
@@ -732,18 +331,15 @@
+
-
-
-
-
-
-
+
+
@@ -755,26 +351,8 @@
-
-
- return new QTreeWidgetItemIterator(*copy);
-
-
- delete copy;
-
-
-
-
-
-
-
-
-
-
-
-
@@ -818,15 +396,6 @@
-
-
-
-
-
-
-
-
-
@@ -835,18 +404,15 @@
-
-
-
@@ -860,7 +426,6 @@
-
@@ -921,10 +486,6 @@
-
-
-
-
@@ -1025,7 +586,6 @@
-
@@ -1147,6 +707,7 @@
+
@@ -1223,142 +784,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if (%1 != null) disableGarbageCollection();
-
-
-
-
-
-
-
-
-
-
-
-
-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5139,34 +1314,21 @@
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -5175,10 +1337,9 @@
-
-
+
@@ -5186,24 +1347,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/generator/typesystem_gui-qtscript.xml b/generator/typesystem_gui-qtscript.xml
index d07ac4a..51f408b 100644
--- a/generator/typesystem_gui-qtscript.xml
+++ b/generator/typesystem_gui-qtscript.xml
@@ -2,7 +2,6 @@
-
@@ -10,30 +9,43 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ QDataStream & %out% = *qscriptvalue_cast<QDataStream*>(%in%);
+
+
+ jobject %out = qtjambi_from_object(__jni_env, %in, "QImage", "com/trolltech/qt/gui/", false);
+ QtJambiLink *__link = %out != 0 ? QtJambiLink::findLink(__jni_env, %out) : 0;
+
+
+
+
+
+
+
+ QDataStream & %out% = *qscriptvalue_cast<QDataStream*>(%in%);
+
+
+
+
+
@@ -57,30 +69,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- QScriptValue %out%_orig = %in%;
- QWidget* %out% = qscriptvalue_cast<QWidget*>(%out%_orig);
- if (%out% != 0)
- context->engine()->newQObject(%out%_orig, %out%, QScriptEngine::QtOwnership);
-
-
-
-
-
@@ -105,53 +93,6 @@
-
-
- Q_DECLARE_METATYPE(QScriptValue)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -229,98 +170,6 @@
-
-
- Q_DECLARE_METATYPE(QScriptValue)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -334,84 +183,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers)
- { return QModelIndex(); }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -492,11 +264,11 @@
+
-
diff --git a/generator/typesystem_gui.xml b/generator/typesystem_gui.xml
index 3d9a9d1..dc97633 100644
--- a/generator/typesystem_gui.xml
+++ b/generator/typesystem_gui.xml
@@ -1,57 +1,37 @@
-
-
+
-
-
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
@@ -59,20 +39,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -84,130 +53,39 @@
+
-
-
-
+
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -215,26 +93,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -242,139 +105,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -382,8 +121,6 @@
-
-
@@ -397,59 +134,20 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -461,18 +159,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -483,21 +169,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -506,24 +177,18 @@
-
-
-
-
-
-
-
-
+
+
+
-
@@ -543,73 +208,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -634,12 +236,13 @@
+
-
-
+
+
@@ -648,21 +251,21 @@
+
-
-
-
+
+
@@ -745,7 +348,6 @@
-
@@ -760,14 +362,12 @@
-
-
-
+
+
-
@@ -781,13 +381,12 @@
+
-
-
@@ -797,18 +396,15 @@
+
-
-
-
-
-
-
+
+
@@ -820,26 +416,8 @@
-
-
- return new QTreeWidgetItemIterator(*copy);
-
-
- delete copy;
-
-
-
-
-
-
-
-
-
-
-
-
@@ -858,7 +436,6 @@
-
@@ -930,15 +507,6 @@
-
-
-
-
-
-
-
-
-
@@ -947,18 +515,15 @@
-
-
-
@@ -972,7 +537,6 @@
-
@@ -1048,10 +612,6 @@
-
-
-
-
@@ -1152,7 +712,6 @@
-
@@ -1363,6 +922,7 @@
+
@@ -1443,154 +1003,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if (%1 != null) disableGarbageCollection();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers)
- { return QModelIndex(); }
-
-
-
-
-
-
-
-
@@ -1604,3081 +1016,324 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
-
+
+
+ QDataStream & %out% = *qscriptvalue_cast<QDataStream*>(%in%);
+
+
+ jobject %out = qtjambi_from_object(__jni_env, %in, "QImage", "com/trolltech/qt/gui/", false);
+ QtJambiLink *__link = %out != 0 ? QtJambiLink::findLink(__jni_env, %out) : 0;
+
-
+
-
-
-
-
-
-
-
-
-
+
+
+ QDataStream & %out% = *qscriptvalue_cast<QDataStream*>(%in%);
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- Q_DECLARE_METATYPE(QScriptValue)
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
+
-
-
-
-
-
-
+
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
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-
-
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
@@ -5614,34 +1608,21 @@
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -5650,10 +1631,9 @@
-
-
+
@@ -5661,24 +1641,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/generator/typesystem_multimedia-common.xml b/generator/typesystem_multimedia-common.xml
new file mode 100644
index 0000000..0fadbf9
--- /dev/null
+++ b/generator/typesystem_multimedia-common.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/generator/typesystem_multimedia-qtscript.xml b/generator/typesystem_multimedia-qtscript.xml
new file mode 100644
index 0000000..b110d63
--- /dev/null
+++ b/generator/typesystem_multimedia-qtscript.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/generator/typesystem_multimedia.xml b/generator/typesystem_multimedia.xml
new file mode 100644
index 0000000..36e79c5
--- /dev/null
+++ b/generator/typesystem_multimedia.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/generator/typesystem_network-common.xml b/generator/typesystem_network-common.xml
index c33be39..a573653 100644
--- a/generator/typesystem_network-common.xml
+++ b/generator/typesystem_network-common.xml
@@ -7,18 +7,12 @@
+
+
-
-
-
-
-
-
-
-
@@ -68,18 +62,11 @@
-
-
-
-
-
-
-
@@ -114,14 +101,6 @@
-
-
-
-
-
-
-
-
diff --git a/generator/typesystem_network-qtscript.xml b/generator/typesystem_network-qtscript.xml
index a184dd5..1d5f722 100644
--- a/generator/typesystem_network-qtscript.xml
+++ b/generator/typesystem_network-qtscript.xml
@@ -1,9 +1,5 @@
-
-
-
-
@@ -23,7 +19,7 @@
-
+
diff --git a/generator/typesystem_network.xml b/generator/typesystem_network.xml
index 0ed8f31..5e48a6a 100644
--- a/generator/typesystem_network.xml
+++ b/generator/typesystem_network.xml
@@ -8,18 +8,12 @@
+
+
-
-
-
-
-
-
-
-
@@ -69,11 +63,7 @@
-
-
-
-
@@ -86,11 +76,6 @@
-
-
-
-
-
@@ -135,19 +120,11 @@
-
+
-
-
-
-
-
-
-
-
diff --git a/generator/typesystem_phonon-common.xml b/generator/typesystem_phonon-common.xml
deleted file mode 100644
index 1cc8475..0000000
--- a/generator/typesystem_phonon-common.xml
+++ /dev/null
@@ -1,206 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/generator/typesystem_phonon-qtscript.xml b/generator/typesystem_phonon-qtscript.xml
deleted file mode 100644
index c183c02..0000000
--- a/generator/typesystem_phonon-qtscript.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/generator/typesystem_phonon.xml b/generator/typesystem_phonon.xml
deleted file mode 100644
index 2b5b390..0000000
--- a/generator/typesystem_phonon.xml
+++ /dev/null
@@ -1,237 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/generator/typesystem_printsupport-common.xml b/generator/typesystem_printsupport-common.xml
new file mode 100644
index 0000000..55ab88b
--- /dev/null
+++ b/generator/typesystem_printsupport-common.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/generator/typesystem_printsupport-qtscript.xml b/generator/typesystem_printsupport-qtscript.xml
new file mode 100644
index 0000000..dcdfd02
--- /dev/null
+++ b/generator/typesystem_printsupport-qtscript.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/generator/typesystem_printsupport.xml b/generator/typesystem_printsupport.xml
new file mode 100644
index 0000000..f9c9d8c
--- /dev/null
+++ b/generator/typesystem_printsupport.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/generator/typesystem_uitools.xml b/generator/typesystem_uitools.xml
index 1b2c2ed..5a58c6c 100644
--- a/generator/typesystem_uitools.xml
+++ b/generator/typesystem_uitools.xml
@@ -1,5 +1,9 @@
-
-
+
+
+
+
+
+
diff --git a/generator/typesystem_webkit-common.xml b/generator/typesystem_webkit-common.xml
deleted file mode 100644
index 3663efb..0000000
--- a/generator/typesystem_webkit-common.xml
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return new QWebHistoryItem(*copy);
-
-
- delete copy;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/generator/typesystem_webkit-qtscript.xml b/generator/typesystem_webkit-qtscript.xml
deleted file mode 100644
index 148df2c..0000000
--- a/generator/typesystem_webkit-qtscript.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/generator/typesystem_webkit.xml b/generator/typesystem_webkit.xml
deleted file mode 100644
index 54e961e..0000000
--- a/generator/typesystem_webkit.xml
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return new QWebHistoryItem(*copy);
-
-
- delete copy;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/generator/typesystem_widgets-common.xml b/generator/typesystem_widgets-common.xml
new file mode 100644
index 0000000..938b1a6
--- /dev/null
+++ b/generator/typesystem_widgets-common.xml
@@ -0,0 +1,3742 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/generator/typesystem_widgets-qtscript.xml b/generator/typesystem_widgets-qtscript.xml
new file mode 100644
index 0000000..89d2c82
--- /dev/null
+++ b/generator/typesystem_widgets-qtscript.xml
@@ -0,0 +1,254 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QScriptValue %out%_orig = %in%;
+ QWidget* %out% = qscriptvalue_cast<QWidget*>(%out%_orig);
+ if (%out% != 0)
+ context->engine()->newQObject(%out%_orig, %out%, QScriptEngine::QtOwnership);
+
+
+
+
+
+
+
+ Q_DECLARE_METATYPE(QScriptValue)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Q_DECLARE_METATYPE(QScriptValue)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers)
+ { return QModelIndex(); }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/generator/typesystem_widgets.xml b/generator/typesystem_widgets.xml
new file mode 100644
index 0000000..c016f69
--- /dev/null
+++ b/generator/typesystem_widgets.xml
@@ -0,0 +1,3939 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ return new QTreeWidgetItemIterator(*copy);
+
+
+ delete copy;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if (%1 != null) disableGarbageCollection();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers)
+ { return QModelIndex(); }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/qtbindings/qs_eval/main.cpp b/qtbindings/qs_eval/main.cpp
index 607747a..7cc6f3e 100644
--- a/qtbindings/qs_eval/main.cpp
+++ b/qtbindings/qs_eval/main.cpp
@@ -47,7 +47,7 @@
#include
#include
#include
-#include
+#include
#include
@@ -136,11 +136,7 @@ static QScriptValue importExtension(QScriptContext *context, QScriptEngine *engi
int main(int argc, char *argv[])
{
- QApplication *app;
- if (argc >= 2 && !qstrcmp(argv[1], "-tty"))
- app = new QApplication(argc, argv, QApplication::Tty);
- else
- app = new QApplication(argc, argv);
+ QApplication *app = new QApplication(argc, argv);
QDir dir(QApplication::applicationDirPath());
if (dir.dirName() == QLatin1String("debug") || dir.dirName() == QLatin1String("release"))
@@ -160,12 +156,15 @@ int main(int argc, char *argv[])
QStringList extensions;
extensions << "qt.core"
<< "qt.gui"
+ << "qt.widgets"
+ << "qt.printsupport"
<< "qt.xml"
<< "qt.svg"
<< "qt.network"
<< "qt.sql"
<< "qt.opengl"
<< "qt.webkit"
+ << "qt.webkitwidgets"
<< "qt.xmlpatterns"
<< "qt.uitools";
QStringList failExtensions;
diff --git a/qtbindings/qs_eval/qs_eval.pro b/qtbindings/qs_eval/qs_eval.pro
index 0d47e6e..108574e 100644
--- a/qtbindings/qs_eval/qs_eval.pro
+++ b/qtbindings/qs_eval/qs_eval.pro
@@ -1,6 +1,6 @@
-QT = core gui script
+QT = core gui script widgets
win32: CONFIG += console
mac:CONFIG -= app_bundle
SOURCES += main.cpp
-TOO_OLD_LIST=$$find(QT_VERSION, ^4\.[0-4])
+TOO_OLD_LIST=$$find(QT_VERSION, ^4\\.[0-4])
count(TOO_OLD_LIST, 0): QT += scripttools
diff --git a/qtbindings/qtbindings.pro b/qtbindings/qtbindings.pro
index 8535ed0..cb2c705 100644
--- a/qtbindings/qtbindings.pro
+++ b/qtbindings/qtbindings.pro
@@ -1,13 +1,15 @@
TEMPLATE = subdirs
SUBDIRS = qtscript_core \
- qtscript_gui \
- qtscript_network \
- qtscript_opengl \
- qtscript_sql \
- qtscript_svg \
- qtscript_xml \
- qtscript_phonon \
- qtscript_webkit \
- qtscript_xmlpatterns \
- qtscript_uitools \
- qs_eval
+ qtscript_gui \
+ qtscript_widgets \
+ qtscript_printsupport \
+ qtscript_multimedia \
+ qtscript_network \
+ qtscript_opengl \
+ qtscript_sql \
+ qtscript_xml \
+ qtscript_svg \
+ qtscript_xmlpatterns \
+ qtscript_uitools \
+ qs_eval
+
diff --git a/qtbindings/qtbindingsbase.pri b/qtbindings/qtbindingsbase.pri
index 8ad8d80..eefbcbd 100644
--- a/qtbindings/qtbindingsbase.pri
+++ b/qtbindings/qtbindingsbase.pri
@@ -1,8 +1,19 @@
TEMPLATE = lib
DEPENDPATH += .
INCLUDEPATH += .
-DESTDIR = $$PWD/../plugins/script
+
+CONFIG(debug, debug|release) {
+ DESTDIR = $$PWD/../plugins/script_debug
+} else {
+ DESTDIR = $$PWD/../plugins/script
+}
+
+win32:{
+ QMAKE_CXXFLAGS += /MP /GS /Zi
+ QMAKE_LFLAGS += /DEBUG /OPT:REF /OPT:ICF
+}
+
QT += script
-CONFIG += debug_and_release
+CONFIG += plugin release build_all
GENERATEDCPP = $$PWD/../generated_cpp
TARGET=$$qtLibraryTarget($$TARGET)
diff --git a/qtbindings/qtscript_core/include/__package_shared.h b/qtbindings/qtscript_core/include/__package_shared.h
new file mode 100644
index 0000000..5db4253
--- /dev/null
+++ b/qtbindings/qtscript_core/include/__package_shared.h
@@ -0,0 +1,40 @@
+
+#pragma once
+
+#include
+
+#include
+#include
+
+
+#include
+
+
+Q_DECLARE_METATYPE(QEvent)
+
+namespace QtMetaTypePrivate {
+
+template <>
+inline void *QMetaTypeFunctionHelper::Construct(void *where, const void *t)
+{
+ if (t)
+ return new (where) QEvent(*static_cast(t));
+ return new (where) QEvent(QEvent::None);
+};
+
+
+}
+
+template <>
+inline QEvent qscriptvalue_cast(const QScriptValue &value)
+{
+ QEvent t(QEvent::None);
+ const int id = qMetaTypeId();
+
+ if (qscriptvalue_cast_helper(value, id, &t))
+ return t;
+
+ return QEvent(QEvent::None);
+}
+
+
diff --git a/qtbindings/qtscript_core/plugin.cpp b/qtbindings/qtscript_core/plugin.cpp
new file mode 100644
index 0000000..5507573
--- /dev/null
+++ b/qtbindings/qtscript_core/plugin.cpp
@@ -0,0 +1,26 @@
+#include
+#include
+#include
+#include
+#include "plugin.h"
+
+
+QStringList com_trolltech_qt_core_ScriptPlugin::keys() const
+{
+ QStringList list;
+ list << QLatin1String("qt");
+ list << QLatin1String("qt.core");
+ return list;
+}
+
+void com_trolltech_qt_core_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine)
+{
+ if (key == QLatin1String("qt")) {
+ } else if (key == QLatin1String("qt.core")) {
+ QScriptValue extensionObject = engine->globalObject();
+ qtscript_initialize_com_trolltech_qt_core_bindings(extensionObject);
+ } else {
+ Q_ASSERT_X(false, "com_trolltech_qt_core::initialize", qPrintable(key));
+ }
+}
+
diff --git a/qtbindings/qtscript_core/plugin.h b/qtbindings/qtscript_core/plugin.h
new file mode 100644
index 0000000..538d13c
--- /dev/null
+++ b/qtbindings/qtscript_core/plugin.h
@@ -0,0 +1,17 @@
+#include
+#include
+#include
+#include
+
+
+void qtscript_initialize_com_trolltech_qt_core_bindings(QScriptValue &);
+
+class com_trolltech_qt_core_ScriptPlugin : public QScriptExtensionPlugin
+{
+Q_OBJECT
+Q_PLUGIN_METADATA(IID "com.trolltech.qt.core.scriptPlugin")
+public:
+ QStringList keys() const;
+ void initialize(const QString &key, QScriptEngine *engine);
+};
+
diff --git a/qtbindings/qtscript_core/qtscript_core.pro b/qtbindings/qtscript_core/qtscript_core.pro
index 2dced76..b8a878a 100644
--- a/qtbindings/qtscript_core/qtscript_core.pro
+++ b/qtbindings/qtscript_core/qtscript_core.pro
@@ -1,4 +1,7 @@
TARGET = qtscript_core
include(../qtbindingsbase.pri)
-SOURCES += $$GENERATEDCPP/com_trolltech_qt_core/plugin.cpp
+SOURCES += plugin.cpp
+HEADERS += qtscriptconcurrent.h plugin.h
+INCLUDEPATH += ./include/
+QT += concurrent widgets
include($$GENERATEDCPP/com_trolltech_qt_core/com_trolltech_qt_core.pri)
diff --git a/qtbindings/qtscript_core/qtscriptconcurrent.h b/qtbindings/qtscript_core/qtscriptconcurrent.h
index 015b0a2..0500294 100644
--- a/qtbindings/qtscript_core/qtscriptconcurrent.h
+++ b/qtbindings/qtscript_core/qtscriptconcurrent.h
@@ -45,18 +45,23 @@
#ifndef QT_NO_CONCURRENT
#include
-#include
-#include
-#include
+#include
+#include
+#include
-typedef QFutureWatcher QtScriptVoidFutureWatcher;
+class QtScriptVoidFutureWatcher : public QFutureWatcher {
+ Q_OBJECT
+};
typedef QFuture QtScriptVoidFuture;
typedef QFutureSynchronizer QtScriptVoidFutureSynchronizer;
typedef QFuture QtScriptFuture;
-typedef QFutureWatcher QtScriptFutureWatcher;
+class QtScriptFutureWatcher : public QFutureWatcher {
+ Q_OBJECT
+};
typedef QFutureSynchronizer QtScriptFutureSynchronizer;
typedef QFutureIterator QtScriptFutureIterator;
#endif // QT_NO_CONCURRENT
#endif
+
diff --git a/qtbindings/qtscript_gui/include/__package_shared.h b/qtbindings/qtscript_gui/include/__package_shared.h
new file mode 100644
index 0000000..42e7b20
--- /dev/null
+++ b/qtbindings/qtscript_gui/include/__package_shared.h
@@ -0,0 +1,84 @@
+
+#pragma once
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+Q_DECLARE_METATYPE(QFontInfo)
+Q_DECLARE_METATYPE(QFontMetrics)
+Q_DECLARE_METATYPE(QFontMetricsF)
+
+
+namespace QtMetaTypePrivate {
+
+template <>
+inline void *QMetaTypeFunctionHelper::Construct(void *where, const void *t)
+{
+ if (t)
+ return new (where) QFontInfo(*static_cast(t));
+ return new (where) QFontInfo(QFont());
+}
+
+template <>
+inline void *QMetaTypeFunctionHelper::Construct(void *where, const void *t)
+{
+ if (t)
+ return new (where) QFontMetrics(*static_cast(t));
+ return new (where) QFontMetrics(QFont());
+}
+
+template <>
+inline void *QMetaTypeFunctionHelper::Construct(void *where, const void *t)
+{
+ if (t)
+ return new (where) QFontMetricsF(*static_cast(t));
+ return new (where) QFontMetricsF(QFont());
+}
+
+}
+
+template <>
+inline QFontInfo qscriptvalue_cast(const QScriptValue &value)
+{
+ QFont f;
+ QFontInfo t(f);
+ const int id = qMetaTypeId();
+
+ if (qscriptvalue_cast_helper(value, id, (void*)&t))
+ return t;
+
+ return QFontInfo(QFont());
+}
+
+template <>
+inline QFontMetrics qscriptvalue_cast(const QScriptValue &value)
+{
+ QFont f;
+ QFontMetrics t(f);
+ const int id = qMetaTypeId();
+
+ if (qscriptvalue_cast_helper(value, id, (void*)&t))
+ return t;
+
+ return QFontMetrics(QFont());
+}
+
+template <>
+inline QFontMetricsF qscriptvalue_cast(const QScriptValue &value)
+{
+ QFont f;
+ QFontMetricsF t(f);
+ const int id = qMetaTypeId();
+
+ if (qscriptvalue_cast_helper(value, id, (void*)&t))
+ return t;
+
+ return QFontMetricsF(QFont());
+}
diff --git a/qtbindings/qtscript_gui/plugin.cpp b/qtbindings/qtscript_gui/plugin.cpp
new file mode 100644
index 0000000..e47a8fe
--- /dev/null
+++ b/qtbindings/qtscript_gui/plugin.cpp
@@ -0,0 +1,24 @@
+#include
+#include
+#include
+#include "plugin.h"
+
+QStringList com_trolltech_qt_gui_ScriptPlugin::keys() const
+{
+ QStringList list;
+ list << QLatin1String("qt");
+ list << QLatin1String("qt.gui");
+ return list;
+}
+
+void com_trolltech_qt_gui_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine)
+{
+ if (key == QLatin1String("qt")) {
+ } else if (key == QLatin1String("qt.gui")) {
+ QScriptValue extensionObject = engine->globalObject();
+ qtscript_initialize_com_trolltech_qt_gui_bindings(extensionObject);
+ } else {
+ Q_ASSERT_X(false, "com_trolltech_qt_gui::initialize", qPrintable(key));
+ }
+}
+
diff --git a/qtbindings/qtscript_gui/plugin.h b/qtbindings/qtscript_gui/plugin.h
new file mode 100644
index 0000000..eeb7781
--- /dev/null
+++ b/qtbindings/qtscript_gui/plugin.h
@@ -0,0 +1,16 @@
+#include
+#include
+#include
+
+void qtscript_initialize_com_trolltech_qt_gui_bindings(QScriptValue &);
+
+class com_trolltech_qt_gui_ScriptPlugin : public QScriptExtensionPlugin
+{
+Q_OBJECT
+Q_PLUGIN_METADATA(IID "com_trolltech_qt_gui_ScriptPlugin")
+public:
+ QStringList keys() const;
+ void initialize(const QString &key, QScriptEngine *engine);
+};
+
+
diff --git a/qtbindings/qtscript_gui/qtscript_gui.pro b/qtbindings/qtscript_gui/qtscript_gui.pro
index f3ab584..3132fd0 100644
--- a/qtbindings/qtscript_gui/qtscript_gui.pro
+++ b/qtbindings/qtscript_gui/qtscript_gui.pro
@@ -1,4 +1,7 @@
TARGET = qtscript_gui
include(../qtbindingsbase.pri)
-SOURCES += $$GENERATEDCPP/com_trolltech_qt_gui/plugin.cpp
+SOURCES += plugin.cpp
+HEADERS += plugin.h
+QT += widgets
+INCLUDEPATH += ./include/
include($$GENERATEDCPP/com_trolltech_qt_gui/com_trolltech_qt_gui.pri)
diff --git a/qtbindings/qtscript_multimedia/include/__package_shared.h b/qtbindings/qtscript_multimedia/include/__package_shared.h
new file mode 100644
index 0000000..6f70f09
--- /dev/null
+++ b/qtbindings/qtscript_multimedia/include/__package_shared.h
@@ -0,0 +1 @@
+#pragma once
diff --git a/qtbindings/qtscript_multimedia/plugin.cpp b/qtbindings/qtscript_multimedia/plugin.cpp
new file mode 100644
index 0000000..75c5d43
--- /dev/null
+++ b/qtbindings/qtscript_multimedia/plugin.cpp
@@ -0,0 +1,24 @@
+#include
+#include
+#include
+#include "plugin.h"
+
+QStringList com_trolltech_qt_multimedia_ScriptPlugin::keys() const
+{
+ QStringList list;
+ list << QLatin1String("qt");
+ list << QLatin1String("qt.multimedia");
+ return list;
+}
+
+void com_trolltech_qt_multimedia_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine)
+{
+ if (key == QLatin1String("qt")) {
+ } else if (key == QLatin1String("qt.multimedia")) {
+ QScriptValue extensionObject = engine->globalObject();
+ qtscript_initialize_com_trolltech_qt_multimedia_bindings(extensionObject);
+ } else {
+ Q_ASSERT_X(false, "com_trolltech_qt_multimedia::initialize", qPrintable(key));
+ }
+}
+
diff --git a/qtbindings/qtscript_multimedia/plugin.h b/qtbindings/qtscript_multimedia/plugin.h
new file mode 100644
index 0000000..9a6823e
--- /dev/null
+++ b/qtbindings/qtscript_multimedia/plugin.h
@@ -0,0 +1,16 @@
+#include
+#include
+#include
+
+void qtscript_initialize_com_trolltech_qt_multimedia_bindings(QScriptValue &);
+
+class com_trolltech_qt_multimedia_ScriptPlugin : public QScriptExtensionPlugin
+{
+Q_OBJECT
+Q_PLUGIN_METADATA(IID "com_trolltech_qt_multimedia_ScriptPlugin")
+public:
+ QStringList keys() const;
+ void initialize(const QString &key, QScriptEngine *engine);
+};
+
+
diff --git a/qtbindings/qtscript_multimedia/qtscript_multimedia.pro b/qtbindings/qtscript_multimedia/qtscript_multimedia.pro
new file mode 100644
index 0000000..f84e7a9
--- /dev/null
+++ b/qtbindings/qtscript_multimedia/qtscript_multimedia.pro
@@ -0,0 +1,7 @@
+TARGET = qtscript_multimedia
+include(../qtbindingsbase.pri)
+SOURCES += plugin.cpp
+HEADERS += plugin.h
+QT += core gui widgets multimedia
+INCLUDEPATH += ./include/
+include($$GENERATEDCPP/com_trolltech_qt_multimedia/com_trolltech_qt_multimedia.pri)
diff --git a/qtbindings/qtscript_network/include/__package_shared.h b/qtbindings/qtscript_network/include/__package_shared.h
new file mode 100644
index 0000000..98dc031
--- /dev/null
+++ b/qtbindings/qtscript_network/include/__package_shared.h
@@ -0,0 +1,20 @@
+
+#pragma once
+
+#include
+
+#ifdef QT_NO_SSL
+class QSslError : public QObject {
+ Q_OBJECT
+public:
+ QSslError(): QObject() {}
+ QSslError(const QSslError &) : QObject() {}
+};
+class QSslConfiguration : public QObject {
+ Q_OBJECT
+public:
+ QSslConfiguration() : QObject() {}
+ QSslConfiguration(const QSslConfiguration &) : QObject() {}
+};
+#endif
+
diff --git a/qtbindings/qtscript_network/plugin.cpp b/qtbindings/qtscript_network/plugin.cpp
new file mode 100644
index 0000000..6f42149
--- /dev/null
+++ b/qtbindings/qtscript_network/plugin.cpp
@@ -0,0 +1,26 @@
+#include
+#include
+#include
+#include
+#include "plugin.h"
+
+
+QStringList com_trolltech_qt_network_ScriptPlugin::keys() const
+{
+ QStringList list;
+ list << QLatin1String("qt");
+ list << QLatin1String("qt.network");
+ return list;
+}
+
+void com_trolltech_qt_network_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine)
+{
+ if (key == QLatin1String("qt")) {
+ } else if (key == QLatin1String("qt.network")) {
+ QScriptValue extensionObject = engine->globalObject();
+ qtscript_initialize_com_trolltech_qt_network_bindings(extensionObject);
+ } else {
+ Q_ASSERT_X(false, "com_trolltech_qt_network::initialize", qPrintable(key));
+ }
+}
+
diff --git a/qtbindings/qtscript_network/plugin.h b/qtbindings/qtscript_network/plugin.h
new file mode 100644
index 0000000..3ca1a29
--- /dev/null
+++ b/qtbindings/qtscript_network/plugin.h
@@ -0,0 +1,17 @@
+#include
+#include
+#include
+#include
+
+
+void qtscript_initialize_com_trolltech_qt_network_bindings(QScriptValue &);
+
+class com_trolltech_qt_network_ScriptPlugin : public QScriptExtensionPlugin
+{
+Q_OBJECT
+Q_PLUGIN_METADATA(IID "com.trolltech.qt.network.scriptPlugin")
+public:
+ QStringList keys() const;
+ void initialize(const QString &key, QScriptEngine *engine);
+};
+
diff --git a/qtbindings/qtscript_network/qtscript_network.pro b/qtbindings/qtscript_network/qtscript_network.pro
index 072e538..dfe99df 100644
--- a/qtbindings/qtscript_network/qtscript_network.pro
+++ b/qtbindings/qtscript_network/qtscript_network.pro
@@ -2,5 +2,7 @@ TARGET = qtscript_network
include(../qtbindingsbase.pri)
QT -= gui
QT += network
-SOURCES += $$GENERATEDCPP/com_trolltech_qt_network/plugin.cpp
+SOURCES += plugin.cpp
+HEADERS += plugin.h include/__package_shared.h
+INCLUDEPATH += ./include/
include($$GENERATEDCPP/com_trolltech_qt_network/com_trolltech_qt_network.pri)
diff --git a/qtbindings/qtscript_opengl/include/__package_shared.h b/qtbindings/qtscript_opengl/include/__package_shared.h
new file mode 100644
index 0000000..e118c0e
--- /dev/null
+++ b/qtbindings/qtscript_opengl/include/__package_shared.h
@@ -0,0 +1,5 @@
+
+#pragma once
+
+#include
+
diff --git a/qtbindings/qtscript_opengl/plugin.cpp b/qtbindings/qtscript_opengl/plugin.cpp
new file mode 100644
index 0000000..b664630
--- /dev/null
+++ b/qtbindings/qtscript_opengl/plugin.cpp
@@ -0,0 +1,26 @@
+#include
+#include
+#include
+#include
+#include "plugin.h"
+
+
+QStringList com_trolltech_qt_opengl_ScriptPlugin::keys() const
+{
+ QStringList list;
+ list << QLatin1String("qt");
+ list << QLatin1String("qt.opengl");
+ return list;
+}
+
+void com_trolltech_qt_opengl_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine)
+{
+ if (key == QLatin1String("qt")) {
+ } else if (key == QLatin1String("qt.opengl")) {
+ QScriptValue extensionObject = engine->globalObject();
+ qtscript_initialize_com_trolltech_qt_opengl_bindings(extensionObject);
+ } else {
+ Q_ASSERT_X(false, "com_trolltech_qt_opengl::initialize", qPrintable(key));
+ }
+}
+
diff --git a/qtbindings/qtscript_opengl/plugin.h b/qtbindings/qtscript_opengl/plugin.h
new file mode 100644
index 0000000..dba1b13
--- /dev/null
+++ b/qtbindings/qtscript_opengl/plugin.h
@@ -0,0 +1,17 @@
+#include
+#include
+#include
+#include
+
+
+void qtscript_initialize_com_trolltech_qt_opengl_bindings(QScriptValue &);
+
+class com_trolltech_qt_opengl_ScriptPlugin : public QScriptExtensionPlugin
+{
+Q_OBJECT
+Q_PLUGIN_METADATA(IID "com.trolltech.qt.opengl.scriptPlugin")
+public:
+ QStringList keys() const;
+ void initialize(const QString &key, QScriptEngine *engine);
+};
+
diff --git a/qtbindings/qtscript_opengl/qtscript_opengl.pro b/qtbindings/qtscript_opengl/qtscript_opengl.pro
index f231f2f..3c7d627 100644
--- a/qtbindings/qtscript_opengl/qtscript_opengl.pro
+++ b/qtbindings/qtscript_opengl/qtscript_opengl.pro
@@ -1,5 +1,7 @@
TARGET = qtscript_opengl
include(../qtbindingsbase.pri)
QT += opengl
-SOURCES += $$GENERATEDCPP/com_trolltech_qt_opengl/plugin.cpp
+SOURCES += plugin.cpp
+HEADERS += plugin.h
+INCLUDEPATH += ./include/
include($$GENERATEDCPP/com_trolltech_qt_opengl/com_trolltech_qt_opengl.pri)
diff --git a/qtbindings/qtscript_phonon/qtscript_phonon.pro b/qtbindings/qtscript_phonon/qtscript_phonon.pro
deleted file mode 100644
index 34bdae2..0000000
--- a/qtbindings/qtscript_phonon/qtscript_phonon.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-TARGET = qtscript_phonon
-include(../qtbindingsbase.pri)
-QT += phonon
-SOURCES += $$GENERATEDCPP/com_trolltech_qt_phonon/plugin.cpp
-include($$GENERATEDCPP/com_trolltech_qt_phonon/com_trolltech_qt_phonon.pri)
diff --git a/qtbindings/qtscript_printsupport/include/__package_shared.h b/qtbindings/qtscript_printsupport/include/__package_shared.h
new file mode 100644
index 0000000..5f8e223
--- /dev/null
+++ b/qtbindings/qtscript_printsupport/include/__package_shared.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#include
+#include
diff --git a/qtbindings/qtscript_printsupport/plugin.cpp b/qtbindings/qtscript_printsupport/plugin.cpp
new file mode 100644
index 0000000..aa0e1c8
--- /dev/null
+++ b/qtbindings/qtscript_printsupport/plugin.cpp
@@ -0,0 +1,24 @@
+#include
+#include
+#include
+#include "plugin.h"
+
+QStringList com_trolltech_qt_printsupport_ScriptPlugin::keys() const
+{
+ QStringList list;
+ list << QLatin1String("qt");
+ list << QLatin1String("qt.printsupport");
+ return list;
+}
+
+void com_trolltech_qt_printsupport_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine)
+{
+ if (key == QLatin1String("qt")) {
+ } else if (key == QLatin1String("qt.printsupport")) {
+ QScriptValue extensionObject = engine->globalObject();
+ qtscript_initialize_com_trolltech_qt_printsupport_bindings(extensionObject);
+ } else {
+ Q_ASSERT_X(false, "com_trolltech_qt_printsupport::initialize", qPrintable(key));
+ }
+}
+
diff --git a/qtbindings/qtscript_printsupport/plugin.h b/qtbindings/qtscript_printsupport/plugin.h
new file mode 100644
index 0000000..0027373
--- /dev/null
+++ b/qtbindings/qtscript_printsupport/plugin.h
@@ -0,0 +1,16 @@
+#include
+#include
+#include
+
+void qtscript_initialize_com_trolltech_qt_printsupport_bindings(QScriptValue &);
+
+class com_trolltech_qt_printsupport_ScriptPlugin : public QScriptExtensionPlugin
+{
+Q_OBJECT
+Q_PLUGIN_METADATA(IID "com_trolltech_qt_printsupport_ScriptPlugin")
+public:
+ QStringList keys() const;
+ void initialize(const QString &key, QScriptEngine *engine);
+};
+
+
diff --git a/qtbindings/qtscript_printsupport/qtscript_printsupport.pro b/qtbindings/qtscript_printsupport/qtscript_printsupport.pro
new file mode 100644
index 0000000..e74d858
--- /dev/null
+++ b/qtbindings/qtscript_printsupport/qtscript_printsupport.pro
@@ -0,0 +1,7 @@
+TARGET = qtscript_printsupport
+include(../qtbindingsbase.pri)
+SOURCES += plugin.cpp
+HEADERS += plugin.h
+QT += core gui widgets printsupport
+INCLUDEPATH += ./include/
+include($$GENERATEDCPP/com_trolltech_qt_printsupport/com_trolltech_qt_printsupport.pri)
diff --git a/qtbindings/qtscript_sql/include/__package_shared.h b/qtbindings/qtscript_sql/include/__package_shared.h
new file mode 100644
index 0000000..25f818e
--- /dev/null
+++ b/qtbindings/qtscript_sql/include/__package_shared.h
@@ -0,0 +1,3 @@
+
+#pragma once
+
diff --git a/qtbindings/qtscript_sql/plugin.cpp b/qtbindings/qtscript_sql/plugin.cpp
new file mode 100644
index 0000000..4629681
--- /dev/null
+++ b/qtbindings/qtscript_sql/plugin.cpp
@@ -0,0 +1,26 @@
+#include
+#include
+#include
+#include
+#include "plugin.h"
+
+
+QStringList com_trolltech_qt_sql_ScriptPlugin::keys() const
+{
+ QStringList list;
+ list << QLatin1String("qt");
+ list << QLatin1String("qt.sql");
+ return list;
+}
+
+void com_trolltech_qt_sql_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine)
+{
+ if (key == QLatin1String("qt")) {
+ } else if (key == QLatin1String("qt.sql")) {
+ QScriptValue extensionObject = engine->globalObject();
+ qtscript_initialize_com_trolltech_qt_sql_bindings(extensionObject);
+ } else {
+ Q_ASSERT_X(false, "com_trolltech_qt_sql::initialize", qPrintable(key));
+ }
+}
+
diff --git a/qtbindings/qtscript_sql/plugin.h b/qtbindings/qtscript_sql/plugin.h
new file mode 100644
index 0000000..40e65d4
--- /dev/null
+++ b/qtbindings/qtscript_sql/plugin.h
@@ -0,0 +1,17 @@
+#include
+#include
+#include
+#include
+
+
+void qtscript_initialize_com_trolltech_qt_sql_bindings(QScriptValue &);
+
+class com_trolltech_qt_sql_ScriptPlugin : public QScriptExtensionPlugin
+{
+Q_OBJECT
+Q_PLUGIN_METADATA(IID "com.trolltech.qt.sql.scriptPlugin")
+public:
+ QStringList keys() const;
+ void initialize(const QString &key, QScriptEngine *engine);
+};
+
diff --git a/qtbindings/qtscript_sql/qtscript_sql.pro b/qtbindings/qtscript_sql/qtscript_sql.pro
index 788c82f..1345504 100644
--- a/qtbindings/qtscript_sql/qtscript_sql.pro
+++ b/qtbindings/qtscript_sql/qtscript_sql.pro
@@ -2,5 +2,7 @@ TARGET = qtscript_sql
include(../qtbindingsbase.pri)
QT -= gui
QT += sql
-SOURCES += $$GENERATEDCPP/com_trolltech_qt_sql/plugin.cpp
+SOURCES += plugin.cpp
+HEADERS += plugin.h
+INCLUDEPATH += ./include/
include($$GENERATEDCPP/com_trolltech_qt_sql/com_trolltech_qt_sql.pri)
diff --git a/qtbindings/qtscript_svg/include/__package_shared.h b/qtbindings/qtscript_svg/include/__package_shared.h
new file mode 100644
index 0000000..5f8e223
--- /dev/null
+++ b/qtbindings/qtscript_svg/include/__package_shared.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#include
+#include
diff --git a/qtbindings/qtscript_svg/plugin.cpp b/qtbindings/qtscript_svg/plugin.cpp
new file mode 100644
index 0000000..489af35
--- /dev/null
+++ b/qtbindings/qtscript_svg/plugin.cpp
@@ -0,0 +1,26 @@
+#include
+#include
+#include
+#include
+#include "plugin.h"
+
+
+QStringList com_trolltech_qt_svg_ScriptPlugin::keys() const
+{
+ QStringList list;
+ list << QLatin1String("qt");
+ list << QLatin1String("qt.svg");
+ return list;
+}
+
+void com_trolltech_qt_svg_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine)
+{
+ if (key == QLatin1String("qt")) {
+ } else if (key == QLatin1String("qt.svg")) {
+ QScriptValue extensionObject = engine->globalObject();
+ qtscript_initialize_com_trolltech_qt_svg_bindings(extensionObject);
+ } else {
+ Q_ASSERT_X(false, "com_trolltech_qt_svg::initialize", qPrintable(key));
+ }
+}
+
diff --git a/qtbindings/qtscript_svg/plugin.h b/qtbindings/qtscript_svg/plugin.h
new file mode 100644
index 0000000..9759e94
--- /dev/null
+++ b/qtbindings/qtscript_svg/plugin.h
@@ -0,0 +1,17 @@
+#include
+#include
+#include
+#include
+
+
+void qtscript_initialize_com_trolltech_qt_svg_bindings(QScriptValue &);
+
+class com_trolltech_qt_svg_ScriptPlugin : public QScriptExtensionPlugin
+{
+Q_OBJECT
+Q_PLUGIN_METADATA(IID "com.trolltech.qt.svg.scriptPlugin")
+public:
+ QStringList keys() const;
+ void initialize(const QString &key, QScriptEngine *engine);
+};
+
diff --git a/qtbindings/qtscript_svg/qtscript_svg.pro b/qtbindings/qtscript_svg/qtscript_svg.pro
index 3aa7dcb..a65181c 100644
--- a/qtbindings/qtscript_svg/qtscript_svg.pro
+++ b/qtbindings/qtscript_svg/qtscript_svg.pro
@@ -1,5 +1,7 @@
TARGET = qtscript_svg
include(../qtbindingsbase.pri)
QT += svg
-SOURCES += $$GENERATEDCPP/com_trolltech_qt_svg/plugin.cpp
+SOURCES += plugin.cpp
+HEADERS += plugin.h
+INCLUDEPATH += ./include/
include($$GENERATEDCPP/com_trolltech_qt_svg/com_trolltech_qt_svg.pri)
diff --git a/qtbindings/qtscript_uitools/include/__package_shared.h b/qtbindings/qtscript_uitools/include/__package_shared.h
new file mode 100644
index 0000000..25f818e
--- /dev/null
+++ b/qtbindings/qtscript_uitools/include/__package_shared.h
@@ -0,0 +1,3 @@
+
+#pragma once
+
diff --git a/qtbindings/qtscript_uitools/plugin.cpp b/qtbindings/qtscript_uitools/plugin.cpp
new file mode 100644
index 0000000..abafb82
--- /dev/null
+++ b/qtbindings/qtscript_uitools/plugin.cpp
@@ -0,0 +1,26 @@
+#include
+#include
+#include
+#include
+#include "plugin.h"
+
+
+QStringList com_trolltech_qt_uitools_ScriptPlugin::keys() const
+{
+ QStringList list;
+ list << QLatin1String("qt");
+ list << QLatin1String("qt.uitools");
+ return list;
+}
+
+void com_trolltech_qt_uitools_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine)
+{
+ if (key == QLatin1String("qt")) {
+ } else if (key == QLatin1String("qt.uitools")) {
+ QScriptValue extensionObject = engine->globalObject();
+ qtscript_initialize_com_trolltech_qt_uitools_bindings(extensionObject);
+ } else {
+ Q_ASSERT_X(false, "com_trolltech_qt_uitools::initialize", qPrintable(key));
+ }
+}
+
diff --git a/qtbindings/qtscript_uitools/plugin.h b/qtbindings/qtscript_uitools/plugin.h
new file mode 100644
index 0000000..2fde0e0
--- /dev/null
+++ b/qtbindings/qtscript_uitools/plugin.h
@@ -0,0 +1,17 @@
+#include
+#include
+#include
+#include
+
+
+void qtscript_initialize_com_trolltech_qt_uitools_bindings(QScriptValue &);
+
+class com_trolltech_qt_uitools_ScriptPlugin : public QScriptExtensionPlugin
+{
+Q_OBJECT
+Q_PLUGIN_METADATA(IID "com.trolltech.qt.uitools.scriptPlugin")
+public:
+ QStringList keys() const;
+ void initialize(const QString &key, QScriptEngine *engine);
+};
+
diff --git a/qtbindings/qtscript_uitools/qtscript_uitools.pro b/qtbindings/qtscript_uitools/qtscript_uitools.pro
index 2f48778..6272007 100644
--- a/qtbindings/qtscript_uitools/qtscript_uitools.pro
+++ b/qtbindings/qtscript_uitools/qtscript_uitools.pro
@@ -1,5 +1,7 @@
TARGET = qtscript_uitools
include(../qtbindingsbase.pri)
-CONFIG += uitools
-SOURCES += $$GENERATEDCPP/com_trolltech_qt_uitools/plugin.cpp
+QT += uitools widgets
+SOURCES += plugin.cpp
+HEADERS += plugin.h
+INCLUDEPATH += ./include/ ${QTDIR}/lib/QtWidgets.framework/Headers
include($$GENERATEDCPP/com_trolltech_qt_uitools/com_trolltech_qt_uitools.pri)
diff --git a/qtbindings/qtscript_webkit/qtscript_webkit.pro b/qtbindings/qtscript_webkit/qtscript_webkit.pro
deleted file mode 100644
index 58bd913..0000000
--- a/qtbindings/qtscript_webkit/qtscript_webkit.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-TARGET = qtscript_webkit
-include(../qtbindingsbase.pri)
-QT += network webkit
-SOURCES += $$GENERATEDCPP/com_trolltech_qt_webkit/plugin.cpp
-include($$GENERATEDCPP/com_trolltech_qt_webkit/com_trolltech_qt_webkit.pri)
diff --git a/qtbindings/qtscript_widgets/include/__package_shared.h b/qtbindings/qtscript_widgets/include/__package_shared.h
new file mode 100644
index 0000000..5f8e223
--- /dev/null
+++ b/qtbindings/qtscript_widgets/include/__package_shared.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#include
+#include
diff --git a/qtbindings/qtscript_widgets/plugin.cpp b/qtbindings/qtscript_widgets/plugin.cpp
new file mode 100644
index 0000000..7514702
--- /dev/null
+++ b/qtbindings/qtscript_widgets/plugin.cpp
@@ -0,0 +1,24 @@
+#include
+#include
+#include
+#include "plugin.h"
+
+QStringList com_trolltech_qt_widgets_ScriptPlugin::keys() const
+{
+ QStringList list;
+ list << QLatin1String("qt");
+ list << QLatin1String("qt.widgets");
+ return list;
+}
+
+void com_trolltech_qt_widgets_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine)
+{
+ if (key == QLatin1String("qt")) {
+ } else if (key == QLatin1String("qt.widgets")) {
+ QScriptValue extensionObject = engine->globalObject();
+ qtscript_initialize_com_trolltech_qt_widgets_bindings(extensionObject);
+ } else {
+ Q_ASSERT_X(false, "com_trolltech_qt_widgets::initialize", qPrintable(key));
+ }
+}
+
diff --git a/qtbindings/qtscript_widgets/plugin.h b/qtbindings/qtscript_widgets/plugin.h
new file mode 100644
index 0000000..a753ff5
--- /dev/null
+++ b/qtbindings/qtscript_widgets/plugin.h
@@ -0,0 +1,16 @@
+#include
+#include
+#include
+
+void qtscript_initialize_com_trolltech_qt_widgets_bindings(QScriptValue &);
+
+class com_trolltech_qt_widgets_ScriptPlugin : public QScriptExtensionPlugin
+{
+Q_OBJECT
+Q_PLUGIN_METADATA(IID "com_trolltech_qt_widgets_ScriptPlugin")
+public:
+ QStringList keys() const;
+ void initialize(const QString &key, QScriptEngine *engine);
+};
+
+
diff --git a/qtbindings/qtscript_widgets/qtscript_widgets.pro b/qtbindings/qtscript_widgets/qtscript_widgets.pro
new file mode 100644
index 0000000..195b0d0
--- /dev/null
+++ b/qtbindings/qtscript_widgets/qtscript_widgets.pro
@@ -0,0 +1,7 @@
+TARGET = qtscript_widgets
+include(../qtbindingsbase.pri)
+SOURCES += plugin.cpp
+HEADERS += plugin.h
+QT += widgets gui
+INCLUDEPATH += ./include/
+include($$GENERATEDCPP/com_trolltech_qt_widgets/com_trolltech_qt_widgets.pri)
diff --git a/qtbindings/qtscript_xml/include/__package_shared.h b/qtbindings/qtscript_xml/include/__package_shared.h
new file mode 100644
index 0000000..25f818e
--- /dev/null
+++ b/qtbindings/qtscript_xml/include/__package_shared.h
@@ -0,0 +1,3 @@
+
+#pragma once
+
diff --git a/qtbindings/qtscript_xml/plugin.cpp b/qtbindings/qtscript_xml/plugin.cpp
new file mode 100644
index 0000000..30c0db7
--- /dev/null
+++ b/qtbindings/qtscript_xml/plugin.cpp
@@ -0,0 +1,26 @@
+#include
+#include
+#include
+#include
+#include "plugin.h"
+
+
+QStringList com_trolltech_qt_xml_ScriptPlugin::keys() const
+{
+ QStringList list;
+ list << QLatin1String("qt");
+ list << QLatin1String("qt.xml");
+ return list;
+}
+
+void com_trolltech_qt_xml_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine)
+{
+ if (key == QLatin1String("qt")) {
+ } else if (key == QLatin1String("qt.xml")) {
+ QScriptValue extensionObject = engine->globalObject();
+ qtscript_initialize_com_trolltech_qt_xml_bindings(extensionObject);
+ } else {
+ Q_ASSERT_X(false, "com_trolltech_qt_xml::initialize", qPrintable(key));
+ }
+}
+
diff --git a/qtbindings/qtscript_xml/plugin.h b/qtbindings/qtscript_xml/plugin.h
new file mode 100644
index 0000000..5891c45
--- /dev/null
+++ b/qtbindings/qtscript_xml/plugin.h
@@ -0,0 +1,17 @@
+#include
+#include
+#include
+#include