From 1ee038d05089aea25d3602f3e65592d7dd07b76f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Mon, 21 Sep 2009 18:18:26 +0200 Subject: Fixed compile for example support library --- examples/declarative/support/contact.cpp | 8 +++----- examples/declarative/support/contact.h | 5 ++--- examples/declarative/support/contactmodel.cpp | 5 ++--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/examples/declarative/support/contact.cpp b/examples/declarative/support/contact.cpp index 0821295..9ffeb97 100644 --- a/examples/declarative/support/contact.cpp +++ b/examples/declarative/support/contact.cpp @@ -12,7 +12,6 @@ ****************************************************************************/ #include "contact.h" -#include "qmltypes.h" QML_DEFINE_TYPE(0,0,0,0,Contact,Contact); Contact::Contact() : QObject(0) @@ -26,13 +25,13 @@ Contact::Contact() : QObject(0) m_numbers << new PhoneNumber; m_numbers << new PhoneNumber; m_numbers << new PhoneNumber; - + m_numbers.at(0)->setType(PhoneNumber::HomePhone); m_numbers.at(0)->setNumber("35412451"); m_numbers.at(1)->setType(PhoneNumber::BusinessPhone); m_numbers.at(1)->setNumber("33424994"); - + m_numbers.at(2)->setType(PhoneNumber::MobilePhone); m_numbers.at(2)->setNumber("0424655137"); @@ -52,8 +51,7 @@ Contact::Contact() : QObject(0) void Contact::addNumber(PhoneNumber *newNumber) { - - m_numbers << newNumber; + m_numbers << newNumber; emit numbersChanged(); } diff --git a/examples/declarative/support/contact.h b/examples/declarative/support/contact.h index c403f8b..7b25869 100644 --- a/examples/declarative/support/contact.h +++ b/examples/declarative/support/contact.h @@ -15,8 +15,7 @@ #define CONTACT_H #include -#include - +#include class Address : public QObject { @@ -105,7 +104,7 @@ public: Q_PROPERTY(QList* numbers READ numbers); QList* numbers() { return &m_numbers; } - + void addEmail(QString&); void addAddress(Address*); void addNumber(PhoneNumber*); diff --git a/examples/declarative/support/contactmodel.cpp b/examples/declarative/support/contactmodel.cpp index efe108fb..ff71b9c 100644 --- a/examples/declarative/support/contactmodel.cpp +++ b/examples/declarative/support/contactmodel.cpp @@ -12,7 +12,6 @@ ****************************************************************************/ #include "contactmodel.h" -#include "qmltypes.h" ContactModel::ContactModel(QObject *parent) : QListModelInterface(parent) { @@ -29,7 +28,7 @@ ContactModel::ContactModel(QObject *parent) : QListModelInterface(parent) c->addEmail(list[i]); //contactList.append(c); insertContact(c); - + text = ts.readLine(); } f.close(); @@ -149,7 +148,7 @@ int ContactModel::findIndex(QString &searchName) const else return middle; } return start; -} +} int ContactModel::isAfter(QString &name1, QString &name2) const { -- cgit v0.12 From ab3634173ba5d5ed084710a32508ea728378d038 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Tue, 22 Sep 2009 09:45:55 +1000 Subject: Repeater doc update. --- doc/src/snippets/declarative/repeater.qml | 16 +++++++++------- src/declarative/fx/qfxrepeater.cpp | 10 +++++----- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/doc/src/snippets/declarative/repeater.qml b/doc/src/snippets/declarative/repeater.qml index 309fead..f8ac856 100644 --- a/doc/src/snippets/declarative/repeater.qml +++ b/doc/src/snippets/declarative/repeater.qml @@ -1,14 +1,16 @@ import Qt 4.6 +Rectangle { + width: 220; height: 20; color: "white" + //! [0] -Rectangle { width: 220; height: 20; color: "white" - Component { id: Dot - Rectangle { width: 20; height: 20; radius: 10; color: "green" } - } - HorizontalLayout { + Row { Rectangle { width: 10; height: 20; color: "red" } - Repeater { component: Dot; dataSource: 10 } + Repeater { + model: 10 + Rectangle { width: 20; height: 20; radius: 10; color: "green" } + } Rectangle { width: 10; height: 20; color: "blue" } } -} //! [0] +} diff --git a/src/declarative/fx/qfxrepeater.cpp b/src/declarative/fx/qfxrepeater.cpp index 719aea9..84804ce 100644 --- a/src/declarative/fx/qfxrepeater.cpp +++ b/src/declarative/fx/qfxrepeater.cpp @@ -62,15 +62,15 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Repeater,QFxRepeater) \qmlclass Repeater \inherits Item - \brief The Repeater item allows you to repeat a component based on a data source. + \brief The Repeater item allows you to repeat a component based on a model. The Repeater item is used when you want to create a large number of - similar items. For each entry in the data source, an item is instantiated - in a context seeded with data from the data source. If the repeater will + similar items. For each entry in the model, an item is instantiated + in a context seeded with data from the model. If the repeater will be instantiating a large number of instances, it may be more efficient to use one of Qt Declarative's \l {xmlViews}{view items}. - The data source may be either an object list, a string list or a Qt model. + The model may be either an object list, a string list, a number or a Qt model. In each case, the data element and the index is exposed to each instantiated component. The index is always exposed as an accessible \c index property. In the case of an object or string list, the data element (of type string @@ -131,7 +131,7 @@ QFxRepeater::~QFxRepeater() The model providing data for the repeater. - The model may be either an object list, a string list or a Qt model. + The model may be either an object list, a string list, a number or a Qt model. In each case, the data element and the index is exposed to each instantiated component. The index is always exposed as an accessible \c index property. In the case of an object or string list, the data element (of type string -- cgit v0.12 From c38c6f984f3b08db106dcd249c3339d42cc82aa3 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Tue, 22 Sep 2009 10:06:49 +1000 Subject: Missing files. --- examples/declarative/modules/local/Foo.qml | 6 ++++++ examples/declarative/modules/local/SubLib/Bar.qml | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 examples/declarative/modules/local/Foo.qml create mode 100644 examples/declarative/modules/local/SubLib/Bar.qml diff --git a/examples/declarative/modules/local/Foo.qml b/examples/declarative/modules/local/Foo.qml new file mode 100644 index 0000000..6cb07d5 --- /dev/null +++ b/examples/declarative/modules/local/Foo.qml @@ -0,0 +1,6 @@ +import Qt 4.6 + +Text { + text: "lib/Foo.qml" + color: "#00ff00" +} diff --git a/examples/declarative/modules/local/SubLib/Bar.qml b/examples/declarative/modules/local/SubLib/Bar.qml new file mode 100644 index 0000000..ad09d2e --- /dev/null +++ b/examples/declarative/modules/local/SubLib/Bar.qml @@ -0,0 +1,6 @@ +import Qt 4.6 + +Text { + text: "lib/SubLib/Bar.qml" + color: "#8898FF" +} -- cgit v0.12 From d125e01313b269d70577975f6e78d28a9105ada1 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Tue, 22 Sep 2009 10:07:01 +1000 Subject: Ensure absolute path for qmldir URL. --- src/declarative/qml/qmlengine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index c6edbe2..dd6b5a4 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -1519,8 +1519,9 @@ public: bool found = false; foreach (QString p, importPath) { QString dir = p+QLatin1Char('/')+url; - if (QFile::exists(dir+QLatin1String("/qmldir"))) { - url = QLatin1String("file://")+dir; + QFileInfo fi(dir+QLatin1String("/qmldir")); + if (fi.isFile()) { + url = QUrl::fromLocalFile(fi.absolutePath()).toString(); found = true; break; } -- cgit v0.12 From 7aee99a762280251297486f118ca2a3cd6762883 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Tue, 22 Sep 2009 10:24:23 +1000 Subject: Syntax update id must not be a type Image::fillMode change --- examples/declarative/aspectratio/face_fit.qml | 6 +++--- .../declarative/aspectratio/face_fit_animated.qml | 6 +++--- examples/declarative/aspectratio/scale_and_crop.qml | 6 +++--- .../declarative/aspectratio/scale_and_crop_simple.qml | 19 +++++++++++++++++++ .../declarative/aspectratio/scale_and_sidecrop.qml | 6 +++--- examples/declarative/aspectratio/scale_to_fit.qml | 6 +++--- .../declarative/aspectratio/scale_to_fit_simple.qml | 10 +++++----- 7 files changed, 39 insertions(+), 20 deletions(-) create mode 100644 examples/declarative/aspectratio/scale_and_crop_simple.qml diff --git a/examples/declarative/aspectratio/face_fit.qml b/examples/declarative/aspectratio/face_fit.qml index 4573160..8d38cca 100644 --- a/examples/declarative/aspectratio/face_fit.qml +++ b/examples/declarative/aspectratio/face_fit.qml @@ -8,13 +8,13 @@ import Qt 4.6 // Rectangle { // default size: whole image, unscaled - width: Image.width - height: Image.height + width: Face.width + height: Face.height color: "gray" clip: true Image { - id: Image + id: Face source: "pics/face.png" x: (parent.width-width*scale)/2 y: (parent.height-height*scale)/2 diff --git a/examples/declarative/aspectratio/face_fit_animated.qml b/examples/declarative/aspectratio/face_fit_animated.qml index 7db1c80..7d73900 100644 --- a/examples/declarative/aspectratio/face_fit_animated.qml +++ b/examples/declarative/aspectratio/face_fit_animated.qml @@ -6,13 +6,13 @@ import Qt 4.6 // Rectangle { // default size: whole image, unscaled - width: Image.width - height: Image.height + width: Face.width + height: Face.height color: "gray" clip: true Image { - id: Image + id: Face source: "pics/face.png" x: (parent.width-width*scale)/2 y: (parent.height-height*scale)/2 diff --git a/examples/declarative/aspectratio/scale_and_crop.qml b/examples/declarative/aspectratio/scale_and_crop.qml index 75080b4..3cace8d 100644 --- a/examples/declarative/aspectratio/scale_and_crop.qml +++ b/examples/declarative/aspectratio/scale_and_crop.qml @@ -4,13 +4,13 @@ import Qt 4.6 // Rectangle { // default size: whole image, unscaled - width: Image.width - height: Image.height + width: Face.width + height: Face.height color: "gray" clip: true Image { - id: Image + id: Face source: "pics/face.png" x: (parent.width-width*scale)/2 y: (parent.height-height*scale)/2 diff --git a/examples/declarative/aspectratio/scale_and_crop_simple.qml b/examples/declarative/aspectratio/scale_and_crop_simple.qml new file mode 100644 index 0000000..26758e6 --- /dev/null +++ b/examples/declarative/aspectratio/scale_and_crop_simple.qml @@ -0,0 +1,19 @@ +import Qt 4.6 + +// Here, we implement "Scale to Fit" behaviour, using the +// fillMode property. +// +Rectangle { + // default size: whole image, unscaled + width: Face.width + height: Face.height + color: "gray" + clip: true + + Image { + id: Face + source: "pics/face.png" + fillMode: "PreserveAspectCrop" + anchors.fill: parent + } +} diff --git a/examples/declarative/aspectratio/scale_and_sidecrop.qml b/examples/declarative/aspectratio/scale_and_sidecrop.qml index a6bd2c8..18cc110 100644 --- a/examples/declarative/aspectratio/scale_and_sidecrop.qml +++ b/examples/declarative/aspectratio/scale_and_sidecrop.qml @@ -5,13 +5,13 @@ import Qt 4.6 // Rectangle { // default size: whole image, unscaled - width: Image.width - height: Image.height + width: Face.width + height: Face.height color: "gray" clip: true Image { - id: Image + id: Face source: "pics/face.png" x: (parent.width-width*scale)/2 y: (parent.height-height*scale)/2 diff --git a/examples/declarative/aspectratio/scale_to_fit.qml b/examples/declarative/aspectratio/scale_to_fit.qml index 744abce..7450ea4 100644 --- a/examples/declarative/aspectratio/scale_to_fit.qml +++ b/examples/declarative/aspectratio/scale_to_fit.qml @@ -5,13 +5,13 @@ import Qt 4.6 // Rectangle { // default size: whole image, unscaled - width: Image.width - height: Image.height + width: Face.width + height: Face.height color: "gray" clip: true Image { - id: Image + id: Face source: "pics/face.png" x: (parent.width-width*scale)/2 y: (parent.height-height*scale)/2 diff --git a/examples/declarative/aspectratio/scale_to_fit_simple.qml b/examples/declarative/aspectratio/scale_to_fit_simple.qml index 4ee06ba..dcccd69 100644 --- a/examples/declarative/aspectratio/scale_to_fit_simple.qml +++ b/examples/declarative/aspectratio/scale_to_fit_simple.qml @@ -1,19 +1,19 @@ import Qt 4.6 // Here, we implement "Scale to Fit" behaviour, using the -// preserveAspect property. +// fillMode property. // Rectangle { // default size: whole image, unscaled - width: Image.width - height: Image.height + width: Face.width + height: Face.height color: "gray" clip: true Image { - id: Image + id: Face source: "pics/face.png" - fillMode: "PreserveAspect" + fillMode: "PreserveAspectFit" anchors.fill: parent } } -- cgit v0.12 From 5e5c9c8a7b3184f1c7874fec47d9e3c133cb7146 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Tue, 22 Sep 2009 10:38:30 +1000 Subject: import does not currently insist on a version, it should for these cases (but not for non-installed local files) --- .../declarative/qmlparser/importVersionMissingBuiltIn.errors.txt | 1 + tests/auto/declarative/qmlparser/importVersionMissingBuiltIn.qml | 7 +++++++ .../declarative/qmlparser/importVersionMissingInstalled.errors.txt | 1 + tests/auto/declarative/qmlparser/importVersionMissingInstalled.qml | 3 +++ tests/auto/declarative/qmlparser/tst_qmlparser.cpp | 2 ++ 5 files changed, 14 insertions(+) create mode 100644 tests/auto/declarative/qmlparser/importVersionMissingBuiltIn.errors.txt create mode 100644 tests/auto/declarative/qmlparser/importVersionMissingBuiltIn.qml create mode 100644 tests/auto/declarative/qmlparser/importVersionMissingInstalled.errors.txt create mode 100644 tests/auto/declarative/qmlparser/importVersionMissingInstalled.qml diff --git a/tests/auto/declarative/qmlparser/importVersionMissingBuiltIn.errors.txt b/tests/auto/declarative/qmlparser/importVersionMissingBuiltIn.errors.txt new file mode 100644 index 0000000..2235cbc --- /dev/null +++ b/tests/auto/declarative/qmlparser/importVersionMissingBuiltIn.errors.txt @@ -0,0 +1 @@ +SHOULD GIVE AN ERROR ABOUT MISSING VERSION diff --git a/tests/auto/declarative/qmlparser/importVersionMissingBuiltIn.qml b/tests/auto/declarative/qmlparser/importVersionMissingBuiltIn.qml new file mode 100644 index 0000000..23ed566 --- /dev/null +++ b/tests/auto/declarative/qmlparser/importVersionMissingBuiltIn.qml @@ -0,0 +1,7 @@ +import Test as S + +S.MyQmlObject { + property real x; + property real y; +} + diff --git a/tests/auto/declarative/qmlparser/importVersionMissingInstalled.errors.txt b/tests/auto/declarative/qmlparser/importVersionMissingInstalled.errors.txt new file mode 100644 index 0000000..2235cbc --- /dev/null +++ b/tests/auto/declarative/qmlparser/importVersionMissingInstalled.errors.txt @@ -0,0 +1 @@ +SHOULD GIVE AN ERROR ABOUT MISSING VERSION diff --git a/tests/auto/declarative/qmlparser/importVersionMissingInstalled.qml b/tests/auto/declarative/qmlparser/importVersionMissingInstalled.qml new file mode 100644 index 0000000..97ec222 --- /dev/null +++ b/tests/auto/declarative/qmlparser/importVersionMissingInstalled.qml @@ -0,0 +1,3 @@ +import com.nokia.installedtest as T + +T.InstalledTest {} diff --git a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp index b8bd0e7..ee1b072 100644 --- a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp +++ b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp @@ -160,6 +160,8 @@ void tst_qmlparser::errors_data() QTest::newRow("finalOverride") << "finalOverride.qml" << "finalOverride.errors.txt" << false; QTest::newRow("importNamespaceConflict") << "importNamespaceConflict.qml" << "importNamespaceConflict.errors.txt" << false; + QTest::newRow("importVersionMissing (builtin)") << "importVersionMissingBuiltIn.qml" << "importVersionMissingBuiltIn.errors.txt" << false; + QTest::newRow("importVersionMissing (installed)") << "importVersionMissingInstalled.qml" << "importVersionMissingInstalled.errors.txt" << false; QTest::newRow("customParserIdNotAllowed") << "customParserIdNotAllowed.qml" << "customParserIdNotAllowed.errors.txt" << false; } -- cgit v0.12 From dbd57aaa5fdcae647b9def443631ce39af72401d Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Tue, 22 Sep 2009 10:44:41 +1000 Subject: Doc --- doc/src/snippets/declarative/repeater.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/src/snippets/declarative/repeater.qml b/doc/src/snippets/declarative/repeater.qml index 309fead..cb7a069 100644 --- a/doc/src/snippets/declarative/repeater.qml +++ b/doc/src/snippets/declarative/repeater.qml @@ -1,13 +1,14 @@ import Qt 4.6 //! [0] -Rectangle { width: 220; height: 20; color: "white" +Rectangle { + width: 220; height: 20; color: "white" Component { id: Dot Rectangle { width: 20; height: 20; radius: 10; color: "green" } } - HorizontalLayout { + Row { Rectangle { width: 10; height: 20; color: "red" } - Repeater { component: Dot; dataSource: 10 } + Repeater { delegate: Dot; model: 10 } Rectangle { width: 10; height: 20; color: "blue" } } } -- cgit v0.12 From ee72eef536c42a3f18d59fd5f3e1d14eb8d8e9d9 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 22 Sep 2009 14:10:29 +1000 Subject: Fixes for framerate monitor. --- src/declarative/util/qfxview.cpp | 2 +- tools/qmldebugger/canvasframerate.cpp | 23 ++++++++++++++++++++++- tools/qmldebugger/canvasframerate.h | 2 ++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp index f67dc75..17bbd1b 100644 --- a/src/declarative/util/qfxview.cpp +++ b/src/declarative/util/qfxview.cpp @@ -103,7 +103,7 @@ public: int e = timer.elapsed(); QByteArray data; QDataStream ds(&data, QIODevice::WriteOnly); - ds << (int)pe << (int)pe << (int)tbf << (int)e + ds << (int)pe << (int)tbf << (int)e << (bool)isFrameBreak; sendMessage(data); } diff --git a/tools/qmldebugger/canvasframerate.cpp b/tools/qmldebugger/canvasframerate.cpp index ae514a5..0d23050 100644 --- a/tools/qmldebugger/canvasframerate.cpp +++ b/tools/qmldebugger/canvasframerate.cpp @@ -13,6 +13,8 @@ #include #include #include +#include +#include QT_BEGIN_NAMESPACE @@ -26,6 +28,7 @@ public: public slots: void addSample(int, int, int, bool); + void setResolutionForHeight(int); protected: virtual void paintEvent(QPaintEvent *); @@ -153,7 +156,7 @@ void QLineGraph::drawSample(QPainter *p, int s, const QRect &rect) first = qMax(0, _samples.count() - samplesPerWidth - 1); int last = qMin(_samples.count() - 1, first + samplesPerWidth); - qreal scaleY = rect.height() / resolutionForHeight; + qreal scaleY = qreal(rect.height()) / resolutionForHeight; qreal scaleX = qreal(rect.width()) / qreal(samplesPerWidth); int xEnd; @@ -205,6 +208,12 @@ void QLineGraph::paintEvent(QPaintEvent *) drawTime(&p, r); } +void QLineGraph::setResolutionForHeight(int resolution) +{ + resolutionForHeight = resolution; + update(); +} + class CanvasFrameRatePlugin : public QmlDebugClient { Q_OBJECT @@ -256,7 +265,18 @@ CanvasFrameRate::CanvasFrameRate(QmlDebugConnection *client, QWidget *parent) layout->addWidget(m_tabs); QHBoxLayout *bottom = new QHBoxLayout; + bottom->setSpacing(5); layout->addLayout(bottom); + + QLabel *label = new QLabel("Resolution", this); + bottom->addWidget(label); + + m_spin = new QSpinBox(this); + m_spin->setRange(50,200); + m_spin->setValue(50); + m_spin->setSuffix("ms"); + bottom->addWidget(m_spin); + bottom->addStretch(2); QCheckBox *check = new QCheckBox("Enable", this); @@ -284,6 +304,7 @@ void CanvasFrameRate::newTab() QLineGraph *graph = new QLineGraph(this); QObject::connect(m_plugin, SIGNAL(sample(int,int,int,bool)), graph, SLOT(addSample(int,int,int,bool))); + QObject::connect(m_spin, SIGNAL(valueChanged(int)), graph, SLOT(setResolutionForHeight(int))); QString name = QLatin1String("Graph ") + QString::number(id); m_tabs->addTab(graph, name); diff --git a/tools/qmldebugger/canvasframerate.h b/tools/qmldebugger/canvasframerate.h index 912412b..cef267d 100644 --- a/tools/qmldebugger/canvasframerate.h +++ b/tools/qmldebugger/canvasframerate.h @@ -7,6 +7,7 @@ QT_BEGIN_NAMESPACE class QmlDebugConnection; class QTabWidget; +class QSpinBox; class CanvasFrameRate : public QWidget { Q_OBJECT @@ -19,6 +20,7 @@ private slots: private: QTabWidget *m_tabs; + QSpinBox *m_spin; QObject *m_plugin; }; -- cgit v0.12 From 835a83221232d1963d4ab0b9e553cc32cb9bc8c9 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Tue, 22 Sep 2009 14:30:07 +1000 Subject: Renaming: QFxView -> QmlView --- demos/declarative/minehunt/main.cpp | 6 +- doc/src/declarative/binding.qdoc | 2 +- doc/src/declarative/focus.qdoc | 2 +- doc/src/declarative/qtprogrammers.qdoc | 2 +- examples/declarative/loader/main.cpp | 6 +- src/declarative/fx/qfxborderimage.cpp | 2 +- src/declarative/fx/qfximage.cpp | 2 +- src/declarative/fx/qfxitem.cpp | 4 +- src/declarative/fx/qfxpainteditem.cpp | 2 +- src/declarative/fx/qfxrect.cpp | 4 +- src/declarative/fx/qfxtext.cpp | 2 +- src/declarative/fx/qfxtextedit.cpp | 2 +- src/declarative/fx/qfxwebview.cpp | 2 +- src/declarative/util/qfxview.cpp | 579 --------------------- src/declarative/util/qfxview.h | 113 ---- src/declarative/util/qmlview.cpp | 579 +++++++++++++++++++++ src/declarative/util/qmlview.h | 113 ++++ src/declarative/util/util.pri | 4 +- tests/auto/declarative/anchors/tst_anchors.cpp | 14 +- .../auto/declarative/animations/tst_animations.cpp | 4 +- tests/auto/declarative/layouts/tst_layouts.cpp | 20 +- tests/auto/declarative/listview/tst_listview.cpp | 16 +- tests/auto/declarative/pathview/tst_pathview.cpp | 14 +- .../declarative/qfxtextedit/tst_qfxtextedit.cpp | 4 +- .../declarative/qfxtextinput/tst_qfxtextinput.cpp | 20 +- tests/auto/declarative/repeater/tst_repeater.cpp | 10 +- tests/auto/declarative/visual/tst_visual.cpp | 2 +- tools/qmldebugger/engine.cpp | 2 +- tools/qmldebugger/engine.h | 4 +- tools/qmlviewer/qfxtester.cpp | 4 +- tools/qmlviewer/qfxtester.h | 4 +- tools/qmlviewer/qmlviewer.cpp | 4 +- tools/qmlviewer/qmlviewer.h | 4 +- 33 files changed, 776 insertions(+), 776 deletions(-) delete mode 100644 src/declarative/util/qfxview.cpp delete mode 100644 src/declarative/util/qfxview.h create mode 100644 src/declarative/util/qmlview.cpp create mode 100644 src/declarative/util/qmlview.h diff --git a/demos/declarative/minehunt/main.cpp b/demos/declarative/minehunt/main.cpp index 20f7492..a9b8828 100644 --- a/demos/declarative/minehunt/main.cpp +++ b/demos/declarative/minehunt/main.cpp @@ -2,7 +2,7 @@ #include "qmlcontext.h" #include "qml.h" #include -#include +#include #include #include @@ -94,7 +94,7 @@ private: int getHint(int row, int col); void setPlaying(bool b){if(b==playing) return; playing=b; emit isPlayingChanged();} - QFxView *canvas; + QmlView *canvas; QList _tiles; int numCols; @@ -123,7 +123,7 @@ MyWidget::MyWidget(int width, int height, QWidget *parent, Qt::WindowFlags flags vbox->setMargin(0); setLayout(vbox); - canvas = new QFxView(this); + canvas = new QmlView(this); canvas->setFixedSize(width, height); vbox->addWidget(canvas); diff --git a/doc/src/declarative/binding.qdoc b/doc/src/declarative/binding.qdoc index 7e8933f..37b4c97 100644 --- a/doc/src/declarative/binding.qdoc +++ b/doc/src/declarative/binding.qdoc @@ -86,7 +86,7 @@ void setBrightness(int b) Next, make an instance of this class visible to the QML bind engine: \code -QFxView *view = new QFxView; +QmlView *view = new QmlView; view->setUrl("MyUI.qml"); MyScreen *screen = new MyScreen; diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc index 7c293ee..028b5f0 100644 --- a/doc/src/declarative/focus.qdoc +++ b/doc/src/declarative/focus.qdoc @@ -13,7 +13,7 @@ and to address some of the cases unique to fluid user interfaces, the QML items When the user presses or releases a key, the following occurs: \list 1 \o Qt receives the key action and generates a key event. -\o If the Qt widget containing the \l QFxView has focus, the key event is delivered to it. Otherwise, regular Qt key handling continues. +\o If the Qt widget containing the \l QmlView has focus, the key event is delivered to it. Otherwise, regular Qt key handling continues. \o The key event is delivered by the scene to the QML \l Item with \e {active focus}. If no \l Item has \e {active focus}, the key event is \l {QEvent::ignore()}{ignored} and regular Qt key handling continues. \o If the QML \l Item with \e {active focus} accepts the key event, propagation stops. Otherwise the event is "bubbled up", by recursively passing it to each \l Item's parent until either the event is accepted, or the root \l Item is reached. diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc index 742fc07..3b20539 100644 --- a/doc/src/declarative/qtprogrammers.qdoc +++ b/doc/src/declarative/qtprogrammers.qdoc @@ -20,7 +20,7 @@ QML provides direct access to the following concepts from Qt: \o QAction - the \l {basicqmlaction}{action} type \o QObject signals and slots - available as functions to call in JavaScript \o QObject properties - available as variables in JavaScript - \o QWidget - QFxView is a QML-displaying widget + \o QWidget - QmlView is a QML-displaying widget \o Qt models - used directly in data binding (QAbstractItemModel and next generation QListModelInterface) \endlist diff --git a/examples/declarative/loader/main.cpp b/examples/declarative/loader/main.cpp index 68f20d4..fbae5f1 100644 --- a/examples/declarative/loader/main.cpp +++ b/examples/declarative/loader/main.cpp @@ -11,12 +11,12 @@ #include #include #include -#include +#include #include #include #include -QFxView *canvas = 0; +QmlView *canvas = 0; class Logger : public QWidget { @@ -181,7 +181,7 @@ int main(int argc, char *argv[]) QObject::connect(Logger::instance(), SIGNAL(textChanged()), launcher, SIGNAL(logUpdated())); - canvas = new QFxView; + canvas = new QmlView; canvas->setFocusPolicy(Qt::StrongFocus); canvas->engine()->setNetworkAccessManager(new ConfiguredNetworkAccessManager); diff --git a/src/declarative/fx/qfxborderimage.cpp b/src/declarative/fx/qfxborderimage.cpp index ee505f2..3bc76da 100644 --- a/src/declarative/fx/qfxborderimage.cpp +++ b/src/declarative/fx/qfxborderimage.cpp @@ -65,7 +65,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,BorderImage,QFxBorderImage) /*! \internal \class QFxBorderImage BorderImage - \brief The QFxBorderImage class provides an image item that you can add to a QFxView. + \brief The QFxBorderImage class provides an image item that you can add to a QmlView. */ QFxBorderImage::QFxBorderImage(QFxItem *parent) diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index 3ac3f3c..860af66 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -113,7 +113,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Image,QFxImage) /*! \internal \class QFxImage Image - \brief The QFxImage class provides an image item that you can add to a QFxView. + \brief The QFxImage class provides an image item that you can add to a QmlView. \ingroup group_coreitems diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 1ca5254..7f4e6b1 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -56,7 +56,7 @@ #include "qmlstate.h" #include "qlistmodelinterface.h" -#include "qfxview.h" +#include "qmlview.h" #include "qmlstategroup.h" #include "qfxitem_p.h" @@ -1216,7 +1216,7 @@ QFxKeysAttached *QFxKeysAttached::qmlAttachedProperties(QObject *obj) /*! \class QFxItem Item - \brief The QFxItem class is a generic QFxView item. It is the base class for all other view items. + \brief The QFxItem class is a generic QmlView item. It is the base class for all other view items. \qmltext All visual items in Qt Declarative inherit from QFxItem. Although QFxItem diff --git a/src/declarative/fx/qfxpainteditem.cpp b/src/declarative/fx/qfxpainteditem.cpp index 5471e1b..1ed44a9 100644 --- a/src/declarative/fx/qfxpainteditem.cpp +++ b/src/declarative/fx/qfxpainteditem.cpp @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE /*! \class QFxPaintedItem - \brief The QFxPaintedItem class is an abstract base class for QFxView items that want cached painting. + \brief The QFxPaintedItem class is an abstract base class for QmlView items that want cached painting. \ingroup group_coreitems This is a convenience class for implementing items that paint their contents diff --git a/src/declarative/fx/qfxrect.cpp b/src/declarative/fx/qfxrect.cpp index 7d6340f..1a41b5d 100644 --- a/src/declarative/fx/qfxrect.cpp +++ b/src/declarative/fx/qfxrect.cpp @@ -52,7 +52,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Gradient,QFxGradient) /*! \internal \class QFxPen - \brief The QFxPen class provides a pen used for drawing rectangle borders on a QFxView. + \brief The QFxPen class provides a pen used for drawing rectangle borders on a QmlView. By default, the pen is invalid and nothing is drawn. You must either set a color (then the default width is 1) or a width (then the default color is black). @@ -175,7 +175,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rectangle,QFxRect) /*! \internal \class QFxRect - \brief The QFxRect class provides a rectangle item that you can add to a QFxView. + \brief The QFxRect class provides a rectangle item that you can add to a QmlView. */ QFxRect::QFxRect(QFxItem *parent) : QFxItem(*(new QFxRectPrivate), parent) diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp index a76b8e6..7c7b3b0 100644 --- a/src/declarative/fx/qfxtext.cpp +++ b/src/declarative/fx/qfxtext.cpp @@ -84,7 +84,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Text,QFxText) \qmlclass Text \ingroup group_coreitems - \brief The QFxText class provides a formatted text item that you can add to a QFxView. + \brief The QFxText class provides a formatted text item that you can add to a QmlView. Text was designed for read-only text; it does not allow for any text editing. It can display both plain and rich text. For example: diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp index d1bafd6..8094d32 100644 --- a/src/declarative/fx/qfxtextedit.cpp +++ b/src/declarative/fx/qfxtextedit.cpp @@ -84,7 +84,7 @@ TextEdit { \qmlclass TextEdit \ingroup group_coreitems - \brief The QFxTextEdit class provides an editable formatted text item that you can add to a QFxView. + \brief The QFxTextEdit class provides an editable formatted text item that you can add to a QmlView. It can display both plain and rich text. diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp index bcbedfb..a06e294 100644 --- a/src/declarative/fx/qfxwebview.cpp +++ b/src/declarative/fx/qfxwebview.cpp @@ -241,7 +241,7 @@ public: /*! \internal \class QFxWebView - \brief The QFxWebView class allows you to add web content to a QFxView. + \brief The QFxWebView class allows you to add web content to a QmlView. A WebView renders web content base on a URL. diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp deleted file mode 100644 index f67dc75..0000000 --- a/src/declarative/util/qfxview.cpp +++ /dev/null @@ -1,579 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qscriptvalueiterator.h" -#include "qdebug.h" -#include "qtimer.h" -#include "qevent.h" -#include "qdir.h" -#include "qcoreapplication.h" -#include "qfontdatabase.h" -#include "qicon.h" -#include "qurl.h" -#include "qboxlayout.h" -#include "qbasictimer.h" - -#include "qml.h" -#include "qfxitem.h" -#include "private/qperformancelog_p.h" -#include "private/qfxperf_p.h" - -#include "qfxview.h" -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -DEFINE_BOOL_CONFIG_OPTION(frameRateDebug, QML_SHOW_FRAMERATE) - -class QFxViewDebugServer; -class FrameBreakAnimation : public QAbstractAnimation -{ -public: - FrameBreakAnimation(QFxViewDebugServer *s) - : QAbstractAnimation((QObject*)s), server(s) - { - start(); - } - - virtual int duration() const { return -1; } - virtual void updateCurrentTime(int msecs); - -private: - QFxViewDebugServer *server; -}; - -class QFxViewDebugServer : public QmlDebugService -{ -public: - QFxViewDebugServer(QObject *parent = 0) : QmlDebugService(QLatin1String("CanvasFrameRate"), parent), breaks(0) - { - timer.start(); - new FrameBreakAnimation(this); - } - - void addTiming(int pe, int tbf) - { - if (!isEnabled()) - return; - - bool isFrameBreak = breaks > 1; - breaks = 0; - int e = timer.elapsed(); - QByteArray data; - QDataStream ds(&data, QIODevice::WriteOnly); - ds << (int)pe << (int)pe << (int)tbf << (int)e - << (bool)isFrameBreak; - sendMessage(data); - } - - void frameBreak() { ++breaks; } - -private: - QTime timer; - int breaks; -}; - -Q_GLOBAL_STATIC(QFxViewDebugServer, qfxViewDebugServer); - -void FrameBreakAnimation::updateCurrentTime(int msecs) -{ - Q_UNUSED(msecs); - server->frameBreak(); -} - - -static QVariant stringToKeySequence(const QString &str) -{ - return QVariant::fromValue(QKeySequence(str)); -} - -class QFxViewPrivate -{ -public: - QFxViewPrivate(QFxView *w) - : q(w), root(0), component(0), resizable(false) {} - - QFxView *q; - QFxItem *root; - - QUrl source; - QString qml; - - QmlEngine engine; - QmlComponent *component; - QBasicTimer resizetimer; - - QSize initialSize; - bool resizable; - QTime frameTimer; - - void init(); - - QGraphicsScene scene; -}; - -/*! - \class QFxView - \brief The QFxView class provides a widget for displaying a Qt Declarative user interface. - - QFxView currently provides a minimal interface for displaying QML - files, and connecting between QML and C++ Qt objects. - - Typical usage: - \code - ... - QFxView *view = new QFxView(this); - vbox->addWidget(view); - - QUrl url(fileName); - view->setUrl(url); - ... - view->execute(); - ... - \endcode -*/ - -/*! - \fn QFxView::QFxView(QWidget *parent) - - Constructs a QFxView with the given \a parent. -*/ -QFxView::QFxView(QWidget *parent) -: QGraphicsView(parent), d(new QFxViewPrivate(this)) -{ - setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred); - d->init(); -} - -void QFxViewPrivate::init() -{ - // XXX: These need to be put in a central location for this kind of thing - QmlMetaType::registerCustomStringConverter(QVariant::KeySequence, &stringToKeySequence); - -#ifdef Q_ENABLE_PERFORMANCE_LOG - QFxPerfTimer perf; -#endif - QFontDatabase database; - - q->setScene(&scene); - - q->setOptimizationFlags(QGraphicsView::DontSavePainterState); - q->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - q->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - q->setFrameStyle(0); - - // These seem to give the best performance - q->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); - scene.setItemIndexMethod(QGraphicsScene::NoIndex); - q->viewport()->setFocusPolicy(Qt::NoFocus); - - scene.setStickyFocus(true); //### needed for correct focus handling -} - -/*! - The destructor clears the view's \l {QFxItem} {items} and - deletes the internal representation. - - \sa clearItems() - */ -QFxView::~QFxView() -{ - clearItems(); - delete d; d = 0; -} - -/*! - Sets the source to the \a url. The QML string is set to - empty. - */ -void QFxView::setUrl(const QUrl& url) -{ - d->source = url; - d->qml = QString(); -} - -/*! - Sets the source to the URL from the \a filename, and sets - the QML string to \a qml. - */ -void QFxView::setQml(const QString &qml, const QString &filename) -{ - d->source = QUrl::fromLocalFile(filename); - d->qml = qml; -} - -/*! - Returns the QML string. - */ -QString QFxView::qml() const -{ - return d->qml; -} - -/*! - Returns a pointer to the QmlEngine used for instantiating - QML Components. - */ -QmlEngine* QFxView::engine() -{ - return &d->engine; -} - -/*! - This function returns the root of the context hierarchy. Each QML - component is instantiated in a QmlContext. QmlContext's are - essential for passing data to QML components. In QML, contexts are - arranged hierarchically and this hierarchy is managed by the - QmlEngine. - */ -QmlContext* QFxView::rootContext() -{ - return d->engine.rootContext(); -} - -/*! - Displays the Qt Declarative user interface. -*/ -void QFxView::execute() -{ - if (d->qml.isEmpty()) { - d->component = new QmlComponent(&d->engine, d->source, this); - } else { - d->component = new QmlComponent(&d->engine, d->qml.toUtf8(), d->source, this); - } - - if (!d->component->isLoading()) { - continueExecute(); - } else { - connect(d->component, SIGNAL(statusChanged(QmlComponent::Status)), this, SLOT(continueExecute())); - } -} - - -/*! - \internal - */ -void QFxView::continueExecute() -{ - disconnect(d->component, SIGNAL(statusChanged(QmlComponent::Status)), this, SLOT(continueExecute())); - - if (!d->component) { - qWarning() << "Error in loading" << d->source; - return; - } - - if(d->component->isError()) { - QList errorList = d->component->errors(); - foreach (const QmlError &error, errorList) { - qWarning() << error; - } - emit errors(errorList); - - return; - } - - QObject *obj = d->component->create(); - - if(d->component->isError()) { - QList errorList = d->component->errors(); - foreach (const QmlError &error, errorList) { - qWarning() << error; - } - emit errors(errorList); - - return; - } - - if (obj) { - if (QFxItem *item = qobject_cast(obj)) { - - d->scene.addItem(item); - - QPerformanceLog::displayData(); - QPerformanceLog::clear(); - d->root = item; - connect(item, SIGNAL(widthChanged()), this, SLOT(sizeChanged())); - connect(item, SIGNAL(heightChanged()), this, SLOT(sizeChanged())); - if (d->initialSize.height() <= 0 && d->root->width() > 0) - d->initialSize.setWidth(d->root->width()); - if (d->initialSize.height() <= 0 && d->root->height() > 0) - d->initialSize.setHeight(d->root->height()); - if (d->resizable) { - d->root->setWidth(width()); - d->root->setHeight(height()); - } else { - QSize sz(d->root->width(),d->root->height()); - emit sceneResized(sz); - resize(sz); - } - } else if (QWidget *wid = qobject_cast(obj)) { - window()->setAttribute(Qt::WA_OpaquePaintEvent, false); - window()->setAttribute(Qt::WA_NoSystemBackground, false); - if (!layout()) { - setLayout(new QVBoxLayout); - layout()->setContentsMargins(0, 0, 0, 0); - } else if (layout()->count()) { - // Hide the QGraphicsView in GV mode. - QLayoutItem *item = layout()->itemAt(0); - if (item->widget()) - item->widget()->hide(); - } - layout()->addWidget(wid); - emit sceneResized(wid->size()); - } - } -} - -/*! \fn void QFxView::sceneResized(QSize size) - This signal is emitted when the view is resized to \a size. - */ - -/*! \fn void QFxView::errors(const QList &errors) - This signal is emitted when the qml loaded contains \a errors. - */ - -/*! - \internal - */ -void QFxView::sizeChanged() -{ - // delay, so we catch both width and height changing. - d->resizetimer.start(0,this); -} - -/*! - If the \l {QTimerEvent} {timer event} \a e is this - view's resize timer, sceneResized() is emitted. - */ -void QFxView::timerEvent(QTimerEvent* e) -{ - if (!e || e->timerId() == d->resizetimer.timerId()) { - if (d->root) { - QSize sz(d->root->width(),d->root->height()); - emit sceneResized(sz); - //if (!d->resizable) - //resize(sz); - } - d->resizetimer.stop(); - updateGeometry(); - } -} - -// modelled on QScrollArea::widgetResizable -/*! - \property QFxView::contentResizable - \brief whether the view should resize the canvas contents - - If this property is set to false (the default), the view - resizes with the root item in the QML. - - If this property is set to true, the view will - automatically resize the root item. - - Regardless of this property, the sizeHint of the view - is the initial size of the root item. -*/ - -void QFxView::setContentResizable(bool on) -{ - if (d->resizable != on) { - d->resizable = on; - if (d->root) { - if (on) { - d->root->setWidth(width()); - d->root->setHeight(height()); - } else { - d->root->setWidth(d->initialSize.width()); - d->root->setHeight(d->initialSize.height()); - } - } - } -} - -bool QFxView::contentResizable() const -{ - return d->resizable; -} - - -/*! - The size hint is the size of the root item. -*/ -QSize QFxView::sizeHint() const -{ - if (d->root) { - if (d->initialSize.width() <= 0) - d->initialSize.setWidth(d->root->width()); - if (d->initialSize.height() <= 0) - d->initialSize.setHeight(d->root->height()); - } - return d->initialSize; -} - -/*! - Creates a \l{QmlComponent} {component} from the \a qml - string, and returns it as an \l {QFxItem} {item}. If the - \a parent item is provided, it becomes the new item's - parent. \a parent should be in this view's item hierarchy. - */ -QFxItem* QFxView::addItem(const QString &qml, QFxItem* parent) -{ - if (!d->root) - return 0; - - QmlComponent component(&d->engine, qml.toUtf8(), QUrl()); - if(d->component->isError()) { - QList errorList = d->component->errors(); - foreach (const QmlError &error, errorList) { - qWarning() << error; - } - emit errors(errorList); - - return 0; - } - - QObject *obj = component.create(); - if(d->component->isError()) { - QList errorList = d->component->errors(); - foreach (const QmlError &error, errorList) { - qWarning() << error; - } - emit errors(errorList); - - return 0; - } - - if (obj){ - QFxItem *item = static_cast(obj); - if (!parent) - parent = d->root; - - item->setParentItem(parent); - return item; - } - return 0; -} - -/*! - Deletes the view's \l {QFxItem} {items} and the \l {QmlEngine} - {QML engine's} Component cache. - */ -void QFxView::reset() -{ - clearItems(); - d->engine.clearComponentCache(); - d->initialSize = QSize(); -} - -/*! - Deletes the view's \l {QFxItem} {items}. - */ -void QFxView::clearItems() -{ - if (!d->root) - return; - delete d->root; - d->root = 0; -} - -/*! - Returns the view's root \l {QFxItem} {item}. - */ -QFxItem *QFxView::root() const -{ - return d->root; -} - -/*! - This function handles the \l {QResizeEvent} {resize event} - \a e. - */ -void QFxView::resizeEvent(QResizeEvent *e) -{ - if (d->resizable && d->root) { - d->root->setWidth(width()); - d->root->setHeight(height()); - } - setSceneRect(rect()); - QGraphicsView::resizeEvent(e); -} - -/*! - \reimp -*/ -void QFxView::paintEvent(QPaintEvent *event) -{ - int time = 0; - if (frameRateDebug() || QFxViewDebugServer::isDebuggingEnabled()) - time = d->frameTimer.restart(); - QGraphicsView::paintEvent(event); - if (QFxViewDebugServer::isDebuggingEnabled()) - qfxViewDebugServer()->addTiming(d->frameTimer.elapsed(), time); - if (frameRateDebug()) - qDebug() << "paintEvent:" << d->frameTimer.elapsed() << "time since last frame:" << time; -} - -/*! \fn void QFxView::focusInEvent(QFocusEvent *e) - This virtual function does nothing with the event \a e - in this class. - */ -void QFxView::focusInEvent(QFocusEvent *e) -{ - // Do nothing (do not call QWidget::update()) - QGraphicsView::focusInEvent(e); -} - - -/*! \fn void QFxView::focusOutEvent(QFocusEvent *e) - This virtual function does nothing with the event \a e - in this class. - */ -void QFxView::focusOutEvent(QFocusEvent *e) -{ - // Do nothing (do not call QWidget::update()) - QGraphicsView::focusOutEvent(e); -} - -QT_END_NAMESPACE diff --git a/src/declarative/util/qfxview.h b/src/declarative/util/qfxview.h deleted file mode 100644 index 25e2997..0000000 --- a/src/declarative/util/qfxview.h +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $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 either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QFXVIEW_H -#define QFXVIEW_H - -#include -#include -#include -#include -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Declarative) - -class QFxItem; -class QmlEngine; -class QmlContext; -class QmlError; - -class QFxViewPrivate; -class Q_DECLARATIVE_EXPORT QFxView : public QGraphicsView -{ - Q_OBJECT - Q_PROPERTY(bool contentResizable READ contentResizable WRITE setContentResizable) -public: - explicit QFxView(QWidget *parent = 0); - - virtual ~QFxView(); - - void setUrl(const QUrl&); - void setQml(const QString &qml, const QString &filename=QString()); - QString qml() const; - QmlEngine* engine(); - QmlContext* rootContext(); - virtual void execute(); - virtual void reset(); - - virtual QFxItem* addItem(const QString &qml, QFxItem* parent=0); - virtual void clearItems(); - - virtual QFxItem *root() const; - - void setContentResizable(bool); - bool contentResizable() const; - QSize sizeHint() const; - -Q_SIGNALS: - void sceneResized(QSize size); - void errors(const QList &error); - -private Q_SLOTS: - void continueExecute(); - void sizeChanged(); - -protected: - virtual void resizeEvent(QResizeEvent *); - virtual void paintEvent(QPaintEvent *event); - void focusInEvent(QFocusEvent *); - void focusOutEvent(QFocusEvent *); - void timerEvent(QTimerEvent*); - -private: - friend class QFxViewPrivate; - QFxViewPrivate *d; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QFXVIEW_H diff --git a/src/declarative/util/qmlview.cpp b/src/declarative/util/qmlview.cpp new file mode 100644 index 0000000..d277cf1 --- /dev/null +++ b/src/declarative/util/qmlview.cpp @@ -0,0 +1,579 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qscriptvalueiterator.h" +#include "qdebug.h" +#include "qtimer.h" +#include "qevent.h" +#include "qdir.h" +#include "qcoreapplication.h" +#include "qfontdatabase.h" +#include "qicon.h" +#include "qurl.h" +#include "qboxlayout.h" +#include "qbasictimer.h" + +#include "qml.h" +#include "qfxitem.h" +#include "private/qperformancelog_p.h" +#include "private/qfxperf_p.h" + +#include "qmlview.h" +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +DEFINE_BOOL_CONFIG_OPTION(frameRateDebug, QML_SHOW_FRAMERATE) + +class QmlViewDebugServer; +class FrameBreakAnimation : public QAbstractAnimation +{ +public: + FrameBreakAnimation(QmlViewDebugServer *s) + : QAbstractAnimation((QObject*)s), server(s) + { + start(); + } + + virtual int duration() const { return -1; } + virtual void updateCurrentTime(int msecs); + +private: + QmlViewDebugServer *server; +}; + +class QmlViewDebugServer : public QmlDebugService +{ +public: + QmlViewDebugServer(QObject *parent = 0) : QmlDebugService(QLatin1String("CanvasFrameRate"), parent), breaks(0) + { + timer.start(); + new FrameBreakAnimation(this); + } + + void addTiming(int pe, int tbf) + { + if (!isEnabled()) + return; + + bool isFrameBreak = breaks > 1; + breaks = 0; + int e = timer.elapsed(); + QByteArray data; + QDataStream ds(&data, QIODevice::WriteOnly); + ds << (int)pe << (int)pe << (int)tbf << (int)e + << (bool)isFrameBreak; + sendMessage(data); + } + + void frameBreak() { ++breaks; } + +private: + QTime timer; + int breaks; +}; + +Q_GLOBAL_STATIC(QmlViewDebugServer, qfxViewDebugServer); + +void FrameBreakAnimation::updateCurrentTime(int msecs) +{ + Q_UNUSED(msecs); + server->frameBreak(); +} + + +static QVariant stringToKeySequence(const QString &str) +{ + return QVariant::fromValue(QKeySequence(str)); +} + +class QmlViewPrivate +{ +public: + QmlViewPrivate(QmlView *w) + : q(w), root(0), component(0), resizable(false) {} + + QmlView *q; + QFxItem *root; + + QUrl source; + QString qml; + + QmlEngine engine; + QmlComponent *component; + QBasicTimer resizetimer; + + QSize initialSize; + bool resizable; + QTime frameTimer; + + void init(); + + QGraphicsScene scene; +}; + +/*! + \class QmlView + \brief The QmlView class provides a widget for displaying a Qt Declarative user interface. + + QmlView currently provides a minimal interface for displaying QML + files, and connecting between QML and C++ Qt objects. + + Typical usage: + \code + ... + QmlView *view = new QmlView(this); + vbox->addWidget(view); + + QUrl url(fileName); + view->setUrl(url); + ... + view->execute(); + ... + \endcode +*/ + +/*! + \fn QmlView::QmlView(QWidget *parent) + + Constructs a QmlView with the given \a parent. +*/ +QmlView::QmlView(QWidget *parent) +: QGraphicsView(parent), d(new QmlViewPrivate(this)) +{ + setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred); + d->init(); +} + +void QmlViewPrivate::init() +{ + // XXX: These need to be put in a central location for this kind of thing + QmlMetaType::registerCustomStringConverter(QVariant::KeySequence, &stringToKeySequence); + +#ifdef Q_ENABLE_PERFORMANCE_LOG + QFxPerfTimer perf; +#endif + QFontDatabase database; + + q->setScene(&scene); + + q->setOptimizationFlags(QGraphicsView::DontSavePainterState); + q->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + q->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + q->setFrameStyle(0); + + // These seem to give the best performance + q->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); + scene.setItemIndexMethod(QGraphicsScene::NoIndex); + q->viewport()->setFocusPolicy(Qt::NoFocus); + + scene.setStickyFocus(true); //### needed for correct focus handling +} + +/*! + The destructor clears the view's \l {QFxItem} {items} and + deletes the internal representation. + + \sa clearItems() + */ +QmlView::~QmlView() +{ + clearItems(); + delete d; d = 0; +} + +/*! + Sets the source to the \a url. The QML string is set to + empty. + */ +void QmlView::setUrl(const QUrl& url) +{ + d->source = url; + d->qml = QString(); +} + +/*! + Sets the source to the URL from the \a filename, and sets + the QML string to \a qml. + */ +void QmlView::setQml(const QString &qml, const QString &filename) +{ + d->source = QUrl::fromLocalFile(filename); + d->qml = qml; +} + +/*! + Returns the QML string. + */ +QString QmlView::qml() const +{ + return d->qml; +} + +/*! + Returns a pointer to the QmlEngine used for instantiating + QML Components. + */ +QmlEngine* QmlView::engine() +{ + return &d->engine; +} + +/*! + This function returns the root of the context hierarchy. Each QML + component is instantiated in a QmlContext. QmlContext's are + essential for passing data to QML components. In QML, contexts are + arranged hierarchically and this hierarchy is managed by the + QmlEngine. + */ +QmlContext* QmlView::rootContext() +{ + return d->engine.rootContext(); +} + +/*! + Displays the Qt Declarative user interface. +*/ +void QmlView::execute() +{ + if (d->qml.isEmpty()) { + d->component = new QmlComponent(&d->engine, d->source, this); + } else { + d->component = new QmlComponent(&d->engine, d->qml.toUtf8(), d->source, this); + } + + if (!d->component->isLoading()) { + continueExecute(); + } else { + connect(d->component, SIGNAL(statusChanged(QmlComponent::Status)), this, SLOT(continueExecute())); + } +} + + +/*! + \internal + */ +void QmlView::continueExecute() +{ + disconnect(d->component, SIGNAL(statusChanged(QmlComponent::Status)), this, SLOT(continueExecute())); + + if (!d->component) { + qWarning() << "Error in loading" << d->source; + return; + } + + if(d->component->isError()) { + QList errorList = d->component->errors(); + foreach (const QmlError &error, errorList) { + qWarning() << error; + } + emit errors(errorList); + + return; + } + + QObject *obj = d->component->create(); + + if(d->component->isError()) { + QList errorList = d->component->errors(); + foreach (const QmlError &error, errorList) { + qWarning() << error; + } + emit errors(errorList); + + return; + } + + if (obj) { + if (QFxItem *item = qobject_cast(obj)) { + + d->scene.addItem(item); + + QPerformanceLog::displayData(); + QPerformanceLog::clear(); + d->root = item; + connect(item, SIGNAL(widthChanged()), this, SLOT(sizeChanged())); + connect(item, SIGNAL(heightChanged()), this, SLOT(sizeChanged())); + if (d->initialSize.height() <= 0 && d->root->width() > 0) + d->initialSize.setWidth(d->root->width()); + if (d->initialSize.height() <= 0 && d->root->height() > 0) + d->initialSize.setHeight(d->root->height()); + if (d->resizable) { + d->root->setWidth(width()); + d->root->setHeight(height()); + } else { + QSize sz(d->root->width(),d->root->height()); + emit sceneResized(sz); + resize(sz); + } + } else if (QWidget *wid = qobject_cast(obj)) { + window()->setAttribute(Qt::WA_OpaquePaintEvent, false); + window()->setAttribute(Qt::WA_NoSystemBackground, false); + if (!layout()) { + setLayout(new QVBoxLayout); + layout()->setContentsMargins(0, 0, 0, 0); + } else if (layout()->count()) { + // Hide the QGraphicsView in GV mode. + QLayoutItem *item = layout()->itemAt(0); + if (item->widget()) + item->widget()->hide(); + } + layout()->addWidget(wid); + emit sceneResized(wid->size()); + } + } +} + +/*! \fn void QmlView::sceneResized(QSize size) + This signal is emitted when the view is resized to \a size. + */ + +/*! \fn void QmlView::errors(const QList &errors) + This signal is emitted when the qml loaded contains \a errors. + */ + +/*! + \internal + */ +void QmlView::sizeChanged() +{ + // delay, so we catch both width and height changing. + d->resizetimer.start(0,this); +} + +/*! + If the \l {QTimerEvent} {timer event} \a e is this + view's resize timer, sceneResized() is emitted. + */ +void QmlView::timerEvent(QTimerEvent* e) +{ + if (!e || e->timerId() == d->resizetimer.timerId()) { + if (d->root) { + QSize sz(d->root->width(),d->root->height()); + emit sceneResized(sz); + //if (!d->resizable) + //resize(sz); + } + d->resizetimer.stop(); + updateGeometry(); + } +} + +// modelled on QScrollArea::widgetResizable +/*! + \property QmlView::contentResizable + \brief whether the view should resize the canvas contents + + If this property is set to false (the default), the view + resizes with the root item in the QML. + + If this property is set to true, the view will + automatically resize the root item. + + Regardless of this property, the sizeHint of the view + is the initial size of the root item. +*/ + +void QmlView::setContentResizable(bool on) +{ + if (d->resizable != on) { + d->resizable = on; + if (d->root) { + if (on) { + d->root->setWidth(width()); + d->root->setHeight(height()); + } else { + d->root->setWidth(d->initialSize.width()); + d->root->setHeight(d->initialSize.height()); + } + } + } +} + +bool QmlView::contentResizable() const +{ + return d->resizable; +} + + +/*! + The size hint is the size of the root item. +*/ +QSize QmlView::sizeHint() const +{ + if (d->root) { + if (d->initialSize.width() <= 0) + d->initialSize.setWidth(d->root->width()); + if (d->initialSize.height() <= 0) + d->initialSize.setHeight(d->root->height()); + } + return d->initialSize; +} + +/*! + Creates a \l{QmlComponent} {component} from the \a qml + string, and returns it as an \l {QFxItem} {item}. If the + \a parent item is provided, it becomes the new item's + parent. \a parent should be in this view's item hierarchy. + */ +QFxItem* QmlView::addItem(const QString &qml, QFxItem* parent) +{ + if (!d->root) + return 0; + + QmlComponent component(&d->engine, qml.toUtf8(), QUrl()); + if(d->component->isError()) { + QList errorList = d->component->errors(); + foreach (const QmlError &error, errorList) { + qWarning() << error; + } + emit errors(errorList); + + return 0; + } + + QObject *obj = component.create(); + if(d->component->isError()) { + QList errorList = d->component->errors(); + foreach (const QmlError &error, errorList) { + qWarning() << error; + } + emit errors(errorList); + + return 0; + } + + if (obj){ + QFxItem *item = static_cast(obj); + if (!parent) + parent = d->root; + + item->setParentItem(parent); + return item; + } + return 0; +} + +/*! + Deletes the view's \l {QFxItem} {items} and the \l {QmlEngine} + {QML engine's} Component cache. + */ +void QmlView::reset() +{ + clearItems(); + d->engine.clearComponentCache(); + d->initialSize = QSize(); +} + +/*! + Deletes the view's \l {QFxItem} {items}. + */ +void QmlView::clearItems() +{ + if (!d->root) + return; + delete d->root; + d->root = 0; +} + +/*! + Returns the view's root \l {QFxItem} {item}. + */ +QFxItem *QmlView::root() const +{ + return d->root; +} + +/*! + This function handles the \l {QResizeEvent} {resize event} + \a e. + */ +void QmlView::resizeEvent(QResizeEvent *e) +{ + if (d->resizable && d->root) { + d->root->setWidth(width()); + d->root->setHeight(height()); + } + setSceneRect(rect()); + QGraphicsView::resizeEvent(e); +} + +/*! + \reimp +*/ +void QmlView::paintEvent(QPaintEvent *event) +{ + int time = 0; + if (frameRateDebug() || QmlViewDebugServer::isDebuggingEnabled()) + time = d->frameTimer.restart(); + QGraphicsView::paintEvent(event); + if (QmlViewDebugServer::isDebuggingEnabled()) + qfxViewDebugServer()->addTiming(d->frameTimer.elapsed(), time); + if (frameRateDebug()) + qDebug() << "paintEvent:" << d->frameTimer.elapsed() << "time since last frame:" << time; +} + +/*! \fn void QmlView::focusInEvent(QFocusEvent *e) + This virtual function does nothing with the event \a e + in this class. + */ +void QmlView::focusInEvent(QFocusEvent *e) +{ + // Do nothing (do not call QWidget::update()) + QGraphicsView::focusInEvent(e); +} + + +/*! \fn void QmlView::focusOutEvent(QFocusEvent *e) + This virtual function does nothing with the event \a e + in this class. + */ +void QmlView::focusOutEvent(QFocusEvent *e) +{ + // Do nothing (do not call QWidget::update()) + QGraphicsView::focusOutEvent(e); +} + +QT_END_NAMESPACE diff --git a/src/declarative/util/qmlview.h b/src/declarative/util/qmlview.h new file mode 100644 index 0000000..b54101f --- /dev/null +++ b/src/declarative/util/qmlview.h @@ -0,0 +1,113 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $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 either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QFXVIEW_H +#define QFXVIEW_H + +#include +#include +#include +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QFxItem; +class QmlEngine; +class QmlContext; +class QmlError; + +class QmlViewPrivate; +class Q_DECLARATIVE_EXPORT QmlView : public QGraphicsView +{ + Q_OBJECT + Q_PROPERTY(bool contentResizable READ contentResizable WRITE setContentResizable) +public: + explicit QmlView(QWidget *parent = 0); + + virtual ~QmlView(); + + void setUrl(const QUrl&); + void setQml(const QString &qml, const QString &filename=QString()); + QString qml() const; + QmlEngine* engine(); + QmlContext* rootContext(); + virtual void execute(); + virtual void reset(); + + virtual QFxItem* addItem(const QString &qml, QFxItem* parent=0); + virtual void clearItems(); + + virtual QFxItem *root() const; + + void setContentResizable(bool); + bool contentResizable() const; + QSize sizeHint() const; + +Q_SIGNALS: + void sceneResized(QSize size); + void errors(const QList &error); + +private Q_SLOTS: + void continueExecute(); + void sizeChanged(); + +protected: + virtual void resizeEvent(QResizeEvent *); + virtual void paintEvent(QPaintEvent *event); + void focusInEvent(QFocusEvent *); + void focusOutEvent(QFocusEvent *); + void timerEvent(QTimerEvent*); + +private: + friend class QmlViewPrivate; + QmlViewPrivate *d; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QFXVIEW_H diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri index 442380a..41c9019 100644 --- a/src/declarative/util/util.pri +++ b/src/declarative/util/util.pri @@ -1,5 +1,5 @@ SOURCES += \ - util/qfxview.cpp \ + util/qmlview.cpp \ util/qfxperf.cpp \ util/qperformancelog.cpp \ util/qmlconnection.cpp \ @@ -23,7 +23,7 @@ SOURCES += \ util/qmlbind.cpp HEADERS += \ - util/qfxview.h \ + util/qmlview.h \ util/qfxperf_p.h \ util/qfxglobal.h \ util/qperformancelog_p.h \ diff --git a/tests/auto/declarative/anchors/tst_anchors.cpp b/tests/auto/declarative/anchors/tst_anchors.cpp index 98ede65..a8b119c 100644 --- a/tests/auto/declarative/anchors/tst_anchors.cpp +++ b/tests/auto/declarative/anchors/tst_anchors.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include class tst_anchors : public QObject @@ -43,7 +43,7 @@ T *tst_anchors::findItem(QFxItem *parent, const QString &objectName) void tst_anchors::basicAnchors() { - QFxView *view = new QFxView; + QmlView *view = new QmlView; view->setUrl(QUrl("file://" SRCDIR "/data/anchors.qml")); view->execute(); @@ -93,7 +93,7 @@ void tst_anchors::basicAnchors() void tst_anchors::loops() { { - QFxView *view = new QFxView; + QmlView *view = new QmlView; view->setUrl(QUrl("file://" SRCDIR "/data/loop1.qml")); @@ -105,7 +105,7 @@ void tst_anchors::loops() } { - QFxView *view = new QFxView; + QmlView *view = new QmlView; view->setUrl(QUrl("file://" SRCDIR "/data/loop2.qml")); @@ -120,7 +120,7 @@ void tst_anchors::loops() void tst_anchors::illegalSets() { { - QFxView *view = new QFxView; + QmlView *view = new QmlView; view->setUrl(QUrl("file://" SRCDIR "/data/illegal1.qml")); @@ -132,7 +132,7 @@ void tst_anchors::illegalSets() } { - QFxView *view = new QFxView; + QmlView *view = new QmlView; view->setUrl(QUrl("file://" SRCDIR "/data/illegal2.qml")); @@ -144,7 +144,7 @@ void tst_anchors::illegalSets() } { - QFxView *view = new QFxView; + QmlView *view = new QmlView; view->setUrl(QUrl("file://" SRCDIR "/data/illegal3.qml")); diff --git a/tests/auto/declarative/animations/tst_animations.cpp b/tests/auto/declarative/animations/tst_animations.cpp index 8e1abc6..f627527 100644 --- a/tests/auto/declarative/animations/tst_animations.cpp +++ b/tests/auto/declarative/animations/tst_animations.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include @@ -97,7 +97,7 @@ void tst_animations::badTypes() { //don't crash { - QFxView *view = new QFxView; + QmlView *view = new QmlView; view->setUrl(QUrl("file://" SRCDIR "/data/badtype1.qml")); view->execute(); diff --git a/tests/auto/declarative/layouts/tst_layouts.cpp b/tests/auto/declarative/layouts/tst_layouts.cpp index 3416b2e..d1e6aab 100644 --- a/tests/auto/declarative/layouts/tst_layouts.cpp +++ b/tests/auto/declarative/layouts/tst_layouts.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include @@ -19,7 +19,7 @@ private slots: void test_grid_spacing(); private: - QFxView *createView(const QString &filename); + QmlView *createView(const QString &filename); }; tst_QFxLayouts::tst_QFxLayouts() @@ -28,7 +28,7 @@ tst_QFxLayouts::tst_QFxLayouts() void tst_QFxLayouts::test_horizontal() { - QFxView *canvas = createView(SRCDIR "/data/horizontal.qml"); + QmlView *canvas = createView(SRCDIR "/data/horizontal.qml"); canvas->execute(); qApp->processEvents(); @@ -52,7 +52,7 @@ void tst_QFxLayouts::test_horizontal() void tst_QFxLayouts::test_horizontal_spacing() { - QFxView *canvas = createView(SRCDIR "/data/horizontal-spacing.qml"); + QmlView *canvas = createView(SRCDIR "/data/horizontal-spacing.qml"); canvas->execute(); qApp->processEvents(); @@ -76,7 +76,7 @@ void tst_QFxLayouts::test_horizontal_spacing() void tst_QFxLayouts::test_vertical() { - QFxView *canvas = createView(SRCDIR "/data/vertical.qml"); + QmlView *canvas = createView(SRCDIR "/data/vertical.qml"); canvas->execute(); qApp->processEvents(); @@ -100,7 +100,7 @@ void tst_QFxLayouts::test_vertical() void tst_QFxLayouts::test_vertical_spacing() { - QFxView *canvas = createView(SRCDIR "/data/vertical-spacing.qml"); + QmlView *canvas = createView(SRCDIR "/data/vertical-spacing.qml"); canvas->execute(); qApp->processEvents(); @@ -124,7 +124,7 @@ void tst_QFxLayouts::test_vertical_spacing() void tst_QFxLayouts::test_grid() { - QFxView *canvas = createView("data/grid.qml"); + QmlView *canvas = createView("data/grid.qml"); canvas->execute(); qApp->processEvents(); @@ -154,7 +154,7 @@ void tst_QFxLayouts::test_grid() void tst_QFxLayouts::test_grid_spacing() { - QFxView *canvas = createView("data/grid-spacing.qml"); + QmlView *canvas = createView("data/grid-spacing.qml"); canvas->execute(); qApp->processEvents(); @@ -182,9 +182,9 @@ void tst_QFxLayouts::test_grid_spacing() QCOMPARE(five->y(), 54.0); } -QFxView *tst_QFxLayouts::createView(const QString &filename) +QmlView *tst_QFxLayouts::createView(const QString &filename) { - QFxView *canvas = new QFxView(0); + QmlView *canvas = new QmlView(0); QFile file(filename); file.open(QFile::ReadOnly); diff --git a/tests/auto/declarative/listview/tst_listview.cpp b/tests/auto/declarative/listview/tst_listview.cpp index ebc3053..19d324d 100644 --- a/tests/auto/declarative/listview/tst_listview.cpp +++ b/tests/auto/declarative/listview/tst_listview.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include @@ -31,7 +31,7 @@ private: template void changed(); template void inserted(); template void removed(); - QFxView *createView(const QString &filename); + QmlView *createView(const QString &filename); template T *findItem(QFxItem *parent, const QString &id, int index=0); }; @@ -169,7 +169,7 @@ tst_QFxListView::tst_QFxListView() template void tst_QFxListView::items() { - QFxView *canvas = createView(SRCDIR "/data/listview.qml"); + QmlView *canvas = createView(SRCDIR "/data/listview.qml"); T model; model.addItem("Fred", "12345"); @@ -205,7 +205,7 @@ void tst_QFxListView::items() template void tst_QFxListView::changed() { - QFxView *canvas = createView(SRCDIR "/data/listview.qml"); + QmlView *canvas = createView(SRCDIR "/data/listview.qml"); T model; model.addItem("Fred", "12345"); @@ -238,7 +238,7 @@ void tst_QFxListView::changed() template void tst_QFxListView::inserted() { - QFxView *canvas = createView(SRCDIR "/data/listview.qml"); + QmlView *canvas = createView(SRCDIR "/data/listview.qml"); T model; model.addItem("Fred", "12345"); @@ -305,7 +305,7 @@ void tst_QFxListView::inserted() template void tst_QFxListView::removed() { - QFxView *canvas = createView(SRCDIR "/data/listview.qml"); + QmlView *canvas = createView(SRCDIR "/data/listview.qml"); T model; for (int i = 0; i < 30; i++) @@ -438,9 +438,9 @@ void tst_QFxListView::qAbstractItemModel_removed() removed(); } -QFxView *tst_QFxListView::createView(const QString &filename) +QmlView *tst_QFxListView::createView(const QString &filename) { - QFxView *canvas = new QFxView(0); + QmlView *canvas = new QmlView(0); canvas->setFixedSize(240,320); QFile file(filename); diff --git a/tests/auto/declarative/pathview/tst_pathview.cpp b/tests/auto/declarative/pathview/tst_pathview.cpp index 2933323..e2da191 100644 --- a/tests/auto/declarative/pathview/tst_pathview.cpp +++ b/tests/auto/declarative/pathview/tst_pathview.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include @@ -19,7 +19,7 @@ private slots: void limitedItems(); private: - QFxView *createView(const QString &filename); + QmlView *createView(const QString &filename); template T *findItem(QFxItem *parent, const QString &id, int index=0); }; @@ -101,7 +101,7 @@ tst_QFxPathView::tst_QFxPathView() void tst_QFxPathView::items() { - QFxView *canvas = createView(SRCDIR "/data/pathview.qml"); + QmlView *canvas = createView(SRCDIR "/data/pathview.qml"); TestModel model; model.addItem("Fred", "12345"); @@ -133,7 +133,7 @@ void tst_QFxPathView::items() void tst_QFxPathView::pathMoved() { - QFxView *canvas = createView(SRCDIR "/data/pathview.qml"); + QmlView *canvas = createView(SRCDIR "/data/pathview.qml"); TestModel model; model.addItem("Ben", "12345"); @@ -176,7 +176,7 @@ void tst_QFxPathView::pathMoved() void tst_QFxPathView::limitedItems() { - QFxView *canvas = createView(SRCDIR "/data/pathview.qml"); + QmlView *canvas = createView(SRCDIR "/data/pathview.qml"); TestModel model; for(int i=0; i<100; i++) @@ -213,9 +213,9 @@ void tst_QFxPathView::limitedItems() QVERIFY(testItem != 0); } -QFxView *tst_QFxPathView::createView(const QString &filename) +QmlView *tst_QFxPathView::createView(const QString &filename) { - QFxView *canvas = new QFxView(0); + QmlView *canvas = new QmlView(0); canvas->setFixedSize(240,320); QFile file(filename); diff --git a/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp b/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp index c4fc506..ffbb09b 100644 --- a/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp +++ b/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp @@ -424,10 +424,10 @@ void tst_qfxtextedit::selection() QVERIFY(textEditObject->selectedText().size() == 10); } -#include +#include void tst_qfxtextedit::cursorDelegate() { - QFxView* view = new QFxView(0); + QmlView* view = new QmlView(0); view->show(); view->setUrl(QUrl("data/cursorTest.qml")); view->execute(); diff --git a/tests/auto/declarative/qfxtextinput/tst_qfxtextinput.cpp b/tests/auto/declarative/qfxtextinput/tst_qfxtextinput.cpp index c883aa3..13a301d 100644 --- a/tests/auto/declarative/qfxtextinput/tst_qfxtextinput.cpp +++ b/tests/auto/declarative/qfxtextinput/tst_qfxtextinput.cpp @@ -2,7 +2,7 @@ #include "../../../shared/util.h" #include #include -#include +#include #include #include @@ -28,8 +28,8 @@ private slots: void navigation(); private: - void simulateKey(QFxView *, int key); - QFxView *createView(const QString &filename); + void simulateKey(QmlView *, int key); + QmlView *createView(const QString &filename); QmlEngine engine; QStringList standard; @@ -268,7 +268,7 @@ void tst_qfxtextinput::selection() void tst_qfxtextinput::maxLength() { - QFxView *canvas = createView(SRCDIR "/data/navigation.qml"); + QmlView *canvas = createView(SRCDIR "/data/navigation.qml"); canvas->execute(); canvas->show(); @@ -282,7 +282,7 @@ void tst_qfxtextinput::maxLength() void tst_qfxtextinput::masks() { - QFxView *canvas = createView(SRCDIR "/data/navigation.qml"); + QmlView *canvas = createView(SRCDIR "/data/navigation.qml"); canvas->execute(); canvas->show(); @@ -296,7 +296,7 @@ void tst_qfxtextinput::masks() void tst_qfxtextinput::validators() { - QFxView *canvas = createView(SRCDIR "/data/navigation.qml"); + QmlView *canvas = createView(SRCDIR "/data/navigation.qml"); canvas->execute(); canvas->show(); @@ -314,7 +314,7 @@ the extent of the text, then they should ignore the keys. */ void tst_qfxtextinput::navigation() { - QFxView *canvas = createView(SRCDIR "/data/navigation.qml"); + QmlView *canvas = createView(SRCDIR "/data/navigation.qml"); canvas->execute(); canvas->show(); @@ -339,7 +339,7 @@ void tst_qfxtextinput::cursorDelegate() //TODO:Get the QFxTextInput test passing first } -void tst_qfxtextinput::simulateKey(QFxView *view, int key) +void tst_qfxtextinput::simulateKey(QmlView *view, int key) { QKeyEvent press(QKeyEvent::KeyPress, key, 0); QKeyEvent release(QKeyEvent::KeyRelease, key, 0); @@ -348,9 +348,9 @@ void tst_qfxtextinput::simulateKey(QFxView *view, int key) QApplication::sendEvent(view, &release); } -QFxView *tst_qfxtextinput::createView(const QString &filename) +QmlView *tst_qfxtextinput::createView(const QString &filename) { - QFxView *canvas = new QFxView(0); + QmlView *canvas = new QmlView(0); QFile file(filename); file.open(QFile::ReadOnly); diff --git a/tests/auto/declarative/repeater/tst_repeater.cpp b/tests/auto/declarative/repeater/tst_repeater.cpp index 08f9154..5fce70e 100644 --- a/tests/auto/declarative/repeater/tst_repeater.cpp +++ b/tests/auto/declarative/repeater/tst_repeater.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include @@ -15,7 +15,7 @@ private slots: void stringList(); private: - QFxView *createView(const QString &filename); + QmlView *createView(const QString &filename); template T *findItem(QObject *parent, const QString &id); }; @@ -26,7 +26,7 @@ tst_QFxRepeater::tst_QFxRepeater() void tst_QFxRepeater::stringList() { - QFxView *canvas = createView(SRCDIR "/data/repeater.qml"); + QmlView *canvas = createView(SRCDIR "/data/repeater.qml"); QStringList data; data << "One"; @@ -58,9 +58,9 @@ void tst_QFxRepeater::stringList() } -QFxView *tst_QFxRepeater::createView(const QString &filename) +QmlView *tst_QFxRepeater::createView(const QString &filename) { - QFxView *canvas = new QFxView(0); + QmlView *canvas = new QmlView(0); canvas->setFixedSize(240,320); QFile file(filename); diff --git a/tests/auto/declarative/visual/tst_visual.cpp b/tests/auto/declarative/visual/tst_visual.cpp index f540e62..10823e8 100644 --- a/tests/auto/declarative/visual/tst_visual.cpp +++ b/tests/auto/declarative/visual/tst_visual.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/tools/qmldebugger/engine.cpp b/tools/qmldebugger/engine.cpp index 1f4bcc2..6e163e6 100644 --- a/tools/qmldebugger/engine.cpp +++ b/tools/qmldebugger/engine.cpp @@ -43,7 +43,7 @@ EnginePane::EnginePane(QmlDebugConnection *client, QWidget *parent) enginesFile.open(QFile::ReadOnly); Q_ASSERT(enginesFile.isOpen()); - m_engineView = new QFxView(this); + m_engineView = new QmlView(this); m_engineView->rootContext()->setContextProperty("engines", qVariantFromValue(&m_engineItems)); m_engineView->setContentResizable(true); m_engineView->setQml(enginesFile.readAll()); diff --git a/tools/qmldebugger/engine.h b/tools/qmldebugger/engine.h index 52f0608..5ef28ae 100644 --- a/tools/qmldebugger/engine.h +++ b/tools/qmldebugger/engine.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include QT_BEGIN_NAMESPACE @@ -51,7 +51,7 @@ private: QTreeWidget *m_objTree; QTableWidget *m_propTable; - QFxView *m_engineView; + QmlView *m_engineView; QList m_engineItems; }; diff --git a/tools/qmlviewer/qfxtester.cpp b/tools/qmlviewer/qfxtester.cpp index 3732aaf..d4802f6 100644 --- a/tools/qmlviewer/qfxtester.cpp +++ b/tools/qmlviewer/qfxtester.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -29,7 +29,7 @@ QML_DEFINE_TYPE(Qt.VisualTest, 4, 6, (QT_VERSION&0x00ff00)>>8, Mouse, QFxVisualT QML_DEFINE_TYPE(Qt.VisualTest, 4, 6, (QT_VERSION&0x00ff00)>>8, Key, QFxVisualTestKey); QFxTester::QFxTester(const QString &script, QmlViewer::ScriptOptions opts, - QFxView *parent) + QmlView *parent) : QAbstractAnimation(parent), m_view(parent), filterEvents(true), options(opts), testscript(0), hasFailed(false) { diff --git a/tools/qmlviewer/qfxtester.h b/tools/qmlviewer/qfxtester.h index e37d6aa..4ace2d1 100644 --- a/tools/qmlviewer/qfxtester.h +++ b/tools/qmlviewer/qfxtester.h @@ -155,7 +155,7 @@ QML_DECLARE_TYPE(QFxVisualTestKey) class QFxTester : public QAbstractAnimation { public: - QFxTester(const QString &script, QmlViewer::ScriptOptions options, QFxView *parent); + QFxTester(const QString &script, QmlViewer::ScriptOptions options, QmlView *parent); virtual int duration() const; @@ -174,7 +174,7 @@ private: enum Destination { View, ViewPort }; void addKeyEvent(Destination, QKeyEvent *); void addMouseEvent(Destination, QMouseEvent *); - QFxView *m_view; + QmlView *m_view; struct MouseEvent { MouseEvent(QMouseEvent *e) diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 2894f1d..2ac13cc 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -11,7 +11,7 @@ ** ****************************************************************************/ -#include +#include #include "ui_recopts.h" #include "qmlviewer.h" @@ -286,7 +286,7 @@ QmlViewer::QmlViewer(QWidget *parent, Qt::WindowFlags flags) if (!(flags & Qt::FramelessWindowHint)) createMenu(menuBar(),0); - canvas = new QFxView(this); + canvas = new QmlView(this); canvas->setAttribute(Qt::WA_OpaquePaintEvent); canvas->setAttribute(Qt::WA_NoSystemBackground); canvas->setContentResizable(!skin || !scaleSkin); diff --git a/tools/qmlviewer/qmlviewer.h b/tools/qmlviewer/qmlviewer.h index f0e997c..c785e89 100644 --- a/tools/qmlviewer/qmlviewer.h +++ b/tools/qmlviewer/qmlviewer.h @@ -21,7 +21,7 @@ QT_BEGIN_NAMESPACE -class QFxView; +class QmlView; class PreviewDeviceSkin; class QFxTestEngine; class QProcess; @@ -95,7 +95,7 @@ private: QString currentFileName; PreviewDeviceSkin *skin; QSize skinscreensize; - QFxView *canvas; + QmlView *canvas; QmlTimer recordTimer; QString frame_fmt; QImage frame; -- cgit v0.12 From 8fbd9381dc2bca5d686371a733e4c0d7d51123dc Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 22 Sep 2009 14:45:26 +1000 Subject: Particles no longer paints things itself. --- src/declarative/extra/qfxparticles.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/declarative/extra/qfxparticles.cpp b/src/declarative/extra/qfxparticles.cpp index 7855f3e..15e257e 100644 --- a/src/declarative/extra/qfxparticles.cpp +++ b/src/declarative/extra/qfxparticles.cpp @@ -603,7 +603,6 @@ QFxParticles::QFxParticles(QFxItem *parent) { Q_D(QFxParticles); d->init(); - setFlag(QGraphicsItem::ItemHasNoContents, false); } QFxParticles::QFxParticles(QFxParticlesPrivate &dd, QFxItem *parent) @@ -611,7 +610,6 @@ QFxParticles::QFxParticles(QFxParticlesPrivate &dd, QFxItem *parent) { Q_D(QFxParticles); d->init(); - setFlag(QGraphicsItem::ItemHasNoContents, false); } QFxParticles::~QFxParticles() -- cgit v0.12 From 3846e7c9c602b3dcc06516aaee582aedf9c0f436 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 22 Sep 2009 16:47:18 +1000 Subject: Clean up Same Game JS Delayed loading is never used and is poorly implemented, so remove it. --- demos/declarative/samegame/content/samegame.js | 49 +++++++------------------- 1 file changed, 12 insertions(+), 37 deletions(-) diff --git a/demos/declarative/samegame/content/samegame.js b/demos/declarative/samegame/content/samegame.js index 0a3a4db..e42b7cc 100755 --- a/demos/declarative/samegame/content/samegame.js +++ b/demos/declarative/samegame/content/samegame.js @@ -44,7 +44,7 @@ function initBoard() for(xIdx=0; xIdx Date: Tue, 22 Sep 2009 17:26:45 +1000 Subject: Preliminary support for object and list synthesized property types --- src/declarative/fx/qfxvisualitemmodel.cpp | 2 +- src/declarative/qml/parser/qmljs.g | 15 + src/declarative/qml/parser/qmljsast_p.h | 6 +- src/declarative/qml/parser/qmljsgrammar.cpp | 1392 ++++++++++++++------------- src/declarative/qml/parser/qmljsgrammar_p.h | 20 +- src/declarative/qml/parser/qmljsparser.cpp | 397 ++++---- src/declarative/qml/parser/qmljsparser_p.h | 4 +- src/declarative/qml/qmlcompiler.cpp | 94 +- src/declarative/qml/qmlcompiler_p.h | 4 +- src/declarative/qml/qmlengine.cpp | 73 ++ src/declarative/qml/qmlengine_p.h | 9 + src/declarative/qml/qmlparser.cpp | 1 + src/declarative/qml/qmlparser_p.h | 3 +- src/declarative/qml/qmlscriptparser.cpp | 32 + src/declarative/qml/qmlvmemetaobject.cpp | 19 +- src/declarative/qml/qmlvmemetaobject_p.h | 33 +- src/declarative/util/qmllistaccessor.cpp | 13 +- src/declarative/util/qmllistaccessor.h | 3 +- 18 files changed, 1198 insertions(+), 922 deletions(-) diff --git a/src/declarative/fx/qfxvisualitemmodel.cpp b/src/declarative/fx/qfxvisualitemmodel.cpp index 1f8c079..45166de 100644 --- a/src/declarative/fx/qfxvisualitemmodel.cpp +++ b/src/declarative/fx/qfxvisualitemmodel.cpp @@ -639,7 +639,7 @@ void QFxVisualDataModel::setModel(const QVariant &model) return; } d->m_modelList = new QmlListAccessor; - d->m_modelList->setList(model); + d->m_modelList->setList(model, d->m_context?d->m_context->engine():qmlEngine(this)); if (d->m_delegate && d->modelCount()) { emit itemsInserted(0, d->modelCount()); emit countChanged(); diff --git a/src/declarative/qml/parser/qmljs.g b/src/declarative/qml/parser/qmljs.g index 41d6e2d..3c5db0b 100644 --- a/src/declarative/qml/parser/qmljs.g +++ b/src/declarative/qml/parser/qmljs.g @@ -850,6 +850,21 @@ case $rule_number: { } break; ./ +UiObjectMember: T_PROPERTY T_IDENTIFIER T_LT UiPropertyType T_GT T_IDENTIFIER T_AUTOMATIC_SEMICOLON ; +UiObjectMember: T_PROPERTY T_IDENTIFIER T_LT UiPropertyType T_GT T_IDENTIFIER T_SEMICOLON ; +/. +case $rule_number: { + AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(4).sval, sym(6).sval); + node->typeModifier = sym(2).sval; + node->propertyToken = loc(1); + node->typeModifierToken = loc(2); + node->typeToken = loc(4); + node->identifierToken = loc(6); + node->semicolonToken = loc(7); + sym(1).Node = node; +} break; +./ + UiObjectMember: T_PROPERTY UiPropertyType T_IDENTIFIER T_AUTOMATIC_SEMICOLON ; UiObjectMember: T_PROPERTY UiPropertyType T_IDENTIFIER T_SEMICOLON ; /. diff --git a/src/declarative/qml/parser/qmljsast_p.h b/src/declarative/qml/parser/qmljsast_p.h index bacf70f..2d37097 100644 --- a/src/declarative/qml/parser/qmljsast_p.h +++ b/src/declarative/qml/parser/qmljsast_p.h @@ -2481,13 +2481,13 @@ public: UiPublicMember(NameId *memberType, NameId *name) - : type(Property), memberType(memberType), name(name), expression(0), isDefaultMember(false), isReadonlyMember(false), parameters(0) + : type(Property), typeModifier(0), memberType(memberType), name(name), expression(0), isDefaultMember(false), isReadonlyMember(false), parameters(0) { kind = K; } UiPublicMember(NameId *memberType, NameId *name, ExpressionNode *expression) - : type(Property), memberType(memberType), name(name), expression(expression), isDefaultMember(false), isReadonlyMember(false), parameters(0) + : type(Property), typeModifier(0), memberType(memberType), name(name), expression(expression), isDefaultMember(false), isReadonlyMember(false), parameters(0) { kind = K; } virtual SourceLocation firstSourceLocation() const @@ -2509,6 +2509,7 @@ public: // attributes enum { Signal, Property } type; + NameId *typeModifier; NameId *memberType; NameId *name; ExpressionNode *expression; @@ -2518,6 +2519,7 @@ public: SourceLocation defaultToken; SourceLocation readonlyToken; SourceLocation propertyToken; + SourceLocation typeModifierToken; SourceLocation typeToken; SourceLocation identifierToken; SourceLocation colonToken; diff --git a/src/declarative/qml/parser/qmljsgrammar.cpp b/src/declarative/qml/parser/qmljsgrammar.cpp index 868c421..4188633 100644 --- a/src/declarative/qml/parser/qmljsgrammar.cpp +++ b/src/declarative/qml/parser/qmljsgrammar.cpp @@ -2,6 +2,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtCore module of the Qt Toolkit. @@ -21,10 +22,9 @@ ** 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. +** 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. @@ -60,141 +60,141 @@ const int QmlJSGrammar::lhs [] = { 111, 111, 113, 113, 114, 114, 110, 112, 112, 112, 112, 112, 112, 112, 120, 120, 120, 121, 121, 122, 122, 112, 112, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 109, 109, 109, - 109, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 125, 125, 125, 125, 125, 115, - 127, 127, 127, 127, 126, 126, 129, 129, 131, 131, - 131, 131, 131, 131, 132, 132, 132, 132, 132, 132, + 112, 112, 112, 112, 112, 112, 112, 112, 112, 109, + 109, 109, 109, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 115, 127, 127, 127, 127, 126, 126, 129, 129, + 131, 131, 131, 131, 131, 131, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, - 132, 132, 132, 132, 132, 133, 133, 107, 107, 107, - 107, 107, 136, 136, 137, 137, 137, 137, 135, 135, - 138, 138, 139, 139, 140, 140, 140, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 142, 142, 142, - 142, 143, 143, 143, 144, 144, 144, 144, 145, 145, - 145, 145, 145, 145, 145, 146, 146, 146, 146, 146, - 146, 147, 147, 147, 147, 147, 148, 148, 148, 148, - 148, 149, 149, 150, 150, 151, 151, 152, 152, 153, - 153, 154, 154, 155, 155, 156, 156, 157, 157, 158, - 158, 159, 159, 160, 160, 130, 130, 161, 161, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 100, 100, 163, 163, 164, 164, 165, 165, 99, - 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 116, 177, 177, 176, 176, 124, - 124, 178, 178, 179, 179, 181, 181, 180, 182, 185, - 183, 183, 186, 184, 184, 117, 118, 118, 119, 119, - 166, 166, 166, 166, 166, 166, 166, 167, 167, 167, - 167, 168, 168, 168, 168, 169, 169, 170, 172, 187, - 187, 190, 190, 188, 188, 191, 189, 171, 171, 171, - 173, 173, 174, 174, 174, 192, 193, 175, 175, 123, - 134, 197, 197, 194, 194, 195, 195, 198, 199, 199, - 200, 200, 196, 196, 128, 128, 201}; + 132, 132, 132, 132, 132, 132, 132, 133, 133, 107, + 107, 107, 107, 107, 136, 136, 137, 137, 137, 137, + 135, 135, 138, 138, 139, 139, 140, 140, 140, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 142, + 142, 142, 142, 143, 143, 143, 144, 144, 144, 144, + 145, 145, 145, 145, 145, 145, 145, 146, 146, 146, + 146, 146, 146, 147, 147, 147, 147, 147, 148, 148, + 148, 148, 148, 149, 149, 150, 150, 151, 151, 152, + 152, 153, 153, 154, 154, 155, 155, 156, 156, 157, + 157, 158, 158, 159, 159, 160, 160, 130, 130, 161, + 161, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 100, 100, 163, 163, 164, 164, 165, + 165, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 116, 177, 177, 176, + 176, 124, 124, 178, 178, 179, 179, 181, 181, 180, + 182, 185, 183, 183, 186, 184, 184, 117, 118, 118, + 119, 119, 166, 166, 166, 166, 166, 166, 166, 167, + 167, 167, 167, 168, 168, 168, 168, 169, 169, 170, + 172, 187, 187, 190, 190, 188, 188, 191, 189, 171, + 171, 171, 173, 173, 174, 174, 174, 192, 193, 175, + 175, 123, 134, 197, 197, 194, 194, 195, 195, 198, + 199, 199, 200, 200, 196, 196, 128, 128, 201}; const int QmlJSGrammar:: rhs[] = { 2, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 3, 3, 5, 5, 4, 4, 2, 0, 1, 1, 2, 1, 3, 2, 3, 2, 1, 5, 4, 3, 3, 3, 3, 1, 1, 1, 0, 1, 2, - 4, 6, 6, 3, 3, 4, 4, 5, 5, 6, - 6, 7, 7, 7, 7, 1, 1, 1, 1, 1, + 4, 6, 6, 3, 3, 7, 7, 4, 4, 5, + 5, 6, 6, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 3, 3, 4, 5, 3, 4, 3, 1, - 1, 2, 3, 4, 1, 2, 3, 5, 1, 1, + 1, 1, 1, 2, 3, 3, 4, 5, 3, 4, + 3, 1, 1, 2, 3, 4, 1, 2, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, - 3, 5, 1, 2, 4, 4, 4, 3, 0, 1, - 1, 3, 1, 1, 1, 2, 2, 1, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 1, 3, 3, - 3, 1, 3, 3, 1, 3, 3, 3, 1, 3, - 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, - 3, 1, 3, 3, 3, 3, 1, 3, 3, 3, - 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, - 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, - 3, 1, 5, 1, 5, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 0, 1, 1, 3, 0, 1, 1, + 1, 4, 3, 5, 1, 2, 4, 4, 4, 3, + 0, 1, 1, 3, 1, 1, 1, 2, 2, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, + 3, 3, 3, 1, 3, 3, 1, 3, 3, 3, + 1, 3, 3, 3, 3, 3, 3, 1, 3, 3, + 3, 3, 3, 1, 3, 3, 3, 3, 1, 3, + 3, 3, 3, 1, 3, 1, 3, 1, 3, 1, + 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, + 3, 1, 3, 1, 5, 1, 5, 1, 3, 1, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 0, 1, 1, 3, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 1, 2, 0, 1, 3, - 3, 1, 1, 1, 3, 1, 3, 2, 2, 2, - 0, 1, 2, 0, 1, 1, 2, 2, 7, 5, - 7, 7, 5, 9, 10, 7, 8, 2, 2, 3, - 3, 2, 2, 3, 3, 3, 3, 5, 5, 3, - 5, 1, 2, 0, 1, 4, 3, 3, 3, 3, - 3, 3, 3, 3, 4, 5, 2, 2, 2, 8, - 8, 1, 3, 0, 1, 0, 1, 1, 1, 2, - 1, 1, 0, 1, 0, 1, 2}; + 1, 1, 1, 1, 1, 1, 3, 1, 2, 0, + 1, 3, 3, 1, 1, 1, 3, 1, 3, 2, + 2, 2, 0, 1, 2, 0, 1, 1, 2, 2, + 7, 5, 7, 7, 5, 9, 10, 7, 8, 2, + 2, 3, 3, 2, 2, 3, 3, 3, 3, 5, + 5, 3, 5, 1, 2, 0, 1, 4, 3, 3, + 3, 3, 3, 3, 3, 3, 4, 5, 2, 2, + 2, 8, 8, 1, 3, 0, 1, 0, 1, 1, + 1, 2, 1, 1, 0, 1, 0, 1, 2}; const int QmlJSGrammar::action_default [] = { - 0, 0, 0, 19, 0, 165, 232, 196, 204, 200, - 144, 216, 192, 3, 129, 63, 145, 208, 212, 133, - 162, 143, 148, 128, 182, 169, 0, 70, 71, 66, - 333, 58, 335, 0, 0, 0, 0, 68, 0, 0, - 64, 67, 0, 0, 59, 61, 60, 69, 62, 0, - 65, 0, 0, 158, 0, 0, 145, 164, 147, 146, - 0, 0, 0, 160, 161, 159, 163, 0, 193, 0, - 0, 0, 0, 183, 0, 0, 0, 0, 0, 0, - 173, 0, 0, 0, 167, 168, 166, 171, 175, 174, - 172, 170, 185, 184, 186, 0, 201, 0, 197, 0, - 0, 139, 126, 138, 127, 95, 96, 97, 122, 98, - 123, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 124, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 125, 0, 0, 137, 233, - 140, 0, 141, 0, 142, 136, 0, 229, 222, 220, - 227, 228, 226, 225, 231, 224, 223, 221, 230, 217, - 0, 205, 0, 0, 209, 0, 0, 213, 0, 0, - 139, 131, 0, 130, 0, 135, 149, 0, 334, 324, - 325, 0, 322, 0, 323, 0, 326, 240, 247, 246, - 254, 242, 0, 243, 327, 0, 332, 244, 245, 250, - 248, 329, 328, 331, 251, 0, 262, 0, 0, 0, - 0, 333, 58, 0, 335, 59, 234, 276, 60, 0, - 0, 0, 263, 0, 0, 252, 253, 0, 241, 249, - 277, 278, 321, 330, 0, 292, 293, 294, 295, 0, - 288, 289, 290, 291, 318, 319, 0, 0, 0, 0, - 0, 281, 282, 238, 236, 198, 206, 202, 218, 194, - 239, 0, 145, 210, 214, 187, 176, 0, 0, 195, - 0, 0, 0, 0, 188, 0, 0, 0, 0, 0, - 180, 178, 181, 179, 177, 190, 189, 191, 0, 203, - 0, 199, 0, 237, 145, 0, 219, 234, 235, 0, - 234, 0, 0, 284, 0, 0, 0, 286, 0, 207, - 0, 0, 211, 0, 0, 215, 274, 0, 266, 275, - 269, 0, 273, 0, 234, 267, 0, 234, 0, 0, - 285, 0, 0, 0, 287, 334, 324, 0, 0, 326, - 0, 320, 0, 310, 0, 0, 0, 280, 0, 279, - 0, 336, 0, 94, 256, 259, 0, 95, 262, 98, - 123, 100, 101, 66, 105, 106, 58, 107, 110, 64, - 67, 59, 234, 60, 69, 113, 62, 115, 65, 117, - 118, 263, 120, 121, 125, 0, 87, 0, 0, 89, - 93, 91, 78, 90, 92, 0, 88, 77, 257, 255, - 133, 134, 139, 0, 132, 0, 309, 0, 296, 297, - 0, 308, 0, 0, 0, 299, 304, 302, 305, 0, - 0, 303, 304, 0, 300, 0, 301, 258, 307, 0, - 258, 306, 0, 311, 312, 0, 258, 313, 314, 0, - 0, 315, 0, 0, 0, 316, 317, 151, 150, 0, - 0, 0, 283, 0, 0, 0, 298, 271, 264, 0, - 272, 268, 0, 270, 260, 0, 261, 265, 81, 0, - 0, 85, 72, 0, 74, 83, 0, 75, 84, 86, - 76, 82, 73, 0, 79, 155, 153, 157, 154, 152, - 156, 2, 5, 0, 7, 0, 6, 0, 1, 18, + 0, 0, 0, 19, 0, 167, 234, 198, 206, 202, + 146, 218, 194, 3, 131, 65, 147, 210, 214, 135, + 164, 145, 150, 130, 184, 171, 0, 72, 73, 68, + 335, 60, 337, 0, 0, 0, 0, 70, 0, 0, + 66, 69, 0, 0, 61, 63, 62, 71, 64, 0, + 67, 0, 0, 160, 0, 0, 147, 166, 149, 148, + 0, 0, 0, 162, 163, 161, 165, 0, 195, 0, + 0, 0, 0, 185, 0, 0, 0, 0, 0, 0, + 175, 0, 0, 0, 169, 170, 168, 173, 177, 176, + 174, 172, 187, 186, 188, 0, 203, 0, 199, 0, + 0, 141, 128, 140, 129, 97, 98, 99, 124, 100, + 125, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 126, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 127, 0, 0, 139, 235, + 142, 0, 143, 0, 144, 138, 0, 231, 224, 222, + 229, 230, 228, 227, 233, 226, 225, 223, 232, 219, + 0, 207, 0, 0, 211, 0, 0, 215, 0, 0, + 141, 133, 0, 132, 0, 137, 151, 0, 336, 326, + 327, 0, 324, 0, 325, 0, 328, 242, 249, 248, + 256, 244, 0, 245, 329, 0, 334, 246, 247, 252, + 250, 331, 330, 333, 253, 0, 264, 0, 0, 0, + 0, 335, 60, 0, 337, 61, 236, 278, 62, 0, + 0, 0, 265, 0, 0, 254, 255, 0, 243, 251, + 279, 280, 323, 332, 0, 294, 295, 296, 297, 0, + 290, 291, 292, 293, 320, 321, 0, 0, 0, 0, + 0, 283, 284, 240, 238, 200, 208, 204, 220, 196, + 241, 0, 147, 212, 216, 189, 178, 0, 0, 197, + 0, 0, 0, 0, 190, 0, 0, 0, 0, 0, + 182, 180, 183, 181, 179, 192, 191, 193, 0, 205, + 0, 201, 0, 239, 147, 0, 221, 236, 237, 0, + 236, 0, 0, 286, 0, 0, 0, 288, 0, 209, + 0, 0, 213, 0, 0, 217, 276, 0, 268, 277, + 271, 0, 275, 0, 236, 269, 0, 236, 0, 0, + 287, 0, 0, 0, 289, 336, 326, 0, 0, 328, + 0, 322, 0, 312, 0, 0, 0, 282, 0, 281, + 0, 338, 0, 96, 258, 261, 0, 97, 264, 100, + 125, 102, 103, 68, 107, 108, 60, 109, 112, 66, + 69, 61, 236, 62, 71, 115, 64, 117, 67, 119, + 120, 265, 122, 123, 127, 0, 89, 0, 0, 91, + 95, 93, 80, 92, 94, 0, 90, 79, 259, 257, + 135, 136, 141, 0, 134, 0, 311, 0, 298, 299, + 0, 310, 0, 0, 0, 301, 306, 304, 307, 0, + 0, 305, 306, 0, 302, 0, 303, 260, 309, 0, + 260, 308, 0, 313, 314, 0, 260, 315, 316, 0, + 0, 317, 0, 0, 0, 318, 319, 153, 152, 0, + 0, 0, 285, 0, 0, 0, 300, 273, 266, 0, + 274, 270, 0, 272, 262, 0, 263, 267, 83, 0, + 0, 87, 74, 0, 76, 85, 0, 77, 86, 88, + 78, 84, 75, 0, 81, 157, 155, 159, 156, 154, + 158, 2, 5, 0, 7, 0, 6, 0, 1, 18, 9, 0, 0, 0, 10, 0, 11, 0, 16, 17, - 0, 12, 13, 0, 14, 15, 8, 80, 20, 0, - 4, 0, 27, 56, 0, 59, 25, 61, 60, 28, - 21, 0, 0, 57, 0, 37, 36, 35, 0, 0, - 48, 0, 49, 0, 54, 55, 0, 0, 46, 0, - 47, 0, 50, 51, 0, 0, 0, 0, 0, 52, - 53, 0, 44, 38, 45, 39, 0, 0, 0, 0, - 41, 0, 42, 43, 40, 26, 22, 0, 31, 32, - 33, 34, 133, 258, 0, 0, 95, 262, 98, 123, - 100, 101, 66, 105, 106, 58, 107, 110, 64, 67, - 59, 234, 60, 69, 113, 62, 115, 65, 117, 118, - 263, 120, 121, 125, 133, 0, 23, 0, 29, 24, - 30, 337}; + 0, 12, 13, 0, 14, 15, 8, 82, 20, 0, + 4, 0, 27, 58, 0, 61, 25, 63, 62, 28, + 21, 0, 0, 59, 0, 37, 36, 35, 0, 0, + 50, 0, 51, 0, 56, 57, 37, 0, 0, 0, + 0, 0, 46, 47, 0, 48, 0, 49, 0, 52, + 53, 0, 0, 0, 0, 0, 54, 55, 0, 44, + 38, 45, 39, 0, 0, 0, 0, 41, 0, 42, + 43, 40, 26, 22, 0, 31, 32, 33, 34, 135, + 260, 0, 0, 97, 264, 100, 125, 102, 103, 68, + 107, 108, 60, 109, 112, 66, 69, 61, 236, 62, + 71, 115, 64, 117, 67, 119, 120, 265, 122, 123, + 127, 135, 0, 23, 0, 29, 24, 30, 339}; const int QmlJSGrammar::goto_default [] = { 4, 498, 354, 192, 497, 520, 492, 496, 494, 499, - 19, 495, 15, 529, 531, 530, 615, 522, 519, 187, - 191, 193, 197, 546, 566, 565, 196, 228, 23, 470, + 19, 495, 15, 529, 531, 530, 622, 522, 519, 187, + 191, 193, 197, 547, 573, 572, 196, 228, 23, 470, 469, 352, 351, 6, 350, 353, 103, 14, 141, 21, 10, 140, 16, 22, 53, 20, 5, 25, 24, 265, 12, 259, 7, 255, 9, 257, 8, 256, 17, 263, @@ -205,317 +205,340 @@ const int QmlJSGrammar::goto_default [] = { 180, 194, 202, 201, 0}; const int QmlJSGrammar::action_index [] = { - 128, 1036, 2026, -39, 49, 73, -97, 54, 10, -69, - 243, -97, 285, 1, -97, -97, 503, 29, 75, 246, - 202, -97, -97, -97, 477, 288, 1036, -97, -97, -97, - 289, -97, 1840, 1476, 1036, 1036, 1036, -97, 691, 1036, - -97, -97, 1036, 1036, -97, -97, -97, -97, -97, 1036, - -97, 1036, 1036, -97, 1036, 1036, 86, 211, -97, -97, - 1036, 1036, 1036, -97, -97, -97, 197, 1036, 245, 1036, - 1036, 1036, 1036, 438, 1036, 1036, 1036, 1036, 1036, 1036, - 288, 1036, 1036, 1036, 133, 129, 132, 288, 288, 288, - 288, 288, 410, 420, 386, 1036, -6, 1036, 62, 1747, - 1036, 1036, -97, -97, -97, -97, -97, -97, -97, -97, + 136, 1173, 2163, -89, 8, 112, -97, 51, 13, -35, + 267, -97, 367, 33, -97, -97, 658, 27, 92, 205, + 232, -97, -97, -97, 564, 261, 1173, -97, -97, -97, + 307, -97, 1977, 1438, 1173, 1173, 1173, -97, 913, 1173, + -97, -97, 1173, 1173, -97, -97, -97, -97, -97, 1173, + -97, 1173, 1173, -97, 1173, 1173, 90, 237, -97, -97, + 1173, 1173, 1173, -97, -97, -97, 252, 1173, 349, 1173, + 1173, 1173, 1173, 450, 1173, 1173, 1173, 1173, 1173, 1173, + 245, 1173, 1173, 1173, 134, 141, 132, 334, 241, 238, + 207, 334, 440, 564, 422, 1173, -1, 1173, 81, 1884, + 1173, 1173, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -97, 112, 1036, -97, -97, - 18, -38, -97, 1036, -97, -97, 1036, -97, -97, -97, + -97, -97, -97, -97, -97, -97, 143, 1173, -97, -97, + 57, -43, -97, 1173, -97, -97, 1173, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - 1036, -47, 1036, 1036, 35, 34, 1036, -97, 1747, 1036, - 1036, -97, 118, -97, -46, -97, -97, 60, -97, 295, - 89, 50, -97, 298, -97, 38, 2119, -97, -97, -97, - -97, -97, 205, -97, -97, 14, -97, -97, -97, -97, - -97, -97, 2119, -97, -97, 346, -97, 512, 83, 2026, - 30, 280, 100, 70, 2305, 93, 1036, -97, 80, 66, - 1036, 65, -97, 59, 67, -97, -97, 276, -97, -97, - -97, -97, -97, -97, 79, -97, -97, -97, -97, 87, - -97, -97, -97, -97, -97, -97, 44, 48, 1036, 106, - 76, -97, -97, 1212, -97, 77, 42, -9, -97, 331, - 69, 32, 523, 78, 131, 444, 288, 292, 1036, 277, - 1036, 1036, 1036, 1036, 444, 1036, 1036, 1036, 1036, 1036, - 288, 288, 288, 288, 288, 349, 355, 359, 1036, -12, - 1036, 82, 1036, -97, 606, 1036, -97, 1036, 64, 31, - 1036, 16, 2026, -97, 1036, 122, 2026, -97, 1036, 57, - 1036, 1036, 84, 81, 1036, -97, 68, 135, 63, -97, - -97, 1036, -97, 244, 1036, -97, -41, 1036, -42, 2026, - -97, 1036, 151, 2026, -97, -17, 226, -37, -8, 2119, - -28, -97, 2026, -97, 1036, 110, 2026, 5, 2026, -97, - -5, -4, -55, -97, -97, 2026, -22, 424, 46, 421, - 99, 1036, 2026, 40, 20, 369, 52, 26, 768, 47, - 41, -97, 1126, -97, 27, 2, 23, 1036, 22, 6, - 1036, 127, 1036, 9, 7, 1036, -97, 1933, 28, -97, - -97, -97, -97, -97, -97, 1036, -97, -97, -97, -97, - 204, -97, 1036, -3, -97, 2026, -97, 85, -97, -97, - 2026, -97, 1036, 103, -25, -97, 37, -97, 37, 98, - 1036, -97, 37, -2, -97, 13, -97, 2026, -97, 108, - 2026, -97, 189, -97, -97, 130, 2026, 12, -97, 25, - 11, -97, 273, -10, 19, -97, -97, -97, -97, 1036, - 216, 2026, -97, 1036, 147, 2026, -97, -1, -97, 154, - -97, -97, 1036, -97, -97, 240, -97, -97, -97, 119, - 1387, -97, -97, 1654, -97, -97, 1565, -97, -97, -97, - -97, -97, -97, 134, -97, -97, -97, -97, -97, -97, - -97, -97, -97, 776, -97, 223, -11, 663, -97, -97, - 120, 776, 176, 163, -97, 117, -97, 90, -97, -97, - 303, -97, -97, 61, -97, -97, -97, 97, -97, 58, - -97, 863, -97, -97, 43, 157, -97, 51, 36, -97, - -97, 950, 125, -97, 158, -97, -97, -97, -26, 164, - -97, 1036, -97, 156, -97, -97, 45, 191, -97, 1036, - -97, 180, -97, -97, 160, 53, 74, 1036, 187, -97, - -97, 166, -97, 170, -97, 56, 15, 233, 161, 268, - -97, 95, -97, -97, -97, -97, -97, 1298, -97, -97, - -97, -97, 283, 2212, 1476, 71, 397, 94, 437, 115, - 1036, 2026, 92, -19, 364, 8, -24, 691, 21, 17, - -97, 1126, -97, 4, -30, 0, 1036, 39, 3, 1036, - 33, 1036, -23, 24, 370, 111, -97, 584, -97, -97, - -97, -97, + 1173, 22, 1173, 1173, 37, 30, 1173, -97, 1884, 1173, + 1173, -97, 128, -97, -53, -97, -97, -12, -97, 287, + 7, -50, -97, 264, -97, 68, 2256, -97, -97, -97, + -97, -97, 230, -97, -97, 67, -97, -97, -97, -97, + -97, -97, 2256, -97, -97, 449, -97, 462, 127, 2163, + 62, 276, 77, 58, 2442, 72, 1173, -97, 73, 47, + 1173, 52, -97, 50, 76, -97, -97, 273, -97, -97, + -97, -97, -97, -97, 105, -97, -97, -97, -97, 109, + -97, -97, -97, -97, -97, -97, 38, 45, 1173, 95, + 79, -97, -97, 1259, -97, 66, 24, -8, -97, 289, + 61, 32, 577, 74, 146, 398, 334, 258, 1173, 332, + 1173, 1173, 1173, 1173, 490, 1173, 1173, 1173, 1173, 1173, + 334, 334, 334, 334, 210, 490, 490, 391, 1173, -8, + 1173, 91, 1173, -97, 540, 1173, -97, 1173, 87, 64, + 1173, 54, 2163, -97, 1173, 151, 2163, -97, 1173, 69, + 1173, 1173, 180, 84, 1173, -97, 80, 99, 71, -97, + -97, 1173, -97, 290, 1173, -97, 78, 1173, 44, 2163, + -97, 1173, 101, 2163, -97, -22, 246, -48, -24, 2256, + -34, -97, 2163, -97, 1173, 113, 2163, 6, 2163, -97, + -7, -6, -49, -97, -97, 2163, -51, 470, 12, 400, + 133, 1173, 2163, 48, 17, 375, 42, 15, 701, 49, + 56, -97, 1349, -97, 55, 21, 53, 1173, 41, 14, + 1173, 25, 1173, -2, -3, 1173, -97, 2070, 36, -97, + -97, -97, -97, -97, -97, 1173, -97, -97, -97, -97, + 270, -97, 1173, -25, -97, 2163, -97, 88, -97, -97, + 2163, -97, 1173, 108, -28, -97, 85, -97, 85, 110, + 1173, -97, 85, 4, -97, -39, -97, 2163, -97, 111, + 2163, -97, 189, -97, -97, 93, 2163, 20, -97, 0, + -5, -97, 316, -29, 26, -97, -97, -97, -97, 1173, + 130, 2163, -97, 1173, 149, 2163, -97, 3, -97, 197, + -97, -97, 1173, -97, -97, 281, -97, -97, -97, 102, + 1613, -97, -97, 1702, -97, -97, 1791, -97, -97, -97, + -97, -97, -97, 115, -97, -97, -97, -97, -97, -97, + -97, -97, -97, 828, -97, 341, -16, 743, -97, -97, + 176, 743, 262, 340, -97, 145, -97, 116, -97, -97, + 298, -97, -97, 118, -97, -97, -97, 122, -97, 31, + -97, 1087, -97, -97, 34, 140, -97, 40, 39, -97, + -97, 1000, 121, -97, 185, -97, -97, -97, 29, 191, + -97, 1173, -97, 200, -97, -97, -10, 82, 198, 63, + 60, 83, -97, -97, 155, -97, 1173, -97, 193, -97, + -97, 194, 46, 70, 1173, 195, -97, -97, 157, -97, + 147, -97, 65, 28, 323, 192, 331, -97, 125, -97, + -97, -97, -97, -97, 1524, -97, -97, -97, -97, 416, + 2349, 1438, 75, 436, 89, 427, 86, 1173, 2163, 59, + -23, 351, 11, -11, 820, 16, -4, -97, 1349, -97, + 19, 18, 43, 1173, 23, 5, 1173, 35, 1173, 10, + 9, 416, 97, -97, 611, -97, -97, -97, -97, - -105, 8, 11, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -50, -105, -105, -105, - -105, -105, -105, -105, -105, -105, 104, -105, -105, -105, - 35, -105, -105, -4, 34, 85, 75, -105, 164, 167, - -105, -105, 171, 170, -105, -105, -105, -105, -105, 160, - -105, 166, 163, -105, 154, 177, -105, -105, -105, -105, - 174, 108, 116, -105, -105, -105, -105, 122, -105, 121, - 114, 109, 111, -105, 123, 124, 143, 147, 153, 151, - -105, 146, 138, 131, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, 137, -105, 126, -105, 90, - 52, 41, -105, -105, -105, -105, -105, -105, -105, -105, + -105, 11, 15, -105, -105, -105, -105, -105, -105, -105, + -105, -105, -105, -105, -105, -105, -54, -105, -105, -105, + -105, -105, -105, -105, -105, -105, 79, -105, -105, -105, + 12, -105, -105, 4, 26, 98, 161, -105, 186, 158, + -105, -105, 173, 169, -105, -105, -105, -105, -105, 131, + -105, 127, 124, -105, 122, 118, -105, -105, -105, -105, + 148, 143, 139, -105, -105, -105, -105, 65, -105, 138, + 134, 151, 146, -105, 130, 115, 123, 114, 167, 174, + -105, 164, 103, 162, -105, -105, -105, -105, -105, -105, + -105, -105, -105, -105, -105, 97, -105, 95, -105, 85, + -1, 5, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -105, 58, -105, -105, - -105, -105, -105, 59, -105, -105, 38, -105, -105, -105, + -105, -105, -105, -105, -105, -105, -105, 50, -105, -105, + -105, -105, -105, 9, -105, -105, 35, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - 175, -105, 139, -26, -105, -105, 37, -105, 227, 29, - 76, -105, -105, -105, -105, -105, -105, -105, -105, -10, - -105, -105, -105, 30, -105, -105, 4, -105, -105, -105, + 71, -105, 61, 48, -105, -105, 36, -105, 242, 53, + 68, -105, -105, -105, -105, -105, -105, -105, -105, -11, + -105, -105, -105, 47, -105, -105, 56, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, 83, -105, -105, 39, -105, 54, -105, 60, - -105, 49, -105, -105, -105, -105, 46, -105, -105, -105, - 65, 68, -105, -105, -105, -105, -105, 9, -105, -105, + -105, -105, 109, -105, -105, 39, -105, 37, -105, 42, + -105, 73, -105, -105, -105, -105, 72, -105, -105, -105, + 70, 60, -105, -105, -105, -105, -105, -6, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -105, -105, 24, -105, - -105, -105, -105, 107, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -105, 21, 223, -105, - 219, 211, 230, 234, -105, 96, 93, 74, 95, 97, - -105, -105, -105, -105, -105, -105, -105, -105, 179, -105, - 183, -105, 195, -105, -105, 209, -105, 184, -105, -105, - 101, -105, 7, -105, 16, -105, 15, -105, 191, -105, - 193, 185, -105, -105, 182, -105, -105, -105, -105, -105, - -105, 233, -105, 91, 203, -105, -105, 198, -105, 62, - -105, 57, -105, 173, -105, -105, 86, -105, -105, 84, - -105, -105, 56, -105, 45, -105, 55, -105, 80, -105, - -105, -105, -105, -105, -105, 77, -105, 12, -105, 63, - -105, 82, 61, -105, -105, 47, -105, -105, 102, -105, - -105, -105, 13, -105, -105, -105, -105, 36, -105, 22, - 71, -105, 92, -105, -105, -33, -105, -24, -105, -105, - -105, -105, -105, -105, -105, -19, -105, -105, -105, -105, - -105, -105, 73, -105, -105, 3, -105, -105, -105, -105, - 70, -105, 42, -105, -105, -105, -105, -105, -58, -105, - 64, -105, -56, -105, -105, -105, -105, -45, -105, -105, - -41, -105, -105, -105, -105, -105, -105, -31, -105, -105, - 50, -105, 66, -105, 69, -105, -105, -105, -105, 81, - -105, 44, -105, 53, -105, 51, -105, -105, -105, -105, - -105, -105, 48, -105, -105, 78, -105, -105, -105, -105, - 40, -105, -105, 249, -105, -105, 43, -105, -105, -105, + -105, -105, -105, -105, -105, -105, -105, -105, 17, -105, + -105, -105, -105, 111, -105, -105, -105, -105, -105, -105, + -105, -105, -105, -105, -105, -105, -105, 10, 214, -105, + 224, 194, 210, 204, -105, 96, 83, 89, 82, 62, + -105, -105, -105, -105, -105, -105, -105, -105, 182, -105, + 216, -105, 184, -105, -105, 251, -105, 141, -105, -105, + 125, -105, 23, -105, 6, -105, 93, -105, 192, -105, + 176, 191, -105, -105, 180, -105, -105, -105, -105, -105, + -105, 198, -105, 147, 88, -105, -105, 113, -105, 80, + -105, 75, -105, 74, -105, -105, 77, -105, -105, 86, + -105, -105, 78, -105, 81, -105, 30, -105, 46, -105, + -105, -105, -105, -105, -105, 52, -105, 33, -105, 28, + -105, 153, 34, -105, -105, 43, -105, -105, 116, -105, + -105, -105, 59, -105, -105, -105, -105, 69, -105, 45, + 104, -105, 90, -105, -105, 38, -105, 40, -105, -105, + -105, -105, -105, -105, -105, 44, -105, -105, -105, -105, + -105, -105, 84, -105, -105, 55, -105, -105, -105, -105, + 58, -105, 63, -105, -105, -105, -105, -105, -24, -105, + 64, -105, -28, -105, -105, -105, -105, -14, -105, -105, + -18, -105, -105, -105, -105, -105, -105, -57, -105, -105, + 31, -105, 29, -105, 27, -105, -105, -105, -105, 32, + -105, 41, -105, 49, -105, 51, -105, -105, -105, -105, + -105, -105, 14, -105, -105, 106, -105, -105, -105, -105, + 54, -105, -105, 67, -105, -105, 57, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, 67, -105, -105, 72, 110, -105, -105, - -105, 2, -105, 6, -105, -105, -105, -105, -105, -105, - 10, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, 344, -105, -105, -105, -105, -105, -105, -105, -105, - -105, 274, -105, -105, -22, -105, -105, -105, -105, -105, - -105, 1, -105, -105, -105, -105, -105, -105, -105, 5, - -105, -105, -105, -105, -20, -105, -105, 17, -105, -105, - -105, -105, -105, 31, -105, -105, -105, 28, 27, 32, - -105, -105, -105, -105, -105, -105, -105, 284, -105, -105, - -105, -105, -105, -105, 210, 26, 14, -105, 18, -105, - 88, 23, -105, -105, 19, -105, -105, 79, -105, -105, - -105, 25, -105, -105, -105, -105, 20, -105, 33, 103, - -105, 89, -105, -105, -105, -105, -105, 87, -105, -105, - -105, -105}; + -105, -105, -105, 76, -105, -105, -3, 188, -105, -105, + -105, -10, -105, -9, -105, -105, -105, -105, -105, -105, + 22, -105, -105, -105, -105, -105, -105, -105, -105, -105, + -105, 346, -105, -105, -105, -105, -105, -105, -105, -105, + -105, 257, -105, -105, -19, -105, -105, -105, -105, -105, + -105, 24, -105, -105, -105, -105, -105, -105, 3, -105, + -105, -105, -105, -105, -105, -105, 20, -105, -105, -105, + -105, -5, -105, -105, 25, -105, -105, -105, -105, -105, + -16, -105, -105, -105, 19, 7, 21, -105, -105, -105, + -105, -105, -105, -105, 269, -105, -105, -105, -105, -105, + -105, 237, -2, 0, -105, 1, -105, 66, 8, -105, + -105, -4, -105, -105, 102, -105, -105, -105, 13, -105, + -105, -105, -105, 16, -105, 2, 108, -105, 91, -105, + -105, -105, -105, -105, 92, -105, -105, -105, -105}; const int QmlJSGrammar::action_info [] = { - 397, 95, 385, 539, 387, 427, 412, -114, 416, 137, - 97, -92, 344, 449, 175, -89, 462, 253, 329, 336, - 327, 348, 145, 338, -93, 339, 143, 341, -111, -116, - -114, 160, 440, 399, -92, 395, 436, 160, 412, 436, - -119, 166, 420, 453, 436, 449, -116, -103, -93, 621, - 444, 493, 436, -122, -111, 67, 253, 404, 95, -89, - 453, 442, 344, 67, 568, 561, 253, 290, 426, 232, - 290, 186, 137, 97, 547, 571, 302, 292, 268, 493, - 308, 557, 556, 268, 248, 321, 308, 410, 314, 0, - 288, 521, 300, 297, 331, 449, 179, 183, 436, -103, - 405, -122, 412, 453, 521, 288, 344, 342, 423, 534, - 185, 137, 168, 54, 137, 430, 137, 554, 137, 617, - 137, 247, 515, 514, 55, 162, 137, 473, 58, 163, - 137, 169, 577, 0, -119, 168, 439, 252, 251, 59, - 238, 237, 137, 323, 245, 244, 409, 408, 243, 242, - 440, 509, 508, 424, 169, 137, 573, 572, 521, 137, - 245, 244, 465, 414, 137, 0, 250, 618, 138, 54, - 346, 541, 54, 54, 173, 474, 245, 244, 512, 511, - 55, 310, 306, 55, 55, 311, 535, 535, 137, 535, - 535, 168, 31, 0, 484, 137, 324, 137, 549, 535, - 0, 0, 563, 0, 0, 0, 0, 455, 510, 60, - 169, 333, 402, 137, 60, 466, 464, 545, 544, 168, - 3, 2, 1, 60, 137, 542, 540, 564, 562, 44, - 46, 45, 537, 537, 0, 537, 537, 0, 169, 0, - 402, 553, 552, 536, 536, 537, 536, 536, 560, 559, - 434, 433, 550, 548, 61, 31, 536, 0, 99, 61, - 62, 168, 31, 69, 70, 62, 231, 230, 61, 31, - 505, 0, 0, 31, 62, 0, 451, 100, 0, 101, - 169, 0, 170, 0, 506, 504, 0, 0, 0, 0, - 71, 72, 44, 46, 45, 270, 271, 31, 168, 44, - 46, 45, 31, 69, 70, 31, 44, 46, 45, 31, - 44, 46, 45, 81, 503, 82, -80, 169, 31, 170, - 0, 31, 272, 273, 31, 0, 83, 31, 0, 0, - 71, 72, 31, 0, 44, 46, 45, 0, 0, 44, - 46, 45, 44, 46, 45, 0, 44, 46, 45, 270, - 271, 0, 0, 0, 0, 44, 46, 45, 44, 46, - 45, 44, 46, 45, 44, 46, 45, 0, 0, 44, - 46, 45, 275, 276, 0, 31, 272, 273, 275, 276, - 0, 277, 275, 276, 278, 168, 279, 277, 0, 0, - 278, 277, 279, 31, 278, 0, 279, 0, 31, 0, - -333, 0, 0, -80, 169, -333, 170, 236, 235, 74, - 75, 0, 44, 46, 45, 0, 0, 76, 77, 0, - 0, 78, 0, 79, 0, 0, 31, 0, 0, 0, - 44, 46, 45, 74, 75, 44, 46, 45, 0, 0, - 0, 76, 77, 74, 75, 78, 0, 79, 0, 0, - 31, 76, 77, 31, 0, 78, 0, 79, 236, 235, - 0, 74, 75, 44, 46, 45, 31, 275, 276, 76, - 77, 0, 0, 78, 0, 79, 277, 0, 0, 278, - 0, 279, 241, 240, 0, 236, 235, 44, 46, 45, - 44, 46, 45, 0, 0, 0, 0, 0, 241, 240, - 74, 75, 0, 44, 46, 45, 147, 0, 76, 77, - 0, 0, 78, 0, 79, 0, 148, 0, 0, 0, - 149, 0, 0, 0, 0, 0, 147, 0, 0, 150, - 0, 151, 0, 0, 0, 0, 148, 0, 0, 0, - 149, 31, 152, 0, 153, 58, 0, 0, 0, 150, - 0, 151, 154, 0, 304, 155, 59, 0, 0, 0, - 0, 156, 152, 0, 153, 58, 0, 157, 0, 0, - 0, 0, 154, 241, 240, 155, 59, 0, 44, 46, - 45, 156, 0, 158, 0, 0, 0, 157, 0, 0, - 0, 0, 0, 0, 0, 0, 27, 28, 0, 0, - 0, 0, 0, 158, 0, 0, 30, 0, 0, 147, - 0, 0, 0, 31, 0, 0, 0, 32, 33, 148, - 34, 0, 0, 149, 0, 0, 0, 501, 0, 0, - 0, 41, 150, 0, 151, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 152, 0, 153, 58, 47, - 44, 46, 45, 0, 48, 154, 0, 0, 155, 59, - 0, 0, 0, 0, 156, 40, 50, 29, 0, 0, - 157, 37, 0, 0, 0, 27, 28, 0, 0, 0, - 0, 0, 0, 0, 0, 30, 158, 0, 0, 0, - 0, 0, 31, 0, 0, 0, 32, 33, 0, 34, - 0, 0, 0, 27, 28, 0, 501, 0, 0, 0, - 41, 0, 0, 30, 0, 0, 0, 0, 0, 0, - 31, 0, 0, 0, 32, 33, 0, 34, 47, 44, - 46, 45, 0, 48, 38, 0, 0, 0, 41, 0, + 385, 493, 387, -95, 399, 416, 397, 175, 628, 339, + 185, 427, 338, 253, 336, 183, 426, 145, -91, -124, + 462, 341, 348, -113, 179, 344, -94, 548, 436, 160, + -118, 444, -121, 453, 449, 404, 442, 166, 436, 160, + 440, 137, -121, 395, 97, 453, 449, 436, -118, -91, + -116, 344, 67, 253, 412, -105, -113, 412, 539, 436, + -116, 95, -94, -95, 521, 143, -105, 268, 568, 292, + 95, 290, 288, 575, 493, 563, 308, 564, 97, 405, + 410, 248, 67, 412, 342, 436, 449, 550, 578, 551, + 420, 314, 268, 297, 344, 137, -124, 321, 253, 439, + 534, 186, 331, 137, 329, 624, 561, 323, 521, 137, + 473, 554, 453, 440, 302, 247, 137, 288, 430, 137, + 423, 137, 232, 137, 0, 300, 0, 0, 584, 0, + 0, 0, 58, 0, 0, 0, 137, 168, 137, 327, + 252, 251, 162, 59, 553, 552, 163, 245, 244, 409, + 408, 137, 54, 625, 521, 250, 169, 137, 474, 137, + 324, 333, 556, 55, 0, 424, 238, 237, 414, 546, + 243, 242, 54, 346, 54, 484, 535, 509, 508, 515, + 514, 54, 308, 55, 173, 55, 580, 579, 245, 244, + 451, 168, 55, 570, 245, 244, 310, 137, 541, 138, + 311, 137, 0, 137, 0, 465, 512, 511, 137, 455, + 169, 306, 0, 0, 535, 537, 557, 555, 571, 569, + 168, 535, 537, 535, 0, 0, 536, 535, 3, 2, + 1, 0, 81, 536, 82, 81, 510, 82, 137, 169, + 0, 170, 0, 0, 60, 83, 0, 0, 83, 60, + 434, 433, 542, 540, 560, 559, 567, 566, 466, 464, + 537, 545, 544, 81, 60, 82, 81, 537, 82, 537, + 81, 536, 82, 537, 0, 31, 83, 168, 536, 83, + 536, 0, 99, 83, 536, 168, 81, 31, 82, 61, + 0, 231, 230, 31, 61, 62, 169, 0, 402, 83, + 62, 100, 31, 101, 169, 31, 402, 270, 271, 61, + 31, 0, 44, 46, 45, 62, 31, 0, 0, 31, + 0, 0, 0, 0, 44, 46, 45, 31, 0, 0, + 44, 46, 45, 0, 272, 273, 31, 0, 0, 44, + 46, 45, 44, 46, 45, 31, 0, 44, 46, 45, + 270, 271, 31, 44, 46, 45, 44, 46, 45, 81, + 31, 82, 0, 0, 44, 46, 45, 69, 70, 31, + 0, 0, 83, 44, 46, 45, 0, 272, 273, 0, + 31, 0, 44, 46, 45, 69, 70, -335, 505, 44, + 46, 45, 0, 0, 71, 72, 0, 44, 46, 45, + 0, 0, 506, 504, 31, 0, 44, 46, 45, 0, + 0, -335, 71, 72, 275, 276, 0, 44, 46, 45, + 0, 275, 276, 277, 0, 0, 278, 0, 279, 31, + 277, 168, 503, 278, 0, 279, 0, 0, 0, 0, + 0, 44, 46, 45, 0, 74, 75, 0, 0, -82, + 169, 0, 170, 76, 77, 0, 31, 78, 0, 79, + 0, 241, 240, 74, 75, 31, 44, 46, 45, 0, + 0, 76, 77, 74, 75, 78, 0, 79, 31, 0, + 0, 76, 77, 0, 0, 78, 0, 79, 241, 240, + 0, 31, 0, 44, 46, 45, 0, 236, 235, 31, + 0, 0, 44, 46, 45, 0, 0, 0, 0, 0, + 236, 235, 0, 275, 276, 44, 46, 45, 0, 0, + 0, 0, 277, 241, 240, 278, 0, 279, 44, 46, + 45, 236, 235, 0, 0, 0, 44, 46, 45, 0, + 0, 0, 0, 147, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 148, 0, 0, 0, 149, 0, 0, + 0, 0, 0, 0, 0, 0, 150, 0, 151, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 152, + 147, 153, 58, 0, 0, 0, 0, 74, 75, 154, + 148, 0, 155, 59, 149, 76, 77, 0, 156, 78, + 0, 79, 0, 150, 157, 151, 0, 0, 304, 0, + 0, 0, 0, 0, 0, 0, 152, 0, 153, 58, + 158, 0, 0, 27, 28, 0, 154, 0, 0, 155, + 59, 0, 0, 30, 0, 156, 0, 0, 0, 0, + 31, 157, 0, 0, 32, 33, 0, 34, 0, 0, + 0, 0, 0, 0, 501, 0, 0, 158, 41, 0, + 0, 147, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 148, 0, 0, 0, 149, 47, 44, 46, 45, + 0, 48, 0, 0, 150, 0, 151, 0, 0, 0, + 0, 0, 40, 50, 29, 0, 0, 152, 37, 153, + 58, 0, 0, 0, 0, 0, 0, 154, 0, 0, + 155, 59, 0, 27, 28, 0, 156, 0, 0, 0, + 0, 0, 157, 30, 0, 0, 0, 0, 0, 0, + 31, 0, 0, 0, 32, 33, 0, 34, 158, 0, + 0, 0, 0, 0, 38, 0, 0, 0, 41, 0, + 0, 0, 0, 0, 0, 27, 28, 0, 0, 0, + 0, 0, 0, 0, 0, 30, 47, 44, 46, 45, + 0, 48, 31, 0, 0, 0, 32, 33, 0, 34, + 0, 0, 40, 50, 29, 0, 501, 0, 37, 0, + 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 47, 44, + 46, 45, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 50, 29, 0, 0, 0, - 37, 0, 0, 0, 0, 0, 47, 44, 46, 45, - 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 40, 50, 29, 0, 0, 0, 37, 0, - 27, 28, 0, 0, 0, 0, 0, 0, 27, 28, - 30, 0, 0, 0, 0, 0, 0, 31, 30, 0, - 0, 32, 33, 0, 34, 31, 0, 0, 0, 32, - 33, 38, 34, 0, 0, 41, 0, 0, 0, 501, - 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 47, 44, 46, 45, 0, 48, 0, - 0, 47, 44, 46, 45, 0, 48, 0, 0, 40, - 50, 29, 0, 0, 0, 37, 0, 40, 50, 29, - 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 524, 0, 27, 28, 0, 0, 0, - 0, 0, 0, 0, 0, 211, 0, 0, 0, 0, + 37, 0, 27, 28, 0, 0, 0, 0, 0, 0, + 27, 28, 30, 0, 0, 0, 0, 0, 0, 31, + 30, 0, 0, 32, 33, 0, 34, 31, 0, 0, + 0, 32, 33, 38, 34, 0, 0, 41, 0, 0, + 0, 501, 0, 0, 0, 41, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 47, 44, 46, 45, 0, + 48, 0, 0, 47, 44, 46, 45, 0, 48, 0, + 0, 40, 50, 29, 0, 0, 0, 37, 0, 40, + 50, 29, 0, 0, 0, 37, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 27, 28, 0, 0, 0, + 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 32, 33, 0, 34, - 0, 0, 0, 0, 0, 0, 501, 0, 0, 0, - 41, 0, 0, 0, 0, 0, 0, 0, 526, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 47, 525, - 528, 527, 0, 48, 0, 0, 0, 0, 222, 0, - 0, 0, 0, 0, 40, 50, 29, 206, 0, 0, + 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, + 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 47, 44, + 46, 45, 0, 48, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 40, 50, 29, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 524, 0, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 211, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 32, 33, 0, 34, 0, 0, 0, 0, 0, 0, 501, 0, 0, 0, 41, 0, 0, - 0, 0, 0, 0, 0, 575, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 582, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 525, 528, 527, 0, 48, 0, 0, 0, 0, 222, 0, 0, 0, 0, 0, 40, 50, 29, 206, 0, 0, 37, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 26, 27, 28, - 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, - 0, 0, 0, 0, 0, 31, 0, 0, 0, 32, - 33, 0, 34, 0, 0, 0, 35, 0, 36, 38, - 39, 0, 0, 41, 0, 0, 0, 42, 0, 43, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 47, 44, 46, 45, 0, 48, 0, 49, 0, - 51, 0, 52, 0, 0, 0, 0, 40, 50, 29, - 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -112, 0, 0, 0, 26, 27, 28, - 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, - 0, 0, 0, 0, 0, 31, 0, 0, 0, 32, - 33, 0, 34, 0, 0, 0, 35, 0, 36, 38, - 39, 0, 0, 41, 0, 0, 0, 42, 0, 43, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 47, 44, 46, 45, 0, 48, 0, 49, 0, - 51, 0, 52, 0, 0, 0, 0, 40, 50, 29, - 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 26, 27, 28, 0, 0, 0, 0, - 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, - 0, 31, 0, 0, 0, 32, 33, 0, 34, 0, - 0, 0, 35, 0, 36, 38, 39, 0, 0, 41, - 0, 0, 0, 42, 0, 43, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 47, 44, 46, - 45, 0, 48, 0, 49, 0, 51, 267, 52, 0, - 0, 0, 0, 40, 50, 29, 0, 0, 0, 37, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, + 0, 0, 0, 0, 0, 0, 0, 524, 0, 27, + 28, 0, 0, 0, 0, 0, 0, 0, 0, 211, + 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, + 32, 33, 0, 34, 0, 0, 0, 0, 0, 0, + 501, 0, 0, 0, 41, 0, 0, 0, 0, 0, + 0, 0, 526, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 47, 525, 528, 527, 0, 48, 0, 0, + 0, 0, 222, 0, 0, 0, 0, 0, 40, 50, + 29, 206, 0, 0, 37, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 26, 27, 28, 0, 0, 0, + 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, + 0, 0, 31, 0, 0, 0, 32, 33, 0, 34, + 0, 0, 0, 35, 0, 36, 38, 39, 0, 0, + 41, 0, 0, 0, 42, 0, 43, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 47, 44, + 46, 45, 0, 48, 0, 49, 0, 51, 0, 52, + 0, 0, 0, 0, 40, 50, 29, 0, 0, 0, + 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, + 0, 30, 0, 0, 0, 0, 0, 0, 31, 0, + 0, 0, 32, 33, 0, 34, 0, 0, 0, 35, + 0, 36, 38, 39, 0, 0, 41, 0, 0, 0, + 42, 0, 43, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 47, 44, 46, 45, 0, 48, + 0, 49, 0, 51, 267, 52, 0, 0, 0, 0, + 40, 50, 29, 0, 0, 0, 37, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -114, 0, 0, 0, + 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, + 0, 30, 0, 0, 0, 0, 0, 0, 31, 0, + 0, 0, 32, 33, 0, 34, 0, 0, 0, 35, + 0, 36, 38, 39, 0, 0, 41, 0, 0, 0, + 42, 0, 43, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 47, 44, 46, 45, 0, 48, + 0, 49, 0, 51, 0, 52, 0, 0, 0, 0, + 40, 50, 29, 0, 0, 0, 37, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 471, 0, 0, 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, - 30, 0, 0, 0, 0, 0, 0, 31, 213, 0, - 0, 583, 584, 0, 34, 0, 0, 0, 35, 0, + 30, 0, 0, 0, 0, 0, 0, 31, 0, 0, + 0, 32, 33, 0, 34, 0, 0, 0, 35, 0, 36, 38, 39, 0, 0, 41, 0, 0, 0, 42, - 0, 43, 0, 0, 0, 0, 0, 0, 0, 217, + 0, 43, 0, 0, 472, 0, 0, 0, 0, 0, 0, 0, 0, 47, 44, 46, 45, 0, 48, 0, 49, 0, 51, 0, 52, 0, 0, 0, 0, 40, 50, 29, 0, 0, 0, 37, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 479, 0, 0, 26, 27, - 28, 0, 0, 0, 0, 0, 0, 0, 0, 30, - 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, - 32, 33, 0, 34, 0, 0, 0, 35, 0, 36, - 38, 39, 0, 0, 41, 0, 0, 0, 42, 0, - 43, 0, 0, 482, 0, 0, 0, 0, 0, 0, - 0, 0, 47, 44, 46, 45, 0, 48, 0, 49, - 0, 51, 0, 52, 0, 0, 0, 0, 40, 50, - 29, 0, 0, 0, 37, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 471, 0, 0, 26, 27, 28, - 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, - 0, 0, 0, 0, 0, 31, 0, 0, 0, 32, - 33, 0, 34, 0, 0, 0, 35, 0, 36, 38, - 39, 0, 0, 41, 0, 0, 0, 42, 0, 43, - 0, 0, 472, 0, 0, 0, 0, 0, 0, 0, - 0, 47, 44, 46, 45, 0, 48, 0, 49, 0, - 51, 0, 52, 0, 0, 0, 0, 40, 50, 29, - 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 479, 0, 0, 26, 27, 28, 0, - 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, - 0, 0, 0, 0, 31, 0, 0, 0, 32, 33, - 0, 34, 0, 0, 0, 35, 0, 36, 38, 39, - 0, 0, 41, 0, 0, 0, 42, 0, 43, 0, - 0, 480, 0, 0, 0, 0, 0, 0, 0, 0, - 47, 44, 46, 45, 0, 48, 0, 49, 0, 51, - 0, 52, 0, 0, 0, 0, 40, 50, 29, 0, - 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 471, 0, 0, 26, 27, 28, 0, 0, + 0, 0, 0, 0, 0, 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, - 0, 0, 0, 31, 0, 0, 0, 32, 33, 0, + 0, 0, 0, 31, 213, 0, 0, 590, 591, 0, 34, 0, 0, 0, 35, 0, 36, 38, 39, 0, 0, 41, 0, 0, 0, 42, 0, 43, 0, 0, - 477, 0, 0, 0, 0, 0, 0, 0, 0, 47, + 0, 0, 0, 0, 0, 217, 0, 0, 0, 47, 44, 46, 45, 0, 48, 0, 49, 0, 51, 0, 52, 0, 0, 0, 0, 40, 50, 29, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 479, 0, 0, 26, 27, 28, 0, 0, 0, + 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, + 0, 0, 31, 0, 0, 0, 32, 33, 0, 34, + 0, 0, 0, 35, 0, 36, 38, 39, 0, 0, + 41, 0, 0, 0, 42, 0, 43, 0, 0, 482, + 0, 0, 0, 0, 0, 0, 0, 0, 47, 44, + 46, 45, 0, 48, 0, 49, 0, 51, 0, 52, + 0, 0, 0, 0, 40, 50, 29, 0, 0, 0, + 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 471, 0, 0, 26, 27, 28, 0, 0, 0, 0, + 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, + 0, 31, 0, 0, 0, 32, 33, 0, 34, 0, + 0, 0, 35, 0, 36, 38, 39, 0, 0, 41, + 0, 0, 0, 42, 0, 43, 0, 0, 477, 0, + 0, 0, 0, 0, 0, 0, 0, 47, 44, 46, + 45, 0, 48, 0, 49, 0, 51, 0, 52, 0, + 0, 0, 0, 40, 50, 29, 0, 0, 0, 37, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 479, + 0, 0, 26, 27, 28, 0, 0, 0, 0, 0, + 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, + 31, 0, 0, 0, 32, 33, 0, 34, 0, 0, + 0, 35, 0, 36, 38, 39, 0, 0, 41, 0, + 0, 0, 42, 0, 43, 0, 0, 480, 0, 0, + 0, 0, 0, 0, 0, 0, 47, 44, 46, 45, + 0, 48, 0, 49, 0, 51, 0, 52, 0, 0, + 0, 0, 40, 50, 29, 0, 0, 0, 37, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 105, 106, + 107, 0, 0, 109, 111, 112, 0, 0, 113, 0, + 114, 0, 0, 0, 116, 117, 118, 0, 0, 0, + 0, 0, 0, 31, 119, 120, 121, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 122, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 125, 0, 0, 0, 0, 0, 0, + 44, 46, 45, 126, 127, 128, 0, 130, 131, 132, + 133, 134, 135, 0, 0, 123, 129, 115, 108, 110, + 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105, 106, 107, 0, 0, 109, 111, 112, 0, 0, 113, 0, 114, 0, 0, 0, 116, 117, 118, - 0, 0, 0, 0, 0, 0, 31, 119, 120, 121, + 0, 0, 0, 0, 0, 0, 389, 119, 120, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 122, 0, 0, 0, 390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 0, 0, 0, - 0, 0, 0, 44, 46, 45, 126, 127, 128, 0, + 0, 0, 394, 391, 393, 0, 126, 127, 128, 0, 130, 131, 132, 133, 134, 135, 0, 0, 123, 129, 115, 108, 110, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105, 106, 107, 0, 0, 109, @@ -523,22 +546,22 @@ const int QmlJSGrammar::action_info [] = { 116, 117, 118, 0, 0, 0, 0, 0, 0, 389, 119, 120, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 0, 0, 390, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, + 0, 0, 0, 0, 0, 392, 0, 0, 0, 125, 0, 0, 0, 0, 0, 394, 391, 393, 0, 126, 127, 128, 0, 130, 131, 132, 133, 134, 135, 0, 0, 123, 129, 115, 108, 110, 124, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 105, 106, 107, - 0, 0, 109, 111, 112, 0, 0, 113, 0, 114, - 0, 0, 0, 116, 117, 118, 0, 0, 0, 0, - 0, 0, 389, 119, 120, 121, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 122, 0, 0, 0, - 390, 0, 0, 0, 0, 0, 0, 0, 392, 0, - 0, 0, 125, 0, 0, 0, 0, 0, 394, 391, - 393, 0, 126, 127, 128, 0, 130, 131, 132, 133, - 134, 135, 0, 0, 123, 129, 115, 108, 110, 124, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 205, 0, 0, + 0, 0, 207, 0, 26, 27, 28, 209, 0, 0, + 0, 0, 0, 0, 210, 30, 0, 0, 0, 0, + 0, 0, 212, 213, 0, 0, 214, 33, 0, 34, + 0, 0, 0, 35, 0, 36, 38, 39, 0, 0, + 41, 0, 0, 0, 42, 0, 43, 0, 0, 0, + 0, 0, 216, 0, 217, 0, 0, 0, 47, 215, + 218, 45, 219, 48, 220, 49, 221, 51, 222, 52, + 223, 224, 0, 0, 40, 50, 29, 206, 208, 0, + 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 205, 0, 0, 0, 0, 207, 0, 26, 27, 28, - 209, 0, 0, 0, 0, 0, 0, 210, 30, 0, + 209, 0, 0, 0, 0, 0, 0, 210, 211, 0, 0, 0, 0, 0, 0, 212, 213, 0, 0, 214, 33, 0, 34, 0, 0, 0, 35, 0, 36, 38, 39, 0, 0, 41, 0, 0, 0, 42, 0, 43, @@ -546,178 +569,174 @@ const int QmlJSGrammar::action_info [] = { 0, 47, 215, 218, 45, 219, 48, 220, 49, 221, 51, 222, 52, 223, 224, 0, 0, 40, 50, 29, 206, 208, 0, 37, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 205, 0, 0, 0, 0, 207, 0, - 26, 27, 28, 209, 0, 0, 0, 0, 0, 0, - 210, 211, 0, 0, 0, 0, 0, 0, 212, 213, - 0, 0, 214, 33, 0, 34, 0, 0, 0, 35, - 0, 36, 38, 39, 0, 0, 41, 0, 0, 0, - 42, 0, 43, 0, 0, 0, 0, 0, 216, 0, - 217, 0, 0, 0, 47, 215, 218, 45, 219, 48, - 220, 49, 221, 51, 222, 52, 223, 224, 0, 0, - 40, 50, 29, 206, 208, 0, 37, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 586, 106, 107, 0, - 0, 588, 111, 590, 27, 28, 591, 0, 114, 0, - 0, 0, 116, 593, 594, 0, 0, 0, 0, 0, - 0, 595, 596, 120, 121, 214, 33, 0, 34, 0, - 0, 0, 35, 0, 36, 597, 39, 0, 0, 599, - 0, 0, 0, 42, 0, 43, 0, 0, 0, 0, - 0, 601, 0, 217, 0, 0, 0, 603, 600, 602, - 45, 604, 605, 606, 49, 608, 609, 610, 611, 612, - 613, 0, 0, 598, 607, 592, 587, 589, 124, 37, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 357, - 106, 107, 0, 0, 359, 111, 361, 27, 28, 362, - 0, 114, 0, 0, 0, 116, 364, 365, 0, 0, - 0, 0, 0, 0, 366, 367, 120, 121, 214, 33, - 0, 34, 0, 0, 0, 35, 0, 36, 368, 39, - 0, 0, 370, 0, 0, 0, 42, 0, 43, 0, - -258, 0, 0, 0, 372, 0, 217, 0, 0, 0, - 374, 371, 373, 45, 375, 376, 377, 49, 379, 380, - 381, 382, 383, 384, 0, 0, 369, 378, 363, 358, - 360, 124, 37, 0, 0, 0, 0, 0, 0, 0, - 0, 0, + 0, 0, 0, 593, 106, 107, 0, 0, 595, 111, + 597, 27, 28, 598, 0, 114, 0, 0, 0, 116, + 600, 601, 0, 0, 0, 0, 0, 0, 602, 603, + 120, 121, 214, 33, 0, 34, 0, 0, 0, 35, + 0, 36, 604, 39, 0, 0, 606, 0, 0, 0, + 42, 0, 43, 0, 0, 0, 0, 0, 608, 0, + 217, 0, 0, 0, 610, 607, 609, 45, 611, 612, + 613, 49, 615, 616, 617, 618, 619, 620, 0, 0, + 605, 614, 599, 594, 596, 124, 37, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 357, 106, 107, 0, + 0, 359, 111, 361, 27, 28, 362, 0, 114, 0, + 0, 0, 116, 364, 365, 0, 0, 0, 0, 0, + 0, 366, 367, 120, 121, 214, 33, 0, 34, 0, + 0, 0, 35, 0, 36, 368, 39, 0, 0, 370, + 0, 0, 0, 42, 0, 43, 0, -260, 0, 0, + 0, 372, 0, 217, 0, 0, 0, 374, 371, 373, + 45, 375, 376, 377, 49, 379, 380, 381, 382, 383, + 384, 0, 0, 369, 378, 363, 358, 360, 124, 37, + 0, 0, 0, 0, 0, 0, 0, 0, 0, - 386, 538, 182, 555, 543, 406, 203, 165, 551, 303, - 388, 13, 502, 491, 396, 146, 298, 307, 507, 305, - 558, 457, 513, 432, 234, 246, 234, 249, 298, 468, - 239, 178, 172, 316, 428, 425, 421, 483, 431, 432, - 574, 435, 184, 620, 570, 413, 452, 178, 345, 298, - 569, 234, 435, 456, 567, 136, 454, 347, 343, 178, - 332, 335, 246, 246, 330, 441, 239, 429, 432, 446, - 167, 159, 411, 481, 142, 239, 478, 500, 443, 398, - 516, 463, 349, 0, 450, 203, 203, 435, 445, 400, - 457, 139, 144, 0, 0, 0, 0, 517, 182, 0, - 619, 0, 102, 316, 298, 0, 142, 0, 0, 142, - 0, 403, 400, 56, 174, 447, 56, 56, 401, 486, - 517, 282, 0, 518, 56, 104, 176, 56, 0, 485, - 56, 56, 176, 448, 56, 56, 448, 56, 56, 56, - 281, 401, 283, 280, 284, 56, 56, 447, 176, 262, - 56, 56, 64, 56, 266, 0, 56, 93, 56, 94, - 65, 467, 92, 56, 56, 56, 56, 301, 56, 73, - 80, 87, 68, 56, 400, 334, 325, 86, 98, 56, - 56, 56, 340, 337, 85, 56, 233, 298, 56, 56, - 88, 96, 84, 56, 89, 56, 56, 164, 91, 57, - 90, 298, 56, 401, 490, 56, 298, 448, 56, 56, - 447, 487, 56, 56, 489, 488, 56, 56, 63, 56, - 614, 56, 66, 616, 294, 56, 266, 294, 0, 266, - 266, 161, 266, 56, 289, 56, 291, 294, 266, 102, - 266, 0, 266, 468, 0, 0, 315, 0, 309, 313, - 299, 294, 312, 56, 0, 0, 266, 0, 266, 293, - 285, 56, 104, 171, 328, 56, 266, 0, 274, 326, - 266, 0, 56, 296, 269, 294, 56, 266, 476, 286, - 266, 266, 475, 287, 517, 0, 0, 0, 0, 576, - 0, 0, 532, 0, 582, 0, 0, 322, 0, 0, - 523, 533, 585, 578, 579, 580, 581, 0, 0, 0, + 502, 182, 136, 507, 538, 516, 457, 574, 178, 305, + 246, 146, 234, 239, 13, 627, 298, 491, 562, 432, + 249, 435, 316, 558, 178, 303, 549, 543, 565, 483, + 576, 581, 347, 577, 513, 450, 246, 468, 142, 441, + 239, 443, 144, 452, 246, 234, 445, 463, 349, 239, + 446, 234, 454, 456, 398, 178, 172, 406, 203, 184, + 411, 431, 298, 425, 435, 428, 413, 429, 159, 167, + 421, 386, 432, 432, 388, 298, 334, 396, 332, 435, + 343, 165, 330, 139, 345, 335, 500, 481, 203, 182, + 478, 298, 0, 0, 0, 307, 476, 102, 0, 0, + 475, 142, 517, 56, 56, 626, 174, 56, 56, 284, + 176, 203, 400, 56, 0, 68, 298, 142, 457, 164, + 104, 56, 403, 176, 56, 56, 400, 161, 298, 283, + 281, 56, 56, 56, 448, 448, 282, 56, 56, 56, + 56, 401, 485, 280, 298, 56, 56, 98, 447, 85, + 56, 96, 447, 262, 326, 401, 56, 56, 266, 316, + 56, 89, 87, 66, 56, 56, 56, 57, 448, 56, + 88, 447, 56, 56, 337, 490, 56, 80, 0, 328, + 56, 56, 92, 65, 340, 56, 73, 64, 56, 467, + 56, 301, 63, 56, 94, 56, 400, 176, 517, 93, + 56, 518, 487, 56, 56, 486, 56, 299, 86, 56, + 84, 56, 233, 489, 90, 56, 56, 488, 56, 0, + 0, 91, 294, 266, 56, 401, 294, 266, 0, 266, + 0, 266, 325, 294, 56, 312, 56, 289, 266, 266, + 294, 266, 0, 285, 315, 266, 56, 621, 293, 309, + 623, 266, 56, 287, 102, 313, 56, 266, 56, 286, + 0, 266, 322, 266, 0, 269, 56, 517, 0, 291, + 468, 266, 583, 274, 0, 532, 0, 104, 171, 589, + 0, 0, 0, 523, 533, 0, 0, 592, 585, 586, + 587, 588, 0, 294, 0, 0, 0, 0, 266, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 517, 0, 0, 0, 0, 0, - 0, 0, 532, 0, 0, 0, 0, 0, 0, 0, - 523, 533, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 517, 0, 0, 0, + 0, 0, 0, 0, 532, 0, 0, 0, 0, 0, + 0, 0, 523, 533, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0}; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0}; const int QmlJSGrammar::action_check [] = { - 55, 48, 7, 29, 8, 7, 36, 7, 33, 8, - 79, 7, 36, 36, 60, 7, 17, 36, 60, 36, - 61, 16, 60, 60, 7, 33, 8, 55, 7, 7, - 7, 2, 20, 55, 7, 7, 33, 2, 36, 33, - 7, 7, 5, 36, 33, 36, 7, 7, 7, 0, - 60, 90, 33, 7, 7, 1, 36, 60, 48, 7, - 36, 36, 36, 1, 8, 29, 36, 79, 55, 55, - 79, 33, 8, 79, 29, 60, 60, 8, 1, 90, - 2, 7, 29, 1, 36, 17, 2, 7, 7, -1, - 48, 33, 61, 61, 31, 36, 36, 8, 33, 7, - 7, 7, 36, 36, 33, 48, 36, 7, 10, 66, - 60, 8, 15, 40, 8, 7, 8, 66, 8, 8, - 8, 77, 61, 62, 51, 50, 8, 8, 42, 54, - 8, 34, 7, -1, 7, 15, 6, 61, 62, 53, - 61, 62, 8, 8, 61, 62, 61, 62, 61, 62, - 20, 61, 62, 55, 34, 8, 61, 62, 33, 8, - 61, 62, 8, 60, 8, -1, 60, 56, 56, 40, - 60, 7, 40, 40, 56, 56, 61, 62, 61, 62, - 51, 50, 60, 51, 51, 54, 29, 29, 8, 29, - 29, 15, 29, -1, 60, 8, 61, 8, 7, 29, - -1, -1, 36, -1, -1, -1, -1, 60, 91, 12, - 34, 60, 36, 8, 12, 61, 62, 61, 62, 15, - 92, 93, 94, 12, 8, 61, 62, 61, 62, 66, - 67, 68, 75, 75, -1, 75, 75, -1, 34, -1, - 36, 61, 62, 86, 86, 75, 86, 86, 61, 62, - 61, 62, 61, 62, 57, 29, 86, -1, 15, 57, - 63, 15, 29, 18, 19, 63, 61, 62, 57, 29, - 47, -1, -1, 29, 63, -1, 60, 34, -1, 36, - 34, -1, 36, -1, 61, 62, -1, -1, -1, -1, - 45, 46, 66, 67, 68, 18, 19, 29, 15, 66, - 67, 68, 29, 18, 19, 29, 66, 67, 68, 29, - 66, 67, 68, 25, 91, 27, 33, 34, 29, 36, - -1, 29, 45, 46, 29, -1, 38, 29, -1, -1, - 45, 46, 29, -1, 66, 67, 68, -1, -1, 66, - 67, 68, 66, 67, 68, -1, 66, 67, 68, 18, - 19, -1, -1, -1, -1, 66, 67, 68, 66, 67, - 68, 66, 67, 68, 66, 67, 68, -1, -1, 66, - 67, 68, 23, 24, -1, 29, 45, 46, 23, 24, - -1, 32, 23, 24, 35, 15, 37, 32, -1, -1, - 35, 32, 37, 29, 35, -1, 37, -1, 29, -1, - 36, -1, -1, 33, 34, 36, 36, 61, 62, 23, - 24, -1, 66, 67, 68, -1, -1, 31, 32, -1, - -1, 35, -1, 37, -1, -1, 29, -1, -1, -1, - 66, 67, 68, 23, 24, 66, 67, 68, -1, -1, - -1, 31, 32, 23, 24, 35, -1, 37, -1, -1, - 29, 31, 32, 29, -1, 35, -1, 37, 61, 62, - -1, 23, 24, 66, 67, 68, 29, 23, 24, 31, - 32, -1, -1, 35, -1, 37, 32, -1, -1, 35, - -1, 37, 61, 62, -1, 61, 62, 66, 67, 68, - 66, 67, 68, -1, -1, -1, -1, -1, 61, 62, - 23, 24, -1, 66, 67, 68, 3, -1, 31, 32, - -1, -1, 35, -1, 37, -1, 13, -1, -1, -1, - 17, -1, -1, -1, -1, -1, 3, -1, -1, 26, - -1, 28, -1, -1, -1, -1, 13, -1, -1, -1, - 17, 29, 39, -1, 41, 42, -1, -1, -1, 26, - -1, 28, 49, -1, 31, 52, 53, -1, -1, -1, - -1, 58, 39, -1, 41, 42, -1, 64, -1, -1, - -1, -1, 49, 61, 62, 52, 53, -1, 66, 67, - 68, 58, -1, 80, -1, -1, -1, 64, -1, -1, - -1, -1, -1, -1, -1, -1, 12, 13, -1, -1, - -1, -1, -1, 80, -1, -1, 22, -1, -1, 3, - -1, -1, -1, 29, -1, -1, -1, 33, 34, 13, - 36, -1, -1, 17, -1, -1, -1, 43, -1, -1, - -1, 47, 26, -1, 28, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 39, -1, 41, 42, 65, - 66, 67, 68, -1, 70, 49, -1, -1, 52, 53, - -1, -1, -1, -1, 58, 81, 82, 83, -1, -1, - 64, 87, -1, -1, -1, 12, 13, -1, -1, -1, - -1, -1, -1, -1, -1, 22, 80, -1, -1, -1, - -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, - -1, -1, -1, 12, 13, -1, 43, -1, -1, -1, - 47, -1, -1, 22, -1, -1, -1, -1, -1, -1, - 29, -1, -1, -1, 33, 34, -1, 36, 65, 66, - 67, 68, -1, 70, 43, -1, -1, -1, 47, -1, + 7, 90, 8, 7, 55, 33, 55, 60, 0, 33, + 60, 7, 60, 36, 36, 8, 55, 60, 7, 7, + 17, 55, 16, 7, 36, 36, 7, 37, 33, 2, + 7, 60, 7, 36, 36, 60, 36, 7, 33, 2, + 20, 8, 7, 7, 79, 36, 36, 33, 7, 7, + 7, 36, 1, 36, 36, 7, 7, 36, 29, 33, + 7, 48, 7, 7, 33, 8, 7, 1, 29, 8, + 48, 79, 48, 8, 90, 29, 2, 7, 79, 7, + 7, 36, 1, 36, 7, 33, 36, 24, 60, 29, + 5, 7, 1, 61, 36, 8, 7, 17, 36, 6, + 66, 33, 31, 8, 60, 8, 66, 8, 33, 8, + 8, 29, 36, 20, 60, 77, 8, 48, 7, 8, + 10, 8, 55, 8, -1, 61, -1, -1, 7, -1, + -1, -1, 42, -1, -1, -1, 8, 15, 8, 61, + 61, 62, 50, 53, 61, 62, 54, 61, 62, 61, + 62, 8, 40, 56, 33, 60, 34, 8, 56, 8, + 61, 60, 7, 51, -1, 55, 61, 62, 60, 29, + 61, 62, 40, 60, 40, 60, 29, 61, 62, 61, + 62, 40, 2, 51, 56, 51, 61, 62, 61, 62, + 60, 15, 51, 36, 61, 62, 50, 8, 7, 56, + 54, 8, -1, 8, -1, 8, 61, 62, 8, 60, + 34, 60, -1, -1, 29, 75, 61, 62, 61, 62, + 15, 29, 75, 29, -1, -1, 86, 29, 92, 93, + 94, -1, 25, 86, 27, 25, 91, 27, 8, 34, + -1, 36, -1, -1, 12, 38, -1, -1, 38, 12, + 61, 62, 61, 62, 61, 62, 61, 62, 61, 62, + 75, 61, 62, 25, 12, 27, 25, 75, 27, 75, + 25, 86, 27, 75, -1, 29, 38, 15, 86, 38, + 86, -1, 15, 38, 86, 15, 25, 29, 27, 57, + -1, 61, 62, 29, 57, 63, 34, -1, 36, 38, + 63, 34, 29, 36, 34, 29, 36, 18, 19, 57, + 29, -1, 66, 67, 68, 63, 29, -1, -1, 29, + -1, -1, -1, -1, 66, 67, 68, 29, -1, -1, + 66, 67, 68, -1, 45, 46, 29, -1, -1, 66, + 67, 68, 66, 67, 68, 29, -1, 66, 67, 68, + 18, 19, 29, 66, 67, 68, 66, 67, 68, 25, + 29, 27, -1, -1, 66, 67, 68, 18, 19, 29, + -1, -1, 38, 66, 67, 68, -1, 45, 46, -1, + 29, -1, 66, 67, 68, 18, 19, 36, 47, 66, + 67, 68, -1, -1, 45, 46, -1, 66, 67, 68, + -1, -1, 61, 62, 29, -1, 66, 67, 68, -1, + -1, 36, 45, 46, 23, 24, -1, 66, 67, 68, + -1, 23, 24, 32, -1, -1, 35, -1, 37, 29, + 32, 15, 91, 35, -1, 37, -1, -1, -1, -1, + -1, 66, 67, 68, -1, 23, 24, -1, -1, 33, + 34, -1, 36, 31, 32, -1, 29, 35, -1, 37, + -1, 61, 62, 23, 24, 29, 66, 67, 68, -1, + -1, 31, 32, 23, 24, 35, -1, 37, 29, -1, + -1, 31, 32, -1, -1, 35, -1, 37, 61, 62, + -1, 29, -1, 66, 67, 68, -1, 61, 62, 29, + -1, -1, 66, 67, 68, -1, -1, -1, -1, -1, + 61, 62, -1, 23, 24, 66, 67, 68, -1, -1, + -1, -1, 32, 61, 62, 35, -1, 37, 66, 67, + 68, 61, 62, -1, -1, -1, 66, 67, 68, -1, + -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 13, -1, -1, -1, 17, -1, -1, + -1, -1, -1, -1, -1, -1, 26, -1, 28, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 39, + 3, 41, 42, -1, -1, -1, -1, 23, 24, 49, + 13, -1, 52, 53, 17, 31, 32, -1, 58, 35, + -1, 37, -1, 26, 64, 28, -1, -1, 31, -1, + -1, -1, -1, -1, -1, -1, 39, -1, 41, 42, + 80, -1, -1, 12, 13, -1, 49, -1, -1, 52, + 53, -1, -1, 22, -1, 58, -1, -1, -1, -1, + 29, 64, -1, -1, 33, 34, -1, 36, -1, -1, + -1, -1, -1, -1, 43, -1, -1, 80, 47, -1, + -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 13, -1, -1, -1, 17, 65, 66, 67, 68, + -1, 70, -1, -1, 26, -1, 28, -1, -1, -1, + -1, -1, 81, 82, 83, -1, -1, 39, 87, 41, + 42, -1, -1, -1, -1, -1, -1, 49, -1, -1, + 52, 53, -1, 12, 13, -1, 58, -1, -1, -1, + -1, -1, 64, 22, -1, -1, -1, -1, -1, -1, + 29, -1, -1, -1, 33, 34, -1, 36, 80, -1, + -1, -1, -1, -1, 43, -1, -1, -1, 47, -1, + -1, -1, -1, -1, -1, 12, 13, -1, -1, -1, + -1, -1, -1, -1, -1, 22, 65, 66, 67, 68, + -1, 70, 29, -1, -1, -1, 33, 34, -1, 36, + -1, -1, 81, 82, 83, -1, 43, -1, 87, -1, + 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, + 67, 68, -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, - 87, -1, -1, -1, -1, -1, 65, 66, 67, 68, - -1, 70, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 81, 82, 83, -1, -1, -1, 87, -1, - 12, 13, -1, -1, -1, -1, -1, -1, 12, 13, - 22, -1, -1, -1, -1, -1, -1, 29, 22, -1, - -1, 33, 34, -1, 36, 29, -1, -1, -1, 33, - 34, 43, 36, -1, -1, 47, -1, -1, -1, 43, - -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 65, 66, 67, 68, -1, 70, -1, - -1, 65, 66, 67, 68, -1, 70, -1, -1, 81, - 82, 83, -1, -1, -1, 87, -1, 81, 82, 83, - -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 10, -1, 12, 13, -1, -1, -1, + 87, -1, 12, 13, -1, -1, -1, -1, -1, -1, + 12, 13, 22, -1, -1, -1, -1, -1, -1, 29, + 22, -1, -1, 33, 34, -1, 36, 29, -1, -1, + -1, 33, 34, 43, 36, -1, -1, 47, -1, -1, + -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 65, 66, 67, 68, -1, + 70, -1, -1, 65, 66, 67, 68, -1, 70, -1, + -1, 81, 82, 83, -1, -1, -1, 87, -1, 81, + 82, 83, -1, -1, -1, 87, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, -1, -1, -1, 43, -1, -1, -1, - 47, -1, -1, -1, -1, -1, -1, -1, 55, -1, + 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, - 67, 68, -1, 70, -1, -1, -1, -1, 75, -1, - -1, -1, -1, -1, 81, 82, 83, 84, -1, -1, + 67, 68, -1, 70, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, @@ -727,84 +746,102 @@ const int QmlJSGrammar::action_check [] = { -1, -1, -1, -1, -1, 65, 66, 67, 68, -1, 70, -1, -1, -1, -1, 75, -1, -1, -1, -1, -1, 81, 82, 83, 84, -1, -1, 87, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, - -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, - -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, - 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, - 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 65, 66, 67, 68, -1, 70, -1, 72, -1, - 74, -1, 76, -1, -1, -1, -1, 81, 82, 83, - -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 7, -1, -1, -1, 11, 12, 13, - -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, - -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, - 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, - 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 65, 66, 67, 68, -1, 70, -1, 72, -1, - 74, -1, 76, -1, -1, -1, -1, 81, 82, 83, - -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, - -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, - -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, - -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, - -1, -1, -1, 51, -1, 53, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 65, 66, 67, - 68, -1, 70, -1, 72, -1, 74, 75, 76, -1, - -1, -1, -1, 81, 82, 83, -1, -1, -1, 87, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, + -1, -1, -1, -1, -1, -1, -1, 10, -1, 12, + 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, + -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, + 33, 34, -1, 36, -1, -1, -1, -1, -1, -1, + 43, -1, -1, -1, 47, -1, -1, -1, -1, -1, + -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 65, 66, 67, 68, -1, 70, -1, -1, + -1, -1, 75, -1, -1, -1, -1, -1, 81, 82, + 83, 84, -1, -1, 87, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, + -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, + -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, + -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, + 47, -1, -1, -1, 51, -1, 53, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, + 67, 68, -1, 70, -1, 72, -1, 74, -1, 76, + -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, + 87, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, + -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, + -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, + -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, + 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 65, 66, 67, 68, -1, 70, + -1, 72, -1, 74, 75, 76, -1, -1, -1, -1, + 81, 82, 83, -1, -1, -1, 87, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 7, -1, -1, -1, + 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, + -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, + -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, + -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, + 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 65, 66, 67, 68, -1, 70, + -1, 72, -1, 74, -1, 76, -1, -1, -1, -1, + 81, 82, 83, -1, -1, -1, 87, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 8, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, - 22, -1, -1, -1, -1, -1, -1, 29, 30, -1, + 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, - -1, 53, -1, -1, -1, -1, -1, -1, -1, 61, + -1, 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, 67, 68, -1, 70, -1, 72, -1, 74, -1, 76, -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, 87, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 8, -1, -1, 11, 12, - 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, - -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, - 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, - 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, - 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, - -1, -1, 65, 66, 67, 68, -1, 70, -1, 72, - -1, 74, -1, 76, -1, -1, -1, -1, 81, 82, - 83, -1, -1, -1, 87, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 8, -1, -1, 11, 12, 13, - -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, - -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, - 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, - 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, - -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, - -1, 65, 66, 67, 68, -1, 70, -1, 72, -1, - 74, -1, 76, -1, -1, -1, -1, 81, 82, 83, - -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 8, -1, -1, 11, 12, 13, -1, - -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, - -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, - -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, - -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, - -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, - 65, 66, 67, 68, -1, 70, -1, 72, -1, 74, - -1, 76, -1, -1, -1, -1, 81, 82, 83, -1, - -1, -1, 87, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 8, -1, -1, 11, 12, 13, -1, -1, + -1, -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, - -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, + -1, -1, -1, 29, 30, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, - 56, -1, -1, -1, -1, -1, -1, -1, -1, 65, + -1, -1, -1, -1, -1, 61, -1, -1, -1, 65, 66, 67, 68, -1, 70, -1, 72, -1, 74, -1, 76, -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, 87, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 8, -1, -1, 11, 12, 13, -1, -1, -1, + -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, + -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, + -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, + 47, -1, -1, -1, 51, -1, 53, -1, -1, 56, + -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, + 67, 68, -1, 70, -1, 72, -1, 74, -1, 76, + -1, -1, -1, -1, 81, 82, 83, -1, -1, -1, + 87, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 8, -1, -1, 11, 12, 13, -1, -1, -1, -1, + -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, + -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, + -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, + -1, -1, -1, 51, -1, 53, -1, -1, 56, -1, + -1, -1, -1, -1, -1, -1, -1, 65, 66, 67, + 68, -1, 70, -1, 72, -1, 74, -1, 76, -1, + -1, -1, -1, 81, 82, 83, -1, -1, -1, 87, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, + -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, + -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, + 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, + -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, + -1, -1, 51, -1, 53, -1, -1, 56, -1, -1, + -1, -1, -1, -1, -1, -1, 65, 66, 67, 68, + -1, 70, -1, 72, -1, 74, -1, 76, -1, -1, + -1, -1, 81, 82, 83, -1, -1, -1, 87, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 4, 5, + 6, -1, -1, 9, 10, 11, -1, -1, 14, -1, + 16, -1, -1, -1, 20, 21, 22, -1, -1, -1, + -1, -1, -1, 29, 30, 31, 32, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 43, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, + 66, 67, 68, 69, 70, 71, -1, 73, 74, 75, + 76, 77, 78, -1, -1, 81, 82, 83, 84, 85, + 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 43, -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, - -1, -1, -1, 66, 67, 68, 69, 70, 71, -1, + -1, -1, 65, 66, 67, -1, 69, 70, 71, -1, 73, 74, 75, 76, 77, 78, -1, -1, 81, 82, 83, 84, 85, 86, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 5, 6, -1, -1, 9, @@ -812,20 +849,20 @@ const int QmlJSGrammar::action_check [] = { 20, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, -1, -1, 47, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, + -1, -1, -1, -1, -1, 55, -1, -1, -1, 59, -1, -1, -1, -1, -1, 65, 66, 67, -1, 69, 70, 71, -1, 73, 74, 75, 76, 77, 78, -1, -1, 81, 82, 83, 84, 85, 86, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 4, 5, 6, - -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, - -1, -1, -1, 20, 21, 22, -1, -1, -1, -1, - -1, -1, 29, 30, 31, 32, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 43, -1, -1, -1, - 47, -1, -1, -1, -1, -1, -1, -1, 55, -1, - -1, -1, 59, -1, -1, -1, -1, -1, 65, 66, - 67, -1, 69, 70, 71, -1, 73, 74, 75, 76, - 77, 78, -1, -1, 81, 82, 83, 84, 85, 86, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, + -1, -1, 9, -1, 11, 12, 13, 14, -1, -1, + -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, + -1, -1, 29, 30, -1, -1, 33, 34, -1, 36, + -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, + 47, -1, -1, -1, 51, -1, 53, -1, -1, -1, + -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, -1, -1, 81, 82, 83, 84, 85, -1, + 87, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, -1, -1, 33, @@ -835,79 +872,70 @@ const int QmlJSGrammar::action_check [] = { -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, -1, -1, 81, 82, 83, 84, 85, -1, 87, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 4, -1, -1, -1, -1, 9, -1, - 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, + 11, 12, 13, 14, -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, - -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, + 31, 32, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, -1, -1, - 81, 82, 83, 84, 85, -1, 87, -1, -1, -1, + 81, 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, 12, 13, 14, -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, 31, 32, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, - -1, -1, -1, 51, -1, 53, -1, -1, -1, -1, + -1, -1, -1, 51, -1, 53, -1, 55, -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, -1, -1, 81, 82, 83, 84, 85, 86, 87, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, - 5, 6, -1, -1, 9, 10, 11, 12, 13, 14, - -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, - -1, -1, -1, -1, 29, 30, 31, 32, 33, 34, - -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, - -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, - 55, -1, -1, -1, 59, -1, 61, -1, -1, -1, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, -1, -1, 81, 82, 83, 84, - 85, 86, 87, -1, -1, -1, -1, -1, -1, -1, - -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, - 33, 23, 12, 23, 3, 2, 2, 33, 3, 2, - 34, 3, 10, 2, 33, 65, 3, 2, 12, 3, - 3, 12, 12, 3, 12, 2, 12, 3, 3, 33, - 12, 12, 3, 12, 79, 91, 94, 3, 79, 3, - 12, 19, 12, 17, 12, 3, 2, 12, 3, 3, - 23, 12, 19, 2, 23, 3, 3, 2, 2, 12, - 3, 12, 2, 2, 2, 96, 12, 3, 3, 19, - 33, 33, 2, 33, 33, 12, 33, 10, 12, 2, - 8, 33, 2, -1, 3, 2, 2, 19, 19, 10, - 12, 33, 33, -1, -1, -1, -1, 10, 12, -1, - 13, -1, 12, 12, 3, -1, 33, -1, -1, 33, - -1, 38, 10, 42, 38, 44, 42, 42, 39, 44, - 10, 47, -1, 13, 42, 35, 44, 42, -1, 44, - 42, 42, 44, 44, 42, 42, 44, 42, 42, 42, - 47, 39, 47, 47, 47, 42, 42, 44, 44, 42, - 42, 42, 44, 42, 47, -1, 42, 48, 42, 48, - 44, 83, 48, 42, 42, 42, 42, 66, 42, 48, - 47, 47, 50, 42, 10, 2, 85, 46, 52, 42, - 42, 42, 98, 97, 46, 42, 103, 3, 42, 42, - 47, 54, 46, 42, 47, 42, 42, 58, 47, 45, - 47, 3, 42, 39, 44, 42, 3, 44, 42, 42, - 44, 44, 42, 42, 44, 44, 42, 42, 44, 42, - 10, 42, 45, 13, 42, 42, 47, 42, -1, 47, - 47, 56, 47, 42, 55, 42, 53, 42, 47, 12, - 47, -1, 47, 33, -1, -1, 64, -1, 57, 64, - 66, 42, 59, 42, -1, -1, 47, -1, 47, 64, - 49, 42, 35, 36, 66, 42, 47, -1, 49, 66, - 47, -1, 42, 64, 51, 42, 42, 47, 29, 49, - 47, 47, 33, 49, 10, -1, -1, -1, -1, 15, - -1, -1, 18, -1, 10, -1, -1, 64, -1, -1, - 26, 27, 18, 19, 20, 21, 22, -1, -1, -1, + 10, 12, 3, 12, 23, 8, 12, 23, 12, 3, + 2, 65, 12, 12, 3, 17, 3, 2, 23, 3, + 3, 19, 12, 3, 12, 2, 23, 3, 3, 3, + 23, 12, 2, 12, 12, 3, 2, 33, 33, 96, + 12, 12, 33, 2, 2, 12, 19, 33, 2, 12, + 19, 12, 3, 2, 2, 12, 3, 2, 2, 12, + 2, 79, 3, 91, 19, 79, 3, 3, 33, 33, + 94, 33, 3, 3, 34, 3, 2, 33, 3, 19, + 2, 33, 2, 33, 3, 12, 10, 33, 2, 12, + 33, 3, -1, -1, -1, 2, 29, 12, -1, -1, + 33, 33, 10, 42, 42, 13, 38, 42, 42, 47, + 44, 2, 10, 42, -1, 50, 3, 33, 12, 58, + 35, 42, 38, 44, 42, 42, 10, 56, 3, 47, + 47, 42, 42, 42, 44, 44, 47, 42, 42, 42, + 42, 39, 44, 47, 3, 42, 42, 52, 44, 46, + 42, 54, 44, 42, 66, 39, 42, 42, 47, 12, + 42, 47, 47, 45, 42, 42, 42, 45, 44, 42, + 47, 44, 42, 42, 97, 44, 42, 47, -1, 66, + 42, 42, 48, 44, 98, 42, 48, 44, 42, 83, + 42, 66, 44, 42, 48, 42, 10, 44, 10, 48, + 42, 13, 44, 42, 42, 44, 42, 66, 46, 42, + 46, 42, 103, 44, 47, 42, 42, 44, 42, -1, + -1, 47, 42, 47, 42, 39, 42, 47, -1, 47, + -1, 47, 85, 42, 42, 59, 42, 55, 47, 47, + 42, 47, -1, 49, 64, 47, 42, 10, 64, 57, + 13, 47, 42, 49, 12, 64, 42, 47, 42, 49, + -1, 47, 64, 47, -1, 51, 42, 10, -1, 53, + 33, 47, 15, 49, -1, 18, -1, 35, 36, 10, + -1, -1, -1, 26, 27, -1, -1, 18, 19, 20, + 21, 22, -1, 42, -1, -1, -1, -1, 47, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 10, -1, -1, -1, + -1, -1, -1, -1, 18, -1, -1, -1, -1, -1, + -1, -1, 26, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 10, -1, -1, -1, -1, -1, - -1, -1, 18, -1, -1, -1, -1, -1, -1, -1, - 26, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1}; + -1}; diff --git a/src/declarative/qml/parser/qmljsgrammar_p.h b/src/declarative/qml/parser/qmljsgrammar_p.h index 0610bfe..57fcccc 100644 --- a/src/declarative/qml/parser/qmljsgrammar_p.h +++ b/src/declarative/qml/parser/qmljsgrammar_p.h @@ -2,6 +2,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtCore module of the Qt Toolkit. @@ -21,10 +22,9 @@ ** 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. +** 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. @@ -156,15 +156,15 @@ public: T_XOR = 79, T_XOR_EQ = 80, - ACCEPT_STATE = 621, - RULE_COUNT = 337, - STATE_COUNT = 622, + ACCEPT_STATE = 628, + RULE_COUNT = 339, + STATE_COUNT = 629, TERMINAL_COUNT = 97, NON_TERMINAL_COUNT = 105, - GOTO_INDEX_OFFSET = 622, - GOTO_INFO_OFFSET = 2402, - GOTO_CHECK_OFFSET = 2402 + GOTO_INDEX_OFFSET = 629, + GOTO_INFO_OFFSET = 2539, + GOTO_CHECK_OFFSET = 2539 }; static const char *const spell []; diff --git a/src/declarative/qml/parser/qmljsparser.cpp b/src/declarative/qml/parser/qmljsparser.cpp index ab4ff63..c08e2af 100644 --- a/src/declarative/qml/parser/qmljsparser.cpp +++ b/src/declarative/qml/parser/qmljsparser.cpp @@ -400,6 +400,17 @@ case 44: { } break; case 46: { + AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(4).sval, sym(6).sval); + node->typeModifier = sym(2).sval; + node->propertyToken = loc(1); + node->typeModifierToken = loc(2); + node->typeToken = loc(4); + node->identifierToken = loc(6); + node->semicolonToken = loc(7); + sym(1).Node = node; +} break; + +case 48: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(3).sval); node->propertyToken = loc(1); node->typeToken = loc(2); @@ -408,7 +419,7 @@ case 46: { sym(1).Node = node; } break; -case 48: { +case 50: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval); node->isDefaultMember = true; node->defaultToken = loc(1); @@ -419,7 +430,7 @@ case 48: { sym(1).Node = node; } break; -case 50: { +case 52: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(3).sval, sym(5).Expression); node->propertyToken = loc(1); @@ -430,7 +441,7 @@ case 50: { sym(1).Node = node; } break; -case 52: { +case 54: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval, sym(6).Expression); node->isReadonlyMember = true; @@ -443,7 +454,7 @@ case 52: { sym(1).Node = node; } break; -case 54: { +case 56: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval, sym(6).Expression); node->isDefaultMember = true; @@ -456,75 +467,75 @@ case 54: { sym(1).Node = node; } break; -case 55: { +case 57: { sym(1).Node = makeAstNode(driver->nodePool(), sym(1).Node); } break; -case 56: { +case 58: { sym(1).Node = makeAstNode(driver->nodePool(), sym(1).Node); } break; -case 58: { +case 60: { QString s = QLatin1String(QmlJSGrammar::spell[T_PROPERTY]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } -case 59: { +case 61: { QString s = QLatin1String(QmlJSGrammar::spell[T_SIGNAL]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } -case 60: { +case 62: { QString s = QLatin1String(QmlJSGrammar::spell[T_READONLY]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } -case 61: { +case 63: { AST::ThisExpression *node = makeAstNode (driver->nodePool()); node->thisToken = loc(1); sym(1).Node = node; } break; -case 62: { +case 64: { AST::IdentifierExpression *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 63: { +case 65: { AST::NullExpression *node = makeAstNode (driver->nodePool()); node->nullToken = loc(1); sym(1).Node = node; } break; -case 64: { +case 66: { AST::TrueLiteral *node = makeAstNode (driver->nodePool()); node->trueToken = loc(1); sym(1).Node = node; } break; -case 65: { +case 67: { AST::FalseLiteral *node = makeAstNode (driver->nodePool()); node->falseToken = loc(1); sym(1).Node = node; } break; -case 66: { +case 68: { AST::NumericLiteral *node = makeAstNode (driver->nodePool(), sym(1).dval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 67: -case 68: { +case 69: +case 70: { AST::StringLiteral *node = makeAstNode (driver->nodePool(), sym(1).sval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 69: { +case 71: { bool rx = lexer->scanRegExp(Lexer::NoPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage())); @@ -535,7 +546,7 @@ case 69: { sym(1).Node = node; } break; -case 70: { +case 72: { bool rx = lexer->scanRegExp(Lexer::EqualPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage())); @@ -546,28 +557,28 @@ case 70: { sym(1).Node = node; } break; -case 71: { +case 73: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), (AST::Elision *) 0); node->lbracketToken = loc(1); node->rbracketToken = loc(2); sym(1).Node = node; } break; -case 72: { +case 74: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).Elision->finish()); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 73: { +case 75: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish ()); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 74: { +case 76: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish (), (AST::Elision *) 0); node->lbracketToken = loc(1); @@ -576,7 +587,7 @@ case 74: { sym(1).Node = node; } break; -case 75: { +case 77: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish (), sym(4).Elision->finish()); node->lbracketToken = loc(1); @@ -585,7 +596,7 @@ case 75: { sym(1).Node = node; } break; -case 76: { +case 78: { AST::ObjectLiteral *node = 0; if (sym(2).Node) node = makeAstNode (driver->nodePool(), @@ -597,7 +608,7 @@ case 76: { sym(1).Node = node; } break; -case 77: { +case 79: { AST::ObjectLiteral *node = makeAstNode (driver->nodePool(), sym(2).PropertyNameAndValueList->finish ()); node->lbraceToken = loc(1); @@ -605,14 +616,14 @@ case 77: { sym(1).Node = node; } break; -case 78: { +case 80: { AST::NestedExpression *node = makeAstNode(driver->nodePool(), sym(2).Expression); node->lparenToken = loc(1); node->rparenToken = loc(3); sym(1).Node = node; } break; -case 79: { +case 81: { if (AST::ArrayMemberExpression *mem = AST::cast(sym(1).Expression)) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, mem->lbracketToken, QLatin1String("Ignored annotation"))); @@ -632,48 +643,48 @@ case 79: { } } break; -case 80: { +case 82: { sym(1).Node = makeAstNode (driver->nodePool(), (AST::Elision *) 0, sym(1).Expression); } break; -case 81: { +case 83: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Elision->finish(), sym(2).Expression); } break; -case 82: { +case 84: { AST::ElementList *node = makeAstNode (driver->nodePool(), sym(1).ElementList, (AST::Elision *) 0, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 83: { +case 85: { AST::ElementList *node = makeAstNode (driver->nodePool(), sym(1).ElementList, sym(3).Elision->finish(), sym(4).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 84: { +case 86: { AST::Elision *node = makeAstNode (driver->nodePool()); node->commaToken = loc(1); sym(1).Node = node; } break; -case 85: { +case 87: { AST::Elision *node = makeAstNode (driver->nodePool(), sym(1).Elision); node->commaToken = loc(2); sym(1).Node = node; } break; -case 86: { +case 88: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyName, sym(3).Expression); node->colonToken = loc(2); sym(1).Node = node; } break; -case 87: { +case 89: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression); node->commaToken = loc(2); @@ -681,40 +692,36 @@ case 87: { sym(1).Node = node; } break; -case 88: { +case 90: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 89: -case 90: { +case 91: +case 92: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 91: { +case 93: { AST::StringLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 92: { +case 94: { AST::NumericLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).dval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 93: { +case 95: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 94: - -case 95: - case 96: case 97: @@ -772,25 +779,29 @@ case 122: case 123: case 124: + +case 125: + +case 126: { sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); } break; -case 129: { +case 131: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 130: { +case 132: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 131: { +case 133: { AST::NewMemberExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList); node->newToken = loc(1); node->lparenToken = loc(3); @@ -798,316 +809,309 @@ case 131: { sym(1).Node = node; } break; -case 133: { +case 135: { AST::NewExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->newToken = loc(1); sym(1).Node = node; } break; -case 134: { +case 136: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 135: { +case 137: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 136: { +case 138: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 137: { +case 139: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 138: { +case 140: { sym(1).Node = 0; } break; -case 139: { +case 141: { sym(1).Node = sym(1).ArgumentList->finish(); } break; -case 140: { +case 142: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Expression); } break; -case 141: { +case 143: { AST::ArgumentList *node = makeAstNode (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 145: { +case 147: { AST::PostIncrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->incrementToken = loc(2); sym(1).Node = node; } break; -case 146: { +case 148: { AST::PostDecrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->decrementToken = loc(2); sym(1).Node = node; } break; -case 148: { +case 150: { AST::DeleteExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->deleteToken = loc(1); sym(1).Node = node; } break; -case 149: { +case 151: { AST::VoidExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->voidToken = loc(1); sym(1).Node = node; } break; -case 150: { +case 152: { AST::TypeOfExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->typeofToken = loc(1); sym(1).Node = node; } break; -case 151: { +case 153: { AST::PreIncrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->incrementToken = loc(1); sym(1).Node = node; } break; -case 152: { +case 154: { AST::PreDecrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->decrementToken = loc(1); sym(1).Node = node; } break; -case 153: { +case 155: { AST::UnaryPlusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->plusToken = loc(1); sym(1).Node = node; } break; -case 154: { +case 156: { AST::UnaryMinusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->minusToken = loc(1); sym(1).Node = node; } break; -case 155: { +case 157: { AST::TildeExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->tildeToken = loc(1); sym(1).Node = node; } break; -case 156: { +case 158: { AST::NotExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->notToken = loc(1); sym(1).Node = node; } break; -case 158: { +case 160: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mul, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 159: { +case 161: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Div, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 160: { +case 162: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mod, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 162: { +case 164: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Add, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 163: { +case 165: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Sub, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 165: { +case 167: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::LShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 166: { +case 168: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::RShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 167: { +case 169: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::URShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 169: { +case 171: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 170: { +case 172: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 171: { +case 173: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 172: { +case 174: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 173: { +case 175: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 174: { +case 176: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::In, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 176: { +case 178: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 177: { +case 179: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 178: { +case 180: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 179: { +case 181: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 180: { +case 182: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 182: { +case 184: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 183: { +case 185: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 184: { +case 186: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 185: { +case 187: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 187: { +case 189: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 188: { +case 190: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 189: { +case 191: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 190: { - AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::StrictNotEqual, sym(3).Expression); - node->operatorToken = loc(2); - sym(1).Node = node; -} break; - case 192: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::BitAnd, sym(3).Expression); + QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -1121,7 +1125,7 @@ case 194: { case 196: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::BitXor, sym(3).Expression); + QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -1135,7 +1139,7 @@ case 198: { case 200: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::BitOr, sym(3).Expression); + QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -1149,7 +1153,7 @@ case 202: { case 204: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::And, sym(3).Expression); + QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -1163,7 +1167,7 @@ case 206: { case 208: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::Or, sym(3).Expression); + QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -1176,6 +1180,13 @@ case 210: { } break; case 212: { + AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, + QSOperator::Or, sym(3).Expression); + node->operatorToken = loc(2); + sym(1).Node = node; +} break; + +case 214: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -1183,7 +1194,7 @@ case 212: { sym(1).Node = node; } break; -case 214: { +case 216: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -1191,112 +1202,112 @@ case 214: { sym(1).Node = node; } break; -case 216: { +case 218: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 218: { +case 220: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 219: { +case 221: { sym(1).ival = QSOperator::Assign; } break; -case 220: { +case 222: { sym(1).ival = QSOperator::InplaceMul; } break; -case 221: { +case 223: { sym(1).ival = QSOperator::InplaceDiv; } break; -case 222: { +case 224: { sym(1).ival = QSOperator::InplaceMod; } break; -case 223: { +case 225: { sym(1).ival = QSOperator::InplaceAdd; } break; -case 224: { +case 226: { sym(1).ival = QSOperator::InplaceSub; } break; -case 225: { +case 227: { sym(1).ival = QSOperator::InplaceLeftShift; } break; -case 226: { +case 228: { sym(1).ival = QSOperator::InplaceRightShift; } break; -case 227: { +case 229: { sym(1).ival = QSOperator::InplaceURightShift; } break; -case 228: { +case 230: { sym(1).ival = QSOperator::InplaceAnd; } break; -case 229: { +case 231: { sym(1).ival = QSOperator::InplaceXor; } break; -case 230: { +case 232: { sym(1).ival = QSOperator::InplaceOr; } break; -case 232: { +case 234: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 233: { +case 235: { sym(1).Node = 0; } break; -case 236: { +case 238: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 237: { +case 239: { sym(1).Node = 0; } break; -case 254: { +case 256: { AST::Block *node = makeAstNode (driver->nodePool(), sym(2).StatementList); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 255: { +case 257: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 256: { +case 258: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).StatementList, sym(2).Statement); } break; -case 257: { +case 259: { sym(1).Node = 0; } break; -case 258: { +case 260: { sym(1).Node = sym(1).StatementList->finish (); } break; -case 260: { +case 262: { AST::VariableStatement *node = makeAstNode (driver->nodePool(), sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST)); node->declarationKindToken = loc(1); @@ -1304,76 +1315,76 @@ case 260: { sym(1).Node = node; } break; -case 261: { +case 263: { sym(1).ival = T_CONST; } break; -case 262: { +case 264: { sym(1).ival = T_VAR; } break; -case 263: { +case 265: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 264: { +case 266: { AST::VariableDeclarationList *node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); node->commaToken = loc(2); sym(1).Node = node; } break; -case 265: { +case 267: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 266: { +case 268: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); } break; -case 267: { +case 269: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 268: { +case 270: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 269: { +case 271: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 270: { +case 272: { sym(1).Node = 0; } break; -case 272: { +case 274: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 273: { +case 275: { sym(1).Node = 0; } break; -case 275: { +case 277: { AST::EmptyStatement *node = makeAstNode (driver->nodePool()); node->semicolonToken = loc(1); sym(1).Node = node; } break; -case 277: { +case 279: { AST::ExpressionStatement *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 278: { +case 280: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1382,7 +1393,7 @@ case 278: { sym(1).Node = node; } break; -case 279: { +case 281: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1390,7 +1401,7 @@ case 279: { sym(1).Node = node; } break; -case 281: { +case 283: { AST::DoWhileStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(5).Expression); node->doToken = loc(1); node->whileToken = loc(3); @@ -1400,7 +1411,7 @@ case 281: { sym(1).Node = node; } break; -case 282: { +case 284: { AST::WhileStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->whileToken = loc(1); node->lparenToken = loc(2); @@ -1408,7 +1419,7 @@ case 282: { sym(1).Node = node; } break; -case 283: { +case 285: { AST::ForStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Expression, sym(9).Statement); node->forToken = loc(1); @@ -1419,7 +1430,7 @@ case 283: { sym(1).Node = node; } break; -case 284: { +case 286: { AST::LocalForStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression, sym(8).Expression, sym(10).Statement); @@ -1432,7 +1443,7 @@ case 284: { sym(1).Node = node; } break; -case 285: { +case 287: { AST:: ForEachStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Statement); node->forToken = loc(1); @@ -1442,7 +1453,7 @@ case 285: { sym(1).Node = node; } break; -case 286: { +case 288: { AST::LocalForEachStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement); node->forToken = loc(1); @@ -1453,14 +1464,14 @@ case 286: { sym(1).Node = node; } break; -case 288: { +case 290: { AST::ContinueStatement *node = makeAstNode (driver->nodePool()); node->continueToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 290: { +case 292: { AST::ContinueStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->continueToken = loc(1); node->identifierToken = loc(2); @@ -1468,14 +1479,14 @@ case 290: { sym(1).Node = node; } break; -case 292: { +case 294: { AST::BreakStatement *node = makeAstNode (driver->nodePool()); node->breakToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 294: { +case 296: { AST::BreakStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->breakToken = loc(1); node->identifierToken = loc(2); @@ -1483,14 +1494,14 @@ case 294: { sym(1).Node = node; } break; -case 296: { +case 298: { AST::ReturnStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->returnToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 297: { +case 299: { AST::WithStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->withToken = loc(1); node->lparenToken = loc(2); @@ -1498,7 +1509,7 @@ case 297: { sym(1).Node = node; } break; -case 298: { +case 300: { AST::SwitchStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock); node->switchToken = loc(1); node->lparenToken = loc(2); @@ -1506,90 +1517,90 @@ case 298: { sym(1).Node = node; } break; -case 299: { +case 301: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 300: { +case 302: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(5); sym(1).Node = node; } break; -case 301: { +case 303: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClause); } break; -case 302: { +case 304: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause); } break; -case 303: { +case 305: { sym(1).Node = 0; } break; -case 304: { +case 306: { sym(1).Node = sym(1).CaseClauses->finish (); } break; -case 305: { +case 307: { AST::CaseClause *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).StatementList); node->caseToken = loc(1); node->colonToken = loc(3); sym(1).Node = node; } break; -case 306: { +case 308: { AST::DefaultClause *node = makeAstNode (driver->nodePool(), sym(3).StatementList); node->defaultToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 307: -case 308: { +case 309: +case 310: { AST::LabelledStatement *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(3).Statement); node->identifierToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 309: { +case 311: { AST::LabelledStatement *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(3).Statement); node->identifierToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 311: { +case 313: { AST::ThrowStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->throwToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 312: { +case 314: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch); node->tryToken = loc(1); sym(1).Node = node; } break; -case 313: { +case 315: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 314: { +case 316: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 315: { +case 317: { AST::Catch *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(5).Block); node->catchToken = loc(1); node->lparenToken = loc(2); @@ -1598,20 +1609,20 @@ case 315: { sym(1).Node = node; } break; -case 316: { +case 318: { AST::Finally *node = makeAstNode (driver->nodePool(), sym(2).Block); node->finallyToken = loc(1); sym(1).Node = node; } break; -case 318: { +case 320: { AST::DebuggerStatement *node = makeAstNode (driver->nodePool()); node->debuggerToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 319: { +case 321: { AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); node->identifierToken = loc(2); @@ -1622,7 +1633,7 @@ case 319: { sym(1).Node = node; } break; -case 320: { +case 322: { AST::FunctionExpression *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); if (sym(2).sval) @@ -1634,56 +1645,56 @@ case 320: { sym(1).Node = node; } break; -case 321: { +case 323: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 322: { +case 324: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval); node->commaToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 323: { +case 325: { sym(1).Node = 0; } break; -case 324: { +case 326: { sym(1).Node = sym(1).FormalParameterList->finish (); } break; -case 325: { +case 327: { sym(1).Node = 0; } break; -case 327: { +case 329: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements->finish ()); } break; -case 328: { +case 330: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElement); } break; -case 329: { +case 331: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement); } break; -case 330: { +case 332: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 331: { +case 333: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).FunctionDeclaration); } break; -case 332: { +case 334: { sym(1).sval = 0; } break; -case 334: { +case 336: { sym(1).Node = 0; } break; diff --git a/src/declarative/qml/parser/qmljsparser_p.h b/src/declarative/qml/parser/qmljsparser_p.h index 573031f..46d5952 100644 --- a/src/declarative/qml/parser/qmljsparser_p.h +++ b/src/declarative/qml/parser/qmljsparser_p.h @@ -222,9 +222,9 @@ protected: -#define J_SCRIPT_REGEXPLITERAL_RULE1 69 +#define J_SCRIPT_REGEXPLITERAL_RULE1 71 -#define J_SCRIPT_REGEXPLITERAL_RULE2 70 +#define J_SCRIPT_REGEXPLITERAL_RULE2 72 QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index f02dad5..053c6f8 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -644,11 +645,12 @@ void QmlCompiler::compileTree(Object *tree) output->imports = unit->imports; - if (tree->metatype) + if (tree->metatype) { static_cast(output->root) = *tree->metaObject(); - else + QmlEnginePrivate::get(engine)->registerCompositeType(output); + } else { static_cast(output->root) = *output->types.at(tree->type).metaObject(); - + } } bool QmlCompiler::buildObject(Object *obj, const BindingContext &ctxt) @@ -1260,7 +1262,7 @@ bool QmlCompiler::buildProperty(QmlParser::Property *prop, COMPILE_CHECK(buildGroupedProperty(prop, obj, ctxt)); - } else if (QmlMetaType::isQmlList(prop->type) || + } else if (QmlEnginePrivate::get(engine)->isQmlList(prop->type) || QmlMetaType::isList(prop->type)) { COMPILE_CHECK(buildListProperty(prop, obj, ctxt)); @@ -1306,12 +1308,15 @@ QmlCompiler::buildPropertyInNamespace(QmlEnginePrivate::ImportedNamespace *ns, COMPILE_CHECK(buildAttachedProperty(prop, obj, ctxt)); } + + return true; } void QmlCompiler::genValueProperty(QmlParser::Property *prop, QmlParser::Object *obj) { - if (QmlMetaType::isQmlList(prop->type) || QmlMetaType::isList(prop->type)) { + if (QmlEnginePrivate::get(engine)->isQmlList(prop->type) || + QmlMetaType::isList(prop->type)) { genListProperty(prop, obj); } else { genPropertyAssignment(prop, obj); @@ -1325,10 +1330,10 @@ void QmlCompiler::genListProperty(QmlParser::Property *prop, QmlInstruction::Type storeType; int listType; - if (QmlMetaType::isQmlList(prop->type)) { + if (QmlEnginePrivate::get(engine)->isQmlList(prop->type)) { fetchType = QmlInstruction::FetchQmlList; storeType = QmlInstruction::StoreObjectQmlList; - listType = QmlMetaType::qmlListType(prop->type); + listType = QmlEnginePrivate::get(engine)->qmlListType(prop->type); } else { fetchType = QmlInstruction::FetchQList; storeType = QmlInstruction::StoreObjectQList; @@ -1541,7 +1546,7 @@ bool QmlCompiler::buildGroupedProperty(QmlParser::Property *prop, Q_ASSERT(prop->type != 0); Q_ASSERT(prop->index != -1); - if (prop->type < QVariant::UserType) { + if (prop->type < (int)QVariant::UserType) { QmlEnginePrivate *ep = static_cast(QObjectPrivate::get(engine)); if (ep->valueTypes[prop->type]) { @@ -1554,7 +1559,8 @@ bool QmlCompiler::buildGroupedProperty(QmlParser::Property *prop, } else { // Load the nested property's meta type - prop->value->metatype = QmlMetaType::metaObjectForType(prop->type); + prop->value->metatype = + QmlEnginePrivate::get(engine)->metaObjectForType(prop->type); if (!prop->value->metatype) COMPILE_EXCEPTION(prop, "Cannot nest non-QObject property" << prop->name); @@ -1627,14 +1633,14 @@ bool QmlCompiler::buildListProperty(QmlParser::Property *prop, const BindingContext &ctxt) { Q_ASSERT(QmlMetaType::isList(prop->type) || - QmlMetaType::isQmlList(prop->type)); + QmlEnginePrivate::get(engine)->isQmlList(prop->type)); int t = prop->type; obj->addValueProperty(prop); - if (QmlMetaType::isQmlList(t)) { - int listType = QmlMetaType::qmlListType(t); + if (QmlEnginePrivate::get(engine)->isQmlList(t)) { + int listType = QmlEnginePrivate::get(engine)->qmlListType(t); bool listTypeIsInterface = QmlMetaType::isInterface(listType); for (int ii = 0; ii < prop->values.count(); ++ii) { @@ -1768,7 +1774,7 @@ bool QmlCompiler::buildPropertyObjectAssignment(QmlParser::Property *prop, // actual property type before we applied any extensions that might // effect the properties on the type, but don't effect assignability const QMetaObject *propertyMetaObject = - QmlMetaType::rawMetaObjectForType(prop->type); + QmlEnginePrivate::get(engine)->rawMetaObjectForType(prop->type); // Will be true if the assgned type inherits propertyMetaObject bool isAssignable = false; @@ -1902,8 +1908,13 @@ bool QmlCompiler::mergeDynamicMetaProperties(QmlParser::Object *obj) return true; } +static QAtomicInt classIndexCounter; + bool QmlCompiler::buildDynamicMeta(QmlParser::Object *obj, DynamicMetaMode mode) { + Q_ASSERT(obj); + Q_ASSERT(obj->metatype); + if (obj->dynamicProperties.isEmpty() && obj->dynamicSignals.isEmpty() && obj->dynamicSlots.isEmpty()) @@ -1913,9 +1924,13 @@ bool QmlCompiler::buildDynamicMeta(QmlParser::Object *obj, DynamicMetaMode mode) QByteArray dynamicData(sizeof(QmlVMEMetaData), (char)0); + QByteArray newClassName = obj->metatype->className(); + newClassName.append("_QML_"); + int idx = classIndexCounter.fetchAndAddRelaxed(1); + newClassName.append(QByteArray::number(idx)); + QMetaObjectBuilder builder; - if (obj->metatype) - builder.setClassName(QByteArray(obj->metatype->className()) + "_QML"); + builder.setClassName(newClassName); builder.setFlags(QMetaObjectBuilder::DynamicMetaObject); bool hasAlias = false; @@ -1937,11 +1952,46 @@ bool QmlCompiler::buildDynamicMeta(QmlParser::Object *obj, DynamicMetaMode mode) QByteArray type; int propertyType = 0; + bool readonly = false; switch(p.type) { case Object::DynamicProperty::Alias: hasAlias = true; continue; break; + case Object::DynamicProperty::CustomList: + case Object::DynamicProperty::Custom: + { + QByteArray customTypeName; + QmlType *qmltype = 0; + QUrl url; + QmlEnginePrivate *priv = QmlEnginePrivate::get(engine); + if (!priv->resolveType(unit->imports, p.customType, &qmltype, + &url, 0, 0, 0)) + COMPILE_EXCEPTION(&p, "Invalid property type"); + + if (!qmltype) { + QmlCompositeTypeData *tdata = priv->typeManager.get(url); + Q_ASSERT(tdata); + Q_ASSERT(tdata->status == QmlCompositeTypeData::Complete); + + QmlCompiledData *data = tdata->toCompiledComponent(engine); + customTypeName = data->root.className(); + } else { + customTypeName = qmltype->typeName(); + } + + if (p.type == Object::DynamicProperty::Custom) { + type = customTypeName + "*"; + propertyType = QMetaType::QObjectStar; + } else { + readonly = true; + type = "QmlList<"; + type.append(customTypeName); + type.append("*>*"); + propertyType = qMetaTypeId* >(); + } + } + break; case Object::DynamicProperty::Variant: propertyType = -1; type = "QVariant"; @@ -1981,7 +2031,10 @@ bool QmlCompiler::buildDynamicMeta(QmlParser::Object *obj, DynamicMetaMode mode) dynamicData.append((char *)&propertyData, sizeof(propertyData)); builder.addSignal(p.name + "Changed()"); - builder.addProperty(p.name, type, ii).setScriptable(true); + QMetaPropertyBuilder propBuilder = + builder.addProperty(p.name, type, ii); + propBuilder.setScriptable(true); + propBuilder.setWritable(!readonly); } if (mode == ResolveAliases) { @@ -2251,7 +2304,8 @@ bool QmlCompiler::completeComponentBuild() */ bool QmlCompiler::canCoerce(int to, QmlParser::Object *from) { - const QMetaObject *toMo = QmlMetaType::rawMetaObjectForType(to); + const QMetaObject *toMo = + QmlEnginePrivate::get(engine)->rawMetaObjectForType(to); const QMetaObject *fromMo = from->metaObject(); while (fromMo) { @@ -2268,8 +2322,10 @@ bool QmlCompiler::canCoerce(int to, QmlParser::Object *from) */ bool QmlCompiler::canCoerce(int to, int from) { - const QMetaObject *toMo = QmlMetaType::rawMetaObjectForType(to); - const QMetaObject *fromMo = QmlMetaType::rawMetaObjectForType(from); + const QMetaObject *toMo = + QmlEnginePrivate::get(engine)->rawMetaObjectForType(to); + const QMetaObject *fromMo = + QmlEnginePrivate::get(engine)->rawMetaObjectForType(from); while (fromMo) { if (fromMo == toMo) diff --git a/src/declarative/qml/qmlcompiler_p.h b/src/declarative/qml/qmlcompiler_p.h index 83c415c..7f5e98f 100644 --- a/src/declarative/qml/qmlcompiler_p.h +++ b/src/declarative/qml/qmlcompiler_p.h @@ -231,9 +231,9 @@ private: int componentTypeRef(); static int findSignalByName(const QMetaObject *, const QByteArray &name); - static bool canCoerce(int to, QmlParser::Object *from); - static bool canCoerce(int to, int from); static QmlType *toQmlType(QmlParser::Object *from); + bool canCoerce(int to, QmlParser::Object *from); + bool canCoerce(int to, int from); QStringList deferredProperties(QmlParser::Object *); diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index dd6b5a4..23c0639 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -209,6 +209,8 @@ QmlEnginePrivate::~QmlEnginePrivate() clear(bindValues[ii]); for(int ii = 0; ii < parserStatus.count(); ++ii) clear(parserStatus[ii]); + for(QHash::ConstIterator iter = m_compositeTypes.begin(); iter != m_compositeTypes.end(); ++iter) + (*iter)->release(); } void QmlEnginePrivate::clear(SimpleList &bvs) @@ -1748,4 +1750,75 @@ void QmlEnginePrivate::resolveTypeInNamespace(ImportedNamespace* ns, const QByte ns->find(type,vmaj,vmin,type_return,url_return); } +static void voidptr_destructor(void *v) +{ + void **ptr = (void **)v; + delete ptr; +} + +static void *voidptr_constructor(const void *v) +{ + if (!v) { + return new void*; + } else { + return new void*(*(void **)v); + } +} + +void QmlEnginePrivate::registerCompositeType(QmlCompiledData *data) +{ + QByteArray name = data->root.className(); + + QByteArray ptr = name + "*"; + QByteArray lst = "QmlList<" + ptr + ">*"; + + int ptr_type = QMetaType::registerType(ptr.constData(), voidptr_destructor, + voidptr_constructor); + int lst_type = QMetaType::registerType(lst.constData(), voidptr_destructor, + voidptr_constructor); + + m_qmlLists.insert(lst_type, ptr_type); + m_compositeTypes.insert(ptr_type, data); + data->addref(); +} + +bool QmlEnginePrivate::isQmlList(int t) const +{ + return m_qmlLists.contains(t) || QmlMetaType::isQmlList(t); +} + +bool QmlEnginePrivate::isObject(int t) +{ + return m_compositeTypes.contains(t) || QmlMetaType::isObject(t); +} + +int QmlEnginePrivate::qmlListType(int t) const +{ + QHash::ConstIterator iter = m_qmlLists.find(t); + if (iter != m_qmlLists.end()) + return *iter; + else + return QmlMetaType::qmlListType(t); +} + +const QMetaObject *QmlEnginePrivate::rawMetaObjectForType(int t) const +{ + QHash::ConstIterator iter = m_compositeTypes.find(t); + if (iter != m_compositeTypes.end()) { + return &(*iter)->root; + } else { + return QmlMetaType::rawMetaObjectForType(t); + } +} + +const QMetaObject *QmlEnginePrivate::metaObjectForType(int t) const +{ + QHash::ConstIterator iter = m_compositeTypes.find(t); + if (iter != m_compositeTypes.end()) { + return &(*iter)->root; + } else { + return QmlMetaType::metaObjectForType(t); + } +} + QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlengine_p.h b/src/declarative/qml/qmlengine_p.h index cca8355..74e24d4 100644 --- a/src/declarative/qml/qmlengine_p.h +++ b/src/declarative/qml/qmlengine_p.h @@ -242,6 +242,15 @@ public: int *version_major, int *version_minor ) const; + void registerCompositeType(QmlCompiledData *); + bool isQmlList(int) const; + bool isObject(int); + int qmlListType(int) const; + const QMetaObject *rawMetaObjectForType(int) const; + const QMetaObject *metaObjectForType(int) const; + QHash m_qmlLists; + QHash m_compositeTypes; + static QScriptValue qmlScriptObject(QObject*, QmlEngine*); static QScriptValue createComponent(QScriptContext*, QScriptEngine*); static QScriptValue createQmlObject(QScriptContext*, QScriptEngine*); diff --git a/src/declarative/qml/qmlparser.cpp b/src/declarative/qml/qmlparser.cpp index e102f05..40cdd11 100644 --- a/src/declarative/qml/qmlparser.cpp +++ b/src/declarative/qml/qmlparser.cpp @@ -153,6 +153,7 @@ QmlParser::Object::DynamicProperty::DynamicProperty() QmlParser::Object::DynamicProperty::DynamicProperty(const DynamicProperty &o) : isDefaultProperty(o.isDefaultProperty), type(o.type), + customType(o.customType), name(o.name), defaultValue(o.defaultValue), location(o.location) diff --git a/src/declarative/qml/qmlparser_p.h b/src/declarative/qml/qmlparser_p.h index 8a92a9f..65223f4 100644 --- a/src/declarative/qml/qmlparser_p.h +++ b/src/declarative/qml/qmlparser_p.h @@ -172,10 +172,11 @@ namespace QmlParser DynamicProperty(); DynamicProperty(const DynamicProperty &); - enum Type { Variant, Int, Bool, Real, String, Url, Color, Date, Alias }; + enum Type { Variant, Int, Bool, Real, String, Url, Color, Date, Alias, Custom, CustomList }; bool isDefaultProperty; Type type; + QByteArray customType; QByteArray name; QmlParser::Property *defaultValue; LocationSpan location; diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 136b247..09efc90 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -524,6 +524,32 @@ bool ProcessAST::visit(AST::UiPublicMember *node) } } + if (!typeFound && memberType.at(0).isUpper()) { + QString typemodifier; + if(node->typeModifier) + typemodifier = node->typeModifier->asString(); + if (typemodifier == QString()) { + type = Object::DynamicProperty::Custom; + } else if(typemodifier == QLatin1String("list")) { + type = Object::DynamicProperty::CustomList; + } else { + QmlError error; + error.setDescription(QCoreApplication::translate("QmlParser","Invalid property type modifier")); + error.setLine(node->typeModifierToken.startLine); + error.setColumn(node->typeModifierToken.startColumn); + _parser->_errors << error; + return false; + } + typeFound = true; + } else if (node->typeModifier) { + QmlError error; + error.setDescription(QCoreApplication::translate("QmlParser","Unexpected property type modifier")); + error.setLine(node->typeModifierToken.startLine); + error.setColumn(node->typeModifierToken.startColumn); + _parser->_errors << error; + return false; + } + if(!typeFound) { QmlError error; error.setDescription(QCoreApplication::translate("QmlParser","Expected property type")); @@ -545,6 +571,12 @@ bool ProcessAST::visit(AST::UiPublicMember *node) Object::DynamicProperty property; property.isDefaultProperty = node->isDefaultMember; property.type = type; + if (type >= Object::DynamicProperty::Custom) { + QmlScriptParser::TypeReference *typeRef = + _parser->findOrCreateType(memberType); + typeRef->refObjects.append(_stateStack.top().object); + property.customType = memberType.toUtf8(); + } property.name = name.toUtf8(); property.location = location(node->firstSourceLocation(), node->lastSourceLocation()); diff --git a/src/declarative/qml/qmlvmemetaobject.cpp b/src/declarative/qml/qmlvmemetaobject.cpp index 9ce63b1..f473743 100644 --- a/src/declarative/qml/qmlvmemetaobject.cpp +++ b/src/declarative/qml/qmlvmemetaobject.cpp @@ -74,11 +74,16 @@ QmlVMEMetaObject::QmlVMEMetaObject(QObject *obj, data = new QVariant[metaData->propertyCount]; aConnected.resize(metaData->aliasCount); + int list_type = qMetaTypeId* >(); // ### Optimize for (int ii = 0; ii < metaData->propertyCount; ++ii) { int t = (metaData->propertyData() + ii)->propertyType; - if (t != -1) + if (t == list_type) { + listProperties.append(new List(this, ii)); + data[ii] = QVariant::fromValue((QmlList*)listProperties.last()); + } else if (t != -1) { data[ii] = QVariant((QVariant::Type)t); + } } } @@ -88,6 +93,7 @@ QmlVMEMetaObject::~QmlVMEMetaObject() ref->release(); if (parent) delete parent; + qDeleteAll(listProperties); delete [] data; } @@ -137,9 +143,15 @@ int QmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) case QVariant::Date: *reinterpret_cast(a[0]) = data[id].toDate(); break; + case QMetaType::QObjectStar: + *reinterpret_cast(a[0]) = data[id].value(); + break; default: break; } + if (t == qMetaTypeId* >()) { + *reinterpret_cast **>(a[0]) = data[id].value*>(); + } } else if (c == QMetaObject::WriteProperty) { @@ -236,4 +248,9 @@ int QmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) return object->qt_metacall(c, _id, a); } +void QmlVMEMetaObject::listChanged(int id) +{ + activate(object, methodOffset + id, 0); +} + QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlvmemetaobject_p.h b/src/declarative/qml/qmlvmemetaobject_p.h index 931d22c..1c26241 100644 --- a/src/declarative/qml/qmlvmemetaobject_p.h +++ b/src/declarative/qml/qmlvmemetaobject_p.h @@ -118,13 +118,36 @@ private: QVariant *data; QBitArray aConnected; -#if 0 - QList *slotData; - int slotDataIdx; -#endif - QAbstractDynamicMetaObject *parent; + void listChanged(int); + class List : public QmlConcreteList + { + public: + List(QmlVMEMetaObject *p, int propIdx) + : parent(p), parentProperty(propIdx) { } + + virtual void append(QObject *v) { + QmlConcreteList::append(v); + parent->listChanged(parentProperty); + } + virtual void insert(int i, QObject *v) { + QmlConcreteList::insert(i, v); + parent->listChanged(parentProperty); + } + virtual void clear() { + QmlConcreteList::clear(); + parent->listChanged(parentProperty); + } + virtual void removeAt(int i) { + QmlConcreteList::removeAt(i); + parent->listChanged(parentProperty); + } + private: + QmlVMEMetaObject *parent; + int parentProperty; + }; + QList listProperties; }; QT_END_NAMESPACE diff --git a/src/declarative/util/qmllistaccessor.cpp b/src/declarative/util/qmllistaccessor.cpp index 1228952..ef21ebf 100644 --- a/src/declarative/util/qmllistaccessor.cpp +++ b/src/declarative/util/qmllistaccessor.cpp @@ -44,6 +44,9 @@ #include #include +// ### Remove me +#include + QT_BEGIN_NAMESPACE QmlListAccessor::QmlListAccessor() @@ -60,10 +63,12 @@ QVariant QmlListAccessor::list() const return d; } -void QmlListAccessor::setList(const QVariant &v) +void QmlListAccessor::setList(const QVariant &v, QmlEngine *engine) { d = v; + QmlEnginePrivate *enginePrivate = engine?QmlEnginePrivate::get(engine):0; + if (!d.isValid()) { m_type = Invalid; } else if (d.type() == QVariant::StringList) { @@ -75,12 +80,14 @@ void QmlListAccessor::setList(const QVariant &v) m_type = Integer; } else if (d.type() != QVariant::UserType) { m_type = Instance; - } else if (QmlMetaType::isObject(d.userType())) { + } else if ((!enginePrivate && QmlMetaType::isObject(d.userType())) || + (enginePrivate && enginePrivate->isObject(d.userType()))) { QObject *data = 0; data = *(QObject **)v.constData(); d = QVariant::fromValue(data); m_type = Instance; - } else if (QmlMetaType::isQmlList(d.userType())) { + } else if ((!enginePrivate && QmlMetaType::isQmlList(d.userType())) || + (enginePrivate && enginePrivate->isQmlList(d.userType()))) { m_type = QmlList; } else if (QmlMetaType::isList(d.userType())) { qDebug() << "list"; diff --git a/src/declarative/util/qmllistaccessor.h b/src/declarative/util/qmllistaccessor.h index f0d293f..c3ff632 100644 --- a/src/declarative/util/qmllistaccessor.h +++ b/src/declarative/util/qmllistaccessor.h @@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) +class QmlEngine; class Q_DECLARATIVE_EXPORT QmlListAccessor { public: @@ -57,7 +58,7 @@ public: virtual ~QmlListAccessor(); QVariant list() const; - void setList(const QVariant &); + void setList(const QVariant &, QmlEngine * = 0); bool isValid() const; -- cgit v0.12 From 65e7073bb151bd9281b2d0be53f0c13cce90f3c0 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Tue, 22 Sep 2009 17:52:07 +1000 Subject: Recording is now on F9 --- tools/qmlviewer/qmlviewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 2ac13cc..11d0ef0 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -348,7 +348,7 @@ void QmlViewer::createMenu(QMenuBar *menu, QMenu *flatmenu) connect(snapshotAction, SIGNAL(triggered()), this, SLOT(takeSnapShot())); recordMenu->addAction(snapshotAction); - recordAction = new QAction(tr("Start Recording &Video\tF2"), parent); + recordAction = new QAction(tr("Start Recording &Video\tF9"), parent); connect(recordAction, SIGNAL(triggered()), this, SLOT(toggleRecordingWithSelection())); recordMenu->addAction(recordAction); @@ -570,7 +570,7 @@ void QmlViewer::toggleRecording() return; } bool recording = !recordTimer.isRunning(); - recordAction->setText(recording ? tr("&Stop Recording Video\tF2") : tr("&Start Recording Video\tF2")); + recordAction->setText(recording ? tr("&Stop Recording Video\tF9") : tr("&Start Recording Video\tF9")); setRecording(recording); } -- cgit v0.12 From 8d5a395e176239b7e3ee8822cb251b2e631c21de Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Tue, 22 Sep 2009 18:50:50 +1000 Subject: Slight simplification of parameterized signals --- src/declarative/qml/qmlboundsignal.cpp | 8 ++-- src/declarative/qml/qmlexpression.cpp | 45 ++++++++++++++-------- src/declarative/qml/qmlexpression_p.h | 8 +++- src/declarative/qml/qmlvme.cpp | 2 +- tests/auto/declarative/qmlparser/assignSignal.qml | 1 + tests/auto/declarative/qmlparser/testtypes.h | 2 + tests/auto/declarative/qmlparser/tst_qmlparser.cpp | 2 + 7 files changed, 45 insertions(+), 23 deletions(-) diff --git a/src/declarative/qml/qmlboundsignal.cpp b/src/declarative/qml/qmlboundsignal.cpp index 9af4003..c43097e 100644 --- a/src/declarative/qml/qmlboundsignal.cpp +++ b/src/declarative/qml/qmlboundsignal.cpp @@ -42,6 +42,7 @@ #include "qmlboundsignal_p.h" #include "private/qmetaobjectbuilder_p.h" #include "private/qmlengine_p.h" +#include "private/qmlexpression_p.h" #include "private/qmlcontext_p.h" #include #include @@ -60,7 +61,8 @@ QmlBoundSignal::QmlBoundSignal(QmlContext *ctxt, const QString &val, QObject *me // This is thread safe. Although it may be updated by two threads, they // will both set it to the same value - so the worst thing that can happen // is that they both do the work to figure it out. Boo hoo. - if (evaluateIdx == -1) evaluateIdx = QmlExpression::staticMetaObject.indexOfMethod("value()"); + if (evaluateIdx == -1) + evaluateIdx = QmlExpression::staticMetaObject.indexOfMethod("value()"); setTrackChange(false); QFx_setParent_noEvent(this, parent); @@ -73,15 +75,13 @@ QmlBoundSignalProxy::QmlBoundSignalProxy(QmlContext *ctxt, const QString &val, Q QMetaMethod signal = me->metaObject()->method(idx); params = new QmlBoundSignalParameters(signal, this); - - ctxt->d_func()->addDefaultObject(params, QmlContextPrivate::HighPriority); } int QmlBoundSignalProxy::qt_metacall(QMetaObject::Call c, int id, void **a) { if (c == QMetaObject::InvokeMetaMethod && id == evaluateIdx) { params->setValues(a); - value(); + QmlExpressionPrivate::get(this)->value(params); params->clearValues(); return -1; } else { diff --git a/src/declarative/qml/qmlexpression.cpp b/src/declarative/qml/qmlexpression.cpp index 845dcf6..db9d39f 100644 --- a/src/declarative/qml/qmlexpression.cpp +++ b/src/declarative/qml/qmlexpression.cpp @@ -212,7 +212,7 @@ QVariant QmlExpressionPrivate::evalSSE() return rv; } -QVariant QmlExpressionPrivate::evalQtScript() +QVariant QmlExpressionPrivate::evalQtScript(QObject *secondaryScope) { #ifdef Q_ENABLE_PERFORMANCE_LOG QFxPerfTimer perfqt; @@ -223,6 +223,9 @@ QVariant QmlExpressionPrivate::evalQtScript() if (me) ctxtPriv->defaultObjects.insert(ctxtPriv->highPriorityCount, me); + if (secondaryScope) + ctxtPriv->defaultObjects.insert(ctxtPriv->highPriorityCount, + secondaryScope); QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine); @@ -263,6 +266,8 @@ QVariant QmlExpressionPrivate::evalQtScript() if (me) ctxtPriv->defaultObjects.removeAt(ctxtPriv->highPriorityCount); + if (secondaryScope) + ctxtPriv->defaultObjects.removeAt(ctxtPriv->highPriorityCount); QVariant rv; @@ -306,42 +311,38 @@ QVariant QmlExpressionPrivate::evalQtScript() return rv; } -/*! - Returns the value of the expression, or an invalid QVariant if the - expression is invalid or has an error. -*/ -QVariant QmlExpression::value() +QVariant QmlExpressionPrivate::value(QObject *secondaryScope) { - Q_D(QmlExpression); + Q_Q(QmlExpression); QVariant rv; - if (!engine() || (!d->sse.isValid() && d->expression.isEmpty())) + if (!q->engine() || (!sse.isValid() && expression.isEmpty())) return rv; #ifdef Q_ENABLE_PERFORMANCE_LOG QFxPerfTimer perf; #endif - QmlEnginePrivate *ep = QmlEnginePrivate::get(engine()); + QmlEnginePrivate *ep = QmlEnginePrivate::get(q->engine()); QmlExpression *lastCurrentExpression = ep->currentExpression; QPODVector lastCapturedProperties; ep->capturedProperties.copyAndClear(lastCapturedProperties); - ep->currentExpression = this; + ep->currentExpression = q; - if (d->sse.isValid()) { - rv = d->evalSSE(); + if (sse.isValid()) { + rv = evalSSE(); } else { - rv = d->evalQtScript(); + rv = evalQtScript(secondaryScope); } ep->currentExpression = lastCurrentExpression; - if ((!trackChange() || !ep->capturedProperties.count()) && d->guardList) { - d->clearGuards(); - } else if(trackChange()) { - d->updateGuards(ep->capturedProperties); + if ((!q->trackChange() || !ep->capturedProperties.count()) && guardList) { + clearGuards(); + } else if(q->trackChange()) { + updateGuards(ep->capturedProperties); } lastCapturedProperties.copyAndClear(ep->capturedProperties); @@ -350,6 +351,16 @@ QVariant QmlExpression::value() } /*! + Returns the value of the expression, or an invalid QVariant if the + expression is invalid or has an error. +*/ +QVariant QmlExpression::value() +{ + Q_D(QmlExpression); + return d->value(); +} + +/*! Returns true if the expression results in a constant value. QmlExpression::value() must have been invoked at least once before the return from this method is valid. diff --git a/src/declarative/qml/qmlexpression_p.h b/src/declarative/qml/qmlexpression_p.h index 997bf8d..501e5d8 100644 --- a/src/declarative/qml/qmlexpression_p.h +++ b/src/declarative/qml/qmlexpression_p.h @@ -93,6 +93,7 @@ public: PreTransformedQtScriptData = 2 }; + void init(QmlContext *, const QString &, QObject *); void init(QmlContext *, void *, QmlRefCount *, QObject *); @@ -108,8 +109,9 @@ public: QString fileName; int line; + QVariant value(QObject *secondaryScope = 0); QVariant evalSSE(); - QVariant evalQtScript(); + QVariant evalQtScript(QObject *secondaryScope); struct SignalGuard : public QGuard { SignalGuard() : isDuplicate(false), notifyIndex(-1) {} @@ -132,6 +134,10 @@ public: int guardListLength; void updateGuards(const QPODVector &properties); void clearGuards(); + + static QmlExpressionPrivate *get(QmlExpression *expr) { + return static_cast(QObjectPrivate::get(expr)); + } }; QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp index 4d133e3..ca88455 100644 --- a/src/declarative/qml/qmlvme.cpp +++ b/src/declarative/qml/qmlvme.cpp @@ -540,7 +540,7 @@ QObject *QmlVME::run(QStack &stack, QmlContext *ctxt, QmlCompiledData if (signal.parameterTypes().isEmpty()) { (void *)new QmlBoundSignal(ctxt, primitives.at(instr.storeSignal.value), target, instr.storeSignal.signalIndex, target); } else { - (void *)new QmlBoundSignalProxy(new QmlContext(ctxt, target, true), primitives.at(instr.storeSignal.value), target, instr.storeSignal.signalIndex, target); + (void *)new QmlBoundSignalProxy(ctxt, primitives.at(instr.storeSignal.value), target, instr.storeSignal.signalIndex, target); } } break; diff --git a/tests/auto/declarative/qmlparser/assignSignal.qml b/tests/auto/declarative/qmlparser/assignSignal.qml index 153b403..3abc04d 100644 --- a/tests/auto/declarative/qmlparser/assignSignal.qml +++ b/tests/auto/declarative/qmlparser/assignSignal.qml @@ -1,4 +1,5 @@ import Test 1.0 MyQmlObject { onBasicSignal: basicSlot() + onBasicParameterizedSignal: basicSlot(parameter) } diff --git a/tests/auto/declarative/qmlparser/testtypes.h b/tests/auto/declarative/qmlparser/testtypes.h index e3e9aae..f6f966f 100644 --- a/tests/auto/declarative/qmlparser/testtypes.h +++ b/tests/auto/declarative/qmlparser/testtypes.h @@ -97,9 +97,11 @@ public: void setCustomType(const MyCustomVariantType &v) { m_custom = v; } public slots: void basicSlot() { qWarning("MyQmlObject::basicSlot"); } + void basicSlot(int v) { qWarning("MyQmlObject::basicSlot(%d)", v); } signals: void basicSignal(); + void basicParameterizedSignal(int parameter); private: friend class tst_qmlparser; diff --git a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp index ee1b072..c2f1e1a 100644 --- a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp +++ b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp @@ -376,6 +376,8 @@ void tst_qmlparser::assignSignal() QVERIFY(object != 0); QTest::ignoreMessage(QtWarningMsg, "MyQmlObject::basicSlot"); emit object->basicSignal(); + QTest::ignoreMessage(QtWarningMsg, "MyQmlObject::basicSlot(9)"); + emit object->basicParameterizedSignal(9); } // Tests the creation and assignment of dynamic properties -- cgit v0.12