From 3e03276736d89e1ab214b50d57bf2ba6f6d560f7 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 1 Mar 2010 11:43:09 +0100 Subject: Introduce optional qdoc_bootstrapped qmake flag This allows building documentation even when cross-compiling. Note that for official documentation, you should always use your host's qdoc3 binary. This qmake option is for testing whether you introduced new qdoc warnings even if you don't have a native build around. --- tools/qdoc3/codeparser.cpp | 1 - tools/qdoc3/command.cpp | 9 +++++++++ tools/qdoc3/config.cpp | 6 +++++- tools/qdoc3/cppcodeparser.cpp | 1 - tools/qdoc3/doc.h | 1 + tools/qdoc3/generator.cpp | 1 - tools/qdoc3/helpprojectwriter.cpp | 1 - tools/qdoc3/jambiapiparser.cpp | 2 -- tools/qdoc3/main.cpp | 17 ++++++++++++++--- tools/qdoc3/node.cpp | 4 ++-- tools/qdoc3/pagegenerator.cpp | 3 +-- tools/qdoc3/qdoc3.pro | 16 ++++++++++++---- tools/qdoc3/tree.cpp | 3 ++- tools/qdoc3/webxmlgenerator.cpp | 4 ++-- tools/qdoc3/webxmlgenerator.h | 5 +++++ 15 files changed, 53 insertions(+), 21 deletions(-) diff --git a/tools/qdoc3/codeparser.cpp b/tools/qdoc3/codeparser.cpp index 5ae63ac..042378e 100644 --- a/tools/qdoc3/codeparser.cpp +++ b/tools/qdoc3/codeparser.cpp @@ -43,7 +43,6 @@ codeparser.cpp */ -#include #include "codeparser.h" #include "node.h" #include "tree.h" diff --git a/tools/qdoc3/command.cpp b/tools/qdoc3/command.cpp index 76b483c..b78ad07 100644 --- a/tools/qdoc3/command.cpp +++ b/tools/qdoc3/command.cpp @@ -47,6 +47,8 @@ #include "command.h" +#include + QT_BEGIN_NAMESPACE void executeCommand(const Location& location, @@ -69,6 +71,12 @@ void executeCommand(const Location& location, if (space != -1) toolName.truncate(space); +#ifdef QT_BOOTSTRAPPED + int status = system(qPrintable(actualCommand)); + int exitCode = WEXITSTATUS(status); + if (status == -1 || exitCode != EXIT_SUCCESS) + location.fatal(QString("Error executing '$1': $2").arg(toolName).arg(exitCode)); +#else QProcess process; process.start(QLatin1String("sh"), QStringList() << QLatin1String("-c") << actualCommand); @@ -89,6 +97,7 @@ void executeCommand(const Location& location, tr("The tool was invoked like this:\n%1\n" "It emitted these errors:\n%2") .arg(actualCommand).arg(errors)); +#endif } QT_END_NAMESPACE diff --git a/tools/qdoc3/config.cpp b/tools/qdoc3/config.cpp index acb1576..3150f28 100644 --- a/tools/qdoc3/config.cpp +++ b/tools/qdoc3/config.cpp @@ -43,7 +43,11 @@ config.cpp */ -#include +#include +#include +#include +#include +#include #include "archiveextractor.h" #include "config.h" diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 021d64a..e144a74 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -43,7 +43,6 @@ cppcodeparser.cpp */ -#include #include #include diff --git a/tools/qdoc3/doc.h b/tools/qdoc3/doc.h index e98bb26..3e76456 100644 --- a/tools/qdoc3/doc.h +++ b/tools/qdoc3/doc.h @@ -48,6 +48,7 @@ #include #include +#include #include "location.h" diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 6a8899a..200a0e7 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -42,7 +42,6 @@ /* generator.cpp */ -#include #include #include #include "codemarker.h" diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp index 2189e02..71810e4 100644 --- a/tools/qdoc3/helpprojectwriter.cpp +++ b/tools/qdoc3/helpprojectwriter.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ -#include #include #include diff --git a/tools/qdoc3/jambiapiparser.cpp b/tools/qdoc3/jambiapiparser.cpp index 3aba1b0..23f2716 100644 --- a/tools/qdoc3/jambiapiparser.cpp +++ b/tools/qdoc3/jambiapiparser.cpp @@ -43,8 +43,6 @@ jambiapiparser.cpp */ -#include - #include "cppcodeparser.h" #include "jambiapiparser.h" #include "node.h" diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 57823fb..ea843ba 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -44,7 +44,6 @@ */ #include -#include #include #include "apigenerator.h" #include "codemarker.h" @@ -72,6 +71,11 @@ #include "tokenizer.h" #include "tree.h" +#include "qtranslator.h" +#ifndef QT_BOOTSTRAPPED +# include "qcoreapplication.h" +#endif + QT_BEGIN_NAMESPACE /* @@ -151,7 +155,9 @@ static void printVersion() */ static void processQdocconfFile(const QString &fileName) { +#ifndef QT_NO_TRANSLATION QList translators; +#endif /* The Config instance represents the configuration data for qdoc. @@ -207,6 +213,7 @@ static void processQdocconfFile(const QString &fileName) CodeParser::initialize(config); Generator::initialize(config); +#ifndef QT_NO_TRANSLATION /* Load the language translators, if the configuration specifies any. */ @@ -221,6 +228,7 @@ static void processQdocconfFile(const QString &fileName) translators.append(translator); ++fn; } +#endif //QSet outputLanguages = config.getStringSet(CONFIG_OUTPUTLANGUAGES); @@ -351,8 +359,9 @@ static void processQdocconfFile(const QString &fileName) Location::terminate(); QDir::setCurrent(prevCurrentDir); - foreach (QTranslator *translator, translators) - delete translator; +#ifndef QT_NO_TRANSLATION + qDeleteAll(translators); +#endif delete tree; } @@ -362,7 +371,9 @@ int main(int argc, char **argv) { QT_USE_NAMESPACE +#ifndef QT_BOOTSTRAPPED QCoreApplication app(argc, argv); +#endif QString cf = "qsauncompress \1 \2"; PolyArchiveExtractor qsaExtractor(QStringList() << "qsa",cf); cf = "tar -C \2 -xf \1"; diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 4ddcfb1..694f499 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -43,7 +43,6 @@ node.cpp */ -#include #include "node.h" QT_BEGIN_NAMESPACE @@ -1161,7 +1160,8 @@ QString FunctionNode::signature(bool values) const */ void FunctionNode::debug() const { - qDebug() << "QML METHOD" << name() << "rt" << rt << "pp" << pp; + qDebug("QML METHOD %s rt %s pp %s", + qPrintable(name()), qPrintable(rt), qPrintable(pp.join(" "))); } /*! diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp index 2cad9ed..f0f14fe 100644 --- a/tools/qdoc3/pagegenerator.cpp +++ b/tools/qdoc3/pagegenerator.cpp @@ -43,7 +43,6 @@ pagegenerator.cpp */ -#include #include #include @@ -212,7 +211,7 @@ void PageGenerator::generateInnerNode(const InnerNode *node, #endif if (fakeNode->subType() == Node::Page) { if (node->count() > 0) - qDebug() << "PAGE" << fakeNode->title() << "HAS CHILDREN"; + qDebug("PAGE %s HAS CHILDREN", qPrintable(fakeNode->title())); } } diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index 7705692..e394799 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -4,9 +4,16 @@ DEFINES += QT_NO_CAST_TO_ASCII #DEFINES += QT_USE_FAST_OPERATOR_PLUS #DEFINES += QT_USE_FAST_CONCATENATION -QT = core xml -CONFIG += console -CONFIG -= debug_and_release_target +qdoc_bootstrapped { + include(../../src/tools/bootstrap/bootstrap.pri) + DEFINES -= QT_NO_CAST_FROM_ASCII + DEFINES += QT_NO_TRANSLATION +} else { + QT = core xml + CONFIG += console + CONFIG -= debug_and_release_target +} + !isEmpty(QT_BUILD_TREE):DESTDIR = $$QT_BUILD_TREE/bin #CONFIG += debug build_all:!build_pass { @@ -14,7 +21,8 @@ build_all:!build_pass { CONFIG += release # CONFIG += debug } -mac:CONFIG -= app_bundle + +CONFIG -= app_bundle HEADERS += apigenerator.h \ archiveextractor.h \ atom.h \ diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp index 6c2502d..922c23e 100644 --- a/tools/qdoc3/tree.cpp +++ b/tools/qdoc3/tree.cpp @@ -43,7 +43,6 @@ tree.cpp */ -#include #include #include "atom.h" @@ -54,6 +53,8 @@ #include "text.h" #include "tree.h" +#include + QT_BEGIN_NAMESPACE struct InheritanceBound diff --git a/tools/qdoc3/webxmlgenerator.cpp b/tools/qdoc3/webxmlgenerator.cpp index 205bc8c..6020b1b 100644 --- a/tools/qdoc3/webxmlgenerator.cpp +++ b/tools/qdoc3/webxmlgenerator.cpp @@ -43,8 +43,6 @@ webxmlgenerator.cpp */ -#include - #include "codemarker.h" #include "pagegenerator.h" #include "webxmlgenerator.h" @@ -52,6 +50,8 @@ #include "separator.h" #include "tree.h" +#include + QT_BEGIN_NAMESPACE #define COMMAND_VERSION Doc::alias("version") diff --git a/tools/qdoc3/webxmlgenerator.h b/tools/qdoc3/webxmlgenerator.h index cadf176..071896a 100644 --- a/tools/qdoc3/webxmlgenerator.h +++ b/tools/qdoc3/webxmlgenerator.h @@ -46,12 +46,17 @@ #ifndef WEBXMLGENERATOR_H #define WEBXMLGENERATOR_H +#include + #include "codemarker.h" #include "config.h" #include "pagegenerator.h" QT_BEGIN_NAMESPACE +class QXmlStreamReader; +class QXmlStreamWriter; + class WebXMLGenerator : public PageGenerator { public: -- cgit v0.12 From 3a4dc08d08ce0388dd183a24923871e3e03ba531 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 1 Mar 2010 12:23:15 +0100 Subject: Make Minehunt demo compile. It still isn't working though. Investigations continue. Task-number: QTBUG-8549 --- demos/declarative/minehunt/main.cpp | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/demos/declarative/minehunt/main.cpp b/demos/declarative/minehunt/main.cpp index 0e99731..37dc8a5 100644 --- a/demos/declarative/minehunt/main.cpp +++ b/demos/declarative/minehunt/main.cpp @@ -100,8 +100,8 @@ public: MyWidget(int = 370, int = 480, QWidget *parent=0, Qt::WindowFlags flags=0); ~MyWidget(); - Q_PROPERTY(QList *tiles READ tiles CONSTANT); - QList *tiles() { return &_tiles; } + Q_PROPERTY(QDeclarativeListProperty tiles READ tiles CONSTANT); + QDeclarativeListProperty tiles() { return _tilesProperty; } Q_PROPERTY(bool isPlaying READ isPlaying NOTIFY isPlayingChanged); bool isPlaying() {return playing;} @@ -116,8 +116,8 @@ public: int numFlags() const{return nFlags;} public slots: - Q_INVOKABLE void flip(int row, int col); - Q_INVOKABLE void flag(int row, int col); + Q_INVOKABLE bool flip(int row, int col); + Q_INVOKABLE bool flag(int row, int col); void setBoard(); void reset(); @@ -136,6 +136,7 @@ private: QDeclarativeView *canvas; QList _tiles; + QDeclarativeListProperty _tilesProperty; int numCols; int numRows; bool playing; @@ -145,6 +146,7 @@ private: int nFlags; }; +Q_DECLARE_METATYPE(QList) MyWidget::MyWidget(int width, int height, QWidget *parent, Qt::WindowFlags flags) : QWidget(parent, flags), canvas(0), numCols(9), numRows(9), playing(true), won(false) { @@ -155,7 +157,6 @@ MyWidget::MyWidget(int width, int height, QWidget *parent, Qt::WindowFlags flags for(int ii = 0; ii < numRows * numCols; ++ii) { _tiles << new Tile; } - reset(); QVBoxLayout *vbox = new QVBoxLayout; @@ -166,9 +167,10 @@ MyWidget::MyWidget(int width, int height, QWidget *parent, Qt::WindowFlags flags canvas->setFixedSize(width, height); vbox->addWidget(canvas); + _tilesProperty = QDeclarativeListProperty(this, _tiles); + QDeclarativeContext *ctxt = canvas->rootContext(); ctxt->addDefaultObject(this); - ctxt->setContextProperty("tiles", QVariant::fromValue*>(&_tiles));//QTBUG-5675 canvas->setSource(QUrl::fromLocalFile(fileName)); } @@ -235,14 +237,14 @@ int MyWidget::getHint(int row, int col) return hint; } -void MyWidget::flip(int row, int col) +bool MyWidget::flip(int row, int col) { if(!playing) - return; + return false; Tile *t = tile(row, col); if (!t || t->hasFlag()) - return; + return false; if(t->flipped()){ int flags = 0; @@ -255,7 +257,7 @@ void MyWidget::flip(int row, int col) flags++; } if(!t->hint() || t->hint() != flags) - return; + return false; for (int c = col-1; c <= col+1; c++) for (int r = row-1; r <= row+1; r++) { Tile *nearT = tile(r, c); @@ -263,7 +265,7 @@ void MyWidget::flip(int row, int col) flip( r, c ); } } - return; + return true; } t->flip(); @@ -297,17 +299,19 @@ void MyWidget::flip(int row, int col) hasWonChanged(); setPlaying(false); } + return true; } -void MyWidget::flag(int row, int col) +bool MyWidget::flag(int row, int col) { Tile *t = tile(row, col); if(!t) - return; + return false; t->setHasFlag(!t->hasFlag()); nFlags += (t->hasFlag()?1:-1); emit numFlagsChanged(); + return true; } ///////////////////////////////////////////////////////// -- cgit v0.12 From bcb2ed5667bd957476e3b62ef3a479a26f1252f3 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 1 Mar 2010 13:02:13 +0100 Subject: Fix minehunt demo Game works again, and the issue with X11 native rendering being abysmally slow has been 'fixed'. --- demos/declarative/minehunt/main.cpp | 4 ++++ demos/declarative/minehunt/minehunt.qml | 14 +++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/demos/declarative/minehunt/main.cpp b/demos/declarative/minehunt/main.cpp index 37dc8a5..e7a1d7c 100644 --- a/demos/declarative/minehunt/main.cpp +++ b/demos/declarative/minehunt/main.cpp @@ -317,6 +317,10 @@ bool MyWidget::flag(int row, int col) int main(int argc, char ** argv) { +#ifdef Q_WS_X11 + // native on X11 is terrible for this demo. + QApplication::setGraphicsSystem("raster"); +#endif QApplication app(argc, argv); bool frameless = false; diff --git a/demos/declarative/minehunt/minehunt.qml b/demos/declarative/minehunt/minehunt.qml index 617a6ed..8a3cab1 100644 --- a/demos/declarative/minehunt/minehunt.qml +++ b/demos/declarative/minehunt/minehunt.qml @@ -31,7 +31,7 @@ Item { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter source: "pics/flag.png" - opacity: model.hasFlag + opacity: modelData.hasFlag opacity: Behavior { NumberAnimation { property: "opacity" @@ -47,16 +47,16 @@ Item { Text { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - text: model.hint + text: modelData.hint color: "white" font.bold: true - opacity: !model.hasMine && model.hint > 0 + opacity: !modelData.hasMine && modelData.hint > 0 } Image { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter source: "pics/bomb.png" - opacity: model.hasMine + opacity: modelData.hasMine } Explosion { id: expl @@ -65,7 +65,7 @@ Item { states: [ State { name: "back" - when: model.flipped + when: modelData.flipped PropertyChanges { target: flipable; angle: 180 } } ] @@ -81,7 +81,7 @@ Item { else ret = 0; if (ret > 0) { - if (model.hasMine && model.flipped) { + if (modelData.hasMine && modelData.flipped) { ret*3; } else { ret; @@ -96,7 +96,7 @@ Item { properties: "angle" } ScriptAction{ - script: if(model.hasMine && model.flipped){expl.explode = true;} + script: if(modelData.hasMine && modelData.flipped){expl.explode = true;} } } } -- cgit v0.12 From 9fe43ff4e313220a1ecb02a990324cb6b768e585 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 25 Feb 2010 16:48:33 +0100 Subject: Fixed coordinate system conversion for gestures. When converting hotspot position (which is in global coordinates) to graphics scene coordinates we should use the viewport because the mapToScene() takes a position in a viewport. Task-number: related to QTBUG-6876 Reviewed-by: Thomas Zander --- src/gui/graphicsview/qgraphicsscene.cpp | 8 +++--- tests/auto/gestures/tst_gestures.cpp | 45 ++++++++++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 365afdd..a72761a 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5972,12 +5972,12 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event) QList allGestures = event->gestures(); DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:" - << "Delivering gestures:" << allGestures; + << "Gestures:" << allGestures; QSet startedGestures; - QPoint delta = graphicsView->mapFromGlobal(QPoint()); - QTransform toScene = QTransform::fromTranslate(delta.x(), delta.y()) - * graphicsView->viewportTransform().inverted(); + QPoint delta = viewport->mapFromGlobal(QPoint()); + QTransform toScene = QTransform::fromTranslate(delta.x(), delta.y()) + * graphicsView->viewportTransform().inverted(); foreach (QGesture *gesture, allGestures) { // cache scene coordinates of the hot spot if (gesture->hasHotSpot()) { diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp index a2058cd..a1afa0a 100644 --- a/tests/auto/gestures/tst_gestures.cpp +++ b/tests/auto/gestures/tst_gestures.cpp @@ -58,7 +58,7 @@ static QPointF mapToGlobal(const QPointF &pt, QGraphicsItem *item, QGraphicsView *view) { - return view->mapToGlobal(view->mapFromScene(item->mapToScene(pt))); + return view->viewport()->mapToGlobal(view->mapFromScene(item->mapToScene(pt))); } class CustomGesture : public QGesture @@ -353,6 +353,7 @@ private slots: void deleteGestureTargetWidget(); void deleteGestureTargetItem_data(); void deleteGestureTargetItem(); + void viewportCoordinates(); }; tst_Gestures::tst_Gestures() @@ -742,7 +743,6 @@ public: ignoredFinishedGestures.clear(); } -protected: QRectF boundingRect() const { return size; @@ -1771,7 +1771,6 @@ void tst_Gestures::panelStacksBehindParent() void tst_Gestures::deleteGestureTargetWidget() { - } void tst_Gestures::deleteGestureTargetItem_data() @@ -1857,5 +1856,45 @@ void tst_Gestures::deleteGestureTargetItem() sendCustomGesture(&event, item1, &scene); } +class GraphicsView : public QGraphicsView +{ +public: + GraphicsView(QGraphicsScene *scene, QWidget *parent = 0) + : QGraphicsView(scene, parent) + { + } + + using QGraphicsView::setViewportMargins; +}; + +// just making sure that even if the graphicsview has margins hotspot still +// works properly. It should use viewport for converting global coordinates to +// scene coordinates. +void tst_Gestures::viewportCoordinates() +{ + QGraphicsScene scene; + GraphicsView view(&scene); + view.setViewportMargins(10,20,15,25); + view.setWindowFlags(Qt::X11BypassWindowManagerHint); + + GestureItem *item1 = new GestureItem("item1"); + item1->grabGesture(CustomGesture::GestureType); + item1->size = QRectF(0, 0, 3, 3); + item1->setZValue(2); + scene.addItem(item1); + + view.show(); + QTest::qWaitForWindowShown(&view); + view.ensureVisible(scene.sceneRect()); + + view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren); + + CustomEvent event; + event.hotSpot = mapToGlobal(item1->boundingRect().center(), item1, &view); + event.hasHotSpot = true; + sendCustomGesture(&event, item1, &scene); + QVERIFY(item1->gestureEventsReceived != 0); +} + QTEST_MAIN(tst_Gestures) #include "tst_gestures.moc" -- cgit v0.12 From 4f77d4f1bebba1627700037bdfce4e74ad84cce8 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 1 Mar 2010 22:51:24 +1000 Subject: Make SameGame tutorials share images It's a bit of a waste to have four copies of all of the images. And as an advanced tutorial throwing in a minor complication like this is probably beneficial. Additionally, the background has been replaced by a smaller JPEG version. --- doc/src/declarative/advtutorial.qdoc | 5 +++++ .../declarative/tutorials/samegame/samegame1/Block.qml | 2 +- .../tutorials/samegame/samegame1/pics/background.png | Bin 313930 -> 0 bytes .../tutorials/samegame/samegame1/pics/redStone.png | Bin 2902 -> 0 bytes .../tutorials/samegame/samegame1/samegame.qml | 2 +- .../declarative/tutorials/samegame/samegame2/Block.qml | 2 +- .../tutorials/samegame/samegame2/pics/background.png | Bin 313930 -> 0 bytes .../tutorials/samegame/samegame2/pics/redStone.png | Bin 2902 -> 0 bytes .../tutorials/samegame/samegame2/samegame.qml | 2 +- .../declarative/tutorials/samegame/samegame3/Block.qml | 6 +++--- .../tutorials/samegame/samegame3/pics/background.png | Bin 313930 -> 0 bytes .../tutorials/samegame/samegame3/pics/blueStone.png | Bin 3054 -> 0 bytes .../tutorials/samegame/samegame3/pics/greenStone.png | Bin 2932 -> 0 bytes .../tutorials/samegame/samegame3/pics/redStone.png | Bin 2902 -> 0 bytes .../tutorials/samegame/samegame3/samegame.qml | 2 +- .../tutorials/samegame/samegame4/content/BoomBlock.qml | 12 ++++++------ .../samegame/samegame4/content/pics/background.png | Bin 313930 -> 0 bytes .../samegame/samegame4/content/pics/blueStar.png | Bin 278 -> 0 bytes .../samegame/samegame4/content/pics/blueStone.png | Bin 3054 -> 0 bytes .../samegame/samegame4/content/pics/greenStar.png | Bin 273 -> 0 bytes .../samegame/samegame4/content/pics/greenStone.png | Bin 2932 -> 0 bytes .../samegame/samegame4/content/pics/redStar.png | Bin 274 -> 0 bytes .../samegame/samegame4/content/pics/redStone.png | Bin 2902 -> 0 bytes .../tutorials/samegame/samegame4/content/pics/star.png | Bin 262 -> 0 bytes .../samegame/samegame4/content/pics/yellowStone.png | Bin 3056 -> 0 bytes .../tutorials/samegame/samegame4/samegame.qml | 2 +- .../tutorials/samegame/shared/pics/background.jpg | Bin 0 -> 36473 bytes .../tutorials/samegame/shared/pics/blueStar.png | Bin 0 -> 278 bytes .../tutorials/samegame/shared/pics/blueStone.png | Bin 0 -> 3054 bytes .../tutorials/samegame/shared/pics/greenStar.png | Bin 0 -> 273 bytes .../tutorials/samegame/shared/pics/greenStone.png | Bin 0 -> 2932 bytes .../tutorials/samegame/shared/pics/redStar.png | Bin 0 -> 274 bytes .../tutorials/samegame/shared/pics/redStone.png | Bin 0 -> 2902 bytes .../tutorials/samegame/shared/pics/star.png | Bin 0 -> 262 bytes .../tutorials/samegame/shared/pics/yellowStone.png | Bin 0 -> 3056 bytes 35 files changed, 20 insertions(+), 15 deletions(-) delete mode 100644 examples/declarative/tutorials/samegame/samegame1/pics/background.png delete mode 100644 examples/declarative/tutorials/samegame/samegame1/pics/redStone.png delete mode 100644 examples/declarative/tutorials/samegame/samegame2/pics/background.png delete mode 100644 examples/declarative/tutorials/samegame/samegame2/pics/redStone.png delete mode 100644 examples/declarative/tutorials/samegame/samegame3/pics/background.png delete mode 100644 examples/declarative/tutorials/samegame/samegame3/pics/blueStone.png delete mode 100644 examples/declarative/tutorials/samegame/samegame3/pics/greenStone.png delete mode 100644 examples/declarative/tutorials/samegame/samegame3/pics/redStone.png delete mode 100644 examples/declarative/tutorials/samegame/samegame4/content/pics/background.png delete mode 100644 examples/declarative/tutorials/samegame/samegame4/content/pics/blueStar.png delete mode 100644 examples/declarative/tutorials/samegame/samegame4/content/pics/blueStone.png delete mode 100644 examples/declarative/tutorials/samegame/samegame4/content/pics/greenStar.png delete mode 100644 examples/declarative/tutorials/samegame/samegame4/content/pics/greenStone.png delete mode 100644 examples/declarative/tutorials/samegame/samegame4/content/pics/redStar.png delete mode 100644 examples/declarative/tutorials/samegame/samegame4/content/pics/redStone.png delete mode 100644 examples/declarative/tutorials/samegame/samegame4/content/pics/star.png delete mode 100644 examples/declarative/tutorials/samegame/samegame4/content/pics/yellowStone.png create mode 100644 examples/declarative/tutorials/samegame/shared/pics/background.jpg create mode 100644 examples/declarative/tutorials/samegame/shared/pics/blueStar.png create mode 100644 examples/declarative/tutorials/samegame/shared/pics/blueStone.png create mode 100644 examples/declarative/tutorials/samegame/shared/pics/greenStar.png create mode 100644 examples/declarative/tutorials/samegame/shared/pics/greenStone.png create mode 100644 examples/declarative/tutorials/samegame/shared/pics/redStar.png create mode 100644 examples/declarative/tutorials/samegame/shared/pics/redStone.png create mode 100644 examples/declarative/tutorials/samegame/shared/pics/star.png create mode 100644 examples/declarative/tutorials/samegame/shared/pics/yellowStone.png diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc index b7d964c..e420e6d 100644 --- a/doc/src/declarative/advtutorial.qdoc +++ b/doc/src/declarative/advtutorial.qdoc @@ -106,6 +106,11 @@ more than just an image. Note that we've set the image to be the size of the ite This will be used later, when we dynamically create and size the block items the image will be scaled automatically to the correct size. +Note that because there are several stages to this tutorial they share images. This is done by having a shared resources +folder containing the images, and all stages of the tutorial refer to the same shared folder. This is the reason for the +'../shared/pics' part of the image source. The image source can be any relative or absolute path, and it is relative to the +location of the file the Image element is in, with ../ meaning to go up one level. + You should be familiar with all that goes on in these files so far. This is a very basic start and doesn't move at all - next we will populate the game canvas with some blocks. diff --git a/examples/declarative/tutorials/samegame/samegame1/Block.qml b/examples/declarative/tutorials/samegame/samegame1/Block.qml index b76e61a..f133b17 100644 --- a/examples/declarative/tutorials/samegame/samegame1/Block.qml +++ b/examples/declarative/tutorials/samegame/samegame1/Block.qml @@ -5,7 +5,7 @@ Item { id:block Image { id: img - source: "pics/redStone.png"; + source: "../shared/pics/redStone.png"; anchors.fill: parent } } diff --git a/examples/declarative/tutorials/samegame/samegame1/pics/background.png b/examples/declarative/tutorials/samegame/samegame1/pics/background.png deleted file mode 100644 index 3734a27..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame1/pics/background.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame1/pics/redStone.png b/examples/declarative/tutorials/samegame/samegame1/pics/redStone.png deleted file mode 100644 index 36b09a2..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame1/pics/redStone.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml index c2d3939..5ed30c9 100644 --- a/examples/declarative/tutorials/samegame/samegame1/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml @@ -12,7 +12,7 @@ Rectangle { Image { id: background - anchors.fill: parent; source: "pics/background.png" + anchors.fill: parent; source: "../shared/pics/background.jpg" fillMode: Image.PreserveAspectCrop } } diff --git a/examples/declarative/tutorials/samegame/samegame2/Block.qml b/examples/declarative/tutorials/samegame/samegame2/Block.qml index 228ac4e..e4b3354 100644 --- a/examples/declarative/tutorials/samegame/samegame2/Block.qml +++ b/examples/declarative/tutorials/samegame/samegame2/Block.qml @@ -4,7 +4,7 @@ Item { id:block Image { id: img - source: "pics/redStone.png"; + source: "../shared/pics/redStone.png"; anchors.fill: parent } } diff --git a/examples/declarative/tutorials/samegame/samegame2/pics/background.png b/examples/declarative/tutorials/samegame/samegame2/pics/background.png deleted file mode 100644 index 3734a27..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame2/pics/background.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame2/pics/redStone.png b/examples/declarative/tutorials/samegame/samegame2/pics/redStone.png deleted file mode 100644 index 36b09a2..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame2/pics/redStone.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml index 8d837da..7e0bc0c 100644 --- a/examples/declarative/tutorials/samegame/samegame2/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml @@ -14,7 +14,7 @@ Rectangle { Image { id: background - anchors.fill: parent; source: "pics/background.png" + anchors.fill: parent; source: "../shared/pics/background.jpg" fillMode: Image.PreserveAspectCrop } } diff --git a/examples/declarative/tutorials/samegame/samegame3/Block.qml b/examples/declarative/tutorials/samegame/samegame3/Block.qml index 30a8d3a..7620104 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Block.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Block.qml @@ -8,11 +8,11 @@ Item { Image { id: img source: { if(type == 0){ - "pics/redStone.png"; + "../shared/pics/redStone.png"; } else if(type == 1) { - "pics/blueStone.png"; + "../shared/pics/blueStone.png"; } else { - "pics/greenStone.png"; + "../shared/pics/greenStone.png"; } } anchors.fill: parent diff --git a/examples/declarative/tutorials/samegame/samegame3/pics/background.png b/examples/declarative/tutorials/samegame/samegame3/pics/background.png deleted file mode 100644 index 3734a27..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame3/pics/background.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame3/pics/blueStone.png b/examples/declarative/tutorials/samegame/samegame3/pics/blueStone.png deleted file mode 100644 index 20e43c7..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame3/pics/blueStone.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame3/pics/greenStone.png b/examples/declarative/tutorials/samegame/samegame3/pics/greenStone.png deleted file mode 100644 index b568a19..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame3/pics/greenStone.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame3/pics/redStone.png b/examples/declarative/tutorials/samegame/samegame3/pics/redStone.png deleted file mode 100644 index 36b09a2..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame3/pics/redStone.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/declarative/tutorials/samegame/samegame3/samegame.qml index c616397..168bf9b 100644 --- a/examples/declarative/tutorials/samegame/samegame3/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame3/samegame.qml @@ -13,7 +13,7 @@ Rectangle { Image { id: background - anchors.fill: parent; source: "pics/background.png" + anchors.fill: parent; source: "../shared/pics/background.jpg" fillMode: Image.PreserveAspectCrop } diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml index 4c2ba43..85c2c93 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml @@ -16,11 +16,11 @@ Item { id:block Image { id: img source: { if(type == 0){ - "pics/redStone.png"; + "../../shared/pics/redStone.png"; } else if(type == 1) { - "pics/blueStone.png"; + "../../shared/pics/blueStone.png"; } else { - "pics/greenStone.png"; + "../../shared/pics/greenStone.png"; } } opacity: 0 @@ -38,11 +38,11 @@ Item { id:block velocity: 100; velocityDeviation:30; source: { if(type == 0){ - "pics/redStar.png"; + "../../shared/pics/redStar.png"; } else if (type == 1) { - "pics/blueStar.png"; + "../../shared/pics/blueStar.png"; } else { - "pics/greenStar.png"; + "../../shared/pics/greenStar.png"; } } } diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/background.png b/examples/declarative/tutorials/samegame/samegame4/content/pics/background.png deleted file mode 100644 index 3734a27..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame4/content/pics/background.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/blueStar.png b/examples/declarative/tutorials/samegame/samegame4/content/pics/blueStar.png deleted file mode 100644 index ff9588f..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame4/content/pics/blueStar.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/blueStone.png b/examples/declarative/tutorials/samegame/samegame4/content/pics/blueStone.png deleted file mode 100644 index 20e43c7..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame4/content/pics/blueStone.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/greenStar.png b/examples/declarative/tutorials/samegame/samegame4/content/pics/greenStar.png deleted file mode 100644 index cd06854..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame4/content/pics/greenStar.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/greenStone.png b/examples/declarative/tutorials/samegame/samegame4/content/pics/greenStone.png deleted file mode 100644 index b568a19..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame4/content/pics/greenStone.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/redStar.png b/examples/declarative/tutorials/samegame/samegame4/content/pics/redStar.png deleted file mode 100644 index 0a4dffe..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame4/content/pics/redStar.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/redStone.png b/examples/declarative/tutorials/samegame/samegame4/content/pics/redStone.png deleted file mode 100644 index 36b09a2..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame4/content/pics/redStone.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/star.png b/examples/declarative/tutorials/samegame/samegame4/content/pics/star.png deleted file mode 100644 index defbde5..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame4/content/pics/star.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame4/content/pics/yellowStone.png b/examples/declarative/tutorials/samegame/samegame4/content/pics/yellowStone.png deleted file mode 100644 index b1ce762..0000000 Binary files a/examples/declarative/tutorials/samegame/samegame4/content/pics/yellowStone.png and /dev/null differ diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml index a228e60..c2e8018 100644 --- a/examples/declarative/tutorials/samegame/samegame4/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml @@ -12,7 +12,7 @@ Rectangle { Image { id: background - anchors.fill: parent; source: "content/pics/background.png" + anchors.fill: parent; source: "../shared/pics/background.jpg" fillMode: Image.PreserveAspectCrop } diff --git a/examples/declarative/tutorials/samegame/shared/pics/background.jpg b/examples/declarative/tutorials/samegame/shared/pics/background.jpg new file mode 100644 index 0000000..903d395 Binary files /dev/null and b/examples/declarative/tutorials/samegame/shared/pics/background.jpg differ diff --git a/examples/declarative/tutorials/samegame/shared/pics/blueStar.png b/examples/declarative/tutorials/samegame/shared/pics/blueStar.png new file mode 100644 index 0000000..ff9588f Binary files /dev/null and b/examples/declarative/tutorials/samegame/shared/pics/blueStar.png differ diff --git a/examples/declarative/tutorials/samegame/shared/pics/blueStone.png b/examples/declarative/tutorials/samegame/shared/pics/blueStone.png new file mode 100644 index 0000000..20e43c7 Binary files /dev/null and b/examples/declarative/tutorials/samegame/shared/pics/blueStone.png differ diff --git a/examples/declarative/tutorials/samegame/shared/pics/greenStar.png b/examples/declarative/tutorials/samegame/shared/pics/greenStar.png new file mode 100644 index 0000000..cd06854 Binary files /dev/null and b/examples/declarative/tutorials/samegame/shared/pics/greenStar.png differ diff --git a/examples/declarative/tutorials/samegame/shared/pics/greenStone.png b/examples/declarative/tutorials/samegame/shared/pics/greenStone.png new file mode 100644 index 0000000..b568a19 Binary files /dev/null and b/examples/declarative/tutorials/samegame/shared/pics/greenStone.png differ diff --git a/examples/declarative/tutorials/samegame/shared/pics/redStar.png b/examples/declarative/tutorials/samegame/shared/pics/redStar.png new file mode 100644 index 0000000..0a4dffe Binary files /dev/null and b/examples/declarative/tutorials/samegame/shared/pics/redStar.png differ diff --git a/examples/declarative/tutorials/samegame/shared/pics/redStone.png b/examples/declarative/tutorials/samegame/shared/pics/redStone.png new file mode 100644 index 0000000..36b09a2 Binary files /dev/null and b/examples/declarative/tutorials/samegame/shared/pics/redStone.png differ diff --git a/examples/declarative/tutorials/samegame/shared/pics/star.png b/examples/declarative/tutorials/samegame/shared/pics/star.png new file mode 100644 index 0000000..defbde5 Binary files /dev/null and b/examples/declarative/tutorials/samegame/shared/pics/star.png differ diff --git a/examples/declarative/tutorials/samegame/shared/pics/yellowStone.png b/examples/declarative/tutorials/samegame/shared/pics/yellowStone.png new file mode 100644 index 0000000..b1ce762 Binary files /dev/null and b/examples/declarative/tutorials/samegame/shared/pics/yellowStone.png differ -- cgit v0.12 From 82e224ee5e5388e8b5be186db6a60339e7b8fba3 Mon Sep 17 00:00:00 2001 From: ck Date: Mon, 1 Mar 2010 14:13:45 +0100 Subject: Fix compilation with namespace. --- src/corelib/tools/qsimd_p.h | 4 ++-- src/declarative/qml/qdeclarativebinding_p.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index 44c1798..53593aa 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -117,10 +117,10 @@ enum CPUFeatures { }; +Q_CORE_EXPORT uint qDetectCPUFeatures(); + QT_END_NAMESPACE QT_END_HEADER -Q_CORE_EXPORT uint qDetectCPUFeatures(); - #endif // QSIMD_P_H diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index f66b9c7..ec5809d 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -130,8 +130,9 @@ protected: private: Q_DECLARE_PRIVATE(QDeclarativeBinding) }; -Q_DECLARE_METATYPE(QDeclarativeBinding*); QT_END_NAMESPACE +Q_DECLARE_METATYPE(QDeclarativeBinding*); + #endif // QDECLARATIVEBINDING_P_H -- cgit v0.12 From 51bfbc326be268f552650dc30408479150a36744 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Mon, 1 Mar 2010 15:21:32 +0100 Subject: Extended gesture autotest. Make sure partial gestures do not propagate further if an item that expects partial gestures received it. Task-number: resulted from QTBUG-6876 Reviewed-by: trustme --- src/gui/graphicsview/qgraphicsscene.cpp | 7 ++++- tests/auto/gestures/tst_gestures.cpp | 53 +++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index a72761a..6bc02cc 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -6003,7 +6003,8 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event) cachedTargetItems = cachedItemGestures.keys(); qSort(cachedTargetItems.begin(), cachedTargetItems.end(), qt_closestItemFirst); DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:" - << "Conflicting gestures:" << conflictedGestures; + << "Normal gestures:" << normalGestures + << "Conflicting gestures:" << conflictedGestures; // deliver conflicted gestures as override events AND remember // initial gesture targets @@ -6080,6 +6081,10 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event) const Qt::GestureFlags flags = d->gestureContext.value(gesture->gestureType()); if (flags & Qt::IgnoredGesturesPropagateToParent) parentPropagatedGestures.insert(gesture); + } else { + DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:" + << "no target for" << gesture << "at" + << gesture->hotSpot() << gesture->d_func()->sceneHotSpot; } } qSort(cachedTargetItems.begin(), cachedTargetItems.end(), qt_closestItemFirst); diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp index a1afa0a..f8ecca3 100644 --- a/tests/auto/gestures/tst_gestures.cpp +++ b/tests/auto/gestures/tst_gestures.cpp @@ -354,6 +354,7 @@ private slots: void deleteGestureTargetItem_data(); void deleteGestureTargetItem(); void viewportCoordinates(); + void partialGesturePropagation(); }; tst_Gestures::tst_Gestures() @@ -1896,5 +1897,57 @@ void tst_Gestures::viewportCoordinates() QVERIFY(item1->gestureEventsReceived != 0); } +void tst_Gestures::partialGesturePropagation() +{ + QGraphicsScene scene; + QGraphicsView view(&scene); + view.setWindowFlags(Qt::X11BypassWindowManagerHint); + + GestureItem *item1 = new GestureItem("item1"); + item1->grabGesture(CustomGesture::GestureType); + item1->setZValue(8); + scene.addItem(item1); + + GestureItem *item2 = new GestureItem("item2[partial]"); + item2->grabGesture(CustomGesture::GestureType, Qt::ReceivePartialGestures); + item2->setZValue(6); + scene.addItem(item2); + + GestureItem *item3 = new GestureItem("item3"); + item3->grabGesture(CustomGesture::GestureType); + item3->setZValue(4); + scene.addItem(item3); + + GestureItem *item4 = new GestureItem("item4[partial]"); + item4->grabGesture(CustomGesture::GestureType, Qt::ReceivePartialGestures); + item4->setZValue(2); + scene.addItem(item4); + + view.show(); + QTest::qWaitForWindowShown(&view); + view.ensureVisible(scene.sceneRect()); + + view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren); + + item1->ignoredUpdatedGestures << CustomGesture::GestureType; + + CustomEvent event; + event.hotSpot = mapToGlobal(QPointF(5, 5), item1, &view); + event.hasHotSpot = true; + sendCustomGesture(&event, item1, &scene); + + static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1; + + QCOMPARE(item1->gestureOverrideEventsReceived, 1); + QCOMPARE(item2->gestureOverrideEventsReceived, 1); + QCOMPARE(item3->gestureOverrideEventsReceived, 1); + QCOMPARE(item4->gestureOverrideEventsReceived, 1); + + QCOMPARE(item1->gestureEventsReceived, TotalGestureEventsCount); + QCOMPARE(item2->gestureEventsReceived, TotalGestureEventsCount-2); // except for started and finished + QCOMPARE(item3->gestureEventsReceived, 0); + QCOMPARE(item4->gestureEventsReceived, 0); +} + QTEST_MAIN(tst_Gestures) #include "tst_gestures.moc" -- cgit v0.12 From a76c8424dab298c2fa36226f47bf7ac6f7e4014a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Mon, 1 Mar 2010 15:28:36 +0100 Subject: Fixed qDrawPixmaps() to draw on integer coordinates on Mac OS X. This is the 4.7 port of d04f5336f769d9e5d2f9105e1da4a7d23ea91795. Task-number: related to QTBUG-8455 Reviewed-by: Kim --- src/gui/painting/qpainter.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index dc96c17..9d83718 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -8933,8 +8933,15 @@ void QPainter::drawPixmapFragments(const Fragment *fragments, int fragmentCount, for (int i = 0; i < fragmentCount; ++i) { QTransform transform = oldTransform; - transform.translate(fragments[i].x, fragments[i].y); - transform.rotate(fragments[i].rotation); + qreal xOffset = 0; + qreal yOffset = 0; + if (fragments[i].rotation == 0) { + xOffset = fragments[i].x; + yOffset = fragments[i].y; + } else { + transform.translate(fragments[i].x, fragments[i].y); + transform.rotate(fragments[i].rotation); + } setOpacity(oldOpacity * fragments[i].opacity); setTransform(transform); @@ -8942,7 +8949,7 @@ void QPainter::drawPixmapFragments(const Fragment *fragments, int fragmentCount, qreal h = fragments[i].scaleY * fragments[i].height; QRectF sourceRect(fragments[i].sourceLeft, fragments[i].sourceTop, fragments[i].width, fragments[i].height); - drawPixmap(QRectF(-0.5 * w, -0.5 * h, w, h), pixmap, sourceRect); + drawPixmap(QRectF(-0.5 * w + xOffset, -0.5 * h + yOffset, w, h), pixmap, sourceRect); } setOpacity(oldOpacity); -- cgit v0.12 From 2fa8c8d4ddc162297a05f2908e0d86eb2c738153 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 1 Mar 2010 15:36:00 +0100 Subject: Doc: Rephrase documentation for QColor::isValidColor and add \since 4.7. --- src/gui/painting/qcolor.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index 1b43161..0b735a2 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -537,11 +537,13 @@ void QColor::setNamedColor(const QString &name) } /*! - Checks if the \a name is a valid color name. The algorithm used is the same as with - \a setNamedColor(). + \since 4.7 - \return true if the color name is valid, false otherwise. + Returns true if the \a name is a valid color name and can + be used to construct a valid QColor object, otherwise returns + false. + The algorithm used is the same as with \a setNamedColor(). \sa setNamedColor() */ bool QColor::isValidColor(const QString &name) -- cgit v0.12 From 31f2d97e28dff1a72511ab1ef7737e5f78d4cf66 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 1 Mar 2010 12:40:33 +0100 Subject: QMetaObject::invokeMethod: print a warning if the method is not found. Also adapt QTestLib not to call invokeMethod on unexisting method to avoid warnings Task-number: QTBUG-7331 Reviewed-by: Brad --- src/corelib/kernel/qmetaobject.cpp | 5 ++++- src/testlib/qtestcase.cpp | 28 +++++++++++++++++++++------- tests/auto/qmetaobject/tst_qmetaobject.cpp | 13 +++++++++++++ 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index be1b2ae..ecffe99 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -1137,8 +1137,11 @@ bool QMetaObject::invokeMethod(QObject *obj, idx = obj->metaObject()->indexOfMethod(norm.constData()); } - if (idx < 0 || idx >= obj->metaObject()->methodCount()) + if (idx < 0 || idx >= obj->metaObject()->methodCount()) { + qWarning("QMetaObject::invokeMethod: No such method %s::%s", + obj->metaObject()->className(), sig.constData()); return false; + } QMetaMethod method = obj->metaObject()->method(idx); return method.invoke(obj, type, ret, val0, val1, val2, val3, val4, val5, val6, val7, val8, val9); diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 5c9dd55..4590f17 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -877,6 +877,19 @@ int qt_snprintf(char *str, int size, const char *format, ...) return res; } +/*! \internal + Invoke a method of the object without generating warning if the method does not exist + */ +static void invokeMethod(QObject *obj, const char *methodName) +{ + const QMetaObject *metaObject = obj->metaObject(); + int funcIndex = metaObject->indexOfMethod(methodName); + if (funcIndex >= 0) { + QMetaMethod method = metaObject->method(funcIndex); + method.invoke(obj, Qt::DirectConnection); + } +} + bool Q_TESTLIB_EXPORT defaultKeyVerbose() { if (keyVerbose == -1) { @@ -1213,7 +1226,7 @@ static void qInvokeTestMethodDataEntry(char *slot) bool invokeOk; do { QTestResult::setCurrentTestLocation(QTestResult::InitFunc); - QMetaObject::invokeMethod(QTest::currentTestObject, "init"); + invokeMethod(QTest::currentTestObject, "init()"); if (QTestResult::skipCurrentTest()) break; @@ -1233,7 +1246,7 @@ static void qInvokeTestMethodDataEntry(char *slot) QTestResult::addFailure("Unable to execute slot", __FILE__, __LINE__); QTestResult::setCurrentTestLocation(QTestResult::CleanupFunc); - QMetaObject::invokeMethod(QTest::currentTestObject, "cleanup"); + invokeMethod(QTest::currentTestObject, "cleanup()"); QTestResult::setCurrentTestLocation(QTestResult::NoWhere); // If this test method has a benchmark, repeat until all measurements are @@ -1300,8 +1313,9 @@ static bool qInvokeTestMethod(const char *slotName, const char *data=0) if (curGlobalDataIndex == 0) { QTestResult::setCurrentTestLocation(QTestResult::DataFunc); - QTest::qt_snprintf(member, 512, "%s_data", slot); - QMetaObject::invokeMethod(QTest::currentTestObject, member, Qt::DirectConnection); + QTest::qt_snprintf(member, 512, "%s_data()", slot); + invokeMethod(QTest::currentTestObject, member); + // if we encounter a SkipAll in the _data slot, we skip the whole // testfunction, no matter how much global data exists if (QTestResult::skipCurrentTest()) { @@ -1466,11 +1480,11 @@ static void qInvokeTestMethods(QObject *testObject) QTestResult::setCurrentTestFunction("initTestCase"); QTestResult::setCurrentTestLocation(QTestResult::DataFunc); QTestTable::globalTestTable(); - QMetaObject::invokeMethod(testObject, "initTestCase_data", Qt::DirectConnection); + invokeMethod(testObject, "initTestCase_data()"); if (!QTestResult::skipCurrentTest() && !QTest::currentTestFailed()) { QTestResult::setCurrentTestLocation(QTestResult::InitFunc); - QMetaObject::invokeMethod(testObject, "initTestCase"); + invokeMethod(testObject, "initTestCase()"); // finishedCurrentTestFunction() resets QTestResult::testFailed(), so use a local copy. const bool previousFailed = QTestResult::testFailed(); @@ -1498,7 +1512,7 @@ static void qInvokeTestMethods(QObject *testObject) QTestResult::setSkipCurrentTest(false); QTestResult::setCurrentTestFunction("cleanupTestCase"); - QMetaObject::invokeMethod(testObject, "cleanupTestCase"); + invokeMethod(testObject, "cleanupTestCase()"); } QTestResult::finishedCurrentTestFunction(); QTestResult::setCurrentTestFunction(0); diff --git a/tests/auto/qmetaobject/tst_qmetaobject.cpp b/tests/auto/qmetaobject/tst_qmetaobject.cpp index 15b6204..bd54975 100644 --- a/tests/auto/qmetaobject/tst_qmetaobject.cpp +++ b/tests/auto/qmetaobject/tst_qmetaobject.cpp @@ -513,6 +513,19 @@ void tst_QMetaObject::invokeMetaMember() QVERIFY(QMetaObject::invokeMethod(&obj, "sig1", Q_RETURN_ARG(QString, exp), Q_ARG(QString, "hehe"))); QCOMPARE(exp, QString("yessir")); QCOMPARE(obj.slotResult, QString("sl1:hehe")); + + QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::doesNotExist()"); + QVERIFY(!QMetaObject::invokeMethod(&obj, "doesNotExist")); + QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl1(QString)(QString)"); + QVERIFY(!QMetaObject::invokeMethod(&obj, "sl1(QString)", Q_ARG(QString, "arg"))); + QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl3(QString)"); + QVERIFY(!QMetaObject::invokeMethod(&obj, "sl3", Q_ARG(QString, "arg"))); + QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl1(QString,QString,QString)"); + QVERIFY(!QMetaObject::invokeMethod(&obj, "sl1", Q_ARG(QString, "arg"), Q_ARG(QString, "arg"), Q_ARG(QString, "arg"))); + + //should not have changed since last test. + QCOMPARE(exp, QString("yessir")); + QCOMPARE(obj.slotResult, QString("sl1:hehe")); } void tst_QMetaObject::invokeQueuedMetaMember() -- cgit v0.12 From 9d38d8005876d808f499591d1427b227f4b9764f Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 1 Mar 2010 11:11:30 +0100 Subject: Avoid conversion between JavaScriptCore String type and QString Use JSC::UString internally. Only when the public API demands it should a JSC::UString be converted to a QString. Reviewed-by: Jedrzej Nowacki --- src/script/api/qscriptengine.cpp | 10 +++++----- src/script/api/qscriptengine_p.h | 20 ++++++++++---------- src/script/api/qscriptvalue.cpp | 2 +- src/script/api/qscriptvalue_p.h | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index d2e96d1..a9d6fb1 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -563,7 +563,7 @@ JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState *exec, JSC::JSObjec slot = arg1; else { QScript::SaveFrameHelper saveFrame(engine, exec); - QString propertyName(QScriptEnginePrivate::toString(exec, arg1)); + JSC::UString propertyName = QScriptEnginePrivate::toString(exec, arg1); slot = QScriptEnginePrivate::property(exec, arg0, propertyName, QScriptValue::ResolvePrototype); } } @@ -645,7 +645,7 @@ JSC::JSValue JSC_HOST_CALL functionConnect(JSC::ExecState *exec, JSC::JSObject * slot = arg1; else { QScript::SaveFrameHelper saveFrame(engine, exec); - QString propertyName = QScriptEnginePrivate::toString(exec, arg1); + JSC::UString propertyName = QScriptEnginePrivate::toString(exec, arg1); slot = QScriptEnginePrivate::property(exec, arg0, propertyName, QScriptValue::ResolvePrototype); } } @@ -1580,9 +1580,9 @@ QRegExp QScriptEnginePrivate::toRegExp(JSC::ExecState *exec, JSC::JSValue value) { if (!isRegExp(value)) return QRegExp(); - QString pattern = toString(exec, property(exec, value, QLatin1String("source"), QScriptValue::ResolvePrototype)); + QString pattern = toString(exec, property(exec, value, "source", QScriptValue::ResolvePrototype)); Qt::CaseSensitivity kase = Qt::CaseSensitive; - if (toBool(exec, property(exec, value, QLatin1String("ignoreCase"), QScriptValue::ResolvePrototype))) + if (toBool(exec, property(exec, value, "ignoreCase", QScriptValue::ResolvePrototype))) kase = Qt::CaseInsensitive; return QRegExp(pattern, kase, QRegExp::RegExp2); } @@ -1637,7 +1637,7 @@ JSC::JSValue QScriptEnginePrivate::propertyHelper(JSC::ExecState *exec, JSC::JSV } if (!result && (resolveMode & QScriptValue::ResolveScope)) { // ### check if it's a function object and look in the scope chain - JSC::JSValue scope = property(exec, value, QString::fromLatin1("__qt_scope__"), QScriptValue::ResolveLocal); + JSC::JSValue scope = property(exec, value, "__qt_scope__", QScriptValue::ResolveLocal); if (isObject(scope)) result = property(exec, scope, id, resolveMode); } diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index d0d020a..a05e12c 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -165,7 +165,7 @@ public: static inline qint32 toInt32(JSC::ExecState *, JSC::JSValue); static inline quint32 toUInt32(JSC::ExecState *, JSC::JSValue); static inline quint16 toUInt16(JSC::ExecState *, JSC::JSValue); - static inline QString toString(JSC::ExecState *, JSC::JSValue); + static inline JSC::UString toString(JSC::ExecState *, JSC::JSValue); static inline QDateTime toDateTime(JSC::ExecState *, JSC::JSValue); #ifndef QT_NO_REGEXP @@ -181,8 +181,8 @@ public: static inline JSC::JSValue property(JSC::ExecState*, JSC::JSValue, quint32 index, int resolveMode = QScriptValue::ResolvePrototype); static JSC::JSValue propertyHelper(JSC::ExecState*, JSC::JSValue, quint32, int resolveMode); - static inline JSC::JSValue property(JSC::ExecState*, JSC::JSValue, const QString &, int resolveMode); - static inline void setProperty(JSC::ExecState*, JSC::JSValue object, const QString &name, JSC::JSValue, + static inline JSC::JSValue property(JSC::ExecState*, JSC::JSValue, const JSC::UString &, int resolveMode); + static inline void setProperty(JSC::ExecState*, JSC::JSValue object, const JSC::UString &name, JSC::JSValue, const QScriptValue::PropertyFlags &flags = QScriptValue::KeepExistingFlags); static void setProperty(JSC::ExecState*, JSC::JSValue object, const JSC::Identifier &id, JSC::JSValue, const QScriptValue::PropertyFlags &flags = QScriptValue::KeepExistingFlags); @@ -191,7 +191,7 @@ public: static QScriptValue::PropertyFlags propertyFlags(JSC::ExecState*, JSC::JSValue value, const JSC::Identifier &id, const QScriptValue::ResolveFlags &mode); static inline QScriptValue::PropertyFlags propertyFlags(JSC::ExecState*, JSC::JSValue value, - const QString &name, const QScriptValue::ResolveFlags &mode); + const JSC::UString &name, const QScriptValue::ResolveFlags &mode); static bool convertValue(JSC::ExecState*, JSC::JSValue value, int type, void *ptr); @@ -629,7 +629,7 @@ inline void QScriptValuePrivate::initFrom(const QString &value) engine->registerScriptValue(this); } -inline JSC::JSValue QScriptEnginePrivate::property(JSC::ExecState *exec, JSC::JSValue value, const QString &name, int resolveMode) +inline JSC::JSValue QScriptEnginePrivate::property(JSC::ExecState *exec, JSC::JSValue value, const JSC::UString &name, int resolveMode) { return property(exec, value, JSC::Identifier(exec, name), resolveMode); } @@ -655,13 +655,13 @@ inline JSC::JSValue QScriptEnginePrivate::property(JSC::ExecState *exec, JSC::JS } inline QScriptValue::PropertyFlags QScriptEnginePrivate::propertyFlags(JSC::ExecState *exec, JSC::JSValue value, - const QString &name, + const JSC::UString &name, const QScriptValue::ResolveFlags &mode) { return propertyFlags(exec, value, JSC::Identifier(exec, name), mode); } -inline void QScriptEnginePrivate::setProperty(JSC::ExecState *exec, JSC::JSValue objectValue, const QString &name, +inline void QScriptEnginePrivate::setProperty(JSC::ExecState *exec, JSC::JSValue objectValue, const JSC::UString &name, JSC::JSValue value, const QScriptValue::PropertyFlags &flags) { setProperty(exec, objectValue, JSC::Identifier(exec, name), value, flags); @@ -677,7 +677,7 @@ inline JSC::JSValue QScriptValuePrivate::property(quint32 index, int resolveMode return QScriptEnginePrivate::property(engine->currentFrame, jscValue, index, resolveMode); } -inline JSC::JSValue QScriptValuePrivate::property(const QString &name, int resolveMode) const +inline JSC::JSValue QScriptValuePrivate::property(const JSC::UString &name, int resolveMode) const { JSC::ExecState *exec = engine->currentFrame; return QScriptEnginePrivate::property(exec, jscValue, JSC::Identifier(exec, name), resolveMode); @@ -701,7 +701,7 @@ inline void QScriptValuePrivate::setProperty(quint32 index, const JSC::JSValue & QScriptEnginePrivate::setProperty(engine->currentFrame, jscValue, index, value, flags); } -inline void QScriptValuePrivate::setProperty(const QString &name, const JSC::JSValue &value, +inline void QScriptValuePrivate::setProperty(const JSC::UString &name, const JSC::JSValue &value, const QScriptValue::PropertyFlags &flags) { JSC::ExecState *exec = engine->currentFrame; @@ -919,7 +919,7 @@ inline quint16 QScriptEnginePrivate::toUInt16(JSC::ExecState *exec, JSC::JSValue return QScript::ToUInt16(toNumber(exec, value)); } -inline QString QScriptEnginePrivate::toString(JSC::ExecState *exec, JSC::JSValue value) +inline JSC::UString QScriptEnginePrivate::toString(JSC::ExecState *exec, JSC::JSValue value) { JSC::JSValue savedException; saveException(exec, &savedException); diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 7f1fdaa..414a45c 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -562,7 +562,7 @@ QScriptValue QScriptValue::scope() const if (!d || !d->isObject()) return QScriptValue(); // ### make hidden property - JSC::JSValue result = d->property(QLatin1String("__qt_scope__"), QScriptValue::ResolveLocal); + JSC::JSValue result = d->property("__qt_scope__", QScriptValue::ResolveLocal); return d->engine->scriptValueFromJSCValue(result); } diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h index 77b7330..089b923 100644 --- a/src/script/api/qscriptvalue_p.h +++ b/src/script/api/qscriptvalue_p.h @@ -88,8 +88,8 @@ public: inline JSC::JSValue property(const JSC::Identifier &id, int resolveMode) const; inline JSC::JSValue property(quint32 index, int resolveMode) const; - inline JSC::JSValue property(const QString &, int resolveMode) const; - inline void setProperty(const QString &name, const JSC::JSValue &value, + inline JSC::JSValue property(const JSC::UString &, int resolveMode) const; + inline void setProperty(const JSC::UString &name, const JSC::JSValue &value, const QScriptValue::PropertyFlags &flags); inline void setProperty(const JSC::Identifier &id, const JSC::JSValue &value, const QScriptValue::PropertyFlags &flags); -- cgit v0.12 From d628a467159b79c85885acb21510cb1e646a968b Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 1 Mar 2010 11:14:01 +0100 Subject: Perform latin1 conversion directly on JSC::UString This conversion needs to be as fast as possible since it's performed every time you access a QObject property from QtScript. Hence, we should avoid going via QString and instead do the conversion ourselves. Reviewed-by: Jedrzej Nowacki --- src/script/api/qscriptengine.cpp | 34 +++++++++++++++++----------------- src/script/api/qscriptengine_p.h | 18 ++++++++++++++++++ src/script/bridge/qscriptqobject.cpp | 22 +++++++++++----------- 3 files changed, 46 insertions(+), 28 deletions(-) diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index a9d6fb1..9cd5c63 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -723,19 +723,19 @@ JSC::JSValue JSC_HOST_CALL functionQsTranslate(JSC::ExecState *exec, JSC::JSObje if ((args.size() > 4) && !args.at(4).isNumber()) return JSC::throwError(exec, JSC::GeneralError, "qsTranslate(): fifth argument (n) must be a number"); #ifndef QT_NO_QOBJECT - QString context(args.at(0).toString(exec)); + JSC::UString context = args.at(0).toString(exec); #endif - QString text(args.at(1).toString(exec)); + JSC::UString text = args.at(1).toString(exec); #ifndef QT_NO_QOBJECT - QString comment; + JSC::UString comment; if (args.size() > 2) comment = args.at(2).toString(exec); QCoreApplication::Encoding encoding = QCoreApplication::CodecForTr; if (args.size() > 3) { - QString encStr(args.at(3).toString(exec)); - if (encStr == QLatin1String("CodecForTr")) + JSC::UString encStr = args.at(3).toString(exec); + if (encStr == "CodecForTr") encoding = QCoreApplication::CodecForTr; - else if (encStr == QLatin1String("UnicodeUTF8")) + else if (encStr == "UnicodeUTF8") encoding = QCoreApplication::UnicodeUTF8; else return JSC::throwError(exec, JSC::GeneralError, QString::fromLatin1("qsTranslate(): invalid encoding '%s'").arg(encStr)); @@ -744,11 +744,11 @@ JSC::JSValue JSC_HOST_CALL functionQsTranslate(JSC::ExecState *exec, JSC::JSObje if (args.size() > 4) n = args.at(4).toInt32(exec); #endif - QString result; + JSC::UString result; #ifndef QT_NO_QOBJECT - result = QCoreApplication::translate(context.toLatin1().constData(), - text.toLatin1().constData(), - comment.toLatin1().constData(), + result = QCoreApplication::translate(QScript::convertToLatin1(context).constData(), + QScript::convertToLatin1(text).constData(), + QScript::convertToLatin1(comment).constData(), encoding, n); #else result = text; @@ -774,25 +774,25 @@ JSC::JSValue JSC_HOST_CALL functionQsTr(JSC::ExecState *exec, JSC::JSObject*, JS if ((args.size() > 2) && !args.at(2).isNumber()) return JSC::throwError(exec, JSC::GeneralError, "qsTranslate(): third argument (n) must be a number"); #ifndef QT_NO_QOBJECT - QString context; + JSC::UString context; QScriptContext *ctx = QScriptEnginePrivate::contextForFrame(exec); if (ctx && ctx->parentContext()) context = QFileInfo(QScriptContextInfo(ctx->parentContext()).fileName()).baseName(); #endif - QString text(args.at(0).toString(exec)); + JSC::UString text = args.at(0).toString(exec); #ifndef QT_NO_QOBJECT - QString comment; + JSC::UString comment; if (args.size() > 1) comment = args.at(1).toString(exec); int n = -1; if (args.size() > 2) n = args.at(2).toInt32(exec); #endif - QString result; + JSC::UString result; #ifndef QT_NO_QOBJECT - result = QCoreApplication::translate(context.toLatin1().constData(), - text.toLatin1().constData(), - comment.toLatin1().constData(), + result = QCoreApplication::translate(QScript::convertToLatin1(context).constData(), + QScript::convertToLatin1(text).constData(), + QScript::convertToLatin1(comment).constData(), QCoreApplication::CodecForTr, n); #else result = text; diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index a05e12c..5166d89 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -123,6 +123,9 @@ namespace QScript inline QScriptEnginePrivate *scriptEngineFromExec(const JSC::ExecState *exec); bool isFunction(JSC::JSValue value); + inline void convertToLatin1_helper(const UChar *i, int length, char *s); + inline QByteArray convertToLatin1(const JSC::UString &str); + class UStringSourceProviderWithFeedback; struct GlobalClientData : public JSC::JSGlobalData::ClientData @@ -516,6 +519,21 @@ inline bool ToBool(const QString &value) return !value.isEmpty(); } +inline void convertToLatin1_helper(const UChar *i, int length, char *s) +{ + const UChar *e = i + length; + while (i != e) + *(s++) = (uchar) *(i++); + *s = '\0'; +} + +inline QByteArray convertToLatin1(const JSC::UString &str) +{ + QByteArray ba(str.size(), Qt::Uninitialized); + convertToLatin1_helper(str.data(), str.size(), ba.data()); + return ba; +} + } // namespace QScript inline QScriptValuePrivate *QScriptEnginePrivate::allocateScriptValuePrivate(size_t size) diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index 30e5a26..8d111f9 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -654,8 +654,8 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c matchDistance += 10; } } else { - QString sval = QScriptEnginePrivate::toString(exec, actual); - int ival = m.keyToValue(sval.toLatin1()); + JSC::UString sval = QScriptEnginePrivate::toString(exec, actual); + int ival = m.keyToValue(convertToLatin1(sval)); if (ival != -1) { qVariantSetValue(v, ival); converted = true; @@ -1168,7 +1168,7 @@ bool QObjectDelegate::getOwnPropertySlot(QScriptObject *object, JSC::ExecState * { //Note: this has to be kept in sync with getOwnPropertyDescriptor #ifndef QT_NO_PROPERTIES - QByteArray name = QString(propertyName.ustring()).toLatin1(); + QByteArray name = convertToLatin1(propertyName.ustring()); QObject *qobject = data->value; if (!qobject) { QString message = QString::fromLatin1("cannot access member `%0' of deleted QObject") @@ -1285,7 +1285,7 @@ bool QObjectDelegate::getOwnPropertyDescriptor(QScriptObject *object, JSC::ExecS { //Note: this has to be kept in sync with getOwnPropertySlot abd getPropertyAttributes #ifndef QT_NO_PROPERTIES - QByteArray name = QString(propertyName.ustring()).toLatin1(); + QByteArray name = convertToLatin1(propertyName.ustring()); QObject *qobject = data->value; if (!qobject) { QString message = QString::fromLatin1("cannot access member `%0' of deleted QObject") @@ -1419,7 +1419,7 @@ void QObjectDelegate::put(QScriptObject *object, JSC::ExecState* exec, JSC::JSValue value, JSC::PutPropertySlot &slot) { #ifndef QT_NO_PROPERTIES - QByteArray name = ((QString)propertyName.ustring()).toLatin1(); + QByteArray name = convertToLatin1(propertyName.ustring()); QObject *qobject = data->value; if (!qobject) { QString message = QString::fromLatin1("cannot access member `%0' of deleted QObject") @@ -1517,7 +1517,7 @@ bool QObjectDelegate::deleteProperty(QScriptObject *object, JSC::ExecState *exec bool checkDontDelete) { #ifndef QT_NO_PROPERTIES - QByteArray name = ((QString)propertyName.ustring()).toLatin1(); + QByteArray name = convertToLatin1(propertyName.ustring()); QObject *qobject = data->value; if (!qobject) { QString message = QString::fromLatin1("cannot access member `%0' of deleted QObject") @@ -1567,7 +1567,7 @@ bool QObjectDelegate::getPropertyAttributes(const QScriptObject *object, { #ifndef QT_NO_PROPERTIES //Note: this has to be kept in sync with getOwnPropertyDescriptor and getOwnPropertySlot - QByteArray name = ((QString)propertyName.ustring()).toLatin1(); + QByteArray name = convertToLatin1(propertyName.ustring()); QObject *qobject = data->value; if (!qobject) return false; @@ -1853,7 +1853,7 @@ bool QMetaObjectWrapperObject::getOwnPropertySlot( return true; } - QByteArray name = QString(propertyName.ustring()).toLatin1(); + QByteArray name = convertToLatin1(propertyName.ustring()); for (int i = 0; i < meta->enumeratorCount(); ++i) { QMetaEnum e = meta->enumerator(i); @@ -1881,7 +1881,7 @@ void QMetaObjectWrapperObject::put(JSC::ExecState* exec, const JSC::Identifier& } const QMetaObject *meta = data->value; if (meta) { - QByteArray name = QString(propertyName.ustring()).toLatin1(); + QByteArray name = convertToLatin1(propertyName.ustring()); for (int i = 0; i < meta->enumeratorCount(); ++i) { QMetaEnum e = meta->enumerator(i); for (int j = 0; j < e.keyCount(); ++j) { @@ -1901,7 +1901,7 @@ bool QMetaObjectWrapperObject::deleteProperty( return false; const QMetaObject *meta = data->value; if (meta) { - QByteArray name = QString(propertyName.ustring()).toLatin1(); + QByteArray name = convertToLatin1(propertyName.ustring()); for (int i = 0; i < meta->enumeratorCount(); ++i) { QMetaEnum e = meta->enumerator(i); for (int j = 0; j < e.keyCount(); ++j) { @@ -1923,7 +1923,7 @@ bool QMetaObjectWrapperObject::getPropertyAttributes(JSC::ExecState *exec, } const QMetaObject *meta = data->value; if (meta) { - QByteArray name = QString(propertyName.ustring()).toLatin1(); + QByteArray name = convertToLatin1(propertyName.ustring()); for (int i = 0; i < meta->enumeratorCount(); ++i) { QMetaEnum e = meta->enumerator(i); for (int j = 0; j < e.keyCount(); ++j) { -- cgit v0.12 From 7afc26c45ba19ba1fa077629e388be32ea1664bc Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 1 Mar 2010 15:39:17 +0100 Subject: compile --- src/multimedia/qml/qsoundeffect_pulse_p.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/multimedia/qml/qsoundeffect_pulse_p.cpp b/src/multimedia/qml/qsoundeffect_pulse_p.cpp index ec851aa..f7870c2 100644 --- a/src/multimedia/qml/qsoundeffect_pulse_p.cpp +++ b/src/multimedia/qml/qsoundeffect_pulse_p.cpp @@ -63,7 +63,7 @@ #include "qsoundeffect_pulse_p.h" -#if(Q_WS_MAEMO_5) +#if defined(Q_WS_MAEMO_5) #include #endif @@ -155,7 +155,7 @@ private: lock(); m_context = pa_context_new(m_mainLoopApi, QString(QLatin1String("QtPulseAudio:%1")).arg(::getpid()).toAscii().constData()); -#if(Q_WS_MAEMO_5) +#if defined(Q_WS_MAEMO_5) pa_context_set_state_callback(m_context, context_state_callback, this); #endif if (m_context == 0) { @@ -183,7 +183,7 @@ private: m_prepared = false; } -#if(Q_WS_MAEMO_5) +#if defined(Q_WS_MAEMO_5) static void context_state_callback(pa_context *c, void *userdata) { PulseDaemon *self = reinterpret_cast(userdata); @@ -299,7 +299,7 @@ void QSoundEffectPrivate::play() pa_volume_t m_vol = PA_VOLUME_NORM; daemon()->lock(); -#if(Q_WS_MAEMO_5) +#if defined(Q_WS_MAEMO_5) m_vol = PA_VOLUME_NORM/100*((daemon()->volume()+m_vol)/2); #endif pa_operation_unref( -- cgit v0.12 From e24247b07c6450881094200e729390b676f911aa Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 1 Mar 2010 15:52:15 +0100 Subject: =?UTF-8?q?Interview=20Demo:=20Fix=20warning=20about=20pixmap=20le?= =?UTF-8?q?ak=20on=20X11.=20Reviewed-by:=20Trond=20Kjern=C3=A5sen=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demos/interview/model.cpp | 2 +- demos/interview/model.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/demos/interview/model.cpp b/demos/interview/model.cpp index 3f9548a..840bc60 100644 --- a/demos/interview/model.cpp +++ b/demos/interview/model.cpp @@ -45,6 +45,7 @@ Model::Model(int rows, int columns, QObject *parent) : QAbstractItemModel(parent), + services(QPixmap(":/images/services.png")), rc(rows), cc(columns), tree(new QVector(rows, Node(0))) { @@ -105,7 +106,6 @@ QVariant Model::data(const QModelIndex &index, int role) const QVariant Model::headerData(int section, Qt::Orientation orientation, int role) const { - static QIcon services(QPixmap(":/images/services.png")); if (role == Qt::DisplayRole) return QString::number(section); if (role == Qt::DecorationRole) diff --git a/demos/interview/model.h b/demos/interview/model.h index bad83a8..c7c15f7 100644 --- a/demos/interview/model.h +++ b/demos/interview/model.h @@ -44,6 +44,7 @@ #include #include +#include #include class Model : public QAbstractItemModel @@ -80,6 +81,7 @@ private: Node *parent(Node *child) const; int row(Node *node) const; + QIcon services; int rc, cc; QVector *tree; QFileIconProvider iconProvider; -- cgit v0.12 From 45d91603e65f78cb749bcc2c8949ef24048761df Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 1 Mar 2010 16:30:33 +0100 Subject: Doc: brief Qt Quick introduction on "What's New" page. --- doc/src/qt4-intro.qdoc | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc index cf53df0..c670c51 100644 --- a/doc/src/qt4-intro.qdoc +++ b/doc/src/qt4-intro.qdoc @@ -473,6 +473,29 @@ \section1 Declarative UI development with Qt Quick + Qt 4.7 introduces Quick, the Qt UI Creation Kit. that enables the creation + of dynamic user interfaces, easier and more effective than possible + with existing UI technologies. This UI Creation Kit consist of three + technologies: + + \list + \i QML is a declarative language oriented on JavaScript that utilizes + Qt's Meta-Object capabilities to enable designers and developers to + collaborate tightly and create animated and fluid user experiences, + using existing knowledge in script language and design. + + \i QtDeclarative is a C++ library that provides the underlying engine, + which translates the declarative description of the UI in QML into + items on a QGraphicsScene. The library also provides APIs to bind + custom C++ types and elements to QML, and to connect the QML UI with + the underlying application logic written in C++. + + \i Qt Creator has been improved to support interactive editing of + QML UIs through drag-and-drop. The text editor supports the QML + syntax and provides authoring assistance such as auto-completion, + error lookup, help lookup and easy preview of QML UI's. + \endlist + \section1 Network Bearer Management Bearer Management controls the connectivity state of the system. @@ -494,7 +517,7 @@ \section1 New Classes, Functions, Macros, etc. - Links to new classes, functions, macros, and other items + Links to new classes, elements, functions, macros, and other items introduced in Qt 4.7. \sincelist 4.7 -- cgit v0.12 From b281e39d8449ccc63020ba959404f77aba424de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Mon, 1 Mar 2010 16:56:29 +0100 Subject: Fixed the close button of the find widget in Assistant Done with Christian Kandeler. --- tools/assistant/tools/assistant/findwidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/assistant/tools/assistant/findwidget.cpp b/tools/assistant/tools/assistant/findwidget.cpp index 2e40ab0..60318d4 100644 --- a/tools/assistant/tools/assistant/findwidget.cpp +++ b/tools/assistant/tools/assistant/findwidget.cpp @@ -72,6 +72,7 @@ FindWidget::FindWidget(QWidget *parent) toolClose = setupToolButton(QLatin1String(""), resourcePath + QLatin1String("/closetab.png")); hboxLayout->addWidget(toolClose); + connect(toolClose, SIGNAL(clicked()), SLOT(hide())); editFind = new QLineEdit(this); hboxLayout->addWidget(editFind); -- cgit v0.12 From a07ac42868df345994ee2a5d27ff79f2e3599ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Mon, 1 Mar 2010 16:56:51 +0100 Subject: Updated .gitignore with the new name of the qmlviewer --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 548e69e..7fe33b9 100644 --- a/.gitignore +++ b/.gitignore @@ -83,7 +83,7 @@ bin/kmap2qmap* bin/qlalr* bin/qmlconv* bin/qmldebugger* -bin/qmlviewer* +bin/qml* bin/qttracereplay* configure.cache config.status -- cgit v0.12 From a7196feb11d701dd486e66fd06cbc50d84c9b1bb Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Mon, 1 Mar 2010 17:03:00 +0100 Subject: typo for windows ce exclusion rule Reviewed-by: Paul Olav Tvete --- src/plugins/mediaservices/mediaservices.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/mediaservices/mediaservices.pro b/src/plugins/mediaservices/mediaservices.pro index d84b276..19d678b 100644 --- a/src/plugins/mediaservices/mediaservices.pro +++ b/src/plugins/mediaservices/mediaservices.pro @@ -1,7 +1,7 @@ TEMPLATE = subdirs contains(QT_CONFIG, mediaservice) { - win32:!wince: SUBDIRS += directshow + win32:!wince*: SUBDIRS += directshow mac: SUBDIRS += qt7 -- cgit v0.12 From 83c37c2cdf7adf2604e1e6012a9e0e6e67d97d6b Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Mon, 1 Mar 2010 17:31:44 +0100 Subject: removed dead code Reviewed-by: denis --- src/gui/kernel/qcursor_mac.mm | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/src/gui/kernel/qcursor_mac.mm b/src/gui/kernel/qcursor_mac.mm index cfebf60..03e38b0 100644 --- a/src/gui/kernel/qcursor_mac.mm +++ b/src/gui/kernel/qcursor_mac.mm @@ -114,27 +114,18 @@ void qt_mac_set_cursor(const QCursor *c, const QPoint &) } c->handle(); //force the cursor to get loaded, if it's not - if(1 || currentCursor != c->d) { - if(currentCursor && currentCursor->type == QCursorData::TYPE_ThemeCursor - && currentCursor->curs.tc.anim) - currentCursor->curs.tc.anim->stop(); - QMacCocoaAutoReleasePool pool; - if(c->d->type == QCursorData::TYPE_ImageCursor) { - [static_cast(c->d->curs.cp.nscursor) set]; - } else if(c->d->type == QCursorData::TYPE_ThemeCursor) { -#ifdef QT_MAC_USE_COCOA - if (c->d->curs.cp.nscursor == 0) - [[NSCursor arrowCursor] set]; - [static_cast(c->d->curs.cp.nscursor) set]; -#else - if(SetAnimatedThemeCursor(c->d->curs.tc.curs, 0) == themeBadCursorIndexErr) { - SetThemeCursor(c->d->curs.tc.curs); - } else { - if(!c->d->curs.tc.anim) - c->d->curs.tc.anim = new QMacAnimateCursor; - c->d->curs.tc.anim->start(c->d->curs.tc.curs); - } -#endif + if(currentCursor && currentCursor->type == QCursorData::TYPE_ThemeCursor + && currentCursor->curs.tc.anim) + currentCursor->curs.tc.anim->stop(); + if(c->d->type == QCursorData::TYPE_ImageCursor) { + [static_cast(c->d->curs.cp.nscursor) set]; + } else if(c->d->type == QCursorData::TYPE_ThemeCursor) { + if(SetAnimatedThemeCursor(c->d->curs.tc.curs, 0) == themeBadCursorIndexErr) { + SetThemeCursor(c->d->curs.tc.curs); + } else { + if(!c->d->curs.tc.anim) + c->d->curs.tc.anim = new QMacAnimateCursor; + c->d->curs.tc.anim->start(c->d->curs.tc.curs); } } currentCursor = c->d; -- cgit v0.12 From d042a00b5828961e1e1fa82017717b5f72dde9ef Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Mon, 1 Mar 2010 17:45:35 +1000 Subject: Bearer management changes from Qt Mobility (fca9891). fca98911b75ce12e70d93cfc2932a9759758a605 --- src/network/bearer/qnetworkconfigmanager.cpp | 5 + src/network/bearer/qnetworkconfiguration.cpp | 1 - src/network/bearer/qnetworksession.cpp | 4 + src/plugins/bearer/corewlan/qcorewlanengine.h | 6 + src/plugins/bearer/corewlan/qcorewlanengine.mm | 196 +++++++++----- src/plugins/bearer/generic/qgenericengine.cpp | 11 +- src/plugins/bearer/icd/monitor.cpp | 56 +--- src/plugins/bearer/icd/monitor.h | 22 +- src/plugins/bearer/icd/qicdengine.cpp | 24 +- src/plugins/bearer/icd/qnetworksession_impl.cpp | 32 ++- src/plugins/bearer/icd/qnetworksession_impl.h | 7 +- .../networkmanager/qnetworkmanagerengine.cpp | 3 +- .../networkmanager/qnetworkmanagerservice.cpp | 293 +++++++++------------ .../bearer/networkmanager/qnetworkmanagerservice.h | 112 +++++--- .../bearer/networkmanager/qnmdbushelper.cpp | 11 +- src/plugins/bearer/networkmanager/qnmdbushelper.h | 2 + src/plugins/bearer/qnetworksession_impl.cpp | 3 +- .../bearer/symbian/qnetworksession_impl.cpp | 17 +- src/plugins/bearer/symbian/symbianengine.cpp | 38 ++- src/plugins/bearer/symbian/symbianengine.h | 1 + tests/auto/qbearertestcommon.h | 13 + tests/auto/qnetworksession/lackey/main.cpp | 13 +- .../qnetworksession/test/tst_qnetworksession.cpp | 293 ++++++++++++++++++++- 23 files changed, 794 insertions(+), 369 deletions(-) diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp index e960323..9ff197b 100644 --- a/src/network/bearer/qnetworkconfigmanager.cpp +++ b/src/network/bearer/qnetworkconfigmanager.cpp @@ -302,6 +302,11 @@ QNetworkConfiguration QNetworkConfigurationManager::defaultConfiguration() const be used to update each configuration's state. Note that such an update may require some time. It's completion is signalled by updateCompleted(). In the absence of a configuration update this function returns the best estimate at the time of the call. + Therefore, if WLAN configurations are of interest, it is recommended that + updateConfigurations() is called once after QNetworkConfigurationManager + instantiation (WLAN scans are too time consuming to perform in constructor). + After this the data is kept automatically up-to-date as the system reports + any changes. */ QList QNetworkConfigurationManager::allConfigurations(QNetworkConfiguration::StateFlags filter) const { diff --git a/src/network/bearer/qnetworkconfiguration.cpp b/src/network/bearer/qnetworkconfiguration.cpp index c551dc5..c4ba406 100644 --- a/src/network/bearer/qnetworkconfiguration.cpp +++ b/src/network/bearer/qnetworkconfiguration.cpp @@ -40,7 +40,6 @@ ****************************************************************************/ #include "qnetworkconfiguration.h" - #include "qnetworkconfiguration_p.h" QT_BEGIN_NAMESPACE diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp index 6a82791..f0d7ede 100644 --- a/src/network/bearer/qnetworksession.cpp +++ b/src/network/bearer/qnetworksession.cpp @@ -275,6 +275,8 @@ void QNetworkSession::open() { if (d) d->open(); + else + emit error(InvalidConfigurationError); } /*! @@ -308,6 +310,8 @@ bool QNetworkSession::waitForOpened(int msecs) QEventLoop* loop = new QEventLoop(this); QObject::connect(d, SIGNAL(quitPendingWaitsForOpened()), loop, SLOT(quit())); + QObject::connect(this, SIGNAL(error(QNetworkSession::SessionError)), + loop, SLOT(quit())); //final call if (msecs>=0) diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.h b/src/plugins/bearer/corewlan/qcorewlanengine.h index 044b433..cfd89e4 100644 --- a/src/plugins/bearer/corewlan/qcorewlanengine.h +++ b/src/plugins/bearer/corewlan/qcorewlanengine.h @@ -46,6 +46,7 @@ #include #include +#include QT_BEGIN_NAMESPACE @@ -91,6 +92,11 @@ private: bool isKnownSsid(const QString &interfaceName, const QString &ssid); QList foundConfigurations; + SCDynamicStoreRef storeSession; + CFRunLoopSourceRef runloopSource; + + void startNetworkChangeLoop(); + }; QT_END_NAMESPACE diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm index a5384d1..4ab4d88 100644 --- a/src/plugins/bearer/corewlan/qcorewlanengine.mm +++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm @@ -105,12 +105,23 @@ static QString qGetInterfaceType(const QString &interfaceString) return networkInterfaces.value(interfaceString, QLatin1String("Unknown")); } +void networkChangeCallback(SCDynamicStoreRef/* store*/, CFArrayRef changedKeys, void *info) +{ + for ( long i = 0; i < CFArrayGetCount(changedKeys); i++) { + + CFStringRef changed = (CFStringRef)CFArrayGetValueAtIndex(changedKeys, i); + if( cfstringRefToQstring(changed).contains("/Network/Global/IPv4")) { + QCoreWlanEngine* wlanEngine = static_cast(info); + wlanEngine->requestUpdate(); + } + } + return; +} + QCoreWlanEngine::QCoreWlanEngine(QObject *parent) : QBearerEngineImpl(parent) { - connect(&pollTimer, SIGNAL(timeout()), this, SLOT(doRequestUpdate())); - pollTimer.setInterval(10000); - doRequestUpdate(); + startNetworkChangeLoop(); } QCoreWlanEngine::~QCoreWlanEngine() @@ -150,7 +161,6 @@ void QCoreWlanEngine::connectToId(const QString &id) NSEnumerator *enumerator = [remNets objectEnumerator]; CWWirelessProfile *wProfile; NSUInteger index=0; - CWNetwork *apNetwork; NSDictionary *parametersDict; NSArray* apArray; @@ -179,26 +189,24 @@ void QCoreWlanEngine::connectToId(const QString &id) if(!err) { for(uint row=0; row < [apArray count]; row++ ) { - apNetwork = [apArray objectAtIndex:row]; + CWNetwork *apNetwork = [apArray objectAtIndex:row]; if([[apNetwork ssid] compare:[wProfile ssid]] == NSOrderedSame) { bool result = [wifiInterface associateToNetwork: apNetwork parameters:[NSDictionary dictionaryWithDictionary:params] error:&err]; if(!result) { - qWarning() <<"ERROR"<< nsstringToQString([err localizedDescription ]); emit connectionError(id, ConnectError); } else { - [apNetwork release]; [autoreleasepool release]; return; } } + [apNetwork release]; } } } index++; } - [apNetwork release]; emit connectionError(id, InterfaceLookupError); #endif @@ -350,81 +358,83 @@ QStringList QCoreWlanEngine::scanForSsids(const QString &interfaceName) NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init]; CWInterface *currentInterface = [CWInterface interfaceWithName:qstringToNSString(interfaceName)]; - NSError *err = nil; - NSDictionary *parametersDict = nil; - NSArray* apArray = [currentInterface scanForNetworksWithParameters:parametersDict error:&err]; + if([currentInterface power]) { + NSError *err = nil; + NSDictionary *parametersDict = nil; + NSArray* apArray = [currentInterface scanForNetworksWithParameters:parametersDict error:&err]; - CWNetwork *apNetwork; - if (!err) { - for(uint row=0; row < [apArray count]; row++ ) { - NSAutoreleasePool *looppool = [[NSAutoreleasePool alloc] init]; + CWNetwork *apNetwork; + if (!err) { + for(uint row=0; row < [apArray count]; row++ ) { + NSAutoreleasePool *looppool = [[NSAutoreleasePool alloc] init]; - apNetwork = [apArray objectAtIndex:row]; + apNetwork = [apArray objectAtIndex:row]; - const QString networkSsid = nsstringToQString([apNetwork ssid]); + const QString networkSsid = nsstringToQString([apNetwork ssid]); - const QString id = QString::number(qHash(QLatin1String("corewlan:") + networkSsid)); - found.append(id); + const QString id = QString::number(qHash(QLatin1String("corewlan:") + networkSsid)); + found.append(id); - QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined; + QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined; - if ([currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) { - if (networkSsid == nsstringToQString([currentInterface ssid])) - state = QNetworkConfiguration::Active; - } else { - if (isKnownSsid(interfaceName, networkSsid)) - state = QNetworkConfiguration::Discovered; - else - state = QNetworkConfiguration::Defined; - } + if ([currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) { + if (networkSsid == nsstringToQString([currentInterface ssid])) + state = QNetworkConfiguration::Active; + } else { + if (isKnownSsid(interfaceName, networkSsid)) + state = QNetworkConfiguration::Discovered; + else + state = QNetworkConfiguration::Defined; + } - if (accessPointConfigurations.contains(id)) { - QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id); + if (accessPointConfigurations.contains(id)) { + QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id); - bool changed = false; + bool changed = false; - if (!ptr->isValid) { - ptr->isValid = true; - changed = true; - } + if (!ptr->isValid) { + ptr->isValid = true; + changed = true; + } - if (ptr->name != networkSsid) { - ptr->name = networkSsid; - changed = true; - } + if (ptr->name != networkSsid) { + ptr->name = networkSsid; + changed = true; + } - if (ptr->id != id) { - ptr->id = id; - changed = true; - } + if (ptr->id != id) { + ptr->id = id; + changed = true; + } - if (ptr->state != state) { - ptr->state = state; - changed = true; - } + if (ptr->state != state) { + ptr->state = state; + changed = true; + } - if (changed) - emit configurationChanged(ptr); - } else { - QNetworkConfigurationPrivatePointer ptr(new QNetworkConfigurationPrivate); + if (changed) + emit configurationChanged(ptr); + } else { + QNetworkConfigurationPrivatePointer ptr(new QNetworkConfigurationPrivate); - ptr->name = networkSsid; - ptr->isValid = true; - ptr->id = id; - ptr->state = state; - ptr->type = QNetworkConfiguration::InternetAccessPoint; - ptr->bearer = QLatin1String("WLAN"); + ptr->name = networkSsid; + ptr->isValid = true; + ptr->id = id; + ptr->state = state; + ptr->type = QNetworkConfiguration::InternetAccessPoint; + ptr->bearer = QLatin1String("WLAN"); - accessPointConfigurations.insert(id, ptr); - configurationInterface.insert(id, interfaceName); + accessPointConfigurations.insert(id, ptr); + configurationInterface.insert(id, interfaceName); - emit configurationAdded(ptr); + emit configurationAdded(ptr); + } + [looppool release]; } - [looppool release]; - } - } else { - qWarning() << "ERROR scanning for ssids" << nsstringToQString([err localizedDescription]) - <= 0) { - switch (request.ifr_hwaddr.sa_family) { - case ARPHRD_ETHER: - return QLatin1String("Ethernet"); - } - } - + int result = ioctl(sock, SIOCGIFHWADDR, &request); close(sock); + + if (result >= 0 && request.ifr_hwaddr.sa_family == ARPHRD_ETHER) + return QLatin1String("Ethernet"); #else Q_UNUSED(interface); #endif diff --git a/src/plugins/bearer/icd/monitor.cpp b/src/plugins/bearer/icd/monitor.cpp index 0ff45d2..5b0af7e 100644 --- a/src/plugins/bearer/icd/monitor.cpp +++ b/src/plugins/bearer/icd/monitor.cpp @@ -47,32 +47,12 @@ #include #include -#define IAP "/system/osso/connectivity/IAP" - -static int iap_prefix_len; - -/* Notify func that is called when IAP is added or deleted */ -void notify_iap(GConfClient *, guint, GConfEntry *entry, gpointer user_data) -{ - const char *key = gconf_entry_get_key(entry); - if (key && g_str_has_prefix(key, IAP)) { - IapMonitor *ptr = (IapMonitor *)user_data; - if (gconf_entry_get_value(entry)) { - ptr->iapAdded(key, entry); - } else { - ptr->iapDeleted(key, entry); - } - } -} - void IapMonitor::setup(QIcdEngine *d_ptr) { if (first_call) { - d = d_ptr; - iap_prefix_len = strlen(IAP); - iap = new Maemo::IAPMonitor(notify_iap, (gpointer)this); - first_call = false; + d = d_ptr; + first_call = false; } } @@ -80,37 +60,25 @@ void IapMonitor::setup(QIcdEngine *d_ptr) void IapMonitor::cleanup() { if (!first_call) { - delete iap; - timers.removeAll(); - first_call = true; + timers.removeAll(); + first_call = true; } } -void IapMonitor::iapAdded(const char *key, GConfEntry * /*entry*/) +void IapMonitor::iapAdded(const QString &iap_id) { - //qDebug("Notify called for added element: %s=%s", - // gconf_entry_get_key(entry), gconf_value_to_string(gconf_entry_get_value(entry))); - - /* We cannot know when the IAP is fully added to gconf, so a timer is + /* We cannot know when the IAP is fully added to db, so a timer is * installed instead. When the timer expires we hope that IAP is added ok. */ - QString iap_id = QString(key + iap_prefix_len + 1).section('/',0,0); - timers.add(iap_id, d); + QString id = iap_id; + timers.add(id, d); } -void IapMonitor::iapDeleted(const char *key, GConfEntry * /*entry*/) +void IapMonitor::iapRemoved(const QString &iap_id) { - //qDebug("Notify called for deleted element: %s", gconf_entry_get_key(entry)); - - /* We are only interested in IAP deletions so we skip the config entries - */ - if (strstr(key + iap_prefix_len + 1, "/")) { - //qDebug("Deleting IAP config %s", key+iap_prefix_len); - return; - } - - QString iap_id = key + iap_prefix_len + 1; - d->deleteConfiguration(iap_id); + QString id = iap_id; + d->deleteConfiguration(id); } + diff --git a/src/plugins/bearer/icd/monitor.h b/src/plugins/bearer/icd/monitor.h index 82b0f36..10ffb30 100644 --- a/src/plugins/bearer/icd/monitor.h +++ b/src/plugins/bearer/icd/monitor.h @@ -53,7 +53,7 @@ class QIcdEngine; /* The IapAddTimer is a helper class that makes sure we update - * the configuration only after all gconf additions to certain + * the configuration only after all db additions to certain * iap are finished (after a certain timeout) */ class _IapAddTimer : public QObject @@ -64,10 +64,10 @@ public: _IapAddTimer() {} ~_IapAddTimer() { - if (timer.isActive()) { - QObject::disconnect(&timer, SIGNAL(timeout()), this, SLOT(timeout())); - timer.stop(); - } + if (timer.isActive()) { + QObject::disconnect(&timer, SIGNAL(timeout()), this, SLOT(timeout())); + timer.stop(); + } } void add(QString& iap_id, QIcdEngine *d); @@ -92,23 +92,21 @@ public: void removeAll(); }; -class IapMonitor +class IapMonitor : public Maemo::IAPMonitor { public: IapMonitor() : first_call(true) { } - friend void notify_iap(GConfClient *, guint, - GConfEntry *entry, gpointer user_data); void setup(QIcdEngine *d); void cleanup(); +protected: + void iapAdded(const QString &iapId); + void iapRemoved(const QString &iapId); + private: bool first_call; - void iapAdded(const char *key, GConfEntry *entry); - void iapDeleted(const char *key, GConfEntry *entry); - - Maemo::IAPMonitor *iap; QIcdEngine *d; IapAddTimer timers; }; diff --git a/src/plugins/bearer/icd/qicdengine.cpp b/src/plugins/bearer/icd/qicdengine.cpp index f10042a..206a6fd 100644 --- a/src/plugins/bearer/icd/qicdengine.cpp +++ b/src/plugins/bearer/icd/qicdengine.cpp @@ -189,14 +189,9 @@ void QIcdEngine::doRequestUpdate() QList all_iaps; Maemo::IAPConf::getAll(all_iaps); - foreach (QString escaped_iap_id, all_iaps) { + foreach (QString iap_id, all_iaps) { QByteArray ssid; - /* The key that is returned by getAll() needs to be unescaped */ - gchar *unescaped_id = gconf_unescape_key(escaped_iap_id.toUtf8().data(), -1); - QString iap_id = QString((char *)unescaped_id); - g_free(unescaped_id); - previous.removeAll(iap_id); Maemo::IAPConf saved_ap(iap_id); @@ -231,11 +226,12 @@ void QIcdEngine::doRequestUpdate() IcdNetworkConfigurationPrivate *cpPriv = new IcdNetworkConfigurationPrivate; cpPriv->name = saved_ap.value("name").toString(); - if (cpPriv->name.isEmpty()) - if (!ssid.isEmpty() && ssid.size() > 0) - cpPriv->name = ssid.data(); - else - cpPriv->name = iap_id; + if (cpPriv->name.isEmpty()) { + if (!ssid.isEmpty() && ssid.size() > 0) + cpPriv->name = ssid.data(); + else + cpPriv->name = iap_id; + } cpPriv->isValid = true; cpPriv->id = iap_id; cpPriv->network_id = ssid; @@ -379,9 +375,9 @@ void QIcdEngine::deleteConfiguration(const QString &iap_id) { QMutexLocker locker(&mutex); - /* Called when IAPs are deleted in gconf, in this case we do not scan - * or read all the IAPs from gconf because it might take too much power - * (multiple applications would need to scan and read all IAPs from gconf) + /* Called when IAPs are deleted in db, in this case we do not scan + * or read all the IAPs from db because it might take too much power + * (multiple applications would need to scan and read all IAPs from db) */ if (accessPointConfigurations.contains(iap_id)) { QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(iap_id); diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp index a9e93e0..2acaa47 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.cpp +++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp @@ -49,6 +49,7 @@ #include #include +#include #include #include @@ -299,6 +300,8 @@ void IcdListener::cleanupSession(QNetworkSessionPrivateImpl *ptr) void QNetworkSessionPrivateImpl::cleanupSession(void) { icdListener()->cleanupSession(this); + + QObject::disconnect(q, SIGNAL(stateChanged(QNetworkSession::State)), this, SLOT(updateProxies(QNetworkSession::State))); } @@ -451,6 +454,8 @@ void QNetworkSessionPrivateImpl::syncStateWithInterface() connect(&manager, SIGNAL(configurationChanged(QNetworkConfiguration)), this, SLOT(configurationChanged(QNetworkConfiguration))); + QObject::connect(q, SIGNAL(stateChanged(QNetworkSession::State)), this, SLOT(updateProxies(QNetworkSession::State))); + state = QNetworkSession::Invalid; lastError = QNetworkSession::UnknownSessionError; @@ -867,7 +872,6 @@ void QNetworkSessionPrivateImpl::do_open() qDebug() << "connect to"<< iap << "failed, result is empty"; #endif updateState(QNetworkSession::Disconnected); - emit quitPendingWaitsForOpened(); emit QNetworkSessionPrivate::error(QNetworkSession::InvalidConfigurationError); if (publicConfig.type() == QNetworkConfiguration::UserChoice) cleanupAnyConfiguration(); @@ -882,7 +886,6 @@ void QNetworkSessionPrivateImpl::do_open() if ((publicConfig.type() != QNetworkConfiguration::UserChoice) && (connected_iap != config.identifier())) { updateState(QNetworkSession::Disconnected); - emit quitPendingWaitsForOpened(); emit QNetworkSessionPrivate::error(QNetworkSession::InvalidConfigurationError); return; } @@ -946,7 +949,6 @@ void QNetworkSessionPrivateImpl::do_open() updateState(QNetworkSession::Disconnected); if (publicConfig.type() == QNetworkConfiguration::UserChoice) cleanupAnyConfiguration(); - emit quitPendingWaitsForOpened(); emit QNetworkSessionPrivate::error(QNetworkSession::UnknownSessionError); } } @@ -1099,6 +1101,30 @@ QNetworkSession::SessionError QNetworkSessionPrivateImpl::error() const return QNetworkSession::UnknownSessionError; } +void QNetworkSessionPrivateImpl::updateProxies(QNetworkSession::State newState) +{ + if ((newState == QNetworkSession::Connected) && + (newState != currentState)) + updateProxyInformation(); + else if ((newState == QNetworkSession::Disconnected) && + (currentState == QNetworkSession::Closing)) + clearProxyInformation(); + + currentState = newState; +} + + +void QNetworkSessionPrivateImpl::updateProxyInformation() +{ + Maemo::ProxyConf::update(); +} + + +void QNetworkSessionPrivateImpl::clearProxyInformation() +{ + Maemo::ProxyConf::clear(); +} + #include "qnetworksession_impl.moc" QT_END_NAMESPACE diff --git a/src/plugins/bearer/icd/qnetworksession_impl.h b/src/plugins/bearer/icd/qnetworksession_impl.h index b7461dc..587e6dc 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.h +++ b/src/plugins/bearer/icd/qnetworksession_impl.h @@ -75,7 +75,7 @@ class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate public: QNetworkSessionPrivateImpl(QIcdEngine *engine) - : engine(engine), connectFlags(ICD_CONNECTION_FLAG_USER_EVENT) + : engine(engine), connectFlags(ICD_CONNECTION_FLAG_USER_EVENT), currentState(QNetworkSession::Invalid) { } @@ -118,6 +118,7 @@ private Q_SLOTS: void do_open(); void networkConfigurationsChanged(); void configurationChanged(const QNetworkConfiguration &config); + void updateProxies(QNetworkSession::State newState); private: QNetworkConfigurationManager manager; @@ -139,6 +140,10 @@ private: void updateIdentifier(QString &newId); quint64 getStatistics(bool sent) const; void cleanupSession(void); + + void updateProxyInformation(); + void clearProxyInformation(); + QNetworkSession::State currentState; }; QT_END_NAMESPACE diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp index 5c6efe3..0fa8f3c 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp @@ -49,7 +49,6 @@ #include -#include #include #include #include @@ -147,7 +146,7 @@ QString QNetworkManagerEngine::getInterfaceFromId(const QString &id) continue; QNetworkManagerInterfaceDevice device(devices.at(0).path()); - return device.interface().name(); + return device.networkInterface().name(); } } diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp index 5dc0ea4..c780fbc 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp @@ -41,26 +41,22 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#include "qnmdbushelper.h" #include "qnetworkmanagerservice.h" +#include "qnmdbushelper.h" -//Q_DECLARE_METATYPE(QList) QT_BEGIN_NAMESPACE static QDBusConnection dbusConnection = QDBusConnection::systemBus(); -//static QDBusInterface iface(NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, dbusConnection); class QNetworkManagerInterfacePrivate { @@ -70,19 +66,19 @@ public: }; QNetworkManagerInterface::QNetworkManagerInterface(QObject *parent) - : QObject(parent), nmDBusHelper(0) + : QObject(parent) { d = new QNetworkManagerInterfacePrivate(); - d->connectionInterface = new QDBusInterface(NM_DBUS_SERVICE, - NM_DBUS_PATH, - NM_DBUS_INTERFACE, + d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE), + QLatin1String(NM_DBUS_PATH), + QLatin1String(NM_DBUS_INTERFACE), dbusConnection); if (!d->connectionInterface->isValid()) { d->valid = false; return; } d->valid = true; - nmDBusHelper = new QNmDBusHelper; + nmDBusHelper = new QNmDBusHelper(this); connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap)), this,SIGNAL(propertiesChanged( const QString &, QMap))); connect(nmDBusHelper,SIGNAL(pathForStateChanged(const QString &, quint32)), @@ -92,8 +88,6 @@ QNetworkManagerInterface::QNetworkManagerInterface(QObject *parent) QNetworkManagerInterface::~QNetworkManagerInterface() { - if (nmDBusHelper) - delete nmDBusHelper; delete d->connectionInterface; delete d; } @@ -108,24 +102,24 @@ bool QNetworkManagerInterface::setConnections() if(!isValid() ) return false; bool allOk = false; - if (!dbusConnection.connect(NM_DBUS_SERVICE, - NM_DBUS_PATH, - NM_DBUS_INTERFACE, - "PropertiesChanged", + if (!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), + QLatin1String(NM_DBUS_PATH), + QLatin1String(NM_DBUS_INTERFACE), + QLatin1String("PropertiesChanged"), nmDBusHelper,SLOT(slotPropertiesChanged( QMap)))) { allOk = true; } - if (!dbusConnection.connect(NM_DBUS_SERVICE, - NM_DBUS_PATH, - NM_DBUS_INTERFACE, - "DeviceAdded", + if (!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), + QLatin1String(NM_DBUS_PATH), + QLatin1String(NM_DBUS_INTERFACE), + QLatin1String("DeviceAdded"), this,SIGNAL(deviceAdded(QDBusObjectPath)))) { allOk = true; } - if (!dbusConnection.connect(NM_DBUS_SERVICE, - NM_DBUS_PATH, - NM_DBUS_INTERFACE, - "DeviceRemoved", + if (!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), + QLatin1String(NM_DBUS_PATH), + QLatin1String(NM_DBUS_INTERFACE), + QLatin1String("DeviceRemoved"), this,SIGNAL(deviceRemoved(QDBusObjectPath)))) { allOk = true; } @@ -140,7 +134,7 @@ QDBusInterface *QNetworkManagerInterface::connectionInterface() const QList QNetworkManagerInterface::getDevices() const { - QDBusReply > reply = d->connectionInterface->call("GetDevices"); + QDBusReply > reply = d->connectionInterface->call(QLatin1String("GetDevices")); return reply.value(); } @@ -149,7 +143,7 @@ void QNetworkManagerInterface::activateConnection( const QString &serviceName, QDBusObjectPath devicePath, QDBusObjectPath specificObject) { - QDBusPendingCall pendingCall = d->connectionInterface->asyncCall("ActivateConnection", + QDBusPendingCall pendingCall = d->connectionInterface->asyncCall(QLatin1String("ActivateConnection"), QVariant(serviceName), QVariant::fromValue(connectionPath), QVariant::fromValue(devicePath), @@ -162,7 +156,7 @@ void QNetworkManagerInterface::activateConnection( const QString &serviceName, void QNetworkManagerInterface::deactivateConnection(QDBusObjectPath connectionPath) const { - d->connectionInterface->call("DeactivateConnection", QVariant::fromValue(connectionPath)); + d->connectionInterface->call(QLatin1String("DeactivateConnection"), QVariant::fromValue(connectionPath)); } bool QNetworkManagerInterface::wirelessEnabled() const @@ -186,7 +180,6 @@ quint32 QNetworkManagerInterface::state() return d->connectionInterface->property("State").toUInt(); } -///////////// class QNetworkManagerInterfaceAccessPointPrivate { public: @@ -200,9 +193,9 @@ QNetworkManagerInterfaceAccessPoint::QNetworkManagerInterfaceAccessPoint(const Q { d = new QNetworkManagerInterfaceAccessPointPrivate(); d->path = dbusPathName; - d->connectionInterface = new QDBusInterface(NM_DBUS_SERVICE, + d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE), d->path, - NM_DBUS_INTERFACE_ACCESS_POINT, + QLatin1String(NM_DBUS_INTERFACE_ACCESS_POINT), dbusConnection); if (!d->connectionInterface->isValid()) { d->valid = false; @@ -215,8 +208,6 @@ QNetworkManagerInterfaceAccessPoint::QNetworkManagerInterfaceAccessPoint(const Q QNetworkManagerInterfaceAccessPoint::~QNetworkManagerInterfaceAccessPoint() { - if (nmDBusHelper) - delete nmDBusHelper; delete d->connectionInterface; delete d; } @@ -232,17 +223,15 @@ bool QNetworkManagerInterfaceAccessPoint::setConnections() return false; bool allOk = false; - if (nmDBusHelper) - delete nmDBusHelper; - nmDBusHelper = 0; - nmDBusHelper = new QNmDBusHelper; + delete nmDBusHelper; + nmDBusHelper = new QNmDBusHelper(this); connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap)), this,SIGNAL(propertiesChanged( const QString &, QMap))); - if(dbusConnection.connect(NM_DBUS_SERVICE, + if(dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), d->path, - NM_DBUS_INTERFACE_ACCESS_POINT, - "PropertiesChanged", + QLatin1String(NM_DBUS_INTERFACE_ACCESS_POINT), + QLatin1String("PropertiesChanged"), nmDBusHelper,SLOT(slotPropertiesChanged( QMap))) ) { allOk = true; @@ -300,7 +289,6 @@ quint32 QNetworkManagerInterfaceAccessPoint::strength() const return d->connectionInterface->property("Strength").toUInt(); } -///////////// class QNetworkManagerInterfaceDevicePrivate { public: @@ -314,9 +302,9 @@ QNetworkManagerInterfaceDevice::QNetworkManagerInterfaceDevice(const QString &de { d = new QNetworkManagerInterfaceDevicePrivate(); d->path = deviceObjectPath; - d->connectionInterface = new QDBusInterface(NM_DBUS_SERVICE, + d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE), d->path, - NM_DBUS_INTERFACE_DEVICE, + QLatin1String(NM_DBUS_INTERFACE_DEVICE), dbusConnection); if (!d->connectionInterface->isValid()) { d->valid = false; @@ -328,8 +316,6 @@ QNetworkManagerInterfaceDevice::QNetworkManagerInterfaceDevice(const QString &de QNetworkManagerInterfaceDevice::~QNetworkManagerInterfaceDevice() { - if (nmDBusHelper) - delete nmDBusHelper; delete d->connectionInterface; delete d; } @@ -345,16 +331,14 @@ bool QNetworkManagerInterfaceDevice::setConnections() return false; bool allOk = false; - if (nmDBusHelper) - delete nmDBusHelper; - nmDBusHelper = 0; - nmDBusHelper = new QNmDBusHelper; + delete nmDBusHelper; + nmDBusHelper = new QNmDBusHelper(this); connect(nmDBusHelper,SIGNAL(pathForStateChanged(const QString &, quint32)), this, SIGNAL(stateChanged(const QString&, quint32))); - if(dbusConnection.connect(NM_DBUS_SERVICE, + if(dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), d->path, - NM_DBUS_INTERFACE_DEVICE, - "StateChanged", + QLatin1String(NM_DBUS_INTERFACE_DEVICE), + QLatin1String("StateChanged"), nmDBusHelper,SLOT(deviceStateChanged(quint32)))) { allOk = true; } @@ -371,7 +355,7 @@ QString QNetworkManagerInterfaceDevice::udi() const return d->connectionInterface->property("Udi").toString(); } -QNetworkInterface QNetworkManagerInterfaceDevice::interface() const +QNetworkInterface QNetworkManagerInterfaceDevice::networkInterface() const { return QNetworkInterface::interfaceFromName(d->connectionInterface->property("Interface").toString()); } @@ -397,7 +381,6 @@ QDBusObjectPath QNetworkManagerInterfaceDevice::ip4config() const return prop.value(); } -///////////// class QNetworkManagerInterfaceDeviceWiredPrivate { public: @@ -411,9 +394,9 @@ QNetworkManagerInterfaceDeviceWired::QNetworkManagerInterfaceDeviceWired(const Q { d = new QNetworkManagerInterfaceDeviceWiredPrivate(); d->path = ifaceDevicePath; - d->connectionInterface = new QDBusInterface(NM_DBUS_SERVICE, + d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE), d->path, - NM_DBUS_INTERFACE_DEVICE_WIRED, + QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRED), dbusConnection, parent); if (!d->connectionInterface->isValid()) { d->valid = false; @@ -425,8 +408,6 @@ QNetworkManagerInterfaceDeviceWired::QNetworkManagerInterfaceDeviceWired(const Q QNetworkManagerInterfaceDeviceWired::~QNetworkManagerInterfaceDeviceWired() { - if (nmDBusHelper) - delete nmDBusHelper; delete d->connectionInterface; delete d; } @@ -444,16 +425,14 @@ bool QNetworkManagerInterfaceDeviceWired::setConnections() bool allOk = false; - if (nmDBusHelper) - delete nmDBusHelper; - nmDBusHelper = 0; - nmDBusHelper = new QNmDBusHelper; + delete nmDBusHelper; + nmDBusHelper = new QNmDBusHelper(this); connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap)), this,SIGNAL(propertiesChanged( const QString &, QMap))); - if(dbusConnection.connect(NM_DBUS_SERVICE, + if(dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), d->path, - NM_DBUS_INTERFACE_DEVICE_WIRED, - "PropertiesChanged", + QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRED), + QLatin1String("PropertiesChanged"), nmDBusHelper,SLOT(slotPropertiesChanged( QMap))) ) { allOk = true; } @@ -480,7 +459,6 @@ bool QNetworkManagerInterfaceDeviceWired::carrier() const return d->connectionInterface->property("Carrier").toBool(); } -///////////// class QNetworkManagerInterfaceDeviceWirelessPrivate { public: @@ -494,9 +472,9 @@ QNetworkManagerInterfaceDeviceWireless::QNetworkManagerInterfaceDeviceWireless(c { d = new QNetworkManagerInterfaceDeviceWirelessPrivate(); d->path = ifaceDevicePath; - d->connectionInterface = new QDBusInterface(NM_DBUS_SERVICE, + d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE), d->path, - NM_DBUS_INTERFACE_DEVICE_WIRELESS, + QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS), dbusConnection, parent); if (!d->connectionInterface->isValid()) { d->valid = false; @@ -508,8 +486,6 @@ QNetworkManagerInterfaceDeviceWireless::QNetworkManagerInterfaceDeviceWireless(c QNetworkManagerInterfaceDeviceWireless::~QNetworkManagerInterfaceDeviceWireless() { - if (nmDBusHelper) - delete nmDBusHelper; delete d->connectionInterface; delete d; } @@ -525,10 +501,8 @@ bool QNetworkManagerInterfaceDeviceWireless::setConnections() return false; bool allOk = false; - if (nmDBusHelper) - delete nmDBusHelper; - nmDBusHelper = 0; - nmDBusHelper = new QNmDBusHelper; + delete nmDBusHelper; + nmDBusHelper = new QNmDBusHelper(this); connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap)), this,SIGNAL(propertiesChanged( const QString &, QMap))); @@ -538,28 +512,28 @@ bool QNetworkManagerInterfaceDeviceWireless::setConnections() connect(nmDBusHelper, SIGNAL(pathForAccessPointRemoved(const QString &,QDBusObjectPath)), this,SIGNAL(accessPointRemoved(const QString &,QDBusObjectPath))); - if(!dbusConnection.connect(NM_DBUS_SERVICE, + if(!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), d->path, - NM_DBUS_INTERFACE_DEVICE_WIRELESS, - "AccessPointAdded", + QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS), + QLatin1String("AccessPointAdded"), nmDBusHelper, SLOT(slotAccessPointAdded( QDBusObjectPath )))) { allOk = true; } - if(!dbusConnection.connect(NM_DBUS_SERVICE, + if(!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), d->path, - NM_DBUS_INTERFACE_DEVICE_WIRELESS, - "AccessPointRemoved", + QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS), + QLatin1String("AccessPointRemoved"), nmDBusHelper, SLOT(slotAccessPointRemoved( QDBusObjectPath )))) { allOk = true; } - if(!dbusConnection.connect(NM_DBUS_SERVICE, + if(!dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), d->path, - NM_DBUS_INTERFACE_DEVICE_WIRELESS, - "PropertiesChanged", + QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS), + QLatin1String("PropertiesChanged"), nmDBusHelper,SLOT(slotPropertiesChanged( QMap)))) { allOk = true; } @@ -574,7 +548,7 @@ QDBusInterface *QNetworkManagerInterfaceDeviceWireless::connectionInterface() co QList QNetworkManagerInterfaceDeviceWireless::getAccessPoints() { - QDBusReply > reply = d->connectionInterface->call("GetAccessPoints"); + QDBusReply > reply = d->connectionInterface->call(QLatin1String("GetAccessPoints")); return reply.value(); } @@ -603,7 +577,6 @@ quint32 QNetworkManagerInterfaceDeviceWireless::wirelessCapabilities() const return d->connectionInterface->property("WirelelessCapabilities").toUInt(); } -///////////// class QNetworkManagerSettingsPrivate { public: @@ -618,8 +591,8 @@ QNetworkManagerSettings::QNetworkManagerSettings(const QString &settingsService, d = new QNetworkManagerSettingsPrivate(); d->path = settingsService; d->connectionInterface = new QDBusInterface(settingsService, - NM_DBUS_PATH_SETTINGS, - NM_DBUS_IFACE_SETTINGS, + QLatin1String(NM_DBUS_PATH_SETTINGS), + QLatin1String(NM_DBUS_IFACE_SETTINGS), dbusConnection); if (!d->connectionInterface->isValid()) { d->valid = false; @@ -644,8 +617,8 @@ bool QNetworkManagerSettings::setConnections() { bool allOk = false; - if (!dbusConnection.connect(d->path, NM_DBUS_PATH_SETTINGS, - NM_DBUS_IFACE_SETTINGS, "NewConnection", + if (!dbusConnection.connect(d->path, QLatin1String(NM_DBUS_PATH_SETTINGS), + QLatin1String(NM_DBUS_IFACE_SETTINGS), QLatin1String("NewConnection"), this, SIGNAL(newConnection(QDBusObjectPath)))) { allOk = true; } @@ -655,7 +628,7 @@ bool QNetworkManagerSettings::setConnections() QList QNetworkManagerSettings::listConnections() { - QDBusReply > reply = d->connectionInterface->call("ListConnections"); + QDBusReply > reply = d->connectionInterface->call(QLatin1String("ListConnections")); return reply.value(); } @@ -665,7 +638,6 @@ QDBusInterface *QNetworkManagerSettings::connectionInterface() const } -///////////// class QNetworkManagerSettingsConnectionPrivate { public: @@ -685,7 +657,7 @@ QNetworkManagerSettingsConnection::QNetworkManagerSettingsConnection(const QStri d->service = settingsService; d->connectionInterface = new QDBusInterface(settingsService, d->path, - NM_DBUS_IFACE_SETTINGS_CONNECTION, + QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), dbusConnection, parent); if (!d->connectionInterface->isValid()) { //qWarning() << "Could not find NetworkManagerSettingsConnection"; @@ -693,14 +665,12 @@ QNetworkManagerSettingsConnection::QNetworkManagerSettingsConnection(const QStri return; } d->valid = true; - QDBusReply< QNmSettingsMap > rep = d->connectionInterface->call("GetSettings"); + QDBusReply< QNmSettingsMap > rep = d->connectionInterface->call(QLatin1String("GetSettings")); d->settingsMap = rep.value(); } QNetworkManagerSettingsConnection::~QNetworkManagerSettingsConnection() { - if (nmDBusHelper) - delete nmDBusHelper; delete d->connectionInterface; delete d; } @@ -717,32 +687,26 @@ bool QNetworkManagerSettingsConnection::setConnections() bool allOk = false; if(!dbusConnection.connect(d->service, d->path, - NM_DBUS_IFACE_SETTINGS_CONNECTION, "Updated", + QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("Updated"), this, SIGNAL(updated(QNmSettingsMap)))) { allOk = true; } else { QDBusError error = dbusConnection.lastError(); } - if (nmDBusHelper) - delete nmDBusHelper; - nmDBusHelper = 0; - nmDBusHelper = new QNmDBusHelper; + delete nmDBusHelper; + nmDBusHelper = new QNmDBusHelper(this); connect(nmDBusHelper, SIGNAL(pathForSettingsRemoved(const QString &)), this,SIGNAL(removed( const QString &))); if (!dbusConnection.connect(d->service, d->path, - NM_DBUS_IFACE_SETTINGS_CONNECTION, "Removed", + QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("Removed"), nmDBusHelper, SIGNAL(slotSettingsRemoved()))) { allOk = true; } return allOk; } -//QNetworkManagerSettingsConnection::update(QNmSettingsMap map) -//{ -// d->connectionInterface->call("Update", QVariant::fromValue(map)); -//} QDBusInterface *QNetworkManagerSettingsConnection::connectionInterface() const { @@ -751,23 +715,23 @@ QDBusInterface *QNetworkManagerSettingsConnection::connectionInterface() const QNmSettingsMap QNetworkManagerSettingsConnection::getSettings() { - QDBusReply< QNmSettingsMap > rep = d->connectionInterface->call("GetSettings"); + QDBusReply< QNmSettingsMap > rep = d->connectionInterface->call(QLatin1String("GetSettings")); d->settingsMap = rep.value(); return d->settingsMap; } NMDeviceType QNetworkManagerSettingsConnection::getType() { - QNmSettingsMap::const_iterator i = d->settingsMap.find("connection"); - while (i != d->settingsMap.end() && i.key() == "connection") { + QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection")); + while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) { QMap innerMap = i.value(); - QMap::const_iterator ii = innerMap.find("type"); - while (ii != innerMap.end() && ii.key() == "type") { + QMap::const_iterator ii = innerMap.find(QLatin1String("type")); + while (ii != innerMap.end() && ii.key() == QLatin1String("type")) { QString devType = ii.value().toString(); - if (devType == "802-3-ethernet") { + if (devType == QLatin1String("802-3-ethernet")) { return DEVICE_TYPE_802_3_ETHERNET; } - if (devType == "802-11-wireless") { + if (devType == QLatin1String("802-11-wireless")) { return DEVICE_TYPE_802_11_WIRELESS; } ii++; @@ -779,11 +743,11 @@ NMDeviceType QNetworkManagerSettingsConnection::getType() bool QNetworkManagerSettingsConnection::isAutoConnect() { - QNmSettingsMap::const_iterator i = d->settingsMap.find("connection"); - while (i != d->settingsMap.end() && i.key() == "connection") { + QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection")); + while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) { QMap innerMap = i.value(); - QMap::const_iterator ii = innerMap.find("autoconnect"); - while (ii != innerMap.end() && ii.key() == "autoconnect") { + QMap::const_iterator ii = innerMap.find(QLatin1String("autoconnect")); + while (ii != innerMap.end() && ii.key() == QLatin1String("autoconnect")) { return ii.value().toBool(); ii++; } @@ -794,11 +758,11 @@ bool QNetworkManagerSettingsConnection::isAutoConnect() quint64 QNetworkManagerSettingsConnection::getTimestamp() { - QNmSettingsMap::const_iterator i = d->settingsMap.find("connection"); - while (i != d->settingsMap.end() && i.key() == "connection") { + QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection")); + while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) { QMap innerMap = i.value(); - QMap::const_iterator ii = innerMap.find("timestamp"); - while (ii != innerMap.end() && ii.key() == "timestamp") { + QMap::const_iterator ii = innerMap.find(QLatin1String("timestamp")); + while (ii != innerMap.end() && ii.key() == QLatin1String("timestamp")) { return ii.value().toUInt(); ii++; } @@ -809,11 +773,11 @@ quint64 QNetworkManagerSettingsConnection::getTimestamp() QString QNetworkManagerSettingsConnection::getId() { - QNmSettingsMap::const_iterator i = d->settingsMap.find("connection"); - while (i != d->settingsMap.end() && i.key() == "connection") { + QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection")); + while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) { QMap innerMap = i.value(); - QMap::const_iterator ii = innerMap.find("id"); - while (ii != innerMap.end() && ii.key() == "id") { + QMap::const_iterator ii = innerMap.find(QLatin1String("id")); + while (ii != innerMap.end() && ii.key() == QLatin1String("id")) { return ii.value().toString(); ii++; } @@ -824,11 +788,11 @@ QString QNetworkManagerSettingsConnection::getId() QString QNetworkManagerSettingsConnection::getUuid() { - QNmSettingsMap::const_iterator i = d->settingsMap.find("connection"); - while (i != d->settingsMap.end() && i.key() == "connection") { + QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("connection")); + while (i != d->settingsMap.end() && i.key() == QLatin1String("connection")) { QMap innerMap = i.value(); - QMap::const_iterator ii = innerMap.find("uuid"); - while (ii != innerMap.end() && ii.key() == "uuid") { + QMap::const_iterator ii = innerMap.find(QLatin1String("uuid")); + while (ii != innerMap.end() && ii.key() == QLatin1String("uuid")) { return ii.value().toString(); ii++; } @@ -840,11 +804,11 @@ QString QNetworkManagerSettingsConnection::getUuid() QString QNetworkManagerSettingsConnection::getSsid() { - QNmSettingsMap::const_iterator i = d->settingsMap.find("802-11-wireless"); - while (i != d->settingsMap.end() && i.key() == "802-11-wireless") { + QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("802-11-wireless")); + while (i != d->settingsMap.end() && i.key() == QLatin1String("802-11-wireless")) { QMap innerMap = i.value(); - QMap::const_iterator ii = innerMap.find("ssid"); - while (ii != innerMap.end() && ii.key() == "ssid") { + QMap::const_iterator ii = innerMap.find(QLatin1String("ssid")); + while (ii != innerMap.end() && ii.key() == QLatin1String("ssid")) { return ii.value().toString(); ii++; } @@ -856,11 +820,11 @@ QString QNetworkManagerSettingsConnection::getSsid() QString QNetworkManagerSettingsConnection::getMacAddress() { if(getType() == DEVICE_TYPE_802_3_ETHERNET) { - QNmSettingsMap::const_iterator i = d->settingsMap.find("802-3-ethernet"); - while (i != d->settingsMap.end() && i.key() == "802-3-ethernet") { + QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("802-3-ethernet")); + while (i != d->settingsMap.end() && i.key() == QLatin1String("802-3-ethernet")) { QMap innerMap = i.value(); - QMap::const_iterator ii = innerMap.find("mac-address"); - while (ii != innerMap.end() && ii.key() == "mac-address") { + QMap::const_iterator ii = innerMap.find(QLatin1String("mac-address")); + while (ii != innerMap.end() && ii.key() == QLatin1String("mac-address")) { return ii.value().toString(); ii++; } @@ -869,11 +833,11 @@ QString QNetworkManagerSettingsConnection::getMacAddress() } else if(getType() == DEVICE_TYPE_802_11_WIRELESS) { - QNmSettingsMap::const_iterator i = d->settingsMap.find("802-11-wireless"); - while (i != d->settingsMap.end() && i.key() == "802-11-wireless") { + QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("802-11-wireless")); + while (i != d->settingsMap.end() && i.key() == QLatin1String("802-11-wireless")) { QMap innerMap = i.value(); - QMap::const_iterator ii = innerMap.find("mac-address"); - while (ii != innerMap.end() && ii.key() == "mac-address") { + QMap::const_iterator ii = innerMap.find(QLatin1String("mac-address")); + while (ii != innerMap.end() && ii.key() == QLatin1String("mac-address")) { return ii.value().toString(); ii++; } @@ -886,11 +850,11 @@ QString QNetworkManagerSettingsConnection::getMacAddress() QStringList QNetworkManagerSettingsConnection::getSeenBssids() { if(getType() == DEVICE_TYPE_802_11_WIRELESS) { - QNmSettingsMap::const_iterator i = d->settingsMap.find("802-11-wireless"); - while (i != d->settingsMap.end() && i.key() == "802-11-wireless") { + QNmSettingsMap::const_iterator i = d->settingsMap.find(QLatin1String("802-11-wireless")); + while (i != d->settingsMap.end() && i.key() == QLatin1String("802-11-wireless")) { QMap innerMap = i.value(); - QMap::const_iterator ii = innerMap.find("seen-bssids"); - while (ii != innerMap.end() && ii.key() == "seen-bssids") { + QMap::const_iterator ii = innerMap.find(QLatin1String("seen-bssids")); + while (ii != innerMap.end() && ii.key() == QLatin1String("seen-bssids")) { return ii.value().toStringList(); ii++; } @@ -900,7 +864,6 @@ QStringList QNetworkManagerSettingsConnection::getSeenBssids() return QStringList(); } -///////////// class QNetworkManagerConnectionActivePrivate { public: @@ -914,9 +877,9 @@ QNetworkManagerConnectionActive::QNetworkManagerConnectionActive( const QString { d = new QNetworkManagerConnectionActivePrivate(); d->path = activeConnectionObjectPath; - d->connectionInterface = new QDBusInterface(NM_DBUS_SERVICE, + d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE), d->path, - NM_DBUS_INTERFACE_ACTIVE_CONNECTION, + QLatin1String(NM_DBUS_INTERFACE_ACTIVE_CONNECTION), dbusConnection, parent); if (!d->connectionInterface->isValid()) { d->valid = false; @@ -928,8 +891,6 @@ QNetworkManagerConnectionActive::QNetworkManagerConnectionActive( const QString QNetworkManagerConnectionActive::~QNetworkManagerConnectionActive() { - if (nmDBusHelper) - delete nmDBusHelper; delete d->connectionInterface; delete d; } @@ -945,16 +906,14 @@ bool QNetworkManagerConnectionActive::setConnections() return false; bool allOk = false; - if (nmDBusHelper) - delete nmDBusHelper; - nmDBusHelper = 0; - nmDBusHelper = new QNmDBusHelper; + delete nmDBusHelper; + nmDBusHelper = new QNmDBusHelper(this); connect(nmDBusHelper, SIGNAL(pathForPropertiesChanged(const QString &,QMap)), this,SIGNAL(propertiesChanged( const QString &, QMap))); - if(dbusConnection.connect(NM_DBUS_SERVICE, + if(dbusConnection.connect(QLatin1String(NM_DBUS_SERVICE), d->path, - NM_DBUS_INTERFACE_ACTIVE_CONNECTION, - "PropertiesChanged", + QLatin1String(NM_DBUS_INTERFACE_ACTIVE_CONNECTION), + QLatin1String("PropertiesChanged"), nmDBusHelper,SLOT(slotPropertiesChanged( QMap))) ) { allOk = true; } @@ -1000,8 +959,6 @@ bool QNetworkManagerConnectionActive::defaultRoute() const return d->connectionInterface->property("Default").toBool(); } - -//// class QNetworkManagerIp4ConfigPrivate { public: @@ -1015,9 +972,9 @@ QNetworkManagerIp4Config::QNetworkManagerIp4Config( const QString &deviceObjectP { d = new QNetworkManagerIp4ConfigPrivate(); d->path = deviceObjectPath; - d->connectionInterface = new QDBusInterface(NM_DBUS_SERVICE, + d->connectionInterface = new QDBusInterface(QLatin1String(NM_DBUS_SERVICE), d->path, - NM_DBUS_INTERFACE_IP4_CONFIG, + QLatin1String(NM_DBUS_INTERFACE_IP4_CONFIG), dbusConnection, parent); if (!d->connectionInterface->isValid()) { d->valid = false; diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h index 81903ec..048f628 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h @@ -53,26 +53,87 @@ // We mean it. // -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include +#include +#include +#include +#include #include "qnmdbushelper.h" +#ifndef NETWORK_MANAGER_H +typedef enum NMDeviceType +{ + DEVICE_TYPE_UNKNOWN = 0, + DEVICE_TYPE_802_3_ETHERNET, + DEVICE_TYPE_802_11_WIRELESS, + DEVICE_TYPE_GSM, + DEVICE_TYPE_CDMA +} NMDeviceType; + +typedef enum +{ + NM_DEVICE_STATE_UNKNOWN = 0, + NM_DEVICE_STATE_UNMANAGED, + NM_DEVICE_STATE_UNAVAILABLE, + NM_DEVICE_STATE_DISCONNECTED, + NM_DEVICE_STATE_PREPARE, + NM_DEVICE_STATE_CONFIG, + NM_DEVICE_STATE_NEED_AUTH, + NM_DEVICE_STATE_IP_CONFIG, + NM_DEVICE_STATE_ACTIVATED, + NM_DEVICE_STATE_FAILED +} NMDeviceState; + +typedef enum +{ + NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0, + NM_ACTIVE_CONNECTION_STATE_ACTIVATING, + NM_ACTIVE_CONNECTION_STATE_ACTIVATED +} NMActiveConnectionState; + +#define NM_DBUS_SERVICE "org.freedesktop.NetworkManager" + +#define NM_DBUS_PATH "/org/freedesktop/NetworkManager" +#define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager" +#define NM_DBUS_INTERFACE_DEVICE NM_DBUS_INTERFACE ".Device" +#define NM_DBUS_INTERFACE_DEVICE_WIRED NM_DBUS_INTERFACE_DEVICE ".Wired" +#define NM_DBUS_INTERFACE_DEVICE_WIRELESS NM_DBUS_INTERFACE_DEVICE ".Wireless" +#define NM_DBUS_PATH_ACCESS_POINT NM_DBUS_PATH "/AccessPoint" +#define NM_DBUS_INTERFACE_ACCESS_POINT NM_DBUS_INTERFACE ".AccessPoint" + +#define NM_DBUS_PATH_SETTINGS "/org/freedesktop/NetworkManagerSettings" + +#define NM_DBUS_IFACE_SETTINGS_CONNECTION "org.freedesktop.NetworkManagerSettings.Connection" +#define NM_DBUS_IFACE_SETTINGS "org.freedesktop.NetworkManagerSettings" +#define NM_DBUS_INTERFACE_ACTIVE_CONNECTION NM_DBUS_INTERFACE ".Connection.Active" +#define NM_DBUS_INTERFACE_IP4_CONFIG NM_DBUS_INTERFACE ".IP4Config" + +#define NM_DBUS_SERVICE_USER_SETTINGS "org.freedesktop.NetworkManagerUserSettings" +#define NM_DBUS_SERVICE_SYSTEM_SETTINGS "org.freedesktop.NetworkManagerSystemSettings" + +#define NM_802_11_AP_FLAGS_NONE 0x00000000 +#define NM_802_11_AP_FLAGS_PRIVACY 0x00000001 +#endif + QT_BEGIN_NAMESPACE typedef QMap< QString, QMap > QNmSettingsMap; typedef QList ServerThing; -Q_DECLARE_METATYPE(QNmSettingsMap) -Q_DECLARE_METATYPE(ServerThing) +QT_END_NAMESPACE + +Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QNmSettingsMap)) +Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(ServerThing)) + +QT_BEGIN_NAMESPACE class QNetworkManagerInterfacePrivate; class QNetworkManagerInterface : public QObject @@ -107,12 +168,10 @@ Q_SIGNALS: private Q_SLOTS: private: -// Q_DISABLE_COPY(QNetworkManagerInterface); ?? QNetworkManagerInterfacePrivate *d; QNmDBusHelper *nmDBusHelper; -}; //end QNetworkManagerInterface +}; -//////// class QNetworkManagerInterfaceAccessPointPrivate; class QNetworkManagerInterfaceAccessPoint : public QObject { @@ -120,7 +179,6 @@ class QNetworkManagerInterfaceAccessPoint : public QObject public: - // NM_DEVICE_STATE enum DeviceState { Unknown = 0, Unmanaged, @@ -181,9 +239,8 @@ private: QNetworkManagerInterfaceAccessPointPrivate *d; QNmDBusHelper *nmDBusHelper; -}; //end QNetworkManagerInterfaceAccessPoint +}; -//////// class QNetworkManagerInterfaceDevicePrivate; class QNetworkManagerInterfaceDevice : public QObject { @@ -195,7 +252,7 @@ public: ~QNetworkManagerInterfaceDevice(); QString udi() const; - QNetworkInterface interface() const; + QNetworkInterface networkInterface() const; QDBusInterface *connectionInterface() const; quint32 ip4Address() const; quint32 state() const; @@ -211,9 +268,8 @@ Q_SIGNALS: private: QNetworkManagerInterfaceDevicePrivate *d; QNmDBusHelper *nmDBusHelper; -}; //end QNetworkManagerInterfaceDevice +}; -//////// class QNetworkManagerInterfaceDeviceWiredPrivate; class QNetworkManagerInterfaceDeviceWired : public QObject { @@ -236,9 +292,8 @@ Q_SIGNALS: private: QNetworkManagerInterfaceDeviceWiredPrivate *d; QNmDBusHelper *nmDBusHelper; -}; // end QNetworkManagerInterfaceDeviceWired +}; -//// class QNetworkManagerInterfaceDeviceWirelessPrivate; class QNetworkManagerInterfaceDeviceWireless : public QObject { @@ -278,9 +333,8 @@ Q_SIGNALS: private: QNetworkManagerInterfaceDeviceWirelessPrivate *d; QNmDBusHelper *nmDBusHelper; -}; // end QNetworkManagerInterfaceDeviceWireless +}; -//// class QNetworkManagerSettingsPrivate; class QNetworkManagerSettings : public QObject { @@ -300,9 +354,8 @@ Q_SIGNALS: void newConnection(QDBusObjectPath); private: QNetworkManagerSettingsPrivate *d; -}; //end QNetworkManagerSettings +}; -//// class QNetworkManagerSettingsConnectionPrivate; class QNetworkManagerSettingsConnection : public QObject { @@ -315,7 +368,6 @@ public: QDBusInterface *connectionInterface() const; QNmSettingsMap getSettings(); - // void update(QNmSettingsMap map); bool setConnections(); NMDeviceType getType(); bool isAutoConnect(); @@ -335,9 +387,8 @@ Q_SIGNALS: private: QNmDBusHelper *nmDBusHelper; QNetworkManagerSettingsConnectionPrivate *d; -}; //end QNetworkManagerSettingsConnection +}; -//// class QNetworkManagerConnectionActivePrivate; class QNetworkManagerConnectionActive : public QObject { @@ -371,9 +422,8 @@ Q_SIGNALS: private: QNetworkManagerConnectionActivePrivate *d; QNmDBusHelper *nmDBusHelper; -}; //QNetworkManagerConnectionActive +}; -//// class QNetworkManagerIp4ConfigPrivate; class QNetworkManagerIp4Config : public QObject { @@ -383,14 +433,12 @@ public: QNetworkManagerIp4Config(const QString &dbusPathName, QObject *parent = 0); ~QNetworkManagerIp4Config(); - // QList nameservers(); QStringList domains() const; bool isValid(); private: QNetworkManagerIp4ConfigPrivate *d; }; -//// QT_END_NAMESPACE diff --git a/src/plugins/bearer/networkmanager/qnmdbushelper.cpp b/src/plugins/bearer/networkmanager/qnmdbushelper.cpp index d5e20f3..e195eeb 100644 --- a/src/plugins/bearer/networkmanager/qnmdbushelper.cpp +++ b/src/plugins/bearer/networkmanager/qnmdbushelper.cpp @@ -43,7 +43,7 @@ #include "qnmdbushelper.h" -#include +#include "qnetworkmanagerservice.h" #include #include @@ -54,6 +54,15 @@ QT_BEGIN_NAMESPACE +QNmDBusHelper::QNmDBusHelper(QObject * parent) + : QObject(parent) +{ +} + +QNmDBusHelper::~QNmDBusHelper() +{ +} + void QNmDBusHelper::deviceStateChanged(quint32 state) { QDBusMessage msg = this->message(); diff --git a/src/plugins/bearer/networkmanager/qnmdbushelper.h b/src/plugins/bearer/networkmanager/qnmdbushelper.h index 862290c..933d55a 100644 --- a/src/plugins/bearer/networkmanager/qnmdbushelper.h +++ b/src/plugins/bearer/networkmanager/qnmdbushelper.h @@ -52,6 +52,8 @@ class QNmDBusHelper: public QObject, protected QDBusContext { Q_OBJECT public: + QNmDBusHelper(QObject *parent = 0); + ~QNmDBusHelper(); public slots: void deviceStateChanged(quint32); diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp index f41fdba..5f03893 100644 --- a/src/plugins/bearer/qnetworksession_impl.cpp +++ b/src/plugins/bearer/qnetworksession_impl.cpp @@ -147,6 +147,8 @@ void QNetworkSessionPrivateImpl::open() if ((activeConfig.state() & QNetworkConfiguration::Discovered) != QNetworkConfiguration::Discovered) { lastError =QNetworkSession::InvalidConfigurationError; + state = QNetworkSession::Invalid; + emit stateChanged(state); emit QNetworkSessionPrivate::error(lastError); return; } @@ -400,7 +402,6 @@ void QNetworkSessionPrivateImpl::connectionError(const QString &id, lastError = QNetworkSession::UnknownSessionError; } - emit quitPendingWaitsForOpened(); emit QNetworkSessionPrivate::error(lastError); } } diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index 9af1fe9..bec562d 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -141,7 +141,10 @@ void QNetworkSessionPrivateImpl::syncStateWithInterface() if (state != QNetworkSession::Connected) { // There were no open connections to used IAP or SNAP - if ((privateConfiguration(publicConfig)->state & QNetworkConfiguration::Discovered) == + if (iError == QNetworkSession::InvalidConfigurationError) { + newState(QNetworkSession::Invalid); + } + else if ((privateConfiguration(publicConfig)->state & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered) { newState(QNetworkSession::Disconnected); } else { @@ -231,13 +234,23 @@ QNetworkSession::SessionError QNetworkSessionPrivateImpl::error() const void QNetworkSessionPrivateImpl::open() { - if (isOpen || !privateConfiguration(publicConfig) || (state == QNetworkSession::Connecting)) { + if (isOpen || (state == QNetworkSession::Connecting)) { return; } // Cancel notifications from RConnectionMonitor // => RConnection::ProgressNotification will be used for IAP/SNAP monitoring iConnectionMonitor.CancelNotifications(); + + // Configuration must be at least in Discovered - state for connecting purposes. + if ((publicConfig.state() & QNetworkConfiguration::Discovered) != + QNetworkConfiguration::Discovered) { + newState(QNetworkSession::Invalid); + iError = QNetworkSession::InvalidConfigurationError; + emit QNetworkSessionPrivate::error(iError); + syncStateWithInterface(); + return; + } TInt error = iSocketServ.Connect(); if (error != KErrNone) { diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp index b3c9cb3..88a563c 100644 --- a/src/plugins/bearer/symbian/symbianengine.cpp +++ b/src/plugins/bearer/symbian/symbianengine.cpp @@ -98,7 +98,7 @@ QString SymbianNetworkConfigurationPrivate::bearerName() const } SymbianEngine::SymbianEngine(QObject *parent) -: QBearerEngine(parent), CActive(CActive::EPriorityIdle), iInitOk(true) +: QBearerEngine(parent), CActive(CActive::EPriorityIdle), iFirstUpdate(true), iInitOk(true) { CActiveScheduler::Add(this); @@ -136,9 +136,12 @@ SymbianEngine::SymbianEngine(QObject *parent) updateConfigurations(); updateStatesToSnaps(); + + updateAvailableAccessPoints(); // On first time updates synchronously (without WLAN scans) // Start monitoring IAP and/or SNAP changes in Symbian CommsDB startCommsDatabaseNotifications(); + iFirstUpdate = false; } SymbianEngine::~SymbianEngine() @@ -153,7 +156,14 @@ SymbianEngine::~SymbianEngine() #endif delete ipAccessPointsAvailabilityScanner; + + // CCommsDatabase destructor uses cleanup stack. Since QNetworkConfigurationManager + // is a global static, but the time we are here, E32Main() has been exited already and + // the thread's default cleanup stack has been deleted. Without this line, a + // 'E32USER-CBase 69' -panic will occur. + CTrapCleanup* cleanup = CTrapCleanup::New(); delete ipCommsDB; + delete cleanup; } bool SymbianEngine::hasIdentifier(const QString &id) @@ -692,9 +702,10 @@ void SymbianEngine::accessPointScanningReady(TBool scanSuccessful, TConnMonIapIn updateStatesToSnaps(); - startCommsDatabaseNotifications(); - - emit updateCompleted(); + if (!iFirstUpdate) { + startCommsDatabaseNotifications(); + emit updateCompleted(); + } } void SymbianEngine::updateStatesToSnaps() @@ -987,11 +998,22 @@ void AccessPointsAvailabilityScanner::DoCancel() void AccessPointsAvailabilityScanner::StartScanning() { - iConnectionMonitor.GetPckgAttribute(EBearerIdAll, 0, KIapAvailability, iIapBuf, iStatus); - if (!IsActive()) { - SetActive(); + if (iOwner.iFirstUpdate) { + // On first update (the mgr is being instantiated) update only those bearers who + // don't need time-consuming scans (WLAN). + // Note: EBearerIdWCDMA covers also GPRS bearer + iConnectionMonitor.GetPckgAttribute(EBearerIdWCDMA, 0, KIapAvailability, iIapBuf, iStatus); + User::WaitForRequest(iStatus); + if (iStatus.Int() == KErrNone) { + iOwner.accessPointScanningReady(true,iIapBuf()); + } + } else { + iConnectionMonitor.GetPckgAttribute(EBearerIdAll, 0, KIapAvailability, iIapBuf, iStatus); + if (!IsActive()) { + SetActive(); + } } -} +} void AccessPointsAvailabilityScanner::RunL() { diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h index 5448813..ee6d070 100644 --- a/src/plugins/bearer/symbian/symbianengine.h +++ b/src/plugins/bearer/symbian/symbianengine.h @@ -162,6 +162,7 @@ private: // MConnectionMonitorObserver void EventL(const CConnMonEventBase& aEvent); private: // Data + bool iFirstUpdate; CCommsDatabase* ipCommsDB; RConnectionMonitor iConnectionMonitor; diff --git a/tests/auto/qbearertestcommon.h b/tests/auto/qbearertestcommon.h index 0bfe622..c9df249 100644 --- a/tests/auto/qbearertestcommon.h +++ b/tests/auto/qbearertestcommon.h @@ -42,6 +42,19 @@ #ifndef QBEARERTESTCOMMON_H #define QBEARERTESTCOMMON_H +// Wait for __expr to happen, while still allowing events to be processed. +#define QTRY_NOOP(__expr) \ + do { \ + const int __step = 50; \ + const int __timeout = 15000; \ + if (!(__expr)) { \ + QTest::qWait(0); \ + } \ + for (int __i = 0; __i < __timeout && !(__expr); __i+=__step) { \ + QTest::qWait(__step); \ + } \ + } while(0) + // Will try to wait for the condition while allowing event processing #define QTRY_VERIFY(__expr) \ do { \ diff --git a/tests/auto/qnetworksession/lackey/main.cpp b/tests/auto/qnetworksession/lackey/main.cpp index 41e935a..66d6dd4 100644 --- a/tests/auto/qnetworksession/lackey/main.cpp +++ b/tests/auto/qnetworksession/lackey/main.cpp @@ -69,14 +69,15 @@ int main(int argc, char** argv) QNetworkConfigurationManager manager; QList discovered = -#if defined (Q_OS_SYMBIAN) - // On Symbian, on the first query (before updateConfigurations() call - // the discovered-states are not correct, so defined-state will do. - manager.allConfigurations(QNetworkConfiguration::Defined); -#else manager.allConfigurations(QNetworkConfiguration::Discovered); -#endif + + foreach(QNetworkConfiguration config, discovered) { + qDebug() << "Lackey: Name of the config enumerated: " << config.name(); + qDebug() << "Lackey: State of the config enumerated: " << config.state(); + } + if (discovered.isEmpty()) { + qDebug("Lackey: no discovered configurations, returning empty error."); return NO_DISCOVERED_CONFIGURATIONS_ERROR; } diff --git a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp index 4ef3a4f..58b1a48 100644 --- a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp +++ b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp @@ -54,6 +54,7 @@ QT_USE_NAMESPACE Q_DECLARE_METATYPE(QNetworkConfiguration) +Q_DECLARE_METATYPE(QNetworkConfiguration::Type); Q_DECLARE_METATYPE(QNetworkSession::State); Q_DECLARE_METATYPE(QNetworkSession::SessionError); @@ -70,6 +71,11 @@ private slots: void outOfProcessSession(); void invalidSession(); + void repeatedOpenClose_data(); + void repeatedOpenClose(); + + void roamingErrorCodes(); + void sessionProperties_data(); void sessionProperties(); @@ -94,11 +100,17 @@ private: #endif }; +// Helper functions +bool openSession(QNetworkSession *session); +bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration = true); +QNetworkConfiguration suitableConfiguration(QString bearerType, QNetworkConfiguration::Type configType); + void tst_QNetworkSession::initTestCase() { qRegisterMetaType("QNetworkSession::State"); qRegisterMetaType("QNetworkSession::SessionError"); qRegisterMetaType("QNetworkConfiguration"); + qRegisterMetaType("QNetworkConfiguration::Type"); #ifdef Q_WS_MAEMO_6 iapconf = new Maemo::IAPConf("007"); @@ -211,9 +223,42 @@ void tst_QNetworkSession::cleanupTestCase() void tst_QNetworkSession::invalidSession() { + // Verify that session created with invalid configuration remains in invalid state QNetworkSession session(QNetworkConfiguration(), 0); QVERIFY(!session.isOpen()); QVERIFY(session.state() == QNetworkSession::Invalid); + QVERIFY(session.error() == QNetworkSession::InvalidConfigurationError); + + // Verify that opening session with invalid configuration both 1) emits invalidconfigurationerror + // and 2) sets session's state as invalid. + QSignalSpy errorSpy(&session, SIGNAL(error(QNetworkSession::SessionError))); + session.open(); + session.waitForOpened(1000); // Should bail out right away + QVERIFY(errorSpy.count() == 1); + QNetworkSession::SessionError error = + qvariant_cast (errorSpy.first().at(0)); + QVERIFY(error == QNetworkSession::InvalidConfigurationError); + QVERIFY(session.error() == QNetworkSession::InvalidConfigurationError); + QVERIFY(session.state() == QNetworkSession::Invalid); + + // Check same thing with a config from platform (there are subtle differences + // because emtpy configuration does not have private pointer). Test with config + // in '(un)defined' state + QList allConfigs = manager.allConfigurations(); + foreach(QNetworkConfiguration config, allConfigs) { + if ((config.state() & QNetworkConfiguration::Discovered) != QNetworkConfiguration::Discovered) { + QNetworkSession session2(config); + QSignalSpy errorSpy2(&session2, SIGNAL(error(QNetworkSession::SessionError))); + session2.open(); + session2.waitForOpened(1000); // Should bail out right away + QVERIFY(errorSpy2.count() == 1); + QNetworkSession::SessionError error2 = + qvariant_cast (errorSpy2.first().at(0)); + QVERIFY(error2 == QNetworkSession::InvalidConfigurationError); + QVERIFY(session2.state() == QNetworkSession::Invalid); + break; // Once is enough + } + } } void tst_QNetworkSession::sessionProperties_data() @@ -300,6 +345,100 @@ void tst_QNetworkSession::sessionProperties() } } +void tst_QNetworkSession::repeatedOpenClose_data() { + QTest::addColumn("bearerType"); + QTest::addColumn("configurationType"); + QTest::addColumn("repeatTimes"); + + QTest::newRow("WLAN_IAP") << "WLAN" << QNetworkConfiguration::InternetAccessPoint << 3; + // QTest::newRow("Cellular_IAP") << "cellular" << QNetworkConfiguration::InternetAccessPoint << 3; + // QTest::newRow("SNAP") << "bearer_type_not_relevant_with_SNAPs" << QNetworkConfiguration::ServiceNetwork << 3; +} + +// Tests repeated-open close. +void tst_QNetworkSession::repeatedOpenClose() { + QFETCH(QString, bearerType); + QFETCH(QNetworkConfiguration::Type, configurationType); + QFETCH(int, repeatTimes); + + // First check that opening once succeeds and determine if repeatable testing is doable + QNetworkConfiguration config = suitableConfiguration(bearerType, configurationType); + if (!config.isValid()) { + QSKIP("No suitable configurations, skipping this round of repeated open-close test.", SkipSingle); + } + qDebug() << "Using following configuratio to repeatedly open and close: " << config.name(); + QNetworkSession permanentSession(config); + if (!openSession(&permanentSession) || + !closeSession(&permanentSession)) { + QSKIP("Unable to open/close session, skipping this round of repeated open-close test.", SkipSingle); + } + for (int i = repeatTimes; i > 0; i--) { + QVERIFY(openSession(&permanentSession)); + QVERIFY(closeSession(&permanentSession)); + } +} + +void tst_QNetworkSession::roamingErrorCodes() { + +#ifndef Q_OS_SYMBIAN + QSKIP("Roaming supported on Symbian.", SkipAll); +#else + QNetworkConfiguration wlanIapConfig = suitableConfiguration("WLAN", QNetworkConfiguration::InternetAccessPoint); + if (!wlanIapConfig.isValid()) { + QSKIP("No WLAN IAP accessible, skipping test.", SkipAll); + } + // Check that opening and closing two sessions on same config work gracefully: + QNetworkSession iapSession(wlanIapConfig); + QVERIFY(openSession(&iapSession)); + QNetworkSession adminIapSession(wlanIapConfig); + QVERIFY(openSession(&adminIapSession)); + QVERIFY(closeSession(&iapSession, false)); // false == not a last session based on the configuration + QVERIFY(closeSession(&adminIapSession)); + + // Open configurations again, force close bearer and check that errors are emitted correctly + // on the other session + QVERIFY(openSession(&iapSession)); + QVERIFY(openSession(&adminIapSession)); + QSignalSpy errorSpy(&iapSession, SIGNAL(error(QNetworkSession::SessionError))); + adminIapSession.stop(); // requires NetworkControl capabilities + QTRY_VERIFY(!errorSpy.isEmpty()); // wait for error signals + QNetworkSession::SessionError error = qvariant_cast(errorSpy.first().at(0)); + QVERIFY(error == QNetworkSession::SessionAbortedError); + QVERIFY(iapSession.state() == QNetworkSession::Disconnected); + QVERIFY(adminIapSession.state() == QNetworkSession::Disconnected); +#endif // Q_OS_SYMBIAN + /* + // Check for roaming error. Challenging to automate, therefore commented out. + // Case requires that you have controllable WLAN in Internet SNAP (only). + QNetworkConfiguration snapConfig = suitableConfiguration("bearer_not_relevant_with_snaps", QNetworkConfiguration::ServiceNetwork); + if (!snapConfig.isValid()) { + QSKIP("No SNAP accessible, skipping test.", SkipAll); + } + QNetworkSession snapSession(snapConfig); + QVERIFY(openSession(&snapSession)); + QSignalSpy errorSpySnap(&snapSession, SIGNAL(error(QNetworkSession::SessionError))); + qDebug("Disconnect the WLAN now"); + QTRY_VERIFY(!errorSpySnap.isEmpty()); // wait for error signals + QVERIFY(errorSpySnap.count() == 1); + error = qvariant_cast(errorSpySnap.first().at(0)); + qDebug() << "Error received when turning off wlan on SNAP: " << error; + QVERIFY(error == QNetworkSession::RoamingError); + + qDebug("Connect the WLAN now"); + QTest::qWait(60000); // Wait for WLAN to get up + QNetworkConfiguration wlanIapConfig2 = suitableConfiguration("WLAN", QNetworkConfiguration::InternetAccessPoint); + QNetworkSession iapSession2(wlanIapConfig2); + QVERIFY(openSession(&iapSession2)); + QSignalSpy errorSpy2(&iapSession2, SIGNAL(error(QNetworkSession::SessionError))); + qDebug("Disconnect the WLAN now"); + QTRY_VERIFY(!errorSpy2.isEmpty()); // wait for error signals + QVERIFY(errorSpy2.count() == 1); + error = qvariant_cast(errorSpy2.first().at(0)); + QVERIFY(error == QNetworkSession::SessionAbortedError); + QVERIFY(iapSession2.state() == QNetworkSession::Disconnected); + */ +} + void tst_QNetworkSession::userChoiceSession_data() { QTest::addColumn("configuration"); @@ -810,7 +949,7 @@ QDebug operator<<(QDebug debug, const QList &list) } // Note: outOfProcessSession requires that at least one configuration is -// at Discovered -state (Defined is ok for symbian as well, as long as it is possible to open). +// at Discovered -state. void tst_QNetworkSession::outOfProcessSession() { qDebug() << "START"; @@ -913,6 +1052,158 @@ void tst_QNetworkSession::outOfProcessSession() qDebug("STOP"); } +// A convinience / helper function for testcases. Return the first matching configuration. +// Ignores configurations in other than 'discovered' -state. Returns invalid (QNetworkConfiguration()) +// if none found. +QNetworkConfiguration suitableConfiguration(QString bearerType, QNetworkConfiguration::Type configType) { + // Refresh configurations and derive configurations matching given parameters. + QNetworkConfigurationManager mgr; + QSignalSpy updateSpy(&mgr, SIGNAL(updateCompleted())); + mgr.updateConfigurations(); + QTRY_NOOP(updateSpy.count() == 1); + if (updateSpy.count() != 1) { + qDebug("tst_QNetworkSession::suitableConfiguration() failure: unable to update configurations"); + return QNetworkConfiguration(); + } + QList discoveredConfigs = mgr.allConfigurations(QNetworkConfiguration::Discovered); + foreach(QNetworkConfiguration config, discoveredConfigs) { + if ((config.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) { + // qDebug() << "Dumping config because is active: " << config.name(); + discoveredConfigs.removeOne(config); + } else if (config.type() != configType) { + // qDebug() << "Dumping config because type (IAP/SNAP) mismatches: " << config.name(); + discoveredConfigs.removeOne(config); + } else if ((config.type() == QNetworkConfiguration::InternetAccessPoint) && + bearerType == "cellular") { // 'cellular' bearertype is for convinience + if (config.bearerName() != "2G" && + config.bearerName() != "CDMA2000" && + config.bearerName() != "WCDMA" && + config.bearerName() != "HSPA") { + // qDebug() << "Dumping config because bearer mismatches (cellular): " << config.name(); + discoveredConfigs.removeOne(config); + } + } else if ((config.type() == QNetworkConfiguration::InternetAccessPoint) && + bearerType != config.bearerName()) { + // qDebug() << "Dumping config because bearer mismatches (WLAN): " << config.name(); + discoveredConfigs.removeOne(config); + } + } + if (discoveredConfigs.isEmpty()) { + qDebug("tst_QNetworkSession::suitableConfiguration() failure: no suitable configurations present."); + return QNetworkConfiguration(); + } else { + return discoveredConfigs.first(); + } +} + +// A convinience function for test-cases: opens the given configuration and return +// true if it was done gracefully. +bool openSession(QNetworkSession *session) { + QNetworkConfigurationManager mgr; + QSignalSpy openedSpy(session, SIGNAL(opened())); + QSignalSpy stateChangeSpy(session, SIGNAL(stateChanged(QNetworkSession::State))); + QSignalSpy errorSpy(session, SIGNAL(error(QNetworkSession::SessionError))); + QSignalSpy configChangeSpy(&mgr, SIGNAL(configurationChanged(QNetworkConfiguration))); + // Store some initial statuses, because expected signals differ if the config is already + // active by some other session + QNetworkConfiguration::StateFlags configInitState = session->configuration().state(); + QNetworkSession::State sessionInitState = session->state(); + + if (session->isOpen() || + !session->sessionProperty("ActiveConfiguration").toString().isEmpty()) { + qDebug("tst_QNetworkSession::openSession() failure: session was already open / active."); + return false; + } else { + session->open(); + session->waitForOpened(120000); // Bringing interfaces up and down may take time at platform + } + // Check that connection opening went by the book. Add checks here if more strictness needed. + if (!session->isOpen()) { + qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::open() failed."); + return false; + } + if (openedSpy.count() != 1) { + qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::opened() - signal not received."); + return false; + } + if (!errorSpy.isEmpty()) { + qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::error() - signal was detected."); + return false; + } + if (sessionInitState != QNetworkSession::Connected && + stateChangeSpy.isEmpty()) { + qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::stateChanged() - signals not detected."); + return false; + } + if (configInitState != QNetworkConfiguration::Active && + configChangeSpy.isEmpty()) { + qDebug("tst_QNetworkSession::openSession() failure: QNetworkConfigurationManager::configurationChanged() - signals not detected."); + return false; + } + if (session->configuration().state() != QNetworkConfiguration::Active) { + qDebug("tst_QNetworkSession::openSession() failure: session's configuration is not in 'Active' -state."); + return false; + } + return true; +} + +// Helper function for closing opened session. Performs checks that +// session is closed gradefully (e.g. signals). Function does not delete +// the session. The lastSessionOnConfiguration (true by default) is used to +// tell if there are more sessions open, basing on same configration. This +// impacts the checks made. +bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration) { + if (!session) { + qDebug("tst_QNetworkSession::closeSession() failure: NULL session given"); + return false; + } + if (session->state() != QNetworkSession::Connected || + !session->isOpen()) { + qDebug("tst_QNetworkSession::closeSession() failure: session is not opened."); + return false; + } + QNetworkConfigurationManager mgr; + QSignalSpy sessionClosedSpy(session, SIGNAL(closed())); + QSignalSpy sessionStateChangedSpy(session, SIGNAL(stateChanged(QNetworkSession::State))); + QSignalSpy sessionErrorSpy(session, SIGNAL(error(QNetworkSession::SessionError))); + QSignalSpy configChangeSpy(&mgr, SIGNAL(configurationChanged(QNetworkConfiguration))); + + session->close(); + + if (!sessionErrorSpy.isEmpty()) { + qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::error() received."); + return false; + } + if (sessionClosedSpy.count() != 1) { + qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::closed() signal not received."); + return false; + } + if (lastSessionOnConfiguration && + sessionStateChangedSpy.isEmpty()) { + qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::stateChanged() signals not received."); + return false; + } + if (lastSessionOnConfiguration && + session->state() != QNetworkSession::Disconnected) { + qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession is not in Disconnected -state"); + return false; + } + QTRY_NOOP(!configChangeSpy.isEmpty()); + if (lastSessionOnConfiguration && + configChangeSpy.isEmpty()) { + qDebug("tst_QNetworkSession::closeSession() failure: QNetworkConfigurationManager::configurationChanged() - signal not detected."); + return false; + } + if (lastSessionOnConfiguration && + session->configuration().state() != QNetworkConfiguration::Discovered) { + qDebug("tst_QNetworkSession::closeSession() failure: session's configuration is not back in 'Discovered' -state."); + return false; + } + return true; +} + + + QTEST_MAIN(tst_QNetworkSession) #include "tst_qnetworksession.moc" -- cgit v0.12 From 56d32b57814cb35409bc9b0076ec753de488ae7f Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 16 Feb 2010 09:38:23 +0100 Subject: Move qegl_p.h -> qeglcontext_p.h and add a new qegl_p.h This puts the QEgl namespace in a single file which can be used by both qeglcontext and qeglproperties. Files which need QEglContext should now include qeglcontext_p.h. Reviewed-By: Aleksandar Sasha Babic --- src/gui/egl/egl.pri | 1 + src/gui/egl/qegl.cpp | 3 + src/gui/egl/qegl_p.h | 108 +++++++++++------------------ src/gui/egl/qegl_qws.cpp | 2 + src/gui/egl/qegl_symbian.cpp | 2 + src/gui/egl/qegl_wince.cpp | 2 + src/gui/egl/qegl_x11.cpp | 3 +- src/gui/egl/qeglcontext_p.h | 130 +++++++++++++++++++++++++++++++++++ src/gui/egl/qeglproperties.cpp | 3 +- src/gui/egl/qeglproperties_p.h | 42 +---------- src/opengl/qgl_egl_p.h | 3 +- src/opengl/qgl_wince.cpp | 3 +- src/opengl/qpixmapdata_x11gl_egl.cpp | 1 + src/opengl/qwindowsurface_gl.cpp | 2 +- src/openvg/qpaintengine_vg.cpp | 2 +- src/openvg/qvg_p.h | 2 +- src/openvg/qwindowsurface_vg.cpp | 2 +- src/openvg/qwindowsurface_vgegl_p.h | 2 +- 18 files changed, 196 insertions(+), 117 deletions(-) create mode 100644 src/gui/egl/qeglcontext_p.h diff --git a/src/gui/egl/egl.pri b/src/gui/egl/egl.pri index 669d311..b90b9b0 100644 --- a/src/gui/egl/egl.pri +++ b/src/gui/egl/egl.pri @@ -2,6 +2,7 @@ CONFIG += egl HEADERS += \ egl/qegl_p.h \ + egl/qeglcontext_p.h \ egl/qeglproperties_p.h SOURCES += \ diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 0ed95ea..5052dfc 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -43,7 +43,10 @@ #include #include #include + #include "qegl_p.h" +#include "qeglcontext_p.h" + QT_BEGIN_NAMESPACE diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index 87ed818..eb83002 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -53,13 +53,34 @@ // We mean it. // -#include -#include +QT_BEGIN_INCLUDE_NAMESPACE -#include +#if defined(QT_GLES_EGL) +#include +#else +#include +#endif -QT_BEGIN_INCLUDE_NAMESPACE +#if defined(Q_WS_X11) +// If included , then the global namespace +// may have been polluted with X #define's. The following makes sure +// the X11 headers were included properly and then cleans things up. +#include +#include +#undef Bool +#undef Status +#undef None +#undef KeyPress +#undef KeyRelease +#undef FocusIn +#undef FocusOut +#undef Type +#undef FontChange +#undef CursorShape +#endif +// Internally we use the EGL-prefixed native types which are used in EGL >= 1.3. +// For older versions of EGL, we have to define these types ourselves here: #if !defined(EGL_VERSION_1_3) && !defined(QEGL_NATIVE_TYPES_DEFINED) #undef EGLNativeWindowType #undef EGLNativePixmapType @@ -69,74 +90,27 @@ typedef NativePixmapType EGLNativePixmapType; typedef NativeDisplayType EGLNativeDisplayType; #define QEGL_NATIVE_TYPES_DEFINED 1 #endif -QT_END_INCLUDE_NAMESPACE - -QT_BEGIN_NAMESPACE - -class Q_GUI_EXPORT QEglContext -{ -public: - QEglContext(); - ~QEglContext(); - - bool isValid() const; - bool isCurrent() const; - bool isSharing() const { return sharing; } - - QEgl::API api() const { return apiType; } - void setApi(QEgl::API api) { apiType = api; } - - bool chooseConfig(const QEglProperties& properties, QEgl::PixelFormatMatch match = QEgl::ExactPixelFormat); - bool createContext(QEglContext *shareContext = 0, const QEglProperties *properties = 0); - void destroyContext(); - EGLSurface createSurface(QPaintDevice *device, const QEglProperties *properties = 0); - void destroySurface(EGLSurface surface); - - bool makeCurrent(EGLSurface surface); - bool doneCurrent(); - bool lazyDoneCurrent(); - bool swapBuffers(EGLSurface surface); - void waitNative(); - void waitClient(); - - bool configAttrib(int name, EGLint *value) const; - - static void clearError() { eglGetError(); } - static EGLint error() { return eglGetError(); } - static QString errorString(EGLint code); - - static EGLDisplay display(); - - EGLContext context() const { return ctx; } - void setContext(EGLContext context) { ctx = context; ownsContext = false;} - - EGLConfig config() const { return cfg; } - void setConfig(EGLConfig config) { cfg = config; } - - QEglProperties configProperties(EGLConfig cfg = 0) const; - - void dumpAllConfigs(); - - static QString extensions(); - static bool hasExtension(const char* extensionName); +QT_END_INCLUDE_NAMESPACE -private: - QEgl::API apiType; - EGLContext ctx; - EGLConfig cfg; - EGLSurface currentSurface; - bool current; - bool ownsContext; - bool sharing; - static EGLDisplay dpy; - static EGLNativeDisplayType nativeDisplay(); +QT_BEGIN_NAMESPACE - static QEglContext *currentContext(QEgl::API api); - static void setCurrentContext(QEgl::API api, QEglContext *context); +namespace QEgl { + enum API + { + OpenGL, + OpenVG + }; + + enum PixelFormatMatch + { + ExactPixelFormat, + BestPixelFormat + }; }; + QT_END_NAMESPACE -#endif // QEGL_P_H +#endif //QEGL_P_H diff --git a/src/gui/egl/qegl_qws.cpp b/src/gui/egl/qegl_qws.cpp index 2a61beb..a40c236 100644 --- a/src/gui/egl/qegl_qws.cpp +++ b/src/gui/egl/qegl_qws.cpp @@ -42,7 +42,9 @@ #include #include #include + #include "qegl_p.h" +#include "qeglcontext_p.h" #if !defined(QT_NO_EGL) diff --git a/src/gui/egl/qegl_symbian.cpp b/src/gui/egl/qegl_symbian.cpp index 5a010cd..0c91fd8 100644 --- a/src/gui/egl/qegl_symbian.cpp +++ b/src/gui/egl/qegl_symbian.cpp @@ -42,7 +42,9 @@ #include #include #include + #include "qegl_p.h" +#include "qeglcontext_p.h" #include diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp index c9c9773..00341ba 100644 --- a/src/gui/egl/qegl_wince.cpp +++ b/src/gui/egl/qegl_wince.cpp @@ -42,7 +42,9 @@ #include #include #include + #include "qegl_p.h" +#include "qeglcontext_p.h" #include diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp index 634ff13..cd55849 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -49,8 +49,9 @@ #include #include #include -#include "qegl_p.h" +#include "qegl_p.h" +#include "qeglcontext_p.h" QT_BEGIN_NAMESPACE diff --git a/src/gui/egl/qeglcontext_p.h b/src/gui/egl/qeglcontext_p.h new file mode 100644 index 0000000..3857fb7 --- /dev/null +++ b/src/gui/egl/qeglcontext_p.h @@ -0,0 +1,130 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QEGLCONTEXT_P_H +#define QEGLCONTEXT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience of +// the QtOpenGL and QtOpenVG modules. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_GUI_EXPORT QEglContext +{ +public: + QEglContext(); + ~QEglContext(); + + bool isValid() const; + bool isCurrent() const; + bool isSharing() const { return sharing; } + + QEgl::API api() const { return apiType; } + void setApi(QEgl::API api) { apiType = api; } + + bool chooseConfig(const QEglProperties& properties, QEgl::PixelFormatMatch match = QEgl::ExactPixelFormat); + bool createContext(QEglContext *shareContext = 0, const QEglProperties *properties = 0); + void destroyContext(); + EGLSurface createSurface(QPaintDevice *device, const QEglProperties *properties = 0); + void destroySurface(EGLSurface surface); + + bool makeCurrent(EGLSurface surface); + bool doneCurrent(); + bool lazyDoneCurrent(); + bool swapBuffers(EGLSurface surface); + + void waitNative(); + void waitClient(); + + bool configAttrib(int name, EGLint *value) const; + + static void clearError() { eglGetError(); } + static EGLint error() { return eglGetError(); } + static QString errorString(EGLint code); + + static EGLDisplay display(); + + EGLContext context() const { return ctx; } + void setContext(EGLContext context) { ctx = context; ownsContext = false;} + + EGLConfig config() const { return cfg; } + void setConfig(EGLConfig config) { cfg = config; } + + QEglProperties configProperties(EGLConfig cfg = 0) const; + + void dumpAllConfigs(); + + static QString extensions(); + static bool hasExtension(const char* extensionName); + +private: + QEgl::API apiType; + EGLContext ctx; + EGLConfig cfg; + EGLSurface currentSurface; + bool current; + bool ownsContext; + bool sharing; + + static EGLDisplay dpy; + static EGLNativeDisplayType nativeDisplay(); + + static QEglContext *currentContext(QEgl::API api); + static void setCurrentContext(QEgl::API api, QEglContext *context); +}; + +QT_END_NAMESPACE + +#endif // QEGLCONTEXT_P_H diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp index 236ec37..b83ae4e 100644 --- a/src/gui/egl/qeglproperties.cpp +++ b/src/gui/egl/qeglproperties.cpp @@ -46,7 +46,8 @@ QT_BEGIN_NAMESPACE #include #include -#include "qegl_p.h" +#include "qeglproperties_p.h" +#include "qeglcontext_p.h" // Initialize a property block. diff --git a/src/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h index feed1d2..496847b 100644 --- a/src/gui/egl/qeglproperties_p.h +++ b/src/gui/egl/qeglproperties_p.h @@ -56,50 +56,10 @@ #include #include -QT_BEGIN_INCLUDE_NAMESPACE - -#if defined(QT_GLES_EGL) -#include -#else -#include -#endif - -#if defined(Q_WS_X11) -// If included , then the global namespace -// may have been polluted with X #define's. The following makes sure -// the X11 headers were included properly and then cleans things up. -#include -#include -#undef Bool -#undef Status -#undef None -#undef KeyPress -#undef KeyRelease -#undef FocusIn -#undef FocusOut -#undef Type -#undef FontChange -#undef CursorShape -#endif - -QT_END_INCLUDE_NAMESPACE +#include QT_BEGIN_NAMESPACE -namespace QEgl { - enum API - { - OpenGL, - OpenVG - }; - - enum PixelFormatMatch - { - ExactPixelFormat, - BestPixelFormat - }; -}; - class QX11Info; class QPaintDevice; diff --git a/src/opengl/qgl_egl_p.h b/src/opengl/qgl_egl_p.h index c503724..518b500 100644 --- a/src/opengl/qgl_egl_p.h +++ b/src/opengl/qgl_egl_p.h @@ -53,7 +53,8 @@ // We mean it. // -#include +#include +#include QT_BEGIN_NAMESPACE diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp index f81115c..2b71201 100644 --- a/src/opengl/qgl_wince.cpp +++ b/src/opengl/qgl_wince.cpp @@ -54,7 +54,8 @@ #include -#include +#include +#include #include #include diff --git a/src/opengl/qpixmapdata_x11gl_egl.cpp b/src/opengl/qpixmapdata_x11gl_egl.cpp index 6a1d030..4f1543c 100644 --- a/src/opengl/qpixmapdata_x11gl_egl.cpp +++ b/src/opengl/qpixmapdata_x11gl_egl.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #if !defined(QT_OPENGL_ES_1) #include diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 4ac4a3a..0334cbc 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -83,7 +83,7 @@ #endif #ifdef QT_OPENGL_ES -#include +#include #endif QT_BEGIN_NAMESPACE diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index 35f552e..47ce11c 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -45,7 +45,7 @@ #include "qvgcompositionhelper_p.h" #include "qvgimagepool_p.h" #if !defined(QT_NO_EGL) -#include +#include #include "qwindowsurface_vgegl_p.h" #endif #include diff --git a/src/openvg/qvg_p.h b/src/openvg/qvg_p.h index 7857bb6..51abbee 100644 --- a/src/openvg/qvg_p.h +++ b/src/openvg/qvg_p.h @@ -58,7 +58,7 @@ #include #if !defined(QT_NO_EGL) -#include +#include #endif QT_BEGIN_NAMESPACE diff --git a/src/openvg/qwindowsurface_vg.cpp b/src/openvg/qwindowsurface_vg.cpp index 83b0764..07d9209 100644 --- a/src/openvg/qwindowsurface_vg.cpp +++ b/src/openvg/qwindowsurface_vg.cpp @@ -47,7 +47,7 @@ #if !defined(QT_NO_EGL) -#include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/openvg/qwindowsurface_vgegl_p.h b/src/openvg/qwindowsurface_vgegl_p.h index aa0c648..f6adbf3 100644 --- a/src/openvg/qwindowsurface_vgegl_p.h +++ b/src/openvg/qwindowsurface_vgegl_p.h @@ -58,7 +58,7 @@ #if !defined(QT_NO_EGL) -#include +#include QT_BEGIN_NAMESPACE -- cgit v0.12 From 28b85c76dd0ba4796ec519b890f6fab0fc813061 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 16 Feb 2010 13:29:36 +0100 Subject: Move static methods from QEglContext to QEgl namespace Reviewed-By: Aleksandar Sasha Babic --- src/gui/egl/qegl.cpp | 83 +++++++++++++++++++----------------- src/gui/egl/qegl_p.h | 18 ++++++++ src/gui/egl/qegl_wince.cpp | 6 +-- src/gui/egl/qegl_x11.cpp | 8 ++-- src/gui/egl/qeglcontext_p.h | 18 ++------ src/gui/egl/qeglproperties.cpp | 6 +-- src/opengl/qgl_egl.cpp | 2 +- src/opengl/qgl_x11egl.cpp | 20 ++++----- src/opengl/qglpixelbuffer_egl.cpp | 4 +- src/opengl/qpixmapdata_x11gl_egl.cpp | 20 ++++----- 10 files changed, 97 insertions(+), 88 deletions(-) diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 5052dfc..ef5eb67 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -57,8 +57,6 @@ QT_BEGIN_NAMESPACE static QEglContext * volatile currentGLContext = 0; static QEglContext * volatile currentVGContext = 0; -EGLDisplay QEglContext::dpy = EGL_NO_DISPLAY; - QEglContext::QEglContext() : apiType(QEgl::OpenGL) , ctx(EGL_NO_CONTEXT) @@ -98,7 +96,8 @@ bool QEglContext::chooseConfig do { // Get the number of matching configurations for this set of properties. EGLint matching = 0; - if (!eglChooseConfig(display(), props.properties(), 0, 0, &matching) || !matching) + EGLDisplay dpy = QEgl::display(); + if (!eglChooseConfig(dpy, props.properties(), 0, 0, &matching) || !matching) continue; // If we want the best pixel format, then return the first @@ -145,7 +144,7 @@ bool QEglContext::chooseConfig qWarning() << "QEglContext::chooseConfig(): Could not find a suitable EGL configuration"; qWarning() << "Requested:" << props.toString(); qWarning() << "Available:"; - dumpAllConfigs(); + QEgl::dumpAllConfigs(); } return false; } @@ -175,9 +174,9 @@ bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties if (shareContext && shareContext->ctx == EGL_NO_CONTEXT) shareContext = 0; if (shareContext) { - ctx = eglCreateContext(display(), cfg, shareContext->ctx, contextProps.properties()); + ctx = eglCreateContext(QEgl::display(), cfg, shareContext->ctx, contextProps.properties()); if (ctx == EGL_NO_CONTEXT) { - qWarning() << "QEglContext::createContext(): Could not share context:" << errorString(eglGetError()); + qWarning() << "QEglContext::createContext(): Could not share context:" << QEgl::errorString(); shareContext = 0; } else { sharing = true; @@ -186,7 +185,7 @@ bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties if (ctx == EGL_NO_CONTEXT) { ctx = eglCreateContext(display(), cfg, 0, contextProps.properties()); if (ctx == EGL_NO_CONTEXT) { - qWarning() << "QEglContext::createContext(): Unable to create EGL context:" << errorString(eglGetError()); + qWarning() << "QEglContext::createContext(): Unable to create EGL context:" << QEgl::errorString(); return false; } } @@ -243,9 +242,9 @@ bool QEglContext::makeCurrent(EGLSurface surface) eglBindAPI(EGL_OPENVG_API); #endif - bool ok = eglMakeCurrent(display(), surface, surface, ctx); + bool ok = eglMakeCurrent(QEgl::display(), surface, surface, ctx); if (!ok) - qWarning() << "QEglContext::makeCurrent():" << errorString(eglGetError()); + qWarning() << "QEglContext::makeCurrent():" << QEgl::errorString(); return ok; } @@ -272,9 +271,9 @@ bool QEglContext::doneCurrent() eglBindAPI(EGL_OPENVG_API); #endif - bool ok = eglMakeCurrent(display(), EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + bool ok = eglMakeCurrent(QEgl::display(), EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); if (!ok) - qWarning() << "QEglContext::doneCurrent():" << errorString(eglGetError()); + qWarning() << "QEglContext::doneCurrent():" << QEgl::errorString(); return ok; } @@ -294,9 +293,9 @@ bool QEglContext::swapBuffers(EGLSurface surface) if(ctx == EGL_NO_CONTEXT) return false; - bool ok = eglSwapBuffers(display(), surface); + bool ok = eglSwapBuffers(QEgl::display(), surface); if (!ok) - qWarning() << "QEglContext::swapBuffers():" << errorString(eglGetError()); + qWarning() << "QEglContext::swapBuffers():" << QEgl::errorString(); return ok; } @@ -333,43 +332,33 @@ void QEglContext::waitClient() // Query the value of a configuration attribute. bool QEglContext::configAttrib(int name, EGLint *value) const { - return eglGetConfigAttrib(display(), cfg, name, value); + return eglGetConfigAttrib(QEgl::display(), cfg, name, value); } -// Retrieve all of the properties on "cfg". If zero, return -// the context's configuration. -QEglProperties QEglContext::configProperties(EGLConfig cfg) const +QEglProperties QEglContext::configProperties() const { - if (!cfg) - cfg = config(); - QEglProperties props; - for (int name = 0x3020; name <= 0x304F; ++name) { - EGLint value; - if (name != EGL_NONE && eglGetConfigAttrib(display(), cfg, name, &value)) - props.setValue(name, value); - } - eglGetError(); // Clear the error state. - return props; + return QEglProperties(config()); } -EGLDisplay QEglContext::display() +EGLDisplay QEgl::display() { + static EGLDisplay dpy = EGL_NO_DISPLAY; static bool openedDisplay = false; if (!openedDisplay) { dpy = eglGetDisplay(nativeDisplay()); openedDisplay = true; if (dpy == EGL_NO_DISPLAY) { - qWarning("QEglContext::display(): Falling back to EGL_DEFAULT_DISPLAY"); + qWarning("QEgl::display(): Falling back to EGL_DEFAULT_DISPLAY"); dpy = eglGetDisplay(EGLNativeDisplayType(EGL_DEFAULT_DISPLAY)); } if (dpy == EGL_NO_DISPLAY) { - qWarning("QEglContext::display(): Can't even open the default display"); + qWarning("QEgl::display(): Can't even open the default display"); return EGL_NO_DISPLAY; } if (!eglInitialize(dpy, NULL, NULL)) { - qWarning() << "QEglContext::display(): Cannot initialize EGL display:" << errorString(eglGetError()); + qWarning() << "QEgl::display(): Cannot initialize EGL display:" << QEgl::errorString(); return EGL_NO_DISPLAY; } } @@ -378,14 +367,14 @@ EGLDisplay QEglContext::display() } #if !defined(Q_WS_X11) && !defined(Q_WS_WINCE) // WinCE & X11 implement this properly -EGLNativeDisplayType QEglContext::nativeDisplay() +EGLNativeDisplayType QEgl::nativeDisplay() { return EGL_DEFAULT_DISPLAY; } #endif // Return the error string associated with a specific code. -QString QEglContext::errorString(EGLint code) +QString QEgl::errorString(EGLint code) { static const char * const errors[] = { "Success (0x3000)", // No tr @@ -411,8 +400,24 @@ QString QEglContext::errorString(EGLint code) } } +QString QEgl::errorString() +{ + return errorString(error()); +} + +void QEgl::clearError() +{ + eglGetError(); +} + +EGLint QEgl::error() +{ + return eglGetError(); +} + + // Dump all of the EGL configurations supported by the system. -void QEglContext::dumpAllConfigs() +void QEgl::dumpAllConfigs() { QEglProperties props; EGLint count = 0; @@ -421,23 +426,23 @@ void QEglContext::dumpAllConfigs() EGLConfig *configs = new EGLConfig [count]; eglGetConfigs(display(), configs, count, &count); for (EGLint index = 0; index < count; ++index) { - props = configProperties(configs[index]); + props = QEglProperties(configs[index]); qWarning() << props.toString(); } delete [] configs; } -QString QEglContext::extensions() +QString QEgl::extensions() { - const char* exts = eglQueryString(QEglContext::display(), EGL_EXTENSIONS); + const char* exts = eglQueryString(QEgl::display(), EGL_EXTENSIONS); return QString(QLatin1String(exts)); } -bool QEglContext::hasExtension(const char* extensionName) +bool QEgl::hasExtension(const char* extensionName) { QList extensions = QByteArray(reinterpret_cast - (eglQueryString(QEglContext::display(), EGL_EXTENSIONS))).split(' '); + (eglQueryString(QEgl::display(), EGL_EXTENSIONS))).split(' '); return extensions.contains(extensionName); } diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index eb83002..e48e4a0 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -96,6 +96,8 @@ QT_END_INCLUDE_NAMESPACE QT_BEGIN_NAMESPACE +class QEglProperties; + namespace QEgl { enum API { @@ -108,6 +110,22 @@ namespace QEgl { ExactPixelFormat, BestPixelFormat }; + +// EGLConfig chooseConfig(const QEglProperties* properties, QEgl::PixelFormatMatch match = QEgl::ExactPixelFormat); +// EGLSurface createSurface(QPaintDevice *device, EGLConfig config, const QEglProperties *properties = 0); + + Q_GUI_EXPORT void dumpAllConfigs(); + + Q_GUI_EXPORT void clearError(); + Q_GUI_EXPORT EGLint error(); + Q_GUI_EXPORT QString errorString(EGLint code); + Q_GUI_EXPORT QString errorString(); + + Q_GUI_EXPORT QString extensions(); + Q_GUI_EXPORT bool hasExtension(const char* extensionName); + + Q_GUI_EXPORT EGLDisplay display(); + Q_GUI_EXPORT EGLNativeDisplayType nativeDisplay(); }; diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp index 00341ba..2f79005 100644 --- a/src/gui/egl/qegl_wince.cpp +++ b/src/gui/egl/qegl_wince.cpp @@ -80,16 +80,16 @@ EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties props = 0; EGLSurface surf; if (devType == QInternal::Widget) - surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, props); + surf = eglCreateWindowSurface(QEgl::display(), cfg, windowDrawable, props); else - surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, props); + surf = eglCreatePixmapSurface(QEgl::display(), cfg, pixmapDrawable, props); if (surf == EGL_NO_SURFACE) { qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError()); } return surf; } -EGLNativeDisplayType QEglContext::nativeDisplay() +EGLNativeDisplayType QEgl::nativeDisplay() { HWND win = (static_cast(device))->winId(); HDC myDc = GetDC(win); diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp index cd55849..4a813c6 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -84,17 +84,17 @@ EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties props = 0; EGLSurface surf; if (devType == QInternal::Widget) - surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, props); + surf = eglCreateWindowSurface(QEgl::display(), cfg, windowDrawable, props); else - surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, props); + surf = eglCreatePixmapSurface(QEgl::display(), cfg, pixmapDrawable, props); if (surf == EGL_NO_SURFACE) { qWarning() << "QEglContext::createSurface(): Unable to create EGL surface:" - << errorString(eglGetError()); + << QEgl::errorString(); } return surf; } -EGLNativeDisplayType QEglContext::nativeDisplay() +EGLNativeDisplayType QEgl::nativeDisplay() { Display *xdpy = QX11Info::display(); if (!xdpy) { diff --git a/src/gui/egl/qeglcontext_p.h b/src/gui/egl/qeglcontext_p.h index 3857fb7..c656d1d 100644 --- a/src/gui/egl/qeglcontext_p.h +++ b/src/gui/egl/qeglcontext_p.h @@ -90,24 +90,15 @@ public: bool configAttrib(int name, EGLint *value) const; - static void clearError() { eglGetError(); } - static EGLint error() { return eglGetError(); } - static QString errorString(EGLint code); - - static EGLDisplay display(); - EGLContext context() const { return ctx; } void setContext(EGLContext context) { ctx = context; ownsContext = false;} + EGLDisplay display() {return QEgl::display();} + EGLConfig config() const { return cfg; } void setConfig(EGLConfig config) { cfg = config; } - QEglProperties configProperties(EGLConfig cfg = 0) const; - - void dumpAllConfigs(); - - static QString extensions(); - static bool hasExtension(const char* extensionName); + QEglProperties configProperties() const; private: QEgl::API apiType; @@ -118,9 +109,6 @@ private: bool ownsContext; bool sharing; - static EGLDisplay dpy; - static EGLNativeDisplayType nativeDisplay(); - static QEglContext *currentContext(QEgl::API api); static void setCurrentContext(QEgl::API api, QEglContext *context); }; diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp index b83ae4e..86e158b 100644 --- a/src/gui/egl/qeglproperties.cpp +++ b/src/gui/egl/qeglproperties.cpp @@ -61,7 +61,7 @@ QEglProperties::QEglProperties(EGLConfig cfg) props.append(EGL_NONE); for (int name = 0x3020; name <= 0x304F; ++name) { EGLint value; - if (name != EGL_NONE && eglGetConfigAttrib(QEglContext::display(), cfg, name, &value)) + if (name != EGL_NONE && eglGetConfigAttrib(QEgl::display(), cfg, name, &value)) setValue(name, value); } eglGetError(); // Clear the error state. @@ -274,12 +274,12 @@ static void addTag(QString& str, const QString& tag) void QEglProperties::dumpAllConfigs() { EGLint count = 0; - eglGetConfigs(QEglContext::display(), 0, 0, &count); + eglGetConfigs(QEgl::display(), 0, 0, &count); if (count < 1) return; EGLConfig *configs = new EGLConfig [count]; - eglGetConfigs(QEglContext::display(), configs, count, &count); + eglGetConfigs(QEgl::display(), configs, count, &count); for (EGLint index = 0; index < count; ++index) qWarning() << QEglProperties(configs[index]).toString(); delete [] configs; diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp index 3addea1..90fb2bb 100644 --- a/src/opengl/qgl_egl.cpp +++ b/src/opengl/qgl_egl.cpp @@ -126,7 +126,7 @@ void qt_egl_update_format(const QEglContext& context, QGLFormat& format) // Clear the EGL error state because some of the above may // have errored out because the attribute is not applicable // to the surface type. Such errors don't matter. - context.clearError(); + QEgl::clearError(); } bool QGLFormat::hasOpenGL() diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index 3d183ee..972a5f6 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -609,7 +609,7 @@ EGLConfig Q_OPENGL_EXPORT qt_chooseEGLConfigForPixmap(bool hasAlpha, bool readOn EGLint configCount = 0; do { - eglChooseConfig(QEglContext::display(), configAttribs.properties(), targetConfig, 1, &configCount); + eglChooseConfig(QEgl::display(), configAttribs.properties(), targetConfig, 1, &configCount); if (configCount > 0) { // Got one qDebug() << "Found an" << (hasAlpha ? "ARGB" : "RGB") << (readOnly ? "readonly" : "target" ) @@ -648,7 +648,7 @@ bool Q_OPENGL_EXPORT qt_createEGLSurfaceForPixmap(QPixmapData* pmd, bool readOnl pixmapAttribs.setValue(EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGB); EGLSurface pixmapSurface; - pixmapSurface = eglCreatePixmapSurface(QEglContext::display(), + pixmapSurface = eglCreatePixmapSurface(QEgl::display(), pixmapConfig, (EGLNativePixmapType) pixmapData->handle(), pixmapAttribs.properties()); @@ -656,7 +656,7 @@ bool Q_OPENGL_EXPORT qt_createEGLSurfaceForPixmap(QPixmapData* pmd, bool readOnl // pixmapSurface, pixmapData->handle()); if (pixmapSurface == EGL_NO_SURFACE) { qWarning() << "Failed to create a pixmap surface using config" << (int)pixmapConfig - << ":" << QEglContext::errorString(eglGetError()); + << ":" << QEgl::errorString(); return false; } @@ -693,8 +693,8 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, cons if (!checkedForTFP) { // Check for texture_from_pixmap egl extension checkedForTFP = true; - if (eglContext->hasExtension("EGL_NOKIA_texture_from_pixmap") || - eglContext->hasExtension("EGL_EXT_texture_from_pixmap")) + if (QEgl::hasExtension("EGL_NOKIA_texture_from_pixmap") || + QEgl::hasExtension("EGL_EXT_texture_from_pixmap")) { qDebug("Found texture_from_pixmap EGL extension!"); haveTFP = true; @@ -734,7 +734,7 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, cons EGLBoolean success; success = eglBindTexImage(eglContext->display(), (EGLSurface)pixmapData->gl_surface, EGL_BACK_BUFFER); if (success == EGL_FALSE) { - qWarning() << "eglBindTexImage() failed:" << eglContext->errorString(eglGetError()); + qWarning() << "eglBindTexImage() failed:" << QEgl::errorString(); eglDestroySurface(eglContext->display(), (EGLSurface)pixmapData->gl_surface); pixmapData->gl_surface = (Qt::HANDLE)EGL_NO_SURFACE; haveTFP = false; @@ -757,10 +757,10 @@ void QGLContextPrivate::destroyGlSurfaceForPixmap(QPixmapData* pmd) QX11PixmapData *pixmapData = static_cast(pmd); if (pixmapData->gl_surface) { EGLBoolean success; - success = eglDestroySurface(QEglContext::display(), (EGLSurface)pixmapData->gl_surface); + success = eglDestroySurface(QEgl::display(), (EGLSurface)pixmapData->gl_surface); if (success == EGL_FALSE) { qWarning() << "destroyGlSurfaceForPixmap() - Error deleting surface: " - << QEglContext::errorString(eglGetError()); + << QEgl::errorString(); } pixmapData->gl_surface = 0; } @@ -772,12 +772,12 @@ void QGLContextPrivate::unbindPixmapFromTexture(QPixmapData* pmd) QX11PixmapData *pixmapData = static_cast(pmd); if (pixmapData->gl_surface) { EGLBoolean success; - success = eglReleaseTexImage(QEglContext::display(), + success = eglReleaseTexImage(QEgl::display(), (EGLSurface)pixmapData->gl_surface, EGL_BACK_BUFFER); if (success == EGL_FALSE) { qWarning() << "unbindPixmapFromTexture() - Unable to release bound texture: " - << QEglContext::errorString(eglGetError()); + << QEgl::errorString(); } } } diff --git a/src/opengl/qglpixelbuffer_egl.cpp b/src/opengl/qglpixelbuffer_egl.cpp index 954049d..cee5a1f 100644 --- a/src/opengl/qglpixelbuffer_egl.cpp +++ b/src/opengl/qglpixelbuffer_egl.cpp @@ -137,7 +137,7 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge } #endif if (pbuf == EGL_NO_SURFACE) { - qWarning() << "QGLPixelBufferPrivate::init(): Unable to create EGL pbuffer surface:" << QEglContext::errorString(eglGetError()); + qWarning() << "QGLPixelBufferPrivate::init(): Unable to create EGL pbuffer surface:" << QEgl::errorString(); return false; } @@ -204,7 +204,7 @@ GLuint QGLPixelBuffer::generateDynamicTexture() const bool QGLPixelBuffer::hasOpenGLPbuffers() { // See if we have at least 1 configuration that matches the default format. - EGLDisplay dpy = QEglContext::display(); + EGLDisplay dpy = QEgl::display(); if (dpy == EGL_NO_DISPLAY) return false; QEglProperties configProps; diff --git a/src/opengl/qpixmapdata_x11gl_egl.cpp b/src/opengl/qpixmapdata_x11gl_egl.cpp index 4f1543c..811e554 100644 --- a/src/opengl/qpixmapdata_x11gl_egl.cpp +++ b/src/opengl/qpixmapdata_x11gl_egl.cpp @@ -97,14 +97,14 @@ bool QX11GLPixmapData::hasX11GLPixmaps() #endif EGL_NONE }; - qPixmapARGBSharedEglContext = eglCreateContext(QEglContext::display(), + qPixmapARGBSharedEglContext = eglCreateContext(QEgl::display(), argbConfig, 0, contextAttribs); if (argbConfig == rgbConfig) { // If the configs are the same, we can re-use the same context. qPixmapRGBSharedEglContext = qPixmapARGBSharedEglContext; } else { - qPixmapRGBSharedEglContext = eglCreateContext(QEglContext::display(), + qPixmapRGBSharedEglContext = eglCreateContext(QEgl::display(), rgbConfig, 0, contextAttribs); } @@ -115,13 +115,12 @@ bool QX11GLPixmapData::hasX11GLPixmaps() if (!qt_createEGLSurfaceForPixmap(argbPixmapData, false)) break; - haveX11Pixmaps = eglMakeCurrent(QEglContext::display(), + haveX11Pixmaps = eglMakeCurrent(QEgl::display(), (EGLSurface)argbPixmapData->gl_surface, (EGLSurface)argbPixmapData->gl_surface, qPixmapARGBSharedEglContext); if (!haveX11Pixmaps) { - EGLint err = eglGetError(); - qWarning() << "Unable to make pixmap config current:" << err << QEglContext::errorString(err); + qWarning() << "Unable to make pixmap config current:" << QEgl::errorString(); break; } @@ -135,20 +134,19 @@ bool QX11GLPixmapData::hasX11GLPixmaps() if (!qt_createEGLSurfaceForPixmap(rgbPixmapData, false)) break; - haveX11Pixmaps = eglMakeCurrent(QEglContext::display(), + haveX11Pixmaps = eglMakeCurrent(QEgl::display(), (EGLSurface)rgbPixmapData->gl_surface, (EGLSurface)rgbPixmapData->gl_surface, qPixmapRGBSharedEglContext); if (!haveX11Pixmaps) { - EGLint err = eglGetError(); - qWarning() << "Unable to make pixmap config current:" << err << QEglContext::errorString(err); + qWarning() << "Unable to make pixmap config current:" << QEgl::errorString(); break; } } } while (0); if (qPixmapARGBSharedEglContext || qPixmapRGBSharedEglContext) { - eglMakeCurrent(QEglContext::display(), + eglMakeCurrent(QEgl::display(), EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); } @@ -168,12 +166,12 @@ bool QX11GLPixmapData::hasX11GLPixmaps() if (!haveX11Pixmaps) { // Clean up the context(s) if we can't use X11GL pixmaps if (qPixmapARGBSharedEglContext != EGL_NO_CONTEXT) - eglDestroyContext(QEglContext::display(), qPixmapARGBSharedEglContext); + eglDestroyContext(QEgl::display(), qPixmapARGBSharedEglContext); if (qPixmapRGBSharedEglContext != qPixmapARGBSharedEglContext && qPixmapRGBSharedEglContext != EGL_NO_CONTEXT) { - eglDestroyContext(QEglContext::display(), qPixmapRGBSharedEglContext); + eglDestroyContext(QEgl::display(), qPixmapRGBSharedEglContext); } qPixmapRGBSharedEglContext = EGL_NO_CONTEXT; qPixmapARGBSharedEglContext = EGL_NO_CONTEXT; -- cgit v0.12 From 6378d3d0e851f6af3e518ff53351de3253368026 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 16 Feb 2010 16:15:04 +0100 Subject: Move chooseConfig and createSurface logic to QEgl functions We keep the methods in QEglContext, but these are useful helpers which wrap the QEgl version of the functions, which is where the bulk of the logic is (for these functions anyway). Reviewed-By: Aleksandar Sasha Babic --- src/gui/egl/qegl.cpp | 24 ++++++++++++++++++------ src/gui/egl/qegl_p.h | 7 +++++-- src/gui/egl/qegl_qws.cpp | 3 ++- src/gui/egl/qegl_symbian.cpp | 2 +- src/gui/egl/qegl_wince.cpp | 2 +- src/gui/egl/qegl_x11.cpp | 2 +- 6 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index ef5eb67..6d719ba 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -89,10 +89,10 @@ bool QEglContext::isCurrent() const } // Choose a configuration that matches "properties". -bool QEglContext::chooseConfig - (const QEglProperties& properties, QEgl::PixelFormatMatch match) +EGLConfig QEgl::chooseConfig(const QEglProperties* properties, QEgl::PixelFormatMatch match) { - QEglProperties props(properties); + QEglProperties props(*properties); + EGLConfig cfg = QEGL_NO_CONFIG; do { // Get the number of matching configurations for this set of properties. EGLint matching = 0; @@ -106,7 +106,7 @@ bool QEglContext::chooseConfig eglChooseConfig(display(), props.properties(), &cfg, 1, &matching); if (matching < 1) continue; - return true; + return cfg; } // Fetch all of the matching configurations and find the @@ -127,7 +127,7 @@ bool QEglContext::chooseConfig alpha == props.value(EGL_ALPHA_SIZE))) { cfg = configs[index]; delete [] configs; - return true; + return cfg; } } delete [] configs; @@ -146,9 +146,21 @@ bool QEglContext::chooseConfig qWarning() << "Available:"; QEgl::dumpAllConfigs(); } - return false; + return QEGL_NO_CONFIG; } +bool QEglContext::chooseConfig(const QEglProperties& properties, QEgl::PixelFormatMatch match) +{ + cfg = QEgl::chooseConfig(&properties, match); + return cfg != QEGL_NO_CONFIG; +} + +EGLSurface QEglContext::createSurface(QPaintDevice* device, const QEglProperties *properties) +{ + return QEgl::createSurface(device, cfg, properties); +} + + // Create the EGLContext. bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties *properties) { diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index e48e4a0..a50e4e1 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -93,9 +93,12 @@ typedef NativeDisplayType EGLNativeDisplayType; QT_END_INCLUDE_NAMESPACE +#include QT_BEGIN_NAMESPACE +#define QEGL_NO_CONFIG ((EGLConfig)-1) + class QEglProperties; namespace QEgl { @@ -111,8 +114,8 @@ namespace QEgl { BestPixelFormat }; -// EGLConfig chooseConfig(const QEglProperties* properties, QEgl::PixelFormatMatch match = QEgl::ExactPixelFormat); -// EGLSurface createSurface(QPaintDevice *device, EGLConfig config, const QEglProperties *properties = 0); + Q_GUI_EXPORT EGLConfig chooseConfig(const QEglProperties* configAttribs, QEgl::PixelFormatMatch match = QEgl::ExactPixelFormat); + Q_GUI_EXPORT EGLSurface createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *surfaceAttribs = 0); Q_GUI_EXPORT void dumpAllConfigs(); diff --git a/src/gui/egl/qegl_qws.cpp b/src/gui/egl/qegl_qws.cpp index a40c236..935fe67 100644 --- a/src/gui/egl/qegl_qws.cpp +++ b/src/gui/egl/qegl_qws.cpp @@ -59,9 +59,10 @@ QT_BEGIN_NAMESPACE // We don't have QGLScreen to create EGL surfaces for us, // so surface creation needs to be done in QtOpenGL or // QtOpenVG for Qt/Embedded. -EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties) +EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties) { Q_UNUSED(device); + Q_UNUSED(cfg); Q_UNUSED(properties); return EGL_NO_SURFACE; } diff --git a/src/gui/egl/qegl_symbian.cpp b/src/gui/egl/qegl_symbian.cpp index 0c91fd8..2276ce0 100644 --- a/src/gui/egl/qegl_symbian.cpp +++ b/src/gui/egl/qegl_symbian.cpp @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE -EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties) +EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties) { // Create the native drawable for the paint device. int devType = device->devType(); diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp index 2f79005..fae491b 100644 --- a/src/gui/egl/qegl_wince.cpp +++ b/src/gui/egl/qegl_wince.cpp @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE -EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties) +EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties) { // Create the native drawable for the paint device. int devType = device->devType(); diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp index 4a813c6..d24727a 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE -EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties) +EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties) { // Create the native drawable for the paint device. int devType = device->devType(); -- cgit v0.12 From d0a2d10dfac7be20af78988a3351d374acfdd208 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 16 Feb 2010 17:38:25 +0100 Subject: Make QEgl::createSurface cross-platform and add native getters QEgl::createSurface was virtually identical for every platform apart from the line which returned the native window type. This patch just adds QEgl::nativePixmap and QEgl::nativeWindow which are platform specific (though the default widget->winId() works for everything apart from symbian). Reviewed-By: Aleksandar Sasha Babic --- src/gui/egl/qegl.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++++ src/gui/egl/qegl_p.h | 3 +++ src/gui/egl/qegl_qws.cpp | 12 ---------- src/gui/egl/qegl_symbian.cpp | 37 ++----------------------------- src/gui/egl/qegl_wince.cpp | 38 -------------------------------- src/gui/egl/qegl_x11.cpp | 38 -------------------------------- 6 files changed, 57 insertions(+), 123 deletions(-) diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 6d719ba..ef30029 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -385,6 +385,58 @@ EGLNativeDisplayType QEgl::nativeDisplay() } #endif +#if !defined(Q_OS_SYMBIAN) +EGLNativeWindowType QEgl::nativeWindow(QWidget* widget) +{ + return (EGLNativeWindowType)(widget->winId()); +} +#endif + +EGLNativePixmapType QEgl::nativePixmap(QPixmap* pixmap) +{ + return (EGLNativePixmapType)(pixmap->handle()); +} + +EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties) +{ + // Create the native drawable for the paint device. + int devType = device->devType(); + EGLNativePixmapType pixmapDrawable = 0; + EGLNativeWindowType windowDrawable = 0; + bool ok; + if (devType == QInternal::Pixmap) { + pixmapDrawable = nativePixmap(static_cast(device)); + ok = (pixmapDrawable != 0); + } else if (devType == QInternal::Widget) { + windowDrawable = nativeWindow(static_cast(device)); + ok = (windowDrawable != 0); + } else { + ok = false; + } + if (!ok) { + qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable"); + return EGL_NO_SURFACE; + } + + // Create the EGL surface to draw into, based on the native drawable. + const int *props; + if (properties) + props = properties->properties(); + else + props = 0; + EGLSurface surf; + if (devType == QInternal::Widget) + surf = eglCreateWindowSurface(QEgl::display(), cfg, windowDrawable, props); + else + surf = eglCreatePixmapSurface(QEgl::display(), cfg, pixmapDrawable, props); + if (surf == EGL_NO_SURFACE) { + qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError()); + } + return surf; +} + + + // Return the error string associated with a specific code. QString QEgl::errorString(EGLint code) { diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index a50e4e1..8a9d815 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -128,7 +128,10 @@ namespace QEgl { Q_GUI_EXPORT bool hasExtension(const char* extensionName); Q_GUI_EXPORT EGLDisplay display(); + Q_GUI_EXPORT EGLNativeDisplayType nativeDisplay(); + Q_GUI_EXPORT EGLNativeWindowType nativeWindow(QWidget*); + Q_GUI_EXPORT EGLNativePixmapType nativePixmap(QPixmap*); }; diff --git a/src/gui/egl/qegl_qws.cpp b/src/gui/egl/qegl_qws.cpp index 935fe67..eb41bcc 100644 --- a/src/gui/egl/qegl_qws.cpp +++ b/src/gui/egl/qegl_qws.cpp @@ -55,18 +55,6 @@ QT_BEGIN_NAMESPACE -// Create the surface for a QPixmap, QImage, or QWidget. -// We don't have QGLScreen to create EGL surfaces for us, -// so surface creation needs to be done in QtOpenGL or -// QtOpenVG for Qt/Embedded. -EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties) -{ - Q_UNUSED(device); - Q_UNUSED(cfg); - Q_UNUSED(properties); - return EGL_NO_SURFACE; -} - static QScreen *screenForDevice(QPaintDevice *device) { QScreen *screen = qt_screen; diff --git a/src/gui/egl/qegl_symbian.cpp b/src/gui/egl/qegl_symbian.cpp index 2276ce0..8833b42 100644 --- a/src/gui/egl/qegl_symbian.cpp +++ b/src/gui/egl/qegl_symbian.cpp @@ -50,42 +50,9 @@ QT_BEGIN_NAMESPACE -EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties) +EGLNativeWindowType QEgl::nativeWindow(QWidget* widget) { - // Create the native drawable for the paint device. - int devType = device->devType(); - EGLNativePixmapType pixmapDrawable = 0; - EGLNativeWindowType windowDrawable = 0; - bool ok; - if (devType == QInternal::Pixmap) { - pixmapDrawable = 0; - ok = (pixmapDrawable != 0); - } else if (devType == QInternal::Widget) { - QWidget *w = static_cast(device); - windowDrawable = (EGLNativeWindowType)(w->winId()->DrawableWindow()); - ok = (windowDrawable != 0); - } else { - ok = false; - } - if (!ok) { - qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable"); - return EGL_NO_SURFACE; - } - - // Create the EGL surface to draw into, based on the native drawable. - const int *props; - if (properties) - props = properties->properties(); - else - props = 0; - EGLSurface surf; - if (devType == QInternal::Widget) - surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, props); - else - surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, props); - if (surf == EGL_NO_SURFACE) - qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError()); - return surf; + return (EGLNativeWindowType)(widget->winId()->DrawableWindow()); } // Set pixel format and other properties based on a paint device. diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp index fae491b..b201153 100644 --- a/src/gui/egl/qegl_wince.cpp +++ b/src/gui/egl/qegl_wince.cpp @@ -51,44 +51,6 @@ QT_BEGIN_NAMESPACE -EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties) -{ - // Create the native drawable for the paint device. - int devType = device->devType(); - EGLNativePixmapType pixmapDrawable = 0; - EGLNativeWindowType windowDrawable = 0; - bool ok; - if (devType == QInternal::Pixmap) { - pixmapDrawable = 0; - ok = (pixmapDrawable != 0); - } else if (devType == QInternal::Widget) { - windowDrawable = (EGLNativeWindowType)(static_cast(device))->winId(); - ok = (windowDrawable != 0); - } else { - ok = false; - } - if (!ok) { - qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable"); - return EGL_NO_SURFACE; - } - - // Create the EGL surface to draw into, based on the native drawable. - const int *props; - if (properties) - props = properties->properties(); - else - props = 0; - EGLSurface surf; - if (devType == QInternal::Widget) - surf = eglCreateWindowSurface(QEgl::display(), cfg, windowDrawable, props); - else - surf = eglCreatePixmapSurface(QEgl::display(), cfg, pixmapDrawable, props); - if (surf == EGL_NO_SURFACE) { - qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError()); - } - return surf; -} - EGLNativeDisplayType QEgl::nativeDisplay() { HWND win = (static_cast(device))->winId(); diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp index d24727a..e8fb662 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -55,44 +55,6 @@ QT_BEGIN_NAMESPACE -EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties) -{ - // Create the native drawable for the paint device. - int devType = device->devType(); - EGLNativePixmapType pixmapDrawable = 0; - EGLNativeWindowType windowDrawable = 0; - bool ok; - if (devType == QInternal::Pixmap) { - pixmapDrawable = (EGLNativePixmapType)(static_cast(device))->handle(); - ok = (pixmapDrawable != 0); - } else if (devType == QInternal::Widget) { - windowDrawable = (EGLNativeWindowType)(static_cast(device))->winId(); - ok = (windowDrawable != 0); - } else { - ok = false; - } - if (!ok) { - qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable"); - return EGL_NO_SURFACE; - } - - // Create the EGL surface to draw into, based on the native drawable. - const int *props; - if (properties) - props = properties->properties(); - else - props = 0; - EGLSurface surf; - if (devType == QInternal::Widget) - surf = eglCreateWindowSurface(QEgl::display(), cfg, windowDrawable, props); - else - surf = eglCreatePixmapSurface(QEgl::display(), cfg, pixmapDrawable, props); - if (surf == EGL_NO_SURFACE) { - qWarning() << "QEglContext::createSurface(): Unable to create EGL surface:" - << QEgl::errorString(); - } - return surf; -} EGLNativeDisplayType QEgl::nativeDisplay() { -- cgit v0.12 From 551b41e20118b66edb37704a0cfbfe5d3a960067 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Thu, 18 Feb 2010 09:58:57 +0100 Subject: Add QEgl::defaultConfig method to select configs suitable for Qt Reviewed-By: TrustMe --- src/gui/egl/qegl.cpp | 163 +++++++++++++++++++++++++++++++++++++++++ src/gui/egl/qegl_p.h | 15 ++++ src/gui/egl/qeglproperties.cpp | 10 +++ 3 files changed, 188 insertions(+) diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index ef30029..8bd4d7f 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -88,6 +88,169 @@ bool QEglContext::isCurrent() const return current; } +EGLConfig QEgl::defaultConfig(QPaintDevice* device, API api, ConfigOptions options) +{ + int devType = device->devType(); + + if ( (devType != QInternal::Pixmap) && ((options & Renderable) == 0)) + qWarning("QEgl::defaultConfig() - Only configs for pixmaps make sense to be read-only!"); + + EGLConfig* targetConfig = 0; + + static EGLConfig defaultVGConfigs[] = { + QEGL_NO_CONFIG, // 0 Window Renderable Translucent + QEGL_NO_CONFIG, // 1 Window Renderable Opaque + QEGL_NO_CONFIG, // 2 Pixmap Renderable Translucent + QEGL_NO_CONFIG, // 3 Pixmap Renderable Opaque + QEGL_NO_CONFIG, // 4 Pixmap ReadOnly Translucent + QEGL_NO_CONFIG // 5 Pixmap ReadOnly Opaque + }; + if (api == OpenVG) { + if (devType == QInternal::Widget) { + if (options & Translucent) + targetConfig = &(defaultVGConfigs[0]); + else + targetConfig = &(defaultVGConfigs[1]); + } else if (devType == QInternal::Pixmap) { + if (options & Renderable) { + if (options & Translucent) + targetConfig = &(defaultVGConfigs[2]); + else // Opaque + targetConfig = &(defaultVGConfigs[3]); + } else { // Read-only + if (options & Translucent) + targetConfig = &(defaultVGConfigs[4]); + else // Opaque + targetConfig = &(defaultVGConfigs[5]); + } + } + } + + + static EGLConfig defaultGLConfigs[] = { + QEGL_NO_CONFIG, // 0 Window Renderable Translucent + QEGL_NO_CONFIG, // 1 Window Renderable Opaque + QEGL_NO_CONFIG, // 2 PBuffer Renderable Translucent + QEGL_NO_CONFIG, // 3 PBuffer Renderable Opaque + QEGL_NO_CONFIG, // 4 Pixmap Renderable Translucent + QEGL_NO_CONFIG, // 5 Pixmap Renderable Opaque + QEGL_NO_CONFIG, // 6 Pixmap ReadOnly Translucent + QEGL_NO_CONFIG // 7 Pixmap ReadOnly Opaque + }; + if (api == OpenGL) { + if (devType == QInternal::Widget) { + if (options & Translucent) + targetConfig = &(defaultGLConfigs[0]); + else // Opaque + targetConfig = &(defaultGLConfigs[1]); + } else if (devType == QInternal::Pbuffer) { + if (options & Translucent) + targetConfig = &(defaultGLConfigs[2]); + else // Opaque + targetConfig = &(defaultGLConfigs[3]); + } else if (devType == QInternal::Pixmap) { + if (options & Renderable) { + if (options & Translucent) + targetConfig = &(defaultGLConfigs[4]); + else // Opaque + targetConfig = &(defaultGLConfigs[5]); + } else { // ReadOnly + if (options & Translucent) + targetConfig = &(defaultGLConfigs[6]); + else // Opaque + targetConfig = &(defaultGLConfigs[7]); + } + } + } + + if (!targetConfig) { + qWarning("QEgl::defaultConfig() - No default config for device/api/options combo"); + return QEGL_NO_CONFIG; + } + if (*targetConfig != QEGL_NO_CONFIG) + return *targetConfig; + + + // We haven't found an EGL config for the target config yet, so do it now: + + + // Allow overriding from an environment variable: + QByteArray configId; + if (api == OpenVG) + configId = qgetenv("QT_VG_EGL_CONFIG"); + else + configId = qgetenv("QT_GL_EGL_CONFIG"); + if (!configId.isEmpty()) { + // Overriden, so get the EGLConfig for the specified config ID: + EGLint properties[] = { + EGL_CONFIG_ID, (EGLint)configId.toInt(), + EGL_NONE + }; + EGLint configCount = 0; + eglChooseConfig(display(), properties, targetConfig, 1, &configCount); + if (configCount > 0) + return *targetConfig; + qWarning() << "QEgl::defaultConfig() -" << configId << "appears to be invalid"; + } + + QEglProperties configAttribs; + configAttribs.setRenderableType(api); + + EGLint surfaceType; + switch (devType) { + case QInternal::Widget: + surfaceType = EGL_WINDOW_BIT; + break; + case QInternal::Pixmap: + surfaceType = EGL_PIXMAP_BIT; + break; + case QInternal::Pbuffer: + surfaceType = EGL_PBUFFER_BIT; + break; + default: + qWarning("QEgl::defaultConfig() - Can't create EGL surface for %d device type", devType); + return QEGL_NO_CONFIG; + }; +#ifdef EGL_VG_ALPHA_FORMAT_PRE_BIT + // For OpenVG, we try to create a surface using a pre-multiplied format if + // the surface needs to have an alpha channel: + if (api == OpenVG && (options & Translucent)) + surfaceType |= EGL_VG_ALPHA_FORMAT_PRE_BIT; +#endif + configAttribs.setValue(EGL_SURFACE_TYPE, surfaceType); + +#ifdef EGL_BIND_TO_TEXTURE_RGBA + if (devType == QInternal::Pixmap || devType == QInternal::Pbuffer) { + if (options & Translucent) + configAttribs.setValue(EGL_BIND_TO_TEXTURE_RGBA, EGL_TRUE); + else + configAttribs.setValue(EGL_BIND_TO_TEXTURE_RGB, EGL_TRUE); + } +#endif + + // Add paint engine requirements + if (api == OpenVG) { +#ifndef QVG_SCISSOR_CLIP + configAttribs.setValue(EGL_ALPHA_MASK_SIZE, 1); +#endif + } else { + // Both OpenGL paint engines need to have stencil and sample buffers + configAttribs.setValue(EGL_STENCIL_SIZE, 1); + configAttribs.setValue(EGL_SAMPLE_BUFFERS, 1); +#ifndef QT_OPENGL_ES_2 + // Aditionally, the GL1 engine likes to have a depth buffer for clipping + configAttribs.setValue(EGL_DEPTH_SIZE, 1); +#endif + } + + // Finally, set the color format based on the device: + configAttribs.setPaintDeviceFormat(device); + + *targetConfig = chooseConfig(&configAttribs, QEgl::BestPixelFormat); + return *targetConfig; +} + + // Choose a configuration that matches "properties". EGLConfig QEgl::chooseConfig(const QEglProperties* properties, QEgl::PixelFormatMatch match) { diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index 8a9d815..1a5e4c0 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -114,6 +114,21 @@ namespace QEgl { BestPixelFormat }; + enum ConfigOptions + { + Opaque = 0x00, + Translucent = 0x01, + + ReadOnly = 0x00, + Renderable = 0x02 // Config will be compatable with the paint engines (VG or GL) + }; + + // Most of the time we use the same config for things like widgets & pixmaps, so rather than + // go through the eglChooseConfig loop every time, we use defaultConfig, which will return + // the config for a particular device/api/option combo. This function assumes that once a + // config is chosen for a particular combo, it's safe to always use that combo. + Q_GUI_EXPORT EGLConfig defaultConfig(QPaintDevice* device, API api, ConfigOptions options); + Q_GUI_EXPORT EGLConfig chooseConfig(const QEglProperties* configAttribs, QEgl::PixelFormatMatch match = QEgl::ExactPixelFormat); Q_GUI_EXPORT EGLSurface createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *surfaceAttribs = 0); diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp index 86e158b..e0e8481 100644 --- a/src/gui/egl/qeglproperties.cpp +++ b/src/gui/egl/qeglproperties.cpp @@ -230,6 +230,16 @@ void QEglProperties::setRenderableType(QEgl::API api) // reductions in complexity are possible. bool QEglProperties::reduceConfiguration() { +#ifdef EGL_VG_ALPHA_FORMAT_PRE_BIT + // For OpenVG, we sometimes try to create a surface using a pre-multiplied format. If we can't + // find a config which supports pre-multiplied formats, remove the flag on the surface type: + EGLint surfaceType = value(EGL_SURFACE_TYPE); + if (surfaceType & EGL_VG_ALPHA_FORMAT_PRE_BIT) { + surfaceType ^= EGL_VG_ALPHA_FORMAT_PRE_BIT; + setValue(EGL_SURFACE_TYPE, surfaceType); + return true; + } +#endif // EGL chooses configs with the highest color depth over // those with smaller (but faster) lower color depths. One // way around this is to set EGL_BUFFER_SIZE to 16, which -- cgit v0.12 From 4c5549269144eae79bdcefc7119b2adf3044e000 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Fri, 19 Feb 2010 15:54:09 +0100 Subject: Add getCompatibleVisualId to QEgl on X11 This method takes an EGLConfig and hands back an X11 VisualID which can be used to create native windows/pixmaps which will have an EGL surface created for them using the given EGL config. Reviewed-By: TrustMe --- src/gui/egl/qegl_p.h | 4 ++ src/gui/egl/qegl_x11.cpp | 145 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 149 insertions(+) diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index 1a5e4c0..7f753d0 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -147,6 +147,10 @@ namespace QEgl { Q_GUI_EXPORT EGLNativeDisplayType nativeDisplay(); Q_GUI_EXPORT EGLNativeWindowType nativeWindow(QWidget*); Q_GUI_EXPORT EGLNativePixmapType nativePixmap(QPixmap*); + +#ifdef Q_WS_X11 + Q_GUI_EXPORT VisualID getCompatibleVisualId(EGLConfig config); +#endif }; diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp index e8fb662..2c0bbd3 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -116,4 +116,149 @@ void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev) setVisualFormat(qt_x11Info(dev)); } + +VisualID QEgl::getCompatibleVisualId(EGLConfig config) +{ + VisualID visualId = 0; + EGLint eglValue = 0; + + EGLint configRedSize = 0; + eglGetConfigAttrib(display(), config, EGL_RED_SIZE, &configRedSize); + + EGLint configGreenSize = 0; + eglGetConfigAttrib(display(), config, EGL_GREEN_SIZE, &configGreenSize); + + EGLint configBlueSize = 0; + eglGetConfigAttrib(display(), config, EGL_BLUE_SIZE, &configBlueSize); + + EGLint configAlphaSize = 0; + eglGetConfigAttrib(display(), config, EGL_ALPHA_SIZE, &configAlphaSize); + + eglGetConfigAttrib(display(), config, EGL_BUFFER_SIZE, &eglValue); + int configBitDepth = eglValue; + + // See if EGL provided a valid VisualID: + eglGetConfigAttrib(display(), config, EGL_NATIVE_VISUAL_ID, &eglValue); + visualId = (VisualID)eglValue; + if (visualId) { + // EGL has suggested a visual id, so get the rest of the visual info for that id: + XVisualInfo visualInfoTemplate; + memset(&visualInfoTemplate, 0, sizeof(XVisualInfo)); + visualInfoTemplate.visualid = visualId; + + XVisualInfo *chosenVisualInfo; + int matchingCount = 0; + chosenVisualInfo = XGetVisualInfo(X11->display, VisualIDMask, &visualInfoTemplate, &matchingCount); + if (chosenVisualInfo) { + if (configBitDepth == chosenVisualInfo->depth) { +#if !defined(QT_NO_XRENDER) + // If we have XRender, actually check the visual supplied by EGL is ARGB + if (configAlphaSize > 0) { + XRenderPictFormat *format; + format = XRenderFindVisualFormat(X11->display, chosenVisualInfo->visual); + if (!format || (format->type != PictTypeDirect) || (!format->direct.alphaMask)) { + qWarning("Warning: EGL suggested using X visual ID %d for config %d, but this is not ARGB", + (int)visualId, (int)config); + visualId = 0; + } + } +#endif + } else { + qWarning("Warning: EGL suggested using X visual ID %d (%d bpp) for config %d (%d bpp), but the depths do not match!", + (int)visualId, chosenVisualInfo->depth, (int)config, configBitDepth); + visualId = 0; + } + } + XFree(chosenVisualInfo); + } + + if (visualId) { +#ifdef QT_DEBUG_X11_VISUAL_SELECTION + if (configHasAlpha) + qDebug("Using ARGB Visual ID %d provided by EGL for config %d", (int)visualId, (int)config); + else + qDebug("Using Opaque Visual ID %d provided by EGL for config %d", (int)visualId, (int)config); +#endif + return visualId; + } + + + // If EGL didn't give us a valid visual ID, try XRender +#if !defined(QT_NO_XRENDER) + if (!visualId) { + XVisualInfo visualInfoTemplate; + memset(&visualInfoTemplate, 0, sizeof(XVisualInfo)); + + visualInfoTemplate.depth = configBitDepth; + visualInfoTemplate.c_class = TrueColor; + + XVisualInfo *matchingVisuals; + int matchingCount = 0; + matchingVisuals = XGetVisualInfo(X11->display, + VisualDepthMask|VisualClassMask, + &visualInfoTemplate, + &matchingCount); + + for (int i = 0; i < matchingCount; ++i) { + XRenderPictFormat *format; + format = XRenderFindVisualFormat(X11->display, matchingVisuals[i].visual); + + // Check the format for the visual matches the EGL config + if ( (countBits(format->direct.redMask) == configRedSize) && + (countBits(format->direct.greenMask) == configGreenSize) && + (countBits(format->direct.blueMask) == configBlueSize) && + (countBits(format->direct.alphaMask) == configAlphaSize) ) + { + visualId = matchingVisuals[i].visualid; + break; + } + } + if (matchingVisuals) + XFree(matchingVisuals); + + } + if (visualId) { +# ifdef QT_DEBUG_X11_VISUAL_SELECTION + if (configHasAlpha) + qDebug("Using ARGB Visual ID %d provided by XRender for EGL config %d", (int)visualId, (int)config); + else + qDebug("Using Opaque Visual ID %d provided by XRender for EGL config %d", (int)visualId, (int)config); +# endif // QT_DEBUG_X11_VISUAL_SELECTION + return visualId; + } +#endif //!defined(QT_NO_XRENDER) + + + // Finally, if XRender also failed to find a visual (or isn't present), try to + // use XGetVisualInfo and only use the bit depth to match on: + if (!visualId) { + XVisualInfo visualInfoTemplate; + memset(&visualInfoTemplate, 0, sizeof(XVisualInfo)); + + visualInfoTemplate.depth = configBitDepth; + + XVisualInfo *matchingVisuals; + int matchingCount = 0; + matchingVisuals = XGetVisualInfo(X11->display, + VisualDepthMask, + &visualInfoTemplate, + &matchingCount); + if (matchingVisuals) { + visualId = matchingVisuals[0].visualid; + XFree(matchingVisuals); + } + } + + if (visualId) { +#ifdef QT_DEBUG_X11_VISUAL_SELECTION + qDebug("Using Visual ID %d provided by XGetVisualInfo for EGL config %d", (int)visualId, (int)config); +#endif + return visualId; + } + + qWarning("Unable to find an X11 visual which matches EGL config %d", (int)config); + return (VisualID)0; +} + + QT_END_NAMESPACE -- cgit v0.12 From c993aef82eca9f5d5241093f407179e4189ab7f1 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Fri, 19 Feb 2010 18:17:08 +0100 Subject: Add QEglContext::configAttrib(int name) helper Reviewed-By: TrustMe --- src/gui/egl/qegl.cpp | 10 ++++++++++ src/gui/egl/qeglcontext_p.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 8bd4d7f..d4c9913 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -510,6 +510,16 @@ bool QEglContext::configAttrib(int name, EGLint *value) const return eglGetConfigAttrib(QEgl::display(), cfg, name, value); } +int QEglContext::configAttrib(int name) const +{ + EGLint value; + EGLBoolean success = eglGetConfigAttrib(QEgl::display(), cfg, name, &value); + if (success) + return value; + else + return EGL_DONT_CARE; +} + QEglProperties QEglContext::configProperties() const { return QEglProperties(config()); diff --git a/src/gui/egl/qeglcontext_p.h b/src/gui/egl/qeglcontext_p.h index c656d1d..7eec7eb 100644 --- a/src/gui/egl/qeglcontext_p.h +++ b/src/gui/egl/qeglcontext_p.h @@ -89,6 +89,7 @@ public: void waitClient(); bool configAttrib(int name, EGLint *value) const; + int configAttrib(int name) const; EGLContext context() const { return ctx; } void setContext(EGLContext context) { ctx = context; ownsContext = false;} -- cgit v0.12 From 445b62cb432deb8aed3be766d3c37b9567e1d4ec Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Fri, 19 Feb 2010 18:29:42 +0100 Subject: Make QGLWidget use new QEgl::getCompatibleVisualId API Reviewed-By: TrustMe --- src/gui/egl/qegl_x11.cpp | 5 +++-- src/opengl/qgl_x11egl.cpp | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp index 2c0bbd3..49c8d60 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -116,6 +116,7 @@ void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev) setVisualFormat(qt_x11Info(dev)); } +//#define QT_DEBUG_X11_VISUAL_SELECTION 1 VisualID QEgl::getCompatibleVisualId(EGLConfig config) { @@ -174,7 +175,7 @@ VisualID QEgl::getCompatibleVisualId(EGLConfig config) if (visualId) { #ifdef QT_DEBUG_X11_VISUAL_SELECTION - if (configHasAlpha) + if (configAlphaSize > 0) qDebug("Using ARGB Visual ID %d provided by EGL for config %d", (int)visualId, (int)config); else qDebug("Using Opaque Visual ID %d provided by EGL for config %d", (int)visualId, (int)config); @@ -219,7 +220,7 @@ VisualID QEgl::getCompatibleVisualId(EGLConfig config) } if (visualId) { # ifdef QT_DEBUG_X11_VISUAL_SELECTION - if (configHasAlpha) + if (configAlphaSize > 0) qDebug("Using ARGB Visual ID %d provided by XRender for EGL config %d", (int)visualId, (int)config); else qDebug("Using Opaque Visual ID %d provided by XRender for EGL config %d", (int)visualId, (int)config); diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index 972a5f6..b8da156 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -282,6 +282,7 @@ void QGLWidget::updateOverlayGL() } //#define QT_DEBUG_X11_VISUAL_SELECTION 1 +//#undef QT_DEBUG_X11_VISUAL_SELECTION bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig config, const QX11Info &x11Info, bool useArgbVisual) { @@ -471,10 +472,21 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, if (visible) hide(); - XVisualInfo vi; QEglContext *eglContext = d->glcx->d_func()->eglContext; - bool usingArgbVisual = qt_egl_setup_x11_visual(vi, eglContext->display(), eglContext->config(), - x11Info(), tryArgbVisual); + + XVisualInfo vi; + memset(&vi, 0, sizeof(XVisualInfo)); + vi.visualid = QEgl::getCompatibleVisualId(eglContext->config()); + + { + XVisualInfo *visualInfoPtr; + int matchingCount = 0; + visualInfoPtr = XGetVisualInfo(X11->display, VisualIDMask, &vi, &matchingCount); + vi = *visualInfoPtr; + XFree(visualInfoPtr); + } + + bool usingArgbVisual = eglContext->configAttrib(EGL_ALPHA_SIZE) > 0; XSetWindowAttributes a; -- cgit v0.12 From dbc62b34b54ec3294f1cf8248630fbd1eaad9cbc Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 23 Feb 2010 18:08:08 +0100 Subject: Remove qt_egl_setup_x11_visual This method has been re-written as QEgl::getCompatibleVisualId() which is much cleaner code. Reviewed-By: TrustMe --- src/opengl/qgl_x11egl.cpp | 150 +--------------------------------------------- 1 file changed, 1 insertion(+), 149 deletions(-) diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index b8da156..99ff5b8 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -53,9 +53,6 @@ QT_BEGIN_NAMESPACE -bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig config, - const QX11Info &x11Info, bool useArgbVisual); - /* QGLTemporaryContext implementation */ @@ -107,15 +104,7 @@ QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *) int numVisuals; EGLint id = 0; - eglGetConfigAttrib(d->display, config, EGL_NATIVE_VISUAL_ID, &id); - if (id == 0) { - // EGL_NATIVE_VISUAL_ID is optional and might not be supported - // on some implementations - we'll have to do it the hard way - QX11Info xinfo; - qt_egl_setup_x11_visual(visualInfo, d->display, config, xinfo, false); - } else { - visualInfo.visualid = id; - } + visualInfo.visualid = QEgl::getCompatibleVisualId(config); vi = XGetVisualInfo(X11->display, VisualIDMask, &visualInfo, &numVisuals); if (!vi || numVisuals < 1) { qWarning("QGLTemporaryContext: Unable to get X11 visual info id."); @@ -281,143 +270,6 @@ void QGLWidget::updateOverlayGL() //handle overlay } -//#define QT_DEBUG_X11_VISUAL_SELECTION 1 -//#undef QT_DEBUG_X11_VISUAL_SELECTION - -bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig config, const QX11Info &x11Info, bool useArgbVisual) -{ - bool foundVisualIsArgb = useArgbVisual; - -#ifdef QT_DEBUG_X11_VISUAL_SELECTION - qDebug("qt_egl_setup_x11_visual() - useArgbVisual=%d", useArgbVisual); -#endif - - memset(&vi, 0, sizeof(XVisualInfo)); - - EGLint eglConfigColorSize; - eglGetConfigAttrib(display, config, EGL_BUFFER_SIZE, &eglConfigColorSize); - - // Check to see if EGL is suggesting an appropriate visual id: - EGLint nativeVisualId; - eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &nativeVisualId); - vi.visualid = nativeVisualId; - - if (vi.visualid) { - // EGL has suggested a visual id, so get the rest of the visual info for that id: - XVisualInfo *chosenVisualInfo; - int matchingCount = 0; - chosenVisualInfo = XGetVisualInfo(x11Info.display(), VisualIDMask, &vi, &matchingCount); - if (chosenVisualInfo) { -#if !defined(QT_NO_XRENDER) - if (useArgbVisual) { - // Check to make sure the visual provided by EGL is ARGB - XRenderPictFormat *format; - format = XRenderFindVisualFormat(x11Info.display(), chosenVisualInfo->visual); - if (format->type == PictTypeDirect && format->direct.alphaMask) { -#ifdef QT_DEBUG_X11_VISUAL_SELECTION - qDebug("Using ARGB X Visual ID (%d) provided by EGL", (int)vi.visualid); -#endif - foundVisualIsArgb = true; - vi = *chosenVisualInfo; - } - else { - qWarning("Warning: EGL suggested using X visual ID %d for config %d, but this is not ARGB", - nativeVisualId, (int)config); - vi.visualid = 0; - } - } else -#endif - { - if (eglConfigColorSize == chosenVisualInfo->depth) { -#ifdef QT_DEBUG_X11_VISUAL_SELECTION - qDebug("Using opaque X Visual ID (%d) provided by EGL", (int)vi.visualid); -#endif - vi = *chosenVisualInfo; - } else - qWarning("Warning: EGL suggested using X visual ID %d (%d bpp) for config %d (%d bpp), but the depths do not match!", - nativeVisualId, chosenVisualInfo->depth, (int)config, eglConfigColorSize); - } - XFree(chosenVisualInfo); - } - else { - qWarning("Warning: EGL suggested using X visual ID %d for config %d, but this seems to be invalid!", - nativeVisualId, (int)config); - vi.visualid = 0; - } - } - - // If EGL does not know the visual ID, so try to select an appropriate one ourselves, first - // using XRender if we're supposed to have an alpha, then falling back to XGetVisualInfo - -#if !defined(QT_NO_XRENDER) - if (vi.visualid == 0 && useArgbVisual) { - // Try to use XRender to find an ARGB visual we can use - vi.screen = x11Info.screen(); - vi.depth = 32; //### We might at some point (soon) get ARGB4444 - vi.c_class = TrueColor; - XVisualInfo *matchingVisuals; - int matchingCount = 0; - matchingVisuals = XGetVisualInfo(x11Info.display(), - VisualScreenMask|VisualDepthMask|VisualClassMask, - &vi, &matchingCount); - - for (int i = 0; i < matchingCount; ++i) { - XRenderPictFormat *format; - format = XRenderFindVisualFormat(x11Info.display(), matchingVisuals[i].visual); - if (format->type == PictTypeDirect && format->direct.alphaMask) { - vi = matchingVisuals[i]; - foundVisualIsArgb = true; -#ifdef QT_DEBUG_X11_VISUAL_SELECTION - qDebug("Using X Visual ID (%d) for ARGB visual as provided by XRender", (int)vi.visualid); -#endif - break; - } - } - XFree(matchingVisuals); - } -#endif - - if (vi.visualid == 0) { - EGLint depth; - eglGetConfigAttrib(display, config, EGL_BUFFER_SIZE, &depth); - int err; - err = XMatchVisualInfo(x11Info.display(), x11Info.screen(), depth, TrueColor, &vi); - if (err == 0) { - qWarning("Warning: Can't find an X visual which matches the EGL config(%d)'s depth (%d)!", - (int)config, depth); - depth = x11Info.depth(); - err = XMatchVisualInfo(x11Info.display(), x11Info.screen(), depth, TrueColor, &vi); - if (err == 0) { - qWarning("Error: Couldn't get any matching X visual!"); - return false; - } else - qWarning(" - Falling back to X11 suggested depth (%d)", depth); - } -#ifdef QT_DEBUG_X11_VISUAL_SELECTION - else - qDebug("Using X Visual ID (%d) for EGL provided depth (%d)", (int)vi.visualid, depth); -#endif - - // Don't try to use ARGB now unless the visual is 32-bit - even then it might stil fail :-( - if (useArgbVisual) - foundVisualIsArgb = vi.depth == 32; //### We might at some point (soon) get ARGB4444 - } - -#ifdef QT_DEBUG_X11_VISUAL_SELECTION - qDebug("Visual Info:"); - qDebug(" bits_per_rgb=%d", vi.bits_per_rgb); - qDebug(" red_mask=0x%x", vi.red_mask); - qDebug(" green_mask=0x%x", vi.green_mask); - qDebug(" blue_mask=0x%x", vi.blue_mask); - qDebug(" colormap_size=%d", vi.colormap_size); - qDebug(" c_class=%d", vi.c_class); - qDebug(" depth=%d", vi.depth); - qDebug(" screen=%d", vi.screen); - qDebug(" visualid=%d", vi.visualid); -#endif - return foundVisualIsArgb; -} - void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, bool deleteOldContext) { Q_D(QGLWidget); -- cgit v0.12 From ebdfa7270f67e4ce3b5034aa5144fdabeaecbbcd Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 24 Feb 2010 13:41:29 +0100 Subject: Use QEgl::display in QGLTemporaryContext so EGL is init'd only once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-By: Trond Kjernåsen --- src/opengl/qgl_x11egl.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index 99ff5b8..ff58fba 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -76,12 +76,7 @@ QGLTemporaryContext::QGLTemporaryContext(bool, QWidget *) d->surface = 0; int screen = 0; - d->display = eglGetDisplay(EGLNativeDisplayType(X11->display)); - - if (!eglInitialize(d->display, NULL, NULL)) { - qWarning("QGLTemporaryContext: Unable to initialize EGL display."); - return; - } + d->display = QEgl::display(); EGLConfig config; int numConfigs = 0; -- cgit v0.12 From a2eddea1432d6e558dcd620cd5100ce4531975e8 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 24 Feb 2010 17:26:11 +0100 Subject: Replace qt_egl_add_platform_config with existing QEglProperties API QEglProperties::setPaintDeviceFormat() seems to be a copy & paste of qt_egl_add_platform_config for every platform anyway. Reviewed-By: TrustMe --- src/opengl/qgl_egl_p.h | 1 - src/opengl/qgl_qws.cpp | 17 +---------------- src/opengl/qgl_wince.cpp | 12 +----------- src/opengl/qgl_x11egl.cpp | 8 +------- 4 files changed, 3 insertions(+), 35 deletions(-) diff --git a/src/opengl/qgl_egl_p.h b/src/opengl/qgl_egl_p.h index 518b500..1d8cbf1 100644 --- a/src/opengl/qgl_egl_p.h +++ b/src/opengl/qgl_egl_p.h @@ -62,7 +62,6 @@ class QGLFormat; void qt_egl_set_format(QEglProperties& props, int deviceType, const QGLFormat& f); void qt_egl_update_format(const QEglContext& context, QGLFormat& format); -void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device); QT_END_NAMESPACE diff --git a/src/opengl/qgl_qws.cpp b/src/opengl/qgl_qws.cpp index fd17a27..c221134 100644 --- a/src/opengl/qgl_qws.cpp +++ b/src/opengl/qgl_qws.cpp @@ -119,21 +119,6 @@ bool QGLFormat::hasOpenGLOverlays() return false; } -void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device) -{ - // Find the QGLScreen for this paint device. - QGLScreen *glScreen = glScreenForDevice(device); - if (!glScreen) { - qWarning("QGLContext::chooseContext(): The screen is not a QGLScreen"); - return; - } - int devType = device->devType(); - if (devType == QInternal::Image) - props.setPixelFormat(static_cast(device)->format()); - else - props.setPixelFormat(glScreen->pixelFormat()); -} - static EGLSurface qt_egl_create_surface (QEglContext *context, QPaintDevice *device, const QEglProperties *properties = 0) @@ -201,8 +186,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // Construct the configuration we need for this surface. QEglProperties configProps; - qt_egl_add_platform_config(configProps, device()); qt_egl_set_format(configProps, devType, d->glFormat); + configProps.setPaintDeviceFormat(device()); configProps.setRenderableType(QEgl::OpenGL); // Search for a matching configuration, reducing the complexity diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp index 2b71201..ed8b4f7 100644 --- a/src/opengl/qgl_wince.cpp +++ b/src/opengl/qgl_wince.cpp @@ -122,16 +122,6 @@ QGLTemporaryContext::~QGLTemporaryContext() QGLFormat Win32/WGL-specific code *****************************************************************************/ -void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device) -{ - int devType = device->devType(); - if (devType == QInternal::Image) - props.setPixelFormat(static_cast(device)->format()); - else - props.setPixelFormat(QImage::Format_RGB16); -} - - static bool opengl32dll = false; bool QGLFormat::hasOpenGLOverlays() @@ -159,8 +149,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // Construct the configuration we need for this surface. QEglProperties configProps; - qt_egl_add_platform_config(configProps, device()); qt_egl_set_format(configProps, devType, d->glFormat); + configProps.setPaintDeviceFormat(device()); configProps.setRenderableType(QEgl::OpenGL); // Search for a matching configuration, reducing the complexity diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index ff58fba..21ddfe3 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -154,12 +154,6 @@ bool QGLFormat::hasOpenGLOverlays() return false; } -void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device) -{ - if (device->devType() == QInternal::Image) - props.setPixelFormat(static_cast(device)->format()); -} - // Chooses the EGL config and creates the EGL context bool QGLContext::chooseContext(const QGLContext* shareContext) { @@ -178,7 +172,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // Construct the configuration we need for this surface. QEglProperties configProps; qt_egl_set_format(configProps, devType, d->glFormat); - qt_egl_add_platform_config(configProps, device()); + configProps.setPaintDeviceFormat(device()); configProps.setRenderableType(QEgl::OpenGL); #if We_have_an_EGL_library_which_bothers_to_check_EGL_BUFFER_SIZE -- cgit v0.12 From f936cc4e2a7b377981a626b1d45dbbb1c1df1cb8 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Mon, 1 Mar 2010 12:59:34 +0100 Subject: Move EGL surface type setting to new QEglProperties::setDeviceType Also renamed qt_egl_set_format->qt_eglproperties_set_glformat Reviewed-By: TrustMe --- src/gui/egl/qeglproperties.cpp | 11 +++++++ src/gui/egl/qeglproperties_p.h | 4 +-- src/opengl/qgl_egl.cpp | 62 ++++++++++++++++++--------------------- src/opengl/qgl_egl_p.h | 2 +- src/opengl/qgl_qws.cpp | 3 +- src/opengl/qgl_wince.cpp | 3 +- src/opengl/qgl_x11egl.cpp | 3 +- src/opengl/qglpixelbuffer_egl.cpp | 6 ++-- 8 files changed, 53 insertions(+), 41 deletions(-) diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp index e0e8481..636f469 100644 --- a/src/gui/egl/qeglproperties.cpp +++ b/src/gui/egl/qeglproperties.cpp @@ -167,6 +167,17 @@ bool QEglProperties::removeValue(int name) return false; } +void QEglProperties::setDeviceType(int devType) +{ + if (devType == QInternal::Pixmap || devType == QInternal::Image) + setValue(EGL_SURFACE_TYPE, EGL_PIXMAP_BIT); + else if (devType == QInternal::Pbuffer) + setValue(EGL_SURFACE_TYPE, EGL_PBUFFER_BIT); + else + setValue(EGL_SURFACE_TYPE, EGL_WINDOW_BIT); +} + + // Sets the red, green, blue, and alpha sizes based on a pixel format. // Normally used to match a configuration request to the screen format. void QEglProperties::setPixelFormat(QImage::Format pixelFormat) diff --git a/src/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h index 496847b..eebcf72 100644 --- a/src/gui/egl/qeglproperties_p.h +++ b/src/gui/egl/qeglproperties_p.h @@ -82,9 +82,9 @@ public: #ifdef Q_WS_X11 void setVisualFormat(const QX11Info *xinfo); #endif - void setRenderableType(QEgl::API api); - + void setDeviceType(int devType); void setPaintDeviceFormat(QPaintDevice *dev); + void setRenderableType(QEgl::API api); bool reduceConfiguration(); diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp index 90fb2bb..f1abab8 100644 --- a/src/opengl/qgl_egl.cpp +++ b/src/opengl/qgl_egl.cpp @@ -45,44 +45,40 @@ QT_BEGIN_NAMESPACE -// Set device configuration attributes from a QGLFormat instance. -void qt_egl_set_format(QEglProperties& props, int deviceType, const QGLFormat& f) +void qt_eglproperties_set_glformat(QEglProperties& eglProperties, const QGLFormat& glFormat) { - if (deviceType == QInternal::Pixmap || deviceType == QInternal::Image) - props.setValue(EGL_SURFACE_TYPE, EGL_PIXMAP_BIT); - else if (deviceType == QInternal::Pbuffer) - props.setValue(EGL_SURFACE_TYPE, EGL_PBUFFER_BIT); - else - props.setValue(EGL_SURFACE_TYPE, EGL_WINDOW_BIT); - - // Set the pixel format to that contained in the QGLFormat - // if the system hasn't already chosen a fixed format to - // match the pixmap, widget, etc. - if (props.value(EGL_RED_SIZE) == 0 || f.redBufferSize() != -1) - props.setValue(EGL_RED_SIZE, f.redBufferSize() == -1 ? 1 : f.redBufferSize()); - if (props.value(EGL_GREEN_SIZE) == 0 || f.greenBufferSize() != -1) - props.setValue(EGL_GREEN_SIZE, f.greenBufferSize() == -1 ? 1 : f.greenBufferSize()); - if (props.value(EGL_BLUE_SIZE) == 0 || f.blueBufferSize() != -1) - props.setValue(EGL_BLUE_SIZE, f.blueBufferSize() == -1 ? 1 : f.blueBufferSize()); - if (f.alpha()) { - if (props.value(EGL_ALPHA_SIZE) == 0 || f.alphaBufferSize() != -1) - props.setValue(EGL_ALPHA_SIZE, f.alphaBufferSize() == -1 ? 1 : f.alphaBufferSize()); + // NOTE: QGLFormat uses a magic value of -1 to indicate "don't care", even when a buffer of that + // type has been requested. + if (glFormat.depth()) { + int depthSize = glFormat.depthBufferSize(); + eglProperties.setValue(EGL_DEPTH_SIZE, depthSize == -1 ? 1 : depthSize); } - - if (f.depth()) - props.setValue(EGL_DEPTH_SIZE, f.depthBufferSize() == -1 ? 1 : f.depthBufferSize()); - if (f.stencil()) - props.setValue(EGL_STENCIL_SIZE, f.stencilBufferSize() == -1 ? 1 : f.stencilBufferSize()); - if (f.sampleBuffers()) { - props.setValue(EGL_SAMPLE_BUFFERS, 1); - props.setValue(EGL_SAMPLES, f.samples() == -1 ? 1 : f.samples()); - } else { - props.setValue(EGL_SAMPLE_BUFFERS, 0); + if (glFormat.stencil()) { + int stencilSize = glFormat.stencilBufferSize(); + eglProperties.setValue(EGL_STENCIL_SIZE, stencilSize == -1 ? 1 : stencilSize); + } + if (glFormat.sampleBuffers()) { + int sampleCount = glFormat.samples(); + eglProperties.setValue(EGL_SAMPLES, sampleCount == -1 ? 1 : sampleCount); + eglProperties.setValue(EGL_SAMPLE_BUFFERS, 1); + } + if (glFormat.alpha()) { + int alphaSize = glFormat.alphaBufferSize(); + eglProperties.setValue(EGL_ALPHA_SIZE, alphaSize == -1 ? 1 : alphaSize); } - if (deviceType == QInternal::Widget) - props.setValue(EGL_LEVEL, f.plane()); + + int redSize = glFormat.redBufferSize(); + int greenSize = glFormat.greenBufferSize(); + int blueSize = glFormat.blueBufferSize(); + int alphaSize = glFormat.alphaBufferSize(); + + eglProperties.setValue(EGL_RED_SIZE, redSize > 0 ? redSize : 1); + eglProperties.setValue(EGL_GREEN_SIZE, greenSize > 0 ? greenSize : 1); + eglProperties.setValue(EGL_BLUE_SIZE, blueSize > 0 ? blueSize : 1); + eglProperties.setValue(EGL_ALPHA_SIZE, alphaSize > 0 ? alphaSize : 0); } + // Updates "format" with the parameters of the selected configuration. void qt_egl_update_format(const QEglContext& context, QGLFormat& format) { diff --git a/src/opengl/qgl_egl_p.h b/src/opengl/qgl_egl_p.h index 1d8cbf1..6b65227 100644 --- a/src/opengl/qgl_egl_p.h +++ b/src/opengl/qgl_egl_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE class QGLFormat; -void qt_egl_set_format(QEglProperties& props, int deviceType, const QGLFormat& f); +void qt_eglproperties_set_glformat(QEglProperties& props, const QGLFormat& format); void qt_egl_update_format(const QEglContext& context, QGLFormat& format); QT_END_NAMESPACE diff --git a/src/opengl/qgl_qws.cpp b/src/opengl/qgl_qws.cpp index c221134..f72f051 100644 --- a/src/opengl/qgl_qws.cpp +++ b/src/opengl/qgl_qws.cpp @@ -186,7 +186,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // Construct the configuration we need for this surface. QEglProperties configProps; - qt_egl_set_format(configProps, devType, d->glFormat); + qt_eglproperties_set_glformat(configProps, d->glFormat); + configProps.setDeviceType(devType); configProps.setPaintDeviceFormat(device()); configProps.setRenderableType(QEgl::OpenGL); diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp index ed8b4f7..3bf7f3a 100644 --- a/src/opengl/qgl_wince.cpp +++ b/src/opengl/qgl_wince.cpp @@ -149,7 +149,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // Construct the configuration we need for this surface. QEglProperties configProps; - qt_egl_set_format(configProps, devType, d->glFormat); + qt_eglproperties_set_glformat(configProps, d->glFormat); + configProps.setDeviceType(devType); configProps.setPaintDeviceFormat(device()); configProps.setRenderableType(QEgl::OpenGL); diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index 21ddfe3..7be4973 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -171,7 +171,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // Construct the configuration we need for this surface. QEglProperties configProps; - qt_egl_set_format(configProps, devType, d->glFormat); + qt_eglproperties_set_glformat(configProps, d->glFormat); + configProps.setDeviceType(devType); configProps.setPaintDeviceFormat(device()); configProps.setRenderableType(QEgl::OpenGL); diff --git a/src/opengl/qglpixelbuffer_egl.cpp b/src/opengl/qglpixelbuffer_egl.cpp index cee5a1f..ee0714f 100644 --- a/src/opengl/qglpixelbuffer_egl.cpp +++ b/src/opengl/qglpixelbuffer_egl.cpp @@ -82,7 +82,8 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge #endif } else { QEglProperties configProps; - qt_egl_set_format(configProps, QInternal::Pbuffer, f); + qt_eglproperties_set_glformat(configProps, f); + configProps.setDeviceType(QInternal::Pbuffer); configProps.setRenderableType(ctx->api()); bool ok = false; #if QGL_RENDER_TEXTURE @@ -208,7 +209,8 @@ bool QGLPixelBuffer::hasOpenGLPbuffers() if (dpy == EGL_NO_DISPLAY) return false; QEglProperties configProps; - qt_egl_set_format(configProps, QInternal::Pbuffer, QGLFormat::defaultFormat()); + qt_eglproperties_set_glformat(configProps, QGLFormat::defaultFormat()); + configProps.setDeviceType(QInternal::Pbuffer); configProps.setRenderableType(QEgl::OpenGL); do { EGLConfig cfg = 0; -- cgit v0.12 From b2cbb880273ae6516d68be5b5f3f9b614c31ca79 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Mon, 1 Mar 2010 14:12:23 +0100 Subject: Move QGLWidget::setContext logic into QEgl & QGLContext QEgl::createSurface() on X11 will now check to see if the device's X11 Visual is compatible with the EGLConfig passed in. If it is not compatible, the function will re-create the QPaintDevice's native drawable with a different Visual (one which is compatable with the EGLConfig). This represented the bulk of the QGLWidget::setContext method which is now much simpler. As a consequense of this change, QWidgets with graphicssystem opengl will behave much more like QGLWidget as most of the code is re-used. So things like WA_TranslucentBackground should now work with opengl graphicssystem too. Reviewed-By: TrustMe --- src/gui/egl/qegl.cpp | 3 +- src/gui/egl/qegl_x11.cpp | 121 +++++++++++++++++++++++++++ src/gui/image/qpixmap_x11_p.h | 1 + src/gui/kernel/qwidget.h | 1 + src/opengl/qgl_x11egl.cpp | 173 +++++++++++++-------------------------- src/opengl/qwindowsurface_gl.cpp | 12 --- 6 files changed, 180 insertions(+), 131 deletions(-) diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index d4c9913..e2002ed 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -570,6 +570,7 @@ EGLNativePixmapType QEgl::nativePixmap(QPixmap* pixmap) return (EGLNativePixmapType)(pixmap->handle()); } +#ifndef Q_WS_X11 EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties) { // Create the native drawable for the paint device. @@ -607,7 +608,7 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglPr } return surf; } - +#endif // Return the error string associated with a specific code. diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp index 49c8d60..b710889 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include "qegl_p.h" #include "qeglcontext_p.h" @@ -261,5 +262,125 @@ VisualID QEgl::getCompatibleVisualId(EGLConfig config) return (VisualID)0; } +void qt_set_winid_on_widget(QWidget* w, Qt::HANDLE id) +{ + w->create(id); +} + + +// NOTE: The X11 version of createSurface will re-create the native drawable if it's visual doesn't +// match the one for the passed in EGLConfig +EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEglProperties *unusedProperties) +{ + Q_UNUSED(unusedProperties); + + int devType = device->devType(); + + if (devType == QInternal::Pbuffer) { + // TODO + return EGL_NO_SURFACE; + } + + QX11PixmapData *x11PixmapData = 0; + if (devType == QInternal::Pixmap) { + QPixmapData *pmd = static_cast(device)->data_ptr().data(); + if (pmd->classId() == QPixmapData::X11Class) + x11PixmapData = static_cast(pmd); + else { + // TODO: Replace the pixmap's data with a new QX11PixmapData + qWarning("WARNING: Creating an EGL surface on a QPixmap is only supported for QX11PixmapData"); + return EGL_NO_SURFACE; + } + } else if ((devType != QInternal::Widget) && (devType != QInternal::Pbuffer)) { + qWarning("WARNING: Creating an EGLSurface for device type %d isn't supported", devType); + return EGL_NO_SURFACE; + } + + VisualID visualId = QEgl::getCompatibleVisualId(config); + EGLint alphaSize; + eglGetConfigAttrib(QEgl::display(), config, EGL_ALPHA_SIZE, &alphaSize); + + if (devType == QInternal::Widget) { + QWidget *widget = static_cast(device); + + VisualID currentVisualId = 0; + if (widget->testAttribute(Qt::WA_WState_Created)) + currentVisualId = XVisualIDFromVisual((Visual*)widget->x11Info().visual()); + + if (currentVisualId != visualId) { + // The window is either not created or has the wrong visual. Either way, we need + // to create a window with the correct visual and call create() on the widget: + + bool visible = widget->isVisible(); + if (visible) + widget->hide(); + + XVisualInfo visualInfo; + visualInfo.visualid = visualId; + { + XVisualInfo *visualInfoPtr; + int matchingCount = 0; + visualInfoPtr = XGetVisualInfo(widget->x11Info().display(), VisualIDMask, + &visualInfo, &matchingCount); + Q_ASSERT(visualInfoPtr); // visualId really should be valid! + visualInfo = *visualInfoPtr; + XFree(visualInfoPtr); + } + + Window parentWindow = RootWindow(widget->x11Info().display(), widget->x11Info().screen()); + if (widget->parentWidget()) + parentWindow = widget->parentWidget()->winId(); + + XSetWindowAttributes windowAttribs; + QColormap colmap = QColormap::instance(widget->x11Info().screen()); + windowAttribs.background_pixel = colmap.pixel(widget->palette().color(widget->backgroundRole())); + windowAttribs.border_pixel = colmap.pixel(Qt::black); + + unsigned int valueMask = CWBackPixel|CWBorderPixel; + if (alphaSize > 0) { + windowAttribs.colormap = XCreateColormap(widget->x11Info().display(), parentWindow, + visualInfo.visual, AllocNone); + valueMask |= CWColormap; + } + + Window window = XCreateWindow(widget->x11Info().display(), parentWindow, + widget->x(), widget->y(), widget->width(), widget->height(), + 0, visualInfo.depth, InputOutput, visualInfo.visual, + valueMask, &windowAttribs); + + // This is a nasty hack to get round the fact that we can't be a friend of QWidget: + qt_set_winid_on_widget(widget, window); + + if (visible) + widget->show(); + } + + // At this point, the widget's window should be created and have the correct visual. Now we + // just need to create the EGL surface for it: + return eglCreateWindowSurface(QEgl::display(), config, (EGLNativeWindowType)widget->winId(), 0); + } + + if (x11PixmapData) { + VisualID currentVisualId = XVisualIDFromVisual((Visual*)qt_x11Info(device)->visual()); + if (visualId != currentVisualId) + qWarning("Error: The QPixmap's visual does not match the EGLConfig's visual!"); + + QEglProperties surfaceAttribs; + + // If the pixmap can't be bound to a texture, it's pretty useless + surfaceAttribs.setValue(EGL_TEXTURE_TARGET, EGL_TEXTURE_2D); + if (alphaSize > 0) + surfaceAttribs.setValue(EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGBA); + else + surfaceAttribs.setValue(EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGB); + + return eglCreatePixmapSurface(QEgl::display(), config, + (EGLNativePixmapType) x11PixmapData->handle(), + surfaceAttribs.properties()); + } + + return EGL_NO_SURFACE; +} + QT_END_NAMESPACE diff --git a/src/gui/image/qpixmap_x11_p.h b/src/gui/image/qpixmap_x11_p.h index 0c0a9bd..7bc586d 100644 --- a/src/gui/image/qpixmap_x11_p.h +++ b/src/gui/image/qpixmap_x11_p.h @@ -105,6 +105,7 @@ private: friend class QRasterWindowSurface; friend class QGLContextPrivate; // Needs to access xinfo, gl_surface & flags friend class QEglContext; // Needs gl_surface + friend class QGLContext; // Needs gl_surface friend class QX11GLPixmapData; // Needs gl_surface friend bool qt_createEGLSurfaceForPixmap(QPixmapData*, bool); // Needs gl_surface diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h index 0d7475e9..e12148b 100644 --- a/src/gui/kernel/qwidget.h +++ b/src/gui/kernel/qwidget.h @@ -773,6 +773,7 @@ private: #ifdef Q_WS_X11 friend void qt_net_update_user_time(QWidget *tlw, unsigned long timestamp); friend void qt_net_remove_user_time(QWidget *tlw); + friend void qt_set_winid_on_widget(QWidget*, Qt::HANDLE); #endif friend Q_GUI_EXPORT QWidgetData *qt_qwidget_data(QWidget *widget); diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index 7be4973..18a2ee5 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -48,6 +48,7 @@ #include "qgl_egl_p.h" #include "qcolormap.h" #include +#include QT_BEGIN_NAMESPACE @@ -164,55 +165,53 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) int devType = device()->devType(); - // Get the display and initialize it. + QX11PixmapData *x11PixmapData = 0; + if (devType == QInternal::Pixmap) { + QPixmapData *pmd = static_cast(device())->data_ptr().data(); + if (pmd->classId() == QPixmapData::X11Class) + x11PixmapData = static_cast(pmd); + else { + // TODO: Replace the pixmap's data with a new QX11PixmapData + qWarning("WARNING: Creating a QGLContext on a QPixmap is only supported for X11 pixmap backend"); + return false; + } + } else if ((devType != QInternal::Widget) && (devType != QInternal::Pbuffer)) { + qWarning("WARNING: Creating a QGLContext not supported on device type %d", devType); + return false; + } + + // Only create the eglContext if we don't already have one: if (d->eglContext == 0) { d->eglContext = new QEglContext(); d->eglContext->setApi(QEgl::OpenGL); + // If the device is a widget with WA_TranslucentBackground set, make sure the glFormat + // has the alpha channel option set: + if (devType == QInternal::Widget) { + QWidget* widget = static_cast(device()); + if (widget->testAttribute(Qt::WA_TranslucentBackground)) + d->glFormat.setAlpha(true); + } + // Construct the configuration we need for this surface. QEglProperties configProps; - qt_eglproperties_set_glformat(configProps, d->glFormat); configProps.setDeviceType(devType); - configProps.setPaintDeviceFormat(device()); configProps.setRenderableType(QEgl::OpenGL); + qt_eglproperties_set_glformat(configProps, d->glFormat); -#if We_have_an_EGL_library_which_bothers_to_check_EGL_BUFFER_SIZE - if (device()->depth() == 16 && configProps.value(EGL_ALPHA_SIZE) <= 0) { - qDebug("Setting EGL_BUFFER_SIZE to 16"); + // Use EGL_BUFFER_SIZE to make sure we prefer a 16-bit config over a 32-bit config + if (device()->depth() == 16 && !d->glFormat.alpha()) configProps.setValue(EGL_BUFFER_SIZE, 16); - configProps.setValue(EGL_ALPHA_SIZE, 0); - } if (!d->eglContext->chooseConfig(configProps, QEgl::BestPixelFormat)) { delete d->eglContext; d->eglContext = 0; return false; } -#else - QEgl::PixelFormatMatch matchType = QEgl::BestPixelFormat; - if ((device()->depth() == 16) && configProps.value(EGL_ALPHA_SIZE) == 0) { - configProps.setValue(EGL_RED_SIZE, 5); - configProps.setValue(EGL_GREEN_SIZE, 6); - configProps.setValue(EGL_BLUE_SIZE, 5); - configProps.setValue(EGL_ALPHA_SIZE, 0); - matchType = QEgl::ExactPixelFormat; - } - - // Search for a matching configuration, reducing the complexity - // each time until we get something that matches. - if (!d->eglContext->chooseConfig(configProps, matchType)) { - delete d->eglContext; - d->eglContext = 0; - return false; - } -#endif - -// qDebug("QGLContext::chooseContext() - using EGL config %d:", d->eglContext->config()); -// qDebug() << QEglProperties(d->eglContext->config()).toString(); // Create a new context for the configuration. - if (!d->eglContext->createContext - (shareContext ? shareContext->d_func()->eglContext : 0)) { + QEglContext* eglSharedContext = shareContext ? shareContext->d_func()->eglContext : 0; + if (!d->eglContext->createContext(eglSharedContext)) { delete d->eglContext; d->eglContext = 0; return false; @@ -220,16 +219,34 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) d->sharing = d->eglContext->isSharing(); if (d->sharing && shareContext) const_cast(shareContext)->d_func()->sharing = true; - -#if defined(EGL_VERSION_1_1) - if (d->glFormat.swapInterval() != -1 && devType == QInternal::Widget) - eglSwapInterval(d->eglContext->display(), d->glFormat.swapInterval()); -#endif } // Inform the higher layers about the actual format properties. qt_egl_update_format(*(d->eglContext), d->glFormat); + + // Do don't create the EGLSurface for everything. + // QWidget - yes, create the EGLSurface and store it in QGLContextPrivate::eglSurface + // QGLWidget - yes, create the EGLSurface and store it in QGLContextPrivate::eglSurface + // QPixmap - yes, create the EGLSurface but store it in QX11PixmapData::gl_surface + // QGLPixelBuffer - no, it creates the surface itself + + if (devType == QInternal::Widget) { + if (d->eglSurface != EGL_NO_SURFACE) + eglDestroySurface(d->eglContext->display(), d->eglSurface); + d->eglSurface = QEgl::createSurface(device(), d->eglContext->config()); + XFlush(X11->display); + setWindowCreated(true); + } + + if (x11PixmapData) { + // TODO: Actually check to see if the existing surface can be re-used + if (x11PixmapData->gl_surface) + eglDestroySurface(d->eglContext->display(), (EGLSurface)x11PixmapData->gl_surface); + + x11PixmapData->gl_surface = (Qt::HANDLE)QEgl::createSurface(device(), d->eglContext->config()); + } + return true; } @@ -277,20 +294,6 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, QGLContext* oldcx = d->glcx; d->glcx = context; - if (parentWidget()) { - // force creation of delay-created widgets - parentWidget()->winId(); - if (parentWidget()->x11Info().screen() != x11Info().screen()) - d_func()->xinfo = parentWidget()->d_func()->xinfo; - } - - // If the application has set WA_TranslucentBackground and not explicitly set - // the alpha buffer size to zero, modify the format so it have an alpha channel - QGLFormat& fmt = d->glcx->d_func()->glFormat; - const bool tryArgbVisual = testAttribute(Qt::WA_TranslucentBackground) || fmt.alpha(); - if (tryArgbVisual && fmt.alphaBufferSize() == -1) - fmt.setAlphaBufferSize(1); - bool createFailed = false; if (!d->glcx->isValid()) { // Create the QGLContext here, which in turn chooses the EGL config @@ -304,74 +307,8 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, return; } - if (d->glcx->windowCreated() || d->glcx->deviceIsPixmap()) { - if (deleteOldContext) - delete oldcx; - return; - } - - bool visible = isVisible(); - if (visible) - hide(); - - QEglContext *eglContext = d->glcx->d_func()->eglContext; - - XVisualInfo vi; - memset(&vi, 0, sizeof(XVisualInfo)); - vi.visualid = QEgl::getCompatibleVisualId(eglContext->config()); - - { - XVisualInfo *visualInfoPtr; - int matchingCount = 0; - visualInfoPtr = XGetVisualInfo(X11->display, VisualIDMask, &vi, &matchingCount); - vi = *visualInfoPtr; - XFree(visualInfoPtr); - } - - bool usingArgbVisual = eglContext->configAttrib(EGL_ALPHA_SIZE) > 0; - - XSetWindowAttributes a; - - Window p = RootWindow(x11Info().display(), x11Info().screen()); - if (parentWidget()) - p = parentWidget()->winId(); - - QColormap colmap = QColormap::instance(vi.screen); - a.background_pixel = colmap.pixel(palette().color(backgroundRole())); - a.border_pixel = colmap.pixel(Qt::black); - - unsigned int valueMask = CWBackPixel|CWBorderPixel; - if (usingArgbVisual) { - a.colormap = XCreateColormap(x11Info().display(), p, vi.visual, AllocNone); - valueMask |= CWColormap; - } - - Window w = XCreateWindow(x11Info().display(), p, x(), y(), width(), height(), - 0, vi.depth, InputOutput, vi.visual, valueMask, &a); - - if (deleteOldContext) - delete oldcx; - oldcx = 0; - - create(w); // Create with the ID of the window we've just created - - - // Create the EGL surface to draw into. - QGLContextPrivate *ctxpriv = d->glcx->d_func(); - ctxpriv->eglSurface = ctxpriv->eglContext->createSurface(this); - if (ctxpriv->eglSurface == EGL_NO_SURFACE) { - delete ctxpriv->eglContext; - ctxpriv->eglContext = 0; - return; - } - - d->eglSurfaceWindowId = w; // Remember the window id we created the surface for - - if (visible) - show(); - XFlush(X11->display); - d->glcx->setWindowCreated(true); + d->eglSurfaceWindowId = winId(); // Remember the window id we created the surface for } void QGLWidgetPrivate::init(QGLContext *context, const QGLWidget* shareWidget) @@ -380,7 +317,7 @@ void QGLWidgetPrivate::init(QGLContext *context, const QGLWidget* shareWidget) initContext(context, shareWidget); - if(q->isValid() && glcx->format().hasOverlay()) { + if (q->isValid() && glcx->format().hasOverlay()) { //no overlay qWarning("QtOpenGL ES doesn't currently support overlays"); } diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 0334cbc..ca88de3 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -353,18 +353,6 @@ void QGLWindowSurface::hijackWindow(QWidget *widget) QGLContext *ctx = new QGLContext(surfaceFormat, widget); ctx->create(qt_gl_share_widget()->context()); -#if defined(Q_WS_X11) && defined(QT_OPENGL_ES) - // Create the EGL surface to draw into. QGLContext::chooseContext() - // does not do this for X11/EGL, but does do it for other platforms. - // This probably belongs in qgl_x11egl.cpp. - QGLContextPrivate *ctxpriv = ctx->d_func(); - ctxpriv->eglSurface = ctxpriv->eglContext->createSurface(widget); - if (ctxpriv->eglSurface == EGL_NO_SURFACE) { - qWarning() << "hijackWindow() could not create EGL surface"; - } - qDebug("QGLWindowSurface - using EGLConfig %d", reinterpret_cast(ctxpriv->eglContext->config())); -#endif - widgetPrivate->extraData()->glContext = ctx; union { QGLContext **ctxPtr; void **voidPtr; }; -- cgit v0.12 From 9c1ff07b427765beb71755e964b017d8258b834e Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Mon, 1 Mar 2010 16:53:17 +0100 Subject: Make bindTextureFromNativePixmap use new QEgl APIs The old qt_chooseEGLConfigForPixmap & qt_createEGLSurfaceForPixmap code will remain until QX11GLPixmapData can be re-written properly. Reviewed-By: TrustMe --- src/gui/egl/qegl.cpp | 8 +++----- src/gui/egl/qegl_p.h | 6 ++---- src/gui/egl/qegl_x11.cpp | 23 ++++++++++++++++++++--- src/gui/image/qpixmap_x11.cpp | 4 ++-- src/gui/image/qpixmap_x11_p.h | 9 +++++---- src/opengl/qgl_x11egl.cpp | 9 +++++++-- 6 files changed, 39 insertions(+), 20 deletions(-) diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index e2002ed..1bfba10 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -88,10 +88,8 @@ bool QEglContext::isCurrent() const return current; } -EGLConfig QEgl::defaultConfig(QPaintDevice* device, API api, ConfigOptions options) +EGLConfig QEgl::defaultConfig(int devType, API api, ConfigOptions options) { - int devType = device->devType(); - if ( (devType != QInternal::Pixmap) && ((options & Renderable) == 0)) qWarning("QEgl::defaultConfig() - Only configs for pixmaps make sense to be read-only!"); @@ -243,8 +241,8 @@ EGLConfig QEgl::defaultConfig(QPaintDevice* device, API api, ConfigOptions optio #endif } - // Finally, set the color format based on the device: - configAttribs.setPaintDeviceFormat(device); + if (options & Translucent) + configAttribs.setValue(EGL_ALPHA_SIZE, 1); *targetConfig = chooseConfig(&configAttribs, QEgl::BestPixelFormat); return *targetConfig; diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index 7f753d0..aa89772 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -116,10 +116,8 @@ namespace QEgl { enum ConfigOptions { - Opaque = 0x00, + NoOptions = 0, Translucent = 0x01, - - ReadOnly = 0x00, Renderable = 0x02 // Config will be compatable with the paint engines (VG or GL) }; @@ -127,7 +125,7 @@ namespace QEgl { // go through the eglChooseConfig loop every time, we use defaultConfig, which will return // the config for a particular device/api/option combo. This function assumes that once a // config is chosen for a particular combo, it's safe to always use that combo. - Q_GUI_EXPORT EGLConfig defaultConfig(QPaintDevice* device, API api, ConfigOptions options); + Q_GUI_EXPORT EGLConfig defaultConfig(int devType, API api, ConfigOptions options); Q_GUI_EXPORT EGLConfig chooseConfig(const QEglProperties* configAttribs, QEgl::PixelFormatMatch match = QEgl::ExactPixelFormat); Q_GUI_EXPORT EGLSurface createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *surfaceAttribs = 0); diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp index b710889..a4bfcac 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -361,9 +361,26 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg } if (x11PixmapData) { - VisualID currentVisualId = XVisualIDFromVisual((Visual*)qt_x11Info(device)->visual()); - if (visualId != currentVisualId) - qWarning("Error: The QPixmap's visual does not match the EGLConfig's visual!"); + // X11 Pixmaps are only created with a depth, so that's all we need to check + EGLint configDepth; + eglGetConfigAttrib(QEgl::display(), config, EGL_BUFFER_SIZE , &configDepth); + if (x11PixmapData->depth() != configDepth) { + // The bit depths are wrong which means the EGLConfig isn't compatable with + // this pixmap. So we need to replace the pixmap's existing data with a new + // one which is created with the correct depth: + +#ifndef QT_NO_XRENDER + if (configDepth == 32) { + qWarning("Warning: EGLConfig's depth (32) != pixmap's depth (%d), converting to ARGB32", + x11PixmapData->depth()); + x11PixmapData->convertToARGB32(true); + } else +#endif + { + qWarning("Warning: EGLConfig's depth (%d) != pixmap's depth (%d)", + configDepth, x11PixmapData->depth()); + } + } QEglProperties surfaceAttribs; diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp index b976376..5a882af 100644 --- a/src/gui/image/qpixmap_x11.cpp +++ b/src/gui/image/qpixmap_x11.cpp @@ -314,8 +314,8 @@ static int qt_pixmap_serial = 0; int Q_GUI_EXPORT qt_x11_preferred_pixmap_depth = 0; QX11PixmapData::QX11PixmapData(PixelType type) - : QPixmapData(type, X11Class), hd(0), - flags(Uninitialized), x11_mask(0), picture(0), mask_picture(0), hd2(0), gl_surface(0), + : QPixmapData(type, X11Class), gl_surface(0), hd(0), + flags(Uninitialized), x11_mask(0), picture(0), mask_picture(0), hd2(0), share_mode(QPixmap::ImplicitlyShared), pengine(0) { } diff --git a/src/gui/image/qpixmap_x11_p.h b/src/gui/image/qpixmap_x11_p.h index 7bc586d..521a612 100644 --- a/src/gui/image/qpixmap_x11_p.h +++ b/src/gui/image/qpixmap_x11_p.h @@ -94,6 +94,11 @@ public: static Qt::HANDLE createBitmapFromImage(const QImage &image); + Qt::HANDLE gl_surface; +#ifndef QT_NO_XRENDER + void convertToARGB32(bool preserveContents = true); +#endif + protected: int metric(QPaintDevice::PaintDeviceMetric metric) const; @@ -131,10 +136,6 @@ private: Qt::HANDLE picture; Qt::HANDLE mask_picture; Qt::HANDLE hd2; // sorted in the default display depth - Qt::HANDLE gl_surface; -#ifndef QT_NO_XRENDER - void convertToARGB32(bool preserveContents = true); -#endif QPixmap::ShareMode share_mode; QX11PaintEngine *pengine; diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index 18a2ee5..bcde8c4 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -508,8 +508,13 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, cons } if (pixmapData->gl_surface == 0) { - bool success = qt_createEGLSurfaceForPixmap(pixmapData, true); - if (!success) { + EGLConfig config = QEgl::defaultConfig(QInternal::Pixmap, + QEgl::OpenGL, + hasAlpha ? QEgl::Translucent : QEgl::NoOptions); + + QPixmap tmpPixmap(pixmapData); //### + pixmapData->gl_surface = (Qt::HANDLE)QEgl::createSurface(&tmpPixmap, config); + if (pixmapData->gl_surface == (Qt::HANDLE)EGL_NO_SURFACE) { haveTFP = false; return 0; } -- cgit v0.12 From 5363237c164667aa38433eefe8646aafee328b59 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 2 Mar 2010 09:40:55 +0100 Subject: qdoc: Second attempt, QML doc stuff. This change caused a crash on several platforms before, but not on mine, of course. It outputs a list of new QML elements on the What's New in 4.7 page, and it outputs the "Inherited by" list on each QML elemnent page for elements that are inherited by other elements. I can't see why it should crash anything, but I have included some debug output. I think the crash might have something to do with QList, which qdoc3 uses heavily. If it crashes for you, please get a stack trace and the debug output. --- tools/qdoc3/cppcodeparser.cpp | 2 +- tools/qdoc3/generator.cpp | 29 +++++++++++++++++++++ tools/qdoc3/generator.h | 7 +++++ tools/qdoc3/htmlgenerator.cpp | 60 +++++++++++++++++++++++-------------------- tools/qdoc3/htmlgenerator.h | 2 ++ tools/qdoc3/node.cpp | 9 ++++--- tools/qdoc3/node.h | 6 ++--- 7 files changed, 79 insertions(+), 36 deletions(-) diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 021d64a..d9e9c3b 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -1034,7 +1034,7 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc, else if (command == COMMAND_QMLINHERITS) { setLink(node, Node::InheritsLink, arg); if (node->subType() == Node::QmlClass) { - QmlClassNode::addInheritedBy(arg,node->name()); + QmlClassNode::addInheritedBy(arg,node); } } else if (command == COMMAND_QMLDEFAULT) { diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 6a8899a..40fd0e2 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -1186,6 +1186,35 @@ void Generator::appendSortedNames(Text& text, } } +void Generator::appendSortedQmlNames(Text& text, + const Node* base, + const NodeList& subs, + CodeMarker *marker) +{ + NodeList::ConstIterator r; + QMap classMap; + int index = 0; + + qDebug() << "Generator::appendSortedQmlNames():" << base->name() << "is inherited by..."; + + r = subs.begin(); + while (r != subs.end()) { + Text t; + qDebug() << " " << (*r)->name(); + appendFullName(t, (*r), base, marker); + classMap[t.toString().toLower()] = t; + ++r; + } + + QStringList names = classMap.keys(); + names.sort(); + + foreach (const QString &name, names) { + text << classMap[name]; + text << separator(index++, names.count()); + } +} + int Generator::skipAtoms(const Atom *atom, Atom::Type type) const { int skipAhead = 0; diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h index 44f56e2..30d9af4 100644 --- a/tools/qdoc3/generator.h +++ b/tools/qdoc3/generator.h @@ -169,6 +169,13 @@ class Generator const QList &classes, CodeMarker *marker); + protected: + void appendSortedQmlNames(Text& text, + const Node* base, + const NodeList& subs, + CodeMarker *marker); + + private: QString amp; QString lt; QString gt; diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index e767460..411a886 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -73,6 +73,7 @@ QString HtmlGenerator::sinceTitles[] = " New Typedefs", " New Properties", " New Variables", + " New QML Elements", " New Qml Properties", " New Qml Signals", " New Qml Methods", @@ -687,6 +688,8 @@ int HtmlGenerator::generateAtom(const Atom *atom, nsmap = newSinceMaps.find(atom->string()); NewClassMaps::const_iterator ncmap; ncmap = newClassMaps.find(atom->string()); + NewClassMaps::const_iterator nqcmap; + nqcmap = newQmlClassMaps.find(atom->string()); if ((nsmap != newSinceMaps.constEnd()) && !nsmap.value().isEmpty()) { QList
sections; QList
::ConstIterator s; @@ -697,6 +700,13 @@ int HtmlGenerator::generateAtom(const Atom *atom, while (n != nsmap.value().constEnd()) { const Node* node = n.value(); switch (node->type()) { + case Node::Fake: + if (node->subType() == Node::QmlClass) { + sections[QmlClass].appendMember((Node*)node); + //qDebug() << "HtmlGenerator::generateAtom(): Atom::SinceList, append" + // << node->name(); + } + break; case Node::Namespace: sections[Namespace].appendMember((Node*)node); break; @@ -782,6 +792,8 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "

" << protectEnc((*s).name) << "

\n"; if (idx == Class) generateCompactList(0, marker, ncmap.value(), QString("Q")); + else if (idx == QmlClass) + generateCompactList(0, marker, nqcmap.value(), QString("Q")); else if (idx == MemberFunction) { ParentMaps parentmaps; ParentMaps::iterator pmap; @@ -2332,7 +2344,11 @@ void HtmlGenerator::generateCompactList(const Node *relative, out() << ""; - QStringList pieces = fullName(it.value(), relative, marker).split("::"); + QStringList pieces; + if (it.value()->subType() == Node::QmlClass) + pieces << it.value()->name(); + else + pieces = fullName(it.value(), relative, marker).split("::"); out() << protectEnc(pieces.last()); out() << ""; if (pieces.size() > 1) { @@ -3723,6 +3739,9 @@ void HtmlGenerator::findAllSince(const InnerNode *node) NewClassMaps::iterator ncmap = newClassMaps.find(sinceVersion); if (ncmap == newClassMaps.end()) ncmap = newClassMaps.insert(sinceVersion,NodeMap()); + NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceVersion); + if (nqcmap == newQmlClassMaps.end()) + nqcmap = newQmlClassMaps.insert(sinceVersion,NodeMap()); if ((*child)->type() == Node::Function) { FunctionNode *func = static_cast(*child); @@ -3742,6 +3761,16 @@ void HtmlGenerator::findAllSince(const InnerNode *node) nsmap.value().insert(className,(*child)); ncmap.value().insert(className,(*child)); } + else if ((*child)->subType() == Node::QmlClass) { + QString className = (*child)->name(); + if ((*child)->parent() && + (*child)->parent()->type() == Node::Namespace && + !(*child)->parent()->name().isEmpty()) + className = (*child)->parent()->name()+"::"+className; + nsmap.value().insert(className,(*child)); + nqcmap.value().insert(className,(*child)); + //qDebug() << "findAllSince(): insert" << className << sinceVersion; + } } else { QString name = (*child)->name(); @@ -4316,40 +4345,15 @@ void HtmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn, CodeMarker* marker) { if (cn) { - QStringList subs; + NodeList subs; QmlClassNode::subclasses(cn->name(),subs); if (!subs.isEmpty()) { - subs.sort(); Text text; text << Atom::ParaLeft << "Inherited by "; - for (int i = 0; i < subs.size(); ++i) { - text << subs.at(i); - text << separator(i, subs.size()); - } + appendSortedQmlNames(text,cn,subs,marker); text << Atom::ParaRight; generateText(text, cn, marker); } -#if 0 - if (cn->links().contains(Node::InheritsLink)) { - QPair linkPair; - linkPair = cn->links()[Node::InheritsLink]; - QStringList strList(linkPair.first); - const Node* n = myTree->findNode(strList,Node::Fake); - if (n && n->subType() == Node::QmlClass) { - const QmlClassNode* qcn = static_cast(n); - out() << "

"; - Text text; - text << "[Inherits "; - text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); - text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); - text << Atom(Atom::String, linkPair.second); - text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); - text << "]"; - generateText(text, cn, marker); - out() << "

"; - } - } -#endif } } diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 551bead..8fe0331 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -90,6 +90,7 @@ class HtmlGenerator : public PageGenerator Typedef, Property, Variable, + QmlClass, QmlProperty, QmlSignal, QmlMethod, @@ -326,6 +327,7 @@ class HtmlGenerator : public PageGenerator NewSinceMaps newSinceMaps; static QString sinceTitles[]; NewClassMaps newClassMaps; + NewClassMaps newQmlClassMaps; static int id; }; diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 358fdd1..d2ffff5 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -1257,7 +1257,7 @@ bool TargetNode::isInnerNode() const #ifdef QDOC_QML bool QmlClassNode::qmlOnly = false; -QMultiMap QmlClassNode::inheritedBy; +QMultiMap QmlClassNode::inheritedBy; /*! Constructs a Qml class node (i.e. a Fake node with the @@ -1302,15 +1302,16 @@ QString QmlClassNode::fileBase() const Record the fact that QML class \a base is inherited by QML class \a sub. */ -void QmlClassNode::addInheritedBy(const QString& base, const QString& sub) +void QmlClassNode::addInheritedBy(const QString& base, Node* sub) { + //qDebug() << "QmlClassNode::addInheritedBy(): insert" << base << sub->name(); inheritedBy.insert(base,sub); } /*! - Loads the list \a subs with the names of all the subclasses of \a base. + Loads the list \a subs with the nodes of all the subclasses of \a base. */ -void QmlClassNode::subclasses(const QString& base, QStringList& subs) +void QmlClassNode::subclasses(const QString& base, NodeList& subs) { subs.clear(); if (inheritedBy.contains(base)) diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index ae5dcd7..fd39698 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -383,12 +383,12 @@ class QmlClassNode : public FakeNode const ClassNode* classNode() const { return cnode; } virtual QString fileBase() const; - static void addInheritedBy(const QString& base, const QString& sub); - static void subclasses(const QString& base, QStringList& subs); + static void addInheritedBy(const QString& base, Node* sub); + static void subclasses(const QString& base, NodeList& subs); public: static bool qmlOnly; - static QMultiMap inheritedBy; + static QMultiMap inheritedBy; private: const ClassNode* cnode; -- cgit v0.12 From d0c4433ca1aabab1a8fac1aae2ba65f25dae5f85 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 2 Mar 2010 10:19:21 +0100 Subject: doc: Fixed some qdoc errors. --- src/declarative/graphicsitems/qdeclarativeitem.cpp | 2 +- src/network/bearer/qnetworksession.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index f48c761..5014fd8 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -1172,7 +1172,7 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec See the \l {Keys}{Keys} attached property for detailed documentation. - \section 1 Property Change Signals + \section1 Property Change Signals Most properties on Item and Item derivatives have a signal emitted when they change. By convention, the signals are diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp index f0d7ede..047c8d3 100644 --- a/src/network/bearer/qnetworksession.cpp +++ b/src/network/bearer/qnetworksession.cpp @@ -527,7 +527,7 @@ QVariant QNetworkSession::sessionProperty(const QString& key) const \a key. Removing an already set property can be achieved by passing an invalid QVariant. - Note that the \i UserChoiceConfiguration and \i ActiveConfiguration + Note that the \e UserChoiceConfiguration and \e ActiveConfiguration properties are read only and cannot be changed using this method. */ void QNetworkSession::setSessionProperty(const QString& key, const QVariant& value) -- cgit v0.12 From 340eb4f20a5976be77ee66bbfc2ef16c97b033d2 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Mon, 1 Mar 2010 14:43:24 +0100 Subject: replace temporary disconnection with a very simple statemachine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this also fixes an issue with non-constant ordering of connections to document's contentsChange() signal Merge-request: 481 Reviewed-by: Thorbjørn Lindeijer --- src/gui/text/qsyntaxhighlighter.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp index 6750c09..9b3671d 100644 --- a/src/gui/text/qsyntaxhighlighter.cpp +++ b/src/gui/text/qsyntaxhighlighter.cpp @@ -59,23 +59,24 @@ class QSyntaxHighlighterPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QSyntaxHighlighter) public: - inline QSyntaxHighlighterPrivate() : rehighlightPending(false) {} + inline QSyntaxHighlighterPrivate() + : rehighlightPending(false), inReformatBlocks(false) + {} QPointer doc; void _q_reformatBlocks(int from, int charsRemoved, int charsAdded); + void reformatBlocks(int from, int charsRemoved, int charsAdded); void reformatBlock(QTextBlock block); inline void rehighlight(QTextCursor &cursor, QTextCursor::MoveOperation operation) { - QObject::disconnect(doc, SIGNAL(contentsChange(int,int,int)), - q_func(), SLOT(_q_reformatBlocks(int,int,int))); + inReformatBlocks = true; cursor.beginEditBlock(); int from = cursor.position(); cursor.movePosition(operation); - _q_reformatBlocks(from, 0, cursor.position() - from); + reformatBlocks(from, 0, cursor.position() - from); cursor.endEditBlock(); - QObject::connect(doc, SIGNAL(contentsChange(int,int,int)), - q_func(), SLOT(_q_reformatBlocks(int,int,int))); + inReformatBlocks = false; } inline void _q_delayedRehighlight() { @@ -90,6 +91,7 @@ public: QVector formatChanges; QTextBlock currentBlock; bool rehighlightPending; + bool inReformatBlocks; }; void QSyntaxHighlighterPrivate::applyFormatChanges() @@ -162,6 +164,12 @@ void QSyntaxHighlighterPrivate::applyFormatChanges() void QSyntaxHighlighterPrivate::_q_reformatBlocks(int from, int charsRemoved, int charsAdded) { + if (!inReformatBlocks) + reformatBlocks(from, charsRemoved, charsAdded); +} + +void QSyntaxHighlighterPrivate::reformatBlocks(int from, int charsRemoved, int charsAdded) +{ Q_UNUSED(charsRemoved); rehighlightPending = false; -- cgit v0.12 From 6d51c7b9d1f6700564ec9e3c3f7b41b6b94a74da Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Mon, 1 Mar 2010 14:43:26 +0100 Subject: don't cancel the scheduled complete rehighlight from rehighlightBlock() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit if rehighlightBlock() is called just after setDocument() then it is possible that reformatBlocks() will be called just before q_delayedRehighlight() and thus will prevent previously scheduled complete rehighlighting. Merge-request: 481 Reviewed-by: Thorbjørn Lindeijer --- src/gui/text/qsyntaxhighlighter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp index 9b3671d..b5a7aa1 100644 --- a/src/gui/text/qsyntaxhighlighter.cpp +++ b/src/gui/text/qsyntaxhighlighter.cpp @@ -402,8 +402,13 @@ void QSyntaxHighlighter::rehighlightBlock(const QTextBlock &block) if (!d->doc) return; + const bool rehighlightPending = d->rehighlightPending; + QTextCursor cursor(block); d->rehighlight(cursor, QTextCursor::EndOfBlock); + + if (rehighlightPending) + d->rehighlightPending = rehighlightPending; } /*! -- cgit v0.12 From 667ef5950bc16ff8582ac32f5150fc9f45a09682 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Mon, 1 Mar 2010 14:43:28 +0100 Subject: don't even try to rehighlight invalid or alien block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 481 Reviewed-by: Thorbjørn Lindeijer --- src/gui/text/qsyntaxhighlighter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp index b5a7aa1..de16ca5 100644 --- a/src/gui/text/qsyntaxhighlighter.cpp +++ b/src/gui/text/qsyntaxhighlighter.cpp @@ -399,7 +399,7 @@ void QSyntaxHighlighter::rehighlight() void QSyntaxHighlighter::rehighlightBlock(const QTextBlock &block) { Q_D(QSyntaxHighlighter); - if (!d->doc) + if (!d->doc || !block.isValid() || block.document() != d->doc) return; const bool rehighlightPending = d->rehighlightPending; -- cgit v0.12 From 24c5bc6c0c5c23d808f055dabefd15a551cb0902 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Mon, 1 Mar 2010 14:43:30 +0100 Subject: minor clean-ups and styling fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 481 Reviewed-by: Thorbjørn Lindeijer --- src/gui/text/qsyntaxhighlighter.cpp | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp index de16ca5..02dabbb 100644 --- a/src/gui/text/qsyntaxhighlighter.cpp +++ b/src/gui/text/qsyntaxhighlighter.cpp @@ -67,8 +67,8 @@ public: void _q_reformatBlocks(int from, int charsRemoved, int charsAdded); void reformatBlocks(int from, int charsRemoved, int charsAdded); - void reformatBlock(QTextBlock block); - + void reformatBlock(const QTextBlock &block); + inline void rehighlight(QTextCursor &cursor, QTextCursor::MoveOperation operation) { inReformatBlocks = true; cursor.beginEditBlock(); @@ -84,7 +84,6 @@ public: return; rehighlightPending = false; q_func()->rehighlight(); - return; } void applyFormatChanges(); @@ -106,10 +105,11 @@ void QSyntaxHighlighterPrivate::applyFormatChanges() QList::Iterator it = ranges.begin(); while (it != ranges.end()) { if (it->start >= preeditAreaStart - && it->start + it->length <= preeditAreaStart + preeditAreaLength) + && it->start + it->length <= preeditAreaStart + preeditAreaLength) { ++it; - else + } else { it = ranges.erase(it); + } } QTextCharFormat emptyFormat; @@ -137,11 +137,10 @@ void QSyntaxHighlighterPrivate::applyFormatChanges() r.length = i - r.start; - if (r.start >= preeditAreaStart) { + if (r.start >= preeditAreaStart) r.start += preeditAreaLength; - } else if (r.start + r.length >= preeditAreaStart) { + else if (r.start + r.length >= preeditAreaStart) r.length += preeditAreaLength; - } ranges << r; r.start = r.length = -1; @@ -150,11 +149,10 @@ void QSyntaxHighlighterPrivate::applyFormatChanges() if (r.start != -1) { r.length = formatChanges.count() - r.start; - if (r.start >= preeditAreaStart) { + if (r.start >= preeditAreaStart) r.start += preeditAreaLength; - } else if (r.start + r.length >= preeditAreaStart) { + else if (r.start + r.length >= preeditAreaStart) r.length += preeditAreaLength; - } ranges << r; } @@ -170,7 +168,6 @@ void QSyntaxHighlighterPrivate::_q_reformatBlocks(int from, int charsRemoved, in void QSyntaxHighlighterPrivate::reformatBlocks(int from, int charsRemoved, int charsAdded) { - Q_UNUSED(charsRemoved); rehighlightPending = false; QTextBlock block = doc->findBlock(from); @@ -199,7 +196,7 @@ void QSyntaxHighlighterPrivate::reformatBlocks(int from, int charsRemoved, int c formatChanges.clear(); } -void QSyntaxHighlighterPrivate::reformatBlock(QTextBlock block) +void QSyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block) { Q_Q(QSyntaxHighlighter); @@ -357,8 +354,8 @@ void QSyntaxHighlighter::setDocument(QTextDocument *doc) if (d->doc) { connect(d->doc, SIGNAL(contentsChange(int,int,int)), this, SLOT(_q_reformatBlocks(int,int,int))); - QTimer::singleShot(0, this, SLOT(_q_delayedRehighlight())); d->rehighlightPending = true; + QTimer::singleShot(0, this, SLOT(_q_delayedRehighlight())); } } @@ -473,7 +470,6 @@ void QSyntaxHighlighter::rehighlightBlock(const QTextBlock &block) void QSyntaxHighlighter::setFormat(int start, int count, const QTextCharFormat &format) { Q_D(QSyntaxHighlighter); - if (start < 0 || start >= d->formatChanges.count()) return; @@ -641,7 +637,7 @@ QTextBlockUserData *QSyntaxHighlighter::currentBlockUserData() const \since 4.4 Returns the current text block. - */ +*/ QTextBlock QSyntaxHighlighter::currentBlock() const { Q_D(const QSyntaxHighlighter); -- cgit v0.12 From b49eaedbe81011483ce52af71e9ebf29c61cef43 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Mon, 1 Mar 2010 14:43:33 +0100 Subject: remove unused code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 481 Reviewed-by: Thorbjørn Lindeijer --- src/gui/text/qsyntaxhighlighter.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp index 02dabbb..1dc8e23 100644 --- a/src/gui/text/qsyntaxhighlighter.cpp +++ b/src/gui/text/qsyntaxhighlighter.cpp @@ -203,7 +203,6 @@ void QSyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block) Q_ASSERT_X(!currentBlock.isValid(), "QSyntaxHighlighter::reformatBlock()", "reFormatBlock() called recursively"); currentBlock = block; - QTextBlock previous = block.previous(); formatChanges.fill(QTextCharFormat(), block.length() - 1); q->highlightBlock(block.text()); -- cgit v0.12 From b7a79ea08be3e127058be549ed354d6276e32e0f Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Mon, 1 Mar 2010 14:43:35 +0100 Subject: minor optimization: ignore invalid preeditAreaPosition/preeditAreaText MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 481 Reviewed-by: Thorbjørn Lindeijer --- src/gui/text/qsyntaxhighlighter.cpp | 40 +++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp index 1dc8e23..d3db2a1 100644 --- a/src/gui/text/qsyntaxhighlighter.cpp +++ b/src/gui/text/qsyntaxhighlighter.cpp @@ -102,20 +102,22 @@ void QSyntaxHighlighterPrivate::applyFormatChanges() const int preeditAreaStart = layout->preeditAreaPosition(); const int preeditAreaLength = layout->preeditAreaText().length(); - QList::Iterator it = ranges.begin(); - while (it != ranges.end()) { - if (it->start >= preeditAreaStart - && it->start + it->length <= preeditAreaStart + preeditAreaLength) { - ++it; - } else { - it = ranges.erase(it); + if (preeditAreaLength != 0) { + QList::Iterator it = ranges.begin(); + while (it != ranges.end()) { + if (it->start >= preeditAreaStart + && it->start + it->length <= preeditAreaStart + preeditAreaLength) { + ++it; + } else { + it = ranges.erase(it); + } } } QTextCharFormat emptyFormat; QTextLayout::FormatRange r; - r.start = r.length = -1; + r.start = -1; int i = 0; while (i < formatChanges.count()) { @@ -137,22 +139,26 @@ void QSyntaxHighlighterPrivate::applyFormatChanges() r.length = i - r.start; - if (r.start >= preeditAreaStart) - r.start += preeditAreaLength; - else if (r.start + r.length >= preeditAreaStart) - r.length += preeditAreaLength; + if (preeditAreaLength != 0) { + if (r.start >= preeditAreaStart) + r.start += preeditAreaLength; + else if (r.start + r.length >= preeditAreaStart) + r.length += preeditAreaLength; + } ranges << r; - r.start = r.length = -1; + r.start = -1; } if (r.start != -1) { r.length = formatChanges.count() - r.start; - if (r.start >= preeditAreaStart) - r.start += preeditAreaLength; - else if (r.start + r.length >= preeditAreaStart) - r.length += preeditAreaLength; + if (preeditAreaLength != 0) { + if (r.start >= preeditAreaStart) + r.start += preeditAreaLength; + else if (r.start + r.length >= preeditAreaStart) + r.length += preeditAreaLength; + } ranges << r; } -- cgit v0.12 From 62faec229dfe654872d3791bee0a27e5290fff4c Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Mon, 1 Mar 2010 14:43:37 +0100 Subject: minor optimization: don't mark contents as dirty if nothing was changed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 481 Reviewed-by: Thorbjørn Lindeijer --- src/gui/text/qsyntaxhighlighter.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp index d3db2a1..28af5bb 100644 --- a/src/gui/text/qsyntaxhighlighter.cpp +++ b/src/gui/text/qsyntaxhighlighter.cpp @@ -95,6 +95,8 @@ public: void QSyntaxHighlighterPrivate::applyFormatChanges() { + bool formatsChanged = false; + QTextLayout *layout = currentBlock.layout(); QList ranges = layout->additionalFormats(); @@ -110,6 +112,7 @@ void QSyntaxHighlighterPrivate::applyFormatChanges() ++it; } else { it = ranges.erase(it); + formatsChanged = true; } } } @@ -147,6 +150,7 @@ void QSyntaxHighlighterPrivate::applyFormatChanges() } ranges << r; + formatsChanged = true; r.start = -1; } @@ -161,9 +165,13 @@ void QSyntaxHighlighterPrivate::applyFormatChanges() } ranges << r; + formatsChanged = true; } - layout->setAdditionalFormats(ranges); + if (formatsChanged) { + layout->setAdditionalFormats(ranges); + doc->markContentsDirty(currentBlock.position(), currentBlock.length()); + } } void QSyntaxHighlighterPrivate::_q_reformatBlocks(int from, int charsRemoved, int charsAdded) @@ -214,8 +222,6 @@ void QSyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block) q->highlightBlock(block.text()); applyFormatChanges(); - doc->markContentsDirty(block.position(), block.length()); - currentBlock = QTextBlock(); } -- cgit v0.12 From 0998fc069512d0ae2853929489b80f35e0d9d4ae Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 2 Mar 2010 11:23:45 +0100 Subject: QDeclarativeView: Make usable in Designer Make source a designable property, add missing declarations for enumerations. Reviewed-by: akennedy --- src/declarative/util/qdeclarativeview.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/declarative/util/qdeclarativeview.h b/src/declarative/util/qdeclarativeview.h index 03d8db3..107f3f9 100644 --- a/src/declarative/util/qdeclarativeview.h +++ b/src/declarative/util/qdeclarativeview.h @@ -43,6 +43,7 @@ #define QDECLARATIVEVIEW_H #include +#include #include #include #include @@ -64,7 +65,8 @@ class Q_DECLARATIVE_EXPORT QDeclarativeView : public QGraphicsView Q_OBJECT Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode) Q_PROPERTY(Status status READ status NOTIFY statusChanged) - + Q_PROPERTY(QUrl source READ source WRITE setSource DESIGNABLE true) + Q_ENUMS(ResizeMode Status) public: explicit QDeclarativeView(QWidget *parent = 0); QDeclarativeView(const QUrl &source, QWidget *parent = 0); -- cgit v0.12 From 13f23b71cee682ccaaec455d72b1578afc2800ee Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 2 Mar 2010 11:25:16 +0100 Subject: QDeclarativeView: Add a Designer plugin. Reviewed-by: Jarek Kobus Acked-by: akennedy --- tools/designer/src/plugins/plugins.pro | 1 + .../plugins/qdeclarativeview/qdeclarativeview.pro | 13 ++ .../qdeclarativeview/qdeclarativeview_plugin.cpp | 132 +++++++++++++++++++++ .../qdeclarativeview/qdeclarativeview_plugin.h | 74 ++++++++++++ 4 files changed, 220 insertions(+) create mode 100644 tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro create mode 100644 tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp create mode 100644 tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h diff --git a/tools/designer/src/plugins/plugins.pro b/tools/designer/src/plugins/plugins.pro index baf5261..cf4fa8a 100644 --- a/tools/designer/src/plugins/plugins.pro +++ b/tools/designer/src/plugins/plugins.pro @@ -7,3 +7,4 @@ win32:!contains(QT_EDITION, OpenSource):SUBDIRS += activeqt # contains(QT_CONFIG, opengl): SUBDIRS += tools/view3d contains(QT_CONFIG, webkit): SUBDIRS += qwebview contains(QT_CONFIG, phonon): SUBDIRS += phononwidgets +contains(QT_CONFIG, declarative): SUBDIRS += qdeclarativeview diff --git a/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro new file mode 100644 index 0000000..b8abe87 --- /dev/null +++ b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro @@ -0,0 +1,13 @@ +TEMPLATE = lib +TARGET = qdeclarativeview +CONFIG += qt warn_on plugin designer +QT += declarative + +include(../plugins.pri) +build_all:!build_pass { + CONFIG -= build_all + CONFIG += release +} + +SOURCES += qdeclarativeview_plugin.cpp +HEADERS += qdeclarativeview_plugin.h diff --git a/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp new file mode 100644 index 0000000..b352a9b --- /dev/null +++ b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.cpp @@ -0,0 +1,132 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Designer 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdeclarativeview_plugin.h" + +#include +#include + +#include +#include + +static const char toolTipC[] = "QtDeclarative view widget"; + +QT_BEGIN_NAMESPACE + +QDeclarativeViewPlugin::QDeclarativeViewPlugin(QObject *parent) : + QObject(parent), + m_initialized(false) +{ +} + +QString QDeclarativeViewPlugin::name() const +{ + return QLatin1String("QDeclarativeView"); +} + +QString QDeclarativeViewPlugin::group() const +{ + return QLatin1String("Display Widgets"); +} + +QString QDeclarativeViewPlugin::toolTip() const +{ + return QString(QLatin1String(toolTipC)); +} + +QString QDeclarativeViewPlugin::whatsThis() const +{ + return QString(QLatin1String(toolTipC)); +} + +QString QDeclarativeViewPlugin::includeFile() const +{ + return QLatin1String("QtDeclarative/QDeclarativeView"); +} + +QIcon QDeclarativeViewPlugin::icon() const +{ + return QIcon(); +} + +bool QDeclarativeViewPlugin::isContainer() const +{ + return false; +} + +QWidget *QDeclarativeViewPlugin::createWidget(QWidget *parent) +{ + return new QDeclarativeView(parent); +} + +bool QDeclarativeViewPlugin::isInitialized() const +{ + return m_initialized; +} + +void QDeclarativeViewPlugin::initialize(QDesignerFormEditorInterface * /*core*/) +{ + if (m_initialized) + return; + + m_initialized = true; +} + +QString QDeclarativeViewPlugin::domXml() const +{ + return QLatin1String("\ + \ + \ + \ + \ + 0\ + 0\ + 300\ + 200\ + \ + \ + \ + "); +} + +Q_EXPORT_PLUGIN2(customwidgetplugin, QDeclarativeViewPlugin) + +QT_END_NAMESPACE diff --git a/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h new file mode 100644 index 0000000..2f13f16 --- /dev/null +++ b/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview_plugin.h @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Designer 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEVIEW_PLUGIN_H +#define QDECLARATIVEVIEW_PLUGIN_H + +#include + +QT_BEGIN_NAMESPACE + +class QDeclarativeViewPlugin: public QObject, public QDesignerCustomWidgetInterface +{ + Q_OBJECT + Q_INTERFACES(QDesignerCustomWidgetInterface) +public: + QDeclarativeViewPlugin(QObject *parent = 0); + + virtual QString name() const; + virtual QString group() const; + virtual QString toolTip() const; + virtual QString whatsThis() const; + virtual QString includeFile() const; + virtual QIcon icon() const; + virtual bool isContainer() const; + virtual QWidget *createWidget(QWidget *parent); + virtual bool isInitialized() const; + virtual void initialize(QDesignerFormEditorInterface *core); + virtual QString domXml() const; + +private: + bool m_initialized; +}; + +QT_END_NAMESPACE + +#endif // QDECLARATIVEVIEW_PLUGIN_H -- cgit v0.12 From 7366200d7600271c86144e70ae59ce77f39b2a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 15 Feb 2010 14:06:32 +0100 Subject: Implement alien widgets on Mac/Cocoa. This commit makes alien widgets opt in on a per-widget basis on Mac, set the Qt::WA_NativeWindow flag when creating the widget to enable. Setting this flag on widgets that have native child or sibling NSViews is not supported. The main use case for alien widgets on Mac is to improve performance for applications that have complex user interfaces. Qt can handle thousands of widgets per window, while Cocoa is designed to use a smaller number of NSViews in combination with NSCells and custom control implementations. This commit moves us in the direction of having a few main NSViews with "leaf" qwidgets implemented as a custom control. --- src/gui/kernel/qapplication.cpp | 8 ++---- src/gui/kernel/qapplication_mac.mm | 3 +- src/gui/kernel/qapplication_p.h | 2 +- src/gui/kernel/qcocoaview_mac.mm | 25 +++++++++++++++++ src/gui/kernel/qt_cocoa_helpers_mac.mm | 39 +++++++++++++++++++++++--- src/gui/kernel/qwidget.cpp | 43 +++++++++++++++++++++++++---- src/gui/kernel/qwidget_mac.mm | 50 ++++++++++++++++++++++++++-------- src/gui/kernel/qwidget_p.h | 1 + src/gui/widgets/qmainwindow.cpp | 3 +- 9 files changed, 145 insertions(+), 29 deletions(-) diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 4ec2ae2..203f637 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -498,9 +498,7 @@ inline bool QApplicationPrivate::isAlien(QWidget *widget) { if (!widget) return false; -#if defined(Q_WS_MAC) // Fake alien behavior on the Mac :) - return !widget->isWindow() && widget->window()->testAttribute(Qt::WA_DontShowOnScreen); -#elif defined(Q_WS_QWS) +#if defined(Q_WS_QWS) return !widget->isWindow() # ifdef Q_BACKINGSTORE_SUBSURFACES && !(widget->d_func()->maybeTopData() && widget->d_func()->maybeTopData()->windowSurface) @@ -3013,7 +3011,7 @@ bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event, return result; } -#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS) +#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_MAC) /* This function should only be called when the widget changes visibility, i.e. when the \a widget is shown, hidden or deleted. This function does nothing @@ -3073,7 +3071,7 @@ void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget) sendMouseEvent(widgetUnderCursor, &e, widgetUnderCursor, tlw, &qt_button_down, qt_last_mouse_receiver); #endif // QT_NO_CURSOR } -#endif // Q_WS_WIN || Q_WS_X11 +#endif // Q_WS_WIN || Q_WS_X11 || Q_WS_MAC /*! Returns the desktop widget (also called the root window). diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index babfc72..c7d0e48 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -184,7 +184,8 @@ bool qt_mac_app_fullscreen = false; bool qt_scrollbar_jump_to_pos = false; static bool qt_mac_collapse_on_dblclick = true; extern int qt_antialiasing_threshold; // from qapplication.cpp -QPointer qt_button_down; // widget got last button-down +QWidget * qt_button_down; // widget got last button-down +QPointer qt_last_mouse_receiver; #ifndef QT_MAC_USE_COCOA static bool qt_button_down_in_content; // whether the button_down was in the content area. static bool qt_mac_previous_press_in_popup_mode = false; diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index e0a6103..8653dec 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -514,7 +514,7 @@ public: int symbianResourceChange(const QSymbianEvent *symbianEvent); #endif -#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) +#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC) void sendSyntheticEnterLeave(QWidget *widget); #endif diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 6a16403..a1dcc2a 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -185,6 +185,9 @@ extern "C" { extern NSString *NSTextInputReplacementRangeAttributeName; } +#ifdef ALIEN_DEBUG +static int qCocoaViewCount = 0; +#endif @implementation QT_MANGLE_NAMESPACE(QCocoaView) @@ -195,6 +198,12 @@ extern "C" { [self finishInitWithQWidget:widget widgetPrivate:widgetprivate]; } composingText = new QString(); + +#ifdef ALIEN_DEBUG + ++qCocoaViewCount; + qDebug() << "init: qCocoaViewCount is" << qCocoaViewCount; +#endif + composing = false; sendKeyEvents = true; [self setHidden:YES]; @@ -414,6 +423,12 @@ extern "C" { { delete composingText; [[NSNotificationCenter defaultCenter] removeObserver:self]; + +#ifdef ALIEN_DEBUG + --qCocoaViewCount; + qDebug() << "qCocoaViewCount is" << qCocoaViewCount; +#endif + [super dealloc]; } @@ -523,6 +538,10 @@ extern "C" { CGContextClearRect(cg, NSRectToCGRect(aRect)); } + // Check for alien widgets, use qwidgetPrivate->drawWidget() to draw the widget if this + // is the case. This makes sure child widgets are drawn as well, Cocoa does not know about + // those and wont send them drawRect calls. + if (qwidget->testAttribute(Qt::WA_NativeWindow) && qt_widget_private(qwidget)->hasAlienChildren == false) { if (engine && !qwidget->testAttribute(Qt::WA_NoSystemBackground) && (qwidget->isWindow() || qwidget->autoFillBackground()) || qwidget->testAttribute(Qt::WA_TintedBackground) @@ -542,6 +561,12 @@ extern "C" { e.setErased(true); #endif qt_sendSpontaneousEvent(qwidget, &e); + } else { + qwidget->setAttribute(Qt::WA_WState_InPaintEvent, false); // QWidgetPrivate::drawWidget sets this + QWidgetPrivate *qwidgetPrivate = qt_widget_private(qwidget); + qwidgetPrivate->drawWidget(qwidget, qrgn, QPoint(), QWidgetPrivate::DrawAsRoot | QWidgetPrivate::DrawPaintOnScreen | QWidgetPrivate::DrawRecursive, 0); + } + if (!redirectionOffset.isNull()) QPainter::restoreRedirected(qwidget); if (engine) diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 9560952..19bae5a 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -139,7 +139,7 @@ void QMacWindowFader::performFade() extern bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event); // qapplication.cpp; extern QWidget * mac_mouse_grabber; -extern QPointer qt_button_down; //qapplication_mac.cpp +extern QWidget *qt_button_down; //qapplication_mac.cpp void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds) { @@ -686,6 +686,12 @@ bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEve if ([event type] == NSKeyDown) { qt_keymapper_private()->updateKeyMap(0, key_event, 0); } + + // Redirect keys to alien widgets. + if (widgetToGetEvent->testAttribute(Qt::WA_NativeWindow) == false) { + widgetToGetEvent = qApp->focusWidget(); + } + if (widgetToGetEvent == 0) return false; @@ -940,7 +946,7 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev [static_cast(tmpView) qt_qwidget]; } } else { - extern QPointer qt_button_down; //qapplication_mac.cpp + extern QWidget * qt_button_down; //qapplication_mac.cpp QPoint pos; widgetToGetMouse = QApplicationPrivate::pickMouseReceiver(qwidget, qglobalPoint, pos, eventType, @@ -952,7 +958,20 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev return false; NSPoint localPoint = [tmpView convertPoint:windowPoint fromView:nil]; - QPoint qlocalPoint(localPoint.x, localPoint.y); + QPoint qlocalPoint = QPoint(localPoint.x, localPoint.y); + + // Search for alien child widgets (either on this qwidget or on the popup) + if (widgetToGetMouse->testAttribute(Qt::WA_NativeWindow) == false || qt_widget_private(widgetToGetMouse)->hasAlienChildren) { + QPoint qScreenPoint = flipPoint(globalPoint).toPoint(); +#ifdef ALIEN_DEBUG + qDebug() << "alien mouse event" << qScreenPoint << possibleAlien; +#endif + QWidget *possibleAlien = widgetToGetMouse->childAt(qlocalPoint); + if (possibleAlien) { + qlocalPoint = possibleAlien->mapFromGlobal(widgetToGetMouse->mapToGlobal(qlocalPoint)); + widgetToGetMouse = possibleAlien; + } + } EventRef carbonEvent = static_cast(const_cast([theEvent eventRef])); if (qt_mac_sendMacEventToWidget(widgetToGetMouse, carbonEvent)) @@ -997,7 +1016,19 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev } [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->localPoint = localPoint; QMouseEvent qme(eventType, qlocalPoint, qglobalPoint, button, buttons, keyMods); - qt_sendSpontaneousEvent(widgetToGetMouse, &qme); + +#ifdef ALIEN_DEBUG + qDebug() << "sending mouse event to" << widgetToGetMouse; +#endif + extern QWidget *qt_button_down; + extern QPointer qt_last_mouse_receiver; + + if (qwidget->testAttribute(Qt::WA_NativeWindow) && qt_widget_private(qwidget)->hasAlienChildren == false) + qt_sendSpontaneousEvent(widgetToGetMouse, &qme); + else + QApplicationPrivate::sendMouseEvent(widgetToGetMouse, &qme, widgetToGetMouse, qwidget, &qt_button_down, + qt_last_mouse_receiver); + if (eventType == QEvent::MouseButtonPress && button == Qt::RightButton) { QContextMenuEvent qcme(QContextMenuEvent::Mouse, qlocalPoint, qglobalPoint, keyMods); qt_sendSpontaneousEvent(widgetToGetMouse, &qcme); diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 2f6ec6b..b19d541 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -205,6 +205,7 @@ QWidgetPrivate::QWidgetPrivate(int version) , nativeGesturePanEnabled(0) #elif defined(Q_WS_MAC) , needWindowChange(0) + , hasAlienChildren(0) , window_event(0) , qd_hd(0) #endif @@ -1168,6 +1169,10 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f) if (f & Qt::MSWindowsOwnDC) q->setAttribute(Qt::WA_NativeWindow); +#ifdef Q_WS_MAC + q->setAttribute(Qt::WA_NativeWindow); +#endif + q->setAttribute(Qt::WA_QuitOnClose); // might be cleared in adjustQuitOnCloseAttribute() adjustQuitOnCloseAttribute(); @@ -1263,6 +1268,10 @@ void QWidget::create(WId window, bool initializeWindow, bool destroyOldWindow) } if (QWidget *parent = parentWidget()) { +#ifdef Q_WS_MAC + if (testAttribute(Qt::WA_NativeWindow) == false) + parent->d_func()->hasAlienChildren = true; +#endif if (type & Qt::Window) { if (!parent->testAttribute(Qt::WA_WState_Created)) parent->createWinId(); @@ -1433,7 +1442,7 @@ QWidget::~QWidget() } } -#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) +#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC) else if (!internalWinId() && isVisible()) { qApp->d_func()->sendSyntheticEnterLeave(this); #ifdef Q_WS_QWS @@ -2306,6 +2315,9 @@ QWidget *QWidget::find(WId id) WId QWidget::winId() const { if (!testAttribute(Qt::WA_WState_Created) || !internalWinId()) { +#ifdef ALIEN_DEBUG + qDebug() << "QWidget::winId: creating native window for" << this; +#endif QWidget *that = const_cast(this); that->setAttribute(Qt::WA_NativeWindow); that->d_func()->createWinId(); @@ -2318,6 +2330,10 @@ WId QWidget::winId() const void QWidgetPrivate::createWinId(WId winid) { Q_Q(QWidget); + +#ifdef ALIEN_DEBUG + qDebug() << "QWidgetPrivate::createWinId for" << q << winid; +#endif const bool forceNativeWindow = q->testAttribute(Qt::WA_NativeWindow); if (!q->testAttribute(Qt::WA_WState_Created) || (forceNativeWindow && !q->internalWinId())) { if (!q->isWindow()) { @@ -2360,6 +2376,9 @@ Ensures that the widget has a window system identifier, i.e. that it is known to void QWidget::createWinId() { Q_D(QWidget); +#ifdef ALIEN_DEBUG + qDebug() << "QWidget::createWinId" << this; +#endif // qWarning("QWidget::createWinId is obsolete, please fix your code."); d->createWinId(); } @@ -5249,7 +5268,15 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP QPaintEngine *paintEngine = pdev->paintEngine(); if (paintEngine) { setRedirected(pdev, -offset); +#ifdef Q_WS_MAC + // (Alien support) Special case for Mac when redirecting: If the paint device + // is of the Widget type we need to set WA_WState_InPaintEvent since painting + // outside the paint event is not supported on QWidgets. The attributeis + // restored further down. + if (pdev->devType() == QInternal::Widget) + static_cast(pdev)->setAttribute(Qt::WA_WState_InPaintEvent); +#endif if (sharedPainter) paintEngine->d_func()->systemClip = toBePainted; else @@ -5290,6 +5317,10 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP //restore if (paintEngine) { +#ifdef Q_WS_MAC + if (pdev->devType() == QInternal::Widget) + static_cast(pdev)->setAttribute(Qt::WA_WState_InPaintEvent, false); +#endif restoreRedirected(); if (!sharedPainter) paintEngine->d_func()->systemRect = QRect(); @@ -7322,7 +7353,7 @@ void QWidgetPrivate::hide_helper() // next bit tries to move the focus if the focus widget is now // hidden. if (wasVisible) { -#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) +#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC) qApp->d_func()->sendSyntheticEnterLeave(q); #endif @@ -7454,7 +7485,7 @@ void QWidget::setVisible(bool visible) d->show_helper(); -#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) +#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC) qApp->d_func()->sendSyntheticEnterLeave(this); #endif } @@ -7569,7 +7600,7 @@ void QWidgetPrivate::hideChildren(bool spontaneous) widget->d_func()->hide_sys(); } } -#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) +#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) || defined(Q_WS_MAC) qApp->d_func()->sendSyntheticEnterLeave(widget); #endif #ifndef QT_NO_ACCESSIBILITY @@ -9787,7 +9818,7 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f) desktopWidget = parent; bool newParent = (parent != parentWidget()) || !wasCreated || desktopWidget; -#if defined(Q_WS_X11) || defined(Q_WS_WIN) +#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MAC) if (newParent && parent && !desktopWidget) { if (testAttribute(Qt::WA_NativeWindow) && !qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings)) parent->d_func()->enforceNativeChildren(); @@ -10433,7 +10464,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) } case Qt::WA_PaintOnScreen: d->updateIsOpaque(); -#if defined(Q_WS_WIN) || defined(Q_WS_X11) +#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC) // Recreate the widget if it's already created as an alien widget and // WA_PaintOnScreen is enabled. Paint on screen widgets must have win id. // So must their children. diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index dcb87fc..6d8c97b 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -459,7 +459,13 @@ static bool qt_isGenuineQWidget(OSViewRef ref) bool qt_isGenuineQWidget(const QWidget *window) { - return window && qt_isGenuineQWidget(OSViewRef(window->winId())); + if (!window) + return false; + + if (!window->internalWinId()) + return true; //alien + + return qt_isGenuineQWidget(OSViewRef(window->internalWinId())); } Q_GUI_EXPORT OSWindowRef qt_mac_window_for(const QWidget *w) @@ -2608,7 +2614,16 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO } } else { data.fstrut_dirty = false; // non-toplevel widgets don't have a frame, so no need to update the strut - if(OSViewRef osview = qt_mac_create_widget(q, this, qt_mac_nativeview_for(parentWidget))) { + +#ifdef QT_MAC_USE_COCOA + if (q->testAttribute(Qt::WA_NativeWindow) == false || + q->internalWinId() != 0) { +#ifdef ALIEN_DEBUG + qDebug() << "Skipping native widget creation for" << this; +#endif + } else +#endif + if (OSViewRef osview = qt_mac_create_widget(q, this, qt_mac_nativeview_for(parentWidget))) { #ifndef QT_MAC_USE_COCOA HIRect bounds = CGRectMake(data.crect.x(), data.crect.y(), data.crect.width(), data.crect.height()); HIViewSetFrame(osview, &bounds); @@ -2869,9 +2884,12 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) q->setAttribute(Qt::WA_WState_Visible, false); q->setAttribute(Qt::WA_WState_Hidden, false); adjustFlags(data.window_flags, q); - // keep compatibility with previous versions, we need to preserve the created state - // (but we recreate the winId for the widget being reparented, again for compatibility) - if (wasCreated || (!q->isWindow() && parent->testAttribute(Qt::WA_WState_Created))) { + // keep compatibility with previous versions, we need to preserve the created state. + // (but we recreate the winId for the widget being reparented, again for compatibility, + // unless this is an alien widget. ) + const bool nonWindowWithCreatedParent = !q->isWindow() && parent->testAttribute(Qt::WA_WState_Created); + const bool nativeWidget = q->internalWinId() != 0; + if (wasCreated || nativeWidget && nonWindowWithCreatedParent) { createWinId(); if (q->isWindow()) { #ifndef QT_MAC_USE_COCOA @@ -2955,7 +2973,7 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) QPoint QWidget::mapToGlobal(const QPoint &pos) const { Q_D(const QWidget); - if (!testAttribute(Qt::WA_WState_Created)) { + if (!testAttribute(Qt::WA_WState_Created) || !internalWinId()) { QPoint p = pos + data->crect.topLeft(); return isWindow() ? p : parentWidget()->mapToGlobal(p); } @@ -2982,7 +3000,7 @@ QPoint QWidget::mapToGlobal(const QPoint &pos) const QPoint QWidget::mapFromGlobal(const QPoint &pos) const { Q_D(const QWidget); - if (!testAttribute(Qt::WA_WState_Created)) { + if (!testAttribute(Qt::WA_WState_Created) || !internalWinId()) { QPoint p = isWindow() ? pos : parentWidget()->mapFromGlobal(pos); return p - data->crect.topLeft(); } @@ -3320,10 +3338,20 @@ void QWidgetPrivate::update_sys(const QRegion &rgn) } #else // Cocoa doesn't do regions, it seems more efficient to just update the bounding rect instead of a potential number of message passes for each rect. - const QRect &boundingRect = rgn.boundingRect(); - [qt_mac_nativeview_for(q) setNeedsDisplayInRect:NSMakeRect(boundingRect.x(), - boundingRect.y(), boundingRect.width(), - boundingRect.height())]; + const QRect & boundingRect = rgn.boundingRect(); + + // Alien support: get the first native ancestor widget (will be q itself in the non-alien case), + // map the coordinates from q space to NSView space and invalidate the rect. + QWidget *nativeParent = q->internalWinId() ? q : q->nativeParentWidget(); + if (nativeParent == 0) + return; + const QRect nativeBoundingRect = QRect( + QPoint(q->mapTo(nativeParent, boundingRect.topLeft())), + QSize(boundingRect.size())); + + [qt_mac_nativeview_for(nativeParent) setNeedsDisplayInRect:NSMakeRect(nativeBoundingRect.x(), + nativeBoundingRect.y(), nativeBoundingRect.width(), + nativeBoundingRect.height())]; #endif } diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index efd9a0a..2cb8586 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -720,6 +720,7 @@ public: #elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC // This is new stuff uint needWindowChange : 1; + uint hasAlienChildren : 1; // Each wiget keeps a list of all its child and grandchild OpenGL widgets. // This list is used to update the gl context whenever a parent and a granparent diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp index 4620597..bdab6fb 100644 --- a/src/gui/widgets/qmainwindow.cpp +++ b/src/gui/widgets/qmainwindow.cpp @@ -1478,7 +1478,8 @@ void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool set) return; // ### Disable the unified toolbar when using anything but the native graphics system. - if (windowSurface()) + // ### Disable when using alien widgets as well + if (windowSurface() || testAttribute(Qt::WA_NativeWindow) == false) return; d->useHIToolBar = set; -- cgit v0.12 From 2c0dec10520ce1ae25eaef2d1c67969528ac278d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 2 Mar 2010 12:00:09 +0100 Subject: QtDeclarative: Fix compiler warnings class/struct mixups, unused variables. Reviewed-by: Thomas Hartmann --- src/declarative/graphicsitems/qdeclarativeflickable.cpp | 1 - src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 1 - src/declarative/qml/qdeclarativelist.h | 2 +- src/declarative/util/qdeclarativetimeline_p_p.h | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index c54ddd0..1998ccf 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -154,7 +154,6 @@ void QDeclarativeFlickablePrivate::init() */ qreal QDeclarativeFlickablePrivate::overShootDistance(qreal velocity, qreal size) { - Q_Q(QDeclarativeFlickable); if (maxVelocity <= 0) return 0.0; diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index cd72ef9..693fd20 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -1268,7 +1268,6 @@ void QDeclarativeVisualDataModel::_q_dataChanged(const QModelIndex &begin, const void QDeclarativeVisualDataModel::_q_modelReset() { - Q_D(QDeclarativeVisualDataModel); emit modelReset(); } diff --git a/src/declarative/qml/qdeclarativelist.h b/src/declarative/qml/qdeclarativelist.h index 8d59384..eac4967 100644 --- a/src/declarative/qml/qdeclarativelist.h +++ b/src/declarative/qml/qdeclarativelist.h @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QObject; -class QMetaObject; +struct QMetaObject; template struct QDeclarativeListProperty { typedef void (*AppendFunction)(QDeclarativeListProperty *, T*); diff --git a/src/declarative/util/qdeclarativetimeline_p_p.h b/src/declarative/util/qdeclarativetimeline_p_p.h index c08c07c..598c897 100644 --- a/src/declarative/util/qdeclarativetimeline_p_p.h +++ b/src/declarative/util/qdeclarativetimeline_p_p.h @@ -160,7 +160,7 @@ public: QDeclarativeTimeLineObject *callbackObject() const; private: - friend class QDeclarativeTimeLinePrivate; + friend struct QDeclarativeTimeLinePrivate; Callback d0; void *d1; QDeclarativeTimeLineObject *d2; -- cgit v0.12 From 671a6a0dc82857dd84feddf49d38540dd59186df Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 2 Mar 2010 12:16:31 +0100 Subject: OS X 10.4 compile error; required casting int to GLint. --- src/multimedia/base/qpaintervideosurface.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/multimedia/base/qpaintervideosurface.cpp b/src/multimedia/base/qpaintervideosurface.cpp index 97fddc9..fc3d493 100644 --- a/src/multimedia/base/qpaintervideosurface.cpp +++ b/src/multimedia/base/qpaintervideosurface.cpp @@ -1158,14 +1158,14 @@ QAbstractVideoSurface::Error QVideoSurfaceGlslPainter::paint( glBindTexture(GL_TEXTURE_2D, m_textureIds[2]); glActiveTexture(GL_TEXTURE0); - m_program.setUniformValue("texY", 0); - m_program.setUniformValue("texU", 1); - m_program.setUniformValue("texV", 2); + m_program.setUniformValue("texY", GLint(0)); + m_program.setUniformValue("texU", GLint(1)); + m_program.setUniformValue("texV", GLint(2)); } else { glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, m_textureIds[0]); - m_program.setUniformValue("texRgb", 0); + m_program.setUniformValue("texRgb", GLint(0)); } m_program.setUniformValue("colorMatrix", m_colorMatrix); -- cgit v0.12 From 3708ff474a987ddb82f7b66d8c686f499b65eeb6 Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 2 Mar 2010 13:36:55 +0100 Subject: Updates to changes file Reviewed-by: trustme --- dist/changes-4.7.0 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dist/changes-4.7.0 b/dist/changes-4.7.0 index 013f1ce..4d776ee 100644 --- a/dist/changes-4.7.0 +++ b/dist/changes-4.7.0 @@ -30,6 +30,12 @@ General Improvements Third party components ---------------------- + - Updated libpng to version 1.4.0 + + - Updated libjpeg to version 8 + + - Updated libtiff to version 3.9.2 + **************************************************************************** * Library * -- cgit v0.12 From a140e37fab6a1d028fd1b751a98774dacb4f1a89 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 2 Mar 2010 13:42:05 +0100 Subject: Fix & move QEgl::native* to platform-specific files This should fix build on Symbian & WinCE Reviewed-By: TrustMe --- src/gui/egl/qegl.cpp | 19 ------------------- src/gui/egl/qegl_qws.cpp | 17 +++++++++++++++++ src/gui/egl/qegl_symbian.cpp | 11 +++++++++++ src/gui/egl/qegl_wince.cpp | 11 +++++++++++ src/gui/egl/qegl_x11.cpp | 11 ++++++++++- 5 files changed, 49 insertions(+), 20 deletions(-) diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 1bfba10..485bfbf 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -549,25 +549,6 @@ EGLDisplay QEgl::display() return dpy; } -#if !defined(Q_WS_X11) && !defined(Q_WS_WINCE) // WinCE & X11 implement this properly -EGLNativeDisplayType QEgl::nativeDisplay() -{ - return EGL_DEFAULT_DISPLAY; -} -#endif - -#if !defined(Q_OS_SYMBIAN) -EGLNativeWindowType QEgl::nativeWindow(QWidget* widget) -{ - return (EGLNativeWindowType)(widget->winId()); -} -#endif - -EGLNativePixmapType QEgl::nativePixmap(QPixmap* pixmap) -{ - return (EGLNativePixmapType)(pixmap->handle()); -} - #ifndef Q_WS_X11 EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties) { diff --git a/src/gui/egl/qegl_qws.cpp b/src/gui/egl/qegl_qws.cpp index eb41bcc..56383a5 100644 --- a/src/gui/egl/qegl_qws.cpp +++ b/src/gui/egl/qegl_qws.cpp @@ -92,6 +92,23 @@ void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev) setPixelFormat(screen->pixelFormat()); } +EGLNativeDisplayType QEgl::nativeDisplay() +{ + return EGL_DEFAULT_DISPLAY; +} + +EGLNativeWindowType QEgl::nativeWindow(QWidget* widget) +{ + return (EGLNativeWindowType)(widget->winId()); // Might work +} + +EGLNativePixmapType QEgl::nativePixmap(QPixmap*) +{ + qWarning("QEgl: EGL pixmap surfaces not supported on QWS"); + return (EGLNativePixmapType)0; +} + + QT_END_NAMESPACE #endif // !QT_NO_EGL diff --git a/src/gui/egl/qegl_symbian.cpp b/src/gui/egl/qegl_symbian.cpp index 8833b42..9744ed0 100644 --- a/src/gui/egl/qegl_symbian.cpp +++ b/src/gui/egl/qegl_symbian.cpp @@ -50,11 +50,22 @@ QT_BEGIN_NAMESPACE +EGLNativeDisplayType QEgl::nativeDisplay() +{ + return EGL_DEFAULT_DISPLAY; +} + EGLNativeWindowType QEgl::nativeWindow(QWidget* widget) { return (EGLNativeWindowType)(widget->winId()->DrawableWindow()); } +EGLNativePixmapType QEgl::nativePixmap(QPixmap*) +{ + qWarning("QEgl: EGL pixmap surfaces not implemented yet on Symbian"); + return (EGLNativePixmapType)0; +} + // Set pixel format and other properties based on a paint device. void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev) { diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp index b201153..c07b20b 100644 --- a/src/gui/egl/qegl_wince.cpp +++ b/src/gui/egl/qegl_wince.cpp @@ -62,6 +62,17 @@ EGLNativeDisplayType QEgl::nativeDisplay() return EGLNativeDisplayType(myDc); } +EGLNativeWindowType QEgl::nativeWindow(QWidget* widget) +{ + return (EGLNativeWindowType)(widget->winId()); +} + +EGLNativePixmapType QEgl::nativePixmap(QPixmap*) +{ + qWarning("QEgl: EGL pixmap surfaces not supported on WinCE"); + return (EGLNativePixmapType)0; +} + // Set pixel format and other properties based on a paint device. void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev) { diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp index a4bfcac..339bd57 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -67,6 +67,16 @@ EGLNativeDisplayType QEgl::nativeDisplay() return EGLNativeDisplayType(xdpy); } +EGLNativeWindowType QEgl::nativeWindow(QWidget* widget) +{ + return (EGLNativeWindowType)(widget->winId()); +} + +EGLNativePixmapType QEgl::nativePixmap(QPixmap* pixmap) +{ + return (EGLNativePixmapType)(pixmap->handle()); +} + static int countBits(unsigned long mask) { int count = 0; @@ -399,5 +409,4 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg return EGL_NO_SURFACE; } - QT_END_NAMESPACE -- cgit v0.12 From 8b19712189aa2c7e83030b59cd4b4729e5e113cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 2 Mar 2010 13:50:36 +0100 Subject: Compile. --- tools/qdoc3/node.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 6ad9a6c..7dda824 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -44,6 +44,7 @@ */ #include "node.h" +#include QT_BEGIN_NAMESPACE -- cgit v0.12 From 03daf059647c0a0222e8774b0a083f58c8e64934 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 2 Mar 2010 11:03:12 +0100 Subject: QMetaType: Now we can register typedefs. Task-number: QTBUG-6833 Task-number: QTBUG-937 Reviewed-by: Brad Reviewed-by: Kent Hansen --- .../snippets/code/src_corelib_kernel_qmetatype.cpp | 5 ++ src/corelib/kernel/qmetatype.cpp | 60 +++++++++++++++++++++- src/corelib/kernel/qmetatype.h | 37 ++++++++++++- tests/auto/qmetaobject/tst_qmetaobject.cpp | 20 ++++++++ tests/auto/qmetatype/tst_qmetatype.cpp | 14 ++++- tests/auto/qobject/tst_qobject.cpp | 16 ++++++ 6 files changed, 146 insertions(+), 6 deletions(-) diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp index bff72a0..19e37ba 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp @@ -108,3 +108,8 @@ int id = qRegisterMetaType(); int id = qMetaTypeId(); // id is now QMetaType::QString id = qMetaTypeId(); // compile error if MyStruct not declared //! [8] + +//! [9] +typedef QString CustomString; +qRegisterMetaType("CustomString"); +//! [9] diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 779b69b..be506b4 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -352,6 +352,7 @@ public: QMetaType::SaveOperator saveOp; QMetaType::LoadOperator loadOp; #endif + int alias; }; Q_DECLARE_TYPEINFO(QCustomTypeInfo, Q_MOVABLE_TYPE); @@ -436,8 +437,11 @@ static int qMetaTypeCustomType_unlocked(const char *typeName, int length) return 0; for (int v = 0; v < ct->count(); ++v) { - if ((length == ct->at(v).typeName.size()) - && !strcmp(typeName, ct->at(v).typeName.constData())) { + const QCustomTypeInfo &customInfo = ct->at(v); + if ((length == customInfo.typeName.size()) + && !strcmp(typeName, customInfo.typeName.constData())) { + if (customInfo.alias >= 0) + return customInfo.alias; return v + QMetaType::User; } } @@ -475,6 +479,7 @@ int QMetaType::registerType(const char *typeName, Destructor destructor, inf.typeName = normalizedTypeName; inf.constr = constructor; inf.destr = destructor; + inf.alias = -1; idx = ct->size() + User; ct->append(inf); } @@ -482,6 +487,51 @@ int QMetaType::registerType(const char *typeName, Destructor destructor, return idx; } +/*! \internal + \since 4.7 + + Registers a user type for marshalling, as an alias of another type (typedef) +*/ +int QMetaType::registerTypedef(const char* typeName, int aliasId) +{ + QVector *ct = customTypes(); + if (!ct || !typeName) + return -1; + +#ifdef QT_NO_QOBJECT + NS(QByteArray) normalizedTypeName = typeName; +#else + NS(QByteArray) normalizedTypeName = QMetaObject::normalizedType(typeName); +#endif + + int idx = qMetaTypeStaticType(normalizedTypeName.constData(), + normalizedTypeName.size()); + + if (idx) { + Q_ASSERT(idx == aliasId); + return idx; + } + + QWriteLocker locker(customTypesLock()); + idx = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(), + normalizedTypeName.size()); + + if (idx) { + Q_ASSERT(idx == aliasId); + return idx; + } + + if (!idx) { + QCustomTypeInfo inf; + inf.typeName = normalizedTypeName; + inf.alias = aliasId; + inf.constr = 0; + inf.destr = 0; + ct->append(inf); + } + return aliasId; +} + /*! \since 4.4 @@ -507,6 +557,7 @@ void QMetaType::unregisterType(const char *typeName) inf.typeName.clear(); inf.constr = 0; inf.destr = 0; + inf.alias = -1; } } } @@ -1349,6 +1400,11 @@ void QMetaType::destroy(int type, void *data) \snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 4 + This function is usefull to register typedefs so they can be used + by QMetaProperty, or in QueuedConnections + + \snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 9 + \sa qRegisterMetaTypeStreamOperators(), QMetaType::isRegistered(), Q_DECLARE_METATYPE() */ diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 33126e8..2ed4a1f 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -113,6 +113,7 @@ public: #endif static int registerType(const char *typeName, Destructor destructor, Constructor constructor); + static int registerTypedef(const char *typeName, int aliasId); static int type(const char *typeName); static const char *typeName(int type); static bool isRegistered(int type); @@ -154,13 +155,31 @@ void qMetaTypeLoadHelper(QDataStream &stream, T *t) } #endif // QT_NO_DATASTREAM +template struct QMetaTypeId2; + +namespace QtPrivate { + template ::Defined> + struct QMetaTypeIdHelper { + static inline int qt_metatype_id() + { return QMetaTypeId2::qt_metatype_id(); } + }; + template struct QMetaTypeIdHelper { + static inline int qt_metatype_id() + { return -1; } + }; +} + template int qRegisterMetaType(const char *typeName #ifndef qdoc - , T * /* dummy */ = 0 + , typename QMetaTypeId2::CustomType * dummy = 0 #endif ) { + const int typedefOf = dummy ? -1 : QtPrivate::QMetaTypeIdHelper::qt_metatype_id(); + if (typedefOf != -1) + return QMetaType::registerTypedef(typeName, typedefOf); + typedef void*(*ConstructPtr)(const T*); ConstructPtr cptr = qMetaTypeConstructHelper; typedef void(*DeletePtr)(T*); @@ -170,6 +189,17 @@ int qRegisterMetaType(const char *typeName reinterpret_cast(cptr)); } +template +int qRegisterMetaType(const char *typeName +#ifndef qdoc + , typename QMetaTypeId2::BuiltinType * /* dummy */ = 0 +#endif +) +{ + return QMetaType::registerTypedef(typeName, QMetaTypeId2::MetaType); +} + + #ifndef QT_NO_DATASTREAM template void qRegisterMetaTypeStreamOperators(const char *typeName @@ -198,6 +228,7 @@ struct QMetaTypeId template struct QMetaTypeId2 { + typedef T CustomType; enum { Defined = QMetaTypeId::Defined }; static inline int qt_metatype_id() { return QMetaTypeId::qt_metatype_id(); } }; @@ -254,7 +285,8 @@ inline int qRegisterMetaTypeStreamOperators() { \ static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ if (!metatype_id) \ - metatype_id = qRegisterMetaType< TYPE >(#TYPE); \ + metatype_id = qRegisterMetaType< TYPE >(#TYPE, \ + reinterpret_cast< TYPE *>(quintptr(-1))); \ return metatype_id; \ } \ }; \ @@ -264,6 +296,7 @@ inline int qRegisterMetaTypeStreamOperators() QT_BEGIN_NAMESPACE \ template<> struct QMetaTypeId2 \ { \ + typedef TYPE BuiltinType; \ enum { Defined = 1, MetaType = QMetaType::NAME }; \ static inline int qt_metatype_id() { return QMetaType::NAME; } \ }; \ diff --git a/tests/auto/qmetaobject/tst_qmetaobject.cpp b/tests/auto/qmetaobject/tst_qmetaobject.cpp index bd54975..bb4a0d2 100644 --- a/tests/auto/qmetaobject/tst_qmetaobject.cpp +++ b/tests/auto/qmetaobject/tst_qmetaobject.cpp @@ -157,6 +157,7 @@ private slots: void invokeQueuedMetaMember(); void invokeCustomTypes(); void invokeMetaConstructor(); + void invokeTypedefTypes(); void qtMetaObjectInheritance(); void normalizedSignature_data(); void normalizedSignature(); @@ -598,6 +599,8 @@ struct MyType int i1, i2, i3; }; +typedef QString CustomString; + class QtTestCustomObject: public QObject { Q_OBJECT @@ -607,6 +610,9 @@ public: public slots: void sl1(MyType myType); +signals: + void sig_custom(const CustomString &string); + public: int sum; }; @@ -664,6 +670,20 @@ void tst_QMetaObject::invokeMetaConstructor() } } +void tst_QMetaObject::invokeTypedefTypes() +{ + qRegisterMetaType("CustomString"); + QtTestCustomObject obj; + QSignalSpy spy(&obj, SIGNAL(sig_custom(CustomString))); + + QCOMPARE(spy.count(), 0); + CustomString arg("hello"); + QVERIFY(QMetaObject::invokeMethod(&obj, "sig_custom", Q_ARG(CustomString, arg))); + QCOMPARE(spy.count(), 1); + QCOMPARE(spy.at(0).count(), 1); + QCOMPARE(spy.at(0).at(0), QVariant(arg)); +} + void tst_QMetaObject::normalizedSignature_data() { QTest::addColumn("signature"); diff --git a/tests/auto/qmetatype/tst_qmetatype.cpp b/tests/auto/qmetatype/tst_qmetatype.cpp index 943b05b..f4e122f 100644 --- a/tests/auto/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/qmetatype/tst_qmetatype.cpp @@ -241,6 +241,9 @@ void tst_QMetaType::construct() QMetaType::destroy(QMetaType::QSize, size); } +typedef QString CustomString; +Q_DECLARE_METATYPE(CustomString) //this line is useless + void tst_QMetaType::typedefs() { QCOMPARE(QMetaType::type("long long"), int(QMetaType::LongLong)); @@ -256,6 +259,13 @@ void tst_QMetaType::typedefs() // make sure the qreal typeId is the type id of the type it's defined to QCOMPARE(QMetaType::type("qreal"), ::qMetaTypeId()); + + qRegisterMetaType("CustomString"); + QCOMPARE(QMetaType::type("CustomString"), ::qMetaTypeId()); + + typedef Whity WhityDouble; + qRegisterMetaType("WhityDouble"); + QCOMPARE(QMetaType::type("WhityDouble"), ::qMetaTypeId()); } class IsRegisteredDummyType { }; @@ -286,9 +296,9 @@ void tst_QMetaType::isRegistered() QCOMPARE(QMetaType::isRegistered(typeId), registered); } -class RegUnreg +class RegUnreg { -public: +public: RegUnreg() {}; RegUnreg(const RegUnreg &) {}; ~RegUnreg() {}; diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp index 3896d70..c8f846e 100644 --- a/tests/auto/qobject/tst_qobject.cpp +++ b/tests/auto/qobject/tst_qobject.cpp @@ -1112,6 +1112,8 @@ void tst_QObject::streamCustomTypes() QCOMPARE(instanceCount, 0); } +typedef QString CustomString; + class PropertyObject : public QObject { Q_OBJECT @@ -1125,6 +1127,7 @@ class PropertyObject : public QObject Q_PROPERTY(CustomType* custom READ custom WRITE setCustom) Q_PROPERTY(float myFloat READ myFloat WRITE setMyFloat) Q_PROPERTY(qreal myQReal READ myQReal WRITE setMyQReal) + Q_PROPERTY(CustomString customString READ customString WRITE setCustomString ) public: enum Alpha { @@ -1163,6 +1166,9 @@ public: void setMyQReal(qreal value) { m_qreal = value; } qreal myQReal() const { return m_qreal; } + CustomString customString() const { return m_customString; } + void setCustomString(const QString &string) { m_customString = string; } + private: Alpha m_alpha; Priority m_priority; @@ -1172,6 +1178,7 @@ private: CustomType *m_custom; float m_float; qreal m_qreal; + CustomString m_customString; }; Q_DECLARE_METATYPE(PropertyObject::Priority) @@ -1626,6 +1633,15 @@ void tst_QObject::property() QCOMPARE(qVariantValue(object.property("priority")), PropertyObject::Low); object.setProperty("priority", var); QCOMPARE(qVariantValue(object.property("priority")), PropertyObject::High); + + qRegisterMetaType("CustomString"); + QVERIFY(mo->indexOfProperty("customString") != -1); + QCOMPARE(object.property("customString").toString(), QString()); + object.setCustomString("String1"); + QCOMPARE(object.property("customString"), QVariant("String1")); + QVERIFY(object.setProperty("customString", "String2")); + QCOMPARE(object.property("customString"), QVariant("String2")); + QVERIFY(!object.setProperty("customString", QVariant())); } void tst_QObject::metamethod() -- cgit v0.12 From 298aee0577a45dadf8e30b5bea05224f9e3aa52d Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Tue, 2 Mar 2010 13:49:52 +0100 Subject: Added comment about usage of strncpy_s function in VC++ > 14.00 Reviewed-by: Peter Hartmann --- src/corelib/tools/qbytearray.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 3324796..c5f70b0 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -154,6 +154,10 @@ char *qstrcpy(char *dst, const char *src) This function assumes that \a dst is at least \a len characters long. + \note When compiling with Visual C++ compiler version 14.00 + (Visual C++ 2005) or later, internally the function strncpy_s + will be used. + \sa qstrcpy() */ -- cgit v0.12 From a62177874d961e0884e74ba7c7c8899fdb79fb09 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 1 Mar 2010 18:58:06 +0100 Subject: Always run syncqt if using a Git checkout. Reviewed-by: Olivier Goffart --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 2312165..2c7e431 100755 --- a/configure +++ b/configure @@ -4322,7 +4322,7 @@ if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes" if [ "$OPT_SHADOW" = "yes" ]; then "$outpath/bin/syncqt" $SYNCQT_OPTS - elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ]; then + elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS fi fi -- cgit v0.12 From 67cd8cc97104e38f2e3bae03b2a4c3575c73c461 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 1 Mar 2010 22:12:01 +0100 Subject: Add a template specialisation for QArgument when T is a reference. We can't form references to references, so this is the proper solution. Though apparently GCC figures out somehow to work without it... Task-number: QTBUG-8592 Reviewed-By: Olivier Goffart --- src/corelib/kernel/qobjectdefs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index 8ed7f3f..b045c42 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -271,6 +271,14 @@ public: : QGenericArgument(aName, static_cast(&aData)) {} }; +template +class QArgument: public QGenericArgument +{ +public: + inline QArgument(const char *aName, T &aData) + : QGenericArgument(aName, static_cast(&aData)) + {} +}; template -- cgit v0.12 From 115c3214161152c99f488fd4cce39b15b40b3600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Tue, 2 Mar 2010 15:34:29 +0100 Subject: Fixed a regression in the syntax highlighter Caused by merging an old version of merge request 481. This patch updates it to the latest version. Merge-request: 481 Reviewed-by: Ritt Konstantin --- src/gui/text/qsyntaxhighlighter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp index 28af5bb..e594b7e 100644 --- a/src/gui/text/qsyntaxhighlighter.cpp +++ b/src/gui/text/qsyntaxhighlighter.cpp @@ -115,6 +115,9 @@ void QSyntaxHighlighterPrivate::applyFormatChanges() formatsChanged = true; } } + } else if (!ranges.isEmpty()) { + ranges.clear(); + formatsChanged = true; } QTextCharFormat emptyFormat; -- cgit v0.12 From 95087389919837fef920c6c06ccd34c3136c6b5e Mon Sep 17 00:00:00 2001 From: ck Date: Mon, 1 Mar 2010 17:45:15 +0100 Subject: Help system: Build search index with low priority. Reviewed-by: kh1 --- tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp | 2 +- tools/assistant/lib/qhelpsearchindexwriter_default.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp index d9dcec5..4baa376 100644 --- a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp +++ b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp @@ -586,7 +586,7 @@ void QHelpSearchIndexWriter::updateIndex(const QString &collectionFile, this->m_indexFilesFolder = indexFilesFolder; mutex.unlock(); - start(QThread::NormalPriority); + start(QThread::LowestPriority); } void QHelpSearchIndexWriter::optimizeIndex() diff --git a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp index cb3e49c..827d145 100644 --- a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp +++ b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp @@ -191,7 +191,7 @@ void QHelpSearchIndexWriter::updateIndex(const QString &collectionFile, this->m_collectionFile = collectionFile; this->m_indexFilesFolder = indexFilesFolder; - start(QThread::NormalPriority); + start(QThread::LowestPriority); } void QHelpSearchIndexWriter::run() -- cgit v0.12 From fbcfcea9bb5cf0ce39e5ce1fb9b0628930f034d1 Mon Sep 17 00:00:00 2001 From: ck Date: Tue, 2 Mar 2010 15:31:27 +0100 Subject: Assistant: Un-watch files at shutdown. Not strictly needed, but it seems nicer to have a removePath() for every addPath(). Reviewed-by: kh1 --- tools/assistant/tools/assistant/helpenginewrapper.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/assistant/tools/assistant/helpenginewrapper.cpp b/tools/assistant/tools/assistant/helpenginewrapper.cpp index e21e95d..41ad633 100644 --- a/tools/assistant/tools/assistant/helpenginewrapper.cpp +++ b/tools/assistant/tools/assistant/helpenginewrapper.cpp @@ -167,6 +167,13 @@ HelpEngineWrapper::HelpEngineWrapper(const QString &collectionFile) HelpEngineWrapper::~HelpEngineWrapper() { TRACE_OBJ + const QStringList &namespaces = d->m_helpEngine->registeredDocumentations(); + foreach (const QString &nameSpace, namespaces) { + const QString &docFile + = d->m_helpEngine->documentationFileName(nameSpace); + d->m_qchWatcher->removePath(docFile); + } + delete d; } -- cgit v0.12 From e614e3548bbe505c75e8b3a54f44f07522a6ecf5 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 2 Mar 2010 16:41:16 +0100 Subject: Add and use QGLContextPrivate::eglSurfaceForDevice() The QGLContext only stores the EGLSurface for QWidgets & QGLWidgets, other device types like QPixmap & QGLPixelBuffer store the surface themsselves. With this patch it is possible to create a QGLContext on a QPixmap, make it current and render GL to that QPixmap on X11. Reviewed-By: TrustMe --- src/opengl/qgl_egl.cpp | 33 ++++++++++++++++++++++++++++++--- src/opengl/qgl_p.h | 1 + src/opengl/qgl_x11egl.cpp | 2 +- src/opengl/qglpixelbuffer.h | 1 + 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp index f1abab8..7bfcf27 100644 --- a/src/opengl/qgl_egl.cpp +++ b/src/opengl/qgl_egl.cpp @@ -40,8 +40,14 @@ ****************************************************************************/ #include +#include #include "qgl_p.h" #include "qgl_egl_p.h" +#include "qglpixelbuffer_p.h" + +#ifdef Q_WS_X11 +#include +#endif QT_BEGIN_NAMESPACE @@ -154,12 +160,12 @@ void QGLContext::reset() void QGLContext::makeCurrent() { Q_D(QGLContext); - if (!d->valid || !d->eglContext || d->eglSurface == EGL_NO_SURFACE) { + if (!d->valid || !d->eglContext || d->eglSurfaceForDevice() == EGL_NO_SURFACE) { qWarning("QGLContext::makeCurrent(): Cannot make invalid context current"); return; } - if (d->eglContext->makeCurrent(d->eglSurface)) + if (d->eglContext->makeCurrent(d->eglSurfaceForDevice())) QGLContextPrivate::setCurrentContext(this); } @@ -179,7 +185,7 @@ void QGLContext::swapBuffers() const if (!d->valid || !d->eglContext) return; - d->eglContext->swapBuffers(d->eglSurface); + d->eglContext->swapBuffers(d->eglSurfaceForDevice()); } void QGLContextPrivate::destroyEglSurfaceForDevice() @@ -202,6 +208,27 @@ void QGLContextPrivate::destroyEglSurfaceForDevice() } } +EGLSurface QGLContextPrivate::eglSurfaceForDevice() const +{ + if (paintDevice->devType() == QInternal::Widget) + return eglSurface; + if (paintDevice->devType() == QInternal::Pixmap) { +#ifdef Q_WS_X11 + QPixmapData *pmd = static_cast(paintDevice)->data_ptr().data(); + if (pmd->classId() == QPixmapData::X11Class) { + QX11PixmapData* x11PixmapData = static_cast(pmd); + return (EGLSurface)x11PixmapData->gl_surface; + } else +#endif + return eglSurface; + } + if (paintDevice->devType() == QInternal::Pbuffer) { + QGLPixelBuffer* pbuf = static_cast(paintDevice); + return pbuf->d_func()->pbuf; + } + return EGL_NO_SURFACE; +} + void QGLWidget::setMouseTracking(bool enable) { QWidget::setMouseTracking(enable); diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index ecd8b43..b828bea 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -356,6 +356,7 @@ public: QEglContext *eglContext; EGLSurface eglSurface; void destroyEglSurfaceForDevice(); + EGLSurface eglSurfaceForDevice() const; #elif defined(Q_WS_X11) || defined(Q_WS_MAC) void* cx; #endif diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index bcde8c4..ba05e72 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -229,7 +229,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // QWidget - yes, create the EGLSurface and store it in QGLContextPrivate::eglSurface // QGLWidget - yes, create the EGLSurface and store it in QGLContextPrivate::eglSurface // QPixmap - yes, create the EGLSurface but store it in QX11PixmapData::gl_surface - // QGLPixelBuffer - no, it creates the surface itself + // QGLPixelBuffer - no, it creates the surface itself and stores it in QGLPixelBufferPrivate::pbuf if (devType == QInternal::Widget) { if (d->eglSurface != EGL_NO_SURFACE) diff --git a/src/opengl/qglpixelbuffer.h b/src/opengl/qglpixelbuffer.h index 3304dd8..d9c7e3e 100644 --- a/src/opengl/qglpixelbuffer.h +++ b/src/opengl/qglpixelbuffer.h @@ -112,6 +112,7 @@ private: friend class QGLWindowSurface; friend class QGLPaintDevice; friend class QGLPBufferGLPaintDevice; + friend class QGLContextPrivate; }; QT_END_NAMESPACE -- cgit v0.12 From ffec21e1e0694972592150c600f2970b6f28dbad Mon Sep 17 00:00:00 2001 From: ck Date: Tue, 2 Mar 2010 17:09:49 +0100 Subject: Assistant: Don't warn for non-existing English to English translations. They usually don't exist, so we'd just be adding noise otherwise. Reviewed-by: kh1 --- tools/assistant/tools/assistant/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp index 77e5e7c..51ea9f9 100644 --- a/tools/assistant/tools/assistant/main.cpp +++ b/tools/assistant/tools/assistant/main.cpp @@ -292,7 +292,7 @@ void setupTranslation(const QString &fileName, const QString &dir) QTranslator *translator = new QTranslator(QCoreApplication::instance()); if (translator->load(fileName, dir)) { QCoreApplication::installTranslator(translator); - } else { + } else if (!fileName.endsWith(QLatin1String("en_US"))) { qWarning("Could not load translation file %s in directory %s.", qPrintable(fileName), qPrintable(dir)); } -- cgit v0.12 From 31e1fb9103e6d6657c1153f5c30e149087568042 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 2 Mar 2010 17:15:32 +0100 Subject: make the value of QMAKE_QMAKE somewhat less magic the generators change the value of QMAKE_QMAKE, so it is unwise to "redirect" it to a hidden builtin which is reset each time. in particular, this fixes qmake generating makefiles without an absolute path to qmake itself - the initial quoting of the filename will make the variable "real", so contains() will start working for it. --- qmake/project.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index 951ca33..cf1c365 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -3136,7 +3136,6 @@ QStringList &QMakeProject::values(const QString &_var, QMap Date: Tue, 2 Mar 2010 11:12:34 +1000 Subject: Fixed compiler warnings when compiling multimedia module. Reviewed-by:Andrew den Exter --- src/multimedia/base/qmediaserviceprovider.cpp | 14 +++++++++----- src/multimedia/qml/qsoundeffect_qsound_p.cpp | 2 +- src/multimedia/qml/wavedecoder_p.cpp | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/multimedia/base/qmediaserviceprovider.cpp b/src/multimedia/base/qmediaserviceprovider.cpp index eb6505c..d51d682 100644 --- a/src/multimedia/base/qmediaserviceprovider.cpp +++ b/src/multimedia/base/qmediaserviceprovider.cpp @@ -268,7 +268,7 @@ class QPluginServiceProvider : public QMediaServiceProvider public: QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &hint) { - QString key(type); + QString key(QString::fromLatin1(type.constData(),type.length())); QListplugins; foreach (QObject *obj, loader()->instances(key)) { @@ -383,7 +383,8 @@ public: const QStringList& codecs, int flags) const { - QList instances = loader()->instances(serviceType); + QList instances = loader()->instances( + QString::fromLatin1(serviceType.constData(),serviceType.length())); if (instances.isEmpty()) return QtMultimedia::NotSupported; @@ -424,7 +425,8 @@ public: QStringList supportedMimeTypes(const QByteArray &serviceType, int flags) const { - QList instances = loader()->instances(serviceType); + QList instances = loader()->instances( + QString::fromLatin1(serviceType.constData(),serviceType.length())); QStringList supportedTypes; @@ -457,7 +459,8 @@ public: { QList res; - foreach(QObject *obj, loader()->instances(serviceType)) { + foreach(QObject *obj, loader()->instances( + QString::fromLatin1(serviceType.constData(),serviceType.length()))) { QMediaServiceSupportedDevicesInterface *iface = qobject_cast(obj); @@ -471,7 +474,8 @@ public: QString deviceDescription(const QByteArray &serviceType, const QByteArray &device) { - foreach(QObject *obj, loader()->instances(serviceType)) { + foreach(QObject *obj, loader()->instances( + QString::fromLatin1(serviceType.constData(),serviceType.length()))) { QMediaServiceSupportedDevicesInterface *iface = qobject_cast(obj); diff --git a/src/multimedia/qml/qsoundeffect_qsound_p.cpp b/src/multimedia/qml/qsoundeffect_qsound_p.cpp index 0292d26..df160a9 100644 --- a/src/multimedia/qml/qsoundeffect_qsound_p.cpp +++ b/src/multimedia/qml/qsoundeffect_qsound_p.cpp @@ -157,7 +157,7 @@ void QSoundEffectPrivate::setMedia(const QMediaContent &media) { m_queued = false; - if (media.isNull() || media.canonicalUrl().scheme() != "file") { + if (media.isNull() || media.canonicalUrl().scheme() != QLatin1String("file")) { m_media = QMediaContent(); return; } diff --git a/src/multimedia/qml/wavedecoder_p.cpp b/src/multimedia/qml/wavedecoder_p.cpp index b7d6101..f2277ae 100644 --- a/src/multimedia/qml/wavedecoder_p.cpp +++ b/src/multimedia/qml/wavedecoder_p.cpp @@ -122,7 +122,7 @@ void WaveDecoder::handleData() else { int bps = qFromLittleEndian(header.wave.bitsPerSample); - format.setCodec("audio/pcm"); + format.setCodec(QLatin1String("audio/pcm")); format.setSampleType(bps == 8 ? QAudioFormat::UnSignedInt : QAudioFormat::SignedInt); format.setByteOrder(QAudioFormat::LittleEndian); format.setFrequency(qFromLittleEndian(header.wave.sampleRate)); -- cgit v0.12 From c92b1da931a56f97bf1812db922d43c8f692de8f Mon Sep 17 00:00:00 2001 From: Dmytro Poplavskiy Date: Wed, 3 Mar 2010 13:13:45 +1000 Subject: Gstreamer playback backend: Start loading media on setMedia(), without waiting for play() or pause(). To keep behaviour consisten with the rest of backends. Reviewed-by: Andrew den Exter --- .../mediaplayer/qgstreamerplayercontrol.cpp | 133 ++++++++++++++++++--- .../mediaplayer/qgstreamerplayercontrol.h | 7 ++ .../mediaplayer/qgstreamerplayersession.cpp | 94 +++++++++------ .../mediaplayer/qgstreamerplayersession.h | 11 +- 4 files changed, 186 insertions(+), 59 deletions(-) diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp index 2d7aaa8..e646693 100644 --- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp +++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp @@ -59,6 +59,9 @@ QT_BEGIN_NAMESPACE QGstreamerPlayerControl::QGstreamerPlayerControl(QGstreamerPlayerSession *session, QObject *parent) : QMediaPlayerControl(parent) , m_session(session) + , m_state(QMediaPlayer::StoppedState) + , m_mediaStatus(QMediaPlayer::NoMedia) + , m_bufferProgress(-1) , m_stream(0) , m_fifoNotifier(0) , m_fifoCanWrite(false) @@ -77,11 +80,11 @@ QGstreamerPlayerControl::QGstreamerPlayerControl(QGstreamerPlayerSession *sessio connect(m_session, SIGNAL(volumeChanged(int)), this, SIGNAL(volumeChanged(int))); connect(m_session, SIGNAL(stateChanged(QMediaPlayer::State)), - this, SIGNAL(stateChanged(QMediaPlayer::State))); - connect(m_session, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), - this, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus))); + this, SLOT(updateState(QMediaPlayer::State))); connect(m_session,SIGNAL(bufferingProgressChanged(int)), - this, SIGNAL(bufferStatusChanged(int))); + this, SLOT(setBufferProgress(int))); + connect(m_session, SIGNAL(playbackFinished()), + this, SLOT(processEOS())); connect(m_session, SIGNAL(audioAvailableChanged(bool)), this, SIGNAL(audioAvailableChanged(bool))); connect(m_session, SIGNAL(videoAvailableChanged(bool)), @@ -114,17 +117,20 @@ qint64 QGstreamerPlayerControl::duration() const QMediaPlayer::State QGstreamerPlayerControl::state() const { - return m_session->state(); + return m_state; } QMediaPlayer::MediaStatus QGstreamerPlayerControl::mediaStatus() const { - return m_session->mediaStatus(); + return m_mediaStatus; } int QGstreamerPlayerControl::bufferStatus() const { - return 100; + if (m_bufferProgress == -1) { + return m_session->state() == QMediaPlayer::StoppedState ? 0 : 100; + } else + return m_bufferProgress; } int QGstreamerPlayerControl::volume() const @@ -169,23 +175,33 @@ void QGstreamerPlayerControl::setPosition(qint64 pos) void QGstreamerPlayerControl::play() { - m_session->play(); - - if (m_fifoFd[1] >= 0) { - m_fifoCanWrite = true; - - writeFifo(); + if (m_session->play()) { + if (m_state != QMediaPlayer::PlayingState) + emit stateChanged(m_state = QMediaPlayer::PlayingState); } } void QGstreamerPlayerControl::pause() { - m_session->pause(); + if (m_session->pause()) { + if (m_state != QMediaPlayer::PausedState) + emit stateChanged(m_state = QMediaPlayer::PausedState); + } } void QGstreamerPlayerControl::stop() { - m_session->stop(); + if (m_state != QMediaPlayer::StoppedState) { + m_session->pause(); + if (!m_session->seek(0)) { + m_bufferProgress = -1; + m_session->stop(); + m_session->pause(); + } + emit positionChanged(0); + if (m_state != QMediaPlayer::StoppedState) + emit stateChanged(m_state = QMediaPlayer::StoppedState); + } } void QGstreamerPlayerControl::setVolume(int volume) @@ -210,8 +226,15 @@ const QIODevice *QGstreamerPlayerControl::mediaStream() const void QGstreamerPlayerControl::setMedia(const QMediaContent &content, QIODevice *stream) { + QMediaPlayer::State oldState = m_state; + m_state = QMediaPlayer::StoppedState; m_session->stop(); + if (m_bufferProgress != -1) { + m_bufferProgress = -1; + emit bufferStatusChanged(0); + } + if (m_stream) { closeFifo(); @@ -234,7 +257,25 @@ void QGstreamerPlayerControl::setMedia(const QMediaContent &content, QIODevice * m_session->load(url); + if (m_fifoFd[1] >= 0) { + m_fifoCanWrite = true; + + writeFifo(); + } + + if (!url.isEmpty()) { + if (m_mediaStatus != QMediaPlayer::LoadingMedia) + emit mediaStatusChanged(m_mediaStatus = QMediaPlayer::LoadingMedia); + m_session->pause(); + } else { + if (m_mediaStatus != QMediaPlayer::NoMedia) + emit mediaStatusChanged(m_mediaStatus = QMediaPlayer::NoMedia); + setBufferProgress(0); + } + emit mediaChanged(m_currentResource); + if (m_state != oldState) + emit stateChanged(m_state); } void QGstreamerPlayerControl::setVideoOutput(QObject *output) @@ -252,6 +293,68 @@ bool QGstreamerPlayerControl::isVideoAvailable() const return m_session->isVideoAvailable(); } +void QGstreamerPlayerControl::updateState(QMediaPlayer::State state) +{ + QMediaPlayer::MediaStatus oldStatus = m_mediaStatus; + + switch (state) { + case QMediaPlayer::StoppedState: + if (m_state != QMediaPlayer::StoppedState) + emit stateChanged(m_state = QMediaPlayer::StoppedState); + break; + + case QMediaPlayer::PlayingState: + case QMediaPlayer::PausedState: + if (m_state == QMediaPlayer::StoppedState) + m_mediaStatus = QMediaPlayer::LoadedMedia; + else { + if (m_bufferProgress == -1) + m_mediaStatus = QMediaPlayer::BufferedMedia; + } + break; + } + + if (m_mediaStatus != oldStatus) + emit mediaStatusChanged(m_mediaStatus); +} + +void QGstreamerPlayerControl::processEOS() +{ + m_mediaStatus = QMediaPlayer::EndOfMedia; + m_state = QMediaPlayer::StoppedState; + + emit stateChanged(m_state); + emit mediaStatusChanged(m_mediaStatus); +} + +void QGstreamerPlayerControl::setBufferProgress(int progress) +{ + if (m_bufferProgress == progress || m_mediaStatus == QMediaPlayer::NoMedia) + return; + + QMediaPlayer::MediaStatus oldStatus = m_mediaStatus; + + m_bufferProgress = progress; + + if (m_state == QMediaPlayer::StoppedState) { + m_mediaStatus = QMediaPlayer::LoadedMedia; + } else { + if (m_bufferProgress < 100) { + m_mediaStatus = QMediaPlayer::StalledMedia; + m_session->pause(); + } else { + m_mediaStatus = QMediaPlayer::BufferedMedia; + if (m_state == QMediaPlayer::PlayingState) + m_session->play(); + } + } + + if (m_mediaStatus != oldStatus) + emit mediaStatusChanged(m_mediaStatus); + + emit bufferStatusChanged(m_bufferProgress); +} + void QGstreamerPlayerControl::writeFifo() { if (m_fifoCanWrite) { diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.h b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.h index ae0f8b6..0c53945 100644 --- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.h +++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.h @@ -107,11 +107,18 @@ private Q_SLOTS: void writeFifo(); void fifoReadyWrite(int socket); + void updateState(QMediaPlayer::State); + void processEOS(); + void setBufferProgress(int progress); + private: bool openFifo(); void closeFifo(); QGstreamerPlayerSession *m_session; + QMediaPlayer::State m_state; + QMediaPlayer::MediaStatus m_mediaStatus; + int m_bufferProgress; QMediaContent m_currentResource; QIODevice *m_stream; QSocketNotifier *m_fifoNotifier; diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp index 600621e..e80e820 100644 --- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp +++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp @@ -57,7 +57,6 @@ QT_BEGIN_NAMESPACE QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent) :QObject(parent), m_state(QMediaPlayer::StoppedState), - m_mediaStatus(QMediaPlayer::UnknownMediaStatus), m_busHelper(0), m_playbin(0), m_nullVideoOutput(0), @@ -115,6 +114,7 @@ QGstreamerPlayerSession::~QGstreamerPlayerSession() void QGstreamerPlayerSession::load(const QUrl &url) { m_url = url; + if (m_playbin) { m_tags.clear(); emit tagsChanged(); @@ -259,26 +259,36 @@ bool QGstreamerPlayerSession::isSeekable() const return m_seekable; } -void QGstreamerPlayerSession::play() +bool QGstreamerPlayerSession::play() { if (m_playbin) { if (gst_element_set_state(m_playbin, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { qWarning() << "GStreamer; Unable to play -" << m_url.toString(); - m_state = QMediaPlayer::StoppedState; - m_mediaStatus = QMediaPlayer::InvalidMedia; + m_state = QMediaPlayer::StoppedState; emit stateChanged(m_state); - emit mediaStatusChanged(m_mediaStatus); - emit error(int(QMediaPlayer::ResourceError), tr("Unable to play %1").arg(m_url.path())); - } + } else + return true; } + + return false; } -void QGstreamerPlayerSession::pause() +bool QGstreamerPlayerSession::pause() { - if (m_playbin) - gst_element_set_state(m_playbin, GST_STATE_PAUSED); + if (m_playbin) { + if (gst_element_set_state(m_playbin, GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE) { + qWarning() << "GStreamer; Unable to play -" << m_url.toString(); + m_state = QMediaPlayer::StoppedState; + + emit stateChanged(m_state); + emit error(int(QMediaPlayer::ResourceError), tr("Unable to play %1").arg(m_url.path())); + } else + return true; + } + + return false; } void QGstreamerPlayerSession::stop() @@ -292,12 +302,14 @@ void QGstreamerPlayerSession::stop() } } -void QGstreamerPlayerSession::seek(qint64 ms) +bool QGstreamerPlayerSession::seek(qint64 ms) { if (m_playbin && m_state != QMediaPlayer::StoppedState) { gint64 position = (gint64)ms * 1000000; - gst_element_seek_simple(m_playbin, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, position); + return gst_element_seek_simple(m_playbin, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, position); } + + return false; } void QGstreamerPlayerSession::setVolume(int volume) @@ -388,14 +400,6 @@ void QGstreamerPlayerSession::setSeekable(bool seekable) } } -void QGstreamerPlayerSession::setMediaStatus(QMediaPlayer::MediaStatus status) -{ - if (m_mediaStatus != status) { - m_mediaStatus = status; - emit mediaStatusChanged(status); - } -} - bool QGstreamerPlayerSession::processSyncMessage(const QGstreamerMessage &message) { GstMessage* gm = message.rawMessage(); @@ -440,9 +444,6 @@ void QGstreamerPlayerSession::busMessage(const QGstreamerMessage &message) if (GST_MESSAGE_SRC(gm) == GST_OBJECT_CAST(m_playbin)) { switch (GST_MESSAGE_TYPE(gm)) { - case GST_MESSAGE_DURATION: - break; - case GST_MESSAGE_STATE_CHANGED: { GstState oldState; @@ -462,24 +463,19 @@ void QGstreamerPlayerSession::busMessage(const QGstreamerMessage &message) switch (newState) { case GST_STATE_VOID_PENDING: case GST_STATE_NULL: - setMediaStatus(QMediaPlayer::UnknownMediaStatus); setSeekable(false); if (m_state != QMediaPlayer::StoppedState) emit stateChanged(m_state = QMediaPlayer::StoppedState); break; case GST_STATE_READY: - setMediaStatus(QMediaPlayer::LoadedMedia); setSeekable(false); if (m_state != QMediaPlayer::StoppedState) emit stateChanged(m_state = QMediaPlayer::StoppedState); break; case GST_STATE_PAUSED: - //don't emit state changes for intermediate states - if (m_state != QMediaPlayer::PausedState && pending == GST_STATE_VOID_PENDING) + if (m_state != QMediaPlayer::PausedState) emit stateChanged(m_state = QMediaPlayer::PausedState); - setMediaStatus(QMediaPlayer::LoadedMedia); - //check for seekable if (oldState == GST_STATE_READY) { /* @@ -513,17 +509,13 @@ void QGstreamerPlayerSession::busMessage(const QGstreamerMessage &message) if (m_state != QMediaPlayer::PlayingState) emit stateChanged(m_state = QMediaPlayer::PlayingState); + break; } } break; case GST_MESSAGE_EOS: - if (m_state != QMediaPlayer::StoppedState) - emit stateChanged(m_state = QMediaPlayer::StoppedState); - - setMediaStatus(QMediaPlayer::EndOfMedia); - emit playbackFinished(); break; @@ -546,7 +538,11 @@ void QGstreamerPlayerSession::busMessage(const QGstreamerMessage &message) case GST_MESSAGE_INFO: break; case GST_MESSAGE_BUFFERING: - setMediaStatus(QMediaPlayer::BufferingMedia); + { + int progress = 0; + gst_message_parse_buffering(gm, &progress); + emit bufferingProgressChanged(progress); + } break; case GST_MESSAGE_STATE_DIRTY: case GST_MESSAGE_STEP_DONE: @@ -556,8 +552,32 @@ void QGstreamerPlayerSession::busMessage(const QGstreamerMessage &message) case GST_MESSAGE_STRUCTURE_CHANGE: case GST_MESSAGE_APPLICATION: case GST_MESSAGE_ELEMENT: + break; case GST_MESSAGE_SEGMENT_START: + { + const GstStructure *structure = gst_message_get_structure(gm); + qint64 position = g_value_get_int64(gst_structure_get_value(structure, "position")); + position /= 1000000; + m_lastPosition = position; + emit positionChanged(position); + } + break; case GST_MESSAGE_SEGMENT_DONE: + break; + case GST_MESSAGE_DURATION: + { + GstFormat format = GST_FORMAT_TIME; + gint64 duration = 0; + + if (gst_element_query_duration(m_playbin, &format, &duration)) { + int newDuration = duration / 1000000; + if (m_duration != newDuration) { + m_duration = newDuration; + emit durationChanged(m_duration); + } + } + } + break; case GST_MESSAGE_LATENCY: #if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 13) case GST_MESSAGE_ASYNC_START: @@ -604,7 +624,7 @@ void QGstreamerPlayerSession::getStreamsInfo() haveAudio = audioStreamsCount > 0; haveVideo = videoStreamsCount > 0; - m_playbin2StreamOffset[QMediaStreamsControl::AudioStream] = 0; + /*m_playbin2StreamOffset[QMediaStreamsControl::AudioStream] = 0; m_playbin2StreamOffset[QMediaStreamsControl::VideoStream] = audioStreamsCount; m_playbin2StreamOffset[QMediaStreamsControl::SubPictureStream] = audioStreamsCount+videoStreamsCount; @@ -648,7 +668,9 @@ void QGstreamerPlayerSession::getStreamsInfo() } m_streamProperties.append(streamProperties); + } + */ #else enum { diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.h b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.h index d650ec7..edfec5b 100644 --- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.h +++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.h @@ -71,7 +71,6 @@ public: QUrl url() const; QMediaPlayer::State state() const { return m_state; } - QMediaPlayer::MediaStatus mediaStatus() const { return m_mediaStatus; } qint64 duration() const; qint64 position() const; @@ -105,11 +104,11 @@ public: public slots: void load(const QUrl &url); - void play(); - void pause(); + bool play(); + bool pause(); void stop(); - void seek(qint64 pos); + bool seek(qint64 pos); void setVolume(int volume); void setMuted(bool muted); @@ -118,7 +117,6 @@ signals: void durationChanged(qint64 duration); void positionChanged(qint64 position); void stateChanged(QMediaPlayer::State state); - void mediaStatusChanged(QMediaPlayer::MediaStatus mediaStatus); void volumeChanged(int volume); void mutedStateChanged(bool muted); void audioAvailableChanged(bool audioAvailable); @@ -137,11 +135,8 @@ private slots: void setSeekable(bool); private: - void setMediaStatus(QMediaPlayer::MediaStatus); - QUrl m_url; QMediaPlayer::State m_state; - QMediaPlayer::MediaStatus m_mediaStatus; QGstreamerBusHelper* m_busHelper; GstElement* m_playbin; GstElement* m_nullVideoOutput; -- cgit v0.12 From 0994b819f6cbf550c067146324f24489d0b4fa1d Mon Sep 17 00:00:00 2001 From: Dmytro Poplavskiy Date: Wed, 3 Mar 2010 14:22:54 +1000 Subject: Use mute property instead of setting volume to 0 if playbin2 is used. Task-number: QTMOBILITY-67 Reviewed-by: Andrew den Exter --- .../mediaplayer/qgstreamerplayersession.cpp | 28 +++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp index e80e820..be2273b 100644 --- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp +++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp @@ -314,21 +314,33 @@ bool QGstreamerPlayerSession::seek(qint64 ms) void QGstreamerPlayerSession::setVolume(int volume) { - m_volume = volume; - emit volumeChanged(m_volume); + if (m_volume != volume) { + m_volume = volume; - if (!m_muted && m_playbin) - g_object_set(G_OBJECT(m_playbin), "volume", m_volume/100.0, NULL); + if (m_playbin) { +#ifndef USE_PLAYBIN2 + if(!m_muted) +#endif + g_object_set(G_OBJECT(m_playbin), "volume", m_volume/100.0, NULL); + } + + emit volumeChanged(m_volume); + } } void QGstreamerPlayerSession::setMuted(bool muted) { - m_muted = muted; + if (m_muted != muted) { + m_muted = muted; - g_object_set(G_OBJECT(m_playbin), "volume", (m_muted ? 0 : m_volume/100.0), NULL); - - emit mutedStateChanged(m_muted); +#ifdef USE_PLAYBIN2 + g_object_set(G_OBJECT(m_playbin), "mute", m_muted, NULL); +#else + g_object_set(G_OBJECT(m_playbin), "volume", (m_muted ? 0 : m_volume/100.0), NULL); +#endif + emit mutedStateChanged(m_muted); + } } static void addTagToMap(const GstTagList *list, -- cgit v0.12 From 61e29b6b4b1f96fecad1ad105cd190beed6621e6 Mon Sep 17 00:00:00 2001 From: Dmytro Poplavskiy Date: Wed, 3 Mar 2010 14:24:22 +1000 Subject: Gstreamer media backend: ensure the null video output is not deleted during player session lifetime Reviewed-by: Andrew den Exter --- .../mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp index be2273b..392a7a8 100644 --- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp +++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp @@ -91,6 +91,7 @@ QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent) m_busHelper->installSyncEventFilter(this); m_nullVideoOutput = gst_element_factory_make("fakesink", NULL); + gst_object_ref(GST_OBJECT(m_nullVideoOutput)); g_object_set(G_OBJECT(m_playbin), "video-sink", m_nullVideoOutput, NULL); // Initial volume @@ -108,6 +109,7 @@ QGstreamerPlayerSession::~QGstreamerPlayerSession() delete m_busHelper; gst_object_unref(GST_OBJECT(m_bus)); gst_object_unref(GST_OBJECT(m_playbin)); + gst_object_unref(GST_OBJECT(m_nullVideoOutput)); } } -- cgit v0.12 From ca88b39490ef09b56cab5f933c9e33e5a2f5a498 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Wed, 3 Mar 2010 14:46:03 +1000 Subject: fix connecting to an ID. --- src/plugins/bearer/corewlan/qcorewlanengine.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm index 598d2f0..a758a4b 100644 --- a/src/plugins/bearer/corewlan/qcorewlanengine.mm +++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm @@ -170,7 +170,7 @@ void QCoreWlanEngine::connectToId(const QString &id) while ((wProfile = [enumerator nextObject])) { //CWWirelessProfile - if(id == nsstringToQString([wProfile ssid])) { + if(id == QString::number(qHash(QLatin1String("corewlan:") + nsstringToQString([wProfile ssid])))) { user8021XProfile = nil; user8021XProfile = [ wProfile user8021XProfile]; -- cgit v0.12 From 55cec1c8e73f90f968ce181c3310e5e16f2d5bd8 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 3 Mar 2010 15:22:25 +1000 Subject: Fixed compile of some tests with `-qtnamespace' --- tests/auto/declarative/qdeclarativelanguage/testtypes.h | 3 +++ tests/auto/qmediaservice/tst_qmediaservice.cpp | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/declarative/qdeclarativelanguage/testtypes.h index 8ac7aa6..09cddcb 100644 --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.h +++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.h @@ -62,7 +62,10 @@ public: MyInterface() : id(913) {} int id; }; + +QT_BEGIN_NAMESPACE Q_DECLARE_INTERFACE(MyInterface, "com.trolltech.Qt.Test.MyInterface"); +QT_END_NAMESPACE QML_DECLARE_INTERFACE(MyInterface); struct MyCustomVariantType diff --git a/tests/auto/qmediaservice/tst_qmediaservice.cpp b/tests/auto/qmediaservice/tst_qmediaservice.cpp index 35f661d..a0cb69d 100644 --- a/tests/auto/qmediaservice/tst_qmediaservice.cpp +++ b/tests/auto/qmediaservice/tst_qmediaservice.cpp @@ -69,7 +69,9 @@ class QtTestMediaControlA : public QMediaControl #define QtTestMediaControlA_iid "com.nokia.QtTestMediaControlA" +QT_BEGIN_NAMESPACE Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlA, QtTestMediaControlA_iid) +QT_END_NAMESPACE class QtTestMediaControlB : public QMediaControl @@ -78,7 +80,9 @@ class QtTestMediaControlB : public QMediaControl }; #define QtTestMediaControlB_iid "com.nokia.QtTestMediaControlB" +QT_BEGIN_NAMESPACE Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlB, QtTestMediaControlB_iid) +QT_END_NAMESPACE class QtTestMediaControlC : public QMediaControl @@ -87,7 +91,9 @@ class QtTestMediaControlC : public QMediaControl }; #define QtTestMediaControlC_iid "com.nokia.QtTestMediaControlC" +QT_BEGIN_NAMESPACE Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlC, QtTestMediaControlA_iid) // Yes A. +QT_END_NAMESPACE class QtTestMediaControlD : public QMediaControl { @@ -95,7 +101,9 @@ class QtTestMediaControlD : public QMediaControl }; #define QtTestMediaControlD_iid "com.nokia.QtTestMediaControlD" +QT_BEGIN_NAMESPACE Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlD, QtTestMediaControlD_iid) +QT_END_NAMESPACE class QtTestMediaControlE : public QMediaControl { -- cgit v0.12 From f68389023cb8f0365c51fdc1fca06910f36dda2d Mon Sep 17 00:00:00 2001 From: Justin McPherson Date: Wed, 3 Mar 2010 15:07:34 +1000 Subject: Remove dependency on declarative from multimedia. Move all declarative related classes into the multimedia declarative module. Reviewed-by: Andrew den Exter --- src/multimedia/effects/effects.pri | 24 + src/multimedia/effects/qsoundeffect.cpp | 255 ++++++ src/multimedia/effects/qsoundeffect_p.h | 123 +++ src/multimedia/effects/qsoundeffect_pulse_p.cpp | 509 +++++++++++ src/multimedia/effects/qsoundeffect_pulse_p.h | 138 +++ src/multimedia/effects/qsoundeffect_qmedia_p.cpp | 167 ++++ src/multimedia/effects/qsoundeffect_qmedia_p.h | 109 +++ src/multimedia/effects/qsoundeffect_qsound_p.cpp | 225 +++++ src/multimedia/effects/qsoundeffect_qsound_p.h | 129 +++ src/multimedia/effects/wavedecoder_p.cpp | 140 +++ src/multimedia/effects/wavedecoder_p.h | 134 +++ src/multimedia/multimedia.pro | 2 +- src/multimedia/qml/multimediadeclarative.cpp | 70 -- src/multimedia/qml/multimediadeclarative.h | 60 -- src/multimedia/qml/qdeclarativeaudio.cpp | 327 ------- src/multimedia/qml/qdeclarativeaudio_p.h | 173 ---- src/multimedia/qml/qdeclarativemediabase.cpp | 413 --------- src/multimedia/qml/qdeclarativemediabase_p.h | 168 ---- src/multimedia/qml/qdeclarativevideo.cpp | 945 --------------------- src/multimedia/qml/qdeclarativevideo_p.h | 204 ----- src/multimedia/qml/qmetadatacontrolmetaobject.cpp | 362 -------- src/multimedia/qml/qmetadatacontrolmetaobject_p.h | 92 -- src/multimedia/qml/qml.pri | 37 - src/multimedia/qml/qsoundeffect.cpp | 255 ------ src/multimedia/qml/qsoundeffect_p.h | 126 --- src/multimedia/qml/qsoundeffect_pulse_p.cpp | 509 ----------- src/multimedia/qml/qsoundeffect_pulse_p.h | 138 --- src/multimedia/qml/qsoundeffect_qmedia_p.cpp | 167 ---- src/multimedia/qml/qsoundeffect_qmedia_p.h | 109 --- src/multimedia/qml/qsoundeffect_qsound_p.cpp | 225 ----- src/multimedia/qml/qsoundeffect_qsound_p.h | 129 --- src/multimedia/qml/wavedecoder_p.cpp | 140 --- src/multimedia/qml/wavedecoder_p.h | 134 --- .../qdeclarativemodules/multimedia/multimedia.cpp | 19 +- .../qdeclarativemodules/multimedia/multimedia.pro | 13 +- .../multimedia/qdeclarativeaudio.cpp | 327 +++++++ .../multimedia/qdeclarativeaudio_p.h | 173 ++++ .../multimedia/qdeclarativemediabase.cpp | 413 +++++++++ .../multimedia/qdeclarativemediabase_p.h | 168 ++++ .../multimedia/qdeclarativevideo.cpp | 945 +++++++++++++++++++++ .../multimedia/qdeclarativevideo_p.h | 204 +++++ .../multimedia/qmetadatacontrolmetaobject.cpp | 362 ++++++++ .../multimedia/qmetadatacontrolmetaobject_p.h | 92 ++ src/src.pro | 1 - tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro | 12 +- .../qdeclarativeaudio/tst_qdeclarativeaudio.cpp | 2 +- tests/auto/qdeclarativevideo/qdeclarativevideo.pro | 12 +- .../qdeclarativevideo/tst_qdeclarativevideo.cpp | 2 +- 48 files changed, 4689 insertions(+), 4794 deletions(-) create mode 100644 src/multimedia/effects/effects.pri create mode 100644 src/multimedia/effects/qsoundeffect.cpp create mode 100644 src/multimedia/effects/qsoundeffect_p.h create mode 100644 src/multimedia/effects/qsoundeffect_pulse_p.cpp create mode 100644 src/multimedia/effects/qsoundeffect_pulse_p.h create mode 100644 src/multimedia/effects/qsoundeffect_qmedia_p.cpp create mode 100644 src/multimedia/effects/qsoundeffect_qmedia_p.h create mode 100644 src/multimedia/effects/qsoundeffect_qsound_p.cpp create mode 100644 src/multimedia/effects/qsoundeffect_qsound_p.h create mode 100644 src/multimedia/effects/wavedecoder_p.cpp create mode 100644 src/multimedia/effects/wavedecoder_p.h delete mode 100644 src/multimedia/qml/multimediadeclarative.cpp delete mode 100644 src/multimedia/qml/multimediadeclarative.h delete mode 100644 src/multimedia/qml/qdeclarativeaudio.cpp delete mode 100644 src/multimedia/qml/qdeclarativeaudio_p.h delete mode 100644 src/multimedia/qml/qdeclarativemediabase.cpp delete mode 100644 src/multimedia/qml/qdeclarativemediabase_p.h delete mode 100644 src/multimedia/qml/qdeclarativevideo.cpp delete mode 100644 src/multimedia/qml/qdeclarativevideo_p.h delete mode 100644 src/multimedia/qml/qmetadatacontrolmetaobject.cpp delete mode 100644 src/multimedia/qml/qmetadatacontrolmetaobject_p.h delete mode 100644 src/multimedia/qml/qml.pri delete mode 100644 src/multimedia/qml/qsoundeffect.cpp delete mode 100644 src/multimedia/qml/qsoundeffect_p.h delete mode 100644 src/multimedia/qml/qsoundeffect_pulse_p.cpp delete mode 100644 src/multimedia/qml/qsoundeffect_pulse_p.h delete mode 100644 src/multimedia/qml/qsoundeffect_qmedia_p.cpp delete mode 100644 src/multimedia/qml/qsoundeffect_qmedia_p.h delete mode 100644 src/multimedia/qml/qsoundeffect_qsound_p.cpp delete mode 100644 src/multimedia/qml/qsoundeffect_qsound_p.h delete mode 100644 src/multimedia/qml/wavedecoder_p.cpp delete mode 100644 src/multimedia/qml/wavedecoder_p.h create mode 100644 src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio.cpp create mode 100644 src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio_p.h create mode 100644 src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase.cpp create mode 100644 src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase_p.h create mode 100644 src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo.cpp create mode 100644 src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo_p.h create mode 100644 src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject.cpp create mode 100644 src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject_p.h diff --git a/src/multimedia/effects/effects.pri b/src/multimedia/effects/effects.pri new file mode 100644 index 0000000..5edd452 --- /dev/null +++ b/src/multimedia/effects/effects.pri @@ -0,0 +1,24 @@ + + + +system(pkg-config --exists \'libpulse >= 0.9.10\') { + DEFINES += QT_MULTIMEDIA_PULSEAUDIO + HEADERS += $$PWD/qsoundeffect_pulse_p.h + SOURCES += $$PWD/qsoundeffect_pulse_p.cpp + LIBS += -lpulse +} else:x11 { + DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER + HEADERS += $$PWD/qsoundeffect_qmedia_p.h + SOURCES += $$PWD/qsoundeffect_qmedia_p.cpp +} else { + HEADERS += $$PWD/qsoundeffect_qsound_p.h + SOURCES += $$PWD/qsoundeffect_qsound_p.cpp +} + +HEADERS += \ + $$PWD/qsoundeffect_p.h \ + $$PWD/wavedecoder_p.h + +SOURCES += \ + $$PWD/qsoundeffect.cpp \ + $$PWD/wavedecoder_p.cpp diff --git a/src/multimedia/effects/qsoundeffect.cpp b/src/multimedia/effects/qsoundeffect.cpp new file mode 100644 index 0000000..541e6c9 --- /dev/null +++ b/src/multimedia/effects/qsoundeffect.cpp @@ -0,0 +1,255 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmediacontent.h" +#include "qmediaplayer.h" + +#include "qsoundeffect_p.h" + +#if defined(QT_MULTIMEDIA_PULSEAUDIO) +#include "qsoundeffect_pulse_p.h" +#elif(QT_MULTIMEDIA_QMEDIAPLAYER) +#include "qsoundeffect_qmedia_p.h" +#else +#include "qsoundeffect_qsound_p.h" +#endif + +QT_BEGIN_NAMESPACE + +/*! + \qmlclass SoundEffect QSoundEffect + \since 4.7 + \brief The SoundEffect element provides a way to play sound effects in qml. + + The following example plays a wav file on mouse click. + + \qml + SoundEffect { + id: playSound + source: "test.wav" + } + MouseRegion { + id: playArea + anchors.fill: parent + onPressed: { + playSound.play() + } + } + \endqml + + \sa SoundEffect +*/ + +/*! + \qmlproperty QUrl SoundEffect::source + + This property provides a way to control the sound to play. +*/ + +/*! + \qmlproperty int SoundEffect::loopCount + + This property provides a way to control the number of times to repeat the sound on each play(). +*/ + +/*! + \qmlproperty int SoundEffect::volume + + This property provides a way to control the volume for playback. +*/ + +/*! + \qmlproperty bool SoundEffect::muted + + This property provides a way to control muting. +*/ + +/*! + \qmlproperty int SoundEffect::duration + + This property holds the duration in milliseconds of the current source audio. +*/ + +/*! + \qmlsignal SoundEffect::sourceChanged() + + This handler is called when the source has changed. +*/ + +/*! + \qmlsignal SoundEffect::loopCountChanged() + + This handler is called when the number of loops has changes. +*/ + +/*! + \qmlsignal SoundEffect::volumeChanged() + + This handler is called when the volume has changed. +*/ + +/*! + \qmlsignal SoundEffect::mutedChanged() + + This handler is called when the mute state has changed. +*/ + +/*! + \qmlsignal SoundEffect::durationChanged() + + This handler is called when the duration has changed. +*/ + +QSoundEffect::QSoundEffect(QObject *parent) : + QObject(parent), + m_loopCount(1), + m_vol(100), + m_muted(false), + m_runningCount(0) +{ + d = new QSoundEffectPrivate(this); + connect(d, SIGNAL(volumeChanged(int)), SIGNAL(volumeChanged())); + connect(d, SIGNAL(mutedChanged(bool)), SIGNAL(mutedChanged())); + connect(d, SIGNAL(durationChanged(qint64)), SIGNAL(durationChanged())); + connect(d, SIGNAL(stateChanged(QMediaPlayer::State)), SLOT(repeat())); +} + +QSoundEffect::~QSoundEffect() +{ + delete d; +} + +QUrl QSoundEffect::source() const +{ + return d != 0 ? d->media().canonicalUrl() : QUrl(); +} + +void QSoundEffect::setSource(const QUrl &url) +{ + if (d != 0 && d->media().canonicalUrl() == url) + return; + + d->setVolume(m_vol); + d->setMuted(m_muted); + d->setMedia(url); + + if (url.isEmpty()) + return; + + emit sourceChanged(); +} + +int QSoundEffect::loopCount() const +{ + return m_loopCount; +} + +void QSoundEffect::setLoopCount(int loopCount) +{ + if (m_loopCount == loopCount) + return; + + m_loopCount = loopCount; + emit loopCountChanged(); +} + +int QSoundEffect::volume() const +{ + return d != 0 ? d->volume() : m_vol; +} + +void QSoundEffect::setVolume(int volume) +{ + if (m_vol == volume) + return; + + m_vol = volume; + if (d != 0) + d->setVolume(volume); + else + emit volumeChanged(); +} + +bool QSoundEffect::isMuted() const +{ + return d != 0 ? d->isMuted() : m_muted; +} + +void QSoundEffect::setMuted(bool muted) +{ + if (m_muted == muted) + return; + + m_muted = muted; + if (d != 0) + d->setMuted(muted); + else + emit mutedChanged(); +} + +int QSoundEffect::duration() const +{ + return d != 0 ? d->duration() : 0; +} + +void QSoundEffect::play() +{ + m_runningCount = 0; + + if (d != 0) + d->play(); +} + +void QSoundEffect::stop() +{ + if (d != 0) + d->stop(); +} + +void QSoundEffect::repeat() +{ + if (d->state() == QMediaPlayer::StoppedState) { + if (++m_runningCount < m_loopCount) + d->play(); + } +} + +QT_END_NAMESPACE diff --git a/src/multimedia/effects/qsoundeffect_p.h b/src/multimedia/effects/qsoundeffect_p.h new file mode 100644 index 0000000..c5554bf --- /dev/null +++ b/src/multimedia/effects/qsoundeffect_p.h @@ -0,0 +1,123 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSOUNDEFFECT_H +#define QSOUNDEFFECT_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + + +#include +#include + + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QSoundEffectPrivate; +class Q_MULTIMEDIA_EXPORT QSoundEffect : public QObject +{ + Q_OBJECT + Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) + Q_PROPERTY(int loopCount READ loopCount WRITE setLoopCount NOTIFY loopCountChanged) + Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged) + Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged) + Q_PROPERTY(int duration READ duration NOTIFY durationChanged) + +public: + explicit QSoundEffect(QObject *parent = 0); + ~QSoundEffect(); + + QUrl source() const; + void setSource(const QUrl &url); + + int loopCount() const; + void setLoopCount(int loopCount); + + int volume() const; + void setVolume(int volume); + + bool isMuted() const; + void setMuted(bool muted); + + int duration() const; + +signals: + void sourceChanged(); + void loopCountChanged(); + void volumeChanged(); + void mutedChanged(); + void durationChanged(); + +public slots: + void play(); + void stop(); + +private slots: + void repeat(); + +private: + Q_DISABLE_COPY(QSoundEffect) + + int m_loopCount; + int m_vol; + bool m_muted; + int m_runningCount; + + QSoundEffectPrivate* d; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + + +#endif // QSOUNDEFFECT_H diff --git a/src/multimedia/effects/qsoundeffect_pulse_p.cpp b/src/multimedia/effects/qsoundeffect_pulse_p.cpp new file mode 100644 index 0000000..7e9a25c --- /dev/null +++ b/src/multimedia/effects/qsoundeffect_pulse_p.cpp @@ -0,0 +1,509 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +#include "qmediacontent.h" +#include "qmediaplayer.h" +#include "qsoundeffect_p.h" + +#include "wavedecoder_p.h" + +#include "qsoundeffect_pulse_p.h" + +#if(Q_WS_MAEMO_5) +#include +#endif + +#include + +// Less than ideal +#define PA_SCACHE_ENTRY_SIZE_MAX (1024*1024*16) + +QT_BEGIN_NAMESPACE + +namespace +{ +inline pa_sample_spec audioFormatToSampleSpec(const QAudioFormat &format) +{ + pa_sample_spec spec; + + spec.rate = format.frequency(); + spec.channels = format.channels(); + + if (format.sampleSize() == 8) + spec.format = PA_SAMPLE_U8; + else if (format.sampleSize() == 16) { + switch (format.byteOrder()) { + case QAudioFormat::BigEndian: spec.format = PA_SAMPLE_S16BE; break; + case QAudioFormat::LittleEndian: spec.format = PA_SAMPLE_S16LE; break; + } + } + else if (format.sampleSize() == 32) { + switch (format.byteOrder()) { + case QAudioFormat::BigEndian: spec.format = PA_SAMPLE_S32BE; break; + case QAudioFormat::LittleEndian: spec.format = PA_SAMPLE_S32LE; break; + } + } + + return spec; +} + +class PulseDaemon +{ +public: + PulseDaemon():m_prepared(false) + { + prepare(); + } + + ~PulseDaemon() + { + if (m_prepared) + release(); + } + + inline void lock() + { + pa_threaded_mainloop_lock(m_mainLoop); + } + + inline void unlock() + { + pa_threaded_mainloop_unlock(m_mainLoop); + } + + inline pa_context *context() const + { + return m_context; + } + + int volume() + { + return m_vol; + } + +private: + void prepare() + { + m_vol = 100; + + m_mainLoop = pa_threaded_mainloop_new(); + if (m_mainLoop == 0) { + qWarning("PulseAudioService: unable to create pulseaudio mainloop"); + return; + } + + if (pa_threaded_mainloop_start(m_mainLoop) != 0) { + qWarning("PulseAudioService: unable to start pulseaudio mainloop"); + pa_threaded_mainloop_free(m_mainLoop); + return; + } + + m_mainLoopApi = pa_threaded_mainloop_get_api(m_mainLoop); + + lock(); + m_context = pa_context_new(m_mainLoopApi, QString(QLatin1String("QtPulseAudio:%1")).arg(::getpid()).toAscii().constData()); + +#if(Q_WS_MAEMO_5) + pa_context_set_state_callback(m_context, context_state_callback, this); +#endif + if (m_context == 0) { + qWarning("PulseAudioService: Unable to create new pulseaudio context"); + pa_threaded_mainloop_free(m_mainLoop); + return; + } + + if (pa_context_connect(m_context, NULL, (pa_context_flags_t)0, NULL) < 0) { + qWarning("PulseAudioService: pa_context_connect() failed"); + pa_context_unref(m_context); + pa_threaded_mainloop_free(m_mainLoop); + return; + } + unlock(); + + m_prepared = true; + } + + void release() + { + if (!m_prepared) return; + pa_threaded_mainloop_stop(m_mainLoop); + pa_threaded_mainloop_free(m_mainLoop); + m_prepared = false; + } + +#if(Q_WS_MAEMO_5) + static void context_state_callback(pa_context *c, void *userdata) + { + PulseDaemon *self = reinterpret_cast(userdata); + switch (pa_context_get_state(c)) { + case PA_CONTEXT_CONNECTING: + case PA_CONTEXT_AUTHORIZING: + case PA_CONTEXT_SETTING_NAME: + break; + case PA_CONTEXT_READY: + pa_ext_stream_restore_set_subscribe_cb(c, &stream_restore_monitor_callback, self); + pa_ext_stream_restore_subscribe(c, 1, NULL, self); + break; + default: + break; + } + } + static void stream_restore_monitor_callback(pa_context *c, void *userdata) + { + PulseDaemon *self = reinterpret_cast(userdata); + pa_ext_stream_restore2_read(c, &stream_restore_info_callback, self); + } + static void stream_restore_info_callback(pa_context *c, const pa_ext_stream_restore2_info *info, + int eol, void *userdata) + { + Q_UNUSED(c) + + PulseDaemon *self = reinterpret_cast(userdata); + + if (!eol) { + if (QString(info->name).startsWith(QLatin1String("sink-input-by-media-role:x-maemo"))) { + const unsigned str_length = 256; + char str[str_length]; + pa_cvolume_snprint(str, str_length, &info->volume); + self->m_vol = QString(str).replace(" ","").replace("%","").mid(2).toInt(); + } + } + } +#endif + + int m_vol; + bool m_prepared; + pa_context *m_context; + pa_threaded_mainloop *m_mainLoop; + pa_mainloop_api *m_mainLoopApi; +}; +} + +Q_GLOBAL_STATIC(PulseDaemon, daemon) + + +QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): + QObject(parent), + m_muted(false), + m_playQueued(false), + m_vol(100), + m_duration(0), + m_dataUploaded(0), + m_state(QMediaPlayer::StoppedState), + m_status(QMediaPlayer::NoMedia), + m_reply(0), + m_stream(0), + m_networkAccessManager(0) +{ +} + +QSoundEffectPrivate::~QSoundEffectPrivate() +{ + delete m_reply; + unloadSample(); +} + +qint64 QSoundEffectPrivate::duration() const +{ + return m_duration; +} + +int QSoundEffectPrivate::volume() const +{ + return m_vol; +} + +bool QSoundEffectPrivate::isMuted() const +{ + return m_muted; +} + +QMediaContent QSoundEffectPrivate::media() const +{ + return m_media; +} + +QMediaPlayer::State QSoundEffectPrivate::state() const +{ + return m_state; +} + +QMediaPlayer::MediaStatus QSoundEffectPrivate::mediaStatus() const +{ + return m_status; +} + +void QSoundEffectPrivate::play() +{ + if (m_status == QMediaPlayer::LoadingMedia) { + m_playQueued = true; + return; + } + + if (m_status != QMediaPlayer::BufferedMedia || + m_state == QMediaPlayer::PlayingState) + return; + + pa_volume_t m_vol = PA_VOLUME_NORM; + + daemon()->lock(); +#if(Q_WS_MAEMO_5) + m_vol = PA_VOLUME_NORM/100*((daemon()->volume()+m_vol)/2); +#endif + pa_operation_unref( + pa_context_play_sample(daemon()->context(), + m_name.constData(), + 0, + m_vol, + play_callback, + this) + ); + daemon()->unlock(); + + m_playbackTime.start(); + + emit stateChanged(m_state = QMediaPlayer::PlayingState); +} + +void QSoundEffectPrivate::stop() +{ + emit stateChanged(m_state = QMediaPlayer::StoppedState); +} + +void QSoundEffectPrivate::setVolume(int volume) +{ + m_vol = volume; +} + +void QSoundEffectPrivate::setMuted(bool muted) +{ + m_muted = muted; +} + +void QSoundEffectPrivate::setMedia(const QMediaContent &media) +{ + if (media.isNull()) { + m_media = QMediaContent(); + unloadSample(); + return; + } + if (m_media == media) + return; + m_media = media; + + if (m_networkAccessManager == 0) + m_networkAccessManager = new QNetworkAccessManager(this); + + m_stream = m_networkAccessManager->get(QNetworkRequest(m_media.canonicalUrl())); + + unloadSample(); + loadSample(); + + emit mediaChanged(m_media); +} + +void QSoundEffectPrivate::decoderReady() +{ + if (m_waveDecoder->size() >= PA_SCACHE_ENTRY_SIZE_MAX) { + m_status = QMediaPlayer::InvalidMedia; + emit mediaStatusChanged(m_status); + qWarning("QtPulseAudio: attempting to load to large a sample"); + return; + } + + if (m_name.isNull()) + m_name = QString(QLatin1String("QtPulseSample-%1-%2")).arg(::getpid()).arg(quintptr(this)).toUtf8(); + + pa_sample_spec spec = audioFormatToSampleSpec(m_waveDecoder->audioFormat()); + + daemon()->lock(); + pa_stream *stream = pa_stream_new(daemon()->context(), m_name.constData(), &spec, 0); + pa_stream_set_state_callback(stream, stream_state_callback, this); + pa_stream_set_write_callback(stream, stream_write_callback, this); + pa_stream_connect_upload(stream, (size_t)m_waveDecoder->size()); + daemon()->unlock(); +} + +void QSoundEffectPrivate::decoderError() +{ + emit mediaStatusChanged(m_status = QMediaPlayer::InvalidMedia); +} + +void QSoundEffectPrivate::checkPlayTime() +{ + int elapsed = m_playbackTime.elapsed(); + + if (elapsed >= m_duration) { + m_state = QMediaPlayer::StoppedState; + emit stateChanged(m_state); + } + else + startTimer(m_duration - elapsed); +} + +void QSoundEffectPrivate::loadSample() +{ + m_waveDecoder = new WaveDecoder(m_stream); + connect(m_waveDecoder, SIGNAL(formatKnown()), SLOT(decoderReady())); + connect(m_waveDecoder, SIGNAL(invalidFormat()), SLOT(decoderError())); + + m_status = QMediaPlayer::LoadingMedia; + emit mediaStatusChanged(m_status); +} + +void QSoundEffectPrivate::unloadSample() +{ + if (m_status != QMediaPlayer::BufferedMedia) + return; + + m_status = QMediaPlayer::NoMedia; + + daemon()->lock(); + pa_context_remove_sample(daemon()->context(), m_name.constData(), NULL, NULL); + daemon()->unlock(); + + m_duration = 0; + m_dataUploaded = 0; +} + +void QSoundEffectPrivate::timerEvent(QTimerEvent *event) +{ + if (m_state == QMediaPlayer::PlayingState) { + m_state = QMediaPlayer::StoppedState; + emit stateChanged(m_state); + } + + killTimer(event->timerId()); +} + +void QSoundEffectPrivate::stream_write_callback(pa_stream *s, size_t length, void *userdata) +{ + Q_UNUSED(length); + + QSoundEffectPrivate *self = reinterpret_cast(userdata); + + size_t bufferSize = qMin(pa_stream_writable_size(s), + size_t(self->m_waveDecoder->bytesAvailable())); + char buffer[bufferSize]; + + size_t len = 0; + while (len < length) { + qint64 read = self->m_waveDecoder->read(buffer, qMin(bufferSize, length -len)); + if (read > 0) { + if (pa_stream_write(s, buffer, size_t(read), 0, 0, PA_SEEK_RELATIVE) == 0) + len += size_t(read); + else + break; + } + } + self->m_dataUploaded += len; + + if (self->m_waveDecoder->size() == self->m_dataUploaded) { + pa_stream_finish_upload(s); + + self->m_duration = self->m_waveDecoder->duration(); + emit self->durationChanged(self->m_duration); + + self->m_status = QMediaPlayer::BufferedMedia; + emit self->mediaStatusChanged(self->m_status); + + self->m_waveDecoder->deleteLater(); + if (!self->m_media.isNull()) + self->m_stream->deleteLater(); + + if (self->m_playQueued) { + self->m_playQueued = false; + QMetaObject::invokeMethod(self, "play"); + } + } +} + +void QSoundEffectPrivate::stream_state_callback(pa_stream *s, void *userdata) +{ + QSoundEffectPrivate *self = reinterpret_cast(userdata); + + switch (pa_stream_get_state(s)) { + case PA_STREAM_CREATING: + case PA_STREAM_READY: + case PA_STREAM_TERMINATED: + break; + + case PA_STREAM_FAILED: + default: + self->m_status = QMediaPlayer::InvalidMedia; + emit self->mediaStatusChanged(self->m_status); + break; + } +} + +void QSoundEffectPrivate::play_callback(pa_context *c, int success, void *userdata) +{ + Q_UNUSED(c); + + QSoundEffectPrivate *self = reinterpret_cast(userdata); + + if (success == 1) + QMetaObject::invokeMethod(self, "checkPlayTime", Qt::QueuedConnection); + else { + self->m_state = QMediaPlayer::StoppedState; + emit self->stateChanged(self->m_state); + } +} + +QT_END_NAMESPACE + + diff --git a/src/multimedia/effects/qsoundeffect_pulse_p.h b/src/multimedia/effects/qsoundeffect_pulse_p.h new file mode 100644 index 0000000..247f8a3 --- /dev/null +++ b/src/multimedia/effects/qsoundeffect_pulse_p.h @@ -0,0 +1,138 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSOUNDEFFECT_PULSE_H +#define QSOUNDEFFECT_PULSE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + + +#include "qsoundeffect_p.h" + +#include +#include +#include +#include + + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QNetworkReply; +class QNetworkAccessManager; +class WaveDecoder; + +class QSoundEffectPrivate : public QObject +{ + Q_OBJECT +public: + explicit QSoundEffectPrivate(QObject* parent); + ~QSoundEffectPrivate(); + + qint64 duration() const; + int volume() const; + bool isMuted() const; + QMediaContent media() const; + QMediaPlayer::State state() const; + QMediaPlayer::MediaStatus mediaStatus() const; + +public Q_SLOTS: + void play(); + void stop(); + void setVolume(int volume); + void setMuted(bool muted); + void setMedia(const QMediaContent &media); + +Q_SIGNALS: + void mediaChanged(const QMediaContent &media); + void mediaStatusChanged(QMediaPlayer::MediaStatus status); + void stateChanged(QMediaPlayer::State newState); + void durationChanged(qint64 duration); + void volumeChanged(int volume); + void mutedChanged(bool muted); + void error(QMediaPlayer::Error error); + +private slots: + void decoderReady(); + void decoderError(); + void checkPlayTime(); + +private: + void loadSample(); + void unloadSample(); + + void timerEvent(QTimerEvent *event); + + static void stream_write_callback(pa_stream *s, size_t length, void *userdata); + static void stream_state_callback(pa_stream *s, void *userdata); + static void play_callback(pa_context *c, int success, void *userdata); + + bool m_muted; + bool m_playQueued; + int m_vol; + int m_duration; + int m_dataUploaded; + QTime m_playbackTime; + QMediaPlayer::State m_state; + QMediaPlayer::MediaStatus m_status; + QByteArray m_name; + QMediaContent m_media; + QNetworkReply *m_reply; + WaveDecoder *m_waveDecoder; + QIODevice *m_stream; + QNetworkAccessManager *m_networkAccessManager; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QSOUNDEFFECT_PULSE_H diff --git a/src/multimedia/effects/qsoundeffect_qmedia_p.cpp b/src/multimedia/effects/qsoundeffect_qmedia_p.cpp new file mode 100644 index 0000000..48fb257 --- /dev/null +++ b/src/multimedia/effects/qsoundeffect_qmedia_p.cpp @@ -0,0 +1,167 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include "qmediacontent.h" +#include "qmediaplayer.h" + +#include "qsoundeffect_p.h" +#include "qsoundeffect_qmedia_p.h" + + +QT_BEGIN_NAMESPACE + +QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): + QObject(parent), + m_muted(false), + m_vol(100), + m_player(0) +{ +} + +QSoundEffectPrivate::~QSoundEffectPrivate() +{ + if (m_player) delete m_player; +} + +qint64 QSoundEffectPrivate::duration() const +{ + if (m_player) return m_player->duration(); + + return 0; +} + +int QSoundEffectPrivate::volume() const +{ + if (m_player) return m_player->volume(); + + return m_vol; +} + +bool QSoundEffectPrivate::isMuted() const +{ + if (m_player) return m_player->isMuted(); + + return m_muted; +} + +QMediaContent QSoundEffectPrivate::media() const +{ + if (m_player) return m_player->media(); + + return QMediaContent(); +} + +QMediaPlayer::State QSoundEffectPrivate::state() const +{ + if (m_player) return m_player->state(); + + return QMediaPlayer::StoppedState; +} + +QMediaPlayer::MediaStatus QSoundEffectPrivate::mediaStatus() const +{ + if (m_player) return m_player->mediaStatus(); + + return QMediaPlayer::UnknownMediaStatus; +} + +void QSoundEffectPrivate::play() +{ + if (m_player && !m_player->isMuted()) + m_player->play(); +} + +void QSoundEffectPrivate::stop() +{ + if (m_player) + m_player->stop(); +} + +void QSoundEffectPrivate::setVolume(int volume) +{ + m_vol = volume; + + if (m_player) + m_player->setVolume(volume); +} + +void QSoundEffectPrivate::setMuted(bool muted) +{ + m_muted = muted; + + if (m_player) + m_player->setMuted(muted); +} + +void QSoundEffectPrivate::setMedia(const QMediaContent &media) +{ + if (media.isNull()) + return; + + if (m_player == 0) { + m_player = new QMediaPlayer(this, QMediaPlayer::LowLatency); + m_player->setVolume(m_vol); + m_player->setMuted(m_muted); + + connect(m_player, SIGNAL(volumeChanged(int)), SIGNAL(volumeChanged(int))); + connect(m_player, SIGNAL(mutedChanged(bool)), SIGNAL(mutedChanged(bool))); + connect(m_player, SIGNAL(durationChanged(qint64)), SIGNAL(durationChanged(qint64))); + connect(m_player, SIGNAL(stateChanged(QMediaPlayer::State)), SIGNAL(stateChanged(QMediaPlayer::State))); + } + + m_player->setMedia(media.canonicalUrl()); +} + +QT_END_NAMESPACE + diff --git a/src/multimedia/effects/qsoundeffect_qmedia_p.h b/src/multimedia/effects/qsoundeffect_qmedia_p.h new file mode 100644 index 0000000..8267f79 --- /dev/null +++ b/src/multimedia/effects/qsoundeffect_qmedia_p.h @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSOUNDEFFECT_QMEDIA_H +#define QSOUNDEFFECT_QMEDIA_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + + +#include +#include +#include +#include "qsoundeffect_p.h" + + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class WaveDecoder; + +class QSoundEffectPrivate : public QObject +{ + Q_OBJECT +public: + explicit QSoundEffectPrivate(QObject* parent); + ~QSoundEffectPrivate(); + + qint64 duration() const; + int volume() const; + bool isMuted() const; + QMediaContent media() const; + QMediaPlayer::State state() const; + QMediaPlayer::MediaStatus mediaStatus() const; + +public Q_SLOTS: + void play(); + void stop(); + void setVolume(int volume); + void setMuted(bool muted); + void setMedia(const QMediaContent &media); + +Q_SIGNALS: + void mediaChanged(const QMediaContent &media); + void mediaStatusChanged(QMediaPlayer::MediaStatus status); + void stateChanged(QMediaPlayer::State newState); + void durationChanged(qint64 duration); + void volumeChanged(int volume); + void mutedChanged(bool muted); + void error(QMediaPlayer::Error error); + +private: + bool m_muted; + int m_vol; + QMediaPlayer *m_player; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QSOUNDEFFECT_QMEDIA_H diff --git a/src/multimedia/effects/qsoundeffect_qsound_p.cpp b/src/multimedia/effects/qsoundeffect_qsound_p.cpp new file mode 100644 index 0000000..df160a9 --- /dev/null +++ b/src/multimedia/effects/qsoundeffect_qsound_p.cpp @@ -0,0 +1,225 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include + +#include "qmediacontent.h" +#include "qmediaplayer.h" +#include "qsoundeffect_p.h" + +#include "wavedecoder_p.h" + +#include "qsoundeffect_qsound_p.h" + +QT_BEGIN_NAMESPACE + +QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): + QObject(parent), + m_queued(false), + m_muted(false), + m_state(QMediaPlayer::StoppedState), + m_status(QMediaPlayer::NoMedia), + m_file(0), + m_sound(0) +{ + m_timer = new QTimer(this); + connect(m_timer,SIGNAL(timeout()),SLOT(checkPlayTime())); + m_media = QMediaContent(); +} + +QSoundEffectPrivate::~QSoundEffectPrivate() +{ + if (m_sound) delete m_sound; + if (m_waveDecoder) delete m_waveDecoder; + m_file->close(); +} + +qint64 QSoundEffectPrivate::duration() const +{ + if (m_waveDecoder) + return m_waveDecoder->size(); + + return 0; +} + +int QSoundEffectPrivate::volume() const +{ + return 100; +} + +bool QSoundEffectPrivate::isMuted() const +{ + return m_muted; +} + +QMediaContent QSoundEffectPrivate::media() const +{ + return m_media; +} + +QMediaPlayer::State QSoundEffectPrivate::state() const +{ + return m_state; +} + +QMediaPlayer::MediaStatus QSoundEffectPrivate::mediaStatus() const +{ + return m_status; +} + +void QSoundEffectPrivate::play() +{ + if (m_sound && !m_muted) { + m_queued = false; + m_timer->start(20); + m_playbackTime.start(); + m_sound->play(); + emit stateChanged(m_state = QMediaPlayer::PlayingState); + } else if (m_status == QMediaPlayer::LoadingMedia) + m_queued = true; +} + +void QSoundEffectPrivate::stop() +{ + m_timer->stop(); + + if (m_sound) { + m_sound->stop(); + emit stateChanged(m_state = QMediaPlayer::StoppedState); + } +} + +void QSoundEffectPrivate::setVolume(int volume) +{ + Q_UNUSED(volume) +} + +void QSoundEffectPrivate::setMuted(bool muted) +{ + m_muted = muted; +} + +void QSoundEffectPrivate::setMedia(const QMediaContent &media) +{ + m_queued = false; + + if (media.isNull() || media.canonicalUrl().scheme() != QLatin1String("file")) { + m_media = QMediaContent(); + return; + } + if (m_media == media) + return; + + m_media = media; + m_file = new QFile(m_media.canonicalUrl().toLocalFile()); + m_file->open(QIODevice::ReadOnly|QIODevice::Unbuffered); + + unloadSample(); + loadSample(); + + emit mediaChanged(m_media); +} + +void QSoundEffectPrivate::decoderReady() +{ + m_file->close(); + m_sound = new QSound(m_media.canonicalUrl().toLocalFile()); + emit mediaStatusChanged(m_status = QMediaPlayer::LoadedMedia); + + if (m_queued) + play(); +} + +void QSoundEffectPrivate::decoderError() +{ + m_file->close(); + emit mediaStatusChanged(m_status = QMediaPlayer::InvalidMedia); +} + +void QSoundEffectPrivate::checkPlayTime() +{ + if (m_sound->isFinished()) { + m_timer->stop(); + m_state = QMediaPlayer::StoppedState; + emit stateChanged(m_state); + } +} + +void QSoundEffectPrivate::loadSample() +{ + m_waveDecoder = new WaveDecoder(m_file); + connect(m_waveDecoder, SIGNAL(formatKnown()), SLOT(decoderReady())); + connect(m_waveDecoder, SIGNAL(invalidFormat()), SLOT(decoderError())); + + m_status = QMediaPlayer::LoadingMedia; + emit mediaStatusChanged(m_status); +} + +void QSoundEffectPrivate::unloadSample() +{ + if (m_sound == 0) + return; + + m_status = QMediaPlayer::NoMedia; + + if (m_sound) + delete m_sound; + + m_sound = 0; +} + +QT_END_NAMESPACE diff --git a/src/multimedia/effects/qsoundeffect_qsound_p.h b/src/multimedia/effects/qsoundeffect_qsound_p.h new file mode 100644 index 0000000..45c0888 --- /dev/null +++ b/src/multimedia/effects/qsoundeffect_qsound_p.h @@ -0,0 +1,129 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSOUNDEFFECT_QSOUND_H +#define QSOUNDEFFECT_QSOUND_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + + +#include +#include +#include + +#include "qsoundeffect_p.h" + + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QTimer; +class QSound; +class QFile; +class WaveDecoder; + +class QSoundEffectPrivate : public QObject +{ + Q_OBJECT +public: + explicit QSoundEffectPrivate(QObject* parent); + ~QSoundEffectPrivate(); + + qint64 duration() const; + int volume() const; + bool isMuted() const; + QMediaContent media() const; + QMediaPlayer::State state() const; + QMediaPlayer::MediaStatus mediaStatus() const; + +public Q_SLOTS: + void play(); + void stop(); + void setVolume(int volume); + void setMuted(bool muted); + void setMedia(const QMediaContent &media); + +Q_SIGNALS: + void mediaChanged(const QMediaContent &media); + void mediaStatusChanged(QMediaPlayer::MediaStatus status); + void stateChanged(QMediaPlayer::State newState); + void durationChanged(qint64 duration); + void volumeChanged(int volume); + void mutedChanged(bool muted); + void error(QMediaPlayer::Error error); + +private slots: + void decoderReady(); + void decoderError(); + void checkPlayTime(); + +private: + void loadSample(); + void unloadSample(); + + bool m_queued; + bool m_muted; + QTime m_playbackTime; + QMediaPlayer::State m_state; + QMediaPlayer::MediaStatus m_status; + QFile *m_file; + QByteArray m_name; + QMediaContent m_media; + WaveDecoder *m_waveDecoder; + QSound *m_sound; + QTimer *m_timer; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QSOUNDEFFECT_QSOUND_H diff --git a/src/multimedia/effects/wavedecoder_p.cpp b/src/multimedia/effects/wavedecoder_p.cpp new file mode 100644 index 0000000..f2277ae --- /dev/null +++ b/src/multimedia/effects/wavedecoder_p.cpp @@ -0,0 +1,140 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "wavedecoder_p.h" + +#include +#include + +QT_BEGIN_NAMESPACE + +WaveDecoder::WaveDecoder(QIODevice *s, QObject *parent): + QIODevice(parent), + haveFormat(false), + dataSize(0), + remaining(0), + source(s) +{ + open(QIODevice::ReadOnly | QIODevice::Unbuffered); + + if (source->bytesAvailable() >= sizeof(CombinedHeader)) + QTimer::singleShot(0, this, SLOT(handleData())); + else + connect(source, SIGNAL(readyRead()), SLOT(handleData())); +} + +WaveDecoder::~WaveDecoder() +{ +} + +QAudioFormat WaveDecoder::audioFormat() const +{ + return format; +} + +int WaveDecoder::duration() const +{ + return size() * 1000 / (format.sampleSize() / 8) / format.channels() / format.frequency(); +} + +qint64 WaveDecoder::size() const +{ + return haveFormat ? dataSize : 0; +} + +bool WaveDecoder::isSequential() const +{ + return source->isSequential(); +} + +qint64 WaveDecoder::bytesAvailable() const +{ + return haveFormat ? source->bytesAvailable() : 0; +} + +qint64 WaveDecoder::readData(char *data, qint64 maxlen) +{ + return haveFormat ? source->read(data, maxlen) : 0; +} + +qint64 WaveDecoder::writeData(const char *data, qint64 len) +{ + Q_UNUSED(data); + Q_UNUSED(len); + + return -1; +} + +void WaveDecoder::handleData() +{ + if (source->bytesAvailable() < sizeof(CombinedHeader)) + return; + + source->disconnect(SIGNAL(readyRead()), this, SLOT(handleData())); + source->read((char*)&header, sizeof(CombinedHeader)); + + if (qstrncmp(header.riff.descriptor.id, "RIFF", 4) != 0 || + qstrncmp(header.riff.type, "WAVE", 4) != 0 || + qstrncmp(header.wave.descriptor.id, "fmt ", 4) != 0 || + (header.wave.audioFormat != 0 && header.wave.audioFormat != 1) || + qstrncmp(header.data.descriptor.id, "data", 4) != 0) { + + emit invalidFormat(); + } + else { + int bps = qFromLittleEndian(header.wave.bitsPerSample); + + format.setCodec(QLatin1String("audio/pcm")); + format.setSampleType(bps == 8 ? QAudioFormat::UnSignedInt : QAudioFormat::SignedInt); + format.setByteOrder(QAudioFormat::LittleEndian); + format.setFrequency(qFromLittleEndian(header.wave.sampleRate)); + format.setSampleSize(bps); + format.setChannels(qFromLittleEndian(header.wave.numChannels)); + + dataSize = qFromLittleEndian(header.data.descriptor.size); + + haveFormat = true; + connect(source, SIGNAL(readyRead()), SIGNAL(readyRead())); + emit formatKnown(); + } +} + +QT_END_NAMESPACE diff --git a/src/multimedia/effects/wavedecoder_p.h b/src/multimedia/effects/wavedecoder_p.h new file mode 100644 index 0000000..00aa14e --- /dev/null +++ b/src/multimedia/effects/wavedecoder_p.h @@ -0,0 +1,134 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef WAVEDECODER_H +#define WAVEDECODER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + + +class WaveDecoder : public QIODevice +{ + Q_OBJECT + +public: + explicit WaveDecoder(QIODevice *source, QObject *parent = 0); + ~WaveDecoder(); + + QAudioFormat audioFormat() const; + int duration() const; + + qint64 size() const; + bool isSequential() const; + qint64 bytesAvailable() const; + +signals: + void formatKnown(); + void invalidFormat(); + +private slots: + void handleData(); + +private: + qint64 readData(char *data, qint64 maxlen); + qint64 writeData(const char *data, qint64 len); + + struct chunk + { + char id[4]; + quint32 size; + }; + struct RIFFHeader + { + chunk descriptor; + char type[4]; + }; + struct WAVEHeader + { + chunk descriptor; + quint16 audioFormat; + quint16 numChannels; + quint32 sampleRate; + quint32 byteRate; + quint16 blockAlign; + quint16 bitsPerSample; + }; + struct DATAHeader + { + chunk descriptor; + }; + struct CombinedHeader + { + RIFFHeader riff; + WAVEHeader wave; + DATAHeader data; + }; + + bool haveFormat; + qint64 dataSize; + qint64 remaining; + QAudioFormat format; + QIODevice *source; + CombinedHeader header; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // WAVEDECODER_H diff --git a/src/multimedia/multimedia.pro b/src/multimedia/multimedia.pro index 106d3ab..500aff7 100644 --- a/src/multimedia/multimedia.pro +++ b/src/multimedia/multimedia.pro @@ -12,6 +12,6 @@ include(audio/audio.pri) include(video/video.pri) include(base/base.pri) include(playback/playback.pri) -include(qml/qml.pri) +include(effects/effects.pri) symbian: TARGET.UID3 = 0x2001E627 diff --git a/src/multimedia/qml/multimediadeclarative.cpp b/src/multimedia/qml/multimediadeclarative.cpp deleted file mode 100644 index 7f5298f..0000000 --- a/src/multimedia/qml/multimediadeclarative.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include - - -QT_BEGIN_NAMESPACE - -namespace QtMultimedia -{ - -/*! - Register the Multimedia QML elements. - \internal -*/ - -void qRegisterDeclarativeElements(const char *uri) -{ - Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.multimedia")); - - qmlRegisterType(uri, 4, 7, "SoundEffect"); - qmlRegisterType(uri, 4, 7, "Audio"); - qmlRegisterType(uri, 4, 7, "Video"); -} - -} - -QT_END_NAMESPACE - diff --git a/src/multimedia/qml/multimediadeclarative.h b/src/multimedia/qml/multimediadeclarative.h deleted file mode 100644 index 29af65a..0000000 --- a/src/multimedia/qml/multimediadeclarative.h +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTMULTIMEDIA_QML_H -#define QTMULTIMEDIA_QML_H - -#include - -QT_BEGIN_HEADER -QT_BEGIN_NAMESPACE - -QT_MODULE(Multimedia) - -namespace QtMultimedia -{ -extern void Q_MULTIMEDIA_EXPORT qRegisterDeclarativeElements(const char *uri); -} - -QT_END_NAMESPACE -QT_END_HEADER - -#endif // ifndef QTMULTIMEDIA_QML_H diff --git a/src/multimedia/qml/qdeclarativeaudio.cpp b/src/multimedia/qml/qdeclarativeaudio.cpp deleted file mode 100644 index 1cbf594..0000000 --- a/src/multimedia/qml/qdeclarativeaudio.cpp +++ /dev/null @@ -1,327 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qdeclarativeaudio_p.h" - -#include - -QT_BEGIN_NAMESPACE - - -/*! - \qmlclass Audio QDeclarativeAudio - \since 4.7 - \brief The Audio element allows you to add audio playback to a scene. - - \qml - Audio { source: "audio/song.mp3" } - \endqml - - \sa Video -*/ - -/*! - \internal - \class QDeclarativeAudio - \brief The QDeclarativeAudio class provides an audio item that you can add to a QDeclarativeView. -*/ - -void QDeclarativeAudio::_q_error(int errorCode, const QString &errorString) -{ - m_error = QMediaPlayer::Error(errorCode); - m_errorString = errorString; - - emit error(Error(errorCode), errorString); - emit errorChanged(); -} - - -QDeclarativeAudio::QDeclarativeAudio(QObject *parent) - : QObject(parent) -{ - setObject(this); -} - -QDeclarativeAudio::~QDeclarativeAudio() -{ - shutdown(); -} - -/*! - \qmlmethod Audio::play() - - Starts playback of the media. - - Sets the \l playing property to true, and the \l paused property to false. -*/ - -void QDeclarativeAudio::play() -{ - m_playerControl->play(); - - if (m_paused) { - m_paused = false; - emit pausedChanged(); - } -} - -/*! - \qmlmethod Audio::pause() - - Pauses playback of the media. - - Sets the \l playing and \l paused properties to true. -*/ - -void QDeclarativeAudio::pause() -{ - m_playerControl->pause(); - - if (!m_paused && m_state == QMediaPlayer::PausedState) { - m_paused = true; - emit pausedChanged(); - } -} - -/*! - \qmlmethod Audio::stop() - - Stops playback of the media. - - Sets the \l playing and \l paused properties to false. -*/ - -void QDeclarativeAudio::stop() -{ - m_playerControl->stop(); - - if (m_paused) { - m_paused = false; - emit pausedChanged(); - } -} - -/*! - \qmlproperty url Audio::source - - This property holds the source URL of the media. -*/ - -/*! - \qmlproperty bool Audio::playing - - This property holds whether the media is playing. - - Defaults to false, and can be set to true to start playback. -*/ - -/*! - \qmlproperty bool Audio::paused - - This property holds whether the media is paused. - - Defaults to false, and can be set to true to pause playback. -*/ - -/*! - \qmlsignal Audio::onStarted() - - This handler is called when playback is started. -*/ - -/*! - \qmlsignal Audio::onResumed() - - This handler is called when playback is resumed from the paused state. -*/ - -/*! - \qmlsignal Audio::onPaused() - - This handler is called when playback is paused. -*/ - -/*! - \qmlsignal Audio::onStopped() - - This handler is called when playback is stopped. -*/ - -/*! - \qmlproperty enum Audio::status - - This property holds the status of media loading. It can be one of: - - \list - \o NoMedia - no media has been set. - \o Loading - the media is currently being loaded. - \o Loaded - the media has been loaded. - \o Buffering - the media is buffering data. - \o Stalled - playback has been interrupted while the media is buffering data. - \o Buffered - the media has buffered data. - \o EndOfMedia - the media has played to the end. - \o InvalidMedia - the media cannot be played. - \o UnknownStatus - the status of the media is unknown. - \endlist -*/ - -QDeclarativeAudio::Status QDeclarativeAudio::status() const -{ - return Status(m_status); -} - -/*! - \qmlsignal Audio::onLoaded() - - This handler is called when the media source has been loaded. -*/ - -/*! - \qmlsignal Audio::onBuffering() - - This handler is called when the media starts buffering. -*/ - -/*! - \qmlsignal Audio::onStalled() - - This handler is called when playback has stalled while the media buffers. -*/ - -/*! - \qmlsignal Audio::onBuffered() - - This handler is called when the media has finished buffering. -*/ - -/*! - \qmlsignal Audio::onEndOfMedia() - - This handler is called when playback stops because end of the media has been reached. -*/ -/*! - \qmlproperty int Audio::duration - - This property holds the duration of the media in milliseconds. - - If the media doesn't have a fixed duration (a live stream for example) this will be 0. -*/ - -/*! - \qmlproperty int Audio::position - - This property holds the current playback position in milliseconds. - - If the \l seekable property is true, this property can be set to seek to a new position. -*/ - -/*! - \qmlproperty qreal Audio::volume - - This property holds the volume of the audio output, from 0.0 (silent) to 1.0 (maximum volume). -*/ - -/*! - \qmlproperty bool Audio::muted - - This property holds whether the audio output is muted. -*/ - -/*! - \qmlproperty qreal Audio::bufferProgress - - This property holds how much of the data buffer is currently filled, from 0.0 (empty) to 1.0 - (full). -*/ - -/*! - \qmlproperty bool Audio::seekable - - This property holds whether position of the audio can be changed. - - If true; setting a \l position value will cause playback to seek to the new position. -*/ - -/*! - \qmlproperty qreal Audio::playbackRate - - This property holds the rate at which audio is played at as a multiple of the normal rate. -*/ - -/*! - \qmlproperty enum Audio::error - - This property holds the error state of the audio. It can be one of: - - \list - \o NoError - there is no current error. - \o ResourceError - the audio cannot be played due to a problem allocating resources. - \o FormatError - the audio format is not supported. - \o NetworkError - the audio cannot be played due to network issues. - \o AccessDenied - the audio cannot be played due to insufficient permissions. - \o ServiceMissing - the audio cannot be played because the media service could not be - instantiated. - \endlist -*/ - -QDeclarativeAudio::Error QDeclarativeAudio::error() const -{ - return Error(m_error); -} - -/*! - \qmlproperty string Audio::errorString - - This property holds a string describing the current error condition in more detail. -*/ - -/*! - \qmlsignal Audio::onError(error, errorString) - - This handler is called when an \l {Error}{error} has occurred. The errorString parameter - may contain more detailed information about the error. -*/ - -QT_END_NAMESPACE - -#include "moc_qdeclarativeaudio_p.cpp" - - diff --git a/src/multimedia/qml/qdeclarativeaudio_p.h b/src/multimedia/qml/qdeclarativeaudio_p.h deleted file mode 100644 index d1fb275..0000000 --- a/src/multimedia/qml/qdeclarativeaudio_p.h +++ /dev/null @@ -1,173 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDECLARATIVEAUDIO_P_H -#define QDECLARATIVEAUDIO_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of other Qt classes. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include -#include - - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QTimerEvent; - -class Q_AUTOTEST_EXPORT QDeclarativeAudio : public QObject, public QDeclarativeMediaBase, public QDeclarativeParserStatus -{ - Q_OBJECT - Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) - Q_PROPERTY(bool playing READ isPlaying WRITE setPlaying NOTIFY playingChanged) - Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged) - Q_PROPERTY(Status status READ status NOTIFY statusChanged) - Q_PROPERTY(int duration READ duration NOTIFY durationChanged) - Q_PROPERTY(int position READ position WRITE setPosition NOTIFY positionChanged) - Q_PROPERTY(qreal volume READ volume WRITE setVolume NOTIFY volumeChanged) - Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged) - Q_PROPERTY(int bufferProgress READ bufferProgress NOTIFY bufferProgressChanged) - Q_PROPERTY(bool seekable READ isSeekable NOTIFY seekableChanged) - Q_PROPERTY(qreal playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged) - Q_PROPERTY(Error error READ error NOTIFY errorChanged) - Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged) - Q_ENUMS(Status) - Q_ENUMS(Error) - Q_INTERFACES(QDeclarativeParserStatus) -public: - enum Status - { - UnknownStatus = QMediaPlayer::UnknownMediaStatus, - NoMedia = QMediaPlayer::NoMedia, - Loading = QMediaPlayer::LoadingMedia, - Loaded = QMediaPlayer::LoadedMedia, - Stalled = QMediaPlayer::StalledMedia, - Buffering = QMediaPlayer::BufferingMedia, - Buffered = QMediaPlayer::BufferedMedia, - EndOfMedia = QMediaPlayer::EndOfMedia, - InvalidMedia = QMediaPlayer::InvalidMedia - }; - - enum Error - { - NoError = QMediaPlayer::NoError, - ResourceError = QMediaPlayer::ResourceError, - FormatError = QMediaPlayer::FormatError, - NetworkError = QMediaPlayer::NetworkError, - AccessDenied = QMediaPlayer::AccessDeniedError, - ServiceMissing = QMediaPlayer::ServiceMissingError - }; - - QDeclarativeAudio(QObject *parent = 0); - ~QDeclarativeAudio(); - - Status status() const; - Error error() const; - -public Q_SLOTS: - void play(); - void pause(); - void stop(); - -Q_SIGNALS: - void sourceChanged(); - - void playingChanged(); - void pausedChanged(); - - void started(); - void resumed(); - void paused(); - void stopped(); - - void statusChanged(); - - void loaded(); - void buffering(); - void stalled(); - void buffered(); - void endOfMedia(); - - void durationChanged(); - void positionChanged(); - - void volumeChanged(); - void mutedChanged(); - - void bufferProgressChanged(); - - void seekableChanged(); - void playbackRateChanged(); - - void errorChanged(); - void error(QDeclarativeAudio::Error error, const QString &errorString); - -private Q_SLOTS: - void _q_error(int, const QString &); - -private: - Q_DISABLE_COPY(QDeclarativeAudio) - Q_PRIVATE_SLOT(mediaBase(), void _q_stateChanged(QMediaPlayer::State)) - Q_PRIVATE_SLOT(mediaBase(), void _q_mediaStatusChanged(QMediaPlayer::MediaStatus)) - Q_PRIVATE_SLOT(mediaBase(), void _q_metaDataChanged()) - - inline QDeclarativeMediaBase *mediaBase() { return this; } -}; - -QT_END_NAMESPACE - -QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeAudio)) - -QT_END_HEADER - -#endif diff --git a/src/multimedia/qml/qdeclarativemediabase.cpp b/src/multimedia/qml/qdeclarativemediabase.cpp deleted file mode 100644 index e054cb2..0000000 --- a/src/multimedia/qml/qdeclarativemediabase.cpp +++ /dev/null @@ -1,413 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "QtMultimedia/private/qdeclarativemediabase_p.h" - -#include -#include - -#include -#include -#include -#include -#include - - - -QT_BEGIN_NAMESPACE - - -class QDeclarativeMediaBaseObject : public QMediaObject -{ -public: - QDeclarativeMediaBaseObject(QMediaService *service) - : QMediaObject(0, service) - { - } -}; - -class QDeclarativeMediaBasePlayerControl : public QMediaPlayerControl -{ -public: - QDeclarativeMediaBasePlayerControl(QObject *parent) - : QMediaPlayerControl(parent) - { - } - - QMediaPlayer::State state() const { return QMediaPlayer::StoppedState; } - QMediaPlayer::MediaStatus mediaStatus() const { return QMediaPlayer::NoMedia; } - - qint64 duration() const { return 0; } - qint64 position() const { return 0; } - void setPosition(qint64) {} - int volume() const { return 0; } - void setVolume(int) {} - bool isMuted() const { return false; } - void setMuted(bool) {} - int bufferStatus() const { return 0; } - bool isAudioAvailable() const { return false; } - bool isVideoAvailable() const { return false; } - bool isSeekable() const { return false; } - QMediaTimeRange availablePlaybackRanges() const { return QMediaTimeRange(); } - qreal playbackRate() const { return 1; } - void setPlaybackRate(qreal) {} - QMediaContent media() const { return QMediaContent(); } - const QIODevice *mediaStream() const { return 0; } - void setMedia(const QMediaContent &, QIODevice *) {} - - void play() {} - void pause() {} - void stop() {} -}; - -class QDeclarativeMediaBaseAnimation : public QObject -{ -public: - QDeclarativeMediaBaseAnimation(QDeclarativeMediaBase *media) - : m_media(media) - { - } - - void start() { if (!m_timer.isActive()) m_timer.start(500, this); } - void stop() { m_timer.stop(); } - -protected: - void timerEvent(QTimerEvent *event) - { - if (event->timerId() == m_timer.timerId()) { - event->accept(); - - if (m_media->m_state == QMediaPlayer::PlayingState) - emit m_media->positionChanged(); - if (m_media->m_status == QMediaPlayer::BufferingMedia || QMediaPlayer::StalledMedia) - emit m_media->bufferProgressChanged(); - } else { - QObject::timerEvent(event); - } - } - -private: - QDeclarativeMediaBase *m_media; - QBasicTimer m_timer; -}; - -void QDeclarativeMediaBase::_q_stateChanged(QMediaPlayer::State state) -{ - if (state != m_state) { - QMediaPlayer::State oldState = m_state; - - m_state = state; - - if (state == QMediaPlayer::StoppedState) { - emit stopped(); - emit playingChanged(); - } else if (oldState == QMediaPlayer::StoppedState) { - emit started(); - emit playingChanged(); - } else if (oldState == QMediaPlayer::PausedState) { - m_paused = false; - - emit resumed(); - emit pausedChanged(); - } - - if (state == m_state && state == QMediaPlayer::PausedState) { - bool wasPaused = m_paused; - - m_paused = true; - - emit paused(); - - if (!wasPaused) - emit pausedChanged(); - } - - if (m_state == QMediaPlayer::PlayingState - || m_status == QMediaPlayer::BufferingMedia - || m_status == QMediaPlayer::StalledMedia) { - m_animation->start(); - } else { - m_animation->stop(); - } - } -} - -void QDeclarativeMediaBase::_q_mediaStatusChanged(QMediaPlayer::MediaStatus status) -{ - if (status != m_status) { - m_status = status; - - switch (status) { - case QMediaPlayer::LoadedMedia: - emit loaded(); - break; - case QMediaPlayer::BufferingMedia: - emit buffering(); - break; - case QMediaPlayer::BufferedMedia: - emit buffered(); - break; - case QMediaPlayer::StalledMedia: - emit stalled(); - break; - case QMediaPlayer::EndOfMedia: - emit endOfMedia(); - break; - default: - break; - } - - emit statusChanged(); - - if (m_state == QMediaPlayer::PlayingState - || m_status == QMediaPlayer::BufferingMedia - || m_status == QMediaPlayer::StalledMedia) { - m_animation->start(); - } else { - m_animation->stop(); - } - } -} - -void QDeclarativeMediaBase::_q_metaDataChanged() -{ - m_metaObject->metaDataChanged(); -} - -QDeclarativeMediaBase::QDeclarativeMediaBase() - : m_mediaService(0) - , m_playerControl(0) - , m_mediaObject(0) - , m_mediaProvider(0) - , m_metaDataControl(0) - , m_metaObject(0) - , m_animation(0) - , m_state(QMediaPlayer::StoppedState) - , m_status(QMediaPlayer::NoMedia) - , m_error(QMediaPlayer::NoError) - , m_paused(false) -{ -} - -QDeclarativeMediaBase::~QDeclarativeMediaBase() -{ -} - -void QDeclarativeMediaBase::shutdown() -{ - delete m_metaObject; - delete m_mediaObject; - - if (m_mediaProvider) - m_mediaProvider->releaseService(m_mediaService); - - delete m_animation; - -} - -void QDeclarativeMediaBase::setObject(QObject *object) -{ - if ((m_mediaProvider = QMediaServiceProvider::defaultServiceProvider())) { - if ((m_mediaService = m_mediaProvider->requestService(Q_MEDIASERVICE_MEDIAPLAYER))) { - m_playerControl = qobject_cast( - m_mediaService->control(QMediaPlayerControl_iid)); - m_metaDataControl = qobject_cast( - m_mediaService->control(QMetaDataControl_iid)); - m_mediaObject = new QDeclarativeMediaBaseObject(m_mediaService); - } - } - - if (m_playerControl) { - QObject::connect(m_playerControl, SIGNAL(stateChanged(QMediaPlayer::State)), - object, SLOT(_q_stateChanged(QMediaPlayer::State))); - QObject::connect(m_playerControl, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), - object, SLOT(_q_mediaStatusChanged(QMediaPlayer::MediaStatus))); - QObject::connect(m_playerControl, SIGNAL(mediaChanged(QMediaContent)), - object, SIGNAL(sourceChanged())); - QObject::connect(m_playerControl, SIGNAL(durationChanged(qint64)), - object, SIGNAL(durationChanged())); - QObject::connect(m_playerControl, SIGNAL(positionChanged(qint64)), - object, SIGNAL(positionChanged())); - QObject::connect(m_playerControl, SIGNAL(volumeChanged(int)), - object, SIGNAL(volumeChanged())); - QObject::connect(m_playerControl, SIGNAL(mutedChanged(bool)), - object, SIGNAL(mutedChanged())); - QObject::connect(m_playerControl, SIGNAL(bufferStatusChanged(int)), - object, SIGNAL(bufferProgressChanged())); - QObject::connect(m_playerControl, SIGNAL(seekableChanged(bool)), - object, SIGNAL(seekableChanged())); - QObject::connect(m_playerControl, SIGNAL(playbackRateChanged(qreal)), - object, SIGNAL(playbackRateChanged())); - QObject::connect(m_playerControl, SIGNAL(error(int,QString)), - object, SLOT(_q_error(int,QString))); - - m_animation = new QDeclarativeMediaBaseAnimation(this); - } else { - m_error = QMediaPlayer::ServiceMissingError; - - m_playerControl = new QDeclarativeMediaBasePlayerControl(object); - } - - if (m_metaDataControl) { - m_metaObject = new QMetaDataControlMetaObject(m_metaDataControl, object); - - QObject::connect(m_metaDataControl, SIGNAL(metaDataChanged()), - object, SLOT(_q_metaDataChanged())); - } -} - -QUrl QDeclarativeMediaBase::source() const -{ - return m_playerControl->media().canonicalUrl(); -} - -void QDeclarativeMediaBase::setSource(const QUrl &url) -{ - if (m_error != QMediaPlayer::ServiceMissingError && m_error != QMediaPlayer::NoError) { - m_error = QMediaPlayer::NoError; - m_errorString = QString(); - - emit errorChanged(); - } - - m_playerControl->setMedia(QMediaContent(url), 0); -} - -bool QDeclarativeMediaBase::isPlaying() const -{ - return m_state != QMediaPlayer::StoppedState; -} - -void QDeclarativeMediaBase::setPlaying(bool playing) -{ - if (playing && m_state == QMediaPlayer::StoppedState) { - if (m_paused) - m_playerControl->pause(); - else - m_playerControl->play(); - } else if (!playing) { - m_playerControl->stop(); - } -} - -bool QDeclarativeMediaBase::isPaused() const -{ - return m_paused; -} - -void QDeclarativeMediaBase::setPaused(bool paused) -{ - if (m_paused != paused) { - if (paused && m_state == QMediaPlayer::PlayingState) { - m_playerControl->pause(); - } else if (!paused && m_state == QMediaPlayer::PausedState) { - m_playerControl->play(); - } else { - m_paused = paused; - - emit pausedChanged(); - } - } -} - -int QDeclarativeMediaBase::duration() const -{ - return m_playerControl->duration(); -} - -int QDeclarativeMediaBase::position() const -{ - return m_playerControl->position(); - -} - -void QDeclarativeMediaBase::setPosition(int position) -{ - m_playerControl->setPosition(position); -} - -qreal QDeclarativeMediaBase::volume() const -{ - return qreal(m_playerControl->volume()) / 100; -} - -void QDeclarativeMediaBase::setVolume(qreal volume) -{ - m_playerControl->setVolume(qRound(volume * 100)); -} - -bool QDeclarativeMediaBase::isMuted() const -{ - return m_playerControl->isMuted(); -} - -void QDeclarativeMediaBase::setMuted(bool muted) -{ - m_playerControl->setMuted(muted); -} - -qreal QDeclarativeMediaBase::bufferProgress() const -{ - return qreal(m_playerControl->bufferStatus()) / 100; -} - -bool QDeclarativeMediaBase::isSeekable() const -{ - return m_playerControl->isSeekable(); -} - -qreal QDeclarativeMediaBase::playbackRate() const -{ - return m_playerControl->playbackRate(); -} - -void QDeclarativeMediaBase::setPlaybackRate(qreal rate) -{ - m_playerControl->setPlaybackRate(rate); -} - -QString QDeclarativeMediaBase::errorString() const -{ - return m_errorString; -} - -QT_END_NAMESPACE - diff --git a/src/multimedia/qml/qdeclarativemediabase_p.h b/src/multimedia/qml/qdeclarativemediabase_p.h deleted file mode 100644 index 2fc48db..0000000 --- a/src/multimedia/qml/qdeclarativemediabase_p.h +++ /dev/null @@ -1,168 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDECLARATIVEMEDIABASE_P_H -#define QDECLARATIVEMEDIABASE_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of other Qt classes. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QMediaPlayerControl; -class QMediaService; -class QMediaServiceProvider; -class QMetaDataControl; -class QMetaDataControlMetaObject; -class QDeclarativeMediaBaseAnimation; - -class Q_AUTOTEST_EXPORT QDeclarativeMediaBase -{ -public: - QDeclarativeMediaBase(); - virtual ~QDeclarativeMediaBase(); - - QUrl source() const; - void setSource(const QUrl &url); - - bool isPlaying() const; - void setPlaying(bool playing); - - bool isPaused() const; - void setPaused(bool paused); - - int duration() const; - - int position() const; - void setPosition(int position); - - qreal volume() const; - void setVolume(qreal volume); - - bool isMuted() const; - void setMuted(bool muted); - - qreal bufferProgress() const; - - bool isSeekable() const; - - qreal playbackRate() const; - void setPlaybackRate(qreal rate); - - QString errorString() const; - - void _q_stateChanged(QMediaPlayer::State state); - void _q_mediaStatusChanged(QMediaPlayer::MediaStatus status); - - void _q_metaDataChanged(); - -protected: - void shutdown(); - - void setObject(QObject *object); - - virtual void sourceChanged() = 0; - - virtual void playingChanged() = 0; - virtual void pausedChanged() = 0; - - virtual void started() = 0; - virtual void resumed() = 0; - virtual void paused() = 0; - virtual void stopped() = 0; - - virtual void statusChanged() = 0; - - virtual void loaded() = 0; - virtual void buffering() = 0; - virtual void stalled() = 0; - virtual void buffered() = 0; - virtual void endOfMedia() = 0; - - virtual void durationChanged() = 0; - virtual void positionChanged() = 0; - - virtual void volumeChanged() = 0; - virtual void mutedChanged() = 0; - - virtual void bufferProgressChanged() = 0; - - virtual void seekableChanged() = 0; - virtual void playbackRateChanged() = 0; - - virtual void errorChanged() = 0; - - QMediaService *m_mediaService; - QMediaPlayerControl *m_playerControl; - - QMediaObject *m_mediaObject; - QMediaServiceProvider *m_mediaProvider; - QMetaDataControl *m_metaDataControl; - QMetaDataControlMetaObject *m_metaObject; - QDeclarativeMediaBaseAnimation *m_animation; - - QMediaPlayer::State m_state; - QMediaPlayer::MediaStatus m_status; - QMediaPlayer::Error m_error; - bool m_paused; - QString m_errorString; - - friend class QDeclarativeMediaBaseAnimation; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif diff --git a/src/multimedia/qml/qdeclarativevideo.cpp b/src/multimedia/qml/qdeclarativevideo.cpp deleted file mode 100644 index 7f62075..0000000 --- a/src/multimedia/qml/qdeclarativevideo.cpp +++ /dev/null @@ -1,945 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qdeclarativevideo_p.h" - -#include -#include -#include -#include -#include - - -QT_BEGIN_NAMESPACE - - -void QDeclarativeVideo::_q_nativeSizeChanged(const QSizeF &size) -{ - setImplicitWidth(size.width()); - setImplicitHeight(size.height()); -} - -void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString) -{ - m_error = QMediaPlayer::Error(errorCode); - m_errorString = errorString; - - emit error(Error(errorCode), errorString); - emit errorChanged(); -} - - -/*! - \qmlclass Video QDeclarativeVideo - \since 4.7 - \brief The Video element allows you to add videos to a scene. - \inherits Item - - \qml - Video { source: "video/movie.mpg" } - \endqml - - The video item supports untransformed, stretched, and uniformly scaled video presentation. - For a description of stretched uniformly scaled presentation, see the \l fillMode property - description. - - The video item is only visible when the \l hasVideo property is true and the video is playing. - - \sa Audio -*/ - -/*! - \internal - \class QDeclarativeVideo - \brief The QDeclarativeVideo class provides a video item that you can add to a QDeclarativeView. -*/ - -QDeclarativeVideo::QDeclarativeVideo(QDeclarativeItem *parent) - : QDeclarativeItem(parent) - , m_graphicsItem(0) - -{ - m_graphicsItem = new QGraphicsVideoItem(this); - connect(m_graphicsItem, SIGNAL(nativeSizeChanged(QSizeF)), - this, SLOT(_q_nativeSizeChanged(QSizeF))); - - setObject(this); - - if (m_mediaService) { - connect(m_playerControl, SIGNAL(audioAvailableChanged(bool)), - this, SIGNAL(hasAudioChanged())); - connect(m_playerControl, SIGNAL(videoAvailableChanged(bool)), - this, SIGNAL(hasVideoChanged())); - - m_graphicsItem->setMediaObject(m_mediaObject); - } -} - -QDeclarativeVideo::~QDeclarativeVideo() -{ - shutdown(); - - delete m_graphicsItem; -} - -/*! - \qmlproperty url Video::source - - This property holds the source URL of the media. -*/ - -/*! - \qmlproperty bool Video::playing - - This property holds whether the media is playing. - - Defaults to false, and can be set to true to start playback. -*/ - -/*! - \qmlproperty bool Video::paused - - This property holds whether the media is paused. - - Defaults to false, and can be set to true to pause playback. -*/ - -/*! - \qmlsignal Video::onStarted() - - This handler is called when playback is started. -*/ - -/*! - \qmlsignal Video::onResumed() - - This handler is called when playback is resumed from the paused state. -*/ - -/*! - \qmlsignal Video::onPaused() - - This handler is called when playback is paused. -*/ - -/*! - \qmlsignal Video::onStopped() - - This handler is called when playback is stopped. -*/ - -/*! - \qmlproperty enum Video::status - - This property holds the status of media loading. It can be one of: - - \list - \o NoMedia - no media has been set. - \o Loading - the media is currently being loaded. - \o Loaded - the media has been loaded. - \o Buffering - the media is buffering data. - \o Stalled - playback has been interrupted while the media is buffering data. - \o Buffered - the media has buffered data. - \o EndOfMedia - the media has played to the end. - \o InvalidMedia - the media cannot be played. - \o UnknownStatus - the status of the media is cannot be determined. - \endlist -*/ - -QDeclarativeVideo::Status QDeclarativeVideo::status() const -{ - return Status(m_status); -} - -/*! - \qmlsignal Video::onLoaded() - - This handler is called when the media source has been loaded. -*/ - -/*! - \qmlsignal Video::onBuffering() - - This handler is called when the media starts buffering. -*/ - -/*! - \qmlsignal Video::onStalled() - - This handler is called when playback has stalled while the media buffers. -*/ - -/*! - \qmlsignal Video::onBuffered() - - This handler is called when the media has finished buffering. -*/ - -/*! - \qmlsignal Video::onEndOfMedia() - - This handler is called when playback stops because end of the media has been reached. -*/ - -/*! - \qmlproperty int Video::duration - - This property holds the duration of the media in milliseconds. - - If the media doesn't have a fixed duration (a live stream for example) this will be 0. -*/ - -/*! - \qmlproperty int Video::position - - This property holds the current playback position in milliseconds. -*/ - -/*! - \qmlproperty qreal Video::volume - - This property holds the volume of the audio output, from 0.0 (silent) to 1.0 (maximum volume). -*/ - -/*! - \qmlproperty bool Video::muted - - This property holds whether the audio output is muted. -*/ - -/*! - \qmlproperty bool Video::hasAudio - - This property holds whether the media contains audio. -*/ - -bool QDeclarativeVideo::hasAudio() const -{ - return m_playerControl->isAudioAvailable(); -} - -/*! - \qmlproperty bool Video::hasVideo - - This property holds whether the media contains video. -*/ - -bool QDeclarativeVideo::hasVideo() const -{ - return m_playerControl->isVideoAvailable(); -} - -/*! - \qmlproperty qreal Video::bufferProgress - - This property holds how much of the data buffer is currently filled, from 0.0 (empty) to 1.0 - (full). -*/ - -/*! - \qmlproperty bool Video::seekable - - This property holds whether position of the video can be changed. -*/ - -/*! - \qmlproperty qreal Video::playbackRate - - This property holds the rate at which video is played at as a multiple of the normal rate. -*/ - -/*! - \qmlproperty enum Video::error - - This property holds the error state of the video. It can be one of: - - \list - \o NoError - there is no current error. - \o ResourceError - the video cannot be played due to a problem allocating resources. - \o FormatError - the video format is not supported. - \o NetworkError - the video cannot be played due to network issues. - \o AccessDenied - the video cannot be played due to insufficient permissions. - \o ServiceMissing - the video cannot be played because the media service could not be - instantiated. - \endlist -*/ - - -QDeclarativeVideo::Error QDeclarativeVideo::error() const -{ - return Error(m_error); -} - -/*! - \qmlproperty string Video::errorString - - This property holds a string describing the current error condition in more detail. -*/ - -/*! - \qmlsignal Video::onError(error, errorString) - - This handler is called when an \l {Error}{error} has occurred. The errorString parameter - may contain more detailed information about the error. -*/ - -/*! - \qmlproperty enum Video::fillMode - - Set this property to define how the video is scaled to fit the target area. - - \list - \o Stretch - the video is scaled to fit. - \o PreserveAspectFit - the video is scaled uniformly to fit without cropping - \o PreserveAspectCrop - the video is scaled uniformly to fill, cropping if necessary - \endlist - - The default fill mode is PreserveAspectFit. -*/ - -QDeclarativeVideo::FillMode QDeclarativeVideo::fillMode() const -{ - return FillMode(m_graphicsItem->aspectRatioMode()); -} - -void QDeclarativeVideo::setFillMode(FillMode mode) -{ - m_graphicsItem->setAspectRatioMode(Qt::AspectRatioMode(mode)); -} - -/*! - \qmlmethod Video::play() - - Starts playback of the media. - - Sets the \l playing property to true, and the \l paused property to false. -*/ - -void QDeclarativeVideo::play() -{ - m_playerControl->play(); - - if (m_paused) { - m_paused = false; - emit pausedChanged(); - } -} - -/*! - \qmlmethod Video::pause() - - Pauses playback of the media. - - Sets the \l playing and \l paused properties to true. -*/ - -void QDeclarativeVideo::pause() -{ - m_playerControl->pause(); - - if (!m_paused && m_state == QMediaPlayer::PausedState) { - m_paused = true; - emit pausedChanged(); - } -} - -/*! - \qmlmethod Video::stop() - - Stops playback of the media. - - Sets the \l playing and \l paused properties to false. -*/ - -void QDeclarativeVideo::stop() -{ - m_playerControl->stop(); - - if (m_paused) { - m_paused = false; - emit pausedChanged(); - } -} - -void QDeclarativeVideo::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) -{ -} - -void QDeclarativeVideo::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) -{ - m_graphicsItem->setSize(newGeometry.size()); - - QDeclarativeItem::geometryChanged(newGeometry, oldGeometry); -} - -QT_END_NAMESPACE - -// *************************************** -// Documentation for meta-data properties. -// *************************************** - -/*! - \qmlproperty variant Video::title - - This property holds the tile of the media. - - \sa {QtMultimedia::Title} -*/ - -/*! - \qmlproperty variant Video::subTitle - - This property holds the sub-title of the media. - - \sa {QtMultimedia::SubTitle} -*/ - -/*! - \qmlproperty variant Video::author - - This property holds the author of the media. - - \sa {QtMultimedia::Author} -*/ - -/*! - \qmlproperty variant Video::comment - - This property holds a user comment about the media. - - \sa {QtMultimedia::Comment} -*/ - -/*! - \qmlproperty variant Video::description - - This property holds a description of the media. - - \sa {QtMultimedia::Description} -*/ - -/*! - \qmlproperty variant Video::category - - This property holds the category of the media - - \sa {QtMultimedia::Category} -*/ - -/*! - \qmlproperty variant Video::genre - - This property holds the genre of the media. - - \sa {QtMultimedia::Genre} -*/ - -/*! - \qmlproperty variant Video::year - - This property holds the year of release of the media. - - \sa {QtMultimedia::Year} -*/ - -/*! - \qmlproperty variant Video::date - - This property holds the date of the media. - - \sa {QtMultimedia::Date} -*/ - -/*! - \qmlproperty variant Video::userRating - - This property holds a user rating of the media in the range of 0 to 100. - - \sa {QtMultimedia::UserRating} -*/ - -/*! - \qmlproperty variant Video::keywords - - This property holds a list of keywords describing the media. - - \sa {QtMultimedia::Keywords} -*/ - -/*! - \qmlproperty variant Video::language - - This property holds the language of the media, as an ISO 639-2 code. - - \sa {QtMultimedia::Language} -*/ - -/*! - \qmlproperty variant Video::publisher - - This property holds the publisher of the media. - - \sa {QtMultimedia::Publisher} -*/ - -/*! - \qmlproperty variant Video::copyright - - This property holds the media's copyright notice. - - \sa {QtMultimedia::Copyright} -*/ - -/*! - \qmlproperty variant Video::parentalRating - - This property holds the parental rating of the media. - - \sa {QtMultimedia::ParentalRating} -*/ - -/*! - \qmlproperty variant Video::ratingOrganisation - - This property holds the name of the rating organisation responsible for the - parental rating of the media. - - \sa {QtMultimedia::RatingOrganisation} -*/ - -/*! - \qmlproperty variant Video::size - - This property property holds the size of the media in bytes. - - \sa {QtMultimedia::Size} -*/ - -/*! - \qmlproperty variant Video::mediaType - - This property holds the type of the media. - - \sa {QtMultimedia::MediaType} -*/ - -/*! - \qmlproperty variant Video::audioBitRate - - This property holds the bit rate of the media's audio stream ni bits per - second. - - \sa {QtMultimedia::AudioBitRate} -*/ - -/*! - \qmlproperty variant Video::audioCodec - - This property holds the encoding of the media audio stream. - - \sa {QtMultimedia::AudioCodec} -*/ - -/*! - \qmlproperty variant Video::averageLevel - - This property holds the average volume level of the media. - - \sa {QtMultimedia::AverageLevel} -*/ - -/*! - \qmlproperty variant Video::channelCount - - This property holds the number of channels in the media's audio stream. - - \sa {QtMultimedia::ChannelCount} -*/ - -/*! - \qmlproperty variant Video::peakValue - - This property holds the peak volume of media's audio stream. - - \sa {QtMultimedia::PeakValue} -*/ - -/*! - \qmlproperty variant Video::sampleRate - - This property holds the sample rate of the media's audio stream in hertz. - - \sa {QtMultimedia::SampleRate} -*/ - -/*! - \qmlproperty variant Video::albumTitle - - This property holds the title of the album the media belongs to. - - \sa {QtMultimedia::AlbumTitle} -*/ - -/*! - \qmlproperty variant Video::albumArtist - - This property holds the name of the principal artist of the album the media - belongs to. - - \sa {QtMultimedia::AlbumArtist} -*/ - -/*! - \qmlproperty variant Video::contributingArtist - - This property holds the names of artists contributing to the media. - - \sa {QtMultimedia::ContributingArtist} -*/ - -/*! - \qmlproperty variant Video::composer - - This property holds the composer of the media. - - \sa {QtMultimedia::Composer} -*/ - -/*! - \qmlproperty variant Video::conductor - - This property holds the conductor of the media. - - \sa {QtMultimedia::Conductor} -*/ - -/*! - \qmlproperty variant Video::lyrics - - This property holds the lyrics to the media. - - \sa {QtMultimedia::Lyrics} -*/ - -/*! - \qmlproperty variant Video::mood - - This property holds the mood of the media. - - \sa {QtMultimedia::Mood} -*/ - -/*! - \qmlproperty variant Video::trackNumber - - This property holds the track number of the media. - - \sa {QtMultimedia::TrackNumber} -*/ - -/*! - \qmlproperty variant Video::trackCount - - This property holds the number of track on the album containing the media. - - \sa {QtMultimedia::TrackNumber} -*/ - -/*! - \qmlproperty variant Video::coverArtUrlSmall - - This property holds the URL of a small cover art image. - - \sa {QtMultimedia::CoverArtUrlSmall} -*/ - -/*! - \qmlproperty variant Video::coverArtUrlLarge - - This property holds the URL of a large cover art image. - - \sa {QtMultimedia::CoverArtUrlLarge} -*/ - -/*! - \qmlproperty variant Video::resolution - - This property holds the dimension of an image or video. - - \sa {QtMultimedia::Resolution} -*/ - -/*! - \qmlproperty variant Video::pixelAspectRatio - - This property holds the pixel aspect ratio of an image or video. - - \sa {QtMultimedia::PixelAspectRatio} -*/ - -/*! - \qmlproperty variant Video::videoFrameRate - - This property holds the frame rate of the media's video stream. - - \sa {QtMultimedia::VideoFrameRate} -*/ - -/*! - \qmlproperty variant Video::videoBitRate - - This property holds the bit rate of the media's video stream in bits per - second. - - \sa {QtMultimedia::VideoBitRate} -*/ - -/*! - \qmlproperty variant Video::videoCodec - - This property holds the encoding of the media's video stream. - - \sa {QtMultimedia::VideoCodec} -*/ - -/*! - \qmlproperty variant Video::posterUrl - - This property holds the URL of a poster image. - - \sa {QtMultimedia::PosterUrl} -*/ - -/*! - \qmlproperty variant Video::chapterNumber - - This property holds the chapter number of the media. - - \sa {QtMultimedia::ChapterNumber} -*/ - -/*! - \qmlproperty variant Video::director - - This property holds the director of the media. - - \sa {QtMultimedia::Director} -*/ - -/*! - \qmlproperty variant Video::leadPerformer - - This property holds the lead performer in the media. - - \sa {QtMultimedia::LeadPerformer} -*/ - -/*! - \qmlproperty variant Video::writer - - This property holds the writer of the media. - - \sa {QtMultimedia::Writer} -*/ - -// The remaining properties are related to photos, and are technically -// available but will certainly never have values. -#ifndef Q_QDOC - -/*! - \qmlproperty variant Video::cameraManufacturer - - \sa {QtMultimedia::CameraManufacturer} -*/ - -/*! - \qmlproperty variant Video::cameraModel - - \sa {QtMultimedia::CameraModel} -*/ - -/*! - \qmlproperty variant Video::event - - \sa {QtMultimedia::Event} -*/ - -/*! - \qmlproperty variant Video::subject - - \sa {QtMultimedia::Subject} -*/ - -/*! - \qmlproperty variant Video::orientation - - \sa {QtMultimedia::Orientation} -*/ - -/*! - \qmlproperty variant Video::exposureTime - - \sa {QtMultimedia::ExposureTime} -*/ - -/*! - \qmlproperty variant Video::fNumber - - \sa {QtMultimedia::FNumber} -*/ - -/*! - \qmlproperty variant Video::exposureProgram - - \sa {QtMultimedia::ExposureProgram} -*/ - -/*! - \qmlproperty variant Video::isoSpeedRatings - - \sa {QtMultimedia::ISOSpeedRatings} -*/ - -/*! - \qmlproperty variant Video::exposureBiasValue - - \sa {QtMultimedia::ExposureBiasValue} -*/ - -/*! - \qmlproperty variant Video::dateTimeDigitized - - \sa {QtMultimedia::DateTimeDigitized} -*/ - -/*! - \qmlproperty variant Video::subjectDistance - - \sa {QtMultimedia::SubjectDistance} -*/ - -/*! - \qmlproperty variant Video::meteringMode - - \sa {QtMultimedia::MeteringMode} -*/ - -/*! - \qmlproperty variant Video::lightSource - - \sa {QtMultimedia::LightSource} -*/ - -/*! - \qmlproperty variant Video::flash - - \sa {QtMultimedia::Flash} -*/ - -/*! - \qmlproperty variant Video::focalLength - - \sa {QtMultimedia::FocalLength} -*/ - -/*! - \qmlproperty variant Video::exposureMode - - \sa {QtMultimedia::ExposureMode} -*/ - -/*! - \qmlproperty variant Video::whiteBalance - - \sa {QtMultimedia::WhiteBalance} -*/ - -/*! - \qmlproperty variant Video::DigitalZoomRatio - - \sa {QtMultimedia::DigitalZoomRatio} -*/ - -/*! - \qmlproperty variant Video::focalLengthIn35mmFilm - - \sa {QtMultimedia::FocalLengthIn35mmFile} -*/ - -/*! - \qmlproperty variant Video::sceneCaptureType - - \sa {QtMultimedia::SceneCaptureType} -*/ - -/*! - \qmlproperty variant Video::gainControl - - \sa {QtMultimedia::GainControl} -*/ - -/*! - \qmlproperty variant Video::contrast - - \sa {QtMultimedia::contrast} -*/ - -/*! - \qmlproperty variant Video::saturation - - \sa {QtMultimedia::Saturation} -*/ - -/*! - \qmlproperty variant Video::sharpness - - \sa {QtMultimedia::Sharpness} -*/ - -/*! - \qmlproperty variant Video::deviceSettingDescription - - \sa {QtMultimedia::DeviceSettingDescription} -*/ - -#endif - -#include "moc_qdeclarativevideo_p.cpp" diff --git a/src/multimedia/qml/qdeclarativevideo_p.h b/src/multimedia/qml/qdeclarativevideo_p.h deleted file mode 100644 index d5ebde1..0000000 --- a/src/multimedia/qml/qdeclarativevideo_p.h +++ /dev/null @@ -1,204 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDECLARATIVEVIDEO_H -#define QDECLARATIVEVIDEO_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of other Qt classes. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include - -#include -#include - - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QTimerEvent; -class QVideoSurfaceFormat; - - -class Q_AUTOTEST_EXPORT QDeclarativeVideo : public QDeclarativeItem, public QDeclarativeMediaBase -{ - Q_OBJECT - Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) - Q_PROPERTY(bool playing READ isPlaying WRITE setPlaying NOTIFY playingChanged) - Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged) - Q_PROPERTY(Status status READ status NOTIFY statusChanged) - Q_PROPERTY(int duration READ duration NOTIFY durationChanged) - Q_PROPERTY(int position READ position WRITE setPosition NOTIFY positionChanged) - Q_PROPERTY(qreal volume READ volume WRITE setVolume NOTIFY volumeChanged) - Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged) - Q_PROPERTY(bool hasAudio READ hasAudio NOTIFY hasAudioChanged) - Q_PROPERTY(bool hasVideo READ hasVideo NOTIFY hasVideoChanged) - Q_PROPERTY(int bufferProgress READ bufferProgress NOTIFY bufferProgressChanged) - Q_PROPERTY(bool seekable READ isSeekable NOTIFY seekableChanged) - Q_PROPERTY(qreal playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged) - Q_PROPERTY(Error error READ error NOTIFY errorChanged) - Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged) - Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode) - Q_ENUMS(FillMode) - Q_ENUMS(Status) - Q_ENUMS(Error) -public: - enum FillMode - { - Stretch = Qt::IgnoreAspectRatio, - PreserveAspectFit = Qt::KeepAspectRatio, - PreserveAspectCrop = Qt::KeepAspectRatioByExpanding - }; - - enum Status - { - UnknownStatus = QMediaPlayer::UnknownMediaStatus, - NoMedia = QMediaPlayer::NoMedia, - Loading = QMediaPlayer::LoadingMedia, - Loaded = QMediaPlayer::LoadedMedia, - Stalled = QMediaPlayer::StalledMedia, - Buffering = QMediaPlayer::BufferingMedia, - Buffered = QMediaPlayer::BufferedMedia, - EndOfMedia = QMediaPlayer::EndOfMedia, - InvalidMedia = QMediaPlayer::InvalidMedia - }; - - enum Error - { - NoError = QMediaPlayer::NoError, - ResourceError = QMediaPlayer::ResourceError, - FormatError = QMediaPlayer::FormatError, - NetworkError = QMediaPlayer::NetworkError, - AccessDenied = QMediaPlayer::AccessDeniedError, - ServiceMissing = QMediaPlayer::ServiceMissingError - }; - - QDeclarativeVideo(QDeclarativeItem *parent = 0); - ~QDeclarativeVideo(); - - bool hasAudio() const; - bool hasVideo() const; - - FillMode fillMode() const; - void setFillMode(FillMode mode); - - Status status() const; - Error error() const; - - void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); - -public Q_SLOTS: - void play(); - void pause(); - void stop(); - -Q_SIGNALS: - void sourceChanged(); - - void playingChanged(); - void pausedChanged(); - - void started(); - void resumed(); - void paused(); - void stopped(); - - void statusChanged(); - - void loaded(); - void buffering(); - void stalled(); - void buffered(); - void endOfMedia(); - - void durationChanged(); - void positionChanged(); - - void volumeChanged(); - void mutedChanged(); - void hasAudioChanged(); - void hasVideoChanged(); - - void bufferProgressChanged(); - - void seekableChanged(); - void playbackRateChanged(); - - void errorChanged(); - void error(QDeclarativeVideo::Error error, const QString &errorString); - -protected: - void geometryChanged(const QRectF &geometry, const QRectF &); - -private Q_SLOTS: - void _q_nativeSizeChanged(const QSizeF &size); - void _q_error(int, const QString &); - -private: - Q_DISABLE_COPY(QDeclarativeVideo) - - QGraphicsVideoItem *m_graphicsItem; - - Q_PRIVATE_SLOT(mediaBase(), void _q_stateChanged(QMediaPlayer::State)) - Q_PRIVATE_SLOT(mediaBase(), void _q_mediaStatusChanged(QMediaPlayer::MediaStatus)) - Q_PRIVATE_SLOT(mediaBase(), void _q_metaDataChanged()) - - inline QDeclarativeMediaBase *mediaBase() { return this; } -}; - -QT_END_NAMESPACE - -QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeVideo)) - -QT_END_HEADER - -#endif diff --git a/src/multimedia/qml/qmetadatacontrolmetaobject.cpp b/src/multimedia/qml/qmetadatacontrolmetaobject.cpp deleted file mode 100644 index 47b6382..0000000 --- a/src/multimedia/qml/qmetadatacontrolmetaobject.cpp +++ /dev/null @@ -1,362 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - - -QT_BEGIN_NAMESPACE - -// copied from qmetaobject.cpp -// do not touch without touching the moc as well -enum PropertyFlags { - Invalid = 0x00000000, - Readable = 0x00000001, - Writable = 0x00000002, - Resettable = 0x00000004, - EnumOrFlag = 0x00000008, - StdCppSet = 0x00000100, -// Override = 0x00000200, - Designable = 0x00001000, - ResolveDesignable = 0x00002000, - Scriptable = 0x00004000, - ResolveScriptable = 0x00008000, - Stored = 0x00010000, - ResolveStored = 0x00020000, - Editable = 0x00040000, - ResolveEditable = 0x00080000, - User = 0x00100000, - ResolveUser = 0x00200000, - Notify = 0x00400000, - Dynamic = 0x00800000 -}; - -enum MethodFlags { - AccessPrivate = 0x00, - AccessProtected = 0x01, - AccessPublic = 0x02, - AccessMask = 0x03, //mask - - MethodMethod = 0x00, - MethodSignal = 0x04, - MethodSlot = 0x08, - MethodConstructor = 0x0c, - MethodTypeMask = 0x0c, - - MethodCompatibility = 0x10, - MethodCloned = 0x20, - MethodScriptable = 0x40 -}; - -struct QMetaObjectPrivate -{ - int revision; - int className; - int classInfoCount, classInfoData; - int methodCount, methodData; - int propertyCount, propertyData; - int enumeratorCount, enumeratorData; - int constructorCount, constructorData; - int flags; -}; - -static inline const QMetaObjectPrivate *priv(const uint* m_data) -{ return reinterpret_cast(m_data); } -// end of copied lines from qmetaobject.cpp - -namespace -{ - struct MetaDataKey - { - QtMultimedia::MetaData key; - const char *name; - }; - - const MetaDataKey qt_metaDataKeys[] = - { - { QtMultimedia::Title, "title" }, - { QtMultimedia::SubTitle, "subTitle" }, - { QtMultimedia::Author, "author" }, - { QtMultimedia::Comment, "comment" }, - { QtMultimedia::Description, "description" }, - { QtMultimedia::Category, "category" }, - { QtMultimedia::Genre, "genre" }, - { QtMultimedia::Year, "year" }, - { QtMultimedia::Date, "date" }, - { QtMultimedia::UserRating, "userRating" }, - { QtMultimedia::Keywords, "keywords" }, - { QtMultimedia::Language, "language" }, - { QtMultimedia::Publisher, "publisher" }, - { QtMultimedia::Copyright, "copyright" }, - { QtMultimedia::ParentalRating, "parentalRating" }, - { QtMultimedia::RatingOrganisation, "ratingOrganisation" }, - - // Media - { QtMultimedia::Size, "size" }, - { QtMultimedia::MediaType, "mediaType" }, -// { QtMultimedia::Duration, "duration" }, - - // Audio - { QtMultimedia::AudioBitRate, "audioBitRate" }, - { QtMultimedia::AudioCodec, "audioCodec" }, - { QtMultimedia::AverageLevel, "averageLevel" }, - { QtMultimedia::ChannelCount, "channelCount" }, - { QtMultimedia::PeakValue, "peakValue" }, - { QtMultimedia::SampleRate, "sampleRate" }, - - // Music - { QtMultimedia::AlbumTitle, "albumTitle" }, - { QtMultimedia::AlbumArtist, "albumArtist" }, - { QtMultimedia::ContributingArtist, "contributingArtist" }, - { QtMultimedia::Composer, "composer" }, - { QtMultimedia::Conductor, "conductor" }, - { QtMultimedia::Lyrics, "lyrics" }, - { QtMultimedia::Mood, "mood" }, - { QtMultimedia::TrackNumber, "trackNumber" }, - { QtMultimedia::TrackCount, "trackCount" }, - - { QtMultimedia::CoverArtUrlSmall, "coverArtUrlSmall" }, - { QtMultimedia::CoverArtUrlLarge, "coverArtUrlLarge" }, - - // Image/Video - { QtMultimedia::Resolution, "resolution" }, - { QtMultimedia::PixelAspectRatio, "pixelAspectRatio" }, - - // Video - { QtMultimedia::VideoFrameRate, "videoFrameRate" }, - { QtMultimedia::VideoBitRate, "videoBitRate" }, - { QtMultimedia::VideoCodec, "videoCodec" }, - - { QtMultimedia::PosterUrl, "posterUrl" }, - - // Movie - { QtMultimedia::ChapterNumber, "chapterNumber" }, - { QtMultimedia::Director, "director" }, - { QtMultimedia::LeadPerformer, "leadPerformer" }, - { QtMultimedia::Writer, "writer" }, - - // Photos - { QtMultimedia::CameraManufacturer, "cameraManufacturer" }, - { QtMultimedia::CameraModel, "cameraModel" }, - { QtMultimedia::Event, "event" }, - { QtMultimedia::Subject, "subject" }, - { QtMultimedia::Orientation, "orientation" }, - { QtMultimedia::ExposureTime, "exposureTime" }, - { QtMultimedia::FNumber, "fNumber" }, - { QtMultimedia::ExposureProgram, "exposureProgram" }, - { QtMultimedia::ISOSpeedRatings, "isoSpeedRatings" }, - { QtMultimedia::ExposureBiasValue, "exposureBiasValue" }, - { QtMultimedia::DateTimeOriginal, "dateTimeOriginal" }, - { QtMultimedia::DateTimeDigitized, "dateTimeDigitized" }, - { QtMultimedia::SubjectDistance, "subjectDistance" }, - { QtMultimedia::MeteringMode, "meteringMode" }, - { QtMultimedia::LightSource, "lightSource" }, - { QtMultimedia::Flash, "flash" }, - { QtMultimedia::FocalLength, "focalLength" }, - { QtMultimedia::ExposureMode, "exposureMode" }, - { QtMultimedia::WhiteBalance, "whiteBalance" }, - { QtMultimedia::DigitalZoomRatio, "digitalZoomRatio" }, - { QtMultimedia::FocalLengthIn35mmFilm, "focalLengthIn35mmFilm" }, - { QtMultimedia::SceneCaptureType, "sceneCaptureType" }, - { QtMultimedia::GainControl, "gainControl" }, - { QtMultimedia::Contrast, "contrast" }, - { QtMultimedia::Saturation, "saturation" }, - { QtMultimedia::Sharpness, "sharpness" }, - { QtMultimedia::DeviceSettingDescription, "deviceSettingDescription" } - }; - - class QMetaDataControlObject : public QObject - { - public: - inline QObjectData *data() { return d_ptr.data(); } - }; -} - -QMetaDataControlMetaObject::QMetaDataControlMetaObject(QMetaDataControl *control, QObject *object) - : m_control(control) - , m_object(object) - , m_string(0) - , m_data(0) - , m_propertyOffset(0) - , m_signalOffset(0) -{ - const QMetaObject *superClass = m_object->metaObject(); - - const int propertyCount = sizeof(qt_metaDataKeys) / sizeof(MetaDataKey); - const int dataSize = sizeof(uint) - * (13 // QMetaObjectPrivate members. - + 5 // 5 members per signal. - + 4 * propertyCount // 3 members per property + 1 notify signal per property. - + 1); // Terminating value. - - m_data = reinterpret_cast(qMalloc(dataSize)); - - QMetaObjectPrivate *pMeta = reinterpret_cast(m_data); - - pMeta->revision = 3; - pMeta->className = 0; - pMeta->classInfoCount = 0; - pMeta->classInfoData = 0; - pMeta->methodCount = 1; - pMeta->methodData = 13; - pMeta->propertyCount = propertyCount; - pMeta->propertyData = 18; - pMeta->enumeratorCount = 0; - pMeta->enumeratorData = 0; - pMeta->constructorCount = 0; - pMeta->constructorData = 0; - pMeta->flags = 0x01; // Dynamic meta object flag. - - const int classNameSize = qstrlen(superClass->className()) + 1; - - int stringIndex = classNameSize + 1; - - // __metaDataChanged() signal. - static const char *changeSignal = "__metaDataChanged()"; - const int changeSignalSize = qstrlen(changeSignal) + 1; - - m_data[13] = stringIndex; // Signature. - m_data[14] = classNameSize; // Parameters. - m_data[15] = classNameSize; // Type. - m_data[16] = classNameSize; // Tag. - m_data[17] = MethodSignal | AccessProtected; // Flags. - - stringIndex += changeSignalSize; - - const char *qvariantName = "QVariant"; - const int qvariantSize = qstrlen(qvariantName) + 1; - const int qvariantIndex = stringIndex; - - stringIndex += qvariantSize; - - // Properties. - for (int i = 0; i < propertyCount; ++i) { - m_data[18 + 3 * i] = stringIndex; // Name. - m_data[19 + 3 * i] = qvariantIndex; // Type. - m_data[20 + 3 * i] - = Readable | Writable | Notify | Dynamic | (0xffffffff << 24); // Flags. - m_data[18 + propertyCount * 3 + i] = 0; // Notify signal. - - stringIndex += qstrlen(qt_metaDataKeys[i].name) + 1; - } - - // Terminating value. - m_data[18 + propertyCount * 4] = 0; - - // Build string. - m_string = reinterpret_cast(qMalloc(stringIndex + 1)); - - // Class name. - qMemCopy(m_string, superClass->className(), classNameSize); - - stringIndex = classNameSize; - - // Null m_string. - m_string[stringIndex] = '\0'; - stringIndex += 1; - - // __metaDataChanged() signal. - qMemCopy(m_string + stringIndex, changeSignal, changeSignalSize); - stringIndex += changeSignalSize; - - qMemCopy(m_string + stringIndex, qvariantName, qvariantSize); - stringIndex += qvariantSize; - - // Properties. - for (int i = 0; i < propertyCount; ++i) { - const int propertyNameSize = qstrlen(qt_metaDataKeys[i].name) + 1; - - qMemCopy(m_string + stringIndex, qt_metaDataKeys[i].name, propertyNameSize); - stringIndex += propertyNameSize; - } - - // Terminating character. - m_string[stringIndex] = '\0'; - - d.superdata = superClass; - d.stringdata = m_string; - d.data = m_data; - d.extradata = 0; - - static_cast(m_object)->data()->metaObject = this; - - m_propertyOffset = propertyOffset(); - m_signalOffset = methodOffset(); -} - -QMetaDataControlMetaObject::~QMetaDataControlMetaObject() -{ - static_cast(m_object)->data()->metaObject = 0; - - qFree(m_data); - qFree(m_string); -} - -int QMetaDataControlMetaObject::metaCall(QMetaObject::Call c, int id, void **a) -{ - if (c == QMetaObject::ReadProperty && id >= m_propertyOffset) { - int propId = id - m_propertyOffset; - - *reinterpret_cast(a[0]) = m_control->metaData(qt_metaDataKeys[propId].key); - - return -1; - } else if (c == QMetaObject::WriteProperty && id >= m_propertyOffset) { - int propId = id - m_propertyOffset; - - m_control->setMetaData(qt_metaDataKeys[propId].key, *reinterpret_cast(a[0])); - - return -1; - } else { - return m_object->qt_metacall(c, id, a); - } -} - -int QMetaDataControlMetaObject::createProperty(const char *, const char *) -{ - return -1; -} - -void QMetaDataControlMetaObject::metaDataChanged() -{ - activate(m_object, m_signalOffset, 0); -} - -QT_END_NAMESPACE diff --git a/src/multimedia/qml/qmetadatacontrolmetaobject_p.h b/src/multimedia/qml/qmetadatacontrolmetaobject_p.h deleted file mode 100644 index ec4df05..0000000 --- a/src/multimedia/qml/qmetadatacontrolmetaobject_p.h +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QMETADATACONTROLMETAOBJECT_P_H -#define QMETADATACONTROLMETAOJBECT_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of other Qt classes. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include - -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QMetaDataControl; - -class QMetaDataControlMetaObject : public QAbstractDynamicMetaObject -{ -public: - QMetaDataControlMetaObject(QMetaDataControl *control, QObject *object); - ~QMetaDataControlMetaObject(); - - int metaCall(QMetaObject::Call call, int _id, void **arguments); - int createProperty(const char *, const char *); - - void metaDataChanged(); - -private: - QMetaDataControl *m_control; - QObject *m_object; - char *m_string; - uint *m_data; - - int m_propertyOffset; - int m_signalOffset; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif diff --git a/src/multimedia/qml/qml.pri b/src/multimedia/qml/qml.pri deleted file mode 100644 index d0ff71d..0000000 --- a/src/multimedia/qml/qml.pri +++ /dev/null @@ -1,37 +0,0 @@ - -contains(QT_CONFIG, declarative) { - QT += declarative - - system(pkg-config --exists \'libpulse >= 0.9.10\') { - DEFINES += QT_MULTIMEDIA_PULSEAUDIO - HEADERS += $$PWD/qsoundeffect_pulse_p.h - SOURCES += $$PWD/qsoundeffect_pulse_p.cpp - LIBS += -lpulse - } else:x11 { - DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER - HEADERS += $$PWD/qsoundeffect_qmedia_p.h - SOURCES += $$PWD/qsoundeffect_qmedia_p.cpp - } else { - HEADERS += $$PWD/qsoundeffect_qsound_p.h - SOURCES += $$PWD/qsoundeffect_qsound_p.cpp - } - - HEADERS += \ - $$PWD/multimediadeclarative.h \ - $$PWD/qmetadatacontrolmetaobject_p.h \ - $$PWD/qdeclarativeaudio_p.h \ - $$PWD/qdeclarativevideo_p.h \ - $$PWD/qdeclarativemediabase_p.h \ - $$PWD/qsoundeffect_p.h \ - $$PWD/wavedecoder_p.h - - SOURCES += \ - $$PWD/multimediadeclarative.cpp \ - $$PWD/qmetadatacontrolmetaobject.cpp \ - $$PWD/qdeclarativeaudio.cpp \ - $$PWD/qdeclarativevideo.cpp \ - $$PWD/qdeclarativemediabase.cpp \ - $$PWD/qsoundeffect.cpp \ - $$PWD/wavedecoder_p.cpp -} - diff --git a/src/multimedia/qml/qsoundeffect.cpp b/src/multimedia/qml/qsoundeffect.cpp deleted file mode 100644 index 541e6c9..0000000 --- a/src/multimedia/qml/qsoundeffect.cpp +++ /dev/null @@ -1,255 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qmediacontent.h" -#include "qmediaplayer.h" - -#include "qsoundeffect_p.h" - -#if defined(QT_MULTIMEDIA_PULSEAUDIO) -#include "qsoundeffect_pulse_p.h" -#elif(QT_MULTIMEDIA_QMEDIAPLAYER) -#include "qsoundeffect_qmedia_p.h" -#else -#include "qsoundeffect_qsound_p.h" -#endif - -QT_BEGIN_NAMESPACE - -/*! - \qmlclass SoundEffect QSoundEffect - \since 4.7 - \brief The SoundEffect element provides a way to play sound effects in qml. - - The following example plays a wav file on mouse click. - - \qml - SoundEffect { - id: playSound - source: "test.wav" - } - MouseRegion { - id: playArea - anchors.fill: parent - onPressed: { - playSound.play() - } - } - \endqml - - \sa SoundEffect -*/ - -/*! - \qmlproperty QUrl SoundEffect::source - - This property provides a way to control the sound to play. -*/ - -/*! - \qmlproperty int SoundEffect::loopCount - - This property provides a way to control the number of times to repeat the sound on each play(). -*/ - -/*! - \qmlproperty int SoundEffect::volume - - This property provides a way to control the volume for playback. -*/ - -/*! - \qmlproperty bool SoundEffect::muted - - This property provides a way to control muting. -*/ - -/*! - \qmlproperty int SoundEffect::duration - - This property holds the duration in milliseconds of the current source audio. -*/ - -/*! - \qmlsignal SoundEffect::sourceChanged() - - This handler is called when the source has changed. -*/ - -/*! - \qmlsignal SoundEffect::loopCountChanged() - - This handler is called when the number of loops has changes. -*/ - -/*! - \qmlsignal SoundEffect::volumeChanged() - - This handler is called when the volume has changed. -*/ - -/*! - \qmlsignal SoundEffect::mutedChanged() - - This handler is called when the mute state has changed. -*/ - -/*! - \qmlsignal SoundEffect::durationChanged() - - This handler is called when the duration has changed. -*/ - -QSoundEffect::QSoundEffect(QObject *parent) : - QObject(parent), - m_loopCount(1), - m_vol(100), - m_muted(false), - m_runningCount(0) -{ - d = new QSoundEffectPrivate(this); - connect(d, SIGNAL(volumeChanged(int)), SIGNAL(volumeChanged())); - connect(d, SIGNAL(mutedChanged(bool)), SIGNAL(mutedChanged())); - connect(d, SIGNAL(durationChanged(qint64)), SIGNAL(durationChanged())); - connect(d, SIGNAL(stateChanged(QMediaPlayer::State)), SLOT(repeat())); -} - -QSoundEffect::~QSoundEffect() -{ - delete d; -} - -QUrl QSoundEffect::source() const -{ - return d != 0 ? d->media().canonicalUrl() : QUrl(); -} - -void QSoundEffect::setSource(const QUrl &url) -{ - if (d != 0 && d->media().canonicalUrl() == url) - return; - - d->setVolume(m_vol); - d->setMuted(m_muted); - d->setMedia(url); - - if (url.isEmpty()) - return; - - emit sourceChanged(); -} - -int QSoundEffect::loopCount() const -{ - return m_loopCount; -} - -void QSoundEffect::setLoopCount(int loopCount) -{ - if (m_loopCount == loopCount) - return; - - m_loopCount = loopCount; - emit loopCountChanged(); -} - -int QSoundEffect::volume() const -{ - return d != 0 ? d->volume() : m_vol; -} - -void QSoundEffect::setVolume(int volume) -{ - if (m_vol == volume) - return; - - m_vol = volume; - if (d != 0) - d->setVolume(volume); - else - emit volumeChanged(); -} - -bool QSoundEffect::isMuted() const -{ - return d != 0 ? d->isMuted() : m_muted; -} - -void QSoundEffect::setMuted(bool muted) -{ - if (m_muted == muted) - return; - - m_muted = muted; - if (d != 0) - d->setMuted(muted); - else - emit mutedChanged(); -} - -int QSoundEffect::duration() const -{ - return d != 0 ? d->duration() : 0; -} - -void QSoundEffect::play() -{ - m_runningCount = 0; - - if (d != 0) - d->play(); -} - -void QSoundEffect::stop() -{ - if (d != 0) - d->stop(); -} - -void QSoundEffect::repeat() -{ - if (d->state() == QMediaPlayer::StoppedState) { - if (++m_runningCount < m_loopCount) - d->play(); - } -} - -QT_END_NAMESPACE diff --git a/src/multimedia/qml/qsoundeffect_p.h b/src/multimedia/qml/qsoundeffect_p.h deleted file mode 100644 index 51ebe52..0000000 --- a/src/multimedia/qml/qsoundeffect_p.h +++ /dev/null @@ -1,126 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSOUNDEFFECT_H -#define QSOUNDEFFECT_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - - -#include -#include -#include - - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QSoundEffectPrivate; -class Q_AUTOTEST_EXPORT QSoundEffect : public QObject -{ - Q_OBJECT - Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) - Q_PROPERTY(int loopCount READ loopCount WRITE setLoopCount NOTIFY loopCountChanged) - Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged) - Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged) - Q_PROPERTY(int duration READ duration NOTIFY durationChanged) - -public: - explicit QSoundEffect(QObject *parent = 0); - ~QSoundEffect(); - - QUrl source() const; - void setSource(const QUrl &url); - - int loopCount() const; - void setLoopCount(int loopCount); - - int volume() const; - void setVolume(int volume); - - bool isMuted() const; - void setMuted(bool muted); - - int duration() const; - -signals: - void sourceChanged(); - void loopCountChanged(); - void volumeChanged(); - void mutedChanged(); - void durationChanged(); - -public slots: - void play(); - void stop(); - -private slots: - void repeat(); - -private: - Q_DISABLE_COPY(QSoundEffect) - - int m_loopCount; - int m_vol; - bool m_muted; - int m_runningCount; - - QSoundEffectPrivate* d; -}; - -QT_END_NAMESPACE - -QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QSoundEffect)) - -QT_END_HEADER - - -#endif // QSOUNDEFFECT_H diff --git a/src/multimedia/qml/qsoundeffect_pulse_p.cpp b/src/multimedia/qml/qsoundeffect_pulse_p.cpp deleted file mode 100644 index 7e9a25c..0000000 --- a/src/multimedia/qml/qsoundeffect_pulse_p.cpp +++ /dev/null @@ -1,509 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include -#include - -#include "qmediacontent.h" -#include "qmediaplayer.h" -#include "qsoundeffect_p.h" - -#include "wavedecoder_p.h" - -#include "qsoundeffect_pulse_p.h" - -#if(Q_WS_MAEMO_5) -#include -#endif - -#include - -// Less than ideal -#define PA_SCACHE_ENTRY_SIZE_MAX (1024*1024*16) - -QT_BEGIN_NAMESPACE - -namespace -{ -inline pa_sample_spec audioFormatToSampleSpec(const QAudioFormat &format) -{ - pa_sample_spec spec; - - spec.rate = format.frequency(); - spec.channels = format.channels(); - - if (format.sampleSize() == 8) - spec.format = PA_SAMPLE_U8; - else if (format.sampleSize() == 16) { - switch (format.byteOrder()) { - case QAudioFormat::BigEndian: spec.format = PA_SAMPLE_S16BE; break; - case QAudioFormat::LittleEndian: spec.format = PA_SAMPLE_S16LE; break; - } - } - else if (format.sampleSize() == 32) { - switch (format.byteOrder()) { - case QAudioFormat::BigEndian: spec.format = PA_SAMPLE_S32BE; break; - case QAudioFormat::LittleEndian: spec.format = PA_SAMPLE_S32LE; break; - } - } - - return spec; -} - -class PulseDaemon -{ -public: - PulseDaemon():m_prepared(false) - { - prepare(); - } - - ~PulseDaemon() - { - if (m_prepared) - release(); - } - - inline void lock() - { - pa_threaded_mainloop_lock(m_mainLoop); - } - - inline void unlock() - { - pa_threaded_mainloop_unlock(m_mainLoop); - } - - inline pa_context *context() const - { - return m_context; - } - - int volume() - { - return m_vol; - } - -private: - void prepare() - { - m_vol = 100; - - m_mainLoop = pa_threaded_mainloop_new(); - if (m_mainLoop == 0) { - qWarning("PulseAudioService: unable to create pulseaudio mainloop"); - return; - } - - if (pa_threaded_mainloop_start(m_mainLoop) != 0) { - qWarning("PulseAudioService: unable to start pulseaudio mainloop"); - pa_threaded_mainloop_free(m_mainLoop); - return; - } - - m_mainLoopApi = pa_threaded_mainloop_get_api(m_mainLoop); - - lock(); - m_context = pa_context_new(m_mainLoopApi, QString(QLatin1String("QtPulseAudio:%1")).arg(::getpid()).toAscii().constData()); - -#if(Q_WS_MAEMO_5) - pa_context_set_state_callback(m_context, context_state_callback, this); -#endif - if (m_context == 0) { - qWarning("PulseAudioService: Unable to create new pulseaudio context"); - pa_threaded_mainloop_free(m_mainLoop); - return; - } - - if (pa_context_connect(m_context, NULL, (pa_context_flags_t)0, NULL) < 0) { - qWarning("PulseAudioService: pa_context_connect() failed"); - pa_context_unref(m_context); - pa_threaded_mainloop_free(m_mainLoop); - return; - } - unlock(); - - m_prepared = true; - } - - void release() - { - if (!m_prepared) return; - pa_threaded_mainloop_stop(m_mainLoop); - pa_threaded_mainloop_free(m_mainLoop); - m_prepared = false; - } - -#if(Q_WS_MAEMO_5) - static void context_state_callback(pa_context *c, void *userdata) - { - PulseDaemon *self = reinterpret_cast(userdata); - switch (pa_context_get_state(c)) { - case PA_CONTEXT_CONNECTING: - case PA_CONTEXT_AUTHORIZING: - case PA_CONTEXT_SETTING_NAME: - break; - case PA_CONTEXT_READY: - pa_ext_stream_restore_set_subscribe_cb(c, &stream_restore_monitor_callback, self); - pa_ext_stream_restore_subscribe(c, 1, NULL, self); - break; - default: - break; - } - } - static void stream_restore_monitor_callback(pa_context *c, void *userdata) - { - PulseDaemon *self = reinterpret_cast(userdata); - pa_ext_stream_restore2_read(c, &stream_restore_info_callback, self); - } - static void stream_restore_info_callback(pa_context *c, const pa_ext_stream_restore2_info *info, - int eol, void *userdata) - { - Q_UNUSED(c) - - PulseDaemon *self = reinterpret_cast(userdata); - - if (!eol) { - if (QString(info->name).startsWith(QLatin1String("sink-input-by-media-role:x-maemo"))) { - const unsigned str_length = 256; - char str[str_length]; - pa_cvolume_snprint(str, str_length, &info->volume); - self->m_vol = QString(str).replace(" ","").replace("%","").mid(2).toInt(); - } - } - } -#endif - - int m_vol; - bool m_prepared; - pa_context *m_context; - pa_threaded_mainloop *m_mainLoop; - pa_mainloop_api *m_mainLoopApi; -}; -} - -Q_GLOBAL_STATIC(PulseDaemon, daemon) - - -QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): - QObject(parent), - m_muted(false), - m_playQueued(false), - m_vol(100), - m_duration(0), - m_dataUploaded(0), - m_state(QMediaPlayer::StoppedState), - m_status(QMediaPlayer::NoMedia), - m_reply(0), - m_stream(0), - m_networkAccessManager(0) -{ -} - -QSoundEffectPrivate::~QSoundEffectPrivate() -{ - delete m_reply; - unloadSample(); -} - -qint64 QSoundEffectPrivate::duration() const -{ - return m_duration; -} - -int QSoundEffectPrivate::volume() const -{ - return m_vol; -} - -bool QSoundEffectPrivate::isMuted() const -{ - return m_muted; -} - -QMediaContent QSoundEffectPrivate::media() const -{ - return m_media; -} - -QMediaPlayer::State QSoundEffectPrivate::state() const -{ - return m_state; -} - -QMediaPlayer::MediaStatus QSoundEffectPrivate::mediaStatus() const -{ - return m_status; -} - -void QSoundEffectPrivate::play() -{ - if (m_status == QMediaPlayer::LoadingMedia) { - m_playQueued = true; - return; - } - - if (m_status != QMediaPlayer::BufferedMedia || - m_state == QMediaPlayer::PlayingState) - return; - - pa_volume_t m_vol = PA_VOLUME_NORM; - - daemon()->lock(); -#if(Q_WS_MAEMO_5) - m_vol = PA_VOLUME_NORM/100*((daemon()->volume()+m_vol)/2); -#endif - pa_operation_unref( - pa_context_play_sample(daemon()->context(), - m_name.constData(), - 0, - m_vol, - play_callback, - this) - ); - daemon()->unlock(); - - m_playbackTime.start(); - - emit stateChanged(m_state = QMediaPlayer::PlayingState); -} - -void QSoundEffectPrivate::stop() -{ - emit stateChanged(m_state = QMediaPlayer::StoppedState); -} - -void QSoundEffectPrivate::setVolume(int volume) -{ - m_vol = volume; -} - -void QSoundEffectPrivate::setMuted(bool muted) -{ - m_muted = muted; -} - -void QSoundEffectPrivate::setMedia(const QMediaContent &media) -{ - if (media.isNull()) { - m_media = QMediaContent(); - unloadSample(); - return; - } - if (m_media == media) - return; - m_media = media; - - if (m_networkAccessManager == 0) - m_networkAccessManager = new QNetworkAccessManager(this); - - m_stream = m_networkAccessManager->get(QNetworkRequest(m_media.canonicalUrl())); - - unloadSample(); - loadSample(); - - emit mediaChanged(m_media); -} - -void QSoundEffectPrivate::decoderReady() -{ - if (m_waveDecoder->size() >= PA_SCACHE_ENTRY_SIZE_MAX) { - m_status = QMediaPlayer::InvalidMedia; - emit mediaStatusChanged(m_status); - qWarning("QtPulseAudio: attempting to load to large a sample"); - return; - } - - if (m_name.isNull()) - m_name = QString(QLatin1String("QtPulseSample-%1-%2")).arg(::getpid()).arg(quintptr(this)).toUtf8(); - - pa_sample_spec spec = audioFormatToSampleSpec(m_waveDecoder->audioFormat()); - - daemon()->lock(); - pa_stream *stream = pa_stream_new(daemon()->context(), m_name.constData(), &spec, 0); - pa_stream_set_state_callback(stream, stream_state_callback, this); - pa_stream_set_write_callback(stream, stream_write_callback, this); - pa_stream_connect_upload(stream, (size_t)m_waveDecoder->size()); - daemon()->unlock(); -} - -void QSoundEffectPrivate::decoderError() -{ - emit mediaStatusChanged(m_status = QMediaPlayer::InvalidMedia); -} - -void QSoundEffectPrivate::checkPlayTime() -{ - int elapsed = m_playbackTime.elapsed(); - - if (elapsed >= m_duration) { - m_state = QMediaPlayer::StoppedState; - emit stateChanged(m_state); - } - else - startTimer(m_duration - elapsed); -} - -void QSoundEffectPrivate::loadSample() -{ - m_waveDecoder = new WaveDecoder(m_stream); - connect(m_waveDecoder, SIGNAL(formatKnown()), SLOT(decoderReady())); - connect(m_waveDecoder, SIGNAL(invalidFormat()), SLOT(decoderError())); - - m_status = QMediaPlayer::LoadingMedia; - emit mediaStatusChanged(m_status); -} - -void QSoundEffectPrivate::unloadSample() -{ - if (m_status != QMediaPlayer::BufferedMedia) - return; - - m_status = QMediaPlayer::NoMedia; - - daemon()->lock(); - pa_context_remove_sample(daemon()->context(), m_name.constData(), NULL, NULL); - daemon()->unlock(); - - m_duration = 0; - m_dataUploaded = 0; -} - -void QSoundEffectPrivate::timerEvent(QTimerEvent *event) -{ - if (m_state == QMediaPlayer::PlayingState) { - m_state = QMediaPlayer::StoppedState; - emit stateChanged(m_state); - } - - killTimer(event->timerId()); -} - -void QSoundEffectPrivate::stream_write_callback(pa_stream *s, size_t length, void *userdata) -{ - Q_UNUSED(length); - - QSoundEffectPrivate *self = reinterpret_cast(userdata); - - size_t bufferSize = qMin(pa_stream_writable_size(s), - size_t(self->m_waveDecoder->bytesAvailable())); - char buffer[bufferSize]; - - size_t len = 0; - while (len < length) { - qint64 read = self->m_waveDecoder->read(buffer, qMin(bufferSize, length -len)); - if (read > 0) { - if (pa_stream_write(s, buffer, size_t(read), 0, 0, PA_SEEK_RELATIVE) == 0) - len += size_t(read); - else - break; - } - } - self->m_dataUploaded += len; - - if (self->m_waveDecoder->size() == self->m_dataUploaded) { - pa_stream_finish_upload(s); - - self->m_duration = self->m_waveDecoder->duration(); - emit self->durationChanged(self->m_duration); - - self->m_status = QMediaPlayer::BufferedMedia; - emit self->mediaStatusChanged(self->m_status); - - self->m_waveDecoder->deleteLater(); - if (!self->m_media.isNull()) - self->m_stream->deleteLater(); - - if (self->m_playQueued) { - self->m_playQueued = false; - QMetaObject::invokeMethod(self, "play"); - } - } -} - -void QSoundEffectPrivate::stream_state_callback(pa_stream *s, void *userdata) -{ - QSoundEffectPrivate *self = reinterpret_cast(userdata); - - switch (pa_stream_get_state(s)) { - case PA_STREAM_CREATING: - case PA_STREAM_READY: - case PA_STREAM_TERMINATED: - break; - - case PA_STREAM_FAILED: - default: - self->m_status = QMediaPlayer::InvalidMedia; - emit self->mediaStatusChanged(self->m_status); - break; - } -} - -void QSoundEffectPrivate::play_callback(pa_context *c, int success, void *userdata) -{ - Q_UNUSED(c); - - QSoundEffectPrivate *self = reinterpret_cast(userdata); - - if (success == 1) - QMetaObject::invokeMethod(self, "checkPlayTime", Qt::QueuedConnection); - else { - self->m_state = QMediaPlayer::StoppedState; - emit self->stateChanged(self->m_state); - } -} - -QT_END_NAMESPACE - - diff --git a/src/multimedia/qml/qsoundeffect_pulse_p.h b/src/multimedia/qml/qsoundeffect_pulse_p.h deleted file mode 100644 index 247f8a3..0000000 --- a/src/multimedia/qml/qsoundeffect_pulse_p.h +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSOUNDEFFECT_PULSE_H -#define QSOUNDEFFECT_PULSE_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - - -#include "qsoundeffect_p.h" - -#include -#include -#include -#include - - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QNetworkReply; -class QNetworkAccessManager; -class WaveDecoder; - -class QSoundEffectPrivate : public QObject -{ - Q_OBJECT -public: - explicit QSoundEffectPrivate(QObject* parent); - ~QSoundEffectPrivate(); - - qint64 duration() const; - int volume() const; - bool isMuted() const; - QMediaContent media() const; - QMediaPlayer::State state() const; - QMediaPlayer::MediaStatus mediaStatus() const; - -public Q_SLOTS: - void play(); - void stop(); - void setVolume(int volume); - void setMuted(bool muted); - void setMedia(const QMediaContent &media); - -Q_SIGNALS: - void mediaChanged(const QMediaContent &media); - void mediaStatusChanged(QMediaPlayer::MediaStatus status); - void stateChanged(QMediaPlayer::State newState); - void durationChanged(qint64 duration); - void volumeChanged(int volume); - void mutedChanged(bool muted); - void error(QMediaPlayer::Error error); - -private slots: - void decoderReady(); - void decoderError(); - void checkPlayTime(); - -private: - void loadSample(); - void unloadSample(); - - void timerEvent(QTimerEvent *event); - - static void stream_write_callback(pa_stream *s, size_t length, void *userdata); - static void stream_state_callback(pa_stream *s, void *userdata); - static void play_callback(pa_context *c, int success, void *userdata); - - bool m_muted; - bool m_playQueued; - int m_vol; - int m_duration; - int m_dataUploaded; - QTime m_playbackTime; - QMediaPlayer::State m_state; - QMediaPlayer::MediaStatus m_status; - QByteArray m_name; - QMediaContent m_media; - QNetworkReply *m_reply; - WaveDecoder *m_waveDecoder; - QIODevice *m_stream; - QNetworkAccessManager *m_networkAccessManager; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QSOUNDEFFECT_PULSE_H diff --git a/src/multimedia/qml/qsoundeffect_qmedia_p.cpp b/src/multimedia/qml/qsoundeffect_qmedia_p.cpp deleted file mode 100644 index 48fb257..0000000 --- a/src/multimedia/qml/qsoundeffect_qmedia_p.cpp +++ /dev/null @@ -1,167 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include "qmediacontent.h" -#include "qmediaplayer.h" - -#include "qsoundeffect_p.h" -#include "qsoundeffect_qmedia_p.h" - - -QT_BEGIN_NAMESPACE - -QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): - QObject(parent), - m_muted(false), - m_vol(100), - m_player(0) -{ -} - -QSoundEffectPrivate::~QSoundEffectPrivate() -{ - if (m_player) delete m_player; -} - -qint64 QSoundEffectPrivate::duration() const -{ - if (m_player) return m_player->duration(); - - return 0; -} - -int QSoundEffectPrivate::volume() const -{ - if (m_player) return m_player->volume(); - - return m_vol; -} - -bool QSoundEffectPrivate::isMuted() const -{ - if (m_player) return m_player->isMuted(); - - return m_muted; -} - -QMediaContent QSoundEffectPrivate::media() const -{ - if (m_player) return m_player->media(); - - return QMediaContent(); -} - -QMediaPlayer::State QSoundEffectPrivate::state() const -{ - if (m_player) return m_player->state(); - - return QMediaPlayer::StoppedState; -} - -QMediaPlayer::MediaStatus QSoundEffectPrivate::mediaStatus() const -{ - if (m_player) return m_player->mediaStatus(); - - return QMediaPlayer::UnknownMediaStatus; -} - -void QSoundEffectPrivate::play() -{ - if (m_player && !m_player->isMuted()) - m_player->play(); -} - -void QSoundEffectPrivate::stop() -{ - if (m_player) - m_player->stop(); -} - -void QSoundEffectPrivate::setVolume(int volume) -{ - m_vol = volume; - - if (m_player) - m_player->setVolume(volume); -} - -void QSoundEffectPrivate::setMuted(bool muted) -{ - m_muted = muted; - - if (m_player) - m_player->setMuted(muted); -} - -void QSoundEffectPrivate::setMedia(const QMediaContent &media) -{ - if (media.isNull()) - return; - - if (m_player == 0) { - m_player = new QMediaPlayer(this, QMediaPlayer::LowLatency); - m_player->setVolume(m_vol); - m_player->setMuted(m_muted); - - connect(m_player, SIGNAL(volumeChanged(int)), SIGNAL(volumeChanged(int))); - connect(m_player, SIGNAL(mutedChanged(bool)), SIGNAL(mutedChanged(bool))); - connect(m_player, SIGNAL(durationChanged(qint64)), SIGNAL(durationChanged(qint64))); - connect(m_player, SIGNAL(stateChanged(QMediaPlayer::State)), SIGNAL(stateChanged(QMediaPlayer::State))); - } - - m_player->setMedia(media.canonicalUrl()); -} - -QT_END_NAMESPACE - diff --git a/src/multimedia/qml/qsoundeffect_qmedia_p.h b/src/multimedia/qml/qsoundeffect_qmedia_p.h deleted file mode 100644 index 8267f79..0000000 --- a/src/multimedia/qml/qsoundeffect_qmedia_p.h +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSOUNDEFFECT_QMEDIA_H -#define QSOUNDEFFECT_QMEDIA_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - - -#include -#include -#include -#include "qsoundeffect_p.h" - - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class WaveDecoder; - -class QSoundEffectPrivate : public QObject -{ - Q_OBJECT -public: - explicit QSoundEffectPrivate(QObject* parent); - ~QSoundEffectPrivate(); - - qint64 duration() const; - int volume() const; - bool isMuted() const; - QMediaContent media() const; - QMediaPlayer::State state() const; - QMediaPlayer::MediaStatus mediaStatus() const; - -public Q_SLOTS: - void play(); - void stop(); - void setVolume(int volume); - void setMuted(bool muted); - void setMedia(const QMediaContent &media); - -Q_SIGNALS: - void mediaChanged(const QMediaContent &media); - void mediaStatusChanged(QMediaPlayer::MediaStatus status); - void stateChanged(QMediaPlayer::State newState); - void durationChanged(qint64 duration); - void volumeChanged(int volume); - void mutedChanged(bool muted); - void error(QMediaPlayer::Error error); - -private: - bool m_muted; - int m_vol; - QMediaPlayer *m_player; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QSOUNDEFFECT_QMEDIA_H diff --git a/src/multimedia/qml/qsoundeffect_qsound_p.cpp b/src/multimedia/qml/qsoundeffect_qsound_p.cpp deleted file mode 100644 index df160a9..0000000 --- a/src/multimedia/qml/qsoundeffect_qsound_p.cpp +++ /dev/null @@ -1,225 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include -#include -#include -#include -#include - -#include "qmediacontent.h" -#include "qmediaplayer.h" -#include "qsoundeffect_p.h" - -#include "wavedecoder_p.h" - -#include "qsoundeffect_qsound_p.h" - -QT_BEGIN_NAMESPACE - -QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): - QObject(parent), - m_queued(false), - m_muted(false), - m_state(QMediaPlayer::StoppedState), - m_status(QMediaPlayer::NoMedia), - m_file(0), - m_sound(0) -{ - m_timer = new QTimer(this); - connect(m_timer,SIGNAL(timeout()),SLOT(checkPlayTime())); - m_media = QMediaContent(); -} - -QSoundEffectPrivate::~QSoundEffectPrivate() -{ - if (m_sound) delete m_sound; - if (m_waveDecoder) delete m_waveDecoder; - m_file->close(); -} - -qint64 QSoundEffectPrivate::duration() const -{ - if (m_waveDecoder) - return m_waveDecoder->size(); - - return 0; -} - -int QSoundEffectPrivate::volume() const -{ - return 100; -} - -bool QSoundEffectPrivate::isMuted() const -{ - return m_muted; -} - -QMediaContent QSoundEffectPrivate::media() const -{ - return m_media; -} - -QMediaPlayer::State QSoundEffectPrivate::state() const -{ - return m_state; -} - -QMediaPlayer::MediaStatus QSoundEffectPrivate::mediaStatus() const -{ - return m_status; -} - -void QSoundEffectPrivate::play() -{ - if (m_sound && !m_muted) { - m_queued = false; - m_timer->start(20); - m_playbackTime.start(); - m_sound->play(); - emit stateChanged(m_state = QMediaPlayer::PlayingState); - } else if (m_status == QMediaPlayer::LoadingMedia) - m_queued = true; -} - -void QSoundEffectPrivate::stop() -{ - m_timer->stop(); - - if (m_sound) { - m_sound->stop(); - emit stateChanged(m_state = QMediaPlayer::StoppedState); - } -} - -void QSoundEffectPrivate::setVolume(int volume) -{ - Q_UNUSED(volume) -} - -void QSoundEffectPrivate::setMuted(bool muted) -{ - m_muted = muted; -} - -void QSoundEffectPrivate::setMedia(const QMediaContent &media) -{ - m_queued = false; - - if (media.isNull() || media.canonicalUrl().scheme() != QLatin1String("file")) { - m_media = QMediaContent(); - return; - } - if (m_media == media) - return; - - m_media = media; - m_file = new QFile(m_media.canonicalUrl().toLocalFile()); - m_file->open(QIODevice::ReadOnly|QIODevice::Unbuffered); - - unloadSample(); - loadSample(); - - emit mediaChanged(m_media); -} - -void QSoundEffectPrivate::decoderReady() -{ - m_file->close(); - m_sound = new QSound(m_media.canonicalUrl().toLocalFile()); - emit mediaStatusChanged(m_status = QMediaPlayer::LoadedMedia); - - if (m_queued) - play(); -} - -void QSoundEffectPrivate::decoderError() -{ - m_file->close(); - emit mediaStatusChanged(m_status = QMediaPlayer::InvalidMedia); -} - -void QSoundEffectPrivate::checkPlayTime() -{ - if (m_sound->isFinished()) { - m_timer->stop(); - m_state = QMediaPlayer::StoppedState; - emit stateChanged(m_state); - } -} - -void QSoundEffectPrivate::loadSample() -{ - m_waveDecoder = new WaveDecoder(m_file); - connect(m_waveDecoder, SIGNAL(formatKnown()), SLOT(decoderReady())); - connect(m_waveDecoder, SIGNAL(invalidFormat()), SLOT(decoderError())); - - m_status = QMediaPlayer::LoadingMedia; - emit mediaStatusChanged(m_status); -} - -void QSoundEffectPrivate::unloadSample() -{ - if (m_sound == 0) - return; - - m_status = QMediaPlayer::NoMedia; - - if (m_sound) - delete m_sound; - - m_sound = 0; -} - -QT_END_NAMESPACE diff --git a/src/multimedia/qml/qsoundeffect_qsound_p.h b/src/multimedia/qml/qsoundeffect_qsound_p.h deleted file mode 100644 index 45c0888..0000000 --- a/src/multimedia/qml/qsoundeffect_qsound_p.h +++ /dev/null @@ -1,129 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSOUNDEFFECT_QSOUND_H -#define QSOUNDEFFECT_QSOUND_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - - -#include -#include -#include - -#include "qsoundeffect_p.h" - - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -class QTimer; -class QSound; -class QFile; -class WaveDecoder; - -class QSoundEffectPrivate : public QObject -{ - Q_OBJECT -public: - explicit QSoundEffectPrivate(QObject* parent); - ~QSoundEffectPrivate(); - - qint64 duration() const; - int volume() const; - bool isMuted() const; - QMediaContent media() const; - QMediaPlayer::State state() const; - QMediaPlayer::MediaStatus mediaStatus() const; - -public Q_SLOTS: - void play(); - void stop(); - void setVolume(int volume); - void setMuted(bool muted); - void setMedia(const QMediaContent &media); - -Q_SIGNALS: - void mediaChanged(const QMediaContent &media); - void mediaStatusChanged(QMediaPlayer::MediaStatus status); - void stateChanged(QMediaPlayer::State newState); - void durationChanged(qint64 duration); - void volumeChanged(int volume); - void mutedChanged(bool muted); - void error(QMediaPlayer::Error error); - -private slots: - void decoderReady(); - void decoderError(); - void checkPlayTime(); - -private: - void loadSample(); - void unloadSample(); - - bool m_queued; - bool m_muted; - QTime m_playbackTime; - QMediaPlayer::State m_state; - QMediaPlayer::MediaStatus m_status; - QFile *m_file; - QByteArray m_name; - QMediaContent m_media; - WaveDecoder *m_waveDecoder; - QSound *m_sound; - QTimer *m_timer; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QSOUNDEFFECT_QSOUND_H diff --git a/src/multimedia/qml/wavedecoder_p.cpp b/src/multimedia/qml/wavedecoder_p.cpp deleted file mode 100644 index f2277ae..0000000 --- a/src/multimedia/qml/wavedecoder_p.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "wavedecoder_p.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -WaveDecoder::WaveDecoder(QIODevice *s, QObject *parent): - QIODevice(parent), - haveFormat(false), - dataSize(0), - remaining(0), - source(s) -{ - open(QIODevice::ReadOnly | QIODevice::Unbuffered); - - if (source->bytesAvailable() >= sizeof(CombinedHeader)) - QTimer::singleShot(0, this, SLOT(handleData())); - else - connect(source, SIGNAL(readyRead()), SLOT(handleData())); -} - -WaveDecoder::~WaveDecoder() -{ -} - -QAudioFormat WaveDecoder::audioFormat() const -{ - return format; -} - -int WaveDecoder::duration() const -{ - return size() * 1000 / (format.sampleSize() / 8) / format.channels() / format.frequency(); -} - -qint64 WaveDecoder::size() const -{ - return haveFormat ? dataSize : 0; -} - -bool WaveDecoder::isSequential() const -{ - return source->isSequential(); -} - -qint64 WaveDecoder::bytesAvailable() const -{ - return haveFormat ? source->bytesAvailable() : 0; -} - -qint64 WaveDecoder::readData(char *data, qint64 maxlen) -{ - return haveFormat ? source->read(data, maxlen) : 0; -} - -qint64 WaveDecoder::writeData(const char *data, qint64 len) -{ - Q_UNUSED(data); - Q_UNUSED(len); - - return -1; -} - -void WaveDecoder::handleData() -{ - if (source->bytesAvailable() < sizeof(CombinedHeader)) - return; - - source->disconnect(SIGNAL(readyRead()), this, SLOT(handleData())); - source->read((char*)&header, sizeof(CombinedHeader)); - - if (qstrncmp(header.riff.descriptor.id, "RIFF", 4) != 0 || - qstrncmp(header.riff.type, "WAVE", 4) != 0 || - qstrncmp(header.wave.descriptor.id, "fmt ", 4) != 0 || - (header.wave.audioFormat != 0 && header.wave.audioFormat != 1) || - qstrncmp(header.data.descriptor.id, "data", 4) != 0) { - - emit invalidFormat(); - } - else { - int bps = qFromLittleEndian(header.wave.bitsPerSample); - - format.setCodec(QLatin1String("audio/pcm")); - format.setSampleType(bps == 8 ? QAudioFormat::UnSignedInt : QAudioFormat::SignedInt); - format.setByteOrder(QAudioFormat::LittleEndian); - format.setFrequency(qFromLittleEndian(header.wave.sampleRate)); - format.setSampleSize(bps); - format.setChannels(qFromLittleEndian(header.wave.numChannels)); - - dataSize = qFromLittleEndian(header.data.descriptor.size); - - haveFormat = true; - connect(source, SIGNAL(readyRead()), SIGNAL(readyRead())); - emit formatKnown(); - } -} - -QT_END_NAMESPACE diff --git a/src/multimedia/qml/wavedecoder_p.h b/src/multimedia/qml/wavedecoder_p.h deleted file mode 100644 index 00aa14e..0000000 --- a/src/multimedia/qml/wavedecoder_p.h +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef WAVEDECODER_H -#define WAVEDECODER_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of other Qt classes. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include -#include - - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - - -class WaveDecoder : public QIODevice -{ - Q_OBJECT - -public: - explicit WaveDecoder(QIODevice *source, QObject *parent = 0); - ~WaveDecoder(); - - QAudioFormat audioFormat() const; - int duration() const; - - qint64 size() const; - bool isSequential() const; - qint64 bytesAvailable() const; - -signals: - void formatKnown(); - void invalidFormat(); - -private slots: - void handleData(); - -private: - qint64 readData(char *data, qint64 maxlen); - qint64 writeData(const char *data, qint64 len); - - struct chunk - { - char id[4]; - quint32 size; - }; - struct RIFFHeader - { - chunk descriptor; - char type[4]; - }; - struct WAVEHeader - { - chunk descriptor; - quint16 audioFormat; - quint16 numChannels; - quint32 sampleRate; - quint32 byteRate; - quint16 blockAlign; - quint16 bitsPerSample; - }; - struct DATAHeader - { - chunk descriptor; - }; - struct CombinedHeader - { - RIFFHeader riff; - WAVEHeader wave; - DATAHeader data; - }; - - bool haveFormat; - qint64 dataSize; - qint64 remaining; - QAudioFormat format; - QIODevice *source; - CombinedHeader header; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // WAVEDECODER_H diff --git a/src/plugins/qdeclarativemodules/multimedia/multimedia.cpp b/src/plugins/qdeclarativemodules/multimedia/multimedia.cpp index 8becbf3..e03d8f3 100644 --- a/src/plugins/qdeclarativemodules/multimedia/multimedia.cpp +++ b/src/plugins/qdeclarativemodules/multimedia/multimedia.cpp @@ -41,17 +41,28 @@ #include #include -#include +#include + +#include "qdeclarativevideo_p.h" +#include "qdeclarativeaudio_p.h" + + QT_BEGIN_NAMESPACE -class QMultimediaQmlModule : public QDeclarativeExtensionPlugin +QML_DECLARE_TYPE(QSoundEffect) + +class QMultimediaDeclarativeModule : public QDeclarativeExtensionPlugin { Q_OBJECT public: virtual void registerTypes(const char *uri) { - QtMultimedia::qRegisterDeclarativeElements(uri); + Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.multimedia")); + + qmlRegisterType(uri, 4, 7, "SoundEffect"); + qmlRegisterType(uri, 4, 7, "Audio"); + qmlRegisterType(uri, 4, 7, "Video"); } }; @@ -59,5 +70,5 @@ QT_END_NAMESPACE #include "multimedia.moc" -Q_EXPORT_PLUGIN2(qmultimediaqmlmodule, QT_PREPEND_NAMESPACE(QMultimediaQmlModule)); +Q_EXPORT_PLUGIN2(qmultimediadeclarativemodule, QT_PREPEND_NAMESPACE(QMultimediaDeclarativeModule)); diff --git a/src/plugins/qdeclarativemodules/multimedia/multimedia.pro b/src/plugins/qdeclarativemodules/multimedia/multimedia.pro index d8ad18e..7b63e7c 100644 --- a/src/plugins/qdeclarativemodules/multimedia/multimedia.pro +++ b/src/plugins/qdeclarativemodules/multimedia/multimedia.pro @@ -3,7 +3,18 @@ include(../../qpluginbase.pri) QT += multimedia declarative -SOURCES += multimedia.cpp +HEADERS += \ + qdeclarativeaudio_p.h \ + qdeclarativemediabase_p.h \ + qdeclarativevideo_p.h \ + qmetadatacontrolmetaobject_p.h \ + +SOURCES += \ + multimedia.cpp \ + qdeclarativeaudio.cpp \ + qdeclarativemediabase.cpp \ + qdeclarativevideo.cpp \ + qmetadatacontrolmetaobject.cpp QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/Qt/multimedia target.path = $$[QT_INSTALL_IMPORTS]/Qt/multimedia diff --git a/src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio.cpp b/src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio.cpp new file mode 100644 index 0000000..df2888c --- /dev/null +++ b/src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio.cpp @@ -0,0 +1,327 @@ +/**************************************************************************** +** +** 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 plugins 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdeclarativeaudio_p.h" + +#include + +QT_BEGIN_NAMESPACE + + +/*! + \qmlclass Audio QDeclarativeAudio + \since 4.7 + \brief The Audio element allows you to add audio playback to a scene. + + \qml + Audio { source: "audio/song.mp3" } + \endqml + + \sa Video +*/ + +/*! + \internal + \class QDeclarativeAudio + \brief The QDeclarativeAudio class provides an audio item that you can add to a QDeclarativeView. +*/ + +void QDeclarativeAudio::_q_error(int errorCode, const QString &errorString) +{ + m_error = QMediaPlayer::Error(errorCode); + m_errorString = errorString; + + emit error(Error(errorCode), errorString); + emit errorChanged(); +} + + +QDeclarativeAudio::QDeclarativeAudio(QObject *parent) + : QObject(parent) +{ + setObject(this); +} + +QDeclarativeAudio::~QDeclarativeAudio() +{ + shutdown(); +} + +/*! + \qmlmethod Audio::play() + + Starts playback of the media. + + Sets the \l playing property to true, and the \l paused property to false. +*/ + +void QDeclarativeAudio::play() +{ + m_playerControl->play(); + + if (m_paused) { + m_paused = false; + emit pausedChanged(); + } +} + +/*! + \qmlmethod Audio::pause() + + Pauses playback of the media. + + Sets the \l playing and \l paused properties to true. +*/ + +void QDeclarativeAudio::pause() +{ + m_playerControl->pause(); + + if (!m_paused && m_state == QMediaPlayer::PausedState) { + m_paused = true; + emit pausedChanged(); + } +} + +/*! + \qmlmethod Audio::stop() + + Stops playback of the media. + + Sets the \l playing and \l paused properties to false. +*/ + +void QDeclarativeAudio::stop() +{ + m_playerControl->stop(); + + if (m_paused) { + m_paused = false; + emit pausedChanged(); + } +} + +/*! + \qmlproperty url Audio::source + + This property holds the source URL of the media. +*/ + +/*! + \qmlproperty bool Audio::playing + + This property holds whether the media is playing. + + Defaults to false, and can be set to true to start playback. +*/ + +/*! + \qmlproperty bool Audio::paused + + This property holds whether the media is paused. + + Defaults to false, and can be set to true to pause playback. +*/ + +/*! + \qmlsignal Audio::onStarted() + + This handler is called when playback is started. +*/ + +/*! + \qmlsignal Audio::onResumed() + + This handler is called when playback is resumed from the paused state. +*/ + +/*! + \qmlsignal Audio::onPaused() + + This handler is called when playback is paused. +*/ + +/*! + \qmlsignal Audio::onStopped() + + This handler is called when playback is stopped. +*/ + +/*! + \qmlproperty enum Audio::status + + This property holds the status of media loading. It can be one of: + + \list + \o NoMedia - no media has been set. + \o Loading - the media is currently being loaded. + \o Loaded - the media has been loaded. + \o Buffering - the media is buffering data. + \o Stalled - playback has been interrupted while the media is buffering data. + \o Buffered - the media has buffered data. + \o EndOfMedia - the media has played to the end. + \o InvalidMedia - the media cannot be played. + \o UnknownStatus - the status of the media is unknown. + \endlist +*/ + +QDeclarativeAudio::Status QDeclarativeAudio::status() const +{ + return Status(m_status); +} + +/*! + \qmlsignal Audio::onLoaded() + + This handler is called when the media source has been loaded. +*/ + +/*! + \qmlsignal Audio::onBuffering() + + This handler is called when the media starts buffering. +*/ + +/*! + \qmlsignal Audio::onStalled() + + This handler is called when playback has stalled while the media buffers. +*/ + +/*! + \qmlsignal Audio::onBuffered() + + This handler is called when the media has finished buffering. +*/ + +/*! + \qmlsignal Audio::onEndOfMedia() + + This handler is called when playback stops because end of the media has been reached. +*/ +/*! + \qmlproperty int Audio::duration + + This property holds the duration of the media in milliseconds. + + If the media doesn't have a fixed duration (a live stream for example) this will be 0. +*/ + +/*! + \qmlproperty int Audio::position + + This property holds the current playback position in milliseconds. + + If the \l seekable property is true, this property can be set to seek to a new position. +*/ + +/*! + \qmlproperty qreal Audio::volume + + This property holds the volume of the audio output, from 0.0 (silent) to 1.0 (maximum volume). +*/ + +/*! + \qmlproperty bool Audio::muted + + This property holds whether the audio output is muted. +*/ + +/*! + \qmlproperty qreal Audio::bufferProgress + + This property holds how much of the data buffer is currently filled, from 0.0 (empty) to 1.0 + (full). +*/ + +/*! + \qmlproperty bool Audio::seekable + + This property holds whether position of the audio can be changed. + + If true; setting a \l position value will cause playback to seek to the new position. +*/ + +/*! + \qmlproperty qreal Audio::playbackRate + + This property holds the rate at which audio is played at as a multiple of the normal rate. +*/ + +/*! + \qmlproperty enum Audio::error + + This property holds the error state of the audio. It can be one of: + + \list + \o NoError - there is no current error. + \o ResourceError - the audio cannot be played due to a problem allocating resources. + \o FormatError - the audio format is not supported. + \o NetworkError - the audio cannot be played due to network issues. + \o AccessDenied - the audio cannot be played due to insufficient permissions. + \o ServiceMissing - the audio cannot be played because the media service could not be + instantiated. + \endlist +*/ + +QDeclarativeAudio::Error QDeclarativeAudio::error() const +{ + return Error(m_error); +} + +/*! + \qmlproperty string Audio::errorString + + This property holds a string describing the current error condition in more detail. +*/ + +/*! + \qmlsignal Audio::onError(error, errorString) + + This handler is called when an \l {Error}{error} has occurred. The errorString parameter + may contain more detailed information about the error. +*/ + +QT_END_NAMESPACE + +#include "moc_qdeclarativeaudio_p.cpp" + + diff --git a/src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio_p.h b/src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio_p.h new file mode 100644 index 0000000..9881dbc --- /dev/null +++ b/src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio_p.h @@ -0,0 +1,173 @@ +/**************************************************************************** +** +** 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 plugins 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEAUDIO_P_H +#define QDECLARATIVEAUDIO_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qdeclarativemediabase_p.h" + +#include +#include + + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QTimerEvent; + +class QDeclarativeAudio : public QObject, public QDeclarativeMediaBase, public QDeclarativeParserStatus +{ + Q_OBJECT + Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) + Q_PROPERTY(bool playing READ isPlaying WRITE setPlaying NOTIFY playingChanged) + Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged) + Q_PROPERTY(Status status READ status NOTIFY statusChanged) + Q_PROPERTY(int duration READ duration NOTIFY durationChanged) + Q_PROPERTY(int position READ position WRITE setPosition NOTIFY positionChanged) + Q_PROPERTY(qreal volume READ volume WRITE setVolume NOTIFY volumeChanged) + Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged) + Q_PROPERTY(int bufferProgress READ bufferProgress NOTIFY bufferProgressChanged) + Q_PROPERTY(bool seekable READ isSeekable NOTIFY seekableChanged) + Q_PROPERTY(qreal playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged) + Q_PROPERTY(Error error READ error NOTIFY errorChanged) + Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged) + Q_ENUMS(Status) + Q_ENUMS(Error) + Q_INTERFACES(QDeclarativeParserStatus) +public: + enum Status + { + UnknownStatus = QMediaPlayer::UnknownMediaStatus, + NoMedia = QMediaPlayer::NoMedia, + Loading = QMediaPlayer::LoadingMedia, + Loaded = QMediaPlayer::LoadedMedia, + Stalled = QMediaPlayer::StalledMedia, + Buffering = QMediaPlayer::BufferingMedia, + Buffered = QMediaPlayer::BufferedMedia, + EndOfMedia = QMediaPlayer::EndOfMedia, + InvalidMedia = QMediaPlayer::InvalidMedia + }; + + enum Error + { + NoError = QMediaPlayer::NoError, + ResourceError = QMediaPlayer::ResourceError, + FormatError = QMediaPlayer::FormatError, + NetworkError = QMediaPlayer::NetworkError, + AccessDenied = QMediaPlayer::AccessDeniedError, + ServiceMissing = QMediaPlayer::ServiceMissingError + }; + + QDeclarativeAudio(QObject *parent = 0); + ~QDeclarativeAudio(); + + Status status() const; + Error error() const; + +public Q_SLOTS: + void play(); + void pause(); + void stop(); + +Q_SIGNALS: + void sourceChanged(); + + void playingChanged(); + void pausedChanged(); + + void started(); + void resumed(); + void paused(); + void stopped(); + + void statusChanged(); + + void loaded(); + void buffering(); + void stalled(); + void buffered(); + void endOfMedia(); + + void durationChanged(); + void positionChanged(); + + void volumeChanged(); + void mutedChanged(); + + void bufferProgressChanged(); + + void seekableChanged(); + void playbackRateChanged(); + + void errorChanged(); + void error(QDeclarativeAudio::Error error, const QString &errorString); + +private Q_SLOTS: + void _q_error(int, const QString &); + +private: + Q_DISABLE_COPY(QDeclarativeAudio) + Q_PRIVATE_SLOT(mediaBase(), void _q_stateChanged(QMediaPlayer::State)) + Q_PRIVATE_SLOT(mediaBase(), void _q_mediaStatusChanged(QMediaPlayer::MediaStatus)) + Q_PRIVATE_SLOT(mediaBase(), void _q_metaDataChanged()) + + inline QDeclarativeMediaBase *mediaBase() { return this; } +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeAudio)) + +QT_END_HEADER + +#endif diff --git a/src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase.cpp b/src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase.cpp new file mode 100644 index 0000000..8e87e44 --- /dev/null +++ b/src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase.cpp @@ -0,0 +1,413 @@ +/**************************************************************************** +** +** 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 plugins 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdeclarativemediabase_p.h" + +#include +#include + +#include +#include +#include +#include +#include "qmetadatacontrolmetaobject_p.h" + + + +QT_BEGIN_NAMESPACE + + +class QDeclarativeMediaBaseObject : public QMediaObject +{ +public: + QDeclarativeMediaBaseObject(QMediaService *service) + : QMediaObject(0, service) + { + } +}; + +class QDeclarativeMediaBasePlayerControl : public QMediaPlayerControl +{ +public: + QDeclarativeMediaBasePlayerControl(QObject *parent) + : QMediaPlayerControl(parent) + { + } + + QMediaPlayer::State state() const { return QMediaPlayer::StoppedState; } + QMediaPlayer::MediaStatus mediaStatus() const { return QMediaPlayer::NoMedia; } + + qint64 duration() const { return 0; } + qint64 position() const { return 0; } + void setPosition(qint64) {} + int volume() const { return 0; } + void setVolume(int) {} + bool isMuted() const { return false; } + void setMuted(bool) {} + int bufferStatus() const { return 0; } + bool isAudioAvailable() const { return false; } + bool isVideoAvailable() const { return false; } + bool isSeekable() const { return false; } + QMediaTimeRange availablePlaybackRanges() const { return QMediaTimeRange(); } + qreal playbackRate() const { return 1; } + void setPlaybackRate(qreal) {} + QMediaContent media() const { return QMediaContent(); } + const QIODevice *mediaStream() const { return 0; } + void setMedia(const QMediaContent &, QIODevice *) {} + + void play() {} + void pause() {} + void stop() {} +}; + +class QDeclarativeMediaBaseAnimation : public QObject +{ +public: + QDeclarativeMediaBaseAnimation(QDeclarativeMediaBase *media) + : m_media(media) + { + } + + void start() { if (!m_timer.isActive()) m_timer.start(500, this); } + void stop() { m_timer.stop(); } + +protected: + void timerEvent(QTimerEvent *event) + { + if (event->timerId() == m_timer.timerId()) { + event->accept(); + + if (m_media->m_state == QMediaPlayer::PlayingState) + emit m_media->positionChanged(); + if (m_media->m_status == QMediaPlayer::BufferingMedia || QMediaPlayer::StalledMedia) + emit m_media->bufferProgressChanged(); + } else { + QObject::timerEvent(event); + } + } + +private: + QDeclarativeMediaBase *m_media; + QBasicTimer m_timer; +}; + +void QDeclarativeMediaBase::_q_stateChanged(QMediaPlayer::State state) +{ + if (state != m_state) { + QMediaPlayer::State oldState = m_state; + + m_state = state; + + if (state == QMediaPlayer::StoppedState) { + emit stopped(); + emit playingChanged(); + } else if (oldState == QMediaPlayer::StoppedState) { + emit started(); + emit playingChanged(); + } else if (oldState == QMediaPlayer::PausedState) { + m_paused = false; + + emit resumed(); + emit pausedChanged(); + } + + if (state == m_state && state == QMediaPlayer::PausedState) { + bool wasPaused = m_paused; + + m_paused = true; + + emit paused(); + + if (!wasPaused) + emit pausedChanged(); + } + + if (m_state == QMediaPlayer::PlayingState + || m_status == QMediaPlayer::BufferingMedia + || m_status == QMediaPlayer::StalledMedia) { + m_animation->start(); + } else { + m_animation->stop(); + } + } +} + +void QDeclarativeMediaBase::_q_mediaStatusChanged(QMediaPlayer::MediaStatus status) +{ + if (status != m_status) { + m_status = status; + + switch (status) { + case QMediaPlayer::LoadedMedia: + emit loaded(); + break; + case QMediaPlayer::BufferingMedia: + emit buffering(); + break; + case QMediaPlayer::BufferedMedia: + emit buffered(); + break; + case QMediaPlayer::StalledMedia: + emit stalled(); + break; + case QMediaPlayer::EndOfMedia: + emit endOfMedia(); + break; + default: + break; + } + + emit statusChanged(); + + if (m_state == QMediaPlayer::PlayingState + || m_status == QMediaPlayer::BufferingMedia + || m_status == QMediaPlayer::StalledMedia) { + m_animation->start(); + } else { + m_animation->stop(); + } + } +} + +void QDeclarativeMediaBase::_q_metaDataChanged() +{ + m_metaObject->metaDataChanged(); +} + +QDeclarativeMediaBase::QDeclarativeMediaBase() + : m_mediaService(0) + , m_playerControl(0) + , m_mediaObject(0) + , m_mediaProvider(0) + , m_metaDataControl(0) + , m_metaObject(0) + , m_animation(0) + , m_state(QMediaPlayer::StoppedState) + , m_status(QMediaPlayer::NoMedia) + , m_error(QMediaPlayer::NoError) + , m_paused(false) +{ +} + +QDeclarativeMediaBase::~QDeclarativeMediaBase() +{ +} + +void QDeclarativeMediaBase::shutdown() +{ + delete m_metaObject; + delete m_mediaObject; + + if (m_mediaProvider) + m_mediaProvider->releaseService(m_mediaService); + + delete m_animation; + +} + +void QDeclarativeMediaBase::setObject(QObject *object) +{ + if ((m_mediaProvider = QMediaServiceProvider::defaultServiceProvider())) { + if ((m_mediaService = m_mediaProvider->requestService(Q_MEDIASERVICE_MEDIAPLAYER))) { + m_playerControl = qobject_cast( + m_mediaService->control(QMediaPlayerControl_iid)); + m_metaDataControl = qobject_cast( + m_mediaService->control(QMetaDataControl_iid)); + m_mediaObject = new QDeclarativeMediaBaseObject(m_mediaService); + } + } + + if (m_playerControl) { + QObject::connect(m_playerControl, SIGNAL(stateChanged(QMediaPlayer::State)), + object, SLOT(_q_stateChanged(QMediaPlayer::State))); + QObject::connect(m_playerControl, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), + object, SLOT(_q_mediaStatusChanged(QMediaPlayer::MediaStatus))); + QObject::connect(m_playerControl, SIGNAL(mediaChanged(QMediaContent)), + object, SIGNAL(sourceChanged())); + QObject::connect(m_playerControl, SIGNAL(durationChanged(qint64)), + object, SIGNAL(durationChanged())); + QObject::connect(m_playerControl, SIGNAL(positionChanged(qint64)), + object, SIGNAL(positionChanged())); + QObject::connect(m_playerControl, SIGNAL(volumeChanged(int)), + object, SIGNAL(volumeChanged())); + QObject::connect(m_playerControl, SIGNAL(mutedChanged(bool)), + object, SIGNAL(mutedChanged())); + QObject::connect(m_playerControl, SIGNAL(bufferStatusChanged(int)), + object, SIGNAL(bufferProgressChanged())); + QObject::connect(m_playerControl, SIGNAL(seekableChanged(bool)), + object, SIGNAL(seekableChanged())); + QObject::connect(m_playerControl, SIGNAL(playbackRateChanged(qreal)), + object, SIGNAL(playbackRateChanged())); + QObject::connect(m_playerControl, SIGNAL(error(int,QString)), + object, SLOT(_q_error(int,QString))); + + m_animation = new QDeclarativeMediaBaseAnimation(this); + } else { + m_error = QMediaPlayer::ServiceMissingError; + + m_playerControl = new QDeclarativeMediaBasePlayerControl(object); + } + + if (m_metaDataControl) { + m_metaObject = new QMetaDataControlMetaObject(m_metaDataControl, object); + + QObject::connect(m_metaDataControl, SIGNAL(metaDataChanged()), + object, SLOT(_q_metaDataChanged())); + } +} + +QUrl QDeclarativeMediaBase::source() const +{ + return m_playerControl->media().canonicalUrl(); +} + +void QDeclarativeMediaBase::setSource(const QUrl &url) +{ + if (m_error != QMediaPlayer::ServiceMissingError && m_error != QMediaPlayer::NoError) { + m_error = QMediaPlayer::NoError; + m_errorString = QString(); + + emit errorChanged(); + } + + m_playerControl->setMedia(QMediaContent(url), 0); +} + +bool QDeclarativeMediaBase::isPlaying() const +{ + return m_state != QMediaPlayer::StoppedState; +} + +void QDeclarativeMediaBase::setPlaying(bool playing) +{ + if (playing && m_state == QMediaPlayer::StoppedState) { + if (m_paused) + m_playerControl->pause(); + else + m_playerControl->play(); + } else if (!playing) { + m_playerControl->stop(); + } +} + +bool QDeclarativeMediaBase::isPaused() const +{ + return m_paused; +} + +void QDeclarativeMediaBase::setPaused(bool paused) +{ + if (m_paused != paused) { + if (paused && m_state == QMediaPlayer::PlayingState) { + m_playerControl->pause(); + } else if (!paused && m_state == QMediaPlayer::PausedState) { + m_playerControl->play(); + } else { + m_paused = paused; + + emit pausedChanged(); + } + } +} + +int QDeclarativeMediaBase::duration() const +{ + return m_playerControl->duration(); +} + +int QDeclarativeMediaBase::position() const +{ + return m_playerControl->position(); + +} + +void QDeclarativeMediaBase::setPosition(int position) +{ + m_playerControl->setPosition(position); +} + +qreal QDeclarativeMediaBase::volume() const +{ + return qreal(m_playerControl->volume()) / 100; +} + +void QDeclarativeMediaBase::setVolume(qreal volume) +{ + m_playerControl->setVolume(qRound(volume * 100)); +} + +bool QDeclarativeMediaBase::isMuted() const +{ + return m_playerControl->isMuted(); +} + +void QDeclarativeMediaBase::setMuted(bool muted) +{ + m_playerControl->setMuted(muted); +} + +qreal QDeclarativeMediaBase::bufferProgress() const +{ + return qreal(m_playerControl->bufferStatus()) / 100; +} + +bool QDeclarativeMediaBase::isSeekable() const +{ + return m_playerControl->isSeekable(); +} + +qreal QDeclarativeMediaBase::playbackRate() const +{ + return m_playerControl->playbackRate(); +} + +void QDeclarativeMediaBase::setPlaybackRate(qreal rate) +{ + m_playerControl->setPlaybackRate(rate); +} + +QString QDeclarativeMediaBase::errorString() const +{ + return m_errorString; +} + +QT_END_NAMESPACE + diff --git a/src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase_p.h b/src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase_p.h new file mode 100644 index 0000000..b40e84e --- /dev/null +++ b/src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase_p.h @@ -0,0 +1,168 @@ +/**************************************************************************** +** +** 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 plugins 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEMEDIABASE_P_H +#define QDECLARATIVEMEDIABASE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QMediaPlayerControl; +class QMediaService; +class QMediaServiceProvider; +class QMetaDataControl; +class QMetaDataControlMetaObject; +class QDeclarativeMediaBaseAnimation; + +class QDeclarativeMediaBase +{ +public: + QDeclarativeMediaBase(); + virtual ~QDeclarativeMediaBase(); + + QUrl source() const; + void setSource(const QUrl &url); + + bool isPlaying() const; + void setPlaying(bool playing); + + bool isPaused() const; + void setPaused(bool paused); + + int duration() const; + + int position() const; + void setPosition(int position); + + qreal volume() const; + void setVolume(qreal volume); + + bool isMuted() const; + void setMuted(bool muted); + + qreal bufferProgress() const; + + bool isSeekable() const; + + qreal playbackRate() const; + void setPlaybackRate(qreal rate); + + QString errorString() const; + + void _q_stateChanged(QMediaPlayer::State state); + void _q_mediaStatusChanged(QMediaPlayer::MediaStatus status); + + void _q_metaDataChanged(); + +protected: + void shutdown(); + + void setObject(QObject *object); + + virtual void sourceChanged() = 0; + + virtual void playingChanged() = 0; + virtual void pausedChanged() = 0; + + virtual void started() = 0; + virtual void resumed() = 0; + virtual void paused() = 0; + virtual void stopped() = 0; + + virtual void statusChanged() = 0; + + virtual void loaded() = 0; + virtual void buffering() = 0; + virtual void stalled() = 0; + virtual void buffered() = 0; + virtual void endOfMedia() = 0; + + virtual void durationChanged() = 0; + virtual void positionChanged() = 0; + + virtual void volumeChanged() = 0; + virtual void mutedChanged() = 0; + + virtual void bufferProgressChanged() = 0; + + virtual void seekableChanged() = 0; + virtual void playbackRateChanged() = 0; + + virtual void errorChanged() = 0; + + QMediaService *m_mediaService; + QMediaPlayerControl *m_playerControl; + + QMediaObject *m_mediaObject; + QMediaServiceProvider *m_mediaProvider; + QMetaDataControl *m_metaDataControl; + QMetaDataControlMetaObject *m_metaObject; + QDeclarativeMediaBaseAnimation *m_animation; + + QMediaPlayer::State m_state; + QMediaPlayer::MediaStatus m_status; + QMediaPlayer::Error m_error; + bool m_paused; + QString m_errorString; + + friend class QDeclarativeMediaBaseAnimation; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif diff --git a/src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo.cpp b/src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo.cpp new file mode 100644 index 0000000..064f242 --- /dev/null +++ b/src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo.cpp @@ -0,0 +1,945 @@ +/**************************************************************************** +** +** 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 plugins 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdeclarativevideo_p.h" + +#include +#include +#include +#include +#include + + +QT_BEGIN_NAMESPACE + + +void QDeclarativeVideo::_q_nativeSizeChanged(const QSizeF &size) +{ + setImplicitWidth(size.width()); + setImplicitHeight(size.height()); +} + +void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString) +{ + m_error = QMediaPlayer::Error(errorCode); + m_errorString = errorString; + + emit error(Error(errorCode), errorString); + emit errorChanged(); +} + + +/*! + \qmlclass Video QDeclarativeVideo + \since 4.7 + \brief The Video element allows you to add videos to a scene. + \inherits Item + + \qml + Video { source: "video/movie.mpg" } + \endqml + + The video item supports untransformed, stretched, and uniformly scaled video presentation. + For a description of stretched uniformly scaled presentation, see the \l fillMode property + description. + + The video item is only visible when the \l hasVideo property is true and the video is playing. + + \sa Audio +*/ + +/*! + \internal + \class QDeclarativeVideo + \brief The QDeclarativeVideo class provides a video item that you can add to a QDeclarativeView. +*/ + +QDeclarativeVideo::QDeclarativeVideo(QDeclarativeItem *parent) + : QDeclarativeItem(parent) + , m_graphicsItem(0) + +{ + m_graphicsItem = new QGraphicsVideoItem(this); + connect(m_graphicsItem, SIGNAL(nativeSizeChanged(QSizeF)), + this, SLOT(_q_nativeSizeChanged(QSizeF))); + + setObject(this); + + if (m_mediaService) { + connect(m_playerControl, SIGNAL(audioAvailableChanged(bool)), + this, SIGNAL(hasAudioChanged())); + connect(m_playerControl, SIGNAL(videoAvailableChanged(bool)), + this, SIGNAL(hasVideoChanged())); + + m_graphicsItem->setMediaObject(m_mediaObject); + } +} + +QDeclarativeVideo::~QDeclarativeVideo() +{ + shutdown(); + + delete m_graphicsItem; +} + +/*! + \qmlproperty url Video::source + + This property holds the source URL of the media. +*/ + +/*! + \qmlproperty bool Video::playing + + This property holds whether the media is playing. + + Defaults to false, and can be set to true to start playback. +*/ + +/*! + \qmlproperty bool Video::paused + + This property holds whether the media is paused. + + Defaults to false, and can be set to true to pause playback. +*/ + +/*! + \qmlsignal Video::onStarted() + + This handler is called when playback is started. +*/ + +/*! + \qmlsignal Video::onResumed() + + This handler is called when playback is resumed from the paused state. +*/ + +/*! + \qmlsignal Video::onPaused() + + This handler is called when playback is paused. +*/ + +/*! + \qmlsignal Video::onStopped() + + This handler is called when playback is stopped. +*/ + +/*! + \qmlproperty enum Video::status + + This property holds the status of media loading. It can be one of: + + \list + \o NoMedia - no media has been set. + \o Loading - the media is currently being loaded. + \o Loaded - the media has been loaded. + \o Buffering - the media is buffering data. + \o Stalled - playback has been interrupted while the media is buffering data. + \o Buffered - the media has buffered data. + \o EndOfMedia - the media has played to the end. + \o InvalidMedia - the media cannot be played. + \o UnknownStatus - the status of the media is cannot be determined. + \endlist +*/ + +QDeclarativeVideo::Status QDeclarativeVideo::status() const +{ + return Status(m_status); +} + +/*! + \qmlsignal Video::onLoaded() + + This handler is called when the media source has been loaded. +*/ + +/*! + \qmlsignal Video::onBuffering() + + This handler is called when the media starts buffering. +*/ + +/*! + \qmlsignal Video::onStalled() + + This handler is called when playback has stalled while the media buffers. +*/ + +/*! + \qmlsignal Video::onBuffered() + + This handler is called when the media has finished buffering. +*/ + +/*! + \qmlsignal Video::onEndOfMedia() + + This handler is called when playback stops because end of the media has been reached. +*/ + +/*! + \qmlproperty int Video::duration + + This property holds the duration of the media in milliseconds. + + If the media doesn't have a fixed duration (a live stream for example) this will be 0. +*/ + +/*! + \qmlproperty int Video::position + + This property holds the current playback position in milliseconds. +*/ + +/*! + \qmlproperty qreal Video::volume + + This property holds the volume of the audio output, from 0.0 (silent) to 1.0 (maximum volume). +*/ + +/*! + \qmlproperty bool Video::muted + + This property holds whether the audio output is muted. +*/ + +/*! + \qmlproperty bool Video::hasAudio + + This property holds whether the media contains audio. +*/ + +bool QDeclarativeVideo::hasAudio() const +{ + return m_playerControl->isAudioAvailable(); +} + +/*! + \qmlproperty bool Video::hasVideo + + This property holds whether the media contains video. +*/ + +bool QDeclarativeVideo::hasVideo() const +{ + return m_playerControl->isVideoAvailable(); +} + +/*! + \qmlproperty qreal Video::bufferProgress + + This property holds how much of the data buffer is currently filled, from 0.0 (empty) to 1.0 + (full). +*/ + +/*! + \qmlproperty bool Video::seekable + + This property holds whether position of the video can be changed. +*/ + +/*! + \qmlproperty qreal Video::playbackRate + + This property holds the rate at which video is played at as a multiple of the normal rate. +*/ + +/*! + \qmlproperty enum Video::error + + This property holds the error state of the video. It can be one of: + + \list + \o NoError - there is no current error. + \o ResourceError - the video cannot be played due to a problem allocating resources. + \o FormatError - the video format is not supported. + \o NetworkError - the video cannot be played due to network issues. + \o AccessDenied - the video cannot be played due to insufficient permissions. + \o ServiceMissing - the video cannot be played because the media service could not be + instantiated. + \endlist +*/ + + +QDeclarativeVideo::Error QDeclarativeVideo::error() const +{ + return Error(m_error); +} + +/*! + \qmlproperty string Video::errorString + + This property holds a string describing the current error condition in more detail. +*/ + +/*! + \qmlsignal Video::onError(error, errorString) + + This handler is called when an \l {Error}{error} has occurred. The errorString parameter + may contain more detailed information about the error. +*/ + +/*! + \qmlproperty enum Video::fillMode + + Set this property to define how the video is scaled to fit the target area. + + \list + \o Stretch - the video is scaled to fit. + \o PreserveAspectFit - the video is scaled uniformly to fit without cropping + \o PreserveAspectCrop - the video is scaled uniformly to fill, cropping if necessary + \endlist + + The default fill mode is PreserveAspectFit. +*/ + +QDeclarativeVideo::FillMode QDeclarativeVideo::fillMode() const +{ + return FillMode(m_graphicsItem->aspectRatioMode()); +} + +void QDeclarativeVideo::setFillMode(FillMode mode) +{ + m_graphicsItem->setAspectRatioMode(Qt::AspectRatioMode(mode)); +} + +/*! + \qmlmethod Video::play() + + Starts playback of the media. + + Sets the \l playing property to true, and the \l paused property to false. +*/ + +void QDeclarativeVideo::play() +{ + m_playerControl->play(); + + if (m_paused) { + m_paused = false; + emit pausedChanged(); + } +} + +/*! + \qmlmethod Video::pause() + + Pauses playback of the media. + + Sets the \l playing and \l paused properties to true. +*/ + +void QDeclarativeVideo::pause() +{ + m_playerControl->pause(); + + if (!m_paused && m_state == QMediaPlayer::PausedState) { + m_paused = true; + emit pausedChanged(); + } +} + +/*! + \qmlmethod Video::stop() + + Stops playback of the media. + + Sets the \l playing and \l paused properties to false. +*/ + +void QDeclarativeVideo::stop() +{ + m_playerControl->stop(); + + if (m_paused) { + m_paused = false; + emit pausedChanged(); + } +} + +void QDeclarativeVideo::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) +{ +} + +void QDeclarativeVideo::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) +{ + m_graphicsItem->setSize(newGeometry.size()); + + QDeclarativeItem::geometryChanged(newGeometry, oldGeometry); +} + +QT_END_NAMESPACE + +// *************************************** +// Documentation for meta-data properties. +// *************************************** + +/*! + \qmlproperty variant Video::title + + This property holds the tile of the media. + + \sa {QtMultimedia::Title} +*/ + +/*! + \qmlproperty variant Video::subTitle + + This property holds the sub-title of the media. + + \sa {QtMultimedia::SubTitle} +*/ + +/*! + \qmlproperty variant Video::author + + This property holds the author of the media. + + \sa {QtMultimedia::Author} +*/ + +/*! + \qmlproperty variant Video::comment + + This property holds a user comment about the media. + + \sa {QtMultimedia::Comment} +*/ + +/*! + \qmlproperty variant Video::description + + This property holds a description of the media. + + \sa {QtMultimedia::Description} +*/ + +/*! + \qmlproperty variant Video::category + + This property holds the category of the media + + \sa {QtMultimedia::Category} +*/ + +/*! + \qmlproperty variant Video::genre + + This property holds the genre of the media. + + \sa {QtMultimedia::Genre} +*/ + +/*! + \qmlproperty variant Video::year + + This property holds the year of release of the media. + + \sa {QtMultimedia::Year} +*/ + +/*! + \qmlproperty variant Video::date + + This property holds the date of the media. + + \sa {QtMultimedia::Date} +*/ + +/*! + \qmlproperty variant Video::userRating + + This property holds a user rating of the media in the range of 0 to 100. + + \sa {QtMultimedia::UserRating} +*/ + +/*! + \qmlproperty variant Video::keywords + + This property holds a list of keywords describing the media. + + \sa {QtMultimedia::Keywords} +*/ + +/*! + \qmlproperty variant Video::language + + This property holds the language of the media, as an ISO 639-2 code. + + \sa {QtMultimedia::Language} +*/ + +/*! + \qmlproperty variant Video::publisher + + This property holds the publisher of the media. + + \sa {QtMultimedia::Publisher} +*/ + +/*! + \qmlproperty variant Video::copyright + + This property holds the media's copyright notice. + + \sa {QtMultimedia::Copyright} +*/ + +/*! + \qmlproperty variant Video::parentalRating + + This property holds the parental rating of the media. + + \sa {QtMultimedia::ParentalRating} +*/ + +/*! + \qmlproperty variant Video::ratingOrganisation + + This property holds the name of the rating organisation responsible for the + parental rating of the media. + + \sa {QtMultimedia::RatingOrganisation} +*/ + +/*! + \qmlproperty variant Video::size + + This property property holds the size of the media in bytes. + + \sa {QtMultimedia::Size} +*/ + +/*! + \qmlproperty variant Video::mediaType + + This property holds the type of the media. + + \sa {QtMultimedia::MediaType} +*/ + +/*! + \qmlproperty variant Video::audioBitRate + + This property holds the bit rate of the media's audio stream ni bits per + second. + + \sa {QtMultimedia::AudioBitRate} +*/ + +/*! + \qmlproperty variant Video::audioCodec + + This property holds the encoding of the media audio stream. + + \sa {QtMultimedia::AudioCodec} +*/ + +/*! + \qmlproperty variant Video::averageLevel + + This property holds the average volume level of the media. + + \sa {QtMultimedia::AverageLevel} +*/ + +/*! + \qmlproperty variant Video::channelCount + + This property holds the number of channels in the media's audio stream. + + \sa {QtMultimedia::ChannelCount} +*/ + +/*! + \qmlproperty variant Video::peakValue + + This property holds the peak volume of media's audio stream. + + \sa {QtMultimedia::PeakValue} +*/ + +/*! + \qmlproperty variant Video::sampleRate + + This property holds the sample rate of the media's audio stream in hertz. + + \sa {QtMultimedia::SampleRate} +*/ + +/*! + \qmlproperty variant Video::albumTitle + + This property holds the title of the album the media belongs to. + + \sa {QtMultimedia::AlbumTitle} +*/ + +/*! + \qmlproperty variant Video::albumArtist + + This property holds the name of the principal artist of the album the media + belongs to. + + \sa {QtMultimedia::AlbumArtist} +*/ + +/*! + \qmlproperty variant Video::contributingArtist + + This property holds the names of artists contributing to the media. + + \sa {QtMultimedia::ContributingArtist} +*/ + +/*! + \qmlproperty variant Video::composer + + This property holds the composer of the media. + + \sa {QtMultimedia::Composer} +*/ + +/*! + \qmlproperty variant Video::conductor + + This property holds the conductor of the media. + + \sa {QtMultimedia::Conductor} +*/ + +/*! + \qmlproperty variant Video::lyrics + + This property holds the lyrics to the media. + + \sa {QtMultimedia::Lyrics} +*/ + +/*! + \qmlproperty variant Video::mood + + This property holds the mood of the media. + + \sa {QtMultimedia::Mood} +*/ + +/*! + \qmlproperty variant Video::trackNumber + + This property holds the track number of the media. + + \sa {QtMultimedia::TrackNumber} +*/ + +/*! + \qmlproperty variant Video::trackCount + + This property holds the number of track on the album containing the media. + + \sa {QtMultimedia::TrackNumber} +*/ + +/*! + \qmlproperty variant Video::coverArtUrlSmall + + This property holds the URL of a small cover art image. + + \sa {QtMultimedia::CoverArtUrlSmall} +*/ + +/*! + \qmlproperty variant Video::coverArtUrlLarge + + This property holds the URL of a large cover art image. + + \sa {QtMultimedia::CoverArtUrlLarge} +*/ + +/*! + \qmlproperty variant Video::resolution + + This property holds the dimension of an image or video. + + \sa {QtMultimedia::Resolution} +*/ + +/*! + \qmlproperty variant Video::pixelAspectRatio + + This property holds the pixel aspect ratio of an image or video. + + \sa {QtMultimedia::PixelAspectRatio} +*/ + +/*! + \qmlproperty variant Video::videoFrameRate + + This property holds the frame rate of the media's video stream. + + \sa {QtMultimedia::VideoFrameRate} +*/ + +/*! + \qmlproperty variant Video::videoBitRate + + This property holds the bit rate of the media's video stream in bits per + second. + + \sa {QtMultimedia::VideoBitRate} +*/ + +/*! + \qmlproperty variant Video::videoCodec + + This property holds the encoding of the media's video stream. + + \sa {QtMultimedia::VideoCodec} +*/ + +/*! + \qmlproperty variant Video::posterUrl + + This property holds the URL of a poster image. + + \sa {QtMultimedia::PosterUrl} +*/ + +/*! + \qmlproperty variant Video::chapterNumber + + This property holds the chapter number of the media. + + \sa {QtMultimedia::ChapterNumber} +*/ + +/*! + \qmlproperty variant Video::director + + This property holds the director of the media. + + \sa {QtMultimedia::Director} +*/ + +/*! + \qmlproperty variant Video::leadPerformer + + This property holds the lead performer in the media. + + \sa {QtMultimedia::LeadPerformer} +*/ + +/*! + \qmlproperty variant Video::writer + + This property holds the writer of the media. + + \sa {QtMultimedia::Writer} +*/ + +// The remaining properties are related to photos, and are technically +// available but will certainly never have values. +#ifndef Q_QDOC + +/*! + \qmlproperty variant Video::cameraManufacturer + + \sa {QtMultimedia::CameraManufacturer} +*/ + +/*! + \qmlproperty variant Video::cameraModel + + \sa {QtMultimedia::CameraModel} +*/ + +/*! + \qmlproperty variant Video::event + + \sa {QtMultimedia::Event} +*/ + +/*! + \qmlproperty variant Video::subject + + \sa {QtMultimedia::Subject} +*/ + +/*! + \qmlproperty variant Video::orientation + + \sa {QtMultimedia::Orientation} +*/ + +/*! + \qmlproperty variant Video::exposureTime + + \sa {QtMultimedia::ExposureTime} +*/ + +/*! + \qmlproperty variant Video::fNumber + + \sa {QtMultimedia::FNumber} +*/ + +/*! + \qmlproperty variant Video::exposureProgram + + \sa {QtMultimedia::ExposureProgram} +*/ + +/*! + \qmlproperty variant Video::isoSpeedRatings + + \sa {QtMultimedia::ISOSpeedRatings} +*/ + +/*! + \qmlproperty variant Video::exposureBiasValue + + \sa {QtMultimedia::ExposureBiasValue} +*/ + +/*! + \qmlproperty variant Video::dateTimeDigitized + + \sa {QtMultimedia::DateTimeDigitized} +*/ + +/*! + \qmlproperty variant Video::subjectDistance + + \sa {QtMultimedia::SubjectDistance} +*/ + +/*! + \qmlproperty variant Video::meteringMode + + \sa {QtMultimedia::MeteringMode} +*/ + +/*! + \qmlproperty variant Video::lightSource + + \sa {QtMultimedia::LightSource} +*/ + +/*! + \qmlproperty variant Video::flash + + \sa {QtMultimedia::Flash} +*/ + +/*! + \qmlproperty variant Video::focalLength + + \sa {QtMultimedia::FocalLength} +*/ + +/*! + \qmlproperty variant Video::exposureMode + + \sa {QtMultimedia::ExposureMode} +*/ + +/*! + \qmlproperty variant Video::whiteBalance + + \sa {QtMultimedia::WhiteBalance} +*/ + +/*! + \qmlproperty variant Video::DigitalZoomRatio + + \sa {QtMultimedia::DigitalZoomRatio} +*/ + +/*! + \qmlproperty variant Video::focalLengthIn35mmFilm + + \sa {QtMultimedia::FocalLengthIn35mmFile} +*/ + +/*! + \qmlproperty variant Video::sceneCaptureType + + \sa {QtMultimedia::SceneCaptureType} +*/ + +/*! + \qmlproperty variant Video::gainControl + + \sa {QtMultimedia::GainControl} +*/ + +/*! + \qmlproperty variant Video::contrast + + \sa {QtMultimedia::contrast} +*/ + +/*! + \qmlproperty variant Video::saturation + + \sa {QtMultimedia::Saturation} +*/ + +/*! + \qmlproperty variant Video::sharpness + + \sa {QtMultimedia::Sharpness} +*/ + +/*! + \qmlproperty variant Video::deviceSettingDescription + + \sa {QtMultimedia::DeviceSettingDescription} +*/ + +#endif + +#include "moc_qdeclarativevideo_p.cpp" diff --git a/src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo_p.h b/src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo_p.h new file mode 100644 index 0000000..fb13519 --- /dev/null +++ b/src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo_p.h @@ -0,0 +1,204 @@ +/**************************************************************************** +** +** 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 plugins 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEVIDEO_H +#define QDECLARATIVEVIDEO_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qdeclarativemediabase_p.h" + +#include + +#include +#include + + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QTimerEvent; +class QVideoSurfaceFormat; + + +class QDeclarativeVideo : public QDeclarativeItem, public QDeclarativeMediaBase +{ + Q_OBJECT + Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) + Q_PROPERTY(bool playing READ isPlaying WRITE setPlaying NOTIFY playingChanged) + Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged) + Q_PROPERTY(Status status READ status NOTIFY statusChanged) + Q_PROPERTY(int duration READ duration NOTIFY durationChanged) + Q_PROPERTY(int position READ position WRITE setPosition NOTIFY positionChanged) + Q_PROPERTY(qreal volume READ volume WRITE setVolume NOTIFY volumeChanged) + Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged) + Q_PROPERTY(bool hasAudio READ hasAudio NOTIFY hasAudioChanged) + Q_PROPERTY(bool hasVideo READ hasVideo NOTIFY hasVideoChanged) + Q_PROPERTY(int bufferProgress READ bufferProgress NOTIFY bufferProgressChanged) + Q_PROPERTY(bool seekable READ isSeekable NOTIFY seekableChanged) + Q_PROPERTY(qreal playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged) + Q_PROPERTY(Error error READ error NOTIFY errorChanged) + Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged) + Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode) + Q_ENUMS(FillMode) + Q_ENUMS(Status) + Q_ENUMS(Error) +public: + enum FillMode + { + Stretch = Qt::IgnoreAspectRatio, + PreserveAspectFit = Qt::KeepAspectRatio, + PreserveAspectCrop = Qt::KeepAspectRatioByExpanding + }; + + enum Status + { + UnknownStatus = QMediaPlayer::UnknownMediaStatus, + NoMedia = QMediaPlayer::NoMedia, + Loading = QMediaPlayer::LoadingMedia, + Loaded = QMediaPlayer::LoadedMedia, + Stalled = QMediaPlayer::StalledMedia, + Buffering = QMediaPlayer::BufferingMedia, + Buffered = QMediaPlayer::BufferedMedia, + EndOfMedia = QMediaPlayer::EndOfMedia, + InvalidMedia = QMediaPlayer::InvalidMedia + }; + + enum Error + { + NoError = QMediaPlayer::NoError, + ResourceError = QMediaPlayer::ResourceError, + FormatError = QMediaPlayer::FormatError, + NetworkError = QMediaPlayer::NetworkError, + AccessDenied = QMediaPlayer::AccessDeniedError, + ServiceMissing = QMediaPlayer::ServiceMissingError + }; + + QDeclarativeVideo(QDeclarativeItem *parent = 0); + ~QDeclarativeVideo(); + + bool hasAudio() const; + bool hasVideo() const; + + FillMode fillMode() const; + void setFillMode(FillMode mode); + + Status status() const; + Error error() const; + + void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); + +public Q_SLOTS: + void play(); + void pause(); + void stop(); + +Q_SIGNALS: + void sourceChanged(); + + void playingChanged(); + void pausedChanged(); + + void started(); + void resumed(); + void paused(); + void stopped(); + + void statusChanged(); + + void loaded(); + void buffering(); + void stalled(); + void buffered(); + void endOfMedia(); + + void durationChanged(); + void positionChanged(); + + void volumeChanged(); + void mutedChanged(); + void hasAudioChanged(); + void hasVideoChanged(); + + void bufferProgressChanged(); + + void seekableChanged(); + void playbackRateChanged(); + + void errorChanged(); + void error(QDeclarativeVideo::Error error, const QString &errorString); + +protected: + void geometryChanged(const QRectF &geometry, const QRectF &); + +private Q_SLOTS: + void _q_nativeSizeChanged(const QSizeF &size); + void _q_error(int, const QString &); + +private: + Q_DISABLE_COPY(QDeclarativeVideo) + + QGraphicsVideoItem *m_graphicsItem; + + Q_PRIVATE_SLOT(mediaBase(), void _q_stateChanged(QMediaPlayer::State)) + Q_PRIVATE_SLOT(mediaBase(), void _q_mediaStatusChanged(QMediaPlayer::MediaStatus)) + Q_PRIVATE_SLOT(mediaBase(), void _q_metaDataChanged()) + + inline QDeclarativeMediaBase *mediaBase() { return this; } +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeVideo)) + +QT_END_HEADER + +#endif diff --git a/src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject.cpp b/src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject.cpp new file mode 100644 index 0000000..e90cbd6 --- /dev/null +++ b/src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject.cpp @@ -0,0 +1,362 @@ +/**************************************************************************** +** +** 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 plugins 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmetadatacontrolmetaobject_p.h" +#include + + +QT_BEGIN_NAMESPACE + +// copied from qmetaobject.cpp +// do not touch without touching the moc as well +enum PropertyFlags { + Invalid = 0x00000000, + Readable = 0x00000001, + Writable = 0x00000002, + Resettable = 0x00000004, + EnumOrFlag = 0x00000008, + StdCppSet = 0x00000100, +// Override = 0x00000200, + Designable = 0x00001000, + ResolveDesignable = 0x00002000, + Scriptable = 0x00004000, + ResolveScriptable = 0x00008000, + Stored = 0x00010000, + ResolveStored = 0x00020000, + Editable = 0x00040000, + ResolveEditable = 0x00080000, + User = 0x00100000, + ResolveUser = 0x00200000, + Notify = 0x00400000, + Dynamic = 0x00800000 +}; + +enum MethodFlags { + AccessPrivate = 0x00, + AccessProtected = 0x01, + AccessPublic = 0x02, + AccessMask = 0x03, //mask + + MethodMethod = 0x00, + MethodSignal = 0x04, + MethodSlot = 0x08, + MethodConstructor = 0x0c, + MethodTypeMask = 0x0c, + + MethodCompatibility = 0x10, + MethodCloned = 0x20, + MethodScriptable = 0x40 +}; + +struct QMetaObjectPrivate +{ + int revision; + int className; + int classInfoCount, classInfoData; + int methodCount, methodData; + int propertyCount, propertyData; + int enumeratorCount, enumeratorData; + int constructorCount, constructorData; + int flags; +}; + +static inline const QMetaObjectPrivate *priv(const uint* m_data) +{ return reinterpret_cast(m_data); } +// end of copied lines from qmetaobject.cpp + +namespace +{ + struct MetaDataKey + { + QtMultimedia::MetaData key; + const char *name; + }; + + const MetaDataKey qt_metaDataKeys[] = + { + { QtMultimedia::Title, "title" }, + { QtMultimedia::SubTitle, "subTitle" }, + { QtMultimedia::Author, "author" }, + { QtMultimedia::Comment, "comment" }, + { QtMultimedia::Description, "description" }, + { QtMultimedia::Category, "category" }, + { QtMultimedia::Genre, "genre" }, + { QtMultimedia::Year, "year" }, + { QtMultimedia::Date, "date" }, + { QtMultimedia::UserRating, "userRating" }, + { QtMultimedia::Keywords, "keywords" }, + { QtMultimedia::Language, "language" }, + { QtMultimedia::Publisher, "publisher" }, + { QtMultimedia::Copyright, "copyright" }, + { QtMultimedia::ParentalRating, "parentalRating" }, + { QtMultimedia::RatingOrganisation, "ratingOrganisation" }, + + // Media + { QtMultimedia::Size, "size" }, + { QtMultimedia::MediaType, "mediaType" }, +// { QtMultimedia::Duration, "duration" }, + + // Audio + { QtMultimedia::AudioBitRate, "audioBitRate" }, + { QtMultimedia::AudioCodec, "audioCodec" }, + { QtMultimedia::AverageLevel, "averageLevel" }, + { QtMultimedia::ChannelCount, "channelCount" }, + { QtMultimedia::PeakValue, "peakValue" }, + { QtMultimedia::SampleRate, "sampleRate" }, + + // Music + { QtMultimedia::AlbumTitle, "albumTitle" }, + { QtMultimedia::AlbumArtist, "albumArtist" }, + { QtMultimedia::ContributingArtist, "contributingArtist" }, + { QtMultimedia::Composer, "composer" }, + { QtMultimedia::Conductor, "conductor" }, + { QtMultimedia::Lyrics, "lyrics" }, + { QtMultimedia::Mood, "mood" }, + { QtMultimedia::TrackNumber, "trackNumber" }, + { QtMultimedia::TrackCount, "trackCount" }, + + { QtMultimedia::CoverArtUrlSmall, "coverArtUrlSmall" }, + { QtMultimedia::CoverArtUrlLarge, "coverArtUrlLarge" }, + + // Image/Video + { QtMultimedia::Resolution, "resolution" }, + { QtMultimedia::PixelAspectRatio, "pixelAspectRatio" }, + + // Video + { QtMultimedia::VideoFrameRate, "videoFrameRate" }, + { QtMultimedia::VideoBitRate, "videoBitRate" }, + { QtMultimedia::VideoCodec, "videoCodec" }, + + { QtMultimedia::PosterUrl, "posterUrl" }, + + // Movie + { QtMultimedia::ChapterNumber, "chapterNumber" }, + { QtMultimedia::Director, "director" }, + { QtMultimedia::LeadPerformer, "leadPerformer" }, + { QtMultimedia::Writer, "writer" }, + + // Photos + { QtMultimedia::CameraManufacturer, "cameraManufacturer" }, + { QtMultimedia::CameraModel, "cameraModel" }, + { QtMultimedia::Event, "event" }, + { QtMultimedia::Subject, "subject" }, + { QtMultimedia::Orientation, "orientation" }, + { QtMultimedia::ExposureTime, "exposureTime" }, + { QtMultimedia::FNumber, "fNumber" }, + { QtMultimedia::ExposureProgram, "exposureProgram" }, + { QtMultimedia::ISOSpeedRatings, "isoSpeedRatings" }, + { QtMultimedia::ExposureBiasValue, "exposureBiasValue" }, + { QtMultimedia::DateTimeOriginal, "dateTimeOriginal" }, + { QtMultimedia::DateTimeDigitized, "dateTimeDigitized" }, + { QtMultimedia::SubjectDistance, "subjectDistance" }, + { QtMultimedia::MeteringMode, "meteringMode" }, + { QtMultimedia::LightSource, "lightSource" }, + { QtMultimedia::Flash, "flash" }, + { QtMultimedia::FocalLength, "focalLength" }, + { QtMultimedia::ExposureMode, "exposureMode" }, + { QtMultimedia::WhiteBalance, "whiteBalance" }, + { QtMultimedia::DigitalZoomRatio, "digitalZoomRatio" }, + { QtMultimedia::FocalLengthIn35mmFilm, "focalLengthIn35mmFilm" }, + { QtMultimedia::SceneCaptureType, "sceneCaptureType" }, + { QtMultimedia::GainControl, "gainControl" }, + { QtMultimedia::Contrast, "contrast" }, + { QtMultimedia::Saturation, "saturation" }, + { QtMultimedia::Sharpness, "sharpness" }, + { QtMultimedia::DeviceSettingDescription, "deviceSettingDescription" } + }; + + class QMetaDataControlObject : public QObject + { + public: + inline QObjectData *data() { return d_ptr.data(); } + }; +} + +QMetaDataControlMetaObject::QMetaDataControlMetaObject(QMetaDataControl *control, QObject *object) + : m_control(control) + , m_object(object) + , m_string(0) + , m_data(0) + , m_propertyOffset(0) + , m_signalOffset(0) +{ + const QMetaObject *superClass = m_object->metaObject(); + + const int propertyCount = sizeof(qt_metaDataKeys) / sizeof(MetaDataKey); + const int dataSize = sizeof(uint) + * (13 // QMetaObjectPrivate members. + + 5 // 5 members per signal. + + 4 * propertyCount // 3 members per property + 1 notify signal per property. + + 1); // Terminating value. + + m_data = reinterpret_cast(qMalloc(dataSize)); + + QMetaObjectPrivate *pMeta = reinterpret_cast(m_data); + + pMeta->revision = 3; + pMeta->className = 0; + pMeta->classInfoCount = 0; + pMeta->classInfoData = 0; + pMeta->methodCount = 1; + pMeta->methodData = 13; + pMeta->propertyCount = propertyCount; + pMeta->propertyData = 18; + pMeta->enumeratorCount = 0; + pMeta->enumeratorData = 0; + pMeta->constructorCount = 0; + pMeta->constructorData = 0; + pMeta->flags = 0x01; // Dynamic meta object flag. + + const int classNameSize = qstrlen(superClass->className()) + 1; + + int stringIndex = classNameSize + 1; + + // __metaDataChanged() signal. + static const char *changeSignal = "__metaDataChanged()"; + const int changeSignalSize = qstrlen(changeSignal) + 1; + + m_data[13] = stringIndex; // Signature. + m_data[14] = classNameSize; // Parameters. + m_data[15] = classNameSize; // Type. + m_data[16] = classNameSize; // Tag. + m_data[17] = MethodSignal | AccessProtected; // Flags. + + stringIndex += changeSignalSize; + + const char *qvariantName = "QVariant"; + const int qvariantSize = qstrlen(qvariantName) + 1; + const int qvariantIndex = stringIndex; + + stringIndex += qvariantSize; + + // Properties. + for (int i = 0; i < propertyCount; ++i) { + m_data[18 + 3 * i] = stringIndex; // Name. + m_data[19 + 3 * i] = qvariantIndex; // Type. + m_data[20 + 3 * i] + = Readable | Writable | Notify | Dynamic | (0xffffffff << 24); // Flags. + m_data[18 + propertyCount * 3 + i] = 0; // Notify signal. + + stringIndex += qstrlen(qt_metaDataKeys[i].name) + 1; + } + + // Terminating value. + m_data[18 + propertyCount * 4] = 0; + + // Build string. + m_string = reinterpret_cast(qMalloc(stringIndex + 1)); + + // Class name. + qMemCopy(m_string, superClass->className(), classNameSize); + + stringIndex = classNameSize; + + // Null m_string. + m_string[stringIndex] = '\0'; + stringIndex += 1; + + // __metaDataChanged() signal. + qMemCopy(m_string + stringIndex, changeSignal, changeSignalSize); + stringIndex += changeSignalSize; + + qMemCopy(m_string + stringIndex, qvariantName, qvariantSize); + stringIndex += qvariantSize; + + // Properties. + for (int i = 0; i < propertyCount; ++i) { + const int propertyNameSize = qstrlen(qt_metaDataKeys[i].name) + 1; + + qMemCopy(m_string + stringIndex, qt_metaDataKeys[i].name, propertyNameSize); + stringIndex += propertyNameSize; + } + + // Terminating character. + m_string[stringIndex] = '\0'; + + d.superdata = superClass; + d.stringdata = m_string; + d.data = m_data; + d.extradata = 0; + + static_cast(m_object)->data()->metaObject = this; + + m_propertyOffset = propertyOffset(); + m_signalOffset = methodOffset(); +} + +QMetaDataControlMetaObject::~QMetaDataControlMetaObject() +{ + static_cast(m_object)->data()->metaObject = 0; + + qFree(m_data); + qFree(m_string); +} + +int QMetaDataControlMetaObject::metaCall(QMetaObject::Call c, int id, void **a) +{ + if (c == QMetaObject::ReadProperty && id >= m_propertyOffset) { + int propId = id - m_propertyOffset; + + *reinterpret_cast(a[0]) = m_control->metaData(qt_metaDataKeys[propId].key); + + return -1; + } else if (c == QMetaObject::WriteProperty && id >= m_propertyOffset) { + int propId = id - m_propertyOffset; + + m_control->setMetaData(qt_metaDataKeys[propId].key, *reinterpret_cast(a[0])); + + return -1; + } else { + return m_object->qt_metacall(c, id, a); + } +} + +int QMetaDataControlMetaObject::createProperty(const char *, const char *) +{ + return -1; +} + +void QMetaDataControlMetaObject::metaDataChanged() +{ + activate(m_object, m_signalOffset, 0); +} + +QT_END_NAMESPACE diff --git a/src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject_p.h b/src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject_p.h new file mode 100644 index 0000000..c381f2d --- /dev/null +++ b/src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject_p.h @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** 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 plugins 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMETADATACONTROLMETAOBJECT_P_H +#define QMETADATACONTROLMETAOJBECT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QMetaDataControl; + +class QMetaDataControlMetaObject : public QAbstractDynamicMetaObject +{ +public: + QMetaDataControlMetaObject(QMetaDataControl *control, QObject *object); + ~QMetaDataControlMetaObject(); + + int metaCall(QMetaObject::Call call, int _id, void **arguments); + int createProperty(const char *, const char *); + + void metaDataChanged(); + +private: + QMetaDataControl *m_control; + QObject *m_object; + char *m_string; + uint *m_data; + + int m_propertyOffset; + int m_signalOffset; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif diff --git a/src/src.pro b/src/src.pro index 2b9dc30..ebfd44b 100644 --- a/src/src.pro +++ b/src/src.pro @@ -116,7 +116,6 @@ src_declarative.target = sub-declarative src_phonon.depends += src_dbus } contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): src_plugins.depends += src_opengl - contains(QT_CONFIG, declarative): src_multimedia.depends += src_declarative } !symbian { diff --git a/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro b/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro index 13bf606..bfc2223 100644 --- a/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro +++ b/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro @@ -1,4 +1,14 @@ load(qttest_p4) -SOURCES += tst_qdeclarativeaudio.cpp + +HEADERS += \ + $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio_p.h \ + $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase_p.h \ + $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject_p.h + +SOURCES += \ + tst_qdeclarativeaudio.cpp \ + $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio.cpp \ + $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase.cpp \ + $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject.cpp QT += multimedia declarative diff --git a/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp b/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp index 11439ce..55c7135 100644 --- a/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp +++ b/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp @@ -41,7 +41,7 @@ #include -#include +#include "../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativeaudio_p.h" #include #include diff --git a/tests/auto/qdeclarativevideo/qdeclarativevideo.pro b/tests/auto/qdeclarativevideo/qdeclarativevideo.pro index d946bb0..497ee0e 100644 --- a/tests/auto/qdeclarativevideo/qdeclarativevideo.pro +++ b/tests/auto/qdeclarativevideo/qdeclarativevideo.pro @@ -1,4 +1,14 @@ load(qttest_p4) -SOURCES += tst_qdeclarativevideo.cpp + +HEADERS += \ + $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo_p.h \ + $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase_p.h \ + $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject_p.h + +SOURCES += \ + tst_qdeclarativevideo.cpp \ + $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo.cpp \ + $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativemediabase.cpp \ + $$PWD/../../../src/plugins/qdeclarativemodules/multimedia/qmetadatacontrolmetaobject.cpp QT += multimedia declarative diff --git a/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp b/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp index 9fc1e70..d3bfc38 100644 --- a/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp +++ b/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp @@ -41,7 +41,7 @@ #include -#include +#include "../../../src/plugins/qdeclarativemodules/multimedia/qdeclarativevideo_p.h" #include #include -- cgit v0.12 From 399858f133819eac1d7a71029cc132c76a6e0bbc Mon Sep 17 00:00:00 2001 From: Justin McPherson Date: Wed, 3 Mar 2010 15:18:00 +1000 Subject: Undo a doc revert. Reviewed-by: Dmytro Poplavskiy --- src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp b/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp index 863b6d4..d52aa75 100644 --- a/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp +++ b/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp @@ -50,7 +50,7 @@ static int wuchi = qRegisterMetaType(); /*! - \class gstreamer::QGstreamerMessage + \class QGstreamerMessage \internal */ -- cgit v0.12 From a8d10340dce323030e6e3b197eb1849af303f4d0 Mon Sep 17 00:00:00 2001 From: Justin McPherson Date: Wed, 3 Mar 2010 16:03:26 +1000 Subject: QT7 mediaservice; Fix memory leak Reviewed-by: Dmytro Poplavskiy --- src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.mm b/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.mm index b046672..59d01a2 100644 --- a/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.mm +++ b/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.mm @@ -251,6 +251,7 @@ void QT7PlayerMetaDataControl::updateTags() readFormattedData(metaDataRef, kQTMetaDataStorageFormatiTunes, metaMap); } #else + AutoReleasePool pool; NSString *name = [movie attributeForKey:@"QTMovieDisplayNameAttribute"]; metaMap.insert(QLatin1String("nam"), QString::fromUtf8([name UTF8String])); #endif // QUICKTIME_C_API_AVAILABLE -- cgit v0.12 From 9b0747af7e6c456c4215879ece86f2f0dc9b7478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 3 Mar 2010 09:33:28 +0100 Subject: Mac: Select Carbon when using the 10.4u SDK. --- configure | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configure b/configure index 2c7e431..5aaf347 100755 --- a/configure +++ b/configure @@ -6074,6 +6074,15 @@ if [ "$PLATFORM_MAC" = "yes" ]; then fi fi +# select Carbon when using the 10.4u SDK +if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "TEST$CFG_SDK" = "TEST/Developer/SDKs/MacOSX10.4u.sdk/" ]; then + echo "Carbon on"; + CFG_MAC_COCOA="no"; + CFG_MAC_CARBON="yes"; + fi +fi + # set the global Mac deployment target. This is overridden on an arch-by-arch basis # in some cases, see code further down case "$PLATFORM,$CFG_MAC_COCOA" in -- cgit v0.12 From 6e0565eaa293b84f7583947822fe5939cb47af89 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 2 Mar 2010 15:39:28 +0100 Subject: remove a warning on windows and simplify a bit the code --- src/gui/dialogs/qfontdialog.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gui/dialogs/qfontdialog.cpp b/src/gui/dialogs/qfontdialog.cpp index a4bf15d..b987611 100644 --- a/src/gui/dialogs/qfontdialog.cpp +++ b/src/gui/dialogs/qfontdialog.cpp @@ -988,13 +988,10 @@ void QFontDialog::open(QObject *receiver, const char *member) */ void QFontDialog::setVisible(bool visible) { - Q_D(QFontDialog); - if (visible) { - if (testAttribute(Qt::WA_WState_ExplicitShowHide) && !testAttribute(Qt::WA_WState_Hidden)) - return; - } else if (testAttribute(Qt::WA_WState_ExplicitShowHide) && testAttribute(Qt::WA_WState_Hidden)) + if (testAttribute(Qt::WA_WState_ExplicitShowHide) && testAttribute(Qt::WA_WState_Hidden) != visible) return; #ifdef Q_WS_MAC + Q_D(QFontDialog); if (d->canBeNativeDialog()){ if (d->setVisible_sys(visible)){ d->nativeDialogInUse = true; -- cgit v0.12 From 60324267fbb8a8554e62aaf9ef01360709292320 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 2 Mar 2010 16:27:46 +0100 Subject: Make the sub-menu accessible via its shortcut even if it is the current Task-number: QTBUG-7411 Reviewed-by: ogoffart --- src/gui/widgets/qmenu.cpp | 12 ++---------- tests/auto/qmenu/tst_qmenu.cpp | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index e2cf25b..5db14b8 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -487,7 +487,7 @@ void QMenuPrivate::popupAction(QAction *action, int delay, bool activateFirst) if (action && action->isEnabled()) { if (!delay) q->internalDelayedPopup(); - else + else if (!QMenuPrivate::menuDelayTimer.isActive() && (!action->menu() || !action->menu()->isVisible())) QMenuPrivate::menuDelayTimer.start(delay, q); if (activateFirst && action->menu()) action->menu()->d_func()->setFirstActionActive(); @@ -543,15 +543,6 @@ void QMenuPrivate::setCurrentAction(QAction *action, int popup, SelectionReason { Q_Q(QMenu); tearoffHighlighted = 0; - if (action == currentAction) { - if (!action || !action->menu() || action->menu() == activeMenu) { - if(QMenu *menu = qobject_cast(causedPopup.widget)) { - if(causedPopup.action && menu->d_func()->activeMenu == q) - menu->d_func()->setCurrentAction(causedPopup.action, 0, reason, false); - } - } - return; - } if (currentAction) q->update(actionRect(currentAction)); @@ -565,6 +556,7 @@ void QMenuPrivate::setCurrentAction(QAction *action, int popup, SelectionReason #ifdef QT3_SUPPORT emitHighlighted = action; #endif + currentAction = action; if (action) { if (!action->isSeparator()) { diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp index 3559b15..e10d7ee 100644 --- a/tests/auto/qmenu/tst_qmenu.cpp +++ b/tests/auto/qmenu/tst_qmenu.cpp @@ -105,6 +105,7 @@ private slots: void deleteActionInTriggered(); void pushButtonPopulateOnAboutToShow(); void QTBUG7907_submenus_autoselect(); + void QTBUG7411_submenus_activate(); protected slots: void onActivated(QAction*); void onHighlighted(QAction*); @@ -948,6 +949,25 @@ void tst_QMenu::QTBUG7907_submenus_autoselect() QVERIFY(!subset.isVisible()); } +void tst_QMenu::QTBUG7411_submenus_activate() +{ + QMenu menu("Test Menu"); + QAction *act = menu.addAction("foo"); + QMenu sub1("&sub1"); + sub1.addAction("foo"); + sub1.setTitle("&sub1"); + QAction *act1 = menu.addMenu(&sub1); + menu.show(); + QTest::qWaitForWindowShown(&menu); + menu.setActiveAction(act); + QTest::keyPress(&menu, Qt::Key_Down); + QCOMPARE(menu.activeAction(), act1); + QVERIFY(!sub1.isVisible()); + QTest::keyPress(&menu, Qt::Key_S); + QTRY_VERIFY(sub1.isVisible()); +} + + QTEST_MAIN(tst_QMenu) #include "tst_qmenu.moc" -- cgit v0.12 From 97b8727635a73197fac4f5edb8a1122733933db4 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Tue, 2 Mar 2010 16:38:42 +0100 Subject: Application menu is not translated in Mac OS X Cocoa The application menu is loaded from the qt_menu.nib which only has English strings. These will now be translated using Qt's own translation mechanism. Every time a new translator is installed, the menu will now try to get the new string. Modification of qt_xx.ts files are done in a different patch. Task-number: QTBUG-4463 Reviewed-by: MortenS --- src/gui/kernel/qapplication.cpp | 16 ++++++++++++++++ src/gui/kernel/qcocoamenuloader_mac.mm | 20 ++++++++++++++++++++ src/gui/kernel/qcocoamenuloader_mac_p.h | 4 +++- src/gui/kernel/qt_cocoa_helpers_mac.mm | 8 ++++++++ src/gui/kernel/qt_cocoa_helpers_mac_p.h | 2 ++ src/gui/widgets/qmenu_mac.mm | 30 ++++++++++++++++++++++-------- 6 files changed, 71 insertions(+), 9 deletions(-) diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 203f637..fea8c37 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -2309,6 +2309,19 @@ static bool qt_detectRTLLanguage() " languages or to 'RTL' in right-to-left languages (such as Hebrew" " and Arabic) to get proper widget layout.") == QLatin1String("RTL")); } +#if defined(QT_MAC_USE_COCOA) +static const char *application_menu_strings[] = { + QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Services"), + QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide %1"), + QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide Others"), + QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Show All") + }; +QString qt_mac_applicationmenu_string(int type) +{ + return qApp->translate("MAC_APPLICATION_MENU", + application_menu_strings[type]); +} +#endif #endif /*!\reimp @@ -2337,6 +2350,9 @@ bool QApplication::event(QEvent *e) #ifndef QT_NO_TRANSLATION setLayoutDirection(qt_detectRTLLanguage()?Qt::RightToLeft:Qt::LeftToRight); #endif +#if defined(QT_MAC_USE_COCOA) + qt_mac_post_retranslateAppMenu(); +#endif QWidgetList list = topLevelWidgets(); for (int i = 0; i < list.size(); ++i) { QWidget *w = list.at(i); diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm index 573b763..35d156a 100644 --- a/src/gui/kernel/qcocoamenuloader_mac.mm +++ b/src/gui/kernel/qcocoamenuloader_mac.mm @@ -48,6 +48,7 @@ #include #include #include +#include QT_FORWARD_DECLARE_CLASS(QCFString) QT_FORWARD_DECLARE_CLASS(QString) @@ -58,6 +59,10 @@ QT_USE_NAMESPACE - (void)awakeFromNib { + servicesItem = [[appMenu itemWithTitle:@"Services"] retain]; + hideAllOthersItem = [[appMenu itemWithTitle:@"Hide Others"] retain]; + showAllItem = [[appMenu itemWithTitle:@"Show All"] retain]; + // Get the names in the nib to match the app name set by Qt. NSString *appName = reinterpret_cast(QCFString::toCFStringRef(qAppName())); [quitItem setTitle:[[quitItem title] stringByReplacingOccurrencesOfString:@"NewApplication" @@ -119,6 +124,10 @@ QT_USE_NAMESPACE - (void)dealloc { + [servicesItem release]; + [hideAllOthersItem release]; + [showAllItem release]; + [lastAppSpecificItem release]; [theMenu release]; [appMenu release]; @@ -214,6 +223,17 @@ QT_USE_NAMESPACE QMenuBarPrivate::macUpdateMenuBarImmediatly(); } +- (void)qtTranslateApplicationMenu +{ +#ifndef QT_NO_TRANSLATION + extern QString qt_mac_applicationmenu_string(int type); + [servicesItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(0))]; + [hideItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(1).arg(qAppName()))]; + [hideAllOthersItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(2))]; + [showAllItem setTitle: qt_mac_QStringToNSString(qt_mac_applicationmenu_string(3))]; +#endif +} + - (IBAction)qtDispatcherToQAction:(id)sender { QScopedLoopLevelCounter loopLevelCounter(QApplicationPrivate::instance()->threadData); diff --git a/src/gui/kernel/qcocoamenuloader_mac_p.h b/src/gui/kernel/qcocoamenuloader_mac_p.h index 2504b8c..a75ad0a 100644 --- a/src/gui/kernel/qcocoamenuloader_mac_p.h +++ b/src/gui/kernel/qcocoamenuloader_mac_p.h @@ -67,7 +67,9 @@ IBOutlet NSMenuItem *aboutQtItem; IBOutlet NSMenuItem *hideItem; NSMenuItem *lastAppSpecificItem; - + NSMenuItem *servicesItem; + NSMenuItem *hideAllOthersItem; + NSMenuItem *showAllItem; } - (void)ensureAppMenuInMenu:(NSMenu *)menu; - (void)removeActionsFromAppMenu; diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 19bae5a..4f4aec0 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1386,4 +1386,12 @@ QMacCocoaAutoReleasePool::~QMacCocoaAutoReleasePool() [(NSAutoreleasePool*)pool release]; } +void qt_mac_post_retranslateAppMenu() +{ +#ifdef QT_MAC_USE_COCOA + QMacCocoaAutoReleasePool pool; + qt_cocoaPostMessage([NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)], @selector(qtTranslateApplicationMenu)); +#endif +} + QT_END_NAMESPACE diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h index c43ea55..3fd62a4 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h +++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h @@ -208,4 +208,6 @@ bool qt_cocoaPostMessage(id target, SEL selector); #endif +void qt_mac_post_retranslateAppMenu(); + QT_END_NAMESPACE diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index 99c550f..2570cb5 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -924,14 +924,27 @@ static QString qt_mac_menu_merge_text(QMacMenuAction *action) else if (action->command == kHICommandQuit) ret = QMenuBar::tr("Quit %1").arg(qAppName()); #else - else if (action->menuItem == [loader aboutMenuItem]) - ret = QMenuBar::tr("About %1").arg(qAppName()); - else if (action->menuItem == [loader aboutQtMenuItem]) - ret = QMenuBar::tr("About Qt"); - else if (action->menuItem == [loader preferencesMenuItem]) - ret = QMenuBar::tr("Preferences"); - else if (action->menuItem == [loader quitMenuItem]) - ret = QMenuBar::tr("Quit %1").arg(qAppName()); + else if (action->menuItem == [loader aboutMenuItem]) { + if (action->action->text() == QString("About %1").arg(qAppName())) + ret = QMenuBar::tr("About %1").arg(qAppName()); + else + ret = action->action->text(); + } else if (action->menuItem == [loader aboutQtMenuItem]) { + if (action->action->text() == QString("About Qt")) + ret = QMenuBar::tr("About Qt"); + else + ret = action->action->text(); + } else if (action->menuItem == [loader preferencesMenuItem]) { + if (action->action->text() == QString("Preferences")) + ret = QMenuBar::tr("Preferences"); + else + ret = action->action->text(); + } else if (action->menuItem == [loader quitMenuItem]) { + if (action->action->text() == QString("Quit %1").arg(qAppName())) + ret = QMenuBar::tr("About %1").arg(qAppName()); + else + ret = action->action->text(); + } #endif return ret; } @@ -2180,3 +2193,4 @@ static OSMenuRef qt_mac_create_menu(QWidget *w) QT_END_NAMESPACE + -- cgit v0.12 From f006691acc45a57e011e5827163c0b3759864bf7 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 2 Mar 2010 17:18:26 +0100 Subject: make the fallback value of QMAKE_QMAKE absolute inspired by the pbx generator. currently this has no effect, as all generators build their own fallbacks anyway. Reviewed-by: mariusSO --- qmake/project.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index cf1c365..9e6db10 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -3139,7 +3139,8 @@ QStringList &QMakeProject::values(const QString &_var, QMap Date: Tue, 2 Mar 2010 17:10:46 +0100 Subject: don't have every generator duplicate the QMAKE_QMAKE logic Reviewed-by: mariusSO --- qmake/generators/mac/pbuilder_pbx.cpp | 4 +--- qmake/generators/makefile.cpp | 12 +++++------- qmake/generators/symbian/symmake_abld.cpp | 2 +- qmake/generators/symbian/symmake_sbsv2.cpp | 2 +- qmake/generators/unix/unixmake.cpp | 2 -- qmake/generators/unix/unixmake2.cpp | 4 ++-- qmake/generators/win32/borland_bmake.cpp | 2 -- qmake/generators/win32/mingw_make.cpp | 4 +--- qmake/generators/win32/msvc_nmake.cpp | 2 -- qmake/generators/win32/winmakefile.cpp | 3 +-- 10 files changed, 12 insertions(+), 25 deletions(-) diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index ac9fa99..1a7391b 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -523,9 +523,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) debug_msg(1, "pbuilder: Creating file: %s", mkfile.toLatin1().constData()); QTextStream mkt(&mkf); writeHeader(mkt); - mkt << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? - QString((QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmake")) : - var("QMAKE_QMAKE")) << endl; + mkt << "QMAKE = " << var("QMAKE_QMAKE") << endl; writeMakeQmake(mkt); mkt.flush(); mkf.close(); diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index a8c1c3c..b9d2445 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -806,9 +806,8 @@ MakefileGenerator::init() } // escape qmake command - if (!project->isEmpty("QMAKE_QMAKE")) { - project->values("QMAKE_QMAKE") = escapeFilePaths(project->values("QMAKE_QMAKE")); - } + QStringList &qmk = project->values("QMAKE_QMAKE"); + qmk = escapeFilePaths(qmk); } bool @@ -2097,7 +2096,7 @@ MakefileGenerator::writeExtraVariables(QTextStream &t) bool MakefileGenerator::writeStubMakefile(QTextStream &t) { - t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; QStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << *it << " "; @@ -2212,8 +2211,7 @@ MakefileGenerator::writeHeader(QTextStream &t) t << "# Project: " << fileFixify(project->projectFile()) << endl; t << "# Template: " << var("TEMPLATE") << endl; if(!project->isActiveConfig("build_pass")) - t << "# Command: " << build_args().replace("$(QMAKE)", - (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE"))) << endl; + t << "# Command: " << build_args().replace("$(QMAKE)", var("QMAKE_QMAKE")) << endl; t << "#############################################################################" << endl; t << endl; } @@ -2346,7 +2344,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QListisEmpty("MAKEFILE")) project->values("MAKEFILE").append("Makefile"); - if(project->isEmpty("QMAKE_QMAKE")) - project->values("QMAKE_QMAKE").append("qmake"); if(project->values("QMAKE_INTERNAL_QMAKE_DEPS").indexOf("qmake_all") == -1) project->values("QMAKE_INTERNAL_QMAKE_DEPS").append("qmake_all"); return; /* subdirs is done */ diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 025882e..5def030 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -81,7 +81,7 @@ UnixMakefileGenerator::writeMakefile(QTextStream &t) writeHeader(t); if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) { - t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; QStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << *it << " "; @@ -154,7 +154,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "AR = " << var("QMAKE_AR") << endl; t << "RANLIB = " << var("QMAKE_RANLIB") << endl; - t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; t << "TAR = " << var("QMAKE_TAR") << endl; t << "COMPRESS = " << var("QMAKE_GZIP") << endl; if(project->isActiveConfig("compile_libtool")) diff --git a/qmake/generators/win32/borland_bmake.cpp b/qmake/generators/win32/borland_bmake.cpp index 9208e1d..b5c33c4 100644 --- a/qmake/generators/win32/borland_bmake.cpp +++ b/qmake/generators/win32/borland_bmake.cpp @@ -115,8 +115,6 @@ BorlandMakefileGenerator::init() project->values("QMAKE_INSTALL_DIR").append("$(COPY_DIR)"); if(project->values("MAKEFILE").isEmpty()) project->values("MAKEFILE").append("Makefile"); - if(project->values("QMAKE_QMAKE").isEmpty()) - project->values("QMAKE_QMAKE").append("qmake"); return; } diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index e1f502f..fd43145 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -143,7 +143,7 @@ bool MingwMakefileGenerator::writeMakefile(QTextStream &t) if(project->first("TEMPLATE") == "app" || project->first("TEMPLATE") == "lib") { if(Option::mkfile::do_stub_makefile) { - t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; QStringList &qut = project->values("QMAKE_EXTRA_TARGETS"); for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) t << *it << " "; @@ -248,8 +248,6 @@ void MingwMakefileGenerator::init() project->values("QMAKE_INSTALL_DIR").append("$(COPY_DIR)"); if(project->values("MAKEFILE").isEmpty()) project->values("MAKEFILE").append("Makefile"); - if(project->values("QMAKE_QMAKE").isEmpty()) - project->values("QMAKE_QMAKE").append("qmake"); return; } diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 7566b23..92e8aeb 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -156,8 +156,6 @@ void NmakeMakefileGenerator::init() MakefileGenerator::init(); if(project->values("MAKEFILE").isEmpty()) project->values("MAKEFILE").append("Makefile"); - if(project->values("QMAKE_QMAKE").isEmpty()) - project->values("QMAKE_QMAKE").append("qmake"); if(project->isEmpty("QMAKE_COPY_FILE")) project->values("QMAKE_COPY_FILE").append("$(COPY)"); if(project->isEmpty("QMAKE_COPY_DIR")) diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 9998c1f..44fef5d 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -591,8 +591,7 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) writeIncPart(t); writeLibsPart(t); - t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : - Option::fixPathToTargetOS(var("QMAKE_QMAKE"), false)) << endl; + t << "QMAKE = " << var("QMAKE_QMAKE") << endl; t << "IDC = " << (project->isEmpty("QMAKE_IDC") ? QString("idc") : Option::fixPathToTargetOS(var("QMAKE_IDC"), false)) << endl; t << "IDL = " << (project->isEmpty("QMAKE_IDL") ? QString("midl") : -- cgit v0.12 From 509ac7e069bf17f2725dcebdeb8e9520b98b0e15 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 3 Mar 2010 11:35:33 +0100 Subject: qdoc3: Trying to find a bug that causes a crash. It doesn't crash on OS X, but it does on some other platforms. If you run into this crash running qdoc3, you can work around it by commenting out line 1539 in tools/qdoc3/htmlgenerator.cpp The line to comment out is: generateQmlInheritedBy(qml_cn, marker); --- tools/qdoc3/generator.cpp | 10 +++------- tools/qdoc3/node.cpp | 5 ++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 0ef5156..c8a39ef 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -1190,19 +1190,15 @@ void Generator::appendSortedQmlNames(Text& text, const NodeList& subs, CodeMarker *marker) { - NodeList::ConstIterator r; QMap classMap; int index = 0; qDebug() << "Generator::appendSortedQmlNames():" << base->name() << "is inherited by..."; - - r = subs.begin(); - while (r != subs.end()) { + for (int i = 0; i < subs.size(); ++i) { Text t; - qDebug() << " " << (*r)->name(); - appendFullName(t, (*r), base, marker); + qDebug() << " " << subs[i]->name(); + appendFullName(t, subs[i], base, marker); classMap[t.toString().toLower()] = t; - ++r; } QStringList names = classMap.keys(); diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 7dda824..5415559 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -1315,8 +1315,11 @@ void QmlClassNode::addInheritedBy(const QString& base, Node* sub) void QmlClassNode::subclasses(const QString& base, NodeList& subs) { subs.clear(); - if (inheritedBy.contains(base)) + if (inheritedBy.count(base) > 0) { subs = inheritedBy.values(base); + qDebug() << "QmlClassNode::subclasses():" << inheritedBy.count(base) << base + << "subs:" << subs.size(); + } } /*! -- cgit v0.12 From a4af046157c7ef94990f9520c4611597ff271c57 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Wed, 3 Mar 2010 11:42:12 +0100 Subject: fixed a memory leak when restoring a state in QMainWindow Task-number: QTBUG-8631 --- src/gui/widgets/qdockarealayout.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp index c1b1ea3..f44858a 100644 --- a/src/gui/widgets/qdockarealayout.cpp +++ b/src/gui/widgets/qdockarealayout.cpp @@ -1985,7 +1985,10 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList emit widget->dockLocationChanged(toDockWidgetArea(dockPos)); } } - + if (testing) { + //was it is not really added to the layout, we need to delete the object here + delete item.widgetItem; + } } } else if (nextMarker == SequenceMarker) { int dummy; -- cgit v0.12 From 24cf789b68f21b2d1ea31580e55c91a2cae25a12 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 3 Mar 2010 11:02:11 +0100 Subject: Fix compilation of Q_DECLARE_METATYPE(QVariant) by introducing QMetaType::QVariant After 03daf059647c0a0222e8774b0a083f58c8e64934 With the recent change in QMetaType, qRegisterMetaType instantiates QMetaTypeId2, which itself instantiates QMetaTypeId if T is not builtin into QMetaType. But qRegisterMetaType is called in qvariant.h which makes further call to Q_DECLARE_METATYPE(QVariant) to fail as QMetaTypeId would have been instantied before The solution is to make QVariant a builtin type. Reviewed-by: Thierry --- src/corelib/kernel/qmetatype.cpp | 15 +++++++++++++++ src/corelib/kernel/qmetatype.h | 5 ++++- src/corelib/kernel/qvariant.h | 3 +-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index be506b4..8f2d025 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -133,6 +133,7 @@ QT_BEGIN_NAMESPACE \value Float \c float \value QObjectStar QObject * \value QWidgetStar QWidget * + \value QVariant QVariant \value QColorGroup QColorGroup \value QCursor QCursor @@ -300,6 +301,7 @@ static const struct { const char * typeName; int typeNameLength; int type; } typ QT_ADD_STATIC_METATYPE("float", QMetaType::Float), QT_ADD_STATIC_METATYPE("QObject*", QMetaType::QObjectStar), QT_ADD_STATIC_METATYPE("QWidget*", QMetaType::QWidgetStar), + QT_ADD_STATIC_METATYPE("QVariant", QMetaType::QVariant), /* Type aliases - order doesn't matter */ QT_ADD_STATIC_METATYPE("unsigned long", QMetaType::ULong), @@ -686,6 +688,9 @@ bool QMetaType::save(QDataStream &stream, int type, const void *data) case QMetaType::QVariantList: stream << *static_cast(data); break; + case QMetaType::QVariant: + stream << *static_cast(data); + break; #endif case QMetaType::QByteArray: stream << *static_cast(data); @@ -888,6 +893,9 @@ bool QMetaType::load(QDataStream &stream, int type, void *data) case QMetaType::QVariantList: stream >> *static_cast< NS(QVariantList)*>(data); break; + case QMetaType::QVariant: + stream >> *static_cast< NS(QVariant)*>(data); + break; #endif case QMetaType::QByteArray: stream >> *static_cast< NS(QByteArray)*>(data); @@ -1055,6 +1063,8 @@ void *QMetaType::construct(int type, const void *copy) return new NS(QVariantHash)(*static_cast(copy)); case QMetaType::QVariantList: return new NS(QVariantList)(*static_cast(copy)); + case QMetaType::QVariant: + return new NS(QVariant)(*static_cast(copy)); #endif case QMetaType::QByteArray: return new NS(QByteArray)(*static_cast(copy)); @@ -1150,6 +1160,8 @@ void *QMetaType::construct(int type, const void *copy) return new NS(QVariantHash); case QMetaType::QVariantList: return new NS(QVariantList); + case QMetaType::QVariant: + return new NS(QVariant); #endif case QMetaType::QByteArray: return new NS(QByteArray); @@ -1291,6 +1303,9 @@ void QMetaType::destroy(int type, void *data) case QMetaType::QVariantList: delete static_cast< NS(QVariantList)* >(data); break; + case QMetaType::QVariant: + delete static_cast< NS(QVariant)* >(data); + break; #endif case QMetaType::QByteArray: delete static_cast< NS(QByteArray)* >(data); diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 2ed4a1f..98ed4bd 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -86,7 +86,8 @@ public: FirstCoreExtType = 128 /* VoidStar */, VoidStar = 128, Long = 129, Short = 130, Char = 131, ULong = 132, UShort = 133, UChar = 134, Float = 135, QObjectStar = 136, QWidgetStar = 137, - LastCoreExtType = QWidgetStar, + QVariant = 138, + LastCoreExtType = QVariant, // This logic must match the one in qglobal.h #if defined(QT_COORD_TYPE) @@ -353,6 +354,7 @@ class QVector2D; class QVector3D; class QVector4D; class QQuaternion; +class QVariant; QT_END_NAMESPACE @@ -421,6 +423,7 @@ Q_DECLARE_BUILTIN_METATYPE(QVector2D, QVector2D) Q_DECLARE_BUILTIN_METATYPE(QVector3D, QVector3D) Q_DECLARE_BUILTIN_METATYPE(QVector4D, QVector4D) Q_DECLARE_BUILTIN_METATYPE(QQuaternion, QQuaternion) +Q_DECLARE_BUILTIN_METATYPE(QVariant, QVariant) QT_END_HEADER diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 9628dbf..cb2825c 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -589,8 +589,7 @@ template inline T qvariant_cast(const QVariant &v) template<> inline QVariant qvariant_cast(const QVariant &v) { - static const int vid = qRegisterMetaType("QVariant"); - if (vid == v.userType()) + if (v.userType() == QMetaType::QVariant) return *reinterpret_cast(v.constData()); return v; } -- cgit v0.12 From 7a6f492a6dcf9140eda309dcdff6e0f8d321df19 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 3 Mar 2010 11:07:26 +0100 Subject: Fix QVariant autotest After 03daf059647c0a0222e8774b0a083f58c8e64934, typedef of int are just aliases to int, and therefor we need to use a real custom type for the test now Reviewed-by: Thierry --- tests/auto/qvariant/tst_qvariant.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp index a316dda..1a4182f 100644 --- a/tests/auto/qvariant/tst_qvariant.cpp +++ b/tests/auto/qvariant/tst_qvariant.cpp @@ -2518,15 +2518,23 @@ void tst_QVariant::variant_to() QCOMPARE(qVariantFromValue(0.25f).toDouble(), 0.25); } +struct Blah { int i; }; + +QDataStream& operator>>(QDataStream& s, Blah& c) +{ return (s >> c.i); } + +QDataStream& operator<<(QDataStream& s, const Blah& c) +{ return (s << c.i); } + void tst_QVariant::saveLoadCustomTypes() { QByteArray data; - int i = 42; - int tp = qRegisterMetaType("Blah"); + Blah i = { 42 }; + int tp = qRegisterMetaType("Blah"); QVariant v = QVariant(tp, &i); - qRegisterMetaTypeStreamOperators("Blah"); + qRegisterMetaTypeStreamOperators("Blah"); QCOMPARE(v.userType(), tp); QVERIFY(v.type() == QVariant::UserType); -- cgit v0.12 From 9957e85e37345e946ecc67196d65fbca867a2001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Wed, 3 Mar 2010 10:34:44 +0100 Subject: Add config.test for multimedia/qml using pkg-config from pri file is not good for cross-compiling Reviewed-by: paul --- config.tests/unix/pulseaudio/pulseaudio.pro | 4 ++ config.tests/unix/pulseaudio/pulseaudiotest.cpp | 49 +++++++++++++++++++++++++ configure | 15 ++++++++ src/multimedia/qml/qml.pri | 20 +++++----- 4 files changed, 79 insertions(+), 9 deletions(-) create mode 100644 config.tests/unix/pulseaudio/pulseaudio.pro create mode 100644 config.tests/unix/pulseaudio/pulseaudiotest.cpp diff --git a/config.tests/unix/pulseaudio/pulseaudio.pro b/config.tests/unix/pulseaudio/pulseaudio.pro new file mode 100644 index 0000000..698a35f --- /dev/null +++ b/config.tests/unix/pulseaudio/pulseaudio.pro @@ -0,0 +1,4 @@ +SOURCES = pulseaudiotest.cpp +LIBS+=-lpulse +CONFIG -= qt dylib +mac:CONFIG -= app_bundle diff --git a/config.tests/unix/pulseaudio/pulseaudiotest.cpp b/config.tests/unix/pulseaudio/pulseaudiotest.cpp new file mode 100644 index 0000000..eed88da --- /dev/null +++ b/config.tests/unix/pulseaudio/pulseaudiotest.cpp @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +int main(int ,char **) +{ + pa_threaded_mainloop *mainloop = pa_threaded_mainloop_new(); + return 0; +} + diff --git a/configure b/configure index 2312165..7ac4ff0 100755 --- a/configure +++ b/configure @@ -784,6 +784,7 @@ OPT_HELP= CFG_SILENT=no CFG_GRAPHICS_SYSTEM=default CFG_ALSA=auto +CFG_PULSEAUDIO=auto CFG_NETWORKMANAGER=auto CFG_COREWLAN=auto @@ -5945,6 +5946,14 @@ if [ "$CFG_ALSA" = "auto" ]; then fi fi +if [ "$CFG_PULSEAUDIO" = "auto" ]; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pulseaudio "pulseaudio" $L_FLAGS $I_FLAGS $l_FLAGS; then + CFG_PULSEAUDIO=yes + else + CFG_PULSEAUDIO=no + fi +fi + if [ "$CFG_NETWORKMANAGER" = "auto" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/networkmanager "NetworkManager" $L_FLAGS $I_FLAGS $l_FLAGS; then CFG_NETWORKMANAGER=yes @@ -6439,6 +6448,10 @@ if [ "$CFG_ALSA" = "yes" ]; then QT_CONFIG="$QT_CONFIG alsa" fi +if [ "$CFG_PULSEAUDIO" = "yes" ]; then + QT_CONFIG="$QT_CONFIG pulseaudio" +fi + if [ "$CFG_NETWORKMANAGER" = "yes" ]; then QT_CONFIG="$QT_CONFIG networkmanager" fi @@ -7154,6 +7167,7 @@ fi [ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR" [ "$CFG_XINPUT" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XINPUT" [ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA" +[ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO" [ "$CFG_NETWORKMANAGER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NETWORKMANAGER" [ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN" @@ -7657,6 +7671,7 @@ elif [ "$CFG_OPENSSL" = "linked" ]; then fi echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE" echo "Alsa support ........... $CFG_ALSA" +echo "Pulse Audio support .... $CFG_PULSEAUDIO" echo "NetworkManager support . $CFG_NETWORKMANAGER" if [ "$PLATFORM_MAC" = "yes" ]; then echo "CoreWlan support ....... $CFG_COREWLAN" diff --git a/src/multimedia/qml/qml.pri b/src/multimedia/qml/qml.pri index d0ff71d..d7aef1a 100644 --- a/src/multimedia/qml/qml.pri +++ b/src/multimedia/qml/qml.pri @@ -2,15 +2,17 @@ contains(QT_CONFIG, declarative) { QT += declarative - system(pkg-config --exists \'libpulse >= 0.9.10\') { - DEFINES += QT_MULTIMEDIA_PULSEAUDIO - HEADERS += $$PWD/qsoundeffect_pulse_p.h - SOURCES += $$PWD/qsoundeffect_pulse_p.cpp - LIBS += -lpulse - } else:x11 { - DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER - HEADERS += $$PWD/qsoundeffect_qmedia_p.h - SOURCES += $$PWD/qsoundeffect_qmedia_p.cpp + unix { + unix:contains(QT_CONFIG, pulseaudio) { + DEFINES += QT_MULTIMEDIA_PULSEAUDIO + HEADERS += $$PWD/qsoundeffect_pulse_p.h + SOURCES += $$PWD/qsoundeffect_pulse_p.cpp + LIBS += -lpulse + } else { + DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER + HEADERS += $$PWD/qsoundeffect_qmedia_p.h + SOURCES += $$PWD/qsoundeffect_qmedia_p.cpp + } } else { HEADERS += $$PWD/qsoundeffect_qsound_p.h SOURCES += $$PWD/qsoundeffect_qsound_p.cpp -- cgit v0.12 From 388bd11da343f5e7bc9928bc1151de18bc01fe7f Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Wed, 3 Mar 2010 11:56:56 +0100 Subject: Revert "Fixes crash when destroying a QGraphicsItem." The patch was wrong. The new one is pushed into 4.6. The old one is reverted to avoid merge conflicts. This reverts commit a7ef2d899d711d750238a8d69284da808188b407. --- src/gui/graphicsview/qgraphicsitem.cpp | 5 +-- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 57 -------------------------- 2 files changed, 2 insertions(+), 60 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 5735cd6..4f06f80 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -3179,9 +3179,8 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim */ void QGraphicsItem::clearFocus() { - // Pass focus to the closest parent focus scope when clearing focus - // from a focus scope. - if (!d_ptr->inDestructor && (d_ptr->flags & ItemIsFocusScope)) { + // Pass focus to the closest parent focus scope. + if (!d_ptr->inDestructor) { QGraphicsItem *p = d_ptr->parent; while (p) { if (p->flags() & ItemIsFocusScope) { diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 269ec24..7c1b97e 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -438,7 +438,6 @@ private slots: void QTBUG_6738_missingUpdateWithSetParent(); void QTBUG_7714_fullUpdateDiscardingOpacityUpdate2(); void QT_2653_fullUpdateDiscardingOpacityUpdate(); - void QT_2649_focusScope(); private: QList paintedItems; @@ -10003,61 +10002,5 @@ void tst_QGraphicsItem::QTBUG_7714_fullUpdateDiscardingOpacityUpdate2() QTRY_COMPARE(view.repaints, 1); } -void tst_QGraphicsItem::QT_2649_focusScope() -{ - QGraphicsScene *scene = new QGraphicsScene; - - QGraphicsRectItem *subFocusItem = new QGraphicsRectItem; - subFocusItem->setFlags(QGraphicsItem::ItemIsFocusable); - subFocusItem->setFocus(); - QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem); - - QGraphicsRectItem *scope = new QGraphicsRectItem; - scope->setFlags(QGraphicsItem::ItemIsFocusable | QGraphicsItem::ItemIsFocusScope); - scope->setFocus(); - subFocusItem->setParentItem(scope); - QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(subFocusItem->focusScopeItem(), (QGraphicsItem *)0); - QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem); - - QGraphicsRectItem *rootItem = new QGraphicsRectItem; - rootItem->setFlags(QGraphicsItem::ItemIsFocusable); - scope->setParentItem(rootItem); - QCOMPARE(rootItem->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(rootItem->focusScopeItem(), (QGraphicsItem *)0); - QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(subFocusItem->focusScopeItem(), (QGraphicsItem *)0); - QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem); - - scene->addItem(rootItem); - - QEvent windowActivate(QEvent::WindowActivate); - qApp->sendEvent(scene, &windowActivate); - scene->setFocus(); - - QCOMPARE(rootItem->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(rootItem->focusScopeItem(), (QGraphicsItem *)0); - QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(subFocusItem->focusScopeItem(), (QGraphicsItem *)0); - QVERIFY(subFocusItem->hasFocus()); - - //If we hide the focusScope, the entire subFocus chain should be cleared - scope->hide(); - - QCOMPARE(rootItem->focusItem(), (QGraphicsItem *)0); - QCOMPARE(scope->focusItem(), (QGraphicsItem *)0); - QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)0); - QCOMPARE(rootItem->focusScopeItem(), (QGraphicsItem *)0); - QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem); - QCOMPARE(subFocusItem->focusScopeItem(), (QGraphicsItem *)0); - QVERIFY(!subFocusItem->hasFocus()); - - delete scene; -} - QTEST_MAIN(tst_QGraphicsItem) #include "tst_qgraphicsitem.moc" -- cgit v0.12 From 4a5eaccce02dbabfd81e8809d453fc268cdba644 Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 2 Mar 2010 14:38:39 +0100 Subject: Some cleanup of outdated src/3rdparty stuff Reviewed-by: trustme --- src/3rdparty/README | 34 +- src/3rdparty/patches/freetype-2.3.5-config.patch | 265 --------------- src/3rdparty/patches/freetype-2.3.6-ascii.patch | 174 ---------- src/3rdparty/patches/freetype-2.3.6-vxworks.patch | 35 -- src/3rdparty/patches/libjpeg-6b-config.patch | 50 --- src/3rdparty/patches/libjpeg-6b-vxworks.patch | 23 -- .../patches/libpng-1.2.20-elf-visibility.patch | 17 - src/3rdparty/patches/libpng-1.2.20-vxworks.patch | 13 - src/3rdparty/patches/libtiff-3.8.2-config.patch | 374 --------------------- src/3rdparty/patches/libtiff-3.8.2-vxworks.patch | 11 - src/3rdparty/patches/sqlite-3.5.6-config.patch | 38 --- src/3rdparty/patches/sqlite-3.5.6-vxworks.patch | 68 ---- src/3rdparty/patches/sqlite-3.5.6-wince.patch | 19 -- 13 files changed, 15 insertions(+), 1106 deletions(-) delete mode 100644 src/3rdparty/patches/freetype-2.3.5-config.patch delete mode 100644 src/3rdparty/patches/freetype-2.3.6-ascii.patch delete mode 100644 src/3rdparty/patches/freetype-2.3.6-vxworks.patch delete mode 100644 src/3rdparty/patches/libjpeg-6b-config.patch delete mode 100644 src/3rdparty/patches/libjpeg-6b-vxworks.patch delete mode 100644 src/3rdparty/patches/libpng-1.2.20-elf-visibility.patch delete mode 100644 src/3rdparty/patches/libpng-1.2.20-vxworks.patch delete mode 100644 src/3rdparty/patches/libtiff-3.8.2-config.patch delete mode 100644 src/3rdparty/patches/libtiff-3.8.2-vxworks.patch delete mode 100644 src/3rdparty/patches/sqlite-3.5.6-config.patch delete mode 100644 src/3rdparty/patches/sqlite-3.5.6-vxworks.patch delete mode 100644 src/3rdparty/patches/sqlite-3.5.6-wince.patch diff --git a/src/3rdparty/README b/src/3rdparty/README index ef05674..0248db1 100644 --- a/src/3rdparty/README +++ b/src/3rdparty/README @@ -1,26 +1,22 @@ The libraries included here are the original packages, unpacked, and with their version number removed from the directory name (for version -information, see the README files in the directories). The following -have been removed: - - libjpeg - some source files, images, Makefiles, manual pages - libpng/contrib - a collection of examples and test-suite - libmng/bcb - a collection of files for the Borland compiler - libmng/contrib - a collection of projects that use libmng - libmng/special - configuration file for Mozilla integration - libtiff/contrib - a collection of additions to libtiff - libtiff/man - manual pages - libtiff/tools - a collection of command-line tools based on libtiff - zlib/contrib - a collection of non-zlib code - zlib/amiga - zlib for a platform not supported by Qt - zlib/as400 - zlib for a platform not supported by Qt - zlib/msdos - zlib for a platform not supported by Qt - zlib/old - zlib for a platform not supported by Qt - zlib/qnx - zlib packaging +information, see the README files in the directories). -Some patches are applied from time to time. Recent patches can be -found in the patches subdirectory. +Certain files and subdirectories of the original library packages that +are irrelevant to Qt may not be included here. Typically, those are +the standalone library configuration and make files, tools, test +files, contribs, documentation, and similar. +Patches may have been applied, typically for configuration and build +issues in the Qt framework. Such patches can be reviewed in the the +public git repository; they will appear in the commit logs of each +library directory, following the latest clean version update commit. + +The 'patches' subdirectory contains certain patches applied prior to +the start of the public git history, where the library has not been +updated since. + +-- The pvr2d.h & wsegl.h in the powervr directory are required for building the PowerVR plugin on Qt for Embedded Linux. These headers are for SGX diff --git a/src/3rdparty/patches/freetype-2.3.5-config.patch b/src/3rdparty/patches/freetype-2.3.5-config.patch deleted file mode 100644 index 2653467..0000000 --- a/src/3rdparty/patches/freetype-2.3.5-config.patch +++ /dev/null @@ -1,265 +0,0 @@ ---- builds/unix/ftconfig.h 1970-01-01 01:00:00.000000000 +0100 -+++ builds/unix/ftconfig.h 2007-07-15 00:00:00.000000000 +0200 -@@ -0,0 +1,262 @@ -+/* ftconfig.h. Generated by configure. */ -+/***************************************************************************/ -+/* */ -+/* ftconfig.in */ -+/* */ -+/* UNIX-specific configuration file (specification only). */ -+/* */ -+/* Copyright 1996-2000, 2002 by */ -+/* David Turner, Robert Wilhelm, and Werner Lemberg. */ -+/* */ -+/* This file is part of the FreeType project, and may only be used, */ -+/* modified, and distributed under the terms of the FreeType project */ -+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ -+/* this file you indicate that you have read the license and */ -+/* understand and accept it fully. */ -+/* */ -+/***************************************************************************/ -+ -+ -+ /*************************************************************************/ -+ /* */ -+ /* This header file contains a number of macro definitions that are used */ -+ /* by the rest of the engine. Most of the macros here are automatically */ -+ /* determined at compile time, and you should not need to change it to */ -+ /* port FreeType, except to compile the library with a non-ANSI */ -+ /* compiler. */ -+ /* */ -+ /* Note however that if some specific modifications are needed, we */ -+ /* advise you to place a modified copy in your build directory. */ -+ /* */ -+ /* The build directory is usually `freetype/builds/', and */ -+ /* contains system-specific files that are always included first when */ -+ /* building the library. */ -+ /* */ -+ /*************************************************************************/ -+ -+ -+#ifndef __FTCONFIG_H__ -+#define __FTCONFIG_H__ -+ -+#include -+#include FT_CONFIG_OPTIONS_H -+#include FT_CONFIG_STANDARD_LIBRARY_H -+ -+ -+FT_BEGIN_HEADER -+ -+ -+ /*************************************************************************/ -+ /* */ -+ /* PLATFORM-SPECIFIC CONFIGURATION MACROS */ -+ /* */ -+ /* These macros can be toggled to suit a specific system. The current */ -+ /* ones are defaults used to compile FreeType in an ANSI C environment */ -+ /* (16bit compilers are also supported). Copy this file to your own */ -+ /* `freetype/builds/' directory, and edit it to port the engine. */ -+ /* */ -+ /*************************************************************************/ -+ -+ -+#define HAVE_UNISTD_H 1 -+#define HAVE_FCNTL_H 1 -+ -+#define SIZEOF_INT 4 -+#define SIZEOF_LONG 4 -+ -+#define FT_SIZEOF_INT SIZEOF_INT -+#define FT_SIZEOF_LONG SIZEOF_LONG -+ -+ -+ /* Preferred alignment of data */ -+#define FT_ALIGNMENT 8 -+ -+ -+ /* FT_UNUSED is a macro used to indicate that a given parameter is not */ -+ /* used -- this is only used to get rid of unpleasant compiler warnings */ -+#ifndef FT_UNUSED -+#define FT_UNUSED( arg ) ( (arg) = (arg) ) -+#endif -+ -+ -+ /*************************************************************************/ -+ /* */ -+ /* AUTOMATIC CONFIGURATION MACROS */ -+ /* */ -+ /* These macros are computed from the ones defined above. Don't touch */ -+ /* their definition, unless you know precisely what you are doing. No */ -+ /* porter should need to mess with them. */ -+ /* */ -+ /*************************************************************************/ -+ -+ -+ /*************************************************************************/ -+ /* */ -+ /* IntN types */ -+ /* */ -+ /* Used to guarantee the size of some specific integers. */ -+ /* */ -+ typedef signed short FT_Int16; -+ typedef unsigned short FT_UInt16; -+ -+#if FT_SIZEOF_INT == 4 -+ -+ typedef signed int FT_Int32; -+ typedef unsigned int FT_UInt32; -+ -+#elif FT_SIZEOF_LONG == 4 -+ -+ typedef signed long FT_Int32; -+ typedef unsigned long FT_UInt32; -+ -+#else -+#error "no 32bit type found -- please check your configuration files" -+#endif -+ -+#if FT_SIZEOF_LONG == 8 -+ -+ /* FT_LONG64 must be defined if a 64-bit type is available */ -+#define FT_LONG64 -+#define FT_INT64 long -+ -+#else -+ -+ /*************************************************************************/ -+ /* */ -+ /* Many compilers provide the non-ANSI `long long' 64-bit type. You can */ -+ /* activate it by defining the FTCALC_USE_LONG_LONG macro in */ -+ /* `ftoption.h'. */ -+ /* */ -+ /* Note that this will produce many -ansi warnings during library */ -+ /* compilation, and that in many cases, the generated code will be */ -+ /* neither smaller nor faster! */ -+ /* */ -+#ifdef FTCALC_USE_LONG_LONG -+ -+#define FT_LONG64 -+#define FT_INT64 long long -+ -+#endif /* FTCALC_USE_LONG_LONG */ -+#endif /* FT_SIZEOF_LONG == 8 */ -+ -+ -+#ifdef FT_MAKE_OPTION_SINGLE_OBJECT -+ -+#define FT_LOCAL( x ) static x -+#define FT_LOCAL_DEF( x ) static x -+ -+#else -+ -+#ifdef __cplusplus -+#define FT_LOCAL( x ) extern "C" x -+#define FT_LOCAL_DEF( x ) extern "C" x -+#else -+#define FT_LOCAL( x ) extern x -+#define FT_LOCAL_DEF( x ) extern x -+#endif -+ -+#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */ -+ -+ -+#ifndef FT_BASE -+ -+#ifdef __cplusplus -+#define FT_BASE( x ) extern "C" x -+#else -+#define FT_BASE( x ) extern x -+#endif -+ -+#endif /* !FT_BASE */ -+ -+ -+#ifndef FT_BASE_DEF -+ -+#ifdef __cplusplus -+#define FT_BASE_DEF( x ) extern "C" x -+#else -+#define FT_BASE_DEF( x ) extern x -+#endif -+ -+#endif /* !FT_BASE_DEF */ -+ -+ -+#ifndef FT_EXPORT -+ -+#ifdef __cplusplus -+#define FT_EXPORT( x ) extern "C" x -+#else -+#define FT_EXPORT( x ) extern x -+#endif -+ -+#endif /* !FT_EXPORT */ -+ -+ -+#ifndef FT_EXPORT_DEF -+ -+#ifdef __cplusplus -+#define FT_EXPORT_DEF( x ) extern "C" x -+#else -+#define FT_EXPORT_DEF( x ) extern x -+#endif -+ -+#endif /* !FT_EXPORT_DEF */ -+ -+ -+#ifndef FT_EXPORT_VAR -+ -+#ifdef __cplusplus -+#define FT_EXPORT_VAR( x ) extern "C" x -+#else -+#define FT_EXPORT_VAR( x ) extern x -+#endif -+ -+#endif /* !FT_EXPORT_VAR */ -+ -+ /* The following macros are needed to compile the library with a */ -+ /* C++ compiler and with 16bit compilers. */ -+ /* */ -+ -+ /* This is special. Within C++, you must specify `extern "C"' for */ -+ /* functions which are used via function pointers, and you also */ -+ /* must do that for structures which contain function pointers to */ -+ /* assure C linkage -- it's not possible to have (local) anonymous */ -+ /* functions which are accessed by (global) function pointers. */ -+ /* */ -+ /* */ -+ /* FT_CALLBACK_DEF is used to _define_ a callback function. */ -+ /* */ -+ /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */ -+ /* contains pointers to callback functions. */ -+ /* */ -+ /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */ -+ /* that contains pointers to callback functions. */ -+ /* */ -+ /* */ -+ /* Some 16bit compilers have to redefine these macros to insert */ -+ /* the infamous `_cdecl' or `__fastcall' declarations. */ -+ /* */ -+#ifndef FT_CALLBACK_DEF -+#ifdef __cplusplus -+#define FT_CALLBACK_DEF( x ) extern "C" x -+#else -+#define FT_CALLBACK_DEF( x ) static x -+#endif -+#endif /* FT_CALLBACK_DEF */ -+ -+#ifndef FT_CALLBACK_TABLE -+#ifdef __cplusplus -+#define FT_CALLBACK_TABLE extern "C" -+#define FT_CALLBACK_TABLE_DEF extern "C" -+#else -+#define FT_CALLBACK_TABLE extern -+#define FT_CALLBACK_TABLE_DEF /* nothing */ -+#endif -+#endif /* FT_CALLBACK_TABLE */ -+ -+ -+FT_END_HEADER -+ -+#endif /* __FTCONFIG_H__ */ -+ -+ -+/* END */ diff --git a/src/3rdparty/patches/freetype-2.3.6-ascii.patch b/src/3rdparty/patches/freetype-2.3.6-ascii.patch deleted file mode 100644 index cc46296..0000000 --- a/src/3rdparty/patches/freetype-2.3.6-ascii.patch +++ /dev/null @@ -1,174 +0,0 @@ ---- include/freetype/ftbbox.h.orig 2007-10-20 15:27:57.000000000 +0200 -+++ include/freetype/ftbbox.h 2008-06-15 00:00:00.000000000 +0200 -@@ -61,7 +61,7 @@ - /* Computes the exact bounding box of an outline. This is slower */ - /* than computing the control box. However, it uses an advanced */ - /* algorithm which returns _very_ quickly when the two boxes */ -- /* coincide. Otherwise, the outline Bézier arcs are traversed to */ -+ /* coincide. Otherwise, the outline Bezier arcs are traversed to */ - /* extract their extrema. */ - /* */ - /* */ ---- include/freetype/ftglyph.h.orig 2008-04-13 23:58:59.000000000 +0200 -+++ include/freetype/ftglyph.h 2008-06-15 00:00:00.000000000 +0200 -@@ -354,10 +354,10 @@ - /* */ - /* */ - /* Return a glyph's `control box'. The control box encloses all the */ -- /* outline's points, including Bézier control points. Though it */ -+ /* outline's points, including Bezier control points. Though it */ - /* coincides with the exact bounding box for most glyphs, it can be */ - /* slightly larger in some situations (like when rotating an outline */ -- /* which contains Bézier outside arcs). */ -+ /* which contains Bezier outside arcs). */ - /* */ - /* Computing the control box is very fast, while getting the bounding */ - /* box can take much more time as it needs to walk over all segments */ ---- include/freetype/ftimage.h.orig 2008-05-31 08:46:38.000000000 +0200 -+++ include/freetype/ftimage.h 2008-06-15 00:00:00.000000000 +0200 -@@ -318,11 +318,11 @@ - /* */ - /* tags :: A pointer to an array of `n_points' chars, giving */ - /* each outline point's type. If bit 0 is unset, the */ -- /* point is `off' the curve, i.e., a Bézier control */ -+ /* point is `off' the curve, i.e., a Bezier control */ - /* point, while it is `on' when set. */ - /* */ - /* Bit 1 is meaningful for `off' points only. If set, */ -- /* it indicates a third-order Bézier arc control point; */ -+ /* it indicates a third-order Bezier arc control point; */ - /* and a second-order control point if unset. */ - /* */ - /* contours :: An array of `n_contours' shorts, giving the end */ -@@ -528,7 +528,7 @@ - /* A function pointer type use to describe the signature of a `conic */ - /* to' function during outline walking/decomposition. */ - /* */ -- /* A `conic to' is emitted to indicate a second-order Bézier arc in */ -+ /* A `conic to' is emitted to indicate a second-order Bezier arc in */ - /* the outline. */ - /* */ - /* */ -@@ -560,12 +560,12 @@ - /* A function pointer type used to describe the signature of a `cubic */ - /* to' function during outline walking/decomposition. */ - /* */ -- /* A `cubic to' is emitted to indicate a third-order Bézier arc. */ -+ /* A `cubic to' is emitted to indicate a third-order Bezier arc. */ - /* */ - /* */ -- /* control1 :: A pointer to the first Bézier control point. */ -+ /* control1 :: A pointer to the first Bezier control point. */ - /* */ -- /* control2 :: A pointer to the second Bézier control point. */ -+ /* control2 :: A pointer to the second Bezier control point. */ - /* */ - /* to :: A pointer to the target end point. */ - /* */ -@@ -591,7 +591,7 @@ - /* */ - /* */ - /* A structure to hold various function pointers used during outline */ -- /* decomposition in order to emit segments, conic, and cubic Béziers, */ -+ /* decomposition in order to emit segments, conic, and cubic Beziers, */ - /* as well as `move to' and `close to' operations. */ - /* */ - /* */ -@@ -599,9 +599,9 @@ - /* */ - /* line_to :: The segment emitter. */ - /* */ -- /* conic_to :: The second-order Bézier arc emitter. */ -+ /* conic_to :: The second-order Bezier arc emitter. */ - /* */ -- /* cubic_to :: The third-order Bézier arc emitter. */ -+ /* cubic_to :: The third-order Bezier arc emitter. */ - /* */ - /* shift :: The shift that is applied to coordinates before they */ - /* are sent to the emitter. */ -@@ -698,7 +698,7 @@ - /* */ - /* FT_GLYPH_FORMAT_OUTLINE :: */ - /* The glyph image is a vectorial outline made of line segments */ -- /* and Bézier arcs; it can be described as an @FT_Outline; you */ -+ /* and Bezier arcs; it can be described as an @FT_Outline; you */ - /* generally want to access the `outline' field of the */ - /* @FT_GlyphSlotRec structure to read it. */ - /* */ ---- include/freetype/ftoutln.h.orig 2008-05-29 00:05:07.000000000 +0200 -+++ include/freetype/ftoutln.h 2008-06-15 00:00:00.000000000 +0200 -@@ -85,7 +85,7 @@ - /* */ - /* */ - /* Walks over an outline's structure to decompose it into individual */ -- /* segments and Bézier arcs. This function is also able to emit */ -+ /* segments and Bezier arcs. This function is also able to emit */ - /* `move to' and `close to' operations to indicate the start and end */ - /* of new contours in the outline. */ - /* */ -@@ -213,10 +213,10 @@ - /* */ - /* */ - /* Returns an outline's `control box'. The control box encloses all */ -- /* the outline's points, including Bézier control points. Though it */ -+ /* the outline's points, including Bezier control points. Though it */ - /* coincides with the exact bounding box for most glyphs, it can be */ - /* slightly larger in some situations (like when rotating an outline */ -- /* which contains Bézier outside arcs). */ -+ /* which contains Bezier outside arcs). */ - /* */ - /* Computing the control box is very fast, while getting the bounding */ - /* box can take much more time as it needs to walk over all segments */ ---- include/freetype/ftstroke.h.orig 2008-05-29 00:06:54.000000000 +0200 -+++ include/freetype/ftstroke.h 2008-06-15 00:00:00.000000000 +0200 -@@ -407,7 +407,7 @@ - * FT_Stroker_ConicTo - * - * @description: -- * `Draw' a single quadratic Bézier in the stroker's current sub-path, -+ * `Draw' a single quadratic Bezier in the stroker's current sub-path, - * from the last position. - * - * @input: -@@ -415,7 +415,7 @@ - * The target stroker handle. - * - * control :: -- * A pointer to a Bézier control point. -+ * A pointer to a Bezier control point. - * - * to :: - * A pointer to the destination point. -@@ -439,7 +439,7 @@ - * FT_Stroker_CubicTo - * - * @description: -- * `Draw' a single cubic Bézier in the stroker's current sub-path, -+ * `Draw' a single cubic Bezier in the stroker's current sub-path, - * from the last position. - * - * @input: -@@ -447,10 +447,10 @@ - * The target stroker handle. - * - * control1 :: -- * A pointer to the first Bézier control point. -+ * A pointer to the first Bezier control point. - * - * control2 :: -- * A pointer to second Bézier control point. -+ * A pointer to second Bezier control point. - * - * to :: - * A pointer to the destination point. ---- include/freetype/ftwinfnt.h.orig 2008-05-28 23:27:19.000000000 +0200 -+++ include/freetype/ftwinfnt.h 2008-06-15 00:00:00.000000000 +0200 -@@ -77,7 +77,7 @@ - * Mac Roman encoding. - * - * FT_WinFNT_ID_OEM :: -- * From Michael Pöttgen : -+ * From Michael Poettgen : - * - * The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM - * is used for the charset of vector fonts, like `modern.fon', diff --git a/src/3rdparty/patches/freetype-2.3.6-vxworks.patch b/src/3rdparty/patches/freetype-2.3.6-vxworks.patch deleted file mode 100644 index 21e884c..0000000 --- a/src/3rdparty/patches/freetype-2.3.6-vxworks.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git builds/unix/ftsystem.c builds/unix/ftsystem.c -index 3a740fd..40fa8d0 100644 ---- builds/unix/ftsystem.c -+++ builds/unix/ftsystem.c -@@ -69,6 +69,9 @@ - #include - #include - -+#ifdef VXWORKS -+#include -+#endif - - /*************************************************************************/ - /* */ -@@ -238,7 +241,7 @@ - return FT_Err_Invalid_Stream_Handle; - - /* open the file */ -- file = open( filepathname, O_RDONLY ); -+ file = open( filepathname, O_RDONLY, 0); - if ( file < 0 ) - { - FT_ERROR(( "FT_Stream_Open:" )); -@@ -317,7 +320,11 @@ - - - read_count = read( file, -+#ifndef VXWORKS - stream->base + total_read_count, -+#else -+ (char *) stream->base + total_read_count, -+#endif - stream->size - total_read_count ); - - if ( read_count <= 0 ) diff --git a/src/3rdparty/patches/libjpeg-6b-config.patch b/src/3rdparty/patches/libjpeg-6b-config.patch deleted file mode 100644 index 3012b8f..0000000 --- a/src/3rdparty/patches/libjpeg-6b-config.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- jconfig.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ jconfig.h 2006-06-15 00:00:00.000000000 +0200 -@@ -0,0 +1,47 @@ -+/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ -+/* see jconfig.doc for explanations */ -+ -+#define HAVE_PROTOTYPES -+#define HAVE_UNSIGNED_CHAR -+#define HAVE_UNSIGNED_SHORT -+/* #define void char */ -+/* #define const */ -+#undef CHAR_IS_UNSIGNED -+#define HAVE_STDDEF_H -+#define HAVE_STDLIB_H -+#undef NEED_BSD_STRINGS -+#undef NEED_SYS_TYPES_H -+#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ -+#undef NEED_SHORT_EXTERNAL_NAMES -+#undef INCOMPLETE_TYPES_BROKEN -+ -+#if defined(_WIN32) -+/* Define "boolean" as unsigned char, not int, per Windows custom */ -+#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -+typedef unsigned char boolean; -+#endif -+#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ -+#endif -+ -+ -+#ifdef JPEG_INTERNALS -+ -+#undef RIGHT_SHIFT_IS_UNSIGNED -+ -+#endif /* JPEG_INTERNALS */ -+ -+#ifdef JPEG_CJPEG_DJPEG -+ -+#define BMP_SUPPORTED /* BMP image file format */ -+#define GIF_SUPPORTED /* GIF image file format */ -+#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -+#undef RLE_SUPPORTED /* Utah RLE image file format */ -+#define TARGA_SUPPORTED /* Targa image file format */ -+ -+#define TWO_FILE_COMMANDLINE /* optional */ -+#define USE_SETMODE /* Microsoft has setmode() */ -+#undef NEED_SIGNAL_CATCHER -+#undef DONT_USE_B_MODE -+#undef PROGRESS_REPORT /* optional */ -+ -+#endif /* JPEG_CJPEG_DJPEG */ diff --git a/src/3rdparty/patches/libjpeg-6b-vxworks.patch b/src/3rdparty/patches/libjpeg-6b-vxworks.patch deleted file mode 100644 index 263c8d0..0000000 --- a/src/3rdparty/patches/libjpeg-6b-vxworks.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git jmorecfg.h jmorecfg.h -index 54a7d1c..b0b5870 100644 ---- jmorecfg.h -+++ jmorecfg.h -@@ -157,7 +157,7 @@ typedef short INT16; - - /* INT32 must hold at least signed 32-bit values. */ - --#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ -+#if !defined(XMD_H) && !defined(VXWORKS) /* X11/xmd.h correctly defines INT32 */ - typedef long INT32; - #endif - -@@ -183,6 +183,9 @@ typedef unsigned int JDIMENSION; - /* a function called through method pointers: */ - #define METHODDEF(type) static type - /* a function used only in its module: */ -+#if defined(VXWORKS) && defined(LOCAL) -+# undef LOCAL -+#endif - #define LOCAL(type) static type - /* a function referenced thru EXTERNs: */ - #define GLOBAL(type) type diff --git a/src/3rdparty/patches/libpng-1.2.20-elf-visibility.patch b/src/3rdparty/patches/libpng-1.2.20-elf-visibility.patch deleted file mode 100644 index a374cbf..0000000 --- a/src/3rdparty/patches/libpng-1.2.20-elf-visibility.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- pngconf.h.orig 2007-09-08 05:22:56.000000000 +0200 -+++ pngconf.h 2007-09-09 00:00:00.000000000 +0200 -@@ -1375,6 +1375,14 @@ - # if 0 /* ... other platforms, with other meanings */ - # endif - # endif -+ -+# if !defined(PNG_IMPEXP) -+# include -+# if defined(QT_VISIBILITY_AVAILABLE) -+# define PNG_IMPEXP __attribute__((visibility("default"))) -+# endif -+# endif -+ - #endif - - #ifndef PNGAPI diff --git a/src/3rdparty/patches/libpng-1.2.20-vxworks.patch b/src/3rdparty/patches/libpng-1.2.20-vxworks.patch deleted file mode 100644 index 4c49b3f..0000000 --- a/src/3rdparty/patches/libpng-1.2.20-vxworks.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git pngconf.h pngconf.h -index 19e4732..8eb7d35 100644 ---- pngconf.h -+++ pngconf.h -@@ -344,7 +344,7 @@ - # endif /* __linux__ */ - #endif /* PNG_SETJMP_SUPPORTED */ - --#ifdef BSD -+#if defined(BSD) && !defined(VXWORKS) - # include - #else - # include diff --git a/src/3rdparty/patches/libtiff-3.8.2-config.patch b/src/3rdparty/patches/libtiff-3.8.2-config.patch deleted file mode 100644 index 44230ea..0000000 --- a/src/3rdparty/patches/libtiff-3.8.2-config.patch +++ /dev/null @@ -1,374 +0,0 @@ ---- libtiff/tif_config.h 1970-01-01 01:00:00.000000000 +0100 -+++ libtiff/tif_config.h 2008-05-25 00:00:00.000000000 +0200 -@@ -0,0 +1,296 @@ -+/* -+ Configuration defines by Trolltech. -+*/ -+ -+#include -+#if defined(Q_OS_WINCE) -+# include -+#endif -+ -+/* Support CCITT Group 3 & 4 algorithms */ -+#define CCITT_SUPPORT 1 -+ -+/* Pick up YCbCr subsampling info from the JPEG data stream to support files -+ lacking the tag (default enabled). */ -+#define CHECK_JPEG_YCBCR_SUBSAMPLING 1 -+ -+/* Support C++ stream API (requires C++ compiler) */ -+/* #undef CXX_SUPPORT */ -+ -+/* Treat extra sample as alpha (default enabled). The RGBA interface will -+ treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many -+ packages produce RGBA files but don't mark the alpha properly. */ -+#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1 -+ -+/* Use the Apple OpenGL framework. */ -+/* #undef HAVE_APPLE_OPENGL_FRAMEWORK */ -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_ASSERT_H 1 -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_DLFCN_H */ -+ -+/* Define to 1 if you have the header file. */ -+#if !defined(Q_OS_WINCE) -+#define HAVE_FCNTL_H 1 -+#endif -+ -+/* Define to 1 if you have the `floor' function. */ -+/* #undef HAVE_FLOOR */ -+ -+/* Define to 1 if you have the `getopt' function. */ -+/* #undef HAVE_GETOPT */ -+ -+/* Define as 0 or 1 according to the floating point format suported by the -+ machine */ -+#define HAVE_IEEEFP 1 -+ -+/* Define to 1 if the system has the type `int16'. */ -+/* #undef HAVE_INT16 */ -+#ifdef Q_OS_AIX -+#define HAVE_INT16 1 -+#endif -+ -+/* Define to 1 if the system has the type `int32'. */ -+/* #undef HAVE_INT32 */ -+#ifdef Q_OS_AIX -+#define HAVE_INT32 1 -+#endif -+ -+/* Define to 1 if the system has the type `int8'. */ -+/* #undef HAVE_INT8 */ -+#ifdef Q_OS_AIX -+#define HAVE_INT8 1 -+#endif -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_INTTYPES_H */ -+ -+/* Define to 1 if you have the `isascii' function. */ -+/* #undef HAVE_ISASCII */ -+ -+/* Define to 1 if you have the `lfind' function. */ -+/* #undef HAVE_LFIND */ -+ -+/* Define to 1 if you have the `c' library (-lc). */ -+/* #undef HAVE_LIBC */ -+ -+/* Define to 1 if you have the `m' library (-lm). */ -+/* #undef HAVE_LIBM */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_LIMITS_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_MALLOC_H */ -+ -+/* Define to 1 if you have the `memmove' function. */ -+/* #undef HAVE_MEMMOVE */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_MEMORY_H */ -+ -+/* Define to 1 if you have the `memset' function. */ -+/* #undef HAVE_MEMSET */ -+ -+/* Define to 1 if you have the `mmap' function. */ -+/* #undef HAVE_MMAP */ -+ -+/* Define to 1 if you have the `pow' function. */ -+/* #undef HAVE_POW */ -+ -+/* Define if you have POSIX threads libraries and header files. */ -+/* #undef HAVE_PTHREAD */ -+ -+/* Define to 1 if you have the header file. */ -+#if !defined(Q_OS_WINCE) -+#define HAVE_SEARCH_H 1 -+#endif -+ -+/* Define to 1 if you have the `sqrt' function. */ -+/* #undef HAVE_SQRT */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_STDINT_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_STDLIB_H */ -+ -+/* Define to 1 if you have the `strcasecmp' function. */ -+/* #undef HAVE_STRCASECMP */ -+ -+/* Define to 1 if you have the `strchr' function. */ -+/* #undef HAVE_STRCHR */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_STRINGS_H */ -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_STRING_H 1 -+ -+/* Define to 1 if you have the `strrchr' function. */ -+/* #undef HAVE_STRRCHR */ -+ -+/* Define to 1 if you have the `strstr' function. */ -+/* #undef HAVE_STRSTR */ -+ -+/* Define to 1 if you have the `strtol' function. */ -+/* #undef HAVE_STRTOL */ -+ -+/* Define to 1 if you have the `strtoul' function. */ -+/* #undef HAVE_STRTOUL */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_STAT_H */ -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_SYS_TIME_H */ -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_SYS_TYPES_H 1 -+ -+/* Define to 1 if you have the header file. */ -+#define HAVE_UNISTD_H 1 -+ -+/* Define to 1 if you have the header file. */ -+/* #undef HAVE_WINDOWS_H */ -+#ifdef Q_OS_WIN -+#define TIF_PLATFORM_CONSOLE -+#endif -+ -+/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian -+ (Intel) */ -+#if (Q_BYTE_ORDER == Q_BIG_ENDIAN) -+#define HOST_BIGENDIAN 1 -+#else -+#define HOST_BIGENDIAN 0 -+#endif -+ -+/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ -+#define HOST_FILLORDER FILLORDER_LSB2MSB -+ -+/* Support JPEG compression (requires IJG JPEG library) */ -+/* #undef JPEG_SUPPORT */ -+ -+/* Support LogLuv high dynamic range encoding */ -+#define LOGLUV_SUPPORT 1 -+ -+/* Define to the sub-directory in which libtool stores uninstalled libraries. -+ */ -+/* #undef LT_OBJDIR */ -+ -+/* Support LZW algorithm */ -+#define LZW_SUPPORT 1 -+ -+/* Support Microsoft Document Imaging format */ -+#define MDI_SUPPORT 1 -+ -+/* Support NeXT 2-bit RLE algorithm */ -+#define NEXT_SUPPORT 1 -+ -+/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -+/* #undef NO_MINUS_C_MINUS_O */ -+ -+/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation -+ fails with unpatched IJG JPEG library) */ -+/* #undef OJPEG_SUPPORT */ -+ -+/* Name of package */ -+/* #undef PACKAGE */ -+ -+/* Define to the address where bug reports for this package should be sent. */ -+/* #undef PACKAGE_BUGREPORT */ -+ -+/* Define to the full name of this package. */ -+/* #undef PACKAGE_NAME */ -+ -+/* Define to the full name and version of this package. */ -+/* #undef PACKAGE_STRING */ -+ -+/* Define to the one symbol short name of this package. */ -+/* #undef PACKAGE_TARNAME */ -+ -+/* Define to the version of this package. */ -+/* #undef PACKAGE_VERSION */ -+ -+/* Support Macintosh PackBits algorithm */ -+#define PACKBITS_SUPPORT 1 -+ -+/* Support Pixar log-format algorithm (requires Zlib) */ -+#define PIXARLOG_SUPPORT 1 -+ -+/* Define to necessary symbol if this constant uses a non-standard name on -+ your system. */ -+/* #undef PTHREAD_CREATE_JOINABLE */ -+ -+/* The size of a `int', as computed by sizeof. */ -+#define SIZEOF_INT 4 -+ -+/* The size of a `long', as computed by sizeof. */ -+#if (QT_POINTER_SIZE == 8) && !defined(Q_OS_WIN64) -+#define SIZEOF_LONG 8 -+#else -+#define SIZEOF_LONG 4 -+#endif -+ -+/* Define to 1 if you have the ANSI C header files. */ -+/* #undef STDC_HEADERS */ -+ -+/* Support strip chopping (whether or not to convert single-strip uncompressed -+ images to mutiple strips of specified size to reduce memory usage) */ -+#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP -+ -+/* Default size of the strip in bytes (when strip chopping enabled) */ -+/* #undef STRIP_SIZE_DEFAULT */ -+ -+/* Enable SubIFD tag (330) support */ -+#define SUBIFD_SUPPORT 1 -+ -+/* Support ThunderScan 4-bit RLE algorithm */ -+#define THUNDER_SUPPORT 1 -+ -+/* Define to 1 if you can safely include both and . */ -+/* #undef TIME_WITH_SYS_TIME */ -+ -+/* Define to 1 if your declares `struct tm'. */ -+/* #undef TM_IN_SYS_TIME */ -+ -+/* Version number of package */ -+/* #undef VERSION */ -+ -+/* Define to 1 if your processor stores words with the most significant byte -+ first (like Motorola and SPARC, unlike Intel and VAX). */ -+#if (Q_BYTE_ORDER == Q_BIG_ENDIAN) -+#define WORDS_BIGENDIAN 1 -+#else -+/* #undef WORDS_BIGENDIAN */ -+#endif -+ -+/* Define to 1 if the X Window System is missing or not being used. */ -+/* #undef X_DISPLAY_MISSING */ -+ -+/* Support Deflate compression */ -+#define ZIP_SUPPORT 1 -+ -+/* Number of bits in a file offset, on hosts where this is settable. */ -+/* #undef _FILE_OFFSET_BITS */ -+ -+/* Define for large files, on AIX-style hosts. */ -+/* #undef _LARGE_FILES */ -+ -+/* Define to empty if `const' does not conform to ANSI C. */ -+/* #undef const */ -+ -+/* Define to `__inline__' or `__inline' if that's what the C compiler -+ calls it, or to nothing if 'inline' is not supported under any name. */ -+#ifndef __cplusplus -+#undef inline -+#define inline -+#endif -+ -+/* Define to `long' if does not define. */ -+/* #undef off_t */ -+ -+/* Define to `unsigned' if does not define. */ -+/* #undef size_t */ ---- libtiff/tiffconf.h 2006-03-23 15:55:22.000000000 +0100 -+++ libtiff/tiffconf.h 2008-05-25 00:00:00.000000000 +0200 -@@ -1,6 +1,5 @@ --/* libtiff/tiffconf.h. Generated by configure. */ - /* -- Configuration defines for installed libtiff. -+ Configuration defines by Trolltech. - This file maintained for backward compatibility. Do not use definitions - from this file in your programs. - */ -@@ -8,6 +7,8 @@ - #ifndef _TIFFCONF_ - #define _TIFFCONF_ - -+#include -+ - /* Define to 1 if the system has the type `int16'. */ - /* #undef HAVE_INT16 */ - -@@ -21,7 +22,11 @@ - #define SIZEOF_INT 4 - - /* The size of a `long', as computed by sizeof. */ -+#if (QT_POINTER_SIZE == 8) && !defined(Q_OS_WIN64) -+#define SIZEOF_LONG 8 -+#else - #define SIZEOF_LONG 4 -+#endif - - /* Compatibility stuff. */ - -@@ -34,13 +39,17 @@ - - /* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian - (Intel) */ -+#if (Q_BYTE_ORDER == Q_BIG_ENDIAN) -+#define HOST_BIGENDIAN 1 -+#else - #define HOST_BIGENDIAN 0 -+#endif - - /* Support CCITT Group 3 & 4 algorithms */ - #define CCITT_SUPPORT 1 - - /* Support JPEG compression (requires IJG JPEG library) */ --#define JPEG_SUPPORT 1 -+/* #undef JPEG_SUPPORT */ - - /* Support LogLuv high dynamic range encoding */ - #define LOGLUV_SUPPORT 1 ---- libtiff/tiffiop.h 2006-03-21 17:42:50.000000000 +0100 -+++ libtiff/tiffiop.h 2008-05-25 00:00:00.000000000 +0200 -@@ -37,7 +37,12 @@ - #endif - - #ifdef HAVE_SYS_TYPES_H -+#if !defined(Q_OS_WINCE) - # include -+#else -+# include -+# include -+#endif - #endif - - #ifdef HAVE_STRING_H ---- libtiff/tif_win32.c 2006-02-07 14:51:03.000000000 +0100 -+++ libtiff/tif_win32.c 2008-05-25 00:00:00.000000000 +0200 -@@ -29,6 +29,7 @@ - * Scott Wagner (wagner@itek.com), Itek Graphix, Rochester, NY USA - */ - #include "tiffiop.h" -+#include - - static tsize_t - _tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size) diff --git a/src/3rdparty/patches/libtiff-3.8.2-vxworks.patch b/src/3rdparty/patches/libtiff-3.8.2-vxworks.patch deleted file mode 100644 index b1b725e..0000000 --- a/src/3rdparty/patches/libtiff-3.8.2-vxworks.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libtiff/tif_config.h.orig -+++ libtiff/tif_config.h -@@ -104,7 +104,7 @@ - /* #undef HAVE_PTHREAD */ - - /* Define to 1 if you have the header file. */ --#if !defined(Q_OS_WINCE) -+#if !defined(Q_OS_WINCE) && !defined(Q_OS_VXWORKS) - #define HAVE_SEARCH_H 1 - #endif - diff --git a/src/3rdparty/patches/sqlite-3.5.6-config.patch b/src/3rdparty/patches/sqlite-3.5.6-config.patch deleted file mode 100644 index cf158ea..0000000 --- a/src/3rdparty/patches/sqlite-3.5.6-config.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- sqlite3.c.orig 2008-02-06 16:03:28.000000000 +0100 -+++ sqlite3.c 2008-02-13 00:00:00.000000000 +0100 -@@ -16823,6 +16823,8 @@ - */ - #if OS_UNIX /* This file is used on unix only */ - -+#include -+ - /* #define SQLITE_ENABLE_LOCKING_STYLE 0 */ - - /* -@@ -16865,7 +16867,7 @@ - ** If we are to be thread-safe, include the pthreads header and define - ** the SQLITE_UNIX_THREADS macro. - */ --#if SQLITE_THREADSAFE -+#ifndef QT_NO_THREAD - # define SQLITE_UNIX_THREADS 1 - #endif - -@@ -19739,6 +19741,8 @@ - ** desktops but not so well in embedded systems. - */ - -+#include -+ - #include - - #ifdef __CYGWIN__ -@@ -19748,7 +19752,7 @@ - /* - ** Macros used to determine whether or not to use threads. - */ --#if defined(THREADSAFE) && THREADSAFE -+#ifndef QT_NO_THREAD - # define SQLITE_W32_THREADS 1 - #endif - diff --git a/src/3rdparty/patches/sqlite-3.5.6-vxworks.patch b/src/3rdparty/patches/sqlite-3.5.6-vxworks.patch deleted file mode 100644 index 6ae65fd..0000000 --- a/src/3rdparty/patches/sqlite-3.5.6-vxworks.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- sqlite3.c.orig -+++ sqlite3.c -@@ -383,7 +383,7 @@ SQLITE_PRIVATE void sqlite3Coverage(int); - ** - ** See also ticket #2741. - */ --#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE -+#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE && !defined(VXWORKS) - # define _XOPEN_SOURCE 500 /* Needed to enable pthread recursive mutexes */ - #endif - -@@ -440,6 +440,13 @@ SQLITE_PRIVATE void sqlite3Coverage(int); - */ - #ifndef _SQLITE3_H_ - #define _SQLITE3_H_ -+ -+#ifdef VXWORKS -+# define SQLITE_HOMEGROWN_RECURSIVE_MUTEX -+# define NO_GETTOD -+# include -+#endif -+ - #include /* Needed for the definition of va_list */ - - /* -@@ -18792,7 +18799,11 @@ SQLITE_PRIVATE sqlite3_vfs *sqlite3OsDefaultVfs(void){ - #include - #include - #include --#include -+#ifdef VXWORKS -+# include -+#else -+# include -+#endif - #include - #ifdef SQLITE_ENABLE_LOCKING_STYLE - #include -@@ -19728,7 +19739,11 @@ static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){ - if( newOffset!=offset ){ - return -1; - } -+# ifndef VXWORKS - got = write(id->h, pBuf, cnt); -+# else -+ got = write(id->h, (char *)pBuf, cnt); -+# endif - #endif - TIMER_END; - OSTRACE5("WRITE %-3d %5d %7lld %d\n", id->h, got, offset, TIMER_ELAPSED); -@@ -21554,12 +21569,16 @@ static int unixRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){ - #if !defined(SQLITE_TEST) - { - int pid, fd; -- fd = open("/dev/urandom", O_RDONLY); -+ fd = open("/dev/urandom", O_RDONLY, 0); - if( fd<0 ){ - time_t t; - time(&t); - memcpy(zBuf, &t, sizeof(t)); -+#ifndef VXWORKS - pid = getpid(); -+#else -+ pid = (int)taskIdCurrent(); -+#endif - memcpy(&zBuf[sizeof(t)], &pid, sizeof(pid)); - }else{ - read(fd, zBuf, nBuf); diff --git a/src/3rdparty/patches/sqlite-3.5.6-wince.patch b/src/3rdparty/patches/sqlite-3.5.6-wince.patch deleted file mode 100644 index 02965f8..0000000 --- a/src/3rdparty/patches/sqlite-3.5.6-wince.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- sqlite3.c.orig 2008-02-06 16:03:28.000000000 +0100 -+++ sqlite3.c 2008-02-13 00:00:00.000000000 +0100 -@@ -8837,6 +8837,16 @@ - } - - /* -+** Windows CE does not declare the localtime -+** function as it is not defined anywhere. -+** Anyway we need the forward-declaration to be -+** able to define it later on. -+*/ -+#if defined(_WIN32_WCE) && (_WIN32_WCE >= 0x600) -+struct tm *__cdecl localtime(const time_t *t); -+#endif -+ -+/* - ** Compute the difference (in days) between localtime and UTC (a.k.a. GMT) - ** for the time value p where p is in UTC. - */ -- cgit v0.12 From 3335721dcf72cda957ba0e507608d795cab3f1ab Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Wed, 3 Mar 2010 12:45:14 +0100 Subject: Fix focus behavior bug on Mac OS X. With the Full Access Keyboard enabled, the focus could sometimes be stolen by the window. --- src/gui/kernel/qcocoaview_mac.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index a1dcc2a..f7cb21f 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -1028,7 +1028,10 @@ static int qCocoaViewCount = 0; { if (!qwidget) return NO; - if (qwidget->isWindow()) + // Before accepting the focus for a window, we check that + // the focusWidget (if any) is not contained in the same window. + if (qwidget->isWindow() && (!qApp->focusWidget() + || qApp->focusWidget()->window() != qwidget)) return YES; // Always do it, so that windows can accept key press events. return qwidget->focusPolicy() != Qt::NoFocus; } -- cgit v0.12 From 66586707ae875bd1caa802fd7ca88a29727396e5 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Wed, 3 Mar 2010 13:51:35 +0100 Subject: Stabilize QWidget Fix for some corner cases observed on Maemo 5 Reviewed-by: Robert Griebl --- src/gui/kernel/qwidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index b19d541..7fdee2b 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1122,7 +1122,8 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f) qFatal("QWidget: Cannot create a QWidget when no GUI is being used"); Q_ASSERT(allWidgets); - allWidgets->insert(q); + if (allWidgets) + allWidgets->insert(q); QWidget *desktopWidget = 0; if (parentWidget && parentWidget->windowType() == Qt::Desktop) { @@ -6500,7 +6501,7 @@ void QWidget::setTabOrder(QWidget* first, QWidget *second) // QWidget *fp = first->d_func()->focus_prev; QWidget *fn = first->d_func()->focus_next; - if (fn == second) + if (fn == second || first == second) return; QWidget *sp = second->d_func()->focus_prev; -- cgit v0.12 From af430b618a196a45e45c87afca446d60b4a3552d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Wed, 3 Mar 2010 13:29:29 +0100 Subject: Don't print a warning when passing an empty string to QColor Qt 4.6 didn't used to warn about this, and it should be a valid way of setting a color to invalid. QColor::isValidColor has been adapted to still return false when passed an empty string. Reviewed-by: Erik Verbruggen --- src/gui/painting/qcolor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index 0b735a2..cd448a7 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -548,14 +548,14 @@ void QColor::setNamedColor(const QString &name) */ bool QColor::isValidColor(const QString &name) { - return QColor().setColorFromString(name); + return !name.isEmpty() && QColor().setColorFromString(name); } bool QColor::setColorFromString(const QString &name) { if (name.isEmpty()) { invalidate(); - return false; + return true; } if (name.startsWith(QLatin1Char('#'))) { -- cgit v0.12 From 69acbc34d5413e1e7642f1d533e39a8f0137051b Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Wed, 3 Mar 2010 14:36:31 +0100 Subject: fix include --- src/gui/widgets/qlabel_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qlabel_p.h b/src/gui/widgets/qlabel_p.h index 21eb128..fba7224 100644 --- a/src/gui/widgets/qlabel_p.h +++ b/src/gui/widgets/qlabel_p.h @@ -55,7 +55,7 @@ #include "qlabel.h" -#include "../text/qtextdocumentlayout_p.h" +#include "private/qtextdocumentlayout_p.h" #include "private/qtextcontrol_p.h" #include "qtextdocumentfragment.h" #include "qframe_p.h" -- cgit v0.12 From 6f07f0a2b9df84302348e290f22de13514f81d50 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 3 Mar 2010 14:48:37 +0100 Subject: test qlist some more --- tests/auto/qlist/tst_qlist.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/auto/qlist/tst_qlist.cpp b/tests/auto/qlist/tst_qlist.cpp index a590fca..e2944cc 100644 --- a/tests/auto/qlist/tst_qlist.cpp +++ b/tests/auto/qlist/tst_qlist.cpp @@ -60,6 +60,7 @@ private slots: void length() const; void lengthSignature() const; void append() const; + void prepend() const; void mid() const; }; @@ -130,6 +131,39 @@ void tst_QList::append() const } +void tst_QList::prepend() const +{ + QList list; + QString *str1 = new QString; + list.prepend(str1); + QVERIFY(list.size() == 1); + QVERIFY(list.at(0) == str1); + QString *str2 = new QString; + list.prepend(str2); + QVERIFY(list.size() == 2); + QVERIFY(list.at(0) == str2); + QVERIFY(list.at(1) == str1); + QString *str3 = new QString; + list.prepend(str3); + QVERIFY(list.size() == 3); + QVERIFY(list.at(0) == str3); + QVERIFY(list.at(1) == str2); + QVERIFY(list.at(2) == str1); + list.removeAll(str2); + delete str2; + QVERIFY(list.size() == 2); + QVERIFY(list.at(0) == str3); + QVERIFY(list.at(1) == str1); + QString *str4 = new QString; + list.prepend(str4); + QVERIFY(list.size() == 3); + QVERIFY(list.at(0) == str4); + QVERIFY(list.at(1) == str3); + QVERIFY(list.at(2) == str1); + qDeleteAll(list); + list.clear(); +} + void tst_QList::mid() const { QList list; -- cgit v0.12 From a1b0dba9971ef88dc1e079d1ea49230a4dd3c514 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 3 Mar 2010 14:48:27 +0100 Subject: fix qmake -project mode the mode is a big hack, and consequently needs hacks to get started as well ... Reviewed-by: mariusSO --- qmake/option.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qmake/option.cpp b/qmake/option.cpp index 6f0f46b..b41e39d 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -525,6 +525,17 @@ Option::init(int argc, char **argv) } #endif } + } else if (Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) { +#if defined(Q_OS_MAC) + Option::host_mode = Option::HOST_MACX_MODE; + Option::target_mode = Option::TARG_MACX_MODE; +#elif defined(Q_OS_UNIX) + Option::host_mode = Option::HOST_UNIX_MODE; + Option::target_mode = Option::TARG_UNIX_MODE; +#else + Option::host_mode = Option::HOST_WIN_MODE; + Option::target_mode = Option::TARG_WIN_MODE; +#endif } //defaults for globals -- cgit v0.12 From 515f6a8c3dbe382bbb4f84f758a61c719143d8a6 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Wed, 3 Mar 2010 14:53:16 +0100 Subject: sizeHint of checkbox/radiobutton without text is not correct Reviewed-by: Jens Bache-Wiig --- src/gui/styles/qcommonstyle.cpp | 2 +- src/gui/widgets/qcheckbox.cpp | 2 +- src/gui/widgets/qradiobutton.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index f8464cc..b0e2d37 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -4760,7 +4760,7 @@ QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, int margins = 0; // we add 4 pixels for label margins - if (btn->icon.isNull() || !btn->text.isEmpty()) + if (!btn->icon.isNull() || !btn->text.isEmpty()) margins = 4 + proxy()->pixelMetric(isRadio ? PM_RadioButtonLabelSpacing : PM_CheckBoxLabelSpacing, opt, widget); sz += QSize(w + margins, 4); diff --git a/src/gui/widgets/qcheckbox.cpp b/src/gui/widgets/qcheckbox.cpp index 4e0ff66..bc0900e 100644 --- a/src/gui/widgets/qcheckbox.cpp +++ b/src/gui/widgets/qcheckbox.cpp @@ -291,7 +291,7 @@ QSize QCheckBox::sizeHint() const QFontMetrics fm = fontMetrics(); QStyleOptionButton opt; initStyleOption(&opt); - QSize sz = style()->itemTextRect(fm, QRect(0, 0, 1, 1), Qt::TextShowMnemonic, false, + QSize sz = style()->itemTextRect(fm, QRect(), Qt::TextShowMnemonic, false, text()).size(); if (!opt.icon.isNull()) sz = QSize(sz.width() + opt.iconSize.width() + 4, qMax(sz.height(), opt.iconSize.height())); diff --git a/src/gui/widgets/qradiobutton.cpp b/src/gui/widgets/qradiobutton.cpp index d73ff2f..20b6c720 100644 --- a/src/gui/widgets/qradiobutton.cpp +++ b/src/gui/widgets/qradiobutton.cpp @@ -195,7 +195,7 @@ QSize QRadioButton::sizeHint() const ensurePolished(); QStyleOptionButton opt; initStyleOption(&opt); - QSize sz = style()->itemTextRect(fontMetrics(), QRect(0, 0, 1, 1), Qt::TextShowMnemonic, + QSize sz = style()->itemTextRect(fontMetrics(), QRect(), Qt::TextShowMnemonic, false, text()).size(); if (!opt.icon.isNull()) sz = QSize(sz.width() + opt.iconSize.width() + 4, qMax(sz.height(), opt.iconSize.height())); -- cgit v0.12 From 5d1735d6cf1820107145e7fdfe41ac502d0020f9 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Fri, 29 Jan 2010 16:06:06 +0100 Subject: Optimize QGtkStyle Use latin1 literals instead of QString to prevent one malloc/memcpy/free per rendered table cell. Reviewed-By: Robert Griebl --- src/gui/styles/qgtkpainter.cpp | 2 +- src/gui/styles/qgtkstyle.cpp | 203 +++++++++++++++++++++++------------------ src/gui/styles/qgtkstyle_p.cpp | 103 +++++++++++++++------ src/gui/styles/qgtkstyle_p.h | 73 +++++++++++++-- 4 files changed, 252 insertions(+), 129 deletions(-) diff --git a/src/gui/styles/qgtkpainter.cpp b/src/gui/styles/qgtkpainter.cpp index 6cc7455..1f68f2f 100644 --- a/src/gui/styles/qgtkpainter.cpp +++ b/src/gui/styles/qgtkpainter.cpp @@ -142,7 +142,7 @@ QPixmap QGtkPainter::renderTheme(uchar *bdata, uchar *wdata, const QRect &rect) } QGtkPainter::QGtkPainter(QPainter *_painter) - : m_window(QGtkStylePrivate::gtkWidget(QLatin1String("GtkWindow"))) + : m_window(QGtkStylePrivate::gtkWidget("GtkWindow")) , m_painter(_painter) , m_alpha(true) , m_hflipped(false) diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index b5f052b..e2de43a 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -222,7 +222,7 @@ QPalette QGtkStyle::standardPalette() const QPalette palette = QCleanlooksStyle::standardPalette(); if (d->isThemeAvailable()) { GtkStyle *style = d->gtkStyle(); - GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton")); + GtkWidget *gtkButton = d->gtkWidget("GtkButton"); GtkWidget *gtkEntry = d->getTextColorWidget(); GdkColor gdkBg, gdkBase, gdkText, gdkForeground, gdkSbg, gdkSfg; @@ -253,7 +253,7 @@ QPalette QGtkStyle::standardPalette() const palette.setColor(QPalette::Base, base); QColor alternateRowColor = palette.base().color().lighter(93); // ref gtkstyle.c draw_flat_box - GtkWidget *gtkTreeView = d->gtkWidget(QLS("GtkTreeView")); + GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView"); GdkColor *gtkAltBase = NULL; d->gtk_widget_style_get(gtkTreeView, "odd-row-color", >kAltBase, NULL); if (gtkAltBase) { @@ -421,14 +421,14 @@ int QGtkStyle::pixelMetric(PixelMetric metric, return 0; case PM_ButtonShiftHorizontal: { - GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton")); + GtkWidget *gtkButton = d->gtkWidget("GtkButton"); guint horizontal_shift; d->gtk_widget_style_get(gtkButton, "child-displacement-x", &horizontal_shift, NULL); return horizontal_shift; } case PM_ButtonShiftVertical: { - GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton")); + GtkWidget *gtkButton = d->gtkWidget("GtkButton"); guint vertical_shift; d->gtk_widget_style_get(gtkButton, "child-displacement-y", &vertical_shift, NULL); return vertical_shift; @@ -438,7 +438,7 @@ int QGtkStyle::pixelMetric(PixelMetric metric, return 0; case PM_MenuPanelWidth: { - GtkWidget *gtkMenu = d->gtkWidget(QLS("GtkMenu")); + GtkWidget *gtkMenu = d->gtkWidget("GtkMenu"); guint horizontal_padding = 0; // horizontal-padding is used by Maemo to get thicker borders if (!d->gtk_check_version(2, 10, 0)) @@ -495,7 +495,7 @@ int QGtkStyle::pixelMetric(PixelMetric metric, case PM_SliderThickness: case PM_SliderControlThickness: { - GtkWidget *gtkScale = d->gtkWidget(QLS("GtkHScale")); + GtkWidget *gtkScale = d->gtkWidget("GtkHScale"); gint val; d->gtk_widget_style_get(gtkScale, "slider-width", &val, NULL); if (metric == PM_SliderControlThickness) @@ -506,7 +506,7 @@ int QGtkStyle::pixelMetric(PixelMetric metric, case PM_ScrollBarExtent: { gint sliderLength; gint trough_border; - GtkWidget *hScrollbar = d->gtkWidget(QLS("GtkHScrollbar")); + GtkWidget *hScrollbar = d->gtkWidget("GtkHScrollbar"); d->gtk_widget_style_get(hScrollbar, "trough-border", &trough_border, "slider-width", &sliderLength, @@ -519,34 +519,34 @@ int QGtkStyle::pixelMetric(PixelMetric metric, case PM_SliderLength: gint val; - d->gtk_widget_style_get(d->gtkWidget(QLS("GtkHScale")), "slider-length", &val, NULL); + d->gtk_widget_style_get(d->gtkWidget("GtkHScale"), "slider-length", &val, NULL); return val; case PM_ExclusiveIndicatorWidth: case PM_ExclusiveIndicatorHeight: case PM_IndicatorWidth: case PM_IndicatorHeight: { - GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton")); + GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton"); gint size, spacing; d->gtk_widget_style_get(gtkCheckButton, "indicator-spacing", &spacing, "indicator-size", &size, NULL); return size + 2 * spacing; } case PM_MenuBarVMargin: { - GtkWidget *gtkMenubar = d->gtkWidget(QLS("GtkMenuBar")); + GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar"); return qMax(0, gtkMenubar->style->ythickness); } case PM_ScrollView_ScrollBarSpacing: { gint spacing = 3; - GtkWidget *gtkScrollWindow = d->gtkWidget(QLS("GtkScrolledWindow")); + GtkWidget *gtkScrollWindow = d->gtkWidget("GtkScrolledWindow"); Q_ASSERT(gtkScrollWindow); d->gtk_widget_style_get(gtkScrollWindow, "scrollbar-spacing", &spacing, NULL); return spacing; } case PM_SubMenuOverlap: { gint offset = 0; - GtkWidget *gtkMenu = d->gtkWidget(QLS("GtkMenu")); + GtkWidget *gtkMenu = d->gtkWidget("GtkMenu"); d->gtk_widget_style_get(gtkMenu, "horizontal-offset", &offset, NULL); return offset; } @@ -587,7 +587,7 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg { if (d->isKDE4Session()) return QCleanlooksStyle::styleHint(hint, option, widget, returnData); - GtkWidget *gtkToolbar = d->gtkWidget(QLS("GtkToolbar")); + GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar"); GtkToolbarStyle toolbar_style = GTK_TOOLBAR_ICONS; g_object_get(gtkToolbar, "toolbar-style", &toolbar_style, NULL); switch (toolbar_style) { @@ -610,7 +610,7 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg return int(false); case SH_ComboBox_Popup: { - GtkWidget *gtkComboBox = d->gtkWidget(QLS("GtkComboBox")); + GtkWidget *gtkComboBox = d->gtkWidget("GtkComboBox"); gboolean appears_as_list; d->gtk_widget_style_get((GtkWidget*)gtkComboBox, "appears-as-list", &appears_as_list, NULL); return appears_as_list ? 0 : 1; @@ -634,7 +634,7 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg if (widget && widget->isWindow()) scrollbars_within_bevel = true; else if (!d->gtk_check_version(2, 12, 0)) { - GtkWidget *gtkScrollWindow = d->gtkWidget(QLS("GtkScrolledWindow")); + GtkWidget *gtkScrollWindow = d->gtkWidget("GtkScrolledWindow"); d->gtk_widget_style_get(gtkScrollWindow, "scrollbars-within-bevel", &scrollbars_within_bevel, NULL); } return !scrollbars_within_bevel; @@ -712,7 +712,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, GtkStyle *style = d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(), "*.GtkScrolledWindow", "*.GtkScrolledWindow", d->gtk_window_get_type()); if (style) - gtkFramePainter.paintShadow(d->gtkWidget(QLS("GtkFrame")), "viewport", pmRect, + gtkFramePainter.paintShadow(d->gtkWidget("GtkFrame"), "viewport", pmRect, option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, shadow_type, style); QPixmapCache::insert(pmKey, pixmap); @@ -739,7 +739,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, break; case PE_PanelTipLabel: { - GtkWidget *gtkWindow = d->gtkWidget(QLS("GtkWindow")); // The Murrine Engine currently assumes a widget is passed + GtkWidget *gtkWindow = d->gtkWidget("GtkWindow"); // The Murrine Engine currently assumes a widget is passed style = d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(), "gtk-tooltips", "GtkWindow", d->gtk_window_get_type()); gtkPainter.paintFlatBox(gtkWindow, "tooltip", option->rect, GTK_STATE_NORMAL, GTK_SHADOW_NONE, style); @@ -754,7 +754,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, break; } GtkShadowType shadow_type; - GtkWidget *gtkStatusbarFrame = d->gtkWidget(QLS("GtkStatusbar.GtkFrame")); + GtkWidget *gtkStatusbarFrame = d->gtkWidget("GtkStatusbar.GtkFrame"); d->gtk_widget_style_get(gtkStatusbarFrame->parent, "shadow-type", &shadow_type, NULL); gtkPainter.paintShadow(gtkStatusbarFrame, "frame", option->rect, GTK_STATE_NORMAL, shadow_type, gtkStatusbarFrame->style); @@ -763,7 +763,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, case PE_IndicatorHeaderArrow: if (const QStyleOptionHeader *header = qstyleoption_cast(option)) { - GtkWidget *gtkTreeHeader = d->gtkWidget(QLS("GtkTreeView.GtkButton")); + GtkWidget *gtkTreeHeader = d->gtkWidget("GtkTreeView.GtkButton"); GtkStateType state = gtkPainter.gtkState(option); style = gtkTreeHeader->style; GtkArrowType type = GTK_ARROW_UP; @@ -801,7 +801,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, rect.translate(2, 0); GtkExpanderStyle openState = GTK_EXPANDER_EXPANDED; GtkExpanderStyle closedState = GTK_EXPANDER_COLLAPSED; - GtkWidget *gtkTreeView = d->gtkWidget(QLS("GtkTreeView")); + GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView"); GtkStateType state = GTK_STATE_NORMAL; if (!(option->state & State_Enabled)) @@ -837,7 +837,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, case PE_IndicatorToolBarSeparator: { const int margin = 6; - GtkWidget *gtkSeparator = d->gtkWidget(QLS("GtkToolbar.GtkSeparatorToolItem")); + GtkWidget *gtkSeparator = d->gtkWidget("GtkToolbar.GtkSeparatorToolItem"); if (option->state & State_Horizontal) { const int offset = option->rect.width()/2; QRect rect = option->rect.adjusted(offset, margin, 0, -margin); @@ -857,7 +857,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, break; case PE_IndicatorToolBarHandle: { - GtkWidget *gtkToolbar = d->gtkWidget(QLS("GtkToolbar")); + GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar"); GtkShadowType shadow_type; d->gtk_widget_style_get(gtkToolbar, "shadow-type", &shadow_type, NULL); //Note when the toolbar is horizontal, the handle is vertical @@ -905,7 +905,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, GtkStateType state = gtkPainter.gtkState(option); QColor arrowColor = option->palette.buttonText().color(); - GtkWidget *gtkArrow = d->gtkWidget(QLS("GtkArrow")); + GtkWidget *gtkArrow = d->gtkWidget("GtkArrow"); GdkColor color = fromQColor(arrowColor); d->gtk_widget_modify_fg (gtkArrow, state, &color); gtkPainter.paintArrow(gtkArrow, "button", arrowRect, @@ -921,7 +921,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, break; case PE_PanelMenu: { - GtkWidget *gtkMenu = d->gtkWidget(QLS("GtkMenu")); + GtkWidget *gtkMenu = d->gtkWidget("GtkMenu"); gtkPainter.setAlphaSupport(false); // Note, alpha disabled for performance reasons gtkPainter.paintBox(gtkMenu, "menu", option->rect, GTK_STATE_NORMAL, GTK_SHADOW_OUT, gtkMenu->style, QString()); } @@ -933,7 +933,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, // This is only used by floating tool bars if (qobject_cast(widget)) { - GtkWidget *gtkMenubar = d->gtkWidget(QLS("GtkMenuBar")); + GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar"); gtkPainter.paintBox( gtkMenubar, "toolbar", option->rect, GTK_STATE_NORMAL, GTK_SHADOW_OUT, style); gtkPainter.paintBox( gtkMenubar, "menu", option->rect, @@ -942,7 +942,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, break; case PE_FrameLineEdit: { - GtkWidget *gtkEntry = d->gtkWidget(QLS("GtkEntry")); + GtkWidget *gtkEntry = d->gtkWidget("GtkEntry"); gboolean interior_focus; @@ -976,7 +976,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, case PE_PanelLineEdit: if (const QStyleOptionFrame *panel = qstyleoption_cast(option)) { - GtkWidget *gtkEntry = d->gtkWidget(QLS("GtkEntry")); + GtkWidget *gtkEntry = d->gtkWidget("GtkEntry"); if (panel->lineWidth > 0) proxy()->drawPrimitive(PE_FrameLineEdit, option, painter, widget); uint resolve_mask = option->palette.resolve(); @@ -994,7 +994,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, case PE_FrameTabWidget: if (const QStyleOptionTabWidgetFrame *frame = qstyleoption_cast(option)) { - GtkWidget *gtkNotebook = d->gtkWidget(QLS("GtkNotebook")); + GtkWidget *gtkNotebook = d->gtkWidget("GtkNotebook"); style = gtkPainter.getStyle(gtkNotebook); gtkPainter.setAlphaSupport(false); GtkShadowType shadow = GTK_SHADOW_OUT; @@ -1042,7 +1042,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, GtkStateType state = gtkPainter.gtkState(option); if (option->state & State_On || option->state & State_Sunken) state = GTK_STATE_ACTIVE; - GtkWidget *gtkButton = d->gtkWidget(isTool ? QLS("GtkToolButton.GtkButton") : QLS("GtkButton")); + GtkWidget *gtkButton = isTool ? d->gtkWidget("GtkToolButton.GtkButton") : d->gtkWidget("GtkButton"); gint focusWidth, focusPad; gboolean interiorFocus = false; d->gtk_widget_style_get (gtkButton, @@ -1098,14 +1098,14 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, else shadow = GTK_SHADOW_OUT; - GtkWidget *gtkRadioButton = d->gtkWidget(QLS("GtkRadioButton")); + GtkWidget *gtkRadioButton = d->gtkWidget("GtkRadioButton"); gint spacing; d->gtk_widget_style_get(gtkRadioButton, "indicator-spacing", &spacing, NULL); QRect buttonRect = option->rect.adjusted(spacing, spacing, -spacing, -spacing); gtkPainter.setClipRect(option->rect); // ### Note: Ubuntulooks breaks when the proper widget is passed // Murrine engine requires a widget not to get RGBA check - warnings - GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton")); + GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton"); QString key(QLS("radiobutton")); if (option->state & State_HasFocus) { // Themes such as Nodoka check this flag key += QLatin1Char('f'); @@ -1133,7 +1133,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, int spacing; - GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton")); + GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton"); QString key(QLS("checkbutton")); if (option->state & State_HasFocus) { // Themes such as Nodoka checks this flag key += QLatin1Char('f'); @@ -1275,7 +1275,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom if ((groupBox->subControls & QStyle::SC_GroupBoxLabel) && !groupBox->text.isEmpty()) { // Draw prelight background - GtkWidget *gtkCheckButton = d->gtkWidget(QLS("GtkCheckButton")); + GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton"); if (option->state & State_MouseOver) { QRect bgRect = textRect | checkBoxRect; @@ -1348,7 +1348,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom GtkShadowType shadow = (option->state & State_Sunken || option->state & State_On ) ? GTK_SHADOW_IN : GTK_SHADOW_OUT; - QString comboBoxPath = QLS(comboBox->editable ? "GtkComboBoxEntry" : "GtkComboBox"); + const QHashableLatin1Literal comboBoxPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry") : QHashableLatin1Literal("GtkComboBox"); // We use the gtk widget to position arrows and separators for us GtkWidget *gtkCombo = d->gtkWidget(comboBoxPath); @@ -1356,7 +1356,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom d->gtk_widget_set_direction(gtkCombo, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); d->gtk_widget_size_allocate(gtkCombo, &geometry); - QString buttonPath = comboBoxPath + QLS(".GtkToggleButton"); + QHashableLatin1Literal buttonPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton") + : QHashableLatin1Literal("GtkComboBox.GtkToggleButton"); GtkWidget *gtkToggleButton = d->gtkWidget(buttonPath); d->gtk_widget_set_direction(gtkToggleButton, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); if (gtkToggleButton && (appears_as_list || comboBox->editable)) { @@ -1365,7 +1366,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom // Draw the combo box as a line edit with a button next to it if (comboBox->editable || appears_as_list) { GtkStateType frameState = (state == GTK_STATE_PRELIGHT) ? GTK_STATE_NORMAL : state; - QString entryPath = QLS(comboBox->editable ? "GtkComboBoxEntry.GtkEntry" : "GtkComboBox.GtkFrame"); + QHashableLatin1Literal entryPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkEntry") : QHashableLatin1Literal("GtkComboBox.GtkFrame"); GtkWidget *gtkEntry = d->gtkWidget(entryPath); d->gtk_widget_set_direction(gtkEntry, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); QRect frameRect = option->rect; @@ -1391,11 +1392,11 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom else { gtkCachedPainter.paintFlatBox(gtkEntry, "entry_bg", contentRect, option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, - GTK_SHADOW_NONE, gtkEntry->style, entryPath + QString::number(focus)); + GTK_SHADOW_NONE, gtkEntry->style, entryPath.toString() + QString::number(focus)); } gtkCachedPainter.paintShadow(gtkEntry, comboBox->editable ? "entry" : "frame", frameRect, frameState, - GTK_SHADOW_IN, gtkEntry->style, entryPath + + GTK_SHADOW_IN, gtkEntry->style, entryPath.toString() + QString::number(focus) + QString::number(comboBox->editable) + QString::number(option->direction)); if (focus) @@ -1416,7 +1417,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom Q_ASSERT(gtkToggleButton); gtkCachedPainter.paintBox( gtkToggleButton, "button", arrowButtonRect, buttonState, - shadow, gtkToggleButton->style, buttonPath + + shadow, gtkToggleButton->style, buttonPath.toString() + QString::number(focus) + QString::number(option->direction)); if (focus) GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); @@ -1429,12 +1430,17 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom gtkCachedPainter.paintBox(gtkToggleButton, "button", buttonRect, state, shadow, gtkToggleButton->style, - buttonPath + QString::number(focus)); + buttonPath.toString() + QString::number(focus)); if (focus) GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); + QHashableLatin1Literal buttonPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton") + : QHashableLatin1Literal("GtkComboBox.GtkToggleButton"); + // Draw the separator between label and arrows - QString vSeparatorPath = buttonPath + QLS(".GtkHBox.GtkVSeparator"); + QHashableLatin1Literal vSeparatorPath = comboBox->editable + ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton.GtkHBox.GtkVSeparator") + : QHashableLatin1Literal("GtkComboBox.GtkToggleButton.GtkHBox.GtkVSeparator"); if (GtkWidget *gtkVSeparator = d->gtkWidget(vSeparatorPath)) { QRect vLineRect(gtkVSeparator->allocation.x, @@ -1444,7 +1450,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom gtkCachedPainter.paintVline( gtkVSeparator, "vseparator", vLineRect, state, gtkVSeparator->style, - 0, vLineRect.height(), 0, vSeparatorPath); + 0, vLineRect.height(), 0, vSeparatorPath.toString()); gint interiorFocus = true; @@ -1469,8 +1475,18 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom else state = GTK_STATE_NORMAL; - QString arrowPath = comboBoxPath + QLS(appears_as_list ? ".GtkToggleButton.GtkArrow" - : ".GtkToggleButton.GtkHBox.GtkArrow"); + QHashableLatin1Literal arrowPath(""); + if (comboBox->editable) { + if (appears_as_list) + arrowPath = QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton.GtkArrow"); + else + arrowPath = QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton.GtkHBox.GtkArrow"); + } else { + if (appears_as_list) + arrowPath = QHashableLatin1Literal("GtkComboBox.GtkToggleButton.GtkArrow"); + else + arrowPath = QHashableLatin1Literal("GtkComboBox.GtkToggleButton.GtkHBox.GtkArrow"); + } GtkWidget *gtkArrow = d->gtkWidget(arrowPath); gfloat scale = 0.7; @@ -1497,7 +1513,11 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom if (sunken) { int xoff, yoff; - GtkWidget *gtkButton = d->gtkWidget(comboBoxPath + QLS(".GtkToggleButton")); + const QHashableLatin1Literal toggleButtonPath = comboBox->editable + ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton") + : QHashableLatin1Literal("GtkComboBox.GtkToggleButton"); + + GtkWidget *gtkButton = d->gtkWidget(toggleButtonPath); d->gtk_widget_style_get(gtkButton, "child-displacement-x", &xoff, NULL); d->gtk_widget_style_get(gtkButton, "child-displacement-y", &yoff, NULL); arrowRect = arrowRect.adjusted(xoff, yoff, xoff, yoff); @@ -1509,7 +1529,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom gtkCachedPainter.setClipRect(option->rect); gtkCachedPainter.paintArrow( gtkArrow, "arrow", arrowRect, GTK_ARROW_DOWN, state, GTK_SHADOW_NONE, TRUE, - style, arrowPath + QString::number(option->direction)); + style, arrowPath.toString() + QString::number(option->direction)); } } END_STYLE_PIXMAPCACHE; @@ -1570,7 +1590,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom QStyleOptionToolButton label = *toolbutton; label.state = bflags; - GtkWidget *gtkButton = d->gtkWidget(QLS("GtkToolButton.GtkButton")); + GtkWidget *gtkButton = d->gtkWidget("GtkToolButton.GtkButton"); QPalette pal = toolbutton->palette; if (option->state & State_Enabled && option->state & State_MouseOver && !(widget && widget->testAttribute(Qt::WA_SetPalette))) { @@ -1605,8 +1625,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom case CC_ScrollBar: if (const QStyleOptionSlider *scrollBar = qstyleoption_cast(option)) { - GtkWidget *gtkHScrollBar = d->gtkWidget(QLS("GtkHScrollbar")); - GtkWidget *gtkVScrollBar = d->gtkWidget(QLS("GtkVScrollbar")); + GtkWidget *gtkHScrollBar = d->gtkWidget("GtkHScrollbar"); + GtkWidget *gtkVScrollBar = d->gtkWidget("GtkVScrollbar"); // Fill background in case the scrollbar is partially transparent painter->fillRect(option->rect, option->palette.background()); @@ -1751,10 +1771,9 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom case CC_SpinBox: if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast(option)) { - GtkWidget *gtkSpinButton = d->gtkWidget( - spinBox->buttonSymbols == QAbstractSpinBox::NoButtons ? - QLS("GtkEntry") : - QLS("GtkSpinButton")); + GtkWidget *gtkSpinButton = spinBox->buttonSymbols == QAbstractSpinBox::NoButtons + ? d->gtkWidget("GtkEntry") + : d->gtkWidget("GtkSpinButton"); bool isEnabled = (spinBox->state & State_Enabled); bool hover = isEnabled && (spinBox->state & State_MouseOver); bool sunken = (spinBox->state & State_Sunken); @@ -1906,8 +1925,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom case CC_Slider: if (const QStyleOptionSlider *slider = qstyleoption_cast(option)) { - GtkWidget *hScaleWidget = d->gtkWidget(QLS("GtkHScale")); - GtkWidget *vScaleWidget = d->gtkWidget(QLS("GtkVScale")); + GtkWidget *hScaleWidget = d->gtkWidget("GtkHScale"); + GtkWidget *vScaleWidget = d->gtkWidget("GtkVScale"); QRect groove = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget); QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget); @@ -2097,7 +2116,7 @@ void QGtkStyle::drawControl(ControlElement element, switch (element) { case CE_ProgressBarLabel: if (const QStyleOptionProgressBar *bar = qstyleoption_cast(option)) { - GtkWidget *gtkProgressBar = d->gtkWidget(QLS("GtkProgressBar")); + GtkWidget *gtkProgressBar = d->gtkWidget("GtkProgressBar"); if (!gtkProgressBar) return; @@ -2200,7 +2219,7 @@ void QGtkStyle::drawControl(ControlElement element, if (button->features & QStyleOptionButton::HasMenu) ir = ir.adjusted(0, 0, -pixelMetric(PM_MenuButtonIndicator, button, widget), 0); - GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton")); + GtkWidget *gtkButton = d->gtkWidget("GtkButton"); QPalette pal = button->palette; int labelState = GTK_STATE_INSENSITIVE; if (option->state & State_Enabled) @@ -2221,7 +2240,7 @@ void QGtkStyle::drawControl(ControlElement element, bool isRadio = (element == CE_RadioButton); // Draw prelight background - GtkWidget *gtkRadioButton = d->gtkWidget(QLS("GtkRadioButton")); + GtkWidget *gtkRadioButton = d->gtkWidget("GtkRadioButton"); if (option->state & State_MouseOver) { gtkPainter.paintFlatBox(gtkRadioButton, "checkbutton", option->rect, @@ -2289,7 +2308,7 @@ void QGtkStyle::drawControl(ControlElement element, } if (!cb->currentText.isEmpty() && !cb->editable) { - GtkWidget *gtkCombo = d->gtkWidget(QLS("GtkComboBox")); + GtkWidget *gtkCombo = d->gtkWidget("GtkComboBox"); QPalette pal = cb->palette; int labelState = GTK_STATE_INSENSITIVE; @@ -2366,7 +2385,7 @@ void QGtkStyle::drawControl(ControlElement element, // Draws the header in tables. if (const QStyleOptionHeader *header = qstyleoption_cast(option)) { Q_UNUSED(header); - GtkWidget *gtkTreeView = d->gtkWidget(QLS("GtkTreeView")); + GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView"); // Get the middle column GtkTreeViewColumn *column = d->gtk_tree_view_get_column((GtkTreeView*)gtkTreeView, 1); Q_ASSERT(column); @@ -2387,7 +2406,7 @@ void QGtkStyle::drawControl(ControlElement element, #ifndef QT_NO_SIZEGRIP case CE_SizeGrip: { - GtkWidget *gtkStatusbar = d->gtkWidget(QLS("GtkStatusbar.GtkFrame")); + GtkWidget *gtkStatusbar = d->gtkWidget("GtkStatusbar.GtkFrame"); QRect gripRect = option->rect.adjusted(0, 0, -gtkStatusbar->style->xthickness, -gtkStatusbar->style->ythickness); gtkPainter.paintResizeGrip( gtkStatusbar, "statusbar", gripRect, GTK_STATE_NORMAL, GTK_SHADOW_OUT, QApplication::isRightToLeft() ? @@ -2399,7 +2418,7 @@ void QGtkStyle::drawControl(ControlElement element, #endif // QT_NO_SIZEGRIP case CE_MenuBarEmptyArea: { - GtkWidget *gtkMenubar = d->gtkWidget(QLS("GtkMenuBar")); + GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar"); GdkColor gdkBg = gtkMenubar->style->bg[GTK_STATE_NORMAL]; // Theme can depend on transparency painter->fillRect(option->rect, QColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8)); if (widget) { // See CE_MenuBarItem @@ -2422,8 +2441,8 @@ void QGtkStyle::drawControl(ControlElement element, painter->save(); if (const QStyleOptionMenuItem *mbi = qstyleoption_cast(option)) { - GtkWidget *gtkMenubarItem = d->gtkWidget(QLS("GtkMenuBar.GtkMenuItem")); - GtkWidget *gtkMenubar = d->gtkWidget(QLS("GtkMenuBar")); + GtkWidget *gtkMenubarItem = d->gtkWidget("GtkMenuBar.GtkMenuItem"); + GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar"); style = gtkMenubarItem->style; @@ -2479,7 +2498,7 @@ void QGtkStyle::drawControl(ControlElement element, break; case CE_Splitter: { - GtkWidget *gtkWindow = d->gtkWidget(QLS("GtkWindow")); // The Murrine Engine currently assumes a widget is passed + GtkWidget *gtkWindow = d->gtkWidget("GtkWindow"); // The Murrine Engine currently assumes a widget is passed gtkPainter.paintHandle(gtkWindow, "splitter", option->rect, gtkPainter.gtkState(option), GTK_SHADOW_NONE, !(option->state & State_Horizontal) ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL, style); @@ -2499,7 +2518,7 @@ void QGtkStyle::drawControl(ControlElement element, if (toolbar->positionWithinLine != QStyleOptionToolBar::End) rect.adjust(0, 0, 1, 0); - GtkWidget *gtkToolbar = d->gtkWidget(QLS("GtkToolbar")); + GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar"); GtkShadowType shadow_type = GTK_SHADOW_NONE; d->gtk_widget_style_get(gtkToolbar, "shadow-type", &shadow_type, NULL); gtkPainter.paintBox( gtkToolbar, "toolbar", rect, @@ -2518,15 +2537,15 @@ void QGtkStyle::drawControl(ControlElement element, const int windowsItemHMargin = 3; // menu item hor text margin const int windowsItemVMargin = 26; // menu item ver text margin const int windowsRightBorder = 15; // right border on windows - GtkWidget *gtkMenuItem = menuItem->checked ? d->gtkWidget(QLS("GtkMenu.GtkCheckMenuItem")) : - d->gtkWidget(QLS("GtkMenu.GtkMenuItem")); + GtkWidget *gtkMenuItem = menuItem->checked ? d->gtkWidget("GtkMenu.GtkCheckMenuItem") : + d->gtkWidget("GtkMenu.GtkMenuItem"); style = gtkPainter.getStyle(gtkMenuItem); QColor borderColor = option->palette.background().color().darker(160); QColor shadow = option->palette.dark().color(); if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) { - GtkWidget *gtkMenuSeparator = d->gtkWidget(QLS("GtkMenu.GtkSeparatorMenuItem")); + GtkWidget *gtkMenuSeparator = d->gtkWidget("GtkMenu.GtkSeparatorMenuItem"); painter->setPen(shadow.lighter(106)); gboolean wide_separators = 0; gint separator_height = 0; @@ -2570,7 +2589,7 @@ void QGtkStyle::drawControl(ControlElement element, bool ignoreCheckMark = false; gint checkSize; - d->gtk_widget_style_get(d->gtkWidget(QLS("GtkMenu.GtkCheckMenuItem")), "indicator-size", &checkSize, NULL); + d->gtk_widget_style_get(d->gtkWidget("GtkMenu.GtkCheckMenuItem"), "indicator-size", &checkSize, NULL); int checkcol = qMax(menuItem->maxIconWidth, qMax(20, checkSize)); @@ -2781,7 +2800,7 @@ void QGtkStyle::drawControl(ControlElement element, case CE_PushButton: if (const QStyleOptionButton *btn = qstyleoption_cast(option)) { - GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton")); + GtkWidget *gtkButton = d->gtkWidget("GtkButton"); proxy()->drawControl(CE_PushButtonBevel, btn, painter, widget); QStyleOptionButton subopt = *btn; subopt.rect = subElementRect(SE_PushButtonContents, btn, widget); @@ -2807,7 +2826,7 @@ void QGtkStyle::drawControl(ControlElement element, case CE_TabBarTabShape: if (const QStyleOptionTab *tab = qstyleoption_cast(option)) { - GtkWidget *gtkNotebook = d->gtkWidget(QLS("GtkNotebook")); + GtkWidget *gtkNotebook = d->gtkWidget("GtkNotebook"); style = gtkPainter.getStyle(gtkNotebook); QRect rect = option->rect; @@ -2874,7 +2893,7 @@ void QGtkStyle::drawControl(ControlElement element, case CE_ProgressBarGroove: if (const QStyleOptionProgressBar *bar = qstyleoption_cast(option)) { Q_UNUSED(bar); - GtkWidget *gtkProgressBar = d->gtkWidget(QLS("GtkProgressBar")); + GtkWidget *gtkProgressBar = d->gtkWidget("GtkProgressBar"); GtkStateType state = gtkPainter.gtkState(option); gtkPainter.paintBox( gtkProgressBar, "trough", option->rect, state, GTK_SHADOW_IN, gtkProgressBar->style); } @@ -2884,7 +2903,7 @@ void QGtkStyle::drawControl(ControlElement element, case CE_ProgressBarContents: if (const QStyleOptionProgressBar *bar = qstyleoption_cast(option)) { GtkStateType state = option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE; - GtkWidget *gtkProgressBar = d->gtkWidget(QLS("GtkProgressBar")); + GtkWidget *gtkProgressBar = d->gtkWidget("GtkProgressBar"); style = gtkProgressBar->style; gtkPainter.paintBox( gtkProgressBar, "trough", option->rect, state, GTK_SHADOW_IN, style); int xt = style->xthickness; @@ -3042,7 +3061,7 @@ QRect QGtkStyle::subControlRect(ComplexControl control, const QStyleOptionComple case CC_SpinBox: if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast(option)) { - GtkWidget *gtkSpinButton = d->gtkWidget(QLS("GtkSpinButton")); + GtkWidget *gtkSpinButton = d->gtkWidget("GtkSpinButton"); int center = spinbox->rect.height() / 2; int xt = spinbox->frame ? gtkSpinButton->style->xthickness : 0; int yt = spinbox->frame ? gtkSpinButton->style->ythickness : 0; @@ -3096,15 +3115,19 @@ QRect QGtkStyle::subControlRect(ComplexControl control, const QStyleOptionComple if (const QStyleOptionComboBox *box = qstyleoption_cast(option)) { // We employ the gtk widget to position arrows and separators for us QString comboBoxPath = box->editable ? QLS("GtkComboBoxEntry") : QLS("GtkComboBox"); - GtkWidget *gtkCombo = d->gtkWidget(comboBoxPath); + GtkWidget *gtkCombo = box->editable ? d->gtkWidget("GtkComboBoxEntry") + : d->gtkWidget("GtkComboBox"); d->gtk_widget_set_direction(gtkCombo, (option->direction == Qt::RightToLeft) ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); GtkAllocation geometry = {0, 0, qMax(0, option->rect.width()), qMax(0, option->rect.height())}; d->gtk_widget_size_allocate(gtkCombo, &geometry); int appears_as_list = !proxy()->styleHint(QStyle::SH_ComboBox_Popup, option, widget); - QString arrowPath = comboBoxPath + QLS(".GtkToggleButton"); - - if (!box->editable && !appears_as_list) - arrowPath += QLS(".GtkHBox.GtkArrow"); + QHashableLatin1Literal arrowPath("GtkComboBoxEntry.GtkToggleButton"); + if (!box->editable) { + if (appears_as_list) + arrowPath = "GtkComboBox.GtkToggleButton"; + else + arrowPath = "GtkComboBox.GtkToggleButton.GtkHBox.GtkArrow"; + } GtkWidget *arrowWidget = d->gtkWidget(arrowPath); if (!arrowWidget) @@ -3163,7 +3186,7 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, case CT_ToolButton: if (const QStyleOptionToolButton *toolbutton = qstyleoption_cast(option)) { - GtkWidget *gtkButton = d->gtkWidget(QLS("GtkToolButton.GtkButton")); + GtkWidget *gtkButton = d->gtkWidget("GtkToolButton.GtkButton"); newSize = size + QSize(2 * gtkButton->style->xthickness, 2 + 2 * gtkButton->style->ythickness); if (widget && qobject_cast(widget->parentWidget())) { QSize minSize(0, 25); @@ -3181,14 +3204,14 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, int textMargin = 8; if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) { - GtkWidget *gtkMenuSeparator = d->gtkWidget(QLS("GtkMenu.GtkSeparatorMenuItem")); + GtkWidget *gtkMenuSeparator = d->gtkWidget("GtkMenu.GtkSeparatorMenuItem"); GtkRequisition sizeReq = {0, 0}; d->gtk_widget_size_request(gtkMenuSeparator, &sizeReq); newSize = QSize(size.width(), sizeReq.height); break; } - GtkWidget *gtkMenuItem = d->gtkWidget(QLS("GtkMenu.GtkCheckMenuItem")); + GtkWidget *gtkMenuItem = d->gtkWidget("GtkMenu.GtkCheckMenuItem"); GtkStyle* style = gtkMenuItem->style; // Note we get the perfect height for the default font since we @@ -3210,12 +3233,12 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, case CT_SpinBox: // QSpinBox does some nasty things that depends on CT_LineEdit - newSize = size + QSize(0, -d->gtkWidget(QLS("GtkSpinButton"))->style->ythickness * 2); + newSize = size + QSize(0, -d->gtkWidget("GtkSpinButton")->style->ythickness * 2); break; case CT_PushButton: if (const QStyleOptionButton *btn = qstyleoption_cast(option)) { - GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton")); + GtkWidget *gtkButton = d->gtkWidget("GtkButton"); gint focusPadding, focusWidth; d->gtk_widget_style_get(gtkButton, "focus-padding", &focusPadding, NULL); d->gtk_widget_style_get(gtkButton, "focus-line-width", &focusWidth, NULL); @@ -3223,7 +3246,7 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, newSize += QSize(2*gtkButton->style->xthickness + 4, 2*gtkButton->style->ythickness); newSize += QSize(2*(focusWidth + focusPadding + 2), 2*(focusWidth + focusPadding)); - GtkWidget *gtkButtonBox = d->gtkWidget(QLS("GtkHButtonBox")); + GtkWidget *gtkButtonBox = d->gtkWidget("GtkHButtonBox"); gint minWidth = 85, minHeight = 0; d->gtk_widget_style_get(gtkButtonBox, "child-min-width", &minWidth, "child-min-height", &minHeight, NULL); @@ -3236,13 +3259,13 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, break; case CT_Slider: { - GtkWidget *gtkSlider = d->gtkWidget(QLS("GtkHScale")); + GtkWidget *gtkSlider = d->gtkWidget("GtkHScale"); newSize = size + QSize(2*gtkSlider->style->xthickness, 2*gtkSlider->style->ythickness); } break; case CT_LineEdit: { - GtkWidget *gtkEntry = d->gtkWidget(QLS("GtkEntry")); + GtkWidget *gtkEntry = d->gtkWidget("GtkEntry"); newSize = size + QSize(2*gtkEntry->style->xthickness, 2 + 2*gtkEntry->style->ythickness); } break; @@ -3253,7 +3276,7 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, case CT_ComboBox: if (const QStyleOptionComboBox *combo = qstyleoption_cast(option)) { - GtkWidget *gtkCombo = d->gtkWidget(QLS("GtkComboBox")); + GtkWidget *gtkCombo = d->gtkWidget("GtkComboBox"); QRect arrowButtonRect = proxy()->subControlRect(CC_ComboBox, combo, SC_ComboBoxArrow, widget); newSize = size + QSize(12 + arrowButtonRect.width() + 2*gtkCombo->style->xthickness, 4 + 2*gtkCombo->style->ythickness); @@ -3405,7 +3428,7 @@ QRect QGtkStyle::subElementRect(SubElement element, const QStyleOption *option, return option->rect; case SE_PushButtonContents: if (!d->gtk_check_version(2, 10, 0)) { - GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton")); + GtkWidget *gtkButton = d->gtkWidget("GtkButton"); GtkBorder *border = 0; d->gtk_widget_style_get(gtkButton, "inner-border", &border, NULL); if (border) { diff --git a/src/gui/styles/qgtkstyle_p.cpp b/src/gui/styles/qgtkstyle_p.cpp index a033407..6916c02 100644 --- a/src/gui/styles/qgtkstyle_p.cpp +++ b/src/gui/styles/qgtkstyle_p.cpp @@ -60,6 +60,7 @@ #include #include #include +#include #include #include @@ -233,17 +234,22 @@ static void update_toolbar_style(GtkWidget *gtkToolBar, GParamSpec *, gpointer) } } -static QString classPath(GtkWidget *widget) +static QHashableLatin1Literal classPath(GtkWidget *widget) { - char* class_path; + char *class_path; QGtkStylePrivate::gtk_widget_path (widget, NULL, &class_path, NULL); - QString path = QLS(class_path); + + char *copy = class_path; + if (strncmp(copy, "GtkWindow.", 10) == 0) + copy += 10; + if (strncmp(copy, "GtkFixed.", 9) == 0) + copy += 9; + + copy = strdup(copy); + g_free(class_path); - // Remove the prefixes - path.remove(QLS("GtkWindow.")); - path.remove(QLS("GtkFixed.")); - return path; + return QHashableLatin1Literal::fromData(copy); } @@ -261,6 +267,7 @@ bool QGtkStyleFilter::eventFilter(QObject *obj, QEvent *e) } QList QGtkStylePrivate::instances; +QGtkStylePrivate::WidgetMap *QGtkStylePrivate::widgetMap = 0; QGtkStylePrivate::QGtkStylePrivate() : QCleanlooksStylePrivate() @@ -282,7 +289,7 @@ void QGtkStylePrivate::init() qApp->installEventFilter(&filter); } -GtkWidget* QGtkStylePrivate::gtkWidget(const QString &path) +GtkWidget* QGtkStylePrivate::gtkWidget(const QHashableLatin1Literal &path) { GtkWidget *widget = gtkWidgetMap()->value(path); if (!widget) { @@ -292,10 +299,10 @@ GtkWidget* QGtkStylePrivate::gtkWidget(const QString &path) return widget; } -GtkStyle* QGtkStylePrivate::gtkStyle(const QString &path) +GtkStyle* QGtkStylePrivate::gtkStyle(const QHashableLatin1Literal &path) { - if (gtkWidgetMap()->contains(path)) - return gtkWidgetMap()->value(path)->style; + if (GtkWidget *w = gtkWidgetMap()->value(path)) + return w->style; return 0; } @@ -497,7 +504,7 @@ void QGtkStylePrivate::initGtkWidgets() const } static QString themeName; - if (!gtkWidgetMap()->contains(QLS("GtkWindow")) && themeName.isEmpty()) { + if (!gtkWidgetMap()->contains("GtkWindow") && themeName.isEmpty()) { themeName = getThemeName(); if (themeName.isEmpty()) { @@ -522,14 +529,14 @@ void QGtkStylePrivate::initGtkWidgets() const QGtkStylePrivate::gtk_widget_realize(gtkWindow); if (displayDepth == -1) displayDepth = QGtkStylePrivate::gdk_drawable_get_depth(gtkWindow->window); - gtkWidgetMap()->insert(QLS("GtkWindow"), gtkWindow); + gtkWidgetMap()->insert(QHashableLatin1Literal::fromData(strdup("GtkWindow")), gtkWindow); // Make all other widgets. respect the text direction if (qApp->layoutDirection() == Qt::RightToLeft) QGtkStylePrivate::gtk_widget_set_default_direction(GTK_TEXT_DIR_RTL); - if (!gtkWidgetMap()->contains(QLS("GtkButton"))) { + if (!gtkWidgetMap()->contains("GtkButton")) { GtkWidget *gtkButton = QGtkStylePrivate::gtk_button_new(); addWidget(gtkButton); g_signal_connect(gtkButton, "style-set", G_CALLBACK(gtkStyleSetCallback), 0); @@ -566,12 +573,12 @@ void QGtkStylePrivate::initGtkWidgets() const // When styles change subwidgets can get rearranged // as with the combo box. We need to update the widget map // to reflect this; - QHash oldMap = *gtkWidgetMap(); + QHash oldMap = *gtkWidgetMap(); gtkWidgetMap()->clear(); - QHashIterator it(oldMap); + QHashIterator it(oldMap); while (it.hasNext()) { it.next(); - if (!it.key().contains(QLatin1Char('.'))) { + if (!strchr(it.key().data(), '.')) { addAllSubWidgets(it.value()); } } @@ -586,8 +593,13 @@ void QGtkStylePrivate::initGtkWidgets() const */ void QGtkStylePrivate::cleanupGtkWidgets() { - if (gtkWidgetMap()->contains(QLS("GtkWindow"))) // Gtk will destroy all children - gtk_widget_destroy(gtkWidgetMap()->value(QLS("GtkWindow"))); + if (!widgetMap) + return; + if (widgetMap->contains("GtkWindow")) // Gtk will destroy all children + gtk_widget_destroy(widgetMap->value("GtkWindow")); + for (QHash::const_iterator it = widgetMap->constBegin(); + it != widgetMap->constEnd(); ++it) + free(const_cast(it.key().data())); } static bool resolveGConf() @@ -678,7 +690,7 @@ QString QGtkStylePrivate::getThemeName() int QGtkStylePrivate::getSpinboxArrowSize() const { const int MIN_ARROW_WIDTH = 6; - GtkWidget *spinButton = gtkWidget(QLS("GtkSpinButton")); + GtkWidget *spinButton = gtkWidget("GtkSpinButton"); GtkStyle *style = spinButton->style; gint size = pango_font_description_get_size (style->font_desc); gint arrow_size; @@ -698,17 +710,17 @@ bool QGtkStylePrivate::isKDE4Session() void QGtkStylePrivate::applyCustomPaletteHash() { - QPalette menuPal = gtkWidgetPalette(QLS("GtkMenu")); - GdkColor gdkBg = gtkWidget(QLS("GtkMenu"))->style->bg[GTK_STATE_NORMAL]; + QPalette menuPal = gtkWidgetPalette("GtkMenu"); + GdkColor gdkBg = gtkWidget("GtkMenu")->style->bg[GTK_STATE_NORMAL]; QColor bgColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8); menuPal.setBrush(QPalette::Base, bgColor); menuPal.setBrush(QPalette::Window, bgColor); qApp->setPalette(menuPal, "QMenu"); - QPalette toolbarPal = gtkWidgetPalette(QLS("GtkToolbar")); + QPalette toolbarPal = gtkWidgetPalette("GtkToolbar"); qApp->setPalette(toolbarPal, "QToolBar"); - QPalette menuBarPal = gtkWidgetPalette(QLS("GtkMenuBar")); + QPalette menuBarPal = gtkWidgetPalette("GtkMenuBar"); qApp->setPalette(menuBarPal, "QMenuBar"); } @@ -717,7 +729,7 @@ void QGtkStylePrivate::applyCustomPaletteHash() */ GtkWidget* QGtkStylePrivate::getTextColorWidget() const { - return gtkWidget(QLS("GtkEntry")); + return gtkWidget("GtkEntry"); } void QGtkStylePrivate::setupGtkWidget(GtkWidget* widget) @@ -726,7 +738,7 @@ void QGtkStylePrivate::setupGtkWidget(GtkWidget* widget) static GtkWidget* protoLayout = 0; if (!protoLayout) { protoLayout = QGtkStylePrivate::gtk_fixed_new(); - QGtkStylePrivate::gtk_container_add((GtkContainer*)(gtkWidgetMap()->value(QLS("GtkWindow"))), protoLayout); + QGtkStylePrivate::gtk_container_add((GtkContainer*)(gtkWidgetMap()->value("GtkWindow")), protoLayout); } Q_ASSERT(protoLayout); @@ -739,8 +751,19 @@ void QGtkStylePrivate::setupGtkWidget(GtkWidget* widget) void QGtkStylePrivate::addWidgetToMap(GtkWidget *widget) { if (Q_GTK_IS_WIDGET(widget)) { - gtk_widget_realize(widget); - gtkWidgetMap()->insert(classPath(widget), widget); + gtk_widget_realize(widget); + QHashableLatin1Literal widgetPath = classPath(widget); + + WidgetMap *map = gtkWidgetMap(); + WidgetMap::iterator it = map->find(widgetPath); + if (it != map->end()) { + free(const_cast(it.key().data())); + map->erase(it); + } + map->insert(widgetPath, widget); +#ifdef DUMP_GTK_WIDGET_TREE + qWarning("Inserted Gtk Widget: %s", widgetPath.data()); +#endif } } @@ -753,7 +776,7 @@ void QGtkStylePrivate::addAllSubWidgets(GtkWidget *widget, gpointer v) } // Updates window/windowtext palette based on the indicated gtk widget -QPalette QGtkStylePrivate::gtkWidgetPalette(const QString >kWidgetName) const +QPalette QGtkStylePrivate::gtkWidgetPalette(const QHashableLatin1Literal >kWidgetName) const { GtkWidget *gtkWidget = QGtkStylePrivate::gtkWidget(gtkWidgetName); Q_ASSERT(gtkWidget); @@ -1089,6 +1112,28 @@ QIcon QGtkStylePrivate::getFilesystemIcon(const QFileInfo &info) return icon; } +bool operator==(const QHashableLatin1Literal &l1, const QHashableLatin1Literal &l2) +{ + return l1.size() == l2.size() || qstrcmp(l1.data(), l2.data()) == 0; +} + +// copied from qHash.cpp +uint qHash(const QHashableLatin1Literal &key) +{ + int n = key.size(); + const uchar *p = reinterpret_cast(key.data()); + uint h = 0; + uint g; + + while (n--) { + h = (h << 4) + *p++; + if ((g = (h & 0xf0000000)) != 0) + h ^= g >> 23; + h &= ~g; + } + return h; +} + QT_END_NAMESPACE #endif // !defined(QT_NO_STYLE_GTK) diff --git a/src/gui/styles/qgtkstyle_p.h b/src/gui/styles/qgtkstyle_p.h index db5b9b9..5ded4dd 100644 --- a/src/gui/styles/qgtkstyle_p.h +++ b/src/gui/styles/qgtkstyle_p.h @@ -56,6 +56,9 @@ #include #if !defined(QT_NO_STYLE_GTK) +#include +#include + #include #include @@ -72,6 +75,50 @@ typedef unsigned long XID; #define QLS(x) QLatin1String(x) +// ### Qt 4.7 - merge with QLatin1Literal +class QHashableLatin1Literal +{ +public: + int size() const { return m_size; } + const char *data() const { return m_data; } + + template + QHashableLatin1Literal(const char (&str)[N]) + : m_size(N - 1), m_data(str) {} + + QHashableLatin1Literal(const QHashableLatin1Literal &other) + : m_size(other.m_size), m_data(other.m_data) + {} + + QHashableLatin1Literal &operator=(const QHashableLatin1Literal &other) + { + if (this == &other) + return *this; + *const_cast(&m_size) = other.m_size; + *const_cast(&m_data) = const_cast(other.m_data); + return *this; + } + + QString toString() const { return QString::fromLatin1(m_data, m_size); } + + static QHashableLatin1Literal fromData(const char *str) + { + return QHashableLatin1Literal(str, qstrlen(str)); + } + +private: + QHashableLatin1Literal(const char *str, int length) + : m_size(length), m_data(str) + {} + + const int m_size; + const char *m_data; +}; + +bool operator==(const QHashableLatin1Literal &l1, const QHashableLatin1Literal &l2); +inline bool operator!=(const QHashableLatin1Literal &l1, const QHashableLatin1Literal &l2) { return !operator==(l1, l2); } +uint qHash(const QHashableLatin1Literal &key); + class GConf; class GConfClient; @@ -252,7 +299,6 @@ typedef char* (*Ptr_gnome_icon_lookup_sync) ( GnomeIconLookupFlags flags, GnomeIconLookupResultFlags *result); - class QGtkStylePrivate : public QCleanlooksStylePrivate { Q_DECLARE_PUBLIC(QGtkStyle) @@ -262,8 +308,8 @@ public: QGtkStyleFilter filter; - static GtkWidget* gtkWidget(const QString &path); - static GtkStyle* gtkStyle(const QString &path = QLatin1String("GtkWindow")); + static GtkWidget* gtkWidget(const QHashableLatin1Literal &path); + static GtkStyle* gtkStyle(const QHashableLatin1Literal &path = QHashableLatin1Literal("GtkWindow")); virtual void resolveGtk() const; virtual void initGtkMenu() const; @@ -418,17 +464,25 @@ public: static Ptr_gnome_icon_lookup_sync gnome_icon_lookup_sync; static Ptr_gnome_vfs_init gnome_vfs_init; - virtual QPalette gtkWidgetPalette(const QString >kWidgetName) const; + virtual QPalette gtkWidgetPalette(const QHashableLatin1Literal >kWidgetName) const; protected: - typedef QHash WidgetMap; + typedef QHash WidgetMap; + + static inline void destroyWidgetMap() + { + cleanupGtkWidgets(); + delete widgetMap; + widgetMap = 0; + } static inline WidgetMap *gtkWidgetMap() { - static WidgetMap *map = 0; - if (!map) - map = new WidgetMap(); - return map; + if (!widgetMap) { + widgetMap = new WidgetMap(); + qAddPostRoutine(destroyWidgetMap); + } + return widgetMap; } static QStringList extract_filter(const QString &rawFilter); @@ -443,6 +497,7 @@ protected: private: static QList instances; + static WidgetMap *widgetMap; friend class QGtkStyleUpdateScheduler; }; -- cgit v0.12 From aee5766de0ab6c942ae3e3747162871651a4ab74 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Thu, 11 Feb 2010 17:31:30 +0100 Subject: Speed up creation of the pixmap cache key As discussed with Jens and Joao Reviewed-by: Robert Griebl --- src/gui/styles/qstylehelper.cpp | 64 +++++++++++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 9 deletions(-) diff --git a/src/gui/styles/qstylehelper.cpp b/src/gui/styles/qstylehelper.cpp index 071ec23..359e7e1 100644 --- a/src/gui/styles/qstylehelper.cpp +++ b/src/gui/styles/qstylehelper.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -56,22 +57,67 @@ QT_BEGIN_NAMESPACE +// internal helper. Converts an integer value to an unique string token +template +struct HexString +{ + inline HexString(const T t) + : val(t) + {} + + inline void write(QChar *&dest) const + { + const ushort hexChars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; + const char *c = reinterpret_cast(&val); + for (uint i = 0; i < sizeof(T); ++i) { + *dest++ = hexChars[*c & 0xf]; + *dest++ = hexChars[(*c & 0xf0) >> 4]; + ++c; + } + } + + const T val; +}; + +// specialization to enable fast concatenating of our string tokens to a string +template +struct QConcatenable > +{ + typedef HexString type; + enum { ExactSize = true }; + static int size(const HexString &str) { return sizeof(str.val) * 2; } + static inline void appendTo(const HexString &str, QChar *&out) { str.write(out); } +}; + namespace QStyleHelper { QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size) { const QStyleOptionComplex *complexOption = qstyleoption_cast(option); - QString tmp = QString::fromLatin1("%1-%2-%3-%4-%5-%6x%7").arg(key).arg(uint(option->state)).arg(option->direction) - .arg(complexOption ? uint(complexOption->activeSubControls) : uint(0)) - .arg(option->palette.cacheKey()).arg(size.width()).arg(size.height()); + + QString tmp = key + % QLatin1Char('-') + % HexString(option->state) + % QLatin1Char('-') + % HexString(option->direction) + % QLatin1Char('-') + % HexString(complexOption ? uint(complexOption->activeSubControls) : 0u) + % QLatin1Char('-') + % HexString(option->palette.cacheKey()) + % QLatin1Char('-') + % HexString(size.width()) + % QLatin1Char('x') + % HexString(size.height()); + #ifndef QT_NO_SPINBOX if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast(option)) { - tmp.append(QLatin1Char('-')); - tmp.append(QString::number(spinBox->buttonSymbols)); - tmp.append(QLatin1Char('-')); - tmp.append(QString::number(spinBox->stepEnabled)); - tmp.append(QLatin1Char('-')); - tmp.append(QLatin1Char(spinBox->frame ? '1' : '0')); + tmp = tmp + % QLatin1Char('-') + % HexString(spinBox->buttonSymbols) + % QLatin1Char('-') + % HexString(spinBox->stepEnabled) + % QLatin1Char('-') + % QLatin1Char(spinBox->frame ? '1' : '0'); } #endif // QT_NO_SPINBOX return tmp; -- cgit v0.12 From d4bae0d0e96138d913bfc7ec9fa86b887043787f Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Wed, 3 Mar 2010 15:44:46 +0100 Subject: Fix for QRadioButtons and QCheckBoxes drawn incorrectly when a style sheet is set. Maemo 5 draws these controls very differently, so we can't rely on QWindowStyle handling CE_RadioButton/CE_CheckBox. Task-number: QTBUG-8356 Reviewed-by: ogoffart --- src/gui/styles/qstylesheetstyle.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index bc1bece..5376386 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -3457,10 +3457,17 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q case CE_RadioButton: case CE_CheckBox: - rule.drawRule(p, opt->rect); - ParentStyle::drawControl(ce, opt, p, w); - return; - + if (rule.hasBox() || !rule.hasNativeBorder() || rule.hasDrawable() || hasStyleRule(w, PseudoElement_Indicator)) { + rule.drawRule(p, opt->rect); + ParentStyle::drawControl(ce, opt, p, w); + return; + } else if (const QStyleOptionButton *btn = qstyleoption_cast(opt)) { + QStyleOptionButton butOpt(*btn); + rule.configurePalette(&butOpt.palette, QPalette::ButtonText, QPalette::Button); + baseStyle()->drawControl(ce, &butOpt, p, w); + return; + } + break; case CE_RadioButtonLabel: case CE_CheckBoxLabel: if (const QStyleOptionButton *btn = qstyleoption_cast(opt)) { -- cgit v0.12 From f3dab146f231398455e52ff99d4c6f8365c8d412 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Thu, 18 Feb 2010 16:07:27 +0100 Subject: Do not reset state too early on RMB click When long-tapping on a spin box, a context menu event would stop incrementing the spin box since we called reset() too early. Call reset only if it's clear that there's a context menu. Also don't crash if menu is 0. Reviewed-by: Robert Griebl --- src/gui/widgets/qabstractspinbox.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/qabstractspinbox.cpp b/src/gui/widgets/qabstractspinbox.cpp index 4a6235c..7e2f20d 100644 --- a/src/gui/widgets/qabstractspinbox.cpp +++ b/src/gui/widgets/qabstractspinbox.cpp @@ -1248,8 +1248,11 @@ void QAbstractSpinBox::contextMenuEvent(QContextMenuEvent *event) #else Q_D(QAbstractSpinBox); - d->reset(); QPointer menu = d->edit->createStandardContextMenu(); + if (!menu) + return; + + d->reset(); QAction *selAll = new QAction(tr("&Select All"), menu); menu->insertAction(d->edit->d_func()->selectAllAction, -- cgit v0.12 From 6ecee3c9790678d34b6d159a10d509d0f9244bc8 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Wed, 3 Mar 2010 15:38:43 +0100 Subject: Introduce a setAttribute_internal helper This allows to switch certain attributes on or off without copy/pasting lots of code. Used to switch off mutually exclusive attributes, e.g. the Mac*Size attributes, or Maemo's portrait/landscape attributes. Reviewed-by: Robert Griebl --- src/gui/kernel/qwidget.cpp | 50 +++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 7fdee2b..14fecb0 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -10294,6 +10294,29 @@ const QPixmap *QWidget::icon() const #endif // QT3_SUPPORT + /*! + \internal + + This just sets the corresponding attribute bit to 1 or 0 + */ +static void setAttribute_internal(Qt::WidgetAttribute attribute, bool on, QWidgetData *data, + QWidgetPrivate *d) +{ + if (attribute < int(8*sizeof(uint))) { + if (on) + data->widget_attributes |= (1<widget_attributes &= ~(1<high_attributes[int_off] |= (1<<(x-(int_off*8*sizeof(uint)))); + else + d->high_attributes[int_off] &= ~(1<<(x-(int_off*8*sizeof(uint)))); + } +} + /*! Sets the attribute \a attribute on this widget if \a on is true; otherwise clears the attribute. @@ -10320,19 +10343,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) } #endif - if (attribute < int(8*sizeof(uint))) { - if (on) - data->widget_attributes |= (1<widget_attributes &= ~(1<high_attributes[int_off] |= (1<<(x-(int_off*8*sizeof(uint)))); - else - d->high_attributes[int_off] &= ~(1<<(x-(int_off*8*sizeof(uint)))); - } + setAttribute_internal(attribute, on, data, d); switch (attribute) { @@ -10391,14 +10402,11 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) #ifdef Q_WS_MAC { // We can only have one of these set at a time - static const int MacSizes[] = { Qt::WA_MacNormalSize, Qt::WA_MacSmallSize, - Qt::WA_MacMiniSize, 0 }; - for (int i = 0; MacSizes[i] != 0; ++i) { - if (MacSizes[i] == attribute) - continue; - int macsize_x = MacSizes[i] - 8*sizeof(uint); - int macsize_int_off = macsize_x / (8*sizeof(uint)); - d->high_attributes[macsize_int_off] &= ~(1<<(macsize_x-(macsize_int_off*8*sizeof(uint)))); + const Qt::WidgetAttribute MacSizes[] = { Qt::WA_MacNormalSize, Qt::WA_MacSmallSize, + Qt::WA_MacMiniSize }; + for (int i = 0; i < 3; ++i) { + if (MacSizes[i] != attribute) + setAttribute_internal(MacSizes[i], false, data, d); } d->macUpdateSizeAttribute(); } -- cgit v0.12 From 4a961ad412846af126ece6d9e2385e3ebe009d72 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Wed, 16 Dec 2009 14:43:43 +0100 Subject: be more verbose when warning about incompatible libraries --- src/corelib/kernel/qobject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 761b31f..8e4ec7c 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -132,7 +132,8 @@ QObjectPrivate::QObjectPrivate(int version) : threadData(0), connectionLists(0), senders(0), currentSender(0), currentChildBeingDeleted(0) { if (version != QObjectPrivateVersion) - qFatal("Cannot mix incompatible Qt libraries"); + qFatal("Cannot mix incompatible Qt library (version 0x%x) with this library (version 0x%x)", + version, QObjectPrivateVersion); // QObjectData initialization q_ptr = 0; -- cgit v0.12 From 48dc16b34586f7dca8bf513f6447c97543801814 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Wed, 3 Mar 2010 15:58:18 +0100 Subject: Block the Maemo5 window attribute values from being assigned to something else on other platforms. Reviewed-By: Harald Fernengel --- src/corelib/global/qnamespace.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 6ee8ae9..d2546a7 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -500,6 +500,14 @@ public: WA_MergeSoftkeys = 124, WA_MergeSoftkeysRecursively = 125, +#if 0 // these values are reserved for Maemo5 - do not re-use them + WA_Maemo5NonComposited = 126, + WA_Maemo5StackedWindow = 127, + WA_Maemo5PortraitOrientation = 128, + WA_Maemo5LandscapeOrientation = 129, + WA_Maemo5AutoOrientation = 130, + WA_Maemo5ShowProgressIndicator = 131, +#endif // Add new attributes before this line WA_AttributeCount }; -- cgit v0.12 From 5b97c515ea574c1ac23c8595af34de406db2536d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Wed, 3 Mar 2010 15:58:02 +0100 Subject: Updating documentation for how to build QWS with tslib Reviewed-by: David Boddie --- doc/src/platforms/emb-pointer.qdoc | 6 +++--- doc/src/snippets/code/doc_src_emb-pointer.qdoc | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/src/platforms/emb-pointer.qdoc b/doc/src/platforms/emb-pointer.qdoc index 34510da..3c37b63 100644 --- a/doc/src/platforms/emb-pointer.qdoc +++ b/doc/src/platforms/emb-pointer.qdoc @@ -154,9 +154,9 @@ in the build environment. The tslib sources can be downloaded from \l - http://tslib.berlios.de. Use the \c configure script's -L and - -I options to explicitly specify the location of the library and - its headers: + http://tslib.berlios.de. Specify the location of the library and + its headers using -L and -I options in the \c qmake.conf file in + your \c mkspec. Also it can be helpful to add a -rpath-link: \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 7 diff --git a/doc/src/snippets/code/doc_src_emb-pointer.qdoc b/doc/src/snippets/code/doc_src_emb-pointer.qdoc index 9661ae5..0d66e18 100644 --- a/doc/src/snippets/code/doc_src_emb-pointer.qdoc +++ b/doc/src/snippets/code/doc_src_emb-pointer.qdoc @@ -77,7 +77,10 @@ export QWS_MOUSE_PROTO="Vr41xx:press=500:/dev/misc/ts" //! [7] -./configure -L -I +.... +QMAKE_CFLAGS += -I +QMAKE_LFLAGS += -L -Wl,-rpath-link= +.... //! [7] -- cgit v0.12 From bfd0d6557dc54c0fd0270de6c138ea1031ea092c Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Wed, 3 Mar 2010 16:52:41 +0100 Subject: Fix warnings on MSVC --- src/gui/graphicsview/qgraphicslinearlayout.cpp | 2 ++ src/gui/image/qpixmapfilter.cpp | 4 ++-- src/gui/kernel/qwidget.cpp | 1 - src/gui/painting/qdrawhelper.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp index 6a9eb29..9722683 100644 --- a/src/gui/graphicsview/qgraphicslinearlayout.cpp +++ b/src/gui/graphicsview/qgraphicslinearlayout.cpp @@ -554,6 +554,8 @@ void QGraphicsLinearLayout::dump(int indent) const d->orientation == Qt::Horizontal ? "Horizontal" : "Vertical"); d->engine.dump(indent + 1); } +#else + Q_UNUSED(indent); #endif } diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index 2792e45..0abf51f 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -726,7 +726,7 @@ void expblur(QImage &img, qreal radius, bool improvedQuality = false, int transp int img_height = img.height(); for (int row = 0; row < img_height; ++row) { - for (int i = 0; i <= improvedQuality; ++i) + for (int i = 0; i <= int(improvedQuality); ++i) qt_blurrow(img, row, alpha); } @@ -759,7 +759,7 @@ void expblur(QImage &img, qreal radius, bool improvedQuality = false, int transp img_height = temp.height(); for (int row = 0; row < img_height; ++row) { - for (int i = 0; i <= improvedQuality; ++i) + for (int i = 0; i <= int(improvedQuality); ++i) qt_blurrow(temp, row, alpha); } diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 2f6ec6b..aa5d259 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -5339,7 +5339,6 @@ void QWidgetPrivate::render(QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags, bool readyToRender) { - Q_Q(QWidget); if (!target) { qWarning("QWidget::render: null pointer to paint device"); return; diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 891f4c2..acd286a 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -7813,7 +7813,6 @@ static void qt_blend_color_argb_armv6(int count, const QSpan *spans, void *userD void qInitDrawhelperAsm() { - const uint features = qDetectCPUFeatures(); qt_memfill32 = qt_memfill_template; qt_memfill16 = qt_memfill_quint16; //qt_memfill_template; @@ -7822,6 +7821,7 @@ void qInitDrawhelperAsm() CompositionFunctionSolid *functionForModeSolidAsm = 0; #ifdef QT_NO_DEBUG + const uint features = qDetectCPUFeatures(); if (false) { #ifdef QT_HAVE_SSE2 } else if (features & SSE2) { -- cgit v0.12 From f57521e4c658cf239f4691efed66e49c41f22bd5 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 3 Mar 2010 17:15:47 +0100 Subject: Fix compile --- src/gui/styles/qgtkstyle_p.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/styles/qgtkstyle_p.h b/src/gui/styles/qgtkstyle_p.h index 5ded4dd..e8b0be7 100644 --- a/src/gui/styles/qgtkstyle_p.h +++ b/src/gui/styles/qgtkstyle_p.h @@ -56,6 +56,7 @@ #include #if !defined(QT_NO_STYLE_GTK) +#include #include #include -- cgit v0.12 From b489394e695f78d78db9bf08bc985219f8fb9bb2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 3 Mar 2010 17:14:45 +0100 Subject: Fix compilation: include QString in order to use QString. It doesn't happen on my system, but the CI system complains, so I guess it's a namespace issue. --- src/gui/styles/qgtkstyle_p.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/styles/qgtkstyle_p.h b/src/gui/styles/qgtkstyle_p.h index e8b0be7..6ee7904 100644 --- a/src/gui/styles/qgtkstyle_p.h +++ b/src/gui/styles/qgtkstyle_p.h @@ -76,6 +76,8 @@ typedef unsigned long XID; #define QLS(x) QLatin1String(x) +QT_BEGIN_NAMESPACE + // ### Qt 4.7 - merge with QLatin1Literal class QHashableLatin1Literal { @@ -120,6 +122,8 @@ bool operator==(const QHashableLatin1Literal &l1, const QHashableLatin1Literal & inline bool operator!=(const QHashableLatin1Literal &l1, const QHashableLatin1Literal &l2) { return !operator==(l1, l2); } uint qHash(const QHashableLatin1Literal &key); +QT_END_NAMESPACE + class GConf; class GConfClient; -- cgit v0.12 From c7f2181a25243ed07f1406c7023dfdd5fb75d77d Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Wed, 3 Mar 2010 17:25:07 +0100 Subject: Make sure not to crash if createStandardContextMenu() returns 0 (e.g. on Maemo5) Reviewed-by: Harald Fernengel --- src/gui/widgets/qlineedit.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 0ba8b9f..595f552 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -2038,9 +2038,10 @@ void QLineEdit::dropEvent(QDropEvent* e) */ void QLineEdit::contextMenuEvent(QContextMenuEvent *event) { - QMenu *menu = createStandardContextMenu(); - menu->setAttribute(Qt::WA_DeleteOnClose); - menu->popup(event->globalPos()); + if (QMenu *menu = createStandardContextMenu()) { + menu->setAttribute(Qt::WA_DeleteOnClose); + menu->popup(event->globalPos()); + } } #if defined(Q_WS_WIN) -- cgit v0.12 From 65e7400babb0625f4d7616ec5d71490a2dcd3c6f Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Wed, 27 Jan 2010 15:54:25 +0100 Subject: Always redraw the complete control when an input event comes in. The problem here is that a pre-edit string won't be detected by updateDisplayText(), so the control thinks nothing has changed when a new pre-edit string is set. Reviewed-By: Simon Hausmann (cherry picked from commit 16f30906f6eea3e00351478555f153697a6e186d) --- src/gui/widgets/qlinecontrol.cpp | 6 +++--- src/gui/widgets/qlinecontrol_p.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index db099e8..9ec0feb 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE Updates the display text based of the current edit text If the text has changed will emit displayTextChanged() */ -void QLineControl::updateDisplayText() +void QLineControl::updateDisplayText(bool forceUpdate) { QString orig = m_textLayout.text(); QString str; @@ -102,7 +102,7 @@ void QLineControl::updateDisplayText() m_textLayout.endLayout(); m_ascent = qRound(l.ascent()); - if (str != orig) + if (str != orig || forceUpdate) emit displayTextChanged(str); } @@ -476,7 +476,7 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event) } } m_textLayout.setAdditionalFormats(formats); - updateDisplayText(); + updateDisplayText(/*force*/ true); if (cursorPositionChanged) emitCursorPositionChanged(); if (isGettingInput) diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h index d6f2705..3f1bc2c 100644 --- a/src/gui/widgets/qlinecontrol_p.h +++ b/src/gui/widgets/qlinecontrol_p.h @@ -239,7 +239,7 @@ private: void init(const QString &txt); void removeSelectedText(); void internalSetText(const QString &txt, int pos = -1, bool edited = true); - void updateDisplayText(); + void updateDisplayText(bool forceUpdate = false); void internalInsert(const QString &s); void internalDelete(bool wasBackspace = false); -- cgit v0.12 From 97728e94e199017204d9c70f042ccb62e4eacc90 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Wed, 3 Mar 2010 17:48:34 +0100 Subject: Remove the Qt 4.7 #if guards that were needed for 4.6 Reviewed-by: TrustMe --- src/gui/widgets/qlineedit.cpp | 3 --- src/gui/widgets/qlineedit.h | 6 ------ 2 files changed, 9 deletions(-) diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 595f552..7ccced6 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -383,8 +383,6 @@ void QLineEdit::setText(const QString& text) d->control->setText(text); } -// ### Qt 4.7: remove this #if guard -#if (QT_VERSION >= 0x407000) || defined(Q_WS_MAEMO_5) /*! \since 4.7 @@ -414,7 +412,6 @@ void QLineEdit::setPlaceholderText(const QString& placeholderText) update(); } } -#endif /*! \property QLineEdit::displayText diff --git a/src/gui/widgets/qlineedit.h b/src/gui/widgets/qlineedit.h index fa04bfc..94e0dbe 100644 --- a/src/gui/widgets/qlineedit.h +++ b/src/gui/widgets/qlineedit.h @@ -83,10 +83,7 @@ class Q_GUI_EXPORT QLineEdit : public QWidget Q_PROPERTY(bool undoAvailable READ isUndoAvailable) Q_PROPERTY(bool redoAvailable READ isRedoAvailable) Q_PROPERTY(bool acceptableInput READ hasAcceptableInput) -// ### Qt 4.7: remove this #if guard -#if (QT_VERSION >= 0x407000) || defined(Q_WS_MAEMO_5) Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText) -#endif public: explicit QLineEdit(QWidget* parent=0); @@ -102,11 +99,8 @@ public: QString displayText() const; -// ### Qt 4.7: remove this #if guard -#if (QT_VERSION >= 0x407000) || defined(Q_WS_MAEMO_5) QString placeholderText() const; void setPlaceholderText(const QString &); -#endif int maxLength() const; void setMaxLength(int); -- cgit v0.12 From c9c1ae3030bff8b8e64d1c4e02f28faba1a8eb68 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 3 Mar 2010 17:31:40 +0100 Subject: Avoid QString reallocation in QTextEngine::itemize() Calling QString::utf16() will cause reallocation (for null-termination) if the string was created via fromRawData(). Reviewed-by: Benjamin Poulain --- src/gui/text/qtextengine.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 02eae98..2291138 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1434,9 +1434,7 @@ void QTextEngine::itemize() const layoutData->hasBidi = bidiItemize(const_cast(this), analysis, control); } - const ushort *unicode = layoutData->string.utf16(); - // correctly assign script, isTab and isObject to the script analysis - const ushort *uc = unicode; + const ushort *uc = reinterpret_cast(layoutData->string.unicode()); const ushort *e = uc + length; int lastScript = QUnicodeTables::Common; while (uc < e) { -- cgit v0.12 From 9b60566af57543310a7b5bec03b5de1e24c7f746 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 3 Mar 2010 18:30:51 +0100 Subject: Fix source compatibility of qRegisterMetaType ActiveQt is having construct like qRegisterMetaType("Foo*", (Foo*)0 ); instead of qRegisterMetaType("Foo*"); Which the compiler could not disambiguate anymore since commit 03daf059647c0a0222e8774b0a083f58c8e64934 Reviewed-by: Thierry --- src/corelib/kernel/qmetatype.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 98ed4bd..2108b92 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -173,7 +173,7 @@ namespace QtPrivate { template int qRegisterMetaType(const char *typeName #ifndef qdoc - , typename QMetaTypeId2::CustomType * dummy = 0 + , T * dummy = 0 #endif ) { @@ -190,17 +190,6 @@ int qRegisterMetaType(const char *typeName reinterpret_cast(cptr)); } -template -int qRegisterMetaType(const char *typeName -#ifndef qdoc - , typename QMetaTypeId2::BuiltinType * /* dummy */ = 0 -#endif -) -{ - return QMetaType::registerTypedef(typeName, QMetaTypeId2::MetaType); -} - - #ifndef QT_NO_DATASTREAM template void qRegisterMetaTypeStreamOperators(const char *typeName @@ -229,7 +218,6 @@ struct QMetaTypeId template struct QMetaTypeId2 { - typedef T CustomType; enum { Defined = QMetaTypeId::Defined }; static inline int qt_metatype_id() { return QMetaTypeId::qt_metatype_id(); } }; @@ -297,7 +285,6 @@ inline int qRegisterMetaTypeStreamOperators() QT_BEGIN_NAMESPACE \ template<> struct QMetaTypeId2 \ { \ - typedef TYPE BuiltinType; \ enum { Defined = 1, MetaType = QMetaType::NAME }; \ static inline int qt_metatype_id() { return QMetaType::NAME; } \ }; \ -- cgit v0.12 From f3c016b8d69612e1e7e5c59ad66b639059c6e246 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Wed, 3 Mar 2010 17:54:23 +0100 Subject: Disable auto-uppercasing and predictive text for password line edits. Reviewed-by: axis --- src/gui/widgets/qlineedit.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 7ccced6..94ee4b3 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -544,6 +544,11 @@ void QLineEdit::setEchoMode(EchoMode mode) } else { imHints &= ~Qt::ImhHiddenText; } + if (mode != Normal) { + imHints |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText); + } else { + imHints &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText); + } setInputMethodHints(imHints); d->control->setEchoMode(mode); update(); -- cgit v0.12 From 8f031e9c1dc4dd3b8caea646c9ea108b04f36b3c Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Thu, 4 Mar 2010 10:20:21 +1000 Subject: remove non wifi interfaces from being handled. handled by generic engine. also fix release crash --- src/plugins/bearer/corewlan/qcorewlanengine.mm | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm index a758a4b..2d33d36 100644 --- a/src/plugins/bearer/corewlan/qcorewlanengine.mm +++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm @@ -201,7 +201,6 @@ void QCoreWlanEngine::connectToId(const QString &id) return; } } - [apNetwork release]; } } } @@ -292,7 +291,7 @@ void QCoreWlanEngine::doRequestUpdate() if (!interface.addressEntries().isEmpty()) state = QNetworkConfiguration::Active; - if (accessPointConfigurations.contains(id)) { + if (accessPointConfigurations.contains(id)) { //handle only scanned AP's QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id); bool changed = false; @@ -319,20 +318,6 @@ void QCoreWlanEngine::doRequestUpdate() if (changed) emit configurationChanged(ptr); - } else { - QNetworkConfigurationPrivatePointer ptr(new QNetworkConfigurationPrivate); - - ptr->name = name; - ptr->isValid = true; - ptr->id = id; - ptr->state = state; - ptr->type = QNetworkConfiguration::InternetAccessPoint; - ptr->bearer = qGetInterfaceType(interface.name()); - - accessPointConfigurations.insert(id, ptr); - configurationInterface.insert(id, interface.name()); - - emit configurationAdded(ptr); } } @@ -496,12 +481,6 @@ bool QCoreWlanEngine::getAllScInterfaces() CFStringRef type = SCNetworkInterfaceGetInterfaceType((SCNetworkInterfaceRef)thisInterface); if ( CFEqual(type, kSCNetworkInterfaceTypeIEEE80211)) { typeStr = "WLAN"; -// } else if (CFEqual(type, kSCNetworkInterfaceTypeBluetooth)) { -// typeStr = "Bluetooth"; - } else if(CFEqual(type, kSCNetworkInterfaceTypeEthernet)) { - typeStr = "Ethernet"; - } else if(CFEqual(type, kSCNetworkInterfaceTypeFireWire)) { - typeStr = "Ethernet"; //ok a bit fudged } if(!networkInterfaces.contains(interfaceName) && !typeStr.isEmpty()) { networkInterfaces.insert(interfaceName,typeStr); -- cgit v0.12 From 984625e5788900c96507b773193f519295d0be80 Mon Sep 17 00:00:00 2001 From: Justin McPherson Date: Thu, 4 Mar 2010 12:00:06 +1000 Subject: Namespace fixes. Reviewed-by: Rohan McGovern --- src/corelib/tools/qsimd_p.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index 724f3e0..21f308d 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -47,9 +47,6 @@ QT_BEGIN_HEADER -QT_BEGIN_NAMESPACE - -QT_MODULE(Core) #if defined(QT_NO_MAC_XARCH) || (defined(Q_OS_DARWIN) && (defined(__ppc__) || defined(__ppc64__))) // Disable MMX and SSE on Mac/PPC builds, or if the compiler @@ -103,6 +100,10 @@ QT_MODULE(Core) #include #endif +QT_BEGIN_NAMESPACE + +QT_MODULE(Core) + enum CPUFeatures { None = 0, MMX = 0x1, -- cgit v0.12 From 6ed01163b4de5e51f760b3627a6271796cbed212 Mon Sep 17 00:00:00 2001 From: Justin McPherson Date: Thu, 4 Mar 2010 12:00:47 +1000 Subject: Cocoa namespace fixes. Reviewed-by: Rohan McGovern --- src/gui/kernel/qt_cocoa_helpers_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 9560952..c776b2a 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -373,7 +373,7 @@ QMacTabletHash *qt_mac_tablet_hash() // Clears the QWidget pointer that each QCocoaView holds. void qt_mac_clearCocoaViewQWidgetPointers(QWidget *widget) { - QCocoaView *cocoaView = reinterpret_cast(qt_mac_nativeview_for(widget)); + QT_MANGLE_NAMESPACE(QCocoaView) *cocoaView = reinterpret_cast(qt_mac_nativeview_for(widget)); if (cocoaView && [cocoaView respondsToSelector:@selector(qt_qwidget)]) { [cocoaView qt_clearQWidget]; } -- cgit v0.12 From 1cc9c745f09c3399aeccc0f9b8ca07bbbfaf143b Mon Sep 17 00:00:00 2001 From: Justin McPherson Date: Thu, 4 Mar 2010 12:01:06 +1000 Subject: Fix namespace qml decleration. Reviewed-by: Andrew den Exter --- src/plugins/qdeclarativemodules/multimedia/multimedia.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/qdeclarativemodules/multimedia/multimedia.cpp b/src/plugins/qdeclarativemodules/multimedia/multimedia.cpp index e03d8f3..a2e74f4 100644 --- a/src/plugins/qdeclarativemodules/multimedia/multimedia.cpp +++ b/src/plugins/qdeclarativemodules/multimedia/multimedia.cpp @@ -47,11 +47,10 @@ #include "qdeclarativeaudio_p.h" +QML_DECLARE_TYPE(QSoundEffect) QT_BEGIN_NAMESPACE -QML_DECLARE_TYPE(QSoundEffect) - class QMultimediaDeclarativeModule : public QDeclarativeExtensionPlugin { Q_OBJECT -- cgit v0.12 From c24280aef0962c4a45f9fa6c927b2df3a5f34245 Mon Sep 17 00:00:00 2001 From: Dmytro Poplavskiy Date: Thu, 4 Mar 2010 14:57:43 +1000 Subject: Added QMediaPlayer::StreamPlayback flag to query/select backend capable of playing from QIODevice based stream. --- src/multimedia/base/qmediaserviceprovider.cpp | 43 ++++++++++--- src/multimedia/base/qmediaserviceprovider.h | 3 +- src/multimedia/playback/qmediaplayer.cpp | 18 +++++- src/multimedia/playback/qmediaplayer.h | 3 +- .../tst_qmediaserviceprovider.cpp | 72 ++++++++++++++++++++++ 5 files changed, 125 insertions(+), 14 deletions(-) diff --git a/src/multimedia/base/qmediaserviceprovider.cpp b/src/multimedia/base/qmediaserviceprovider.cpp index d51d682..6e11079 100644 --- a/src/multimedia/base/qmediaserviceprovider.cpp +++ b/src/multimedia/base/qmediaserviceprovider.cpp @@ -102,6 +102,9 @@ public: \value RecordingSupport The service provides audio or video recording functions. + + \value StreamPlayback + The service is capable of playing QIODevice based streams. */ /*! @@ -396,14 +399,25 @@ public: QMediaServiceSupportedFormatsInterface *iface = qobject_cast(obj); - //if low latency playback was asked, skip services known - //not to provide low latency playback - if (flags & QMediaPlayer::LowLatency) { + + if (flags) { QMediaServiceFeaturesInterface *iface = qobject_cast(obj); - if (iface && !(iface->supportedFeatures(serviceType) & QMediaServiceProviderHint::LowLatencyPlayback)) - continue; + if (iface) { + QMediaServiceProviderHint::Features features = iface->supportedFeatures(serviceType); + + //if low latency playback was asked, skip services known + //not to provide low latency playback + if ((flags & QMediaPlayer::LowLatency) && + !(features & QMediaServiceProviderHint::LowLatencyPlayback)) + continue; + + //the same for QIODevice based streams support + if ((flags & QMediaPlayer::StreamPlayback) && + !(features & QMediaServiceProviderHint::StreamPlayback)) + continue; + } } if (iface) @@ -434,14 +448,25 @@ public: QMediaServiceSupportedFormatsInterface *iface = qobject_cast(obj); - // If low latency playback was asked for, skip MIME types from services known - // not to provide low latency playback + if (flags & QMediaPlayer::LowLatency) { QMediaServiceFeaturesInterface *iface = qobject_cast(obj); - if (iface && !(iface->supportedFeatures(serviceType) & QMediaServiceProviderHint::LowLatencyPlayback)) - continue; + if (iface) { + QMediaServiceProviderHint::Features features = iface->supportedFeatures(serviceType); + + // If low latency playback was asked for, skip MIME types from services known + // not to provide low latency playback + if ((flags & QMediaPlayer::LowLatency) && + !(features & QMediaServiceProviderHint::LowLatencyPlayback)) + continue; + + //the same for QIODevice based streams support + if ((flags & QMediaPlayer::StreamPlayback) && + !(features & QMediaServiceProviderHint::StreamPlayback)) + continue; + } } if (iface) { diff --git a/src/multimedia/base/qmediaserviceprovider.h b/src/multimedia/base/qmediaserviceprovider.h index 2ee0ae4..6e31493 100644 --- a/src/multimedia/base/qmediaserviceprovider.h +++ b/src/multimedia/base/qmediaserviceprovider.h @@ -64,7 +64,8 @@ public: enum Feature { LowLatencyPlayback = 0x01, - RecordingSupport = 0x02 + RecordingSupport = 0x02, + StreamPlayback = 0x04 }; Q_DECLARE_FLAGS(Features, Feature) diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index 27bff02..8056878 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -243,10 +243,17 @@ void QMediaPlayerPrivate::_q_playlistDestroyed() static QMediaService *playerService(QMediaPlayer::Flags flags, QMediaServiceProvider *provider) { - if (flags && QMediaPlayer::LowLatency) + if (flags) { + QMediaServiceProviderHint::Features features = 0; + if (flags & QMediaPlayer::LowLatency) + features |= QMediaServiceProviderHint::LowLatencyPlayback; + + if (flags & QMediaPlayer::StreamPlayback) + features |= QMediaServiceProviderHint::StreamPlayback; + return provider->requestService(Q_MEDIASERVICE_MEDIAPLAYER, - QMediaServiceProviderHint(QMediaServiceProviderHint::LowLatencyPlayback)); - else + QMediaServiceProviderHint(features)); + } else return provider->requestService(Q_MEDIASERVICE_MEDIAPLAYER); } @@ -945,6 +952,11 @@ QStringList QMediaPlayer::supportedMimeTypes(Flags flags) The player is expected to be used with simple audio formats, but playback should start without significant delay. Such playback service can be used for beeps, ringtones, etc. + + \value StreamPlayback + The player is expected to play QIODevice based streams. + If passed to QMediaPlayer constructor, the service supporting + streams playback will be choosen. */ QT_END_NAMESPACE diff --git a/src/multimedia/playback/qmediaplayer.h b/src/multimedia/playback/qmediaplayer.h index 1b761ce..129b244 100644 --- a/src/multimedia/playback/qmediaplayer.h +++ b/src/multimedia/playback/qmediaplayer.h @@ -99,7 +99,8 @@ public: enum Flag { - LowLatency = 0x01 + LowLatency = 0x01, + StreamPlayback = 0x02 }; Q_DECLARE_FLAGS(Flags, Flag) diff --git a/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp b/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp index 9bca189..d839fe5 100644 --- a/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp +++ b/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp @@ -213,6 +213,57 @@ public: } }; +class MockServicePlugin4 : public QMediaServiceProviderPlugin, + public QMediaServiceSupportedFormatsInterface, + public QMediaServiceFeaturesInterface +{ + Q_OBJECT + Q_INTERFACES(QMediaServiceSupportedFormatsInterface) + Q_INTERFACES(QMediaServiceFeaturesInterface) +public: + QStringList keys() const + { + return QStringList() << QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER); + } + + QMediaService* create(QString const& key) + { + if (keys().contains(key)) + return new MockMediaService("MockServicePlugin4"); + else + return 0; + } + + void release(QMediaService *service) + { + delete service; + } + + QtMultimedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const + { + if (codecs.contains(QLatin1String("jpeg2000"))) + return QtMultimedia::NotSupported; + + if (supportedMimeTypes().contains(mimeType)) + return QtMultimedia::ProbablySupported; + + return QtMultimedia::MaybeSupported; + } + + QStringList supportedMimeTypes() const + { + return QStringList() << "video/mp4" << "video/quicktime"; + } + + QMediaServiceProviderHint::Features supportedFeatures(const QByteArray &service) const + { + if (service == QByteArray(Q_MEDIASERVICE_MEDIAPLAYER)) + return QMediaServiceProviderHint::StreamPlayback; + else + return 0; + } +}; + class MockMediaServiceProvider : public QMediaServiceProvider @@ -253,6 +304,7 @@ void tst_QMediaServiceProvider::initTestCase() plugins << new MockServicePlugin1; plugins << new MockServicePlugin2; plugins << new MockServicePlugin3; + plugins << new MockServicePlugin4; QMediaPluginLoader::setStaticPlugins(QLatin1String("/mediaservices"), plugins); } @@ -312,12 +364,32 @@ void tst_QMediaServiceProvider::testHasSupport() QCOMPARE(QMediaPlayer::hasSupport("audio/ogg"), QtMultimedia::ProbablySupported); QCOMPARE(QMediaPlayer::hasSupport("audio/wav"), QtMultimedia::ProbablySupported); + //test low latency flag support + QCOMPARE(QMediaPlayer::hasSupport("audio/wav", QStringList(), QMediaPlayer::LowLatency), + QtMultimedia::ProbablySupported); + //plugin1 probably supports audio/ogg, it checked because it doesn't provide features iface + QCOMPARE(QMediaPlayer::hasSupport("audio/ogg", QStringList(), QMediaPlayer::LowLatency), + QtMultimedia::ProbablySupported); + //Plugin4 is not checked here, sine it's known not support low latency + QCOMPARE(QMediaPlayer::hasSupport("video/quicktime", QStringList(), QMediaPlayer::LowLatency), + QtMultimedia::MaybeSupported); + + //test streaming flag support + QCOMPARE(QMediaPlayer::hasSupport("video/quicktime", QStringList(), QMediaPlayer::StreamPlayback), + QtMultimedia::ProbablySupported); + //Plugin2 is not checked here, sine it's known not support streaming + QCOMPARE(QMediaPlayer::hasSupport("audio/wav", QStringList(), QMediaPlayer::StreamPlayback), + QtMultimedia::MaybeSupported); + //ensure the correct media player plugin is choosen for mime type QMediaPlayer simplePlayer(0, QMediaPlayer::LowLatency); QCOMPARE(simplePlayer.service()->objectName(), QLatin1String("MockServicePlugin2")); QMediaPlayer mediaPlayer; QVERIFY(mediaPlayer.service()->objectName() != QLatin1String("MockServicePlugin2")); + + QMediaPlayer streamPlayer(0, QMediaPlayer::StreamPlayback); + QCOMPARE(streamPlayer.service()->objectName(), QLatin1String("MockServicePlugin4")); } void tst_QMediaServiceProvider::testSupportedMimeTypes() -- cgit v0.12 From 787da2f188c34fd932662ee0229908bec8c4c91a Mon Sep 17 00:00:00 2001 From: Dmytro Poplavskiy Date: Thu, 4 Mar 2010 17:21:33 +1000 Subject: Added playlist playback modes combo box to player demo Reviewed-by: Justin McPherson --- demos/multimedia/player/player.cpp | 28 +++++++++++++++++++++++++++- demos/multimedia/player/player.h | 3 +++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/demos/multimedia/player/player.cpp b/demos/multimedia/player/player.cpp index 49d18cb..af30a97 100644 --- a/demos/multimedia/player/player.cpp +++ b/demos/multimedia/player/player.cpp @@ -81,6 +81,22 @@ Player::Player(QWidget *parent) connect(playlistView, SIGNAL(activated(QModelIndex)), this, SLOT(jump(QModelIndex))); + playbackModeBox = new QComboBox; + playbackModeBox->addItem(tr("Linear"), + QVariant::fromValue(QMediaPlaylist::Linear)); + playbackModeBox->addItem(tr("Loop"), + QVariant::fromValue(QMediaPlaylist::Loop)); + playbackModeBox->addItem(tr("Random"), + QVariant::fromValue(QMediaPlaylist::Random)); + playbackModeBox->addItem(tr("Current Item Once"), + QVariant::fromValue(QMediaPlaylist::CurrentItemOnce)); + playbackModeBox->addItem(tr("Current Item In Loop"), + QVariant::fromValue(QMediaPlaylist::CurrentItemInLoop)); + playbackModeBox->setCurrentIndex(0); + + connect(playbackModeBox, SIGNAL(activated(int)), SLOT(updatePlaybackMode())); + updatePlaybackMode(); + slider = new QSlider(Qt::Horizontal); slider->setRange(0, player->duration() / 1000); @@ -126,12 +142,16 @@ Player::Player(QWidget *parent) else colorButton->setEnabled(false); + QBoxLayout *playlistLayout = new QVBoxLayout; + playlistLayout->addWidget(playlistView); + playlistLayout->addWidget(playbackModeBox); + QBoxLayout *displayLayout = new QHBoxLayout; if (videoWidget) displayLayout->addWidget(videoWidget, 2); else displayLayout->addWidget(coverLabel, 2); - displayLayout->addWidget(playlistView); + displayLayout->addLayout(playlistLayout); QBoxLayout *controlLayout = new QHBoxLayout; controlLayout->setMargin(0); @@ -333,3 +353,9 @@ void Player::showColorDialog() } colorDialog->show(); } + +void Player::updatePlaybackMode() +{ + playlist->setPlaybackMode( + playbackModeBox->itemData(playbackModeBox->currentIndex()).value()); +} diff --git a/demos/multimedia/player/player.h b/demos/multimedia/player/player.h index 1de8b1a..cda3eb9 100644 --- a/demos/multimedia/player/player.h +++ b/demos/multimedia/player/player.h @@ -57,6 +57,7 @@ class QAbstractItemView; class QLabel; class QModelIndex; class QSlider; +class QComboBox; class QMediaPlayer; class QVideoWidget; class PlaylistModel; @@ -87,6 +88,7 @@ private slots: void bufferingProgress(int progress); void showColorDialog(); + void updatePlaybackMode(); private: void setTrackInfo(const QString &info); @@ -97,6 +99,7 @@ private: QVideoWidget *videoWidget; QLabel *coverLabel; QSlider *slider; + QComboBox *playbackModeBox; PlaylistModel *playlistModel; QAbstractItemView *playlistView; QDialog *colorDialog; -- cgit v0.12 From 53af250a5366b4259bfb97a6b3c29c31e0aa10e0 Mon Sep 17 00:00:00 2001 From: Dmytro Poplavskiy Date: Thu, 4 Mar 2010 17:23:22 +1000 Subject: Debug media player status and media state changes. Disabled by default. Reviewed-by: Justin McPherson --- src/multimedia/playback/qmediaplayer.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index 8056878..9466cad 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include @@ -55,6 +56,7 @@ #include #include +//#define DEBUG_PLAYER_STATE QT_BEGIN_HEADER @@ -152,10 +154,16 @@ public: void _q_playlistDestroyed(); }; +#define ENUM_NAME(c,e,v) (c::staticMetaObject.enumerator(c::staticMetaObject.indexOfEnumerator(e)).valueToKey((v))) + void QMediaPlayerPrivate::_q_stateChanged(QMediaPlayer::State ps) { Q_Q(QMediaPlayer); +#ifdef DEBUG_PLAYER_STATE + qDebug() << "State changed:" << ENUM_NAME(QMediaPlayer, "State", ps) << (filterStates ? "(filtered)" : ""); +#endif + if (filterStates) return; @@ -183,6 +191,10 @@ void QMediaPlayerPrivate::_q_mediaStatusChanged(QMediaPlayer::MediaStatus status { Q_Q(QMediaPlayer); +#ifdef DEBUG_PLAYER_STATE + qDebug() << "MediaStatus changed:" << ENUM_NAME(QMediaPlayer, "MediaStatus", status); +#endif + switch (status) { case QMediaPlayer::StalledMedia: case QMediaPlayer::BufferingMedia: @@ -230,8 +242,12 @@ void QMediaPlayerPrivate::_q_updateMedia(const QMediaContent &media) state = control->state(); - if (state != currentState) + if (state != currentState) { +#ifdef DEBUG_PLAYER_STATE + qDebug() << "State changed:" << ENUM_NAME(QMediaPlayer, "State", state); +#endif emit q_func()->stateChanged(state); + } } void QMediaPlayerPrivate::_q_playlistDestroyed() -- cgit v0.12 From 5a3b9d3daf64ea686427478391d3773c5a1e024e Mon Sep 17 00:00:00 2001 From: Justin McPherson Date: Thu, 4 Mar 2010 17:26:19 +1000 Subject: WaveDecoder; be more permissive in handling of wave file formats. Reviewed-by: Dmytro Poplavskiy --- src/multimedia/effects/wavedecoder_p.cpp | 21 ++++++++++++++++----- src/multimedia/effects/wavedecoder_p.h | 1 - 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/multimedia/effects/wavedecoder_p.cpp b/src/multimedia/effects/wavedecoder_p.cpp index f2277ae..b534ded 100644 --- a/src/multimedia/effects/wavedecoder_p.cpp +++ b/src/multimedia/effects/wavedecoder_p.cpp @@ -55,7 +55,7 @@ WaveDecoder::WaveDecoder(QIODevice *s, QObject *parent): { open(QIODevice::ReadOnly | QIODevice::Unbuffered); - if (source->bytesAvailable() >= sizeof(CombinedHeader)) + if (source->bytesAvailable() >= qint64(sizeof(CombinedHeader) + sizeof(DATAHeader) + sizeof(quint16))) QTimer::singleShot(0, this, SLOT(handleData())); else connect(source, SIGNAL(readyRead()), SLOT(handleData())); @@ -105,7 +105,7 @@ qint64 WaveDecoder::writeData(const char *data, qint64 len) void WaveDecoder::handleData() { - if (source->bytesAvailable() < sizeof(CombinedHeader)) + if (source->bytesAvailable() < qint64(sizeof(CombinedHeader) + sizeof(DATAHeader) + sizeof(quint16))) return; source->disconnect(SIGNAL(readyRead()), this, SLOT(handleData())); @@ -114,12 +114,23 @@ void WaveDecoder::handleData() if (qstrncmp(header.riff.descriptor.id, "RIFF", 4) != 0 || qstrncmp(header.riff.type, "WAVE", 4) != 0 || qstrncmp(header.wave.descriptor.id, "fmt ", 4) != 0 || - (header.wave.audioFormat != 0 && header.wave.audioFormat != 1) || - qstrncmp(header.data.descriptor.id, "data", 4) != 0) { + (header.wave.audioFormat != 0 && header.wave.audioFormat != 1)) { emit invalidFormat(); } else { + DATAHeader dataHeader; + + if (qFromLittleEndian(header.wave.descriptor.size) > sizeof(WAVEHeader)) { + // Extended data available + quint16 extraFormatBytes; + source->peek((char*)&extraFormatBytes, sizeof(quint16)); + extraFormatBytes = qFromLittleEndian(extraFormatBytes); + source->read(sizeof(quint16) + extraFormatBytes); // dump it all + } + + source->read((char*)&dataHeader, sizeof(DATAHeader)); + int bps = qFromLittleEndian(header.wave.bitsPerSample); format.setCodec(QLatin1String("audio/pcm")); @@ -129,7 +140,7 @@ void WaveDecoder::handleData() format.setSampleSize(bps); format.setChannels(qFromLittleEndian(header.wave.numChannels)); - dataSize = qFromLittleEndian(header.data.descriptor.size); + dataSize = qFromLittleEndian(dataHeader.descriptor.size); haveFormat = true; connect(source, SIGNAL(readyRead()), SIGNAL(readyRead())); diff --git a/src/multimedia/effects/wavedecoder_p.h b/src/multimedia/effects/wavedecoder_p.h index 00aa14e..fa1f77e 100644 --- a/src/multimedia/effects/wavedecoder_p.h +++ b/src/multimedia/effects/wavedecoder_p.h @@ -116,7 +116,6 @@ private: { RIFFHeader riff; WAVEHeader wave; - DATAHeader data; }; bool haveFormat; -- cgit v0.12 From 8d6b5483e34d27f1ee45af9d9fadb87525c9f915 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 4 Mar 2010 09:23:53 +0100 Subject: Make QLabel::text a reloadable property In this way we can correctly load / reload a label in case it contains a rich text with a reference to the image taken from resources. Since QLabel::setText() ignores the call in case we try to set the same text, we force the reload by setting the empty string in between. For performance reasons we do it only in cases when the text value contains :/ (only in this case it might have a reference to the resources). Reviewed-by: Friedemann Kleint Task-number: QTBUG-8347 --- tools/designer/src/lib/shared/formwindowbase.cpp | 12 +++++++++++- tools/designer/src/lib/shared/qdesigner_propertysheet.cpp | 2 ++ tools/designer/src/lib/shared/qdesigner_propertysheet_p.h | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/designer/src/lib/shared/formwindowbase.cpp b/tools/designer/src/lib/shared/formwindowbase.cpp index 2c5efbf..b57e9d7 100644 --- a/tools/designer/src/lib/shared/formwindowbase.cpp +++ b/tools/designer/src/lib/shared/formwindowbase.cpp @@ -181,7 +181,17 @@ void FormWindowBase::reloadProperties() QMapIterator itIndex(itSheet.value()); while (itIndex.hasNext()) { const int index = itIndex.next().key(); - sheet->setProperty(index, sheet->property(index)); + const QVariant newValue = sheet->property(index); + if (qobject_cast(sheet->object()) && sheet->propertyName(index) == QLatin1String("text")) { + const PropertySheetStringValue newString = qVariantValue(newValue); + // optimize a bit, reset only if the text value might contain a reference to qt resources + // (however reloading of icons other than taken from resources might not work here) + if (newString.value().contains(QLatin1String(":/"))) { + const QVariant resetValue = qVariantFromValue(PropertySheetStringValue()); + sheet->setProperty(index, resetValue); + } + } + sheet->setProperty(index, newValue); } if (QTabWidget *tabWidget = qobject_cast(sheet->object())) { const int count = tabWidget->count(); diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp index 13bb1d7..77ab2a6 100644 --- a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp +++ b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp @@ -271,6 +271,7 @@ bool QDesignerPropertySheetPrivate::isReloadableProperty(int index) const { return isResourceProperty(index) || propertyType(index) == QDesignerPropertySheet::PropertyStyleSheet + || propertyType(index) == QDesignerPropertySheet::PropertyText || q->property(index).type() == QVariant::Url; } @@ -549,6 +550,7 @@ QDesignerPropertySheet::PropertyType QDesignerPropertySheet::propertyTypeFromNam propertyTypeHash.insert(QLatin1String("windowModality"), PropertyWindowModality); propertyTypeHash.insert(QLatin1String("windowModified"), PropertyWindowModified); propertyTypeHash.insert(QLatin1String("styleSheet"), PropertyStyleSheet); + propertyTypeHash.insert(QLatin1String("text"), PropertyText); } return propertyTypeHash.value(name, PropertyNone); } diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h b/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h index 9db7367..0105eac 100644 --- a/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h +++ b/tools/designer/src/lib/shared/qdesigner_propertysheet_p.h @@ -176,7 +176,8 @@ public: PropertyWindowIconText, PropertyWindowModality, PropertyWindowModified, - PropertyStyleSheet + PropertyStyleSheet, + PropertyText }; enum ObjectType { ObjectNone, ObjectLabel, ObjectLayout, ObjectLayoutWidget, ObjectQ3GroupBox }; -- cgit v0.12 From a63dc3b837fbabafcd8ccdc6c30e304f69b278da Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 4 Mar 2010 09:59:24 +0100 Subject: Avoid QString reallocation for smallcaps fonts in Itemizer::generate() Reviewed-by: Simon Hausmann --- src/gui/text/qtextengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 2291138..b826588 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -81,7 +81,7 @@ public: void generate(int start, int length, QFont::Capitalization caps) { if ((int)caps == (int)QFont::SmallCaps) - generateScriptItemsSmallCaps(m_string.utf16(), start, length); + generateScriptItemsSmallCaps(reinterpret_cast(m_string.unicode()), start, length); else if(caps == QFont::Capitalize) generateScriptItemsCapitalize(start, length); else if(caps != QFont::MixedCase) { -- cgit v0.12 From 7d7a85fa16b28fdba257bb466be5a6d2b4bf5d2f Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Thu, 4 Mar 2010 10:01:56 +0100 Subject: Enable two fast path for blend_tiled_rgb565 Blending ARGB8565 and RGB16 on top of RGB16 is common on system with 16 bits color depth. The faster blending functions can be used instead of blend_tiled_generic. Reviewed-by: Tom Cooksey --- src/gui/painting/qdrawhelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 891f4c2..8d2da69 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -5072,7 +5072,7 @@ static void blend_tiled_argb8565(int count, const QSpan *spans, void *userData) static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData) { -#if defined(QT_QWS_DEPTH_16) +#if !defined(Q_WS_QWS) || defined(QT_QWS_DEPTH_16) QSpanData *data = reinterpret_cast(userData); if (data->texture.format == QImage::Format_ARGB8565_Premultiplied) -- cgit v0.12 From c7fec28e7b2f7192c6589c37f3db3e0b4ee85460 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 4 Mar 2010 10:21:06 +0100 Subject: Fixes tst_QScriptExtQObject::connectAndDisconnect Now that QVariant is known to QMetaType, it has an ID. This is much more robust as before. This would have fail if QVariant, would have been registered by the user. Reviewed-by: Kent Hansen --- src/script/bridge/qscriptqobject.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index 8d111f9..39ba935 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -2174,14 +2174,12 @@ void QObjectConnectionManager::execute(int slotIndex, void **argv) QByteArray typeName = parameterTypes.at(i); int argType = QMetaType::type(parameterTypes.at(i)); if (!argType) { - if (typeName == "QVariant") { - actual = QScriptEnginePrivate::jscValueFromVariant(exec, *reinterpret_cast(arg)); - } else { - qWarning("QScriptEngine: Unable to handle unregistered datatype '%s' " - "when invoking handler of signal %s::%s", - typeName.constData(), meta->className(), method.signature()); - actual = JSC::jsUndefined(); - } + qWarning("QScriptEngine: Unable to handle unregistered datatype '%s' " + "when invoking handler of signal %s::%s", + typeName.constData(), meta->className(), method.signature()); + actual = JSC::jsUndefined(); + } else if (argType == QMetaType::QVariant) { + actual = QScriptEnginePrivate::jscValueFromVariant(exec, *reinterpret_cast(arg)); } else { actual = QScriptEnginePrivate::create(exec, argType, arg); } -- cgit v0.12 From a99fe8624a25f8a09fe9b3234306a4d8b3a3f38e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 4 Mar 2010 10:47:36 +0100 Subject: QScript: Test against QMetaType::QVariant instead of against the string now that QVariant is known to QMetaType, we can test for the metatype id instead of doing string comparison Reviewed-by: Kent Hansen --- src/script/api/qscriptengine.cpp | 11 ++++++----- src/script/bridge/qscriptqobject.cpp | 37 ++++++++++++++---------------------- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 9cd5c63..47c5262 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -2901,6 +2901,9 @@ JSC::JSValue QScriptEnginePrivate::create(JSC::ExecState *exec, int type, const result = eng->newQObject(*reinterpret_cast(ptr)); break; #endif + case QMetaType::QVariant: + result = jscValueFromVariant(exec, *reinterpret_cast(ptr)); + break; default: if (type == qMetaTypeId()) { result = eng->scriptValueToJSCValue(*reinterpret_cast(ptr)); @@ -2922,8 +2925,6 @@ JSC::JSValue QScriptEnginePrivate::create(JSC::ExecState *exec, int type, const else { QByteArray typeName = QMetaType::typeName(type); - if (typeName == "QVariant") - result = jscValueFromVariant(exec, *reinterpret_cast(ptr)); if (typeName.endsWith('*') && !*reinterpret_cast(ptr)) return JSC::jsNull(); else @@ -3046,6 +3047,9 @@ bool QScriptEnginePrivate::convertValue(JSC::ExecState *exec, JSC::JSValue value *reinterpret_cast(ptr) = variantMapFromObject(exec, value); return true; } break; + case QMetaType::QVariant: + *reinterpret_cast(ptr) = toVariant(exec, value); + return true; default: ; } @@ -3096,9 +3100,6 @@ bool QScriptEnginePrivate::convertValue(JSC::ExecState *exec, JSC::JSValue value return false; *reinterpret_cast(ptr) = eng->scriptValueFromJSCValue(value); return true; - } else if (name == "QVariant") { - *reinterpret_cast(ptr) = toVariant(exec, value); - return true; } // lazy registration of some common list types diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index 39ba935..91636da 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -523,19 +523,15 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c QByteArray returnTypeName = method.typeName(); int rtype = QMetaType::type(returnTypeName); if ((rtype == 0) && !returnTypeName.isEmpty()) { - if (returnTypeName == "QVariant") { - types.append(QScriptMetaType::variant()); - } else { - int enumIndex = indexOfMetaEnum(meta, returnTypeName); - if (enumIndex != -1) - types.append(QScriptMetaType::metaEnum(enumIndex, returnTypeName)); - else - types.append(QScriptMetaType::unresolved(returnTypeName)); - } + int enumIndex = indexOfMetaEnum(meta, returnTypeName); + if (enumIndex != -1) + types.append(QScriptMetaType::metaEnum(enumIndex, returnTypeName)); + else + types.append(QScriptMetaType::unresolved(returnTypeName)); } else { if (callType == QMetaMethod::Constructor) types.append(QScriptMetaType::metaType(QMetaType::QObjectStar, "QObject*")); - else if (returnTypeName == "QVariant") + else if (rtype == QMetaType::QVariant) types.append(QScriptMetaType::variant()); else types.append(QScriptMetaType::metaType(rtype, returnTypeName)); @@ -547,20 +543,15 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c QByteArray argTypeName = parameterTypeNames.at(i); int atype = QMetaType::type(argTypeName); if (atype == 0) { - if (argTypeName == "QVariant") { - types.append(QScriptMetaType::variant()); - } else { - int enumIndex = indexOfMetaEnum(meta, argTypeName); - if (enumIndex != -1) - types.append(QScriptMetaType::metaEnum(enumIndex, argTypeName)); - else - types.append(QScriptMetaType::unresolved(argTypeName)); - } - } else { - if (argTypeName == "QVariant") - types.append(QScriptMetaType::variant()); + int enumIndex = indexOfMetaEnum(meta, argTypeName); + if (enumIndex != -1) + types.append(QScriptMetaType::metaEnum(enumIndex, argTypeName)); else - types.append(QScriptMetaType::metaType(atype, argTypeName)); + types.append(QScriptMetaType::unresolved(argTypeName)); + } else if (atype == QMetaType::QVariant) { + types.append(QScriptMetaType::variant()); + } else { + types.append(QScriptMetaType::metaType(atype, argTypeName)); } } -- cgit v0.12 From 625f6b92a08d8ef2a1e5697fce28ca39d29917fe Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 4 Mar 2010 10:57:15 +0100 Subject: Fixes QMenu to only have static POD members This also fixes the autotests --- src/gui/widgets/qmenu.cpp | 24 ++++++++++++------------ src/gui/widgets/qmenu_p.h | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 5db14b8..9a4916e 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -85,9 +85,8 @@ QT_BEGIN_NAMESPACE -QPointer QMenuPrivate::mouseDown; -QBasicTimer QMenuPrivate::menuDelayTimer; -QBasicTimer QMenuPrivate::sloppyDelayTimer; +QMenu *QMenuPrivate::mouseDown = 0; +int QMenuPrivate::sloppyDelayTimer = 0; /* QMenu code */ // internal class used for the torn off popup @@ -487,8 +486,8 @@ void QMenuPrivate::popupAction(QAction *action, int delay, bool activateFirst) if (action && action->isEnabled()) { if (!delay) q->internalDelayedPopup(); - else if (!QMenuPrivate::menuDelayTimer.isActive() && (!action->menu() || !action->menu()->isVisible())) - QMenuPrivate::menuDelayTimer.start(delay, q); + else if (!menuDelayTimer.isActive() && (!action->menu() || !action->menu()->isVisible())) + menuDelayTimer.start(delay, q); if (activateFirst && action->menu()) action->menu()->d_func()->setFirstActionActive(); } else if (QMenu *menu = activeMenu) { //hide the current item @@ -2375,8 +2374,8 @@ QMenu::event(QEvent *e) } } break; case QEvent::ContextMenu: - if(QMenuPrivate::menuDelayTimer.isActive()) { - QMenuPrivate::menuDelayTimer.stop(); + if(d->menuDelayTimer.isActive()) { + d->menuDelayTimer.stop(); internalDelayedPopup(); } break; @@ -2809,7 +2808,7 @@ void QMenu::mouseMoveEvent(QMouseEvent *e) } if (d->sloppyRegion.contains(e->pos())) { d->sloppyAction = action; - QMenuPrivate::sloppyDelayTimer.start(style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, this)*6, this); + QMenuPrivate::sloppyDelayTimer = startTimer(style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, this)*6); } else { d->setCurrentAction(action, style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, this)); } @@ -2847,11 +2846,12 @@ QMenu::timerEvent(QTimerEvent *e) d->scrollMenu((QMenuPrivate::QMenuScroller::ScrollDirection)d->scroll->scrollDirection); if (d->scroll->scrollFlags == QMenuPrivate::QMenuScroller::ScrollNone) d->scroll->scrollTimer.stop(); - } else if(QMenuPrivate::menuDelayTimer.timerId() == e->timerId()) { - QMenuPrivate::menuDelayTimer.stop(); + } else if(d->menuDelayTimer.timerId() == e->timerId()) { + d->menuDelayTimer.stop(); internalDelayedPopup(); - } else if(QMenuPrivate::sloppyDelayTimer.timerId() == e->timerId()) { - QMenuPrivate::sloppyDelayTimer.stop(); + } else if(QMenuPrivate::sloppyDelayTimer == e->timerId()) { + killTimer(QMenuPrivate::sloppyDelayTimer); + QMenuPrivate::sloppyDelayTimer = 0; internalSetSloppyAction(); } else if(d->searchBufferTimer.timerId() == e->timerId()) { d->searchBuffer.clear(); diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h index aaed6b1..276ffe6 100644 --- a/src/gui/widgets/qmenu_p.h +++ b/src/gui/widgets/qmenu_p.h @@ -202,7 +202,7 @@ public: bool activationRecursionGuard; //selection - static QPointer mouseDown; + static QMenu *mouseDown; QPoint mousePopupPos; uint hasHadMouse : 1; uint aboutToHide : 1; @@ -212,7 +212,7 @@ public: QAction *selectAction; QAction *cancelAction; #endif - static QBasicTimer menuDelayTimer; + QBasicTimer menuDelayTimer; enum SelectionReason { SelectedFromKeyboard, SelectedFromElsewhere @@ -272,7 +272,7 @@ public: mutable bool hasCheckableItems; //sloppy selection - static QBasicTimer sloppyDelayTimer; + static int sloppyDelayTimer; mutable QAction *sloppyAction; QRegion sloppyRegion; -- cgit v0.12 From e53480370409b96d24d3f53513e8b2019a398e70 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 4 Mar 2010 11:12:44 +0100 Subject: Finish to resolve merge conflict. Move the change that were made in commit 9957e85e37345e946ecc67196d65fbca867a2001 from src/multimedia/qml/qml.pri to src/multimedia/effects/effects.pri --- src/multimedia/effects/effects.pri | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/multimedia/effects/effects.pri b/src/multimedia/effects/effects.pri index 5edd452..ff762e8 100644 --- a/src/multimedia/effects/effects.pri +++ b/src/multimedia/effects/effects.pri @@ -1,15 +1,16 @@ - -system(pkg-config --exists \'libpulse >= 0.9.10\') { - DEFINES += QT_MULTIMEDIA_PULSEAUDIO - HEADERS += $$PWD/qsoundeffect_pulse_p.h - SOURCES += $$PWD/qsoundeffect_pulse_p.cpp - LIBS += -lpulse -} else:x11 { - DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER - HEADERS += $$PWD/qsoundeffect_qmedia_p.h - SOURCES += $$PWD/qsoundeffect_qmedia_p.cpp +unix { + unix:contains(QT_CONFIG, pulseaudio) { + DEFINES += QT_MULTIMEDIA_PULSEAUDIO + HEADERS += $$PWD/qsoundeffect_pulse_p.h + SOURCES += $$PWD/qsoundeffect_pulse_p.cpp + LIBS += -lpulse + } else { + DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER + HEADERS += $$PWD/qsoundeffect_qmedia_p.h + SOURCES += $$PWD/qsoundeffect_qmedia_p.cpp + } } else { HEADERS += $$PWD/qsoundeffect_qsound_p.h SOURCES += $$PWD/qsoundeffect_qsound_p.cpp -- cgit v0.12 From 24c56ac5309150cf7ba42cd974df4e98d97ebb81 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 4 Mar 2010 11:21:37 +0100 Subject: Build fix for Sun Studio Task-number: QTBUG-8192 --- src/gui/widgets/qcombobox.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/qcombobox.h b/src/gui/widgets/qcombobox.h index 9b19a66..fb9af9f 100644 --- a/src/gui/widgets/qcombobox.h +++ b/src/gui/widgets/qcombobox.h @@ -111,10 +111,10 @@ public: bool hasFrame() const; inline int findText(const QString &text, - Qt::MatchFlags flags = Qt::MatchExactly|Qt::MatchCaseSensitive) const + Qt::MatchFlags flags = static_cast(Qt::MatchExactly|Qt::MatchCaseSensitive)) const { return findData(text, Qt::DisplayRole, flags); } int findData(const QVariant &data, int role = Qt::UserRole, - Qt::MatchFlags flags = Qt::MatchExactly|Qt::MatchCaseSensitive) const; + Qt::MatchFlags flags = static_cast(Qt::MatchExactly|Qt::MatchCaseSensitive)) const; enum InsertPolicy { NoInsert, -- cgit v0.12 From 52da988db3a03bce5513bc5e2efa3d69f3664f24 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 4 Mar 2010 11:47:36 +0100 Subject: qmake/MinGw: Link statically for Qt Creator to be able to detect it. Qt Creator detects Qt versions by running qmake. This fails if no MinGw setup is in the path as is usually the case when starting it from the menu. Make it possible to run qmake without setup. Strip executable. Reviewed-by: Thierry Bastian Reviewed-by: mariusSO --- qmake/Makefile.win32-g++ | 2 +- qmake/Makefile.win32-g++-sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ index d4d6e0e..27ae27b 100644 --- a/qmake/Makefile.win32-g++ +++ b/qmake/Makefile.win32-g++ @@ -27,7 +27,7 @@ CFLAGS = -c -o$@ -O \ -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ -DQT_BOOTSTRAPPED CXXFLAGS = $(CFLAGS) -LFLAGS = +LFLAGS = -static-libgcc -s LIBS = -lole32 -luuid LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS) ADDCLEAN = diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh index 5061089..f7b486f 100644 --- a/qmake/Makefile.win32-g++-sh +++ b/qmake/Makefile.win32-g++-sh @@ -27,7 +27,7 @@ CFLAGS = -c -o$@ -O \ -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ -DQT_BOOTSTRAPPED CXXFLAGS = $(CFLAGS) -LFLAGS = +LFLAGS = -static-libgcc -s LIBS = -lole32 -luuid LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS) ADDCLEAN = -- cgit v0.12 From 4574b342ebb8800ba50ca23f154c20b3e8a239af Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 4 Mar 2010 11:55:01 +0100 Subject: Fix compile Missing header added --- tools/designer/src/lib/shared/formwindowbase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/designer/src/lib/shared/formwindowbase.cpp b/tools/designer/src/lib/shared/formwindowbase.cpp index b57e9d7..5292f5f 100644 --- a/tools/designer/src/lib/shared/formwindowbase.cpp +++ b/tools/designer/src/lib/shared/formwindowbase.cpp @@ -72,6 +72,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE -- cgit v0.12 From 8c8e9ffb60c244462f615f510bc71d4010cf8faf Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Thu, 4 Mar 2010 11:47:45 +0100 Subject: Remove the OBJECTS_DIR variable assignment from some projets in Qt. This prevent debug and release object file to be mixed up when linking these application in a debug_and_release configured Qt. Reviewed-by: Marius Storm-Olsen --- demos/qtdemo/qtdemo.pro | 2 -- examples/threads/waitconditions/waitconditions.pro | 2 -- src/tools/moc/util/generate_keywords.pro | 1 - .../auto/qapplication/desktopsettingsaware/desktopsettingsaware.pro | 5 ----- tools/qev/qev.pro | 2 -- 5 files changed, 12 deletions(-) diff --git a/demos/qtdemo/qtdemo.pro b/demos/qtdemo/qtdemo.pro index 011ea0c..2a776ac 100644 --- a/demos/qtdemo/qtdemo.pro +++ b/demos/qtdemo/qtdemo.pro @@ -3,8 +3,6 @@ TARGET = qtdemo DEMO_DESTDIR = $$QT_BUILD_TREE isEmpty(DEMO_DESTDIR):DEMO_DESTDIR=../.. DESTDIR = $$DEMO_DESTDIR/bin -OBJECTS_DIR = .obj -MOC_DIR = .moc INSTALLS += target sources diff --git a/examples/threads/waitconditions/waitconditions.pro b/examples/threads/waitconditions/waitconditions.pro index b07b413..c2be6cd 100644 --- a/examples/threads/waitconditions/waitconditions.pro +++ b/examples/threads/waitconditions/waitconditions.pro @@ -10,8 +10,6 @@ INCLUDEPATH += . # Input SOURCES += waitconditions.cpp CONFIG += qt warn_on create_prl link_prl console -OBJECTS_DIR=obj/debug-shared -MOC_DIR=moc/debug-shared # install target.path = $$[QT_INSTALL_EXAMPLES]/threads/waitconditions diff --git a/src/tools/moc/util/generate_keywords.pro b/src/tools/moc/util/generate_keywords.pro index 8dff744..eb04409 100644 --- a/src/tools/moc/util/generate_keywords.pro +++ b/src/tools/moc/util/generate_keywords.pro @@ -10,4 +10,3 @@ INCLUDEPATH += . # Input SOURCES += generate_keywords.cpp CONFIG += qt create_prl link_prl -OBJECTS_DIR=.obj/debug-shared diff --git a/tests/auto/qapplication/desktopsettingsaware/desktopsettingsaware.pro b/tests/auto/qapplication/desktopsettingsaware/desktopsettingsaware.pro index 93a03db..e8b1ce9 100644 --- a/tests/auto/qapplication/desktopsettingsaware/desktopsettingsaware.pro +++ b/tests/auto/qapplication/desktopsettingsaware/desktopsettingsaware.pro @@ -13,8 +13,3 @@ wince*|symbian*:TARGET = ../desktopsettingsaware SOURCES += main.cpp CONFIG += qt warn_on create_prl link_prl CONFIG -= app_bundle - -!symbian*: { -OBJECTS_DIR=.obj/debug-shared -MOC_DIR=.moc/debug-shared -} diff --git a/tools/qev/qev.pro b/tools/qev/qev.pro index 28383c6..962b9fa 100644 --- a/tools/qev/qev.pro +++ b/tools/qev/qev.pro @@ -9,5 +9,3 @@ INCLUDEPATH += . # Input SOURCES += qev.cpp CONFIG += qt warn_on create_prl link_prl -OBJECTS_DIR=.obj/debug-shared -MOC_DIR=.moc/debug-shared -- cgit v0.12 From edb37d5ab12c061b6085d0a84fcf075faf2dba54 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Tue, 2 Mar 2010 14:12:32 +0100 Subject: Added a documentation for the new enum value in gesture api. Task-number: QTBUG-7400 Reviewed-by: David Boddie --- src/corelib/global/qnamespace.qdoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index db910ce..c5b5998 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2978,6 +2978,11 @@ the Qt::GestureStarted state and ending with a gesture in the Qt::GestureFinished or Qt::GestureCanceled states. + \value IgnoredGesturesPropagateToParent Since Qt 4.7, this flag allows you + to fine-tune gesture event propagation. By setting the flag when + \l{QGraphicsObject::grabGesture}{grabbing} a gesture all ignored partial + gestures will propagate to their parent items. + \sa QWidget::grabGesture(), QGraphicsObject::grabGesture() */ -- cgit v0.12 From 1a666089d84cb85ec8e2bda3fe0fff6f2ec2ec4a Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Tue, 2 Mar 2010 15:00:55 +0100 Subject: Allow building documentation without all of Qt added a new make target 'sub-qdoc3' which builds qdoc3 and it's dependencies only, so that when running "make docs" we don't build all of sub-tools (including declarative module), but qdoc3 only Reviewed-by: David Boddie Reviewed-by: Joao --- doc/doc.pri | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/doc.pri b/doc/doc.pri index aea5b08..3d04049 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -43,11 +43,11 @@ win32-g++:isEmpty(QMAKE_SH) { # Build rules: adp_docs.commands = ($$QDOC $$ADP_DOCS_QDOCCONF_FILE) -adp_docs.depends += sub-tools # qdoc3 +adp_docs.depends += sub-qdoc3 # qdoc3 qch_docs.commands = $$QT_DOCUMENTATION -qch_docs.depends += sub-tools +qch_docs.depends += sub-qdoc3 -docs.depends = adp_docs qch_docs +docs.depends = sub-qdoc3 adp_docs qch_docs docs_zh_CN.depends = docs docs_zh_CN.commands = $$QT_ZH_CN_DOCUMENTATION @@ -64,5 +64,8 @@ qchdocs.CONFIG += no_check_exist docimages.files = $$QT_BUILD_TREE/doc/src/images docimages.path = $$[QT_INSTALL_DOCS]/src -QMAKE_EXTRA_TARGETS += qdoc adp_docs qch_docs docs docs_zh_CN +sub-qdoc3.depends = sub-corelib sub-xml +sub-qdoc3.commands += (cd tools/qdoc3 && $(MAKE)) + +QMAKE_EXTRA_TARGETS += sub-qdoc3 adp_docs qch_docs docs docs_zh_CN INSTALLS += htmldocs qchdocs docimages -- cgit v0.12 From a0cb1ae902dce0c00dc2de8b92229d66945054c8 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Thu, 4 Mar 2010 14:26:24 +0100 Subject: Setting ImhHiddenText for NoEcho line edits is not 100% correct, but still way better than fully visible text. Reviewed-by: axis --- src/gui/widgets/qlineedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 94ee4b3..817547c 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -539,7 +539,7 @@ void QLineEdit::setEchoMode(EchoMode mode) if (mode == (EchoMode)d->control->echoMode()) return; Qt::InputMethodHints imHints = inputMethodHints(); - if (mode == Password) { + if (mode == Password || mode == NoEcho) { imHints |= Qt::ImhHiddenText; } else { imHints &= ~Qt::ImhHiddenText; -- cgit v0.12 From 4b3953678983b3da925066f464b55340fab3503c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 4 Mar 2010 15:12:49 +0100 Subject: doc: Fixed some qdoc errors. The QtMultimedia module needed to have its own \page unique name so that the QtMultimedia \module would not conflict with the QtMultimedia \namespace. --- doc/src/modules.qdoc | 1 + tools/qdoc3/cppcodeparser.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc index 9e1d340..76a52b4 100644 --- a/doc/src/modules.qdoc +++ b/doc/src/modules.qdoc @@ -130,6 +130,7 @@ /*! \module QtMultimedia + \page qtmultimedia-module.html \title QtMultimedia Module \contentspage All Qt Modules \previouspage QtCore diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index fef3c14..6884781 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -47,6 +47,7 @@ #include #include +#include #include "codechunk.h" #include "config.h" @@ -1650,8 +1651,9 @@ bool CppCodeParser::matchNamespaceDecl(InnerNode *parent) */ QString namespaceName = previousLexeme(); NamespaceNode *namespasse = 0; - if (parent) + if (parent) { namespasse = static_cast(parent->findNode(namespaceName, Node::Namespace)); + } if (!namespasse) { namespasse = new NamespaceNode(parent, namespaceName); namespasse->setAccess(access); -- cgit v0.12 From f2ff0521dfae47f63c9334cbc78b4070aa9c9d7d Mon Sep 17 00:00:00 2001 From: kh1 Date: Thu, 4 Mar 2010 16:38:38 +0100 Subject: Set database write behavior to synchronous=OFF and increase page cache. This improves the INSERT performance dramatically, since we won't wait anymore until all data is written back to the database. Should not have any impact on the database consistency in case of an app crash, only in case the whole OS crashes, but then you might be in trouble anyway. Reviewed-by: ck --- tools/assistant/lib/qhelpcollectionhandler.cpp | 8 ++++++++ tools/assistant/lib/qhelpgenerator.cpp | 3 +++ 2 files changed, 11 insertions(+) diff --git a/tools/assistant/lib/qhelpcollectionhandler.cpp b/tools/assistant/lib/qhelpcollectionhandler.cpp index 235f737..bd8dc20 100644 --- a/tools/assistant/lib/qhelpcollectionhandler.cpp +++ b/tools/assistant/lib/qhelpcollectionhandler.cpp @@ -114,6 +114,9 @@ bool QHelpCollectionHandler::openCollectionFile() return false; } + m_query.exec(QLatin1String("PRAGMA synchronous=OFF")); + m_query.exec(QLatin1String("PRAGMA cache_size=3000")); + m_query.exec(QLatin1String("SELECT COUNT(*) FROM sqlite_master WHERE TYPE=\'table\'" "AND Name=\'NamespaceTable\'")); m_query.next(); @@ -163,6 +166,9 @@ bool QHelpCollectionHandler::copyCollectionFile(const QString &fileName) return false; } + copyQuery->exec(QLatin1String("PRAGMA synchronous=OFF")); + copyQuery->exec(QLatin1String("PRAGMA cache_size=3000")); + if (!createTables(copyQuery)) { emit error(tr("Cannot copy collection file: %1").arg(colFile)); return false; @@ -582,6 +588,8 @@ void QHelpCollectionHandler::optimizeDatabase(const QString &fileName) } QSqlQuery query(db); + db.exec(QLatin1String("PRAGMA synchronous=OFF")); + db.exec(QLatin1String("PRAGMA cache_size=3000")); db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS NameIndex ON IndexTable(Name)")); db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS FileNameIndex ON FileNameTable(Name)")); db.exec(QLatin1String("CREATE INDEX IF NOT EXISTS FileIdIndex ON FileNameTable(FileId)")); diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp index 783f016..85bdd75 100644 --- a/tools/assistant/lib/qhelpgenerator.cpp +++ b/tools/assistant/lib/qhelpgenerator.cpp @@ -191,6 +191,9 @@ bool QHelpGenerator::generate(QHelpDataInterface *helpData, return false; } + d->query->exec(QLatin1String("PRAGMA synchronous=OFF")); + d->query->exec(QLatin1String("PRAGMA cache_size=3000")); + addProgress(1.0); createTables(); insertFileNotFoundFile(); -- cgit v0.12 From 22a54680149d8fe5170f16e6aba7aff645b43da2 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowacki Date: Thu, 4 Mar 2010 15:27:06 +0200 Subject: Optimize QScriptValue autotest generator. QScriptValue autotest suite compile 24 minutes on MSVS2008 which is unacceptable. Modification tries to reduce the compilation time. Temples were changed to use static arrays of data; instead of inserting values directly, they are inserted in a loop (less code to optimize). Generated code were separated into several files (better usage of distributed compiling). Reviewed-by: Kent Hansen --- tests/auto/qscriptvalue/testgen/main.cpp | 2 +- tests/auto/qscriptvalue/testgen/testgenerator.cpp | 401 +++++++++++++--------- tests/auto/qscriptvalue/testgen/testgenerator.h | 15 +- 3 files changed, 245 insertions(+), 173 deletions(-) diff --git a/tests/auto/qscriptvalue/testgen/main.cpp b/tests/auto/qscriptvalue/testgen/main.cpp index fe35de9..0672635 100644 --- a/tests/auto/qscriptvalue/testgen/main.cpp +++ b/tests/auto/qscriptvalue/testgen/main.cpp @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) QCoreApplication a(argc, argv); if (argc != 2) { - qWarning() << "./prog outputfile"; + qWarning() << "./prog outputdir"; exit(1); } diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.cpp b/tests/auto/qscriptvalue/testgen/testgenerator.cpp index 4376c42..a291110 100644 --- a/tests/auto/qscriptvalue/testgen/testgenerator.cpp +++ b/tests/auto/qscriptvalue/testgen/testgenerator.cpp @@ -50,10 +50,17 @@ #include #include -void TestGenerator::save(const QString& data) +void TestGenerator::save(const QHash& data) { - QTextStream out(&m_ofile); - out << data; + foreach(const QString& name, data.keys()) { + QFile ofile(m_opath + "tst_qscriptvalue_generated_" + name + ".cpp"); + if (!ofile.open(QIODevice::WriteOnly | QIODevice::Text)) { + qWarning() << "Can't open output file: " << ofile.fileName(); + exit(2); + } + QTextStream out(&ofile); + out << data[name]; + } } static QString escape(QString txt) @@ -98,6 +105,55 @@ QString typeName() {return "bool";} template<> QString typeName() {return "QString";} +static QString generateLicence() +{ + return "/****************************************************************************\n" + "**\n" + "** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).\n" + "** All rights reserved.\n" + "** Contact: Nokia Corporation (qt-info@nokia.com)\n" + "**\n" + "** This file is part of the test suite of the Qt Toolkit.\n" + "**\n" + "** $QT_BEGIN_LICENSE:LGPL$\n" + "** No Commercial Usage\n" + "** This file contains pre-release code and may not be distributed.\n" + "** You may use this file in accordance with the terms and conditions\n" + "** contained in the Technology Preview License Agreement accompanying\n" + "** this package.\n" + "**\n" + "** GNU Lesser General Public License Usage\n" + "** Alternatively, this file may be used under the terms of the GNU Lesser\n" + "** General Public License version 2.1 as published by the Free Software\n" + "** Foundation and appearing in the file LICENSE.LGPL included in the\n" + "** packaging of this file. Please review the following information to\n" + "** ensure the GNU Lesser General Public License version 2.1 requirements\n" + "** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n" + "**\n" + "** In addition, as a special exception, Nokia gives you certain additional\n" + "** rights. These rights are described in the Nokia Qt LGPL Exception\n" + "** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n" + "**\n" + "** If you have questions regarding the use of this file, please contact\n" + "** Nokia at qt-info@nokia.com.\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "** $QT_END_LICENSE$\n" + "**\n" + "****************************************************************************/\n" + "\n"\ + "/****************************************************************************\n"\ + "*************** This file has been generated. DO NOT MODIFY! ****************\n" + "****************************************************************************/\n\n"\ + "#include \"tst_qscriptvalue.h\"\n\n"; +} + static QString generateIsXXXDef(const QString& name, const QList& list) { static const QString templ("void tst_QScriptValue::%1_initData()\n"\ @@ -106,11 +162,14 @@ static QString generateIsXXXDef(const QString& name, const QList& list) " initScriptValues();\n"\ "}\n"\ "\n"\ + "static QString %1_array [] = {%2};\n\n"\ "void tst_QScriptValue::%1_makeData(const char* expr)\n"\ "{\n"\ " static QSet %1;\n"\ " if (%1.isEmpty()) {\n"\ - " %1%2\n"\ + " %1.reserve(%3);\n"\ + " for (unsigned i = 0; i < %3; ++i)\n"\ + " %1.insert(%1_array[i]);\n"\ " }\n"\ " newRow(expr) << %1.contains(expr);\n"\ "}\n"\ @@ -132,16 +191,14 @@ static QString generateIsXXXDef(const QString& name, const QList& list) QString result = templ; QStringList set; - foreach(QString t, list) { - t = escape(t); - t.append('\"'); - t.prepend('\"'); - set.append(QString(" << ")); - set.append(t); - set.append("\n "); + set.reserve(3 * list.count()); + foreach(const QString& t, list) { + set.append("\n \""); + set.append(escape(t)); + set.append("\","); } - set.append(";"); - return result.arg(name, set.join(QString())); + + return result.arg(name, set.join(QString()), QString::number(list.count())); } template @@ -154,11 +211,15 @@ static QString generateToXXXDef(const QString& name, const QList %1;\n"\ " if (%1.isEmpty()) {\n"\ - "%3"\ + " %1.reserve(%3);\n"\ + " for (unsigned i = 0; i < %3; ++i)\n"\ + " %1.insert(%1_tagArray[i], %1_valueArray[i]);\n"\ " }\n"\ " newRow(expr) << %1.value(expr);\n"\ "}\n"\ @@ -174,19 +235,26 @@ static QString generateToXXXDef(const QString& name, const QList >::const_iterator i = list.constBegin(); - QStringList set; + QStringList tagSet, valueSet; + tagSet.reserve(list.count()); + valueSet.reserve(list.count()); + int tmp = -1; for(; i != list.constEnd(); ++i) { QPair t = *i; t.first = escape(t.first); - set.append(QString(" ")); - set.append(name); - set.append(".insert(\""); - set.append(t.first); - set.append(QString::fromAscii("\", ")); - set.append(prepareToInsert(t.second)); - set.append(QString::fromAscii(");\n")); + tagSet.append(QString("\n \"")); + tagSet.append(t.first); + tagSet.append(QString::fromAscii("\",")); + if (!((++tmp)%2)) + valueSet.append(QString("\n ")); + valueSet.append(prepareToInsert(t.second)); + valueSet.append(QString::fromAscii(", ")); } - return result.arg(name, typeName(), set.join(QString())); + return result.arg(name, + typeName(), + QString::number(list.count()), + tagSet.join(QString()), + valueSet.join(QString())); } @@ -200,11 +268,15 @@ QString generateToXXXDef(const QString& name, const QList %1;\n"\ " if (%1.isEmpty()) {\n"\ - "%3"\ + " %1.reserve(%5);\n"\ + " for (unsigned i = 0; i < %5; ++i)\n"\ + " %1.insert(%1_tagArray[i], %1_valueArray[i]);\n"\ " }\n"\ " newRow(expr) << %1.value(expr);\n"\ "}\n"\ @@ -226,17 +298,20 @@ QString generateToXXXDef(const QString& name, const QList >::const_iterator i = list.constBegin(); - QStringList set; + QStringList tagSet, valueSet; + tagSet.reserve(list.count()); + valueSet.reserve(list.count()); + int tmp = -1; for(; i != list.constEnd(); ++i) { QPair t = *i; t.first = escape(t.first); - set.append(QString(" ")); - set.append(name); - set.append(".insert(\""); - set.append(t.first); - set.append(QString::fromAscii("\", ")); - set.append(prepareToInsert(t.second)); - set.append(QString::fromAscii(");\n")); + tagSet.append(QString("\n \"")); + tagSet.append(t.first); + tagSet.append(QString::fromAscii("\",")); + if (!((++tmp)%10)) + valueSet.append(QString("\n ")); + valueSet.append(prepareToInsert(t.second)); + valueSet.append(QString::fromAscii(", ")); } // toInteger shouldn't return NaN, so it would be nice to catch the case. QString hook; @@ -247,105 +322,129 @@ QString generateToXXXDef(const QString& name, const QList(), set.join(QString()), hook); + return result.arg(name, + typeName(), + tagSet.join(QString()), + valueSet.join(QString()), + QString::number(list.count()), + hook); } template static QString generateCastDef(const QList >& list) { static const QString templ = "\n"\ - "void tst_QScriptValue::qscriptvalue_cast%2_initData()\n"\ + "void tst_QScriptValue::qscriptvalue_cast%1_initData()\n"\ "{\n"\ - " QTest::addColumn<%2>(\"expected\");\n"\ + " QTest::addColumn<%1>(\"expected\");\n"\ " initScriptValues();\n"\ "}\n"\ "\n"\ - "void tst_QScriptValue::qscriptvalue_cast%2_makeData(const char* expr)\n"\ + "static QString qscriptvalue_cast%1_tagArray [] = {%2};\n"\ + "static %1 qscriptvalue_cast%1_valueArray [] = {%3};\n"\ + "void tst_QScriptValue::qscriptvalue_cast%1_makeData(const char* expr)\n"\ "{\n"\ - " static QHash value;\n"\ + " static QHash value;\n"\ " if (value.isEmpty()) {\n"\ - "%3"\ + " value.reserve(%4);\n"\ + " for (unsigned i = 0; i < %4; ++i)\n"\ + " value.insert(qscriptvalue_cast%1_tagArray[i], qscriptvalue_cast%1_valueArray[i]);\n"\ " }\n"\ " newRow(expr) << value.value(expr);\n"\ "}\n"\ "\n"\ - "void tst_QScriptValue::qscriptvalue_cast%2_test(const char*, const QScriptValue& value)\n"\ + "void tst_QScriptValue::qscriptvalue_cast%1_test(const char*, const QScriptValue& value)\n"\ "{\n"\ - " QFETCH(%2, expected);\n"\ - " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\ - " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\ + " QFETCH(%1, expected);\n"\ + " QCOMPARE(qscriptvalue_cast<%1>(value), expected);\n"\ + " QCOMPARE(qscriptvalue_cast<%1>(value), expected);\n"\ "}\n"\ "\n"\ - "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n"; + "DEFINE_TEST_FUNCTION(qscriptvalue_cast%1)\n"; QString result = templ; typename QList >::const_iterator i = list.constBegin(); - QStringList set; + QStringList tagSet, valueSet; + tagSet.reserve(list.count()); + valueSet.reserve(list.count()); + int tmp = -1; for(; i != list.constEnd(); ++i) { QPair t = *i; t.first = escape(t.first); - set.append(QString(" ")); - set.append("value.insert(\""); - set.append(t.first); - set.append(QString::fromAscii("\", ")); - set.append(prepareToInsert(t.second)); - set.append(QString::fromAscii(");\n")); + tagSet.append(QString("\n \"")); + tagSet.append(t.first); + tagSet.append(QString::fromAscii("\",")); + if (!((++tmp)%2)) + valueSet.append(QString("\n ")); + valueSet.append(prepareToInsert(t.second)); + valueSet.append(QString::fromAscii(", ")); } - return result.arg(typeName(), set.join(QString())); + return result.arg(typeName(), tagSet.join(QString()), valueSet.join(QString()), QString::number(list.count())); } template<> QString generateCastDef(const QList >& list) { static const QString templ = "\n"\ - "void tst_QScriptValue::qscriptvalue_cast%2_initData()\n"\ + "void tst_QScriptValue::qscriptvalue_cast%1_initData()\n"\ "{\n"\ - " QTest::addColumn<%2>(\"expected\");\n"\ + " QTest::addColumn<%1>(\"expected\");\n"\ " initScriptValues();\n"\ "}\n"\ "\n"\ - "void tst_QScriptValue::qscriptvalue_cast%2_makeData(const char* expr)\n"\ + "static QString qscriptvalue_cast%1_tagArray [] = {%2};\n"\ + "static %1 qscriptvalue_cast%1_valueArray [] = {%3};\n"\ + "void tst_QScriptValue::qscriptvalue_cast%1_makeData(const char* expr)\n"\ "{\n"\ - " static QHash value;\n"\ + " static QHash value;\n"\ " if (value.isEmpty()) {\n"\ - "%3"\ + " value.reserve(%4);\n"\ + " for (unsigned i = 0; i < %4; ++i)\n"\ + " value.insert(qscriptvalue_cast%1_tagArray[i], qscriptvalue_cast%1_valueArray[i]);\n"\ " }\n"\ " newRow(expr) << value.value(expr);\n"\ "}\n"\ "\n"\ - "void tst_QScriptValue::qscriptvalue_cast%2_test(const char*, const QScriptValue& value)\n"\ + "void tst_QScriptValue::qscriptvalue_cast%1_test(const char*, const QScriptValue& value)\n"\ "{\n"\ - " QFETCH(%2, expected);\n"\ + " QFETCH(%1, expected);\n"\ " if (qIsNaN(expected)) {\n" - " QVERIFY(qIsNaN(qscriptvalue_cast<%2>(value)));\n" - " QVERIFY(qIsNaN(qscriptvalue_cast<%2>(value)));\n" + " QVERIFY(qIsNaN(qscriptvalue_cast<%1>(value)));\n" + " QVERIFY(qIsNaN(qscriptvalue_cast<%1>(value)));\n" " return;\n" " }\n"\ " if (qIsInf(expected)) {\n" - " QVERIFY(qIsInf(qscriptvalue_cast<%2>(value)));\n" - " QVERIFY(qIsInf(qscriptvalue_cast<%2>(value)));\n" + " QVERIFY(qIsInf(qscriptvalue_cast<%1>(value)));\n" + " QVERIFY(qIsInf(qscriptvalue_cast<%1>(value)));\n" " return;\n" " }\n" - " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\ - " QCOMPARE(qscriptvalue_cast<%2>(value), expected);\n"\ + " QCOMPARE(qscriptvalue_cast<%1>(value), expected);\n"\ + " QCOMPARE(qscriptvalue_cast<%1>(value), expected);\n"\ "}\n"\ "\n"\ - "DEFINE_TEST_FUNCTION(qscriptvalue_cast%2)\n"; + "DEFINE_TEST_FUNCTION(qscriptvalue_cast%1)\n"; QString result = templ; QList >::const_iterator i = list.constBegin(); - QStringList set; + QStringList tagSet, valueSet; + tagSet.reserve(list.count()); + valueSet.reserve(list.count()); + int tmp = -1; for(; i != list.constEnd(); ++i) { QPair t = *i; t.first = escape(t.first); - set.append(QString(" ")); - set.append("value.insert(\""); - set.append(t.first); - set.append(QString::fromAscii("\", ")); - set.append(prepareToInsert(t.second)); - set.append(QString::fromAscii(");\n")); + tagSet.append(QString("\n \"")); + tagSet.append(t.first); + tagSet.append(QString::fromAscii("\",")); + if (!((++tmp)%10)) + valueSet.append(QString("\n ")); + valueSet.append(prepareToInsert(t.second)); + valueSet.append(QString::fromAscii(", ")); } - return result.arg(typeName(), set.join(QString())); + return result.arg(typeName(), + tagSet.join(QString()), + valueSet.join(QString()), + QString::number(list.count())); } static QString generateCompareDef(const QString& comparisionType, const QList tags) @@ -358,11 +457,14 @@ static QString generateCompareDef(const QString& comparisionType, const QList equals;\n"\ " if (equals.isEmpty()) {\n"\ - "%2\n"\ + " equals.reserve(%3);\n"\ + " for (unsigned i = 0; i < %3; ++i)\n"\ + " equals.insert(%1_array[i]);\n"\ " }\n"\ " QHash::const_iterator it;\n"\ " for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {\n"\ @@ -386,59 +488,16 @@ static QString generateCompareDef(const QString& comparisionType, const QList& allDataTags) { - static const QString templ = "/****************************************************************************\n" - "**\n" - "** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).\n" - "** All rights reserved.\n" - "** Contact: Nokia Corporation (qt-info@nokia.com)\n" - "**\n" - "** This file is part of the test suite of the Qt Toolkit.\n" - "**\n" - "** $QT_BEGIN_LICENSE:LGPL$\n" - "** No Commercial Usage\n" - "** This file contains pre-release code and may not be distributed.\n" - "** You may use this file in accordance with the terms and conditions\n" - "** contained in the Technology Preview License Agreement accompanying\n" - "** this package.\n" - "**\n" - "** GNU Lesser General Public License Usage\n" - "** Alternatively, this file may be used under the terms of the GNU Lesser\n" - "** General Public License version 2.1 as published by the Free Software\n" - "** Foundation and appearing in the file LICENSE.LGPL included in the\n" - "** packaging of this file. Please review the following information to\n" - "** ensure the GNU Lesser General Public License version 2.1 requirements\n" - "** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n" - "**\n" - "** In addition, as a special exception, Nokia gives you certain additional\n" - "** rights. These rights are described in the Nokia Qt LGPL Exception\n" - "** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n" - "**\n" - "** If you have questions regarding the use of this file, please contact\n" - "** Nokia at qt-info@nokia.com.\n" - "**\n" - "**\n" - "**\n" - "**\n" - "**\n" - "**\n" - "**\n" - "**\n" - "** $QT_END_LICENSE$\n" - "**\n" - "****************************************************************************/\n" - "\n"\ - "#include \"tst_qscriptvalue.h\"\n\n"\ - "#define DEFINE_TEST_VALUE(expr) m_values.insert(QString::fromLatin1(#expr), expr)\n"\ - "\n"\ - "void tst_QScriptValue::initScriptValues()\n"\ + static const QString templ = "void tst_QScriptValue::initScriptValues()\n"\ "{\n"\ " m_values.clear();\n"\ " if (engine) \n"\ @@ -463,7 +522,7 @@ static void squashTags(QString dataTag, const QVector& results, QList TestGenerator::generateTest() { // All data tags keept in one place. QVector dataTags; @@ -643,47 +702,63 @@ QString TestGenerator::generateTest() Q_ASSERT(in.atEnd()); // Generate. - QStringList result; - result.append(generateInitDef(dataTags)); - result.append(generateIsXXXDef("isValid", isValidList)); - result.append(generateIsXXXDef("isBool", isBoolList)); - result.append(generateIsXXXDef("isBoolean", isBooleanList)); - result.append(generateIsXXXDef("isNumber", isNumberList)); - result.append(generateIsXXXDef("isFunction", isFunctionList)); - result.append(generateIsXXXDef("isNull", isNullList)); - result.append(generateIsXXXDef("isString", isStringList)); - result.append(generateIsXXXDef("isUndefined", isUndefinedList)); - result.append(generateIsXXXDef("isVariant", isVariantList)); - result.append(generateIsXXXDef("isQObject", isQObjectList)); - result.append(generateIsXXXDef("isQMetaObject", isQMetaObjectList)); - result.append(generateIsXXXDef("isObject", isObjectList)); - result.append(generateIsXXXDef("isDate", isDateList)); - result.append(generateIsXXXDef("isRegExp", isRegExpList)); - result.append(generateIsXXXDef("isArray", isArrayList)); - result.append(generateIsXXXDef("isError", isErrorList)); - - result.append(generateToXXXDef("toString", toStringList)); - result.append(generateToXXXDef("toNumber", toNumberList)); - result.append(generateToXXXDef("toBool", toBoolList)); - result.append(generateToXXXDef("toBoolean", toBooleanList)); - result.append(generateToXXXDef("toInteger", toIntegerList)); - result.append(generateToXXXDef("toInt32", toInt32List)); - result.append(generateToXXXDef("toUInt32", toUInt32List)); - result.append(generateToXXXDef("toUInt16", toUInt16List)); - - result.append(generateCompareDef("equals", equalsList)); - result.append(generateCompareDef("strictlyEquals", strictlyEqualsList)); - result.append(generateCompareDef("lessThan", lessThanList)); - result.append(generateCompareDef("instanceOf", instanceOfList)); - - result.append(generateCastDef(castStringList)); - result.append(generateCastDef(castSRealList)); - result.append(generateCastDef(castBoolList)); - result.append(generateCastDef(castInt32List)); - result.append(generateCastDef(castUInt32List)); - result.append(generateCastDef(castUInt16List)); - - return result.join("\n"); + QHash result; + QStringList tmp; + tmp.append(generateLicence()); + tmp.append(generateInitDef(dataTags)); + result.insert("init", tmp.join("\n")); + tmp.clear(); + + tmp.append(generateLicence()); + tmp.append(generateIsXXXDef("isValid", isValidList)); + tmp.append(generateIsXXXDef("isBool", isBoolList)); + tmp.append(generateIsXXXDef("isBoolean", isBooleanList)); + tmp.append(generateIsXXXDef("isNumber", isNumberList)); + tmp.append(generateIsXXXDef("isFunction", isFunctionList)); + tmp.append(generateIsXXXDef("isNull", isNullList)); + tmp.append(generateIsXXXDef("isString", isStringList)); + tmp.append(generateIsXXXDef("isUndefined", isUndefinedList)); + tmp.append(generateIsXXXDef("isVariant", isVariantList)); + tmp.append(generateIsXXXDef("isQObject", isQObjectList)); + tmp.append(generateIsXXXDef("isQMetaObject", isQMetaObjectList)); + tmp.append(generateIsXXXDef("isObject", isObjectList)); + tmp.append(generateIsXXXDef("isDate", isDateList)); + tmp.append(generateIsXXXDef("isRegExp", isRegExpList)); + tmp.append(generateIsXXXDef("isArray", isArrayList)); + tmp.append(generateIsXXXDef("isError", isErrorList)); + result.insert("isXXX", tmp.join("\n")); + tmp.clear(); + + tmp.append(generateLicence()); + tmp.append(generateToXXXDef("toString", toStringList)); + tmp.append(generateToXXXDef("toNumber", toNumberList)); + tmp.append(generateToXXXDef("toBool", toBoolList)); + tmp.append(generateToXXXDef("toBoolean", toBooleanList)); + tmp.append(generateToXXXDef("toInteger", toIntegerList)); + tmp.append(generateToXXXDef("toInt32", toInt32List)); + tmp.append(generateToXXXDef("toUInt32", toUInt32List)); + tmp.append(generateToXXXDef("toUInt16", toUInt16List)); + result.insert("toXXX", tmp.join("\n")); + tmp.clear(); + + tmp.append(generateLicence()); + tmp.append(generateCompareDef("equals", equalsList)); + tmp.append(generateCompareDef("strictlyEquals", strictlyEqualsList)); + tmp.append(generateCompareDef("lessThan", lessThanList)); + tmp.append(generateCompareDef("instanceOf", instanceOfList)); + result.insert("comparison", tmp.join("\n")); + tmp.clear(); + + tmp.append(generateLicence()); + tmp.append(generateCastDef(castStringList)); + tmp.append(generateCastDef(castSRealList)); + tmp.append(generateCastDef(castBoolList)); + tmp.append(generateCastDef(castInt32List)); + tmp.append(generateCastDef(castUInt32List)); + tmp.append(generateCastDef(castUInt16List)); + result.insert("cast", tmp.join("\n")); + + return result; } diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.h b/tests/auto/qscriptvalue/testgen/testgenerator.h index 8f4a357..1c61fc5 100644 --- a/tests/auto/qscriptvalue/testgen/testgenerator.h +++ b/tests/auto/qscriptvalue/testgen/testgenerator.h @@ -49,13 +49,10 @@ class TestGenerator { public: TestGenerator(QString& outputpath) - : m_ofile(outputpath) + : m_opath(outputpath) { - // Open output file - if (!m_ofile.open(QIODevice::WriteOnly | QIODevice::Text)) { - qWarning() << "Can't open output file: " << outputpath; - exit(2); - } + if (!m_opath.endsWith('/')) + m_opath.append('/'); m_tempFile.open(); } @@ -67,10 +64,10 @@ public: } void prepareData(); - QString generateTest(); - void save(const QString& data); + QHash generateTest(); + void save(const QHash& data); private: - QFile m_ofile; + QString m_opath; QTemporaryFile m_tempFile; }; -- cgit v0.12 From c5d04bb263528e665ed0423a27af3cc4bd40e9f2 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowacki Date: Thu, 4 Mar 2010 16:19:58 +0200 Subject: Reduce compiling time of QScriptValue autotest suite on Windows. The QScriptValue autotest suite compiles about 24 min with MSVS2008, which is unacceptable. Tests were splited into a few files for better use of distributed compilation. Repeated calls to insert() and operator<<() where replaced by loops, that should reduce time of code optimizing. Reviewed-by: Kent Hansen --- tests/auto/qscriptvalue/qscriptvalue.pro | 8 +- tests/auto/qscriptvalue/tst_qscriptvalue.h | 2 + .../qscriptvalue/tst_qscriptvalue_generated.cpp | 10221 ------------------- .../tst_qscriptvalue_generated_cast.cpp | 1453 +++ .../tst_qscriptvalue_generated_comparison.cpp | 7026 +++++++++++++ .../tst_qscriptvalue_generated_init.cpp | 198 + .../tst_qscriptvalue_generated_isXXX.cpp | 830 ++ .../tst_qscriptvalue_generated_toXXX.cpp | 1897 ++++ 8 files changed, 11412 insertions(+), 10223 deletions(-) delete mode 100644 tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp create mode 100644 tests/auto/qscriptvalue/tst_qscriptvalue_generated_cast.cpp create mode 100644 tests/auto/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp create mode 100644 tests/auto/qscriptvalue/tst_qscriptvalue_generated_init.cpp create mode 100644 tests/auto/qscriptvalue/tst_qscriptvalue_generated_isXXX.cpp create mode 100644 tests/auto/qscriptvalue/tst_qscriptvalue_generated_toXXX.cpp diff --git a/tests/auto/qscriptvalue/qscriptvalue.pro b/tests/auto/qscriptvalue/qscriptvalue.pro index 191cd4a..c3e9912 100644 --- a/tests/auto/qscriptvalue/qscriptvalue.pro +++ b/tests/auto/qscriptvalue/qscriptvalue.pro @@ -4,8 +4,12 @@ SOURCES += tst_qscriptvalue.cpp HEADERS += tst_qscriptvalue.h # Generated by testgen -SOURCES += tst_qscriptvalue_generated.cpp - +SOURCES += \ + tst_qscriptvalue_generated_init.cpp \ + tst_qscriptvalue_generated_cast.cpp \ + tst_qscriptvalue_generated_comparison.cpp \ + tst_qscriptvalue_generated_isXXX.cpp \ + tst_qscriptvalue_generated_toXXX.cpp win32-msvc* { # With -O2, MSVC takes up to 24 minutes to compile this test! diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.h b/tests/auto/qscriptvalue/tst_qscriptvalue.h index a5c7b45..aae35b2 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue.h +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.h @@ -49,6 +49,8 @@ #include #include +#define DEFINE_TEST_VALUE(expr) m_values.insert(QString::fromLatin1(#expr), expr) + Q_DECLARE_METATYPE(QVariant) Q_DECLARE_METATYPE(QScriptValue) diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp deleted file mode 100644 index a07ff4b..0000000 --- a/tests/auto/qscriptvalue/tst_qscriptvalue_generated.cpp +++ /dev/null @@ -1,10221 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite 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 Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "tst_qscriptvalue.h" - -#define DEFINE_TEST_VALUE(expr) m_values.insert(QString::fromLatin1(#expr), expr) - -void tst_QScriptValue::initScriptValues() -{ - m_values.clear(); - if (engine) - delete engine; - engine = new QScriptEngine; - DEFINE_TEST_VALUE(QScriptValue()); - DEFINE_TEST_VALUE(QScriptValue(QScriptValue::UndefinedValue)); - DEFINE_TEST_VALUE(QScriptValue(QScriptValue::NullValue)); - DEFINE_TEST_VALUE(QScriptValue(true)); - DEFINE_TEST_VALUE(QScriptValue(false)); - DEFINE_TEST_VALUE(QScriptValue(int(122))); - DEFINE_TEST_VALUE(QScriptValue(uint(124))); - DEFINE_TEST_VALUE(QScriptValue(0)); - DEFINE_TEST_VALUE(QScriptValue(0.0)); - DEFINE_TEST_VALUE(QScriptValue(123.0)); - DEFINE_TEST_VALUE(QScriptValue(6.37e-8)); - DEFINE_TEST_VALUE(QScriptValue(-6.37e-8)); - DEFINE_TEST_VALUE(QScriptValue(0x43211234)); - DEFINE_TEST_VALUE(QScriptValue(0x10000)); - DEFINE_TEST_VALUE(QScriptValue(0x10001)); - DEFINE_TEST_VALUE(QScriptValue(qSNaN())); - DEFINE_TEST_VALUE(QScriptValue(qQNaN())); - DEFINE_TEST_VALUE(QScriptValue(qInf())); - DEFINE_TEST_VALUE(QScriptValue(-qInf())); - DEFINE_TEST_VALUE(QScriptValue("NaN")); - DEFINE_TEST_VALUE(QScriptValue("Infinity")); - DEFINE_TEST_VALUE(QScriptValue("-Infinity")); - DEFINE_TEST_VALUE(QScriptValue("ciao")); - DEFINE_TEST_VALUE(QScriptValue(QString::fromLatin1("ciao"))); - DEFINE_TEST_VALUE(QScriptValue(QString(""))); - DEFINE_TEST_VALUE(QScriptValue(QString())); - DEFINE_TEST_VALUE(QScriptValue(QString("0"))); - DEFINE_TEST_VALUE(QScriptValue(QString("123"))); - DEFINE_TEST_VALUE(QScriptValue(QString("12.4"))); - DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::UndefinedValue)); - DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::NullValue)); - DEFINE_TEST_VALUE(QScriptValue(0, true)); - DEFINE_TEST_VALUE(QScriptValue(0, false)); - DEFINE_TEST_VALUE(QScriptValue(0, int(122))); - DEFINE_TEST_VALUE(QScriptValue(0, uint(124))); - DEFINE_TEST_VALUE(QScriptValue(0, 0)); - DEFINE_TEST_VALUE(QScriptValue(0, 0.0)); - DEFINE_TEST_VALUE(QScriptValue(0, 123.0)); - DEFINE_TEST_VALUE(QScriptValue(0, 6.37e-8)); - DEFINE_TEST_VALUE(QScriptValue(0, -6.37e-8)); - DEFINE_TEST_VALUE(QScriptValue(0, 0x43211234)); - DEFINE_TEST_VALUE(QScriptValue(0, 0x10000)); - DEFINE_TEST_VALUE(QScriptValue(0, 0x10001)); - DEFINE_TEST_VALUE(QScriptValue(0, qSNaN())); - DEFINE_TEST_VALUE(QScriptValue(0, qQNaN())); - DEFINE_TEST_VALUE(QScriptValue(0, qInf())); - DEFINE_TEST_VALUE(QScriptValue(0, -qInf())); - DEFINE_TEST_VALUE(QScriptValue(0, "NaN")); - DEFINE_TEST_VALUE(QScriptValue(0, "Infinity")); - DEFINE_TEST_VALUE(QScriptValue(0, "-Infinity")); - DEFINE_TEST_VALUE(QScriptValue(0, "ciao")); - DEFINE_TEST_VALUE(QScriptValue(0, QString::fromLatin1("ciao"))); - DEFINE_TEST_VALUE(QScriptValue(0, QString(""))); - DEFINE_TEST_VALUE(QScriptValue(0, QString())); - DEFINE_TEST_VALUE(QScriptValue(0, QString("0"))); - DEFINE_TEST_VALUE(QScriptValue(0, QString("123"))); - DEFINE_TEST_VALUE(QScriptValue(0, QString("12.3"))); - DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::UndefinedValue)); - DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::NullValue)); - DEFINE_TEST_VALUE(QScriptValue(engine, true)); - DEFINE_TEST_VALUE(QScriptValue(engine, false)); - DEFINE_TEST_VALUE(QScriptValue(engine, int(122))); - DEFINE_TEST_VALUE(QScriptValue(engine, uint(124))); - DEFINE_TEST_VALUE(QScriptValue(engine, 0)); - DEFINE_TEST_VALUE(QScriptValue(engine, 0.0)); - DEFINE_TEST_VALUE(QScriptValue(engine, 123.0)); - DEFINE_TEST_VALUE(QScriptValue(engine, 6.37e-8)); - DEFINE_TEST_VALUE(QScriptValue(engine, -6.37e-8)); - DEFINE_TEST_VALUE(QScriptValue(engine, 0x43211234)); - DEFINE_TEST_VALUE(QScriptValue(engine, 0x10000)); - DEFINE_TEST_VALUE(QScriptValue(engine, 0x10001)); - DEFINE_TEST_VALUE(QScriptValue(engine, qSNaN())); - DEFINE_TEST_VALUE(QScriptValue(engine, qQNaN())); - DEFINE_TEST_VALUE(QScriptValue(engine, qInf())); - DEFINE_TEST_VALUE(QScriptValue(engine, -qInf())); - DEFINE_TEST_VALUE(QScriptValue(engine, "NaN")); - DEFINE_TEST_VALUE(QScriptValue(engine, "Infinity")); - DEFINE_TEST_VALUE(QScriptValue(engine, "-Infinity")); - DEFINE_TEST_VALUE(QScriptValue(engine, "ciao")); - DEFINE_TEST_VALUE(QScriptValue(engine, QString::fromLatin1("ciao"))); - DEFINE_TEST_VALUE(QScriptValue(engine, QString(""))); - DEFINE_TEST_VALUE(QScriptValue(engine, QString())); - DEFINE_TEST_VALUE(QScriptValue(engine, QString("0"))); - DEFINE_TEST_VALUE(QScriptValue(engine, QString("123"))); - DEFINE_TEST_VALUE(QScriptValue(engine, QString("1.23"))); - DEFINE_TEST_VALUE(engine->evaluate("[]")); - DEFINE_TEST_VALUE(engine->evaluate("{}")); - DEFINE_TEST_VALUE(engine->evaluate("Object.prototype")); - DEFINE_TEST_VALUE(engine->evaluate("Date.prototype")); - DEFINE_TEST_VALUE(engine->evaluate("Array.prototype")); - DEFINE_TEST_VALUE(engine->evaluate("Function.prototype")); - DEFINE_TEST_VALUE(engine->evaluate("Error.prototype")); - DEFINE_TEST_VALUE(engine->evaluate("Object")); - DEFINE_TEST_VALUE(engine->evaluate("Array")); - DEFINE_TEST_VALUE(engine->evaluate("Number")); - DEFINE_TEST_VALUE(engine->evaluate("Function")); - DEFINE_TEST_VALUE(engine->evaluate("(function() { return 1; })")); - DEFINE_TEST_VALUE(engine->evaluate("(function() { return 'ciao'; })")); - DEFINE_TEST_VALUE(engine->evaluate("(function() { throw new Error('foo'); })")); - DEFINE_TEST_VALUE(engine->evaluate("/foo/")); - DEFINE_TEST_VALUE(engine->evaluate("new Object()")); - DEFINE_TEST_VALUE(engine->evaluate("new Array()")); - DEFINE_TEST_VALUE(engine->evaluate("new Error()")); - DEFINE_TEST_VALUE(engine->evaluate("a = new Object(); a.foo = 22; a.foo")); - DEFINE_TEST_VALUE(engine->evaluate("Undefined")); - DEFINE_TEST_VALUE(engine->evaluate("Null")); - DEFINE_TEST_VALUE(engine->evaluate("True")); - DEFINE_TEST_VALUE(engine->evaluate("False")); - DEFINE_TEST_VALUE(engine->evaluate("undefined")); - DEFINE_TEST_VALUE(engine->evaluate("null")); - DEFINE_TEST_VALUE(engine->evaluate("true")); - DEFINE_TEST_VALUE(engine->evaluate("false")); - DEFINE_TEST_VALUE(engine->evaluate("122")); - DEFINE_TEST_VALUE(engine->evaluate("124")); - DEFINE_TEST_VALUE(engine->evaluate("0")); - DEFINE_TEST_VALUE(engine->evaluate("0.0")); - DEFINE_TEST_VALUE(engine->evaluate("123.0")); - DEFINE_TEST_VALUE(engine->evaluate("6.37e-8")); - DEFINE_TEST_VALUE(engine->evaluate("-6.37e-8")); - DEFINE_TEST_VALUE(engine->evaluate("0x43211234")); - DEFINE_TEST_VALUE(engine->evaluate("0x10000")); - DEFINE_TEST_VALUE(engine->evaluate("0x10001")); - DEFINE_TEST_VALUE(engine->evaluate("NaN")); - DEFINE_TEST_VALUE(engine->evaluate("Infinity")); - DEFINE_TEST_VALUE(engine->evaluate("-Infinity")); - DEFINE_TEST_VALUE(engine->evaluate("'ciao'")); - DEFINE_TEST_VALUE(engine->evaluate("''")); - DEFINE_TEST_VALUE(engine->evaluate("'0'")); - DEFINE_TEST_VALUE(engine->evaluate("'123'")); - DEFINE_TEST_VALUE(engine->evaluate("'12.4'")); - DEFINE_TEST_VALUE(engine->nullValue()); - DEFINE_TEST_VALUE(engine->undefinedValue()); - DEFINE_TEST_VALUE(engine->newObject()); - DEFINE_TEST_VALUE(engine->newArray()); - DEFINE_TEST_VALUE(engine->newArray(10)); - DEFINE_TEST_VALUE(engine->newDate(QDateTime())); - DEFINE_TEST_VALUE(engine->newQMetaObject(&QObject::staticMetaObject)); - DEFINE_TEST_VALUE(engine->newVariant(QVariant())); - DEFINE_TEST_VALUE(engine->newVariant(QVariant(123))); - DEFINE_TEST_VALUE(engine->newVariant(QVariant(false))); - DEFINE_TEST_VALUE(engine->newQObject(0)); - DEFINE_TEST_VALUE(engine->newQObject(engine)); -} - - -void tst_QScriptValue::isValid_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isValid_makeData(const char* expr) -{ - static QSet isValid; - if (isValid.isEmpty()) { - isValid << "QScriptValue(QScriptValue::UndefinedValue)" - << "QScriptValue(QScriptValue::NullValue)" - << "QScriptValue(true)" - << "QScriptValue(false)" - << "QScriptValue(int(122))" - << "QScriptValue(uint(124))" - << "QScriptValue(0)" - << "QScriptValue(0.0)" - << "QScriptValue(123.0)" - << "QScriptValue(6.37e-8)" - << "QScriptValue(-6.37e-8)" - << "QScriptValue(0x43211234)" - << "QScriptValue(0x10000)" - << "QScriptValue(0x10001)" - << "QScriptValue(qSNaN())" - << "QScriptValue(qQNaN())" - << "QScriptValue(qInf())" - << "QScriptValue(-qInf())" - << "QScriptValue(\"NaN\")" - << "QScriptValue(\"Infinity\")" - << "QScriptValue(\"-Infinity\")" - << "QScriptValue(\"ciao\")" - << "QScriptValue(QString::fromLatin1(\"ciao\"))" - << "QScriptValue(QString(\"\"))" - << "QScriptValue(QString())" - << "QScriptValue(QString(\"0\"))" - << "QScriptValue(QString(\"123\"))" - << "QScriptValue(QString(\"12.4\"))" - << "QScriptValue(0, QScriptValue::UndefinedValue)" - << "QScriptValue(0, QScriptValue::NullValue)" - << "QScriptValue(0, true)" - << "QScriptValue(0, false)" - << "QScriptValue(0, int(122))" - << "QScriptValue(0, uint(124))" - << "QScriptValue(0, 0)" - << "QScriptValue(0, 0.0)" - << "QScriptValue(0, 123.0)" - << "QScriptValue(0, 6.37e-8)" - << "QScriptValue(0, -6.37e-8)" - << "QScriptValue(0, 0x43211234)" - << "QScriptValue(0, 0x10000)" - << "QScriptValue(0, 0x10001)" - << "QScriptValue(0, qSNaN())" - << "QScriptValue(0, qQNaN())" - << "QScriptValue(0, qInf())" - << "QScriptValue(0, -qInf())" - << "QScriptValue(0, \"NaN\")" - << "QScriptValue(0, \"Infinity\")" - << "QScriptValue(0, \"-Infinity\")" - << "QScriptValue(0, \"ciao\")" - << "QScriptValue(0, QString::fromLatin1(\"ciao\"))" - << "QScriptValue(0, QString(\"\"))" - << "QScriptValue(0, QString())" - << "QScriptValue(0, QString(\"0\"))" - << "QScriptValue(0, QString(\"123\"))" - << "QScriptValue(0, QString(\"12.3\"))" - << "QScriptValue(engine, QScriptValue::UndefinedValue)" - << "QScriptValue(engine, QScriptValue::NullValue)" - << "QScriptValue(engine, true)" - << "QScriptValue(engine, false)" - << "QScriptValue(engine, int(122))" - << "QScriptValue(engine, uint(124))" - << "QScriptValue(engine, 0)" - << "QScriptValue(engine, 0.0)" - << "QScriptValue(engine, 123.0)" - << "QScriptValue(engine, 6.37e-8)" - << "QScriptValue(engine, -6.37e-8)" - << "QScriptValue(engine, 0x43211234)" - << "QScriptValue(engine, 0x10000)" - << "QScriptValue(engine, 0x10001)" - << "QScriptValue(engine, qSNaN())" - << "QScriptValue(engine, qQNaN())" - << "QScriptValue(engine, qInf())" - << "QScriptValue(engine, -qInf())" - << "QScriptValue(engine, \"NaN\")" - << "QScriptValue(engine, \"Infinity\")" - << "QScriptValue(engine, \"-Infinity\")" - << "QScriptValue(engine, \"ciao\")" - << "QScriptValue(engine, QString::fromLatin1(\"ciao\"))" - << "QScriptValue(engine, QString(\"\"))" - << "QScriptValue(engine, QString())" - << "QScriptValue(engine, QString(\"0\"))" - << "QScriptValue(engine, QString(\"123\"))" - << "QScriptValue(engine, QString(\"1.23\"))" - << "engine->evaluate(\"[]\")" - << "engine->evaluate(\"{}\")" - << "engine->evaluate(\"Object.prototype\")" - << "engine->evaluate(\"Date.prototype\")" - << "engine->evaluate(\"Array.prototype\")" - << "engine->evaluate(\"Function.prototype\")" - << "engine->evaluate(\"Error.prototype\")" - << "engine->evaluate(\"Object\")" - << "engine->evaluate(\"Array\")" - << "engine->evaluate(\"Number\")" - << "engine->evaluate(\"Function\")" - << "engine->evaluate(\"(function() { return 1; })\")" - << "engine->evaluate(\"(function() { return 'ciao'; })\")" - << "engine->evaluate(\"(function() { throw new Error('foo'); })\")" - << "engine->evaluate(\"/foo/\")" - << "engine->evaluate(\"new Object()\")" - << "engine->evaluate(\"new Array()\")" - << "engine->evaluate(\"new Error()\")" - << "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")" - << "engine->evaluate(\"Undefined\")" - << "engine->evaluate(\"Null\")" - << "engine->evaluate(\"True\")" - << "engine->evaluate(\"False\")" - << "engine->evaluate(\"undefined\")" - << "engine->evaluate(\"null\")" - << "engine->evaluate(\"true\")" - << "engine->evaluate(\"false\")" - << "engine->evaluate(\"122\")" - << "engine->evaluate(\"124\")" - << "engine->evaluate(\"0\")" - << "engine->evaluate(\"0.0\")" - << "engine->evaluate(\"123.0\")" - << "engine->evaluate(\"6.37e-8\")" - << "engine->evaluate(\"-6.37e-8\")" - << "engine->evaluate(\"0x43211234\")" - << "engine->evaluate(\"0x10000\")" - << "engine->evaluate(\"0x10001\")" - << "engine->evaluate(\"NaN\")" - << "engine->evaluate(\"Infinity\")" - << "engine->evaluate(\"-Infinity\")" - << "engine->evaluate(\"'ciao'\")" - << "engine->evaluate(\"''\")" - << "engine->evaluate(\"'0'\")" - << "engine->evaluate(\"'123'\")" - << "engine->evaluate(\"'12.4'\")" - << "engine->nullValue()" - << "engine->undefinedValue()" - << "engine->newObject()" - << "engine->newArray()" - << "engine->newArray(10)" - << "engine->newDate(QDateTime())" - << "engine->newQMetaObject(&QObject::staticMetaObject)" - << "engine->newVariant(QVariant())" - << "engine->newVariant(QVariant(123))" - << "engine->newVariant(QVariant(false))" - << "engine->newQObject(0)" - << "engine->newQObject(engine)" - ; - } - newRow(expr) << isValid.contains(expr); -} - -void tst_QScriptValue::isValid_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isValid(), expected); - QCOMPARE(value.isValid(), expected); -} - -DEFINE_TEST_FUNCTION(isValid) - - -void tst_QScriptValue::isBool_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isBool_makeData(const char* expr) -{ - static QSet isBool; - if (isBool.isEmpty()) { - isBool << "QScriptValue(true)" - << "QScriptValue(false)" - << "QScriptValue(0, true)" - << "QScriptValue(0, false)" - << "QScriptValue(engine, true)" - << "QScriptValue(engine, false)" - << "engine->evaluate(\"true\")" - << "engine->evaluate(\"false\")" - ; - } - newRow(expr) << isBool.contains(expr); -} - -void tst_QScriptValue::isBool_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isBool(), expected); - QCOMPARE(value.isBool(), expected); -} - -DEFINE_TEST_FUNCTION(isBool) - - -void tst_QScriptValue::isBoolean_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isBoolean_makeData(const char* expr) -{ - static QSet isBoolean; - if (isBoolean.isEmpty()) { - isBoolean << "QScriptValue(true)" - << "QScriptValue(false)" - << "QScriptValue(0, true)" - << "QScriptValue(0, false)" - << "QScriptValue(engine, true)" - << "QScriptValue(engine, false)" - << "engine->evaluate(\"true\")" - << "engine->evaluate(\"false\")" - ; - } - newRow(expr) << isBoolean.contains(expr); -} - -void tst_QScriptValue::isBoolean_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isBoolean(), expected); - QCOMPARE(value.isBoolean(), expected); -} - -DEFINE_TEST_FUNCTION(isBoolean) - - -void tst_QScriptValue::isNumber_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isNumber_makeData(const char* expr) -{ - static QSet isNumber; - if (isNumber.isEmpty()) { - isNumber << "QScriptValue(int(122))" - << "QScriptValue(uint(124))" - << "QScriptValue(0)" - << "QScriptValue(0.0)" - << "QScriptValue(123.0)" - << "QScriptValue(6.37e-8)" - << "QScriptValue(-6.37e-8)" - << "QScriptValue(0x43211234)" - << "QScriptValue(0x10000)" - << "QScriptValue(0x10001)" - << "QScriptValue(qSNaN())" - << "QScriptValue(qQNaN())" - << "QScriptValue(qInf())" - << "QScriptValue(-qInf())" - << "QScriptValue(0, int(122))" - << "QScriptValue(0, uint(124))" - << "QScriptValue(0, 0)" - << "QScriptValue(0, 0.0)" - << "QScriptValue(0, 123.0)" - << "QScriptValue(0, 6.37e-8)" - << "QScriptValue(0, -6.37e-8)" - << "QScriptValue(0, 0x43211234)" - << "QScriptValue(0, 0x10000)" - << "QScriptValue(0, 0x10001)" - << "QScriptValue(0, qSNaN())" - << "QScriptValue(0, qQNaN())" - << "QScriptValue(0, qInf())" - << "QScriptValue(0, -qInf())" - << "QScriptValue(engine, int(122))" - << "QScriptValue(engine, uint(124))" - << "QScriptValue(engine, 0)" - << "QScriptValue(engine, 0.0)" - << "QScriptValue(engine, 123.0)" - << "QScriptValue(engine, 6.37e-8)" - << "QScriptValue(engine, -6.37e-8)" - << "QScriptValue(engine, 0x43211234)" - << "QScriptValue(engine, 0x10000)" - << "QScriptValue(engine, 0x10001)" - << "QScriptValue(engine, qSNaN())" - << "QScriptValue(engine, qQNaN())" - << "QScriptValue(engine, qInf())" - << "QScriptValue(engine, -qInf())" - << "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")" - << "engine->evaluate(\"122\")" - << "engine->evaluate(\"124\")" - << "engine->evaluate(\"0\")" - << "engine->evaluate(\"0.0\")" - << "engine->evaluate(\"123.0\")" - << "engine->evaluate(\"6.37e-8\")" - << "engine->evaluate(\"-6.37e-8\")" - << "engine->evaluate(\"0x43211234\")" - << "engine->evaluate(\"0x10000\")" - << "engine->evaluate(\"0x10001\")" - << "engine->evaluate(\"NaN\")" - << "engine->evaluate(\"Infinity\")" - << "engine->evaluate(\"-Infinity\")" - ; - } - newRow(expr) << isNumber.contains(expr); -} - -void tst_QScriptValue::isNumber_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isNumber(), expected); - QCOMPARE(value.isNumber(), expected); -} - -DEFINE_TEST_FUNCTION(isNumber) - - -void tst_QScriptValue::isFunction_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isFunction_makeData(const char* expr) -{ - static QSet isFunction; - if (isFunction.isEmpty()) { - isFunction << "engine->evaluate(\"Function.prototype\")" - << "engine->evaluate(\"Object\")" - << "engine->evaluate(\"Array\")" - << "engine->evaluate(\"Number\")" - << "engine->evaluate(\"Function\")" - << "engine->evaluate(\"(function() { return 1; })\")" - << "engine->evaluate(\"(function() { return 'ciao'; })\")" - << "engine->evaluate(\"(function() { throw new Error('foo'); })\")" - << "engine->evaluate(\"/foo/\")" - << "engine->newQMetaObject(&QObject::staticMetaObject)" - ; - } - newRow(expr) << isFunction.contains(expr); -} - -void tst_QScriptValue::isFunction_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isFunction(), expected); - QCOMPARE(value.isFunction(), expected); -} - -DEFINE_TEST_FUNCTION(isFunction) - - -void tst_QScriptValue::isNull_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isNull_makeData(const char* expr) -{ - static QSet isNull; - if (isNull.isEmpty()) { - isNull << "QScriptValue(QScriptValue::NullValue)" - << "QScriptValue(0, QScriptValue::NullValue)" - << "QScriptValue(engine, QScriptValue::NullValue)" - << "engine->evaluate(\"null\")" - << "engine->nullValue()" - << "engine->newQObject(0)" - ; - } - newRow(expr) << isNull.contains(expr); -} - -void tst_QScriptValue::isNull_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isNull(), expected); - QCOMPARE(value.isNull(), expected); -} - -DEFINE_TEST_FUNCTION(isNull) - - -void tst_QScriptValue::isString_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isString_makeData(const char* expr) -{ - static QSet isString; - if (isString.isEmpty()) { - isString << "QScriptValue(\"NaN\")" - << "QScriptValue(\"Infinity\")" - << "QScriptValue(\"-Infinity\")" - << "QScriptValue(\"ciao\")" - << "QScriptValue(QString::fromLatin1(\"ciao\"))" - << "QScriptValue(QString(\"\"))" - << "QScriptValue(QString())" - << "QScriptValue(QString(\"0\"))" - << "QScriptValue(QString(\"123\"))" - << "QScriptValue(QString(\"12.4\"))" - << "QScriptValue(0, \"NaN\")" - << "QScriptValue(0, \"Infinity\")" - << "QScriptValue(0, \"-Infinity\")" - << "QScriptValue(0, \"ciao\")" - << "QScriptValue(0, QString::fromLatin1(\"ciao\"))" - << "QScriptValue(0, QString(\"\"))" - << "QScriptValue(0, QString())" - << "QScriptValue(0, QString(\"0\"))" - << "QScriptValue(0, QString(\"123\"))" - << "QScriptValue(0, QString(\"12.3\"))" - << "QScriptValue(engine, \"NaN\")" - << "QScriptValue(engine, \"Infinity\")" - << "QScriptValue(engine, \"-Infinity\")" - << "QScriptValue(engine, \"ciao\")" - << "QScriptValue(engine, QString::fromLatin1(\"ciao\"))" - << "QScriptValue(engine, QString(\"\"))" - << "QScriptValue(engine, QString())" - << "QScriptValue(engine, QString(\"0\"))" - << "QScriptValue(engine, QString(\"123\"))" - << "QScriptValue(engine, QString(\"1.23\"))" - << "engine->evaluate(\"'ciao'\")" - << "engine->evaluate(\"''\")" - << "engine->evaluate(\"'0'\")" - << "engine->evaluate(\"'123'\")" - << "engine->evaluate(\"'12.4'\")" - ; - } - newRow(expr) << isString.contains(expr); -} - -void tst_QScriptValue::isString_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isString(), expected); - QCOMPARE(value.isString(), expected); -} - -DEFINE_TEST_FUNCTION(isString) - - -void tst_QScriptValue::isUndefined_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isUndefined_makeData(const char* expr) -{ - static QSet isUndefined; - if (isUndefined.isEmpty()) { - isUndefined << "QScriptValue(QScriptValue::UndefinedValue)" - << "QScriptValue(0, QScriptValue::UndefinedValue)" - << "QScriptValue(engine, QScriptValue::UndefinedValue)" - << "engine->evaluate(\"{}\")" - << "engine->evaluate(\"undefined\")" - << "engine->undefinedValue()" - ; - } - newRow(expr) << isUndefined.contains(expr); -} - -void tst_QScriptValue::isUndefined_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isUndefined(), expected); - QCOMPARE(value.isUndefined(), expected); -} - -DEFINE_TEST_FUNCTION(isUndefined) - - -void tst_QScriptValue::isVariant_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isVariant_makeData(const char* expr) -{ - static QSet isVariant; - if (isVariant.isEmpty()) { - isVariant << "engine->newVariant(QVariant())" - << "engine->newVariant(QVariant(123))" - << "engine->newVariant(QVariant(false))" - ; - } - newRow(expr) << isVariant.contains(expr); -} - -void tst_QScriptValue::isVariant_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isVariant(), expected); - QCOMPARE(value.isVariant(), expected); -} - -DEFINE_TEST_FUNCTION(isVariant) - - -void tst_QScriptValue::isQObject_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isQObject_makeData(const char* expr) -{ - static QSet isQObject; - if (isQObject.isEmpty()) { - isQObject << "engine->newQObject(engine)" - ; - } - newRow(expr) << isQObject.contains(expr); -} - -void tst_QScriptValue::isQObject_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isQObject(), expected); - QCOMPARE(value.isQObject(), expected); -} - -DEFINE_TEST_FUNCTION(isQObject) - - -void tst_QScriptValue::isQMetaObject_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isQMetaObject_makeData(const char* expr) -{ - static QSet isQMetaObject; - if (isQMetaObject.isEmpty()) { - isQMetaObject << "engine->newQMetaObject(&QObject::staticMetaObject)" - ; - } - newRow(expr) << isQMetaObject.contains(expr); -} - -void tst_QScriptValue::isQMetaObject_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isQMetaObject(), expected); - QCOMPARE(value.isQMetaObject(), expected); -} - -DEFINE_TEST_FUNCTION(isQMetaObject) - - -void tst_QScriptValue::isObject_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isObject_makeData(const char* expr) -{ - static QSet isObject; - if (isObject.isEmpty()) { - isObject << "engine->evaluate(\"[]\")" - << "engine->evaluate(\"Object.prototype\")" - << "engine->evaluate(\"Date.prototype\")" - << "engine->evaluate(\"Array.prototype\")" - << "engine->evaluate(\"Function.prototype\")" - << "engine->evaluate(\"Error.prototype\")" - << "engine->evaluate(\"Object\")" - << "engine->evaluate(\"Array\")" - << "engine->evaluate(\"Number\")" - << "engine->evaluate(\"Function\")" - << "engine->evaluate(\"(function() { return 1; })\")" - << "engine->evaluate(\"(function() { return 'ciao'; })\")" - << "engine->evaluate(\"(function() { throw new Error('foo'); })\")" - << "engine->evaluate(\"/foo/\")" - << "engine->evaluate(\"new Object()\")" - << "engine->evaluate(\"new Array()\")" - << "engine->evaluate(\"new Error()\")" - << "engine->evaluate(\"Undefined\")" - << "engine->evaluate(\"Null\")" - << "engine->evaluate(\"True\")" - << "engine->evaluate(\"False\")" - << "engine->newObject()" - << "engine->newArray()" - << "engine->newArray(10)" - << "engine->newDate(QDateTime())" - << "engine->newQMetaObject(&QObject::staticMetaObject)" - << "engine->newVariant(QVariant())" - << "engine->newVariant(QVariant(123))" - << "engine->newVariant(QVariant(false))" - << "engine->newQObject(engine)" - ; - } - newRow(expr) << isObject.contains(expr); -} - -void tst_QScriptValue::isObject_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isObject(), expected); - QCOMPARE(value.isObject(), expected); -} - -DEFINE_TEST_FUNCTION(isObject) - - -void tst_QScriptValue::isDate_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isDate_makeData(const char* expr) -{ - static QSet isDate; - if (isDate.isEmpty()) { - isDate << "engine->evaluate(\"Date.prototype\")" - << "engine->newDate(QDateTime())" - ; - } - newRow(expr) << isDate.contains(expr); -} - -void tst_QScriptValue::isDate_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isDate(), expected); - QCOMPARE(value.isDate(), expected); -} - -DEFINE_TEST_FUNCTION(isDate) - - -void tst_QScriptValue::isRegExp_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isRegExp_makeData(const char* expr) -{ - static QSet isRegExp; - if (isRegExp.isEmpty()) { - isRegExp << "engine->evaluate(\"/foo/\")" - ; - } - newRow(expr) << isRegExp.contains(expr); -} - -void tst_QScriptValue::isRegExp_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isRegExp(), expected); - QCOMPARE(value.isRegExp(), expected); -} - -DEFINE_TEST_FUNCTION(isRegExp) - - -void tst_QScriptValue::isArray_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isArray_makeData(const char* expr) -{ - static QSet isArray; - if (isArray.isEmpty()) { - isArray << "engine->evaluate(\"[]\")" - << "engine->evaluate(\"Array.prototype\")" - << "engine->evaluate(\"new Array()\")" - << "engine->newArray()" - << "engine->newArray(10)" - ; - } - newRow(expr) << isArray.contains(expr); -} - -void tst_QScriptValue::isArray_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isArray(), expected); - QCOMPARE(value.isArray(), expected); -} - -DEFINE_TEST_FUNCTION(isArray) - - -void tst_QScriptValue::isError_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::isError_makeData(const char* expr) -{ - static QSet isError; - if (isError.isEmpty()) { - isError << "engine->evaluate(\"Error.prototype\")" - << "engine->evaluate(\"new Error()\")" - << "engine->evaluate(\"Undefined\")" - << "engine->evaluate(\"Null\")" - << "engine->evaluate(\"True\")" - << "engine->evaluate(\"False\")" - ; - } - newRow(expr) << isError.contains(expr); -} - -void tst_QScriptValue::isError_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.isError(), expected); - QCOMPARE(value.isError(), expected); -} - -DEFINE_TEST_FUNCTION(isError) - - - -void tst_QScriptValue::toString_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toString_makeData(const char* expr) -{ - static QHash toString; - if (toString.isEmpty()) { - toString.insert("QScriptValue()", ""); - toString.insert("QScriptValue(QScriptValue::UndefinedValue)", "undefined"); - toString.insert("QScriptValue(QScriptValue::NullValue)", "null"); - toString.insert("QScriptValue(true)", "true"); - toString.insert("QScriptValue(false)", "false"); - toString.insert("QScriptValue(int(122))", "122"); - toString.insert("QScriptValue(uint(124))", "124"); - toString.insert("QScriptValue(0)", "0"); - toString.insert("QScriptValue(0.0)", "0"); - toString.insert("QScriptValue(123.0)", "123"); - toString.insert("QScriptValue(6.37e-8)", "6.37e-8"); - toString.insert("QScriptValue(-6.37e-8)", "-6.37e-8"); - toString.insert("QScriptValue(0x43211234)", "1126240820"); - toString.insert("QScriptValue(0x10000)", "65536"); - toString.insert("QScriptValue(0x10001)", "65537"); - toString.insert("QScriptValue(qSNaN())", "NaN"); - toString.insert("QScriptValue(qQNaN())", "NaN"); - toString.insert("QScriptValue(qInf())", "Infinity"); - toString.insert("QScriptValue(-qInf())", "-Infinity"); - toString.insert("QScriptValue(\"NaN\")", "NaN"); - toString.insert("QScriptValue(\"Infinity\")", "Infinity"); - toString.insert("QScriptValue(\"-Infinity\")", "-Infinity"); - toString.insert("QScriptValue(\"ciao\")", "ciao"); - toString.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", "ciao"); - toString.insert("QScriptValue(QString(\"\"))", ""); - toString.insert("QScriptValue(QString())", ""); - toString.insert("QScriptValue(QString(\"0\"))", "0"); - toString.insert("QScriptValue(QString(\"123\"))", "123"); - toString.insert("QScriptValue(QString(\"12.4\"))", "12.4"); - toString.insert("QScriptValue(0, QScriptValue::UndefinedValue)", "undefined"); - toString.insert("QScriptValue(0, QScriptValue::NullValue)", "null"); - toString.insert("QScriptValue(0, true)", "true"); - toString.insert("QScriptValue(0, false)", "false"); - toString.insert("QScriptValue(0, int(122))", "122"); - toString.insert("QScriptValue(0, uint(124))", "124"); - toString.insert("QScriptValue(0, 0)", "0"); - toString.insert("QScriptValue(0, 0.0)", "0"); - toString.insert("QScriptValue(0, 123.0)", "123"); - toString.insert("QScriptValue(0, 6.37e-8)", "6.37e-8"); - toString.insert("QScriptValue(0, -6.37e-8)", "-6.37e-8"); - toString.insert("QScriptValue(0, 0x43211234)", "1126240820"); - toString.insert("QScriptValue(0, 0x10000)", "65536"); - toString.insert("QScriptValue(0, 0x10001)", "65537"); - toString.insert("QScriptValue(0, qSNaN())", "NaN"); - toString.insert("QScriptValue(0, qQNaN())", "NaN"); - toString.insert("QScriptValue(0, qInf())", "Infinity"); - toString.insert("QScriptValue(0, -qInf())", "-Infinity"); - toString.insert("QScriptValue(0, \"NaN\")", "NaN"); - toString.insert("QScriptValue(0, \"Infinity\")", "Infinity"); - toString.insert("QScriptValue(0, \"-Infinity\")", "-Infinity"); - toString.insert("QScriptValue(0, \"ciao\")", "ciao"); - toString.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", "ciao"); - toString.insert("QScriptValue(0, QString(\"\"))", ""); - toString.insert("QScriptValue(0, QString())", ""); - toString.insert("QScriptValue(0, QString(\"0\"))", "0"); - toString.insert("QScriptValue(0, QString(\"123\"))", "123"); - toString.insert("QScriptValue(0, QString(\"12.3\"))", "12.3"); - toString.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", "undefined"); - toString.insert("QScriptValue(engine, QScriptValue::NullValue)", "null"); - toString.insert("QScriptValue(engine, true)", "true"); - toString.insert("QScriptValue(engine, false)", "false"); - toString.insert("QScriptValue(engine, int(122))", "122"); - toString.insert("QScriptValue(engine, uint(124))", "124"); - toString.insert("QScriptValue(engine, 0)", "0"); - toString.insert("QScriptValue(engine, 0.0)", "0"); - toString.insert("QScriptValue(engine, 123.0)", "123"); - toString.insert("QScriptValue(engine, 6.37e-8)", "6.37e-8"); - toString.insert("QScriptValue(engine, -6.37e-8)", "-6.37e-8"); - toString.insert("QScriptValue(engine, 0x43211234)", "1126240820"); - toString.insert("QScriptValue(engine, 0x10000)", "65536"); - toString.insert("QScriptValue(engine, 0x10001)", "65537"); - toString.insert("QScriptValue(engine, qSNaN())", "NaN"); - toString.insert("QScriptValue(engine, qQNaN())", "NaN"); - toString.insert("QScriptValue(engine, qInf())", "Infinity"); - toString.insert("QScriptValue(engine, -qInf())", "-Infinity"); - toString.insert("QScriptValue(engine, \"NaN\")", "NaN"); - toString.insert("QScriptValue(engine, \"Infinity\")", "Infinity"); - toString.insert("QScriptValue(engine, \"-Infinity\")", "-Infinity"); - toString.insert("QScriptValue(engine, \"ciao\")", "ciao"); - toString.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", "ciao"); - toString.insert("QScriptValue(engine, QString(\"\"))", ""); - toString.insert("QScriptValue(engine, QString())", ""); - toString.insert("QScriptValue(engine, QString(\"0\"))", "0"); - toString.insert("QScriptValue(engine, QString(\"123\"))", "123"); - toString.insert("QScriptValue(engine, QString(\"1.23\"))", "1.23"); - toString.insert("engine->evaluate(\"[]\")", ""); - toString.insert("engine->evaluate(\"{}\")", "undefined"); - toString.insert("engine->evaluate(\"Object.prototype\")", "[object Object]"); - toString.insert("engine->evaluate(\"Date.prototype\")", "Invalid Date"); - toString.insert("engine->evaluate(\"Array.prototype\")", ""); - toString.insert("engine->evaluate(\"Function.prototype\")", "function () {\n [native code]\n}"); - toString.insert("engine->evaluate(\"Error.prototype\")", "Error: Unknown error"); - toString.insert("engine->evaluate(\"Object\")", "function Object() {\n [native code]\n}"); - toString.insert("engine->evaluate(\"Array\")", "function Array() {\n [native code]\n}"); - toString.insert("engine->evaluate(\"Number\")", "function Number() {\n [native code]\n}"); - toString.insert("engine->evaluate(\"Function\")", "function Function() {\n [native code]\n}"); - toString.insert("engine->evaluate(\"(function() { return 1; })\")", "function () { return 1; }"); - toString.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", "function () { return 'ciao'; }"); - toString.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", "function () { throw new Error('foo'); }"); - toString.insert("engine->evaluate(\"/foo/\")", "/foo/"); - toString.insert("engine->evaluate(\"new Object()\")", "[object Object]"); - toString.insert("engine->evaluate(\"new Array()\")", ""); - toString.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error"); - toString.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", "22"); - toString.insert("engine->evaluate(\"Undefined\")", "ReferenceError: Can't find variable: Undefined"); - toString.insert("engine->evaluate(\"Null\")", "ReferenceError: Can't find variable: Null"); - toString.insert("engine->evaluate(\"True\")", "ReferenceError: Can't find variable: True"); - toString.insert("engine->evaluate(\"False\")", "ReferenceError: Can't find variable: False"); - toString.insert("engine->evaluate(\"undefined\")", "undefined"); - toString.insert("engine->evaluate(\"null\")", "null"); - toString.insert("engine->evaluate(\"true\")", "true"); - toString.insert("engine->evaluate(\"false\")", "false"); - toString.insert("engine->evaluate(\"122\")", "122"); - toString.insert("engine->evaluate(\"124\")", "124"); - toString.insert("engine->evaluate(\"0\")", "0"); - toString.insert("engine->evaluate(\"0.0\")", "0"); - toString.insert("engine->evaluate(\"123.0\")", "123"); - toString.insert("engine->evaluate(\"6.37e-8\")", "6.37e-8"); - toString.insert("engine->evaluate(\"-6.37e-8\")", "-6.37e-8"); - toString.insert("engine->evaluate(\"0x43211234\")", "1126240820"); - toString.insert("engine->evaluate(\"0x10000\")", "65536"); - toString.insert("engine->evaluate(\"0x10001\")", "65537"); - toString.insert("engine->evaluate(\"NaN\")", "NaN"); - toString.insert("engine->evaluate(\"Infinity\")", "Infinity"); - toString.insert("engine->evaluate(\"-Infinity\")", "-Infinity"); - toString.insert("engine->evaluate(\"'ciao'\")", "ciao"); - toString.insert("engine->evaluate(\"''\")", ""); - toString.insert("engine->evaluate(\"'0'\")", "0"); - toString.insert("engine->evaluate(\"'123'\")", "123"); - toString.insert("engine->evaluate(\"'12.4'\")", "12.4"); - toString.insert("engine->nullValue()", "null"); - toString.insert("engine->undefinedValue()", "undefined"); - toString.insert("engine->newObject()", "[object Object]"); - toString.insert("engine->newArray()", ""); - toString.insert("engine->newArray(10)", ",,,,,,,,,"); - toString.insert("engine->newDate(QDateTime())", "Invalid Date"); - toString.insert("engine->newQMetaObject(&QObject::staticMetaObject)", "[object QMetaObject]"); - toString.insert("engine->newVariant(QVariant())", "undefined"); - toString.insert("engine->newVariant(QVariant(123))", "123"); - toString.insert("engine->newVariant(QVariant(false))", "false"); - toString.insert("engine->newQObject(0)", "null"); - toString.insert("engine->newQObject(engine)", "QScriptEngine(name = \"\")"); - } - newRow(expr) << toString.value(expr); -} - -void tst_QScriptValue::toString_test(const char*, const QScriptValue& value) -{ - QFETCH(QString, expected); - QCOMPARE(value.toString(), expected); - QCOMPARE(value.toString(), expected); -} - -DEFINE_TEST_FUNCTION(toString) - - -void tst_QScriptValue::toNumber_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toNumber_makeData(const char* expr) -{ - static QHash toNumber; - if (toNumber.isEmpty()) { - toNumber.insert("QScriptValue()", 0); - toNumber.insert("QScriptValue(QScriptValue::UndefinedValue)", qQNaN()); - toNumber.insert("QScriptValue(QScriptValue::NullValue)", 0); - toNumber.insert("QScriptValue(true)", 1); - toNumber.insert("QScriptValue(false)", 0); - toNumber.insert("QScriptValue(int(122))", 122); - toNumber.insert("QScriptValue(uint(124))", 124); - toNumber.insert("QScriptValue(0)", 0); - toNumber.insert("QScriptValue(0.0)", 0); - toNumber.insert("QScriptValue(123.0)", 123); - toNumber.insert("QScriptValue(6.37e-8)", 6.369999999999999e-08); - toNumber.insert("QScriptValue(-6.37e-8)", -6.369999999999999e-08); - toNumber.insert("QScriptValue(0x43211234)", 1126240820); - toNumber.insert("QScriptValue(0x10000)", 65536); - toNumber.insert("QScriptValue(0x10001)", 65537); - toNumber.insert("QScriptValue(qSNaN())", qQNaN()); - toNumber.insert("QScriptValue(qQNaN())", qQNaN()); - toNumber.insert("QScriptValue(qInf())", qInf()); - toNumber.insert("QScriptValue(-qInf())", qInf()); - toNumber.insert("QScriptValue(\"NaN\")", qQNaN()); - toNumber.insert("QScriptValue(\"Infinity\")", qInf()); - toNumber.insert("QScriptValue(\"-Infinity\")", qInf()); - toNumber.insert("QScriptValue(\"ciao\")", qQNaN()); - toNumber.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", qQNaN()); - toNumber.insert("QScriptValue(QString(\"\"))", 0); - toNumber.insert("QScriptValue(QString())", 0); - toNumber.insert("QScriptValue(QString(\"0\"))", 0); - toNumber.insert("QScriptValue(QString(\"123\"))", 123); - toNumber.insert("QScriptValue(QString(\"12.4\"))", 12.4); - toNumber.insert("QScriptValue(0, QScriptValue::UndefinedValue)", qQNaN()); - toNumber.insert("QScriptValue(0, QScriptValue::NullValue)", 0); - toNumber.insert("QScriptValue(0, true)", 1); - toNumber.insert("QScriptValue(0, false)", 0); - toNumber.insert("QScriptValue(0, int(122))", 122); - toNumber.insert("QScriptValue(0, uint(124))", 124); - toNumber.insert("QScriptValue(0, 0)", 0); - toNumber.insert("QScriptValue(0, 0.0)", 0); - toNumber.insert("QScriptValue(0, 123.0)", 123); - toNumber.insert("QScriptValue(0, 6.37e-8)", 6.369999999999999e-08); - toNumber.insert("QScriptValue(0, -6.37e-8)", -6.369999999999999e-08); - toNumber.insert("QScriptValue(0, 0x43211234)", 1126240820); - toNumber.insert("QScriptValue(0, 0x10000)", 65536); - toNumber.insert("QScriptValue(0, 0x10001)", 65537); - toNumber.insert("QScriptValue(0, qSNaN())", qQNaN()); - toNumber.insert("QScriptValue(0, qQNaN())", qQNaN()); - toNumber.insert("QScriptValue(0, qInf())", qInf()); - toNumber.insert("QScriptValue(0, -qInf())", qInf()); - toNumber.insert("QScriptValue(0, \"NaN\")", qQNaN()); - toNumber.insert("QScriptValue(0, \"Infinity\")", qInf()); - toNumber.insert("QScriptValue(0, \"-Infinity\")", qInf()); - toNumber.insert("QScriptValue(0, \"ciao\")", qQNaN()); - toNumber.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", qQNaN()); - toNumber.insert("QScriptValue(0, QString(\"\"))", 0); - toNumber.insert("QScriptValue(0, QString())", 0); - toNumber.insert("QScriptValue(0, QString(\"0\"))", 0); - toNumber.insert("QScriptValue(0, QString(\"123\"))", 123); - toNumber.insert("QScriptValue(0, QString(\"12.3\"))", 12.3); - toNumber.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", qQNaN()); - toNumber.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); - toNumber.insert("QScriptValue(engine, true)", 1); - toNumber.insert("QScriptValue(engine, false)", 0); - toNumber.insert("QScriptValue(engine, int(122))", 122); - toNumber.insert("QScriptValue(engine, uint(124))", 124); - toNumber.insert("QScriptValue(engine, 0)", 0); - toNumber.insert("QScriptValue(engine, 0.0)", 0); - toNumber.insert("QScriptValue(engine, 123.0)", 123); - toNumber.insert("QScriptValue(engine, 6.37e-8)", 6.369999999999999e-08); - toNumber.insert("QScriptValue(engine, -6.37e-8)", -6.369999999999999e-08); - toNumber.insert("QScriptValue(engine, 0x43211234)", 1126240820); - toNumber.insert("QScriptValue(engine, 0x10000)", 65536); - toNumber.insert("QScriptValue(engine, 0x10001)", 65537); - toNumber.insert("QScriptValue(engine, qSNaN())", qQNaN()); - toNumber.insert("QScriptValue(engine, qQNaN())", qQNaN()); - toNumber.insert("QScriptValue(engine, qInf())", qInf()); - toNumber.insert("QScriptValue(engine, -qInf())", qInf()); - toNumber.insert("QScriptValue(engine, \"NaN\")", qQNaN()); - toNumber.insert("QScriptValue(engine, \"Infinity\")", qInf()); - toNumber.insert("QScriptValue(engine, \"-Infinity\")", qInf()); - toNumber.insert("QScriptValue(engine, \"ciao\")", qQNaN()); - toNumber.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", qQNaN()); - toNumber.insert("QScriptValue(engine, QString(\"\"))", 0); - toNumber.insert("QScriptValue(engine, QString())", 0); - toNumber.insert("QScriptValue(engine, QString(\"0\"))", 0); - toNumber.insert("QScriptValue(engine, QString(\"123\"))", 123); - toNumber.insert("QScriptValue(engine, QString(\"1.23\"))", 1.23); - toNumber.insert("engine->evaluate(\"[]\")", 0); - toNumber.insert("engine->evaluate(\"{}\")", qQNaN()); - toNumber.insert("engine->evaluate(\"Object.prototype\")", qQNaN()); - toNumber.insert("engine->evaluate(\"Date.prototype\")", qQNaN()); - toNumber.insert("engine->evaluate(\"Array.prototype\")", 0); - toNumber.insert("engine->evaluate(\"Function.prototype\")", qQNaN()); - toNumber.insert("engine->evaluate(\"Error.prototype\")", qQNaN()); - toNumber.insert("engine->evaluate(\"Object\")", qQNaN()); - toNumber.insert("engine->evaluate(\"Array\")", qQNaN()); - toNumber.insert("engine->evaluate(\"Number\")", qQNaN()); - toNumber.insert("engine->evaluate(\"Function\")", qQNaN()); - toNumber.insert("engine->evaluate(\"(function() { return 1; })\")", qQNaN()); - toNumber.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", qQNaN()); - toNumber.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", qQNaN()); - toNumber.insert("engine->evaluate(\"/foo/\")", qQNaN()); - toNumber.insert("engine->evaluate(\"new Object()\")", qQNaN()); - toNumber.insert("engine->evaluate(\"new Array()\")", 0); - toNumber.insert("engine->evaluate(\"new Error()\")", qQNaN()); - toNumber.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); - toNumber.insert("engine->evaluate(\"Undefined\")", qQNaN()); - toNumber.insert("engine->evaluate(\"Null\")", qQNaN()); - toNumber.insert("engine->evaluate(\"True\")", qQNaN()); - toNumber.insert("engine->evaluate(\"False\")", qQNaN()); - toNumber.insert("engine->evaluate(\"undefined\")", qQNaN()); - toNumber.insert("engine->evaluate(\"null\")", 0); - toNumber.insert("engine->evaluate(\"true\")", 1); - toNumber.insert("engine->evaluate(\"false\")", 0); - toNumber.insert("engine->evaluate(\"122\")", 122); - toNumber.insert("engine->evaluate(\"124\")", 124); - toNumber.insert("engine->evaluate(\"0\")", 0); - toNumber.insert("engine->evaluate(\"0.0\")", 0); - toNumber.insert("engine->evaluate(\"123.0\")", 123); - toNumber.insert("engine->evaluate(\"6.37e-8\")", 6.369999999999999e-08); - toNumber.insert("engine->evaluate(\"-6.37e-8\")", -6.369999999999999e-08); - toNumber.insert("engine->evaluate(\"0x43211234\")", 1126240820); - toNumber.insert("engine->evaluate(\"0x10000\")", 65536); - toNumber.insert("engine->evaluate(\"0x10001\")", 65537); - toNumber.insert("engine->evaluate(\"NaN\")", qQNaN()); - toNumber.insert("engine->evaluate(\"Infinity\")", qInf()); - toNumber.insert("engine->evaluate(\"-Infinity\")", qInf()); - toNumber.insert("engine->evaluate(\"'ciao'\")", qQNaN()); - toNumber.insert("engine->evaluate(\"''\")", 0); - toNumber.insert("engine->evaluate(\"'0'\")", 0); - toNumber.insert("engine->evaluate(\"'123'\")", 123); - toNumber.insert("engine->evaluate(\"'12.4'\")", 12.4); - toNumber.insert("engine->nullValue()", 0); - toNumber.insert("engine->undefinedValue()", qQNaN()); - toNumber.insert("engine->newObject()", qQNaN()); - toNumber.insert("engine->newArray()", 0); - toNumber.insert("engine->newArray(10)", qQNaN()); - toNumber.insert("engine->newDate(QDateTime())", qQNaN()); - toNumber.insert("engine->newQMetaObject(&QObject::staticMetaObject)", qQNaN()); - toNumber.insert("engine->newVariant(QVariant())", qQNaN()); - toNumber.insert("engine->newVariant(QVariant(123))", 123); - toNumber.insert("engine->newVariant(QVariant(false))", 0); - toNumber.insert("engine->newQObject(0)", 0); - toNumber.insert("engine->newQObject(engine)", qQNaN()); - } - newRow(expr) << toNumber.value(expr); -} - -void tst_QScriptValue::toNumber_test(const char*, const QScriptValue& value) -{ - QFETCH(qsreal, expected); - if (qIsNaN(expected)) { - QVERIFY(qIsNaN(value.toNumber())); - return; - } - if (qIsInf(expected)) { - QVERIFY(qIsInf(value.toNumber())); - QVERIFY(qIsInf(value.toNumber())); - return; - } - QCOMPARE(value.toNumber(), expected); - QCOMPARE(value.toNumber(), expected); -} - -DEFINE_TEST_FUNCTION(toNumber) - - -void tst_QScriptValue::toBool_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toBool_makeData(const char* expr) -{ - static QHash toBool; - if (toBool.isEmpty()) { - toBool.insert("QScriptValue()", false); - toBool.insert("QScriptValue(QScriptValue::UndefinedValue)", false); - toBool.insert("QScriptValue(QScriptValue::NullValue)", false); - toBool.insert("QScriptValue(true)", true); - toBool.insert("QScriptValue(false)", false); - toBool.insert("QScriptValue(int(122))", true); - toBool.insert("QScriptValue(uint(124))", true); - toBool.insert("QScriptValue(0)", false); - toBool.insert("QScriptValue(0.0)", false); - toBool.insert("QScriptValue(123.0)", true); - toBool.insert("QScriptValue(6.37e-8)", true); - toBool.insert("QScriptValue(-6.37e-8)", true); - toBool.insert("QScriptValue(0x43211234)", true); - toBool.insert("QScriptValue(0x10000)", true); - toBool.insert("QScriptValue(0x10001)", true); - toBool.insert("QScriptValue(qSNaN())", false); - toBool.insert("QScriptValue(qQNaN())", false); - toBool.insert("QScriptValue(qInf())", true); - toBool.insert("QScriptValue(-qInf())", true); - toBool.insert("QScriptValue(\"NaN\")", true); - toBool.insert("QScriptValue(\"Infinity\")", true); - toBool.insert("QScriptValue(\"-Infinity\")", true); - toBool.insert("QScriptValue(\"ciao\")", true); - toBool.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true); - toBool.insert("QScriptValue(QString(\"\"))", false); - toBool.insert("QScriptValue(QString())", false); - toBool.insert("QScriptValue(QString(\"0\"))", true); - toBool.insert("QScriptValue(QString(\"123\"))", true); - toBool.insert("QScriptValue(QString(\"12.4\"))", true); - toBool.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false); - toBool.insert("QScriptValue(0, QScriptValue::NullValue)", false); - toBool.insert("QScriptValue(0, true)", true); - toBool.insert("QScriptValue(0, false)", false); - toBool.insert("QScriptValue(0, int(122))", true); - toBool.insert("QScriptValue(0, uint(124))", true); - toBool.insert("QScriptValue(0, 0)", false); - toBool.insert("QScriptValue(0, 0.0)", false); - toBool.insert("QScriptValue(0, 123.0)", true); - toBool.insert("QScriptValue(0, 6.37e-8)", true); - toBool.insert("QScriptValue(0, -6.37e-8)", true); - toBool.insert("QScriptValue(0, 0x43211234)", true); - toBool.insert("QScriptValue(0, 0x10000)", true); - toBool.insert("QScriptValue(0, 0x10001)", true); - toBool.insert("QScriptValue(0, qSNaN())", false); - toBool.insert("QScriptValue(0, qQNaN())", false); - toBool.insert("QScriptValue(0, qInf())", true); - toBool.insert("QScriptValue(0, -qInf())", true); - toBool.insert("QScriptValue(0, \"NaN\")", true); - toBool.insert("QScriptValue(0, \"Infinity\")", true); - toBool.insert("QScriptValue(0, \"-Infinity\")", true); - toBool.insert("QScriptValue(0, \"ciao\")", true); - toBool.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true); - toBool.insert("QScriptValue(0, QString(\"\"))", false); - toBool.insert("QScriptValue(0, QString())", false); - toBool.insert("QScriptValue(0, QString(\"0\"))", true); - toBool.insert("QScriptValue(0, QString(\"123\"))", true); - toBool.insert("QScriptValue(0, QString(\"12.3\"))", true); - toBool.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false); - toBool.insert("QScriptValue(engine, QScriptValue::NullValue)", false); - toBool.insert("QScriptValue(engine, true)", true); - toBool.insert("QScriptValue(engine, false)", false); - toBool.insert("QScriptValue(engine, int(122))", true); - toBool.insert("QScriptValue(engine, uint(124))", true); - toBool.insert("QScriptValue(engine, 0)", false); - toBool.insert("QScriptValue(engine, 0.0)", false); - toBool.insert("QScriptValue(engine, 123.0)", true); - toBool.insert("QScriptValue(engine, 6.37e-8)", true); - toBool.insert("QScriptValue(engine, -6.37e-8)", true); - toBool.insert("QScriptValue(engine, 0x43211234)", true); - toBool.insert("QScriptValue(engine, 0x10000)", true); - toBool.insert("QScriptValue(engine, 0x10001)", true); - toBool.insert("QScriptValue(engine, qSNaN())", false); - toBool.insert("QScriptValue(engine, qQNaN())", false); - toBool.insert("QScriptValue(engine, qInf())", true); - toBool.insert("QScriptValue(engine, -qInf())", true); - toBool.insert("QScriptValue(engine, \"NaN\")", true); - toBool.insert("QScriptValue(engine, \"Infinity\")", true); - toBool.insert("QScriptValue(engine, \"-Infinity\")", true); - toBool.insert("QScriptValue(engine, \"ciao\")", true); - toBool.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true); - toBool.insert("QScriptValue(engine, QString(\"\"))", false); - toBool.insert("QScriptValue(engine, QString())", false); - toBool.insert("QScriptValue(engine, QString(\"0\"))", true); - toBool.insert("QScriptValue(engine, QString(\"123\"))", true); - toBool.insert("QScriptValue(engine, QString(\"1.23\"))", true); - toBool.insert("engine->evaluate(\"[]\")", true); - toBool.insert("engine->evaluate(\"{}\")", false); - toBool.insert("engine->evaluate(\"Object.prototype\")", true); - toBool.insert("engine->evaluate(\"Date.prototype\")", true); - toBool.insert("engine->evaluate(\"Array.prototype\")", true); - toBool.insert("engine->evaluate(\"Function.prototype\")", true); - toBool.insert("engine->evaluate(\"Error.prototype\")", true); - toBool.insert("engine->evaluate(\"Object\")", true); - toBool.insert("engine->evaluate(\"Array\")", true); - toBool.insert("engine->evaluate(\"Number\")", true); - toBool.insert("engine->evaluate(\"Function\")", true); - toBool.insert("engine->evaluate(\"(function() { return 1; })\")", true); - toBool.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true); - toBool.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true); - toBool.insert("engine->evaluate(\"/foo/\")", true); - toBool.insert("engine->evaluate(\"new Object()\")", true); - toBool.insert("engine->evaluate(\"new Array()\")", true); - toBool.insert("engine->evaluate(\"new Error()\")", true); - toBool.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", true); - toBool.insert("engine->evaluate(\"Undefined\")", true); - toBool.insert("engine->evaluate(\"Null\")", true); - toBool.insert("engine->evaluate(\"True\")", true); - toBool.insert("engine->evaluate(\"False\")", true); - toBool.insert("engine->evaluate(\"undefined\")", false); - toBool.insert("engine->evaluate(\"null\")", false); - toBool.insert("engine->evaluate(\"true\")", true); - toBool.insert("engine->evaluate(\"false\")", false); - toBool.insert("engine->evaluate(\"122\")", true); - toBool.insert("engine->evaluate(\"124\")", true); - toBool.insert("engine->evaluate(\"0\")", false); - toBool.insert("engine->evaluate(\"0.0\")", false); - toBool.insert("engine->evaluate(\"123.0\")", true); - toBool.insert("engine->evaluate(\"6.37e-8\")", true); - toBool.insert("engine->evaluate(\"-6.37e-8\")", true); - toBool.insert("engine->evaluate(\"0x43211234\")", true); - toBool.insert("engine->evaluate(\"0x10000\")", true); - toBool.insert("engine->evaluate(\"0x10001\")", true); - toBool.insert("engine->evaluate(\"NaN\")", false); - toBool.insert("engine->evaluate(\"Infinity\")", true); - toBool.insert("engine->evaluate(\"-Infinity\")", true); - toBool.insert("engine->evaluate(\"'ciao'\")", true); - toBool.insert("engine->evaluate(\"''\")", false); - toBool.insert("engine->evaluate(\"'0'\")", true); - toBool.insert("engine->evaluate(\"'123'\")", true); - toBool.insert("engine->evaluate(\"'12.4'\")", true); - toBool.insert("engine->nullValue()", false); - toBool.insert("engine->undefinedValue()", false); - toBool.insert("engine->newObject()", true); - toBool.insert("engine->newArray()", true); - toBool.insert("engine->newArray(10)", true); - toBool.insert("engine->newDate(QDateTime())", true); - toBool.insert("engine->newQMetaObject(&QObject::staticMetaObject)", true); - toBool.insert("engine->newVariant(QVariant())", true); - toBool.insert("engine->newVariant(QVariant(123))", true); - toBool.insert("engine->newVariant(QVariant(false))", true); - toBool.insert("engine->newQObject(0)", false); - toBool.insert("engine->newQObject(engine)", true); - } - newRow(expr) << toBool.value(expr); -} - -void tst_QScriptValue::toBool_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.toBool(), expected); - QCOMPARE(value.toBool(), expected); -} - -DEFINE_TEST_FUNCTION(toBool) - - -void tst_QScriptValue::toBoolean_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toBoolean_makeData(const char* expr) -{ - static QHash toBoolean; - if (toBoolean.isEmpty()) { - toBoolean.insert("QScriptValue()", false); - toBoolean.insert("QScriptValue(QScriptValue::UndefinedValue)", false); - toBoolean.insert("QScriptValue(QScriptValue::NullValue)", false); - toBoolean.insert("QScriptValue(true)", true); - toBoolean.insert("QScriptValue(false)", false); - toBoolean.insert("QScriptValue(int(122))", true); - toBoolean.insert("QScriptValue(uint(124))", true); - toBoolean.insert("QScriptValue(0)", false); - toBoolean.insert("QScriptValue(0.0)", false); - toBoolean.insert("QScriptValue(123.0)", true); - toBoolean.insert("QScriptValue(6.37e-8)", true); - toBoolean.insert("QScriptValue(-6.37e-8)", true); - toBoolean.insert("QScriptValue(0x43211234)", true); - toBoolean.insert("QScriptValue(0x10000)", true); - toBoolean.insert("QScriptValue(0x10001)", true); - toBoolean.insert("QScriptValue(qSNaN())", false); - toBoolean.insert("QScriptValue(qQNaN())", false); - toBoolean.insert("QScriptValue(qInf())", true); - toBoolean.insert("QScriptValue(-qInf())", true); - toBoolean.insert("QScriptValue(\"NaN\")", true); - toBoolean.insert("QScriptValue(\"Infinity\")", true); - toBoolean.insert("QScriptValue(\"-Infinity\")", true); - toBoolean.insert("QScriptValue(\"ciao\")", true); - toBoolean.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true); - toBoolean.insert("QScriptValue(QString(\"\"))", false); - toBoolean.insert("QScriptValue(QString())", false); - toBoolean.insert("QScriptValue(QString(\"0\"))", true); - toBoolean.insert("QScriptValue(QString(\"123\"))", true); - toBoolean.insert("QScriptValue(QString(\"12.4\"))", true); - toBoolean.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false); - toBoolean.insert("QScriptValue(0, QScriptValue::NullValue)", false); - toBoolean.insert("QScriptValue(0, true)", true); - toBoolean.insert("QScriptValue(0, false)", false); - toBoolean.insert("QScriptValue(0, int(122))", true); - toBoolean.insert("QScriptValue(0, uint(124))", true); - toBoolean.insert("QScriptValue(0, 0)", false); - toBoolean.insert("QScriptValue(0, 0.0)", false); - toBoolean.insert("QScriptValue(0, 123.0)", true); - toBoolean.insert("QScriptValue(0, 6.37e-8)", true); - toBoolean.insert("QScriptValue(0, -6.37e-8)", true); - toBoolean.insert("QScriptValue(0, 0x43211234)", true); - toBoolean.insert("QScriptValue(0, 0x10000)", true); - toBoolean.insert("QScriptValue(0, 0x10001)", true); - toBoolean.insert("QScriptValue(0, qSNaN())", false); - toBoolean.insert("QScriptValue(0, qQNaN())", false); - toBoolean.insert("QScriptValue(0, qInf())", true); - toBoolean.insert("QScriptValue(0, -qInf())", true); - toBoolean.insert("QScriptValue(0, \"NaN\")", true); - toBoolean.insert("QScriptValue(0, \"Infinity\")", true); - toBoolean.insert("QScriptValue(0, \"-Infinity\")", true); - toBoolean.insert("QScriptValue(0, \"ciao\")", true); - toBoolean.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true); - toBoolean.insert("QScriptValue(0, QString(\"\"))", false); - toBoolean.insert("QScriptValue(0, QString())", false); - toBoolean.insert("QScriptValue(0, QString(\"0\"))", true); - toBoolean.insert("QScriptValue(0, QString(\"123\"))", true); - toBoolean.insert("QScriptValue(0, QString(\"12.3\"))", true); - toBoolean.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false); - toBoolean.insert("QScriptValue(engine, QScriptValue::NullValue)", false); - toBoolean.insert("QScriptValue(engine, true)", true); - toBoolean.insert("QScriptValue(engine, false)", false); - toBoolean.insert("QScriptValue(engine, int(122))", true); - toBoolean.insert("QScriptValue(engine, uint(124))", true); - toBoolean.insert("QScriptValue(engine, 0)", false); - toBoolean.insert("QScriptValue(engine, 0.0)", false); - toBoolean.insert("QScriptValue(engine, 123.0)", true); - toBoolean.insert("QScriptValue(engine, 6.37e-8)", true); - toBoolean.insert("QScriptValue(engine, -6.37e-8)", true); - toBoolean.insert("QScriptValue(engine, 0x43211234)", true); - toBoolean.insert("QScriptValue(engine, 0x10000)", true); - toBoolean.insert("QScriptValue(engine, 0x10001)", true); - toBoolean.insert("QScriptValue(engine, qSNaN())", false); - toBoolean.insert("QScriptValue(engine, qQNaN())", false); - toBoolean.insert("QScriptValue(engine, qInf())", true); - toBoolean.insert("QScriptValue(engine, -qInf())", true); - toBoolean.insert("QScriptValue(engine, \"NaN\")", true); - toBoolean.insert("QScriptValue(engine, \"Infinity\")", true); - toBoolean.insert("QScriptValue(engine, \"-Infinity\")", true); - toBoolean.insert("QScriptValue(engine, \"ciao\")", true); - toBoolean.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true); - toBoolean.insert("QScriptValue(engine, QString(\"\"))", false); - toBoolean.insert("QScriptValue(engine, QString())", false); - toBoolean.insert("QScriptValue(engine, QString(\"0\"))", true); - toBoolean.insert("QScriptValue(engine, QString(\"123\"))", true); - toBoolean.insert("QScriptValue(engine, QString(\"1.23\"))", true); - toBoolean.insert("engine->evaluate(\"[]\")", true); - toBoolean.insert("engine->evaluate(\"{}\")", false); - toBoolean.insert("engine->evaluate(\"Object.prototype\")", true); - toBoolean.insert("engine->evaluate(\"Date.prototype\")", true); - toBoolean.insert("engine->evaluate(\"Array.prototype\")", true); - toBoolean.insert("engine->evaluate(\"Function.prototype\")", true); - toBoolean.insert("engine->evaluate(\"Error.prototype\")", true); - toBoolean.insert("engine->evaluate(\"Object\")", true); - toBoolean.insert("engine->evaluate(\"Array\")", true); - toBoolean.insert("engine->evaluate(\"Number\")", true); - toBoolean.insert("engine->evaluate(\"Function\")", true); - toBoolean.insert("engine->evaluate(\"(function() { return 1; })\")", true); - toBoolean.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true); - toBoolean.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true); - toBoolean.insert("engine->evaluate(\"/foo/\")", true); - toBoolean.insert("engine->evaluate(\"new Object()\")", true); - toBoolean.insert("engine->evaluate(\"new Array()\")", true); - toBoolean.insert("engine->evaluate(\"new Error()\")", true); - toBoolean.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", true); - toBoolean.insert("engine->evaluate(\"Undefined\")", true); - toBoolean.insert("engine->evaluate(\"Null\")", true); - toBoolean.insert("engine->evaluate(\"True\")", true); - toBoolean.insert("engine->evaluate(\"False\")", true); - toBoolean.insert("engine->evaluate(\"undefined\")", false); - toBoolean.insert("engine->evaluate(\"null\")", false); - toBoolean.insert("engine->evaluate(\"true\")", true); - toBoolean.insert("engine->evaluate(\"false\")", false); - toBoolean.insert("engine->evaluate(\"122\")", true); - toBoolean.insert("engine->evaluate(\"124\")", true); - toBoolean.insert("engine->evaluate(\"0\")", false); - toBoolean.insert("engine->evaluate(\"0.0\")", false); - toBoolean.insert("engine->evaluate(\"123.0\")", true); - toBoolean.insert("engine->evaluate(\"6.37e-8\")", true); - toBoolean.insert("engine->evaluate(\"-6.37e-8\")", true); - toBoolean.insert("engine->evaluate(\"0x43211234\")", true); - toBoolean.insert("engine->evaluate(\"0x10000\")", true); - toBoolean.insert("engine->evaluate(\"0x10001\")", true); - toBoolean.insert("engine->evaluate(\"NaN\")", false); - toBoolean.insert("engine->evaluate(\"Infinity\")", true); - toBoolean.insert("engine->evaluate(\"-Infinity\")", true); - toBoolean.insert("engine->evaluate(\"'ciao'\")", true); - toBoolean.insert("engine->evaluate(\"''\")", false); - toBoolean.insert("engine->evaluate(\"'0'\")", true); - toBoolean.insert("engine->evaluate(\"'123'\")", true); - toBoolean.insert("engine->evaluate(\"'12.4'\")", true); - toBoolean.insert("engine->nullValue()", false); - toBoolean.insert("engine->undefinedValue()", false); - toBoolean.insert("engine->newObject()", true); - toBoolean.insert("engine->newArray()", true); - toBoolean.insert("engine->newArray(10)", true); - toBoolean.insert("engine->newDate(QDateTime())", true); - toBoolean.insert("engine->newQMetaObject(&QObject::staticMetaObject)", true); - toBoolean.insert("engine->newVariant(QVariant())", true); - toBoolean.insert("engine->newVariant(QVariant(123))", true); - toBoolean.insert("engine->newVariant(QVariant(false))", true); - toBoolean.insert("engine->newQObject(0)", false); - toBoolean.insert("engine->newQObject(engine)", true); - } - newRow(expr) << toBoolean.value(expr); -} - -void tst_QScriptValue::toBoolean_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(value.toBoolean(), expected); - QCOMPARE(value.toBoolean(), expected); -} - -DEFINE_TEST_FUNCTION(toBoolean) - - -void tst_QScriptValue::toInteger_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toInteger_makeData(const char* expr) -{ - static QHash toInteger; - if (toInteger.isEmpty()) { - toInteger.insert("QScriptValue()", 0); - toInteger.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); - toInteger.insert("QScriptValue(QScriptValue::NullValue)", 0); - toInteger.insert("QScriptValue(true)", 1); - toInteger.insert("QScriptValue(false)", 0); - toInteger.insert("QScriptValue(int(122))", 122); - toInteger.insert("QScriptValue(uint(124))", 124); - toInteger.insert("QScriptValue(0)", 0); - toInteger.insert("QScriptValue(0.0)", 0); - toInteger.insert("QScriptValue(123.0)", 123); - toInteger.insert("QScriptValue(6.37e-8)", 0); - toInteger.insert("QScriptValue(-6.37e-8)", 0); - toInteger.insert("QScriptValue(0x43211234)", 1126240820); - toInteger.insert("QScriptValue(0x10000)", 65536); - toInteger.insert("QScriptValue(0x10001)", 65537); - toInteger.insert("QScriptValue(qSNaN())", 0); - toInteger.insert("QScriptValue(qQNaN())", 0); - toInteger.insert("QScriptValue(qInf())", qInf()); - toInteger.insert("QScriptValue(-qInf())", qInf()); - toInteger.insert("QScriptValue(\"NaN\")", 0); - toInteger.insert("QScriptValue(\"Infinity\")", qInf()); - toInteger.insert("QScriptValue(\"-Infinity\")", qInf()); - toInteger.insert("QScriptValue(\"ciao\")", 0); - toInteger.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); - toInteger.insert("QScriptValue(QString(\"\"))", 0); - toInteger.insert("QScriptValue(QString())", 0); - toInteger.insert("QScriptValue(QString(\"0\"))", 0); - toInteger.insert("QScriptValue(QString(\"123\"))", 123); - toInteger.insert("QScriptValue(QString(\"12.4\"))", 12); - toInteger.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); - toInteger.insert("QScriptValue(0, QScriptValue::NullValue)", 0); - toInteger.insert("QScriptValue(0, true)", 1); - toInteger.insert("QScriptValue(0, false)", 0); - toInteger.insert("QScriptValue(0, int(122))", 122); - toInteger.insert("QScriptValue(0, uint(124))", 124); - toInteger.insert("QScriptValue(0, 0)", 0); - toInteger.insert("QScriptValue(0, 0.0)", 0); - toInteger.insert("QScriptValue(0, 123.0)", 123); - toInteger.insert("QScriptValue(0, 6.37e-8)", 0); - toInteger.insert("QScriptValue(0, -6.37e-8)", 0); - toInteger.insert("QScriptValue(0, 0x43211234)", 1126240820); - toInteger.insert("QScriptValue(0, 0x10000)", 65536); - toInteger.insert("QScriptValue(0, 0x10001)", 65537); - toInteger.insert("QScriptValue(0, qSNaN())", 0); - toInteger.insert("QScriptValue(0, qQNaN())", 0); - toInteger.insert("QScriptValue(0, qInf())", qInf()); - toInteger.insert("QScriptValue(0, -qInf())", qInf()); - toInteger.insert("QScriptValue(0, \"NaN\")", 0); - toInteger.insert("QScriptValue(0, \"Infinity\")", qInf()); - toInteger.insert("QScriptValue(0, \"-Infinity\")", qInf()); - toInteger.insert("QScriptValue(0, \"ciao\")", 0); - toInteger.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); - toInteger.insert("QScriptValue(0, QString(\"\"))", 0); - toInteger.insert("QScriptValue(0, QString())", 0); - toInteger.insert("QScriptValue(0, QString(\"0\"))", 0); - toInteger.insert("QScriptValue(0, QString(\"123\"))", 123); - toInteger.insert("QScriptValue(0, QString(\"12.3\"))", 12); - toInteger.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); - toInteger.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); - toInteger.insert("QScriptValue(engine, true)", 1); - toInteger.insert("QScriptValue(engine, false)", 0); - toInteger.insert("QScriptValue(engine, int(122))", 122); - toInteger.insert("QScriptValue(engine, uint(124))", 124); - toInteger.insert("QScriptValue(engine, 0)", 0); - toInteger.insert("QScriptValue(engine, 0.0)", 0); - toInteger.insert("QScriptValue(engine, 123.0)", 123); - toInteger.insert("QScriptValue(engine, 6.37e-8)", 0); - toInteger.insert("QScriptValue(engine, -6.37e-8)", 0); - toInteger.insert("QScriptValue(engine, 0x43211234)", 1126240820); - toInteger.insert("QScriptValue(engine, 0x10000)", 65536); - toInteger.insert("QScriptValue(engine, 0x10001)", 65537); - toInteger.insert("QScriptValue(engine, qSNaN())", 0); - toInteger.insert("QScriptValue(engine, qQNaN())", 0); - toInteger.insert("QScriptValue(engine, qInf())", qInf()); - toInteger.insert("QScriptValue(engine, -qInf())", qInf()); - toInteger.insert("QScriptValue(engine, \"NaN\")", 0); - toInteger.insert("QScriptValue(engine, \"Infinity\")", qInf()); - toInteger.insert("QScriptValue(engine, \"-Infinity\")", qInf()); - toInteger.insert("QScriptValue(engine, \"ciao\")", 0); - toInteger.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); - toInteger.insert("QScriptValue(engine, QString(\"\"))", 0); - toInteger.insert("QScriptValue(engine, QString())", 0); - toInteger.insert("QScriptValue(engine, QString(\"0\"))", 0); - toInteger.insert("QScriptValue(engine, QString(\"123\"))", 123); - toInteger.insert("QScriptValue(engine, QString(\"1.23\"))", 1); - toInteger.insert("engine->evaluate(\"[]\")", 0); - toInteger.insert("engine->evaluate(\"{}\")", 0); - toInteger.insert("engine->evaluate(\"Object.prototype\")", 0); - toInteger.insert("engine->evaluate(\"Date.prototype\")", 0); - toInteger.insert("engine->evaluate(\"Array.prototype\")", 0); - toInteger.insert("engine->evaluate(\"Function.prototype\")", 0); - toInteger.insert("engine->evaluate(\"Error.prototype\")", 0); - toInteger.insert("engine->evaluate(\"Object\")", 0); - toInteger.insert("engine->evaluate(\"Array\")", 0); - toInteger.insert("engine->evaluate(\"Number\")", 0); - toInteger.insert("engine->evaluate(\"Function\")", 0); - toInteger.insert("engine->evaluate(\"(function() { return 1; })\")", 0); - toInteger.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); - toInteger.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); - toInteger.insert("engine->evaluate(\"/foo/\")", 0); - toInteger.insert("engine->evaluate(\"new Object()\")", 0); - toInteger.insert("engine->evaluate(\"new Array()\")", 0); - toInteger.insert("engine->evaluate(\"new Error()\")", 0); - toInteger.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); - toInteger.insert("engine->evaluate(\"Undefined\")", 0); - toInteger.insert("engine->evaluate(\"Null\")", 0); - toInteger.insert("engine->evaluate(\"True\")", 0); - toInteger.insert("engine->evaluate(\"False\")", 0); - toInteger.insert("engine->evaluate(\"undefined\")", 0); - toInteger.insert("engine->evaluate(\"null\")", 0); - toInteger.insert("engine->evaluate(\"true\")", 1); - toInteger.insert("engine->evaluate(\"false\")", 0); - toInteger.insert("engine->evaluate(\"122\")", 122); - toInteger.insert("engine->evaluate(\"124\")", 124); - toInteger.insert("engine->evaluate(\"0\")", 0); - toInteger.insert("engine->evaluate(\"0.0\")", 0); - toInteger.insert("engine->evaluate(\"123.0\")", 123); - toInteger.insert("engine->evaluate(\"6.37e-8\")", 0); - toInteger.insert("engine->evaluate(\"-6.37e-8\")", 0); - toInteger.insert("engine->evaluate(\"0x43211234\")", 1126240820); - toInteger.insert("engine->evaluate(\"0x10000\")", 65536); - toInteger.insert("engine->evaluate(\"0x10001\")", 65537); - toInteger.insert("engine->evaluate(\"NaN\")", 0); - toInteger.insert("engine->evaluate(\"Infinity\")", qInf()); - toInteger.insert("engine->evaluate(\"-Infinity\")", qInf()); - toInteger.insert("engine->evaluate(\"'ciao'\")", 0); - toInteger.insert("engine->evaluate(\"''\")", 0); - toInteger.insert("engine->evaluate(\"'0'\")", 0); - toInteger.insert("engine->evaluate(\"'123'\")", 123); - toInteger.insert("engine->evaluate(\"'12.4'\")", 12); - toInteger.insert("engine->nullValue()", 0); - toInteger.insert("engine->undefinedValue()", 0); - toInteger.insert("engine->newObject()", 0); - toInteger.insert("engine->newArray()", 0); - toInteger.insert("engine->newArray(10)", 0); - toInteger.insert("engine->newDate(QDateTime())", 0); - toInteger.insert("engine->newQMetaObject(&QObject::staticMetaObject)", 0); - toInteger.insert("engine->newVariant(QVariant())", 0); - toInteger.insert("engine->newVariant(QVariant(123))", 123); - toInteger.insert("engine->newVariant(QVariant(false))", 0); - toInteger.insert("engine->newQObject(0)", 0); - toInteger.insert("engine->newQObject(engine)", 0); - } - newRow(expr) << toInteger.value(expr); -} - -void tst_QScriptValue::toInteger_test(const char*, const QScriptValue& value) -{ - QFETCH(qsreal, expected); - if (qIsInf(expected)) { - QVERIFY(qIsInf(value.toInteger())); - QVERIFY(qIsInf(value.toInteger())); - return; - } - QCOMPARE(value.toInteger(), expected); - QCOMPARE(value.toInteger(), expected); -} - -DEFINE_TEST_FUNCTION(toInteger) - - -void tst_QScriptValue::toInt32_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toInt32_makeData(const char* expr) -{ - static QHash toInt32; - if (toInt32.isEmpty()) { - toInt32.insert("QScriptValue()", 0); - toInt32.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); - toInt32.insert("QScriptValue(QScriptValue::NullValue)", 0); - toInt32.insert("QScriptValue(true)", 1); - toInt32.insert("QScriptValue(false)", 0); - toInt32.insert("QScriptValue(int(122))", 122); - toInt32.insert("QScriptValue(uint(124))", 124); - toInt32.insert("QScriptValue(0)", 0); - toInt32.insert("QScriptValue(0.0)", 0); - toInt32.insert("QScriptValue(123.0)", 123); - toInt32.insert("QScriptValue(6.37e-8)", 0); - toInt32.insert("QScriptValue(-6.37e-8)", 0); - toInt32.insert("QScriptValue(0x43211234)", 1126240820); - toInt32.insert("QScriptValue(0x10000)", 65536); - toInt32.insert("QScriptValue(0x10001)", 65537); - toInt32.insert("QScriptValue(qSNaN())", 0); - toInt32.insert("QScriptValue(qQNaN())", 0); - toInt32.insert("QScriptValue(qInf())", 0); - toInt32.insert("QScriptValue(-qInf())", 0); - toInt32.insert("QScriptValue(\"NaN\")", 0); - toInt32.insert("QScriptValue(\"Infinity\")", 0); - toInt32.insert("QScriptValue(\"-Infinity\")", 0); - toInt32.insert("QScriptValue(\"ciao\")", 0); - toInt32.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); - toInt32.insert("QScriptValue(QString(\"\"))", 0); - toInt32.insert("QScriptValue(QString())", 0); - toInt32.insert("QScriptValue(QString(\"0\"))", 0); - toInt32.insert("QScriptValue(QString(\"123\"))", 123); - toInt32.insert("QScriptValue(QString(\"12.4\"))", 12); - toInt32.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); - toInt32.insert("QScriptValue(0, QScriptValue::NullValue)", 0); - toInt32.insert("QScriptValue(0, true)", 1); - toInt32.insert("QScriptValue(0, false)", 0); - toInt32.insert("QScriptValue(0, int(122))", 122); - toInt32.insert("QScriptValue(0, uint(124))", 124); - toInt32.insert("QScriptValue(0, 0)", 0); - toInt32.insert("QScriptValue(0, 0.0)", 0); - toInt32.insert("QScriptValue(0, 123.0)", 123); - toInt32.insert("QScriptValue(0, 6.37e-8)", 0); - toInt32.insert("QScriptValue(0, -6.37e-8)", 0); - toInt32.insert("QScriptValue(0, 0x43211234)", 1126240820); - toInt32.insert("QScriptValue(0, 0x10000)", 65536); - toInt32.insert("QScriptValue(0, 0x10001)", 65537); - toInt32.insert("QScriptValue(0, qSNaN())", 0); - toInt32.insert("QScriptValue(0, qQNaN())", 0); - toInt32.insert("QScriptValue(0, qInf())", 0); - toInt32.insert("QScriptValue(0, -qInf())", 0); - toInt32.insert("QScriptValue(0, \"NaN\")", 0); - toInt32.insert("QScriptValue(0, \"Infinity\")", 0); - toInt32.insert("QScriptValue(0, \"-Infinity\")", 0); - toInt32.insert("QScriptValue(0, \"ciao\")", 0); - toInt32.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); - toInt32.insert("QScriptValue(0, QString(\"\"))", 0); - toInt32.insert("QScriptValue(0, QString())", 0); - toInt32.insert("QScriptValue(0, QString(\"0\"))", 0); - toInt32.insert("QScriptValue(0, QString(\"123\"))", 123); - toInt32.insert("QScriptValue(0, QString(\"12.3\"))", 12); - toInt32.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); - toInt32.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); - toInt32.insert("QScriptValue(engine, true)", 1); - toInt32.insert("QScriptValue(engine, false)", 0); - toInt32.insert("QScriptValue(engine, int(122))", 122); - toInt32.insert("QScriptValue(engine, uint(124))", 124); - toInt32.insert("QScriptValue(engine, 0)", 0); - toInt32.insert("QScriptValue(engine, 0.0)", 0); - toInt32.insert("QScriptValue(engine, 123.0)", 123); - toInt32.insert("QScriptValue(engine, 6.37e-8)", 0); - toInt32.insert("QScriptValue(engine, -6.37e-8)", 0); - toInt32.insert("QScriptValue(engine, 0x43211234)", 1126240820); - toInt32.insert("QScriptValue(engine, 0x10000)", 65536); - toInt32.insert("QScriptValue(engine, 0x10001)", 65537); - toInt32.insert("QScriptValue(engine, qSNaN())", 0); - toInt32.insert("QScriptValue(engine, qQNaN())", 0); - toInt32.insert("QScriptValue(engine, qInf())", 0); - toInt32.insert("QScriptValue(engine, -qInf())", 0); - toInt32.insert("QScriptValue(engine, \"NaN\")", 0); - toInt32.insert("QScriptValue(engine, \"Infinity\")", 0); - toInt32.insert("QScriptValue(engine, \"-Infinity\")", 0); - toInt32.insert("QScriptValue(engine, \"ciao\")", 0); - toInt32.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); - toInt32.insert("QScriptValue(engine, QString(\"\"))", 0); - toInt32.insert("QScriptValue(engine, QString())", 0); - toInt32.insert("QScriptValue(engine, QString(\"0\"))", 0); - toInt32.insert("QScriptValue(engine, QString(\"123\"))", 123); - toInt32.insert("QScriptValue(engine, QString(\"1.23\"))", 1); - toInt32.insert("engine->evaluate(\"[]\")", 0); - toInt32.insert("engine->evaluate(\"{}\")", 0); - toInt32.insert("engine->evaluate(\"Object.prototype\")", 0); - toInt32.insert("engine->evaluate(\"Date.prototype\")", 0); - toInt32.insert("engine->evaluate(\"Array.prototype\")", 0); - toInt32.insert("engine->evaluate(\"Function.prototype\")", 0); - toInt32.insert("engine->evaluate(\"Error.prototype\")", 0); - toInt32.insert("engine->evaluate(\"Object\")", 0); - toInt32.insert("engine->evaluate(\"Array\")", 0); - toInt32.insert("engine->evaluate(\"Number\")", 0); - toInt32.insert("engine->evaluate(\"Function\")", 0); - toInt32.insert("engine->evaluate(\"(function() { return 1; })\")", 0); - toInt32.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); - toInt32.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); - toInt32.insert("engine->evaluate(\"/foo/\")", 0); - toInt32.insert("engine->evaluate(\"new Object()\")", 0); - toInt32.insert("engine->evaluate(\"new Array()\")", 0); - toInt32.insert("engine->evaluate(\"new Error()\")", 0); - toInt32.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); - toInt32.insert("engine->evaluate(\"Undefined\")", 0); - toInt32.insert("engine->evaluate(\"Null\")", 0); - toInt32.insert("engine->evaluate(\"True\")", 0); - toInt32.insert("engine->evaluate(\"False\")", 0); - toInt32.insert("engine->evaluate(\"undefined\")", 0); - toInt32.insert("engine->evaluate(\"null\")", 0); - toInt32.insert("engine->evaluate(\"true\")", 1); - toInt32.insert("engine->evaluate(\"false\")", 0); - toInt32.insert("engine->evaluate(\"122\")", 122); - toInt32.insert("engine->evaluate(\"124\")", 124); - toInt32.insert("engine->evaluate(\"0\")", 0); - toInt32.insert("engine->evaluate(\"0.0\")", 0); - toInt32.insert("engine->evaluate(\"123.0\")", 123); - toInt32.insert("engine->evaluate(\"6.37e-8\")", 0); - toInt32.insert("engine->evaluate(\"-6.37e-8\")", 0); - toInt32.insert("engine->evaluate(\"0x43211234\")", 1126240820); - toInt32.insert("engine->evaluate(\"0x10000\")", 65536); - toInt32.insert("engine->evaluate(\"0x10001\")", 65537); - toInt32.insert("engine->evaluate(\"NaN\")", 0); - toInt32.insert("engine->evaluate(\"Infinity\")", 0); - toInt32.insert("engine->evaluate(\"-Infinity\")", 0); - toInt32.insert("engine->evaluate(\"'ciao'\")", 0); - toInt32.insert("engine->evaluate(\"''\")", 0); - toInt32.insert("engine->evaluate(\"'0'\")", 0); - toInt32.insert("engine->evaluate(\"'123'\")", 123); - toInt32.insert("engine->evaluate(\"'12.4'\")", 12); - toInt32.insert("engine->nullValue()", 0); - toInt32.insert("engine->undefinedValue()", 0); - toInt32.insert("engine->newObject()", 0); - toInt32.insert("engine->newArray()", 0); - toInt32.insert("engine->newArray(10)", 0); - toInt32.insert("engine->newDate(QDateTime())", 0); - toInt32.insert("engine->newQMetaObject(&QObject::staticMetaObject)", 0); - toInt32.insert("engine->newVariant(QVariant())", 0); - toInt32.insert("engine->newVariant(QVariant(123))", 123); - toInt32.insert("engine->newVariant(QVariant(false))", 0); - toInt32.insert("engine->newQObject(0)", 0); - toInt32.insert("engine->newQObject(engine)", 0); - } - newRow(expr) << toInt32.value(expr); -} - -void tst_QScriptValue::toInt32_test(const char*, const QScriptValue& value) -{ - QFETCH(qint32, expected); - QCOMPARE(value.toInt32(), expected); - QCOMPARE(value.toInt32(), expected); -} - -DEFINE_TEST_FUNCTION(toInt32) - - -void tst_QScriptValue::toUInt32_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toUInt32_makeData(const char* expr) -{ - static QHash toUInt32; - if (toUInt32.isEmpty()) { - toUInt32.insert("QScriptValue()", 0); - toUInt32.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); - toUInt32.insert("QScriptValue(QScriptValue::NullValue)", 0); - toUInt32.insert("QScriptValue(true)", 1); - toUInt32.insert("QScriptValue(false)", 0); - toUInt32.insert("QScriptValue(int(122))", 122); - toUInt32.insert("QScriptValue(uint(124))", 124); - toUInt32.insert("QScriptValue(0)", 0); - toUInt32.insert("QScriptValue(0.0)", 0); - toUInt32.insert("QScriptValue(123.0)", 123); - toUInt32.insert("QScriptValue(6.37e-8)", 0); - toUInt32.insert("QScriptValue(-6.37e-8)", 0); - toUInt32.insert("QScriptValue(0x43211234)", 1126240820); - toUInt32.insert("QScriptValue(0x10000)", 65536); - toUInt32.insert("QScriptValue(0x10001)", 65537); - toUInt32.insert("QScriptValue(qSNaN())", 0); - toUInt32.insert("QScriptValue(qQNaN())", 0); - toUInt32.insert("QScriptValue(qInf())", 0); - toUInt32.insert("QScriptValue(-qInf())", 0); - toUInt32.insert("QScriptValue(\"NaN\")", 0); - toUInt32.insert("QScriptValue(\"Infinity\")", 0); - toUInt32.insert("QScriptValue(\"-Infinity\")", 0); - toUInt32.insert("QScriptValue(\"ciao\")", 0); - toUInt32.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); - toUInt32.insert("QScriptValue(QString(\"\"))", 0); - toUInt32.insert("QScriptValue(QString())", 0); - toUInt32.insert("QScriptValue(QString(\"0\"))", 0); - toUInt32.insert("QScriptValue(QString(\"123\"))", 123); - toUInt32.insert("QScriptValue(QString(\"12.4\"))", 12); - toUInt32.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); - toUInt32.insert("QScriptValue(0, QScriptValue::NullValue)", 0); - toUInt32.insert("QScriptValue(0, true)", 1); - toUInt32.insert("QScriptValue(0, false)", 0); - toUInt32.insert("QScriptValue(0, int(122))", 122); - toUInt32.insert("QScriptValue(0, uint(124))", 124); - toUInt32.insert("QScriptValue(0, 0)", 0); - toUInt32.insert("QScriptValue(0, 0.0)", 0); - toUInt32.insert("QScriptValue(0, 123.0)", 123); - toUInt32.insert("QScriptValue(0, 6.37e-8)", 0); - toUInt32.insert("QScriptValue(0, -6.37e-8)", 0); - toUInt32.insert("QScriptValue(0, 0x43211234)", 1126240820); - toUInt32.insert("QScriptValue(0, 0x10000)", 65536); - toUInt32.insert("QScriptValue(0, 0x10001)", 65537); - toUInt32.insert("QScriptValue(0, qSNaN())", 0); - toUInt32.insert("QScriptValue(0, qQNaN())", 0); - toUInt32.insert("QScriptValue(0, qInf())", 0); - toUInt32.insert("QScriptValue(0, -qInf())", 0); - toUInt32.insert("QScriptValue(0, \"NaN\")", 0); - toUInt32.insert("QScriptValue(0, \"Infinity\")", 0); - toUInt32.insert("QScriptValue(0, \"-Infinity\")", 0); - toUInt32.insert("QScriptValue(0, \"ciao\")", 0); - toUInt32.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); - toUInt32.insert("QScriptValue(0, QString(\"\"))", 0); - toUInt32.insert("QScriptValue(0, QString())", 0); - toUInt32.insert("QScriptValue(0, QString(\"0\"))", 0); - toUInt32.insert("QScriptValue(0, QString(\"123\"))", 123); - toUInt32.insert("QScriptValue(0, QString(\"12.3\"))", 12); - toUInt32.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); - toUInt32.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); - toUInt32.insert("QScriptValue(engine, true)", 1); - toUInt32.insert("QScriptValue(engine, false)", 0); - toUInt32.insert("QScriptValue(engine, int(122))", 122); - toUInt32.insert("QScriptValue(engine, uint(124))", 124); - toUInt32.insert("QScriptValue(engine, 0)", 0); - toUInt32.insert("QScriptValue(engine, 0.0)", 0); - toUInt32.insert("QScriptValue(engine, 123.0)", 123); - toUInt32.insert("QScriptValue(engine, 6.37e-8)", 0); - toUInt32.insert("QScriptValue(engine, -6.37e-8)", 0); - toUInt32.insert("QScriptValue(engine, 0x43211234)", 1126240820); - toUInt32.insert("QScriptValue(engine, 0x10000)", 65536); - toUInt32.insert("QScriptValue(engine, 0x10001)", 65537); - toUInt32.insert("QScriptValue(engine, qSNaN())", 0); - toUInt32.insert("QScriptValue(engine, qQNaN())", 0); - toUInt32.insert("QScriptValue(engine, qInf())", 0); - toUInt32.insert("QScriptValue(engine, -qInf())", 0); - toUInt32.insert("QScriptValue(engine, \"NaN\")", 0); - toUInt32.insert("QScriptValue(engine, \"Infinity\")", 0); - toUInt32.insert("QScriptValue(engine, \"-Infinity\")", 0); - toUInt32.insert("QScriptValue(engine, \"ciao\")", 0); - toUInt32.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); - toUInt32.insert("QScriptValue(engine, QString(\"\"))", 0); - toUInt32.insert("QScriptValue(engine, QString())", 0); - toUInt32.insert("QScriptValue(engine, QString(\"0\"))", 0); - toUInt32.insert("QScriptValue(engine, QString(\"123\"))", 123); - toUInt32.insert("QScriptValue(engine, QString(\"1.23\"))", 1); - toUInt32.insert("engine->evaluate(\"[]\")", 0); - toUInt32.insert("engine->evaluate(\"{}\")", 0); - toUInt32.insert("engine->evaluate(\"Object.prototype\")", 0); - toUInt32.insert("engine->evaluate(\"Date.prototype\")", 0); - toUInt32.insert("engine->evaluate(\"Array.prototype\")", 0); - toUInt32.insert("engine->evaluate(\"Function.prototype\")", 0); - toUInt32.insert("engine->evaluate(\"Error.prototype\")", 0); - toUInt32.insert("engine->evaluate(\"Object\")", 0); - toUInt32.insert("engine->evaluate(\"Array\")", 0); - toUInt32.insert("engine->evaluate(\"Number\")", 0); - toUInt32.insert("engine->evaluate(\"Function\")", 0); - toUInt32.insert("engine->evaluate(\"(function() { return 1; })\")", 0); - toUInt32.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); - toUInt32.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); - toUInt32.insert("engine->evaluate(\"/foo/\")", 0); - toUInt32.insert("engine->evaluate(\"new Object()\")", 0); - toUInt32.insert("engine->evaluate(\"new Array()\")", 0); - toUInt32.insert("engine->evaluate(\"new Error()\")", 0); - toUInt32.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); - toUInt32.insert("engine->evaluate(\"Undefined\")", 0); - toUInt32.insert("engine->evaluate(\"Null\")", 0); - toUInt32.insert("engine->evaluate(\"True\")", 0); - toUInt32.insert("engine->evaluate(\"False\")", 0); - toUInt32.insert("engine->evaluate(\"undefined\")", 0); - toUInt32.insert("engine->evaluate(\"null\")", 0); - toUInt32.insert("engine->evaluate(\"true\")", 1); - toUInt32.insert("engine->evaluate(\"false\")", 0); - toUInt32.insert("engine->evaluate(\"122\")", 122); - toUInt32.insert("engine->evaluate(\"124\")", 124); - toUInt32.insert("engine->evaluate(\"0\")", 0); - toUInt32.insert("engine->evaluate(\"0.0\")", 0); - toUInt32.insert("engine->evaluate(\"123.0\")", 123); - toUInt32.insert("engine->evaluate(\"6.37e-8\")", 0); - toUInt32.insert("engine->evaluate(\"-6.37e-8\")", 0); - toUInt32.insert("engine->evaluate(\"0x43211234\")", 1126240820); - toUInt32.insert("engine->evaluate(\"0x10000\")", 65536); - toUInt32.insert("engine->evaluate(\"0x10001\")", 65537); - toUInt32.insert("engine->evaluate(\"NaN\")", 0); - toUInt32.insert("engine->evaluate(\"Infinity\")", 0); - toUInt32.insert("engine->evaluate(\"-Infinity\")", 0); - toUInt32.insert("engine->evaluate(\"'ciao'\")", 0); - toUInt32.insert("engine->evaluate(\"''\")", 0); - toUInt32.insert("engine->evaluate(\"'0'\")", 0); - toUInt32.insert("engine->evaluate(\"'123'\")", 123); - toUInt32.insert("engine->evaluate(\"'12.4'\")", 12); - toUInt32.insert("engine->nullValue()", 0); - toUInt32.insert("engine->undefinedValue()", 0); - toUInt32.insert("engine->newObject()", 0); - toUInt32.insert("engine->newArray()", 0); - toUInt32.insert("engine->newArray(10)", 0); - toUInt32.insert("engine->newDate(QDateTime())", 0); - toUInt32.insert("engine->newQMetaObject(&QObject::staticMetaObject)", 0); - toUInt32.insert("engine->newVariant(QVariant())", 0); - toUInt32.insert("engine->newVariant(QVariant(123))", 123); - toUInt32.insert("engine->newVariant(QVariant(false))", 0); - toUInt32.insert("engine->newQObject(0)", 0); - toUInt32.insert("engine->newQObject(engine)", 0); - } - newRow(expr) << toUInt32.value(expr); -} - -void tst_QScriptValue::toUInt32_test(const char*, const QScriptValue& value) -{ - QFETCH(quint32, expected); - QCOMPARE(value.toUInt32(), expected); - QCOMPARE(value.toUInt32(), expected); -} - -DEFINE_TEST_FUNCTION(toUInt32) - - -void tst_QScriptValue::toUInt16_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::toUInt16_makeData(const char* expr) -{ - static QHash toUInt16; - if (toUInt16.isEmpty()) { - toUInt16.insert("QScriptValue()", 0); - toUInt16.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); - toUInt16.insert("QScriptValue(QScriptValue::NullValue)", 0); - toUInt16.insert("QScriptValue(true)", 1); - toUInt16.insert("QScriptValue(false)", 0); - toUInt16.insert("QScriptValue(int(122))", 122); - toUInt16.insert("QScriptValue(uint(124))", 124); - toUInt16.insert("QScriptValue(0)", 0); - toUInt16.insert("QScriptValue(0.0)", 0); - toUInt16.insert("QScriptValue(123.0)", 123); - toUInt16.insert("QScriptValue(6.37e-8)", 0); - toUInt16.insert("QScriptValue(-6.37e-8)", 0); - toUInt16.insert("QScriptValue(0x43211234)", 4660); - toUInt16.insert("QScriptValue(0x10000)", 0); - toUInt16.insert("QScriptValue(0x10001)", 1); - toUInt16.insert("QScriptValue(qSNaN())", 0); - toUInt16.insert("QScriptValue(qQNaN())", 0); - toUInt16.insert("QScriptValue(qInf())", 0); - toUInt16.insert("QScriptValue(-qInf())", 0); - toUInt16.insert("QScriptValue(\"NaN\")", 0); - toUInt16.insert("QScriptValue(\"Infinity\")", 0); - toUInt16.insert("QScriptValue(\"-Infinity\")", 0); - toUInt16.insert("QScriptValue(\"ciao\")", 0); - toUInt16.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); - toUInt16.insert("QScriptValue(QString(\"\"))", 0); - toUInt16.insert("QScriptValue(QString())", 0); - toUInt16.insert("QScriptValue(QString(\"0\"))", 0); - toUInt16.insert("QScriptValue(QString(\"123\"))", 123); - toUInt16.insert("QScriptValue(QString(\"12.4\"))", 12); - toUInt16.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); - toUInt16.insert("QScriptValue(0, QScriptValue::NullValue)", 0); - toUInt16.insert("QScriptValue(0, true)", 1); - toUInt16.insert("QScriptValue(0, false)", 0); - toUInt16.insert("QScriptValue(0, int(122))", 122); - toUInt16.insert("QScriptValue(0, uint(124))", 124); - toUInt16.insert("QScriptValue(0, 0)", 0); - toUInt16.insert("QScriptValue(0, 0.0)", 0); - toUInt16.insert("QScriptValue(0, 123.0)", 123); - toUInt16.insert("QScriptValue(0, 6.37e-8)", 0); - toUInt16.insert("QScriptValue(0, -6.37e-8)", 0); - toUInt16.insert("QScriptValue(0, 0x43211234)", 4660); - toUInt16.insert("QScriptValue(0, 0x10000)", 0); - toUInt16.insert("QScriptValue(0, 0x10001)", 1); - toUInt16.insert("QScriptValue(0, qSNaN())", 0); - toUInt16.insert("QScriptValue(0, qQNaN())", 0); - toUInt16.insert("QScriptValue(0, qInf())", 0); - toUInt16.insert("QScriptValue(0, -qInf())", 0); - toUInt16.insert("QScriptValue(0, \"NaN\")", 0); - toUInt16.insert("QScriptValue(0, \"Infinity\")", 0); - toUInt16.insert("QScriptValue(0, \"-Infinity\")", 0); - toUInt16.insert("QScriptValue(0, \"ciao\")", 0); - toUInt16.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); - toUInt16.insert("QScriptValue(0, QString(\"\"))", 0); - toUInt16.insert("QScriptValue(0, QString())", 0); - toUInt16.insert("QScriptValue(0, QString(\"0\"))", 0); - toUInt16.insert("QScriptValue(0, QString(\"123\"))", 123); - toUInt16.insert("QScriptValue(0, QString(\"12.3\"))", 12); - toUInt16.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); - toUInt16.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); - toUInt16.insert("QScriptValue(engine, true)", 1); - toUInt16.insert("QScriptValue(engine, false)", 0); - toUInt16.insert("QScriptValue(engine, int(122))", 122); - toUInt16.insert("QScriptValue(engine, uint(124))", 124); - toUInt16.insert("QScriptValue(engine, 0)", 0); - toUInt16.insert("QScriptValue(engine, 0.0)", 0); - toUInt16.insert("QScriptValue(engine, 123.0)", 123); - toUInt16.insert("QScriptValue(engine, 6.37e-8)", 0); - toUInt16.insert("QScriptValue(engine, -6.37e-8)", 0); - toUInt16.insert("QScriptValue(engine, 0x43211234)", 4660); - toUInt16.insert("QScriptValue(engine, 0x10000)", 0); - toUInt16.insert("QScriptValue(engine, 0x10001)", 1); - toUInt16.insert("QScriptValue(engine, qSNaN())", 0); - toUInt16.insert("QScriptValue(engine, qQNaN())", 0); - toUInt16.insert("QScriptValue(engine, qInf())", 0); - toUInt16.insert("QScriptValue(engine, -qInf())", 0); - toUInt16.insert("QScriptValue(engine, \"NaN\")", 0); - toUInt16.insert("QScriptValue(engine, \"Infinity\")", 0); - toUInt16.insert("QScriptValue(engine, \"-Infinity\")", 0); - toUInt16.insert("QScriptValue(engine, \"ciao\")", 0); - toUInt16.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); - toUInt16.insert("QScriptValue(engine, QString(\"\"))", 0); - toUInt16.insert("QScriptValue(engine, QString())", 0); - toUInt16.insert("QScriptValue(engine, QString(\"0\"))", 0); - toUInt16.insert("QScriptValue(engine, QString(\"123\"))", 123); - toUInt16.insert("QScriptValue(engine, QString(\"1.23\"))", 1); - toUInt16.insert("engine->evaluate(\"[]\")", 0); - toUInt16.insert("engine->evaluate(\"{}\")", 0); - toUInt16.insert("engine->evaluate(\"Object.prototype\")", 0); - toUInt16.insert("engine->evaluate(\"Date.prototype\")", 0); - toUInt16.insert("engine->evaluate(\"Array.prototype\")", 0); - toUInt16.insert("engine->evaluate(\"Function.prototype\")", 0); - toUInt16.insert("engine->evaluate(\"Error.prototype\")", 0); - toUInt16.insert("engine->evaluate(\"Object\")", 0); - toUInt16.insert("engine->evaluate(\"Array\")", 0); - toUInt16.insert("engine->evaluate(\"Number\")", 0); - toUInt16.insert("engine->evaluate(\"Function\")", 0); - toUInt16.insert("engine->evaluate(\"(function() { return 1; })\")", 0); - toUInt16.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); - toUInt16.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); - toUInt16.insert("engine->evaluate(\"/foo/\")", 0); - toUInt16.insert("engine->evaluate(\"new Object()\")", 0); - toUInt16.insert("engine->evaluate(\"new Array()\")", 0); - toUInt16.insert("engine->evaluate(\"new Error()\")", 0); - toUInt16.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); - toUInt16.insert("engine->evaluate(\"Undefined\")", 0); - toUInt16.insert("engine->evaluate(\"Null\")", 0); - toUInt16.insert("engine->evaluate(\"True\")", 0); - toUInt16.insert("engine->evaluate(\"False\")", 0); - toUInt16.insert("engine->evaluate(\"undefined\")", 0); - toUInt16.insert("engine->evaluate(\"null\")", 0); - toUInt16.insert("engine->evaluate(\"true\")", 1); - toUInt16.insert("engine->evaluate(\"false\")", 0); - toUInt16.insert("engine->evaluate(\"122\")", 122); - toUInt16.insert("engine->evaluate(\"124\")", 124); - toUInt16.insert("engine->evaluate(\"0\")", 0); - toUInt16.insert("engine->evaluate(\"0.0\")", 0); - toUInt16.insert("engine->evaluate(\"123.0\")", 123); - toUInt16.insert("engine->evaluate(\"6.37e-8\")", 0); - toUInt16.insert("engine->evaluate(\"-6.37e-8\")", 0); - toUInt16.insert("engine->evaluate(\"0x43211234\")", 4660); - toUInt16.insert("engine->evaluate(\"0x10000\")", 0); - toUInt16.insert("engine->evaluate(\"0x10001\")", 1); - toUInt16.insert("engine->evaluate(\"NaN\")", 0); - toUInt16.insert("engine->evaluate(\"Infinity\")", 0); - toUInt16.insert("engine->evaluate(\"-Infinity\")", 0); - toUInt16.insert("engine->evaluate(\"'ciao'\")", 0); - toUInt16.insert("engine->evaluate(\"''\")", 0); - toUInt16.insert("engine->evaluate(\"'0'\")", 0); - toUInt16.insert("engine->evaluate(\"'123'\")", 123); - toUInt16.insert("engine->evaluate(\"'12.4'\")", 12); - toUInt16.insert("engine->nullValue()", 0); - toUInt16.insert("engine->undefinedValue()", 0); - toUInt16.insert("engine->newObject()", 0); - toUInt16.insert("engine->newArray()", 0); - toUInt16.insert("engine->newArray(10)", 0); - toUInt16.insert("engine->newDate(QDateTime())", 0); - toUInt16.insert("engine->newQMetaObject(&QObject::staticMetaObject)", 0); - toUInt16.insert("engine->newVariant(QVariant())", 0); - toUInt16.insert("engine->newVariant(QVariant(123))", 123); - toUInt16.insert("engine->newVariant(QVariant(false))", 0); - toUInt16.insert("engine->newQObject(0)", 0); - toUInt16.insert("engine->newQObject(engine)", 0); - } - newRow(expr) << toUInt16.value(expr); -} - -void tst_QScriptValue::toUInt16_test(const char*, const QScriptValue& value) -{ - QFETCH(quint16, expected); - QCOMPARE(value.toUInt16(), expected); - QCOMPARE(value.toUInt16(), expected); -} - -DEFINE_TEST_FUNCTION(toUInt16) - - -void tst_QScriptValue::equals_initData() -{ - QTest::addColumn("other"); - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::equals_makeData(const char *expr) -{ - static QSet equals; - if (equals.isEmpty()) { - equals.insert("QScriptValue() <=> QScriptValue()"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->nullValue()"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"{}\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"undefined\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->undefinedValue()"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(true) <=> QScriptValue(true)"); - equals.insert("QScriptValue(true) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(true) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(false) <=> QScriptValue(false)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(false) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(false) <=> engine->newArray()"); - equals.insert("QScriptValue(false) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(uint(124)) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0) <=> QScriptValue(false)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(0) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(0) <=> engine->newArray()"); - equals.insert("QScriptValue(0) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(false)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(0.0) <=> engine->newArray()"); - equals.insert("QScriptValue(0.0) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(123.0) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0x43211234) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0x10000) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0x10001) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(qInf()) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(qInf()) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(qInf()) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-qInf())"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"-Infinity\")"); - equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(-qInf())"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, -qInf())"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -qInf())"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"-Infinity\")"); - equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(false)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->newArray()"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(false)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(QString()) <=> engine->newArray()"); - equals.insert("QScriptValue(QString()) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(false)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->nullValue()"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"undefined\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->undefinedValue()"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(false)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(0, false) <=> engine->newArray()"); - equals.insert("QScriptValue(0, false) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, uint(124)) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(false)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(0, 0) <=> engine->newArray()"); - equals.insert("QScriptValue(0, 0) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(false)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->newArray()"); - equals.insert("QScriptValue(0, 0.0) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, 123.0) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, 0x43211234) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, 0x10001) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, qInf()) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"-Infinity\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(-qInf())"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -qInf())"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -qInf())"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"-Infinity\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(false)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->newArray()"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(false)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->newArray()"); - equals.insert("QScriptValue(0, QString()) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(false)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->nullValue()"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"undefined\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->undefinedValue()"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(false)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(engine, false) <=> engine->newArray()"); - equals.insert("QScriptValue(engine, false) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, uint(124)) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(false)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->newArray()"); - equals.insert("QScriptValue(engine, 0) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(false)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->newArray()"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, 123.0) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, 0x43211234) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, 0x10001) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, qInf()) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"-Infinity\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-qInf())"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -qInf())"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -qInf())"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"-Infinity\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(false)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->newArray()"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(false)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->newArray()"); - equals.insert("QScriptValue(engine, QString()) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(false)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(false)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0.0)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString())"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, false)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0.0)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString())"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, false)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString())"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"false\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"0\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"''\")"); - equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")"); - equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"undefined\")"); - equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"null\")"); - equals.insert("engine->evaluate(\"{}\") <=> engine->nullValue()"); - equals.insert("engine->evaluate(\"{}\") <=> engine->undefinedValue()"); - equals.insert("engine->evaluate(\"{}\") <=> engine->newQObject(0)"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(false)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0.0)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString())"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, false)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0.0)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString())"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, false)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString())"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"false\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"''\")"); - equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(false)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0.0)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString())"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, false)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0.0)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString())"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, false)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString())"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"false\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"''\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Null\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"False\")"); - equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"undefined\") <=> engine->evaluate(\"{}\")"); - equals.insert("engine->evaluate(\"undefined\") <=> engine->evaluate(\"undefined\")"); - equals.insert("engine->evaluate(\"undefined\") <=> engine->evaluate(\"null\")"); - equals.insert("engine->evaluate(\"undefined\") <=> engine->nullValue()"); - equals.insert("engine->evaluate(\"undefined\") <=> engine->undefinedValue()"); - equals.insert("engine->evaluate(\"undefined\") <=> engine->newQObject(0)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"{}\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"undefined\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"null\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->nullValue()"); - equals.insert("engine->evaluate(\"null\") <=> engine->undefinedValue()"); - equals.insert("engine->evaluate(\"null\") <=> engine->newQObject(0)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(false)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0.0)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(QString(\"\"))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(QString())"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, false)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 0)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 0.0)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"\"))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, QString())"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, false)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 0)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, QString())"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"[]\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"new Array()\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"false\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"0\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"''\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->newArray()"); - equals.insert("engine->evaluate(\"false\") <=> engine->newVariant(QVariant(false))"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"124\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(false)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0.0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(QString(\"\"))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(QString())"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, false)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0.0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"\"))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, QString())"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, false)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, QString())"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"[]\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"new Array()\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"false\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"''\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->newArray()"); - equals.insert("engine->evaluate(\"0\") <=> engine->newVariant(QVariant(false))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(false)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0.0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"\"))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(QString())"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, false)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0.0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"\"))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, QString())"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, false)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString())"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"[]\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"new Array()\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"false\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"''\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->newArray()"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->newVariant(QVariant(false))"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"123.0\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(6.37e-8)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(-6.37e-8)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, -6.37e-8)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"0x43211234\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"0x10001\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"Infinity\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(-qInf())"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(\"-Infinity\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, -qInf())"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, -qInf())"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"-Infinity\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(false)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0.0)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString(\"\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString())"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, false)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 0)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 0.0)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString())"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, false)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 0)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString())"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"[]\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"new Array()\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"false\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"0\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"''\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->newArray()"); - equals.insert("engine->evaluate(\"''\") <=> engine->newVariant(QVariant(false))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(false)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0.0)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, false)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 0)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 0.0)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, false)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"false\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"0\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->newVariant(QVariant(false))"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"{}\")"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"undefined\")"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"null\")"); - equals.insert("engine->nullValue() <=> engine->nullValue()"); - equals.insert("engine->nullValue() <=> engine->undefinedValue()"); - equals.insert("engine->nullValue() <=> engine->newQObject(0)"); - equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("engine->undefinedValue() <=> engine->evaluate(\"{}\")"); - equals.insert("engine->undefinedValue() <=> engine->evaluate(\"undefined\")"); - equals.insert("engine->undefinedValue() <=> engine->evaluate(\"null\")"); - equals.insert("engine->undefinedValue() <=> engine->nullValue()"); - equals.insert("engine->undefinedValue() <=> engine->undefinedValue()"); - equals.insert("engine->undefinedValue() <=> engine->newQObject(0)"); - equals.insert("engine->newObject() <=> engine->newObject()"); - equals.insert("engine->newArray() <=> QScriptValue(false)"); - equals.insert("engine->newArray() <=> QScriptValue(0)"); - equals.insert("engine->newArray() <=> QScriptValue(0.0)"); - equals.insert("engine->newArray() <=> QScriptValue(QString(\"\"))"); - equals.insert("engine->newArray() <=> QScriptValue(QString())"); - equals.insert("engine->newArray() <=> QScriptValue(0, false)"); - equals.insert("engine->newArray() <=> QScriptValue(0, 0)"); - equals.insert("engine->newArray() <=> QScriptValue(0, 0.0)"); - equals.insert("engine->newArray() <=> QScriptValue(0, QString(\"\"))"); - equals.insert("engine->newArray() <=> QScriptValue(0, QString())"); - equals.insert("engine->newArray() <=> QScriptValue(engine, false)"); - equals.insert("engine->newArray() <=> QScriptValue(engine, 0)"); - equals.insert("engine->newArray() <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->newArray() <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("engine->newArray() <=> QScriptValue(engine, QString())"); - equals.insert("engine->newArray() <=> engine->evaluate(\"false\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"0\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"''\")"); - equals.insert("engine->newArray() <=> engine->newArray()"); - equals.insert("engine->newArray(10) <=> engine->newArray(10)"); - equals.insert("engine->newDate(QDateTime()) <=> engine->newDate(QDateTime())"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->newVariant(QVariant()) <=> engine->newVariant(QVariant())"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(123.0)"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(0, 123.0)"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->newVariant(QVariant(123)) <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->newVariant(QVariant(123)) <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->newVariant(QVariant(123)) <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(false)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0.0)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(QString(\"\"))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(QString())"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, false)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0.0)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString())"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, false)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString())"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"false\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"''\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->newVariant(QVariant(false))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"{}\")"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"undefined\")"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"null\")"); - equals.insert("engine->newQObject(0) <=> engine->nullValue()"); - equals.insert("engine->newQObject(0) <=> engine->undefinedValue()"); - equals.insert("engine->newQObject(0) <=> engine->newQObject(0)"); - equals.insert("engine->newQObject(engine) <=> engine->newQObject(engine)"); - } - QHash::const_iterator it; - for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { - QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); - newRow(tag.toLatin1()) << it.value() << equals.contains(tag); - } -} - -void tst_QScriptValue::equals_test(const char *, const QScriptValue& value) -{ - QFETCH(QScriptValue, other); - QFETCH(bool, expected); - QCOMPARE(value.equals(other), expected); -} - -DEFINE_TEST_FUNCTION(equals) - - -void tst_QScriptValue::strictlyEquals_initData() -{ - QTest::addColumn("other"); - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::strictlyEquals_makeData(const char *expr) -{ - static QSet equals; - if (equals.isEmpty()) { - equals.insert("QScriptValue() <=> QScriptValue()"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")"); - equals.insert("QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(true) <=> QScriptValue(true)"); - equals.insert("QScriptValue(true) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(true) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(true) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(false) <=> QScriptValue(false)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(uint(124)) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0x43211234) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0x10000) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0x10001) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(qInf()) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(qInf()) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(qInf()) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(qInf()) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-qInf())"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"-Infinity\")"); - equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")"); - equals.insert("QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(false)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, uint(124)) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, 0x43211234) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, 0x10001) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, qInf()) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"-Infinity\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")"); - equals.insert("QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(true)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(false)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, uint(124)) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, 0x43211234) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, 0x10001) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, qInf()) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"-Infinity\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")"); - equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")"); - equals.insert("engine->evaluate(\"{}\") <=> engine->evaluate(\"undefined\")"); - equals.insert("engine->evaluate(\"{}\") <=> engine->undefinedValue()"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Null\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"False\")"); - equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"undefined\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("engine->evaluate(\"undefined\") <=> engine->evaluate(\"{}\")"); - equals.insert("engine->evaluate(\"undefined\") <=> engine->evaluate(\"undefined\")"); - equals.insert("engine->evaluate(\"undefined\") <=> engine->undefinedValue()"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"null\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->nullValue()"); - equals.insert("engine->evaluate(\"null\") <=> engine->newQObject(0)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(false)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, false)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, false)"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"false\")"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"124\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0.0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0.0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0.0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0.0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(6.37e-8)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(-6.37e-8)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, -6.37e-8)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"0x43211234\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"0x10001\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"Infinity\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"Infinity\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(-qInf())"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, -qInf())"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, -qInf())"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"-Infinity\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString(\"\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString())"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString())"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString())"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"''\")"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"null\")"); - equals.insert("engine->nullValue() <=> engine->nullValue()"); - equals.insert("engine->nullValue() <=> engine->newQObject(0)"); - equals.insert("engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)"); - equals.insert("engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)"); - equals.insert("engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)"); - equals.insert("engine->undefinedValue() <=> engine->evaluate(\"{}\")"); - equals.insert("engine->undefinedValue() <=> engine->evaluate(\"undefined\")"); - equals.insert("engine->undefinedValue() <=> engine->undefinedValue()"); - equals.insert("engine->newObject() <=> engine->newObject()"); - equals.insert("engine->newArray() <=> engine->newArray()"); - equals.insert("engine->newArray(10) <=> engine->newArray(10)"); - equals.insert("engine->newDate(QDateTime()) <=> engine->newDate(QDateTime())"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->newVariant(QVariant()) <=> engine->newVariant(QVariant())"); - equals.insert("engine->newVariant(QVariant(123)) <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->newVariant(QVariant(false))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"null\")"); - equals.insert("engine->newQObject(0) <=> engine->nullValue()"); - equals.insert("engine->newQObject(0) <=> engine->newQObject(0)"); - equals.insert("engine->newQObject(engine) <=> engine->newQObject(engine)"); - } - QHash::const_iterator it; - for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { - QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); - newRow(tag.toLatin1()) << it.value() << equals.contains(tag); - } -} - -void tst_QScriptValue::strictlyEquals_test(const char *, const QScriptValue& value) -{ - QFETCH(QScriptValue, other); - QFETCH(bool, expected); - QCOMPARE(value.strictlyEquals(other), expected); -} - -DEFINE_TEST_FUNCTION(strictlyEquals) - - -void tst_QScriptValue::lessThan_initData() -{ - QTest::addColumn("other"); - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::lessThan_makeData(const char *expr) -{ - static QSet equals; - if (equals.isEmpty()) { - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(true)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(QScriptValue::NullValue) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(true) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(true) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(true) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(true) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(true) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(true) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(true) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(true) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(true) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(true) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(true) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(true) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(true) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(true) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(true) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(true) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(true) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(true) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(true) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(true) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(true) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(true) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(true) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(true) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(true) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(true) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(true) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(true) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(true) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(true) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(true) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(true) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(true) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(true) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(true) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(true) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(false) <=> QScriptValue(true)"); - equals.insert("QScriptValue(false) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(false) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(false) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(false) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(false) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(false) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(false) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(false) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(false) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(false) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(false) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(int(122)) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(int(122)) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(int(122)) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(uint(124)) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(uint(124)) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(uint(124)) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(uint(124)) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(uint(124)) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0.0) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0.0) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0.0) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(123.0) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(123.0) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(true)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(6.37e-8) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(6.37e-8) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(true)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(false)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->nullValue()"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->newArray()"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(-6.37e-8) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(0x43211234) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0x43211234) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0x43211234) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0x43211234) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0x43211234) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0x10000) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0x10000) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0x10000) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0x10000) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0x10001) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0x10001) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0x10001) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(true)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(false)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(-6.37e-8)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, -6.37e-8)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(-qInf()) <=> engine->nullValue()"); - equals.insert("QScriptValue(-qInf()) <=> engine->newArray()"); - equals.insert("QScriptValue(-qInf()) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(-qInf()) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(-qInf()) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(\"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(\"NaN\") <=> engine->newObject()"); - equals.insert("QScriptValue(\"NaN\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(\"NaN\") <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(\"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->newObject()"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(\"Infinity\") <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(true)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(false)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(-6.37e-8)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, -6.37e-8)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"/foo/\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->nullValue()"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->newObject()"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->newQObject(0)"); - equals.insert("QScriptValue(\"-Infinity\") <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(true)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"/foo/\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->newObject()"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->newArray(10)"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(QString(\"\")) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(true)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(QString()) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"/foo/\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(QString()) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(QString()) <=> engine->newObject()"); - equals.insert("QScriptValue(QString()) <=> engine->newArray(10)"); - equals.insert("QScriptValue(QString()) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(QString()) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(QString()) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(true)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->newObject()"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(QString(\"0\")) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->newObject()"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(QString(\"123\")) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->newObject()"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(QString(\"12.4\")) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, QScriptValue::NullValue) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, true) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, true) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, true) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, false) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, false) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, false) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, int(122)) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, int(122)) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, int(122)) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, uint(124)) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, uint(124)) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, uint(124)) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, uint(124)) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, uint(124)) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, 0) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, 0) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, 0.0) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, 123.0) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, 123.0) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, 6.37e-8) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(false)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->nullValue()"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->newArray()"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(0, -6.37e-8) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, 0x43211234) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, 0x43211234) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, 0x10000) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, 0x10000) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, 0x10001) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, 0x10001) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, 0x10001) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(false)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(-6.37e-8)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, -6.37e-8)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->nullValue()"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->newArray()"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(0, -qInf()) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->newObject()"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(0, \"NaN\") <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->newObject()"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(0, \"Infinity\") <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(true)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(false)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(-6.37e-8)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"/foo/\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->nullValue()"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->newObject()"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->newQObject(0)"); - equals.insert("QScriptValue(0, \"-Infinity\") <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"/foo/\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->newObject()"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->newArray(10)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, QString(\"\")) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"/foo/\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, QString()) <=> engine->newObject()"); - equals.insert("QScriptValue(0, QString()) <=> engine->newArray(10)"); - equals.insert("QScriptValue(0, QString()) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(0, QString()) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, QString()) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(true)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->newObject()"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, QString(\"0\")) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->newObject()"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(0, QString(\"123\")) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->newObject()"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(0, QString(\"12.3\")) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(true)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(engine, QScriptValue::NullValue) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, true) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(engine, true) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(true)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, false) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(engine, false) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, int(122)) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, int(122)) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, int(122)) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, uint(124)) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, uint(124)) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, uint(124)) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, uint(124)) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, uint(124)) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(true)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(engine, 0) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(true)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(engine, 0.0) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, 123.0) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, 123.0) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(true)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(engine, 6.37e-8) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(true)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(false)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->nullValue()"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->newArray()"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(engine, -6.37e-8) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, 0x43211234) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, 0x10000) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, 0x10000) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, 0x10001) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, 0x10001) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, 0x10001) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(true)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(false)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(-6.37e-8)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"\"))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString())"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, -6.37e-8)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"\"))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString())"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString())"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"[]\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"new Array()\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"''\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->nullValue()"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->newArray()"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(engine, -qInf()) <=> engine->newQObject(0)"); - equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->newObject()"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(engine, \"NaN\") <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->newObject()"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(engine, \"Infinity\") <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(true)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(false)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0.0)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-6.37e-8)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, false)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0.0)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, false)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0.0)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"/foo/\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"null\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"false\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0.0\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->nullValue()"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->newObject()"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->newVariant(QVariant(false))"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->newQObject(0)"); - equals.insert("QScriptValue(engine, \"-Infinity\") <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(true)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"/foo/\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->newObject()"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->newArray(10)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, QString(\"\")) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(true)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"-Infinity\")"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"0\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"/foo/\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"'0'\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(engine, QString()) <=> engine->newObject()"); - equals.insert("QScriptValue(engine, QString()) <=> engine->newArray(10)"); - equals.insert("QScriptValue(engine, QString()) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(engine, QString()) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, QString()) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(true)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(6.37e-8)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, true)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, true)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"true\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->newObject()"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, QString(\"0\")) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->newObject()"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(engine, QString(\"123\")) <=> engine->newQObject(engine)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(int(122))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(uint(124))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(123.0)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x43211234)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10000)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10001)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(qInf())"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"NaN\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"ciao\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, int(122))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, uint(124))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 123.0)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x43211234)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10000)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10001)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, qInf())"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"NaN\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"ciao\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, int(122))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, uint(124))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 123.0)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10000)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10001)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, qInf())"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Array\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Number\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Object()\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Error()\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Undefined\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Null\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"True\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"False\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"122\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"124\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"123.0\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"0x10000\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"0x10001\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Infinity\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"'123'\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->newObject()"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->newVariant(QVariant(123))"); - equals.insert("QScriptValue(engine, QString(\"1.23\")) <=> engine->newQObject(engine)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(6.37e-8)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"NaN\")"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"-Infinity\")"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"/foo/\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"new Error()\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Null\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"False\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"[]\") <=> engine->newArray(10)"); - equals.insert("engine->evaluate(\"[]\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"[]\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"[]\") <=> engine->newQObject(engine)"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"Object.prototype\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(6.37e-8)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"NaN\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"-Infinity\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"/foo/\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Error()\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Null\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"False\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->newArray(10)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->newQObject(engine)"); - equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"NaN\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Null\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"False\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->newQObject(engine)"); - equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"NaN\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Error()\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Null\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"False\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->newQObject(engine)"); - equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(6.37e-8)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"NaN\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"-Infinity\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"/foo/\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Error()\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Null\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"False\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->newArray(10)"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->newQObject(engine)"); - equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"NaN\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Null\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"False\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->newQObject(engine)"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"Undefined\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Undefined\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Undefined\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"Null\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"Null\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Null\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"Null\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Null\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"Null\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"Null\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"True\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"True\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"True\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"True\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"True\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"True\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"True\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"False\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"False\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"False\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"False\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"False\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"False\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Null\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"False\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(6.37e-8)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"null\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"null\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"true\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"true\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"true\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(6.37e-8)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"false\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"122\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"122\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"122\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"124\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"124\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"124\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"124\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"124\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(6.37e-8)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"0\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(6.37e-8)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"0.0\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"123.0\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"123.0\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"6.37e-8\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(false)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0.0)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(6.37e-8)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"\"))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString())"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, false)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0.0)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"\"))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString())"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, false)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString())"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"[]\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"new Array()\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"null\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"false\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"''\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->nullValue()"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->newArray()"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->newVariant(QVariant(false))"); - equals.insert("engine->evaluate(\"-6.37e-8\") <=> engine->newQObject(0)"); - equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"0x43211234\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"0x10000\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"0x10000\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"0x10001\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"0x10001\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"0x10001\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(false)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0.0)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(6.37e-8)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(-6.37e-8)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"\"))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(QString())"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, false)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0.0)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, -6.37e-8)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"\"))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString())"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, false)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0.0)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, -6.37e-8)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"\"))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString())"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"[]\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"Array.prototype\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"new Array()\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"null\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"false\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0.0\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"''\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->nullValue()"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->newArray()"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->newVariant(QVariant(false))"); - equals.insert("engine->evaluate(\"-Infinity\") <=> engine->newQObject(0)"); - equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(6.37e-8)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(\"NaN\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(\"-Infinity\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"/foo/\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"new Error()\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Null\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"False\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"''\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"''\") <=> engine->newArray(10)"); - equals.insert("engine->evaluate(\"''\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"''\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"''\") <=> engine->newQObject(engine)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(true)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(6.37e-8)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(\"NaN\")"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, true)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, true)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"new Error()\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Null\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"False\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"true\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"'0'\") <=> engine->newQObject(engine)"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(\"NaN\")"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"'123'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"new Error()\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Null\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"False\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"'123'\") <=> engine->newQObject(engine)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(int(122))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(uint(124))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(123.0)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0x43211234)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0x10000)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0x10001)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(qInf())"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(\"NaN\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(\"ciao\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, int(122))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, uint(124))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 123.0)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, qInf())"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, \"NaN\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, int(122))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, qInf())"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, \"NaN\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Number\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"new Error()\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Null\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"True\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"False\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"122\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"124\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->newObject()"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->evaluate(\"'12.4'\") <=> engine->newQObject(engine)"); - equals.insert("engine->nullValue() <=> QScriptValue(true)"); - equals.insert("engine->nullValue() <=> QScriptValue(int(122))"); - equals.insert("engine->nullValue() <=> QScriptValue(uint(124))"); - equals.insert("engine->nullValue() <=> QScriptValue(123.0)"); - equals.insert("engine->nullValue() <=> QScriptValue(6.37e-8)"); - equals.insert("engine->nullValue() <=> QScriptValue(0x43211234)"); - equals.insert("engine->nullValue() <=> QScriptValue(0x10000)"); - equals.insert("engine->nullValue() <=> QScriptValue(0x10001)"); - equals.insert("engine->nullValue() <=> QScriptValue(qInf())"); - equals.insert("engine->nullValue() <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->nullValue() <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->nullValue() <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->nullValue() <=> QScriptValue(0, true)"); - equals.insert("engine->nullValue() <=> QScriptValue(0, int(122))"); - equals.insert("engine->nullValue() <=> QScriptValue(0, uint(124))"); - equals.insert("engine->nullValue() <=> QScriptValue(0, 123.0)"); - equals.insert("engine->nullValue() <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->nullValue() <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->nullValue() <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->nullValue() <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->nullValue() <=> QScriptValue(0, qInf())"); - equals.insert("engine->nullValue() <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->nullValue() <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->nullValue() <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, true)"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, int(122))"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, qInf())"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->nullValue() <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"true\")"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"122\")"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"124\")"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->nullValue() <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->nullValue() <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->newObject() <=> QScriptValue(\"ciao\")"); - equals.insert("engine->newObject() <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newObject() <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->newObject() <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newObject() <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->newObject() <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newObject() <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->newObject() <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newObject() <=> engine->evaluate(\"Array\")"); - equals.insert("engine->newObject() <=> engine->evaluate(\"Number\")"); - equals.insert("engine->newObject() <=> engine->evaluate(\"Function\")"); - equals.insert("engine->newObject() <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->newObject() <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->newObject() <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->newObject() <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->newObject() <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->newArray() <=> QScriptValue(true)"); - equals.insert("engine->newArray() <=> QScriptValue(int(122))"); - equals.insert("engine->newArray() <=> QScriptValue(uint(124))"); - equals.insert("engine->newArray() <=> QScriptValue(123.0)"); - equals.insert("engine->newArray() <=> QScriptValue(6.37e-8)"); - equals.insert("engine->newArray() <=> QScriptValue(0x43211234)"); - equals.insert("engine->newArray() <=> QScriptValue(0x10000)"); - equals.insert("engine->newArray() <=> QScriptValue(0x10001)"); - equals.insert("engine->newArray() <=> QScriptValue(qInf())"); - equals.insert("engine->newArray() <=> QScriptValue(\"NaN\")"); - equals.insert("engine->newArray() <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->newArray() <=> QScriptValue(\"-Infinity\")"); - equals.insert("engine->newArray() <=> QScriptValue(\"ciao\")"); - equals.insert("engine->newArray() <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newArray() <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->newArray() <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->newArray() <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->newArray() <=> QScriptValue(0, true)"); - equals.insert("engine->newArray() <=> QScriptValue(0, int(122))"); - equals.insert("engine->newArray() <=> QScriptValue(0, uint(124))"); - equals.insert("engine->newArray() <=> QScriptValue(0, 123.0)"); - equals.insert("engine->newArray() <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->newArray() <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->newArray() <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->newArray() <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->newArray() <=> QScriptValue(0, qInf())"); - equals.insert("engine->newArray() <=> QScriptValue(0, \"NaN\")"); - equals.insert("engine->newArray() <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->newArray() <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("engine->newArray() <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->newArray() <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newArray() <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->newArray() <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->newArray() <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->newArray() <=> QScriptValue(engine, true)"); - equals.insert("engine->newArray() <=> QScriptValue(engine, int(122))"); - equals.insert("engine->newArray() <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->newArray() <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->newArray() <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->newArray() <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->newArray() <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->newArray() <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->newArray() <=> QScriptValue(engine, qInf())"); - equals.insert("engine->newArray() <=> QScriptValue(engine, \"NaN\")"); - equals.insert("engine->newArray() <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->newArray() <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("engine->newArray() <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->newArray() <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newArray() <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->newArray() <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->newArray() <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->newArray() <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"Array\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"Number\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"Function\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"/foo/\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"new Error()\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"Null\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"True\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"False\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"true\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"122\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"124\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->newArray() <=> engine->newObject()"); - equals.insert("engine->newArray() <=> engine->newArray(10)"); - equals.insert("engine->newArray() <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->newArray() <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->newArray() <=> engine->newQObject(engine)"); - equals.insert("engine->newArray(10) <=> QScriptValue(\"NaN\")"); - equals.insert("engine->newArray(10) <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->newArray(10) <=> QScriptValue(\"-Infinity\")"); - equals.insert("engine->newArray(10) <=> QScriptValue(\"ciao\")"); - equals.insert("engine->newArray(10) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newArray(10) <=> QScriptValue(QString(\"0\"))"); - equals.insert("engine->newArray(10) <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->newArray(10) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->newArray(10) <=> QScriptValue(0, \"NaN\")"); - equals.insert("engine->newArray(10) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->newArray(10) <=> QScriptValue(0, \"-Infinity\")"); - equals.insert("engine->newArray(10) <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->newArray(10) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newArray(10) <=> QScriptValue(0, QString(\"0\"))"); - equals.insert("engine->newArray(10) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->newArray(10) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->newArray(10) <=> QScriptValue(engine, \"NaN\")"); - equals.insert("engine->newArray(10) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->newArray(10) <=> QScriptValue(engine, \"-Infinity\")"); - equals.insert("engine->newArray(10) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->newArray(10) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newArray(10) <=> QScriptValue(engine, QString(\"0\"))"); - equals.insert("engine->newArray(10) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->newArray(10) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"Error.prototype\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"Array\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"Number\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"Function\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"/foo/\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"new Error()\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"Null\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"True\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"False\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"'0'\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->newArray(10) <=> engine->newObject()"); - equals.insert("engine->newArray(10) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - equals.insert("engine->newArray(10) <=> engine->newQObject(engine)"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(\"ciao\")"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Array\")"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Number\")"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Function\")"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(uint(124))"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(0x43211234)"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(0x10000)"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(0x10001)"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(qInf())"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(0, uint(124))"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(0, qInf())"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(engine, qInf())"); - equals.insert("engine->newVariant(QVariant(123)) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->newVariant(QVariant(123)) <=> engine->evaluate(\"124\")"); - equals.insert("engine->newVariant(QVariant(123)) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->newVariant(QVariant(123)) <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->newVariant(QVariant(123)) <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->newVariant(QVariant(123)) <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(true)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(int(122))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(uint(124))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(123.0)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(6.37e-8)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0x43211234)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0x10000)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0x10001)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(qInf())"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, true)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, int(122))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, uint(124))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, 123.0)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, qInf())"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, true)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, int(122))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, qInf())"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"true\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"122\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"124\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(true)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(int(122))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(uint(124))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(123.0)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(6.37e-8)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0x43211234)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0x10000)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0x10001)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(qInf())"); - equals.insert("engine->newQObject(0) <=> QScriptValue(\"Infinity\")"); - equals.insert("engine->newQObject(0) <=> QScriptValue(QString(\"123\"))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(QString(\"12.4\"))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, true)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, int(122))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, uint(124))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, 123.0)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, 6.37e-8)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, 0x43211234)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, 0x10000)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, 0x10001)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, qInf())"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, \"Infinity\")"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, QString(\"123\"))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(0, QString(\"12.3\"))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, true)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, int(122))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, uint(124))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, 123.0)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, 6.37e-8)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, 0x43211234)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, 0x10000)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, 0x10001)"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, qInf())"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, \"Infinity\")"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, QString(\"123\"))"); - equals.insert("engine->newQObject(0) <=> QScriptValue(engine, QString(\"1.23\"))"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"true\")"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"122\")"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"124\")"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"123.0\")"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"6.37e-8\")"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"0x43211234\")"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"0x10000\")"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"0x10001\")"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"Infinity\")"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"'123'\")"); - equals.insert("engine->newQObject(0) <=> engine->evaluate(\"'12.4'\")"); - equals.insert("engine->newQObject(0) <=> engine->newVariant(QVariant(123))"); - equals.insert("engine->newQObject(engine) <=> QScriptValue(\"ciao\")"); - equals.insert("engine->newQObject(engine) <=> QScriptValue(QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newQObject(engine) <=> QScriptValue(0, \"ciao\")"); - equals.insert("engine->newQObject(engine) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newQObject(engine) <=> QScriptValue(engine, \"ciao\")"); - equals.insert("engine->newQObject(engine) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"Object.prototype\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"Function.prototype\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"Array\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"Number\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"Function\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"(function() { return 1; })\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"(function() { return 'ciao'; })\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"new Object()\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"Undefined\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"Null\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"True\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"False\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"'ciao'\")"); - equals.insert("engine->newQObject(engine) <=> engine->newObject()"); - equals.insert("engine->newQObject(engine) <=> engine->newQMetaObject(&QObject::staticMetaObject)"); - } - QHash::const_iterator it; - for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { - QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); - newRow(tag.toLatin1()) << it.value() << equals.contains(tag); - } -} - -void tst_QScriptValue::lessThan_test(const char *, const QScriptValue& value) -{ - QFETCH(QScriptValue, other); - QFETCH(bool, expected); - QCOMPARE(value.lessThan(other), expected); -} - -DEFINE_TEST_FUNCTION(lessThan) - - -void tst_QScriptValue::instanceOf_initData() -{ - QTest::addColumn("other"); - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::instanceOf_makeData(const char *expr) -{ - static QSet equals; - if (equals.isEmpty()) { - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Object\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Number\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")"); - equals.insert("engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")"); - equals.insert("engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"Null\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"True\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->evaluate(\"False\") <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newObject() <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newArray() <=> engine->evaluate(\"Array\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newArray(10) <=> engine->evaluate(\"Array\")"); - equals.insert("engine->newDate(QDateTime()) <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newVariant(QVariant()) <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newVariant(QVariant(123)) <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newVariant(QVariant(false)) <=> engine->evaluate(\"Object\")"); - equals.insert("engine->newQObject(engine) <=> engine->evaluate(\"Object\")"); - } - QHash::const_iterator it; - for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { - QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); - newRow(tag.toLatin1()) << it.value() << equals.contains(tag); - } -} - -void tst_QScriptValue::instanceOf_test(const char *, const QScriptValue& value) -{ - QFETCH(QScriptValue, other); - QFETCH(bool, expected); - QCOMPARE(value.instanceOf(other), expected); -} - -DEFINE_TEST_FUNCTION(instanceOf) - - -void tst_QScriptValue::qscriptvalue_castQString_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::qscriptvalue_castQString_makeData(const char* expr) -{ - static QHash value; - if (value.isEmpty()) { - value.insert("QScriptValue()", ""); - value.insert("QScriptValue(QScriptValue::UndefinedValue)", ""); - value.insert("QScriptValue(QScriptValue::NullValue)", ""); - value.insert("QScriptValue(true)", "true"); - value.insert("QScriptValue(false)", "false"); - value.insert("QScriptValue(int(122))", "122"); - value.insert("QScriptValue(uint(124))", "124"); - value.insert("QScriptValue(0)", "0"); - value.insert("QScriptValue(0.0)", "0"); - value.insert("QScriptValue(123.0)", "123"); - value.insert("QScriptValue(6.37e-8)", "6.37e-8"); - value.insert("QScriptValue(-6.37e-8)", "-6.37e-8"); - value.insert("QScriptValue(0x43211234)", "1126240820"); - value.insert("QScriptValue(0x10000)", "65536"); - value.insert("QScriptValue(0x10001)", "65537"); - value.insert("QScriptValue(qSNaN())", "NaN"); - value.insert("QScriptValue(qQNaN())", "NaN"); - value.insert("QScriptValue(qInf())", "Infinity"); - value.insert("QScriptValue(-qInf())", "-Infinity"); - value.insert("QScriptValue(\"NaN\")", "NaN"); - value.insert("QScriptValue(\"Infinity\")", "Infinity"); - value.insert("QScriptValue(\"-Infinity\")", "-Infinity"); - value.insert("QScriptValue(\"ciao\")", "ciao"); - value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", "ciao"); - value.insert("QScriptValue(QString(\"\"))", ""); - value.insert("QScriptValue(QString())", ""); - value.insert("QScriptValue(QString(\"0\"))", "0"); - value.insert("QScriptValue(QString(\"123\"))", "123"); - value.insert("QScriptValue(QString(\"12.4\"))", "12.4"); - value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", ""); - value.insert("QScriptValue(0, QScriptValue::NullValue)", ""); - value.insert("QScriptValue(0, true)", "true"); - value.insert("QScriptValue(0, false)", "false"); - value.insert("QScriptValue(0, int(122))", "122"); - value.insert("QScriptValue(0, uint(124))", "124"); - value.insert("QScriptValue(0, 0)", "0"); - value.insert("QScriptValue(0, 0.0)", "0"); - value.insert("QScriptValue(0, 123.0)", "123"); - value.insert("QScriptValue(0, 6.37e-8)", "6.37e-8"); - value.insert("QScriptValue(0, -6.37e-8)", "-6.37e-8"); - value.insert("QScriptValue(0, 0x43211234)", "1126240820"); - value.insert("QScriptValue(0, 0x10000)", "65536"); - value.insert("QScriptValue(0, 0x10001)", "65537"); - value.insert("QScriptValue(0, qSNaN())", "NaN"); - value.insert("QScriptValue(0, qQNaN())", "NaN"); - value.insert("QScriptValue(0, qInf())", "Infinity"); - value.insert("QScriptValue(0, -qInf())", "-Infinity"); - value.insert("QScriptValue(0, \"NaN\")", "NaN"); - value.insert("QScriptValue(0, \"Infinity\")", "Infinity"); - value.insert("QScriptValue(0, \"-Infinity\")", "-Infinity"); - value.insert("QScriptValue(0, \"ciao\")", "ciao"); - value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", "ciao"); - value.insert("QScriptValue(0, QString(\"\"))", ""); - value.insert("QScriptValue(0, QString())", ""); - value.insert("QScriptValue(0, QString(\"0\"))", "0"); - value.insert("QScriptValue(0, QString(\"123\"))", "123"); - value.insert("QScriptValue(0, QString(\"12.3\"))", "12.3"); - value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", ""); - value.insert("QScriptValue(engine, QScriptValue::NullValue)", ""); - value.insert("QScriptValue(engine, true)", "true"); - value.insert("QScriptValue(engine, false)", "false"); - value.insert("QScriptValue(engine, int(122))", "122"); - value.insert("QScriptValue(engine, uint(124))", "124"); - value.insert("QScriptValue(engine, 0)", "0"); - value.insert("QScriptValue(engine, 0.0)", "0"); - value.insert("QScriptValue(engine, 123.0)", "123"); - value.insert("QScriptValue(engine, 6.37e-8)", "6.37e-8"); - value.insert("QScriptValue(engine, -6.37e-8)", "-6.37e-8"); - value.insert("QScriptValue(engine, 0x43211234)", "1126240820"); - value.insert("QScriptValue(engine, 0x10000)", "65536"); - value.insert("QScriptValue(engine, 0x10001)", "65537"); - value.insert("QScriptValue(engine, qSNaN())", "NaN"); - value.insert("QScriptValue(engine, qQNaN())", "NaN"); - value.insert("QScriptValue(engine, qInf())", "Infinity"); - value.insert("QScriptValue(engine, -qInf())", "-Infinity"); - value.insert("QScriptValue(engine, \"NaN\")", "NaN"); - value.insert("QScriptValue(engine, \"Infinity\")", "Infinity"); - value.insert("QScriptValue(engine, \"-Infinity\")", "-Infinity"); - value.insert("QScriptValue(engine, \"ciao\")", "ciao"); - value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", "ciao"); - value.insert("QScriptValue(engine, QString(\"\"))", ""); - value.insert("QScriptValue(engine, QString())", ""); - value.insert("QScriptValue(engine, QString(\"0\"))", "0"); - value.insert("QScriptValue(engine, QString(\"123\"))", "123"); - value.insert("QScriptValue(engine, QString(\"1.23\"))", "1.23"); - value.insert("engine->evaluate(\"[]\")", ""); - value.insert("engine->evaluate(\"{}\")", ""); - value.insert("engine->evaluate(\"Object.prototype\")", "[object Object]"); - value.insert("engine->evaluate(\"Date.prototype\")", "Invalid Date"); - value.insert("engine->evaluate(\"Array.prototype\")", ""); - value.insert("engine->evaluate(\"Function.prototype\")", "function () {\n [native code]\n}"); - value.insert("engine->evaluate(\"Error.prototype\")", "Error: Unknown error"); - value.insert("engine->evaluate(\"Object\")", "function Object() {\n [native code]\n}"); - value.insert("engine->evaluate(\"Array\")", "function Array() {\n [native code]\n}"); - value.insert("engine->evaluate(\"Number\")", "function Number() {\n [native code]\n}"); - value.insert("engine->evaluate(\"Function\")", "function Function() {\n [native code]\n}"); - value.insert("engine->evaluate(\"(function() { return 1; })\")", "function () { return 1; }"); - value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", "function () { return 'ciao'; }"); - value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", "function () { throw new Error('foo'); }"); - value.insert("engine->evaluate(\"/foo/\")", "/foo/"); - value.insert("engine->evaluate(\"new Object()\")", "[object Object]"); - value.insert("engine->evaluate(\"new Array()\")", ""); - value.insert("engine->evaluate(\"new Error()\")", "Error: Unknown error"); - value.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", "22"); - value.insert("engine->evaluate(\"Undefined\")", "ReferenceError: Can't find variable: Undefined"); - value.insert("engine->evaluate(\"Null\")", "ReferenceError: Can't find variable: Null"); - value.insert("engine->evaluate(\"True\")", "ReferenceError: Can't find variable: True"); - value.insert("engine->evaluate(\"False\")", "ReferenceError: Can't find variable: False"); - value.insert("engine->evaluate(\"undefined\")", ""); - value.insert("engine->evaluate(\"null\")", ""); - value.insert("engine->evaluate(\"true\")", "true"); - value.insert("engine->evaluate(\"false\")", "false"); - value.insert("engine->evaluate(\"122\")", "122"); - value.insert("engine->evaluate(\"124\")", "124"); - value.insert("engine->evaluate(\"0\")", "0"); - value.insert("engine->evaluate(\"0.0\")", "0"); - value.insert("engine->evaluate(\"123.0\")", "123"); - value.insert("engine->evaluate(\"6.37e-8\")", "6.37e-8"); - value.insert("engine->evaluate(\"-6.37e-8\")", "-6.37e-8"); - value.insert("engine->evaluate(\"0x43211234\")", "1126240820"); - value.insert("engine->evaluate(\"0x10000\")", "65536"); - value.insert("engine->evaluate(\"0x10001\")", "65537"); - value.insert("engine->evaluate(\"NaN\")", "NaN"); - value.insert("engine->evaluate(\"Infinity\")", "Infinity"); - value.insert("engine->evaluate(\"-Infinity\")", "-Infinity"); - value.insert("engine->evaluate(\"'ciao'\")", "ciao"); - value.insert("engine->evaluate(\"''\")", ""); - value.insert("engine->evaluate(\"'0'\")", "0"); - value.insert("engine->evaluate(\"'123'\")", "123"); - value.insert("engine->evaluate(\"'12.4'\")", "12.4"); - value.insert("engine->nullValue()", ""); - value.insert("engine->undefinedValue()", ""); - value.insert("engine->newObject()", "[object Object]"); - value.insert("engine->newArray()", ""); - value.insert("engine->newArray(10)", ",,,,,,,,,"); - value.insert("engine->newDate(QDateTime())", "Invalid Date"); - value.insert("engine->newQMetaObject(&QObject::staticMetaObject)", "[object QMetaObject]"); - value.insert("engine->newVariant(QVariant())", "undefined"); - value.insert("engine->newVariant(QVariant(123))", "123"); - value.insert("engine->newVariant(QVariant(false))", "false"); - value.insert("engine->newQObject(0)", ""); - value.insert("engine->newQObject(engine)", "QScriptEngine(name = \"\")"); - } - newRow(expr) << value.value(expr); -} - -void tst_QScriptValue::qscriptvalue_castQString_test(const char*, const QScriptValue& value) -{ - QFETCH(QString, expected); - QCOMPARE(qscriptvalue_cast(value), expected); - QCOMPARE(qscriptvalue_cast(value), expected); -} - -DEFINE_TEST_FUNCTION(qscriptvalue_castQString) - - -void tst_QScriptValue::qscriptvalue_castqsreal_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::qscriptvalue_castqsreal_makeData(const char* expr) -{ - static QHash value; - if (value.isEmpty()) { - value.insert("QScriptValue()", 0); - value.insert("QScriptValue(QScriptValue::UndefinedValue)", qQNaN()); - value.insert("QScriptValue(QScriptValue::NullValue)", 0); - value.insert("QScriptValue(true)", 1); - value.insert("QScriptValue(false)", 0); - value.insert("QScriptValue(int(122))", 122); - value.insert("QScriptValue(uint(124))", 124); - value.insert("QScriptValue(0)", 0); - value.insert("QScriptValue(0.0)", 0); - value.insert("QScriptValue(123.0)", 123); - value.insert("QScriptValue(6.37e-8)", 6.369999999999999e-08); - value.insert("QScriptValue(-6.37e-8)", -6.369999999999999e-08); - value.insert("QScriptValue(0x43211234)", 1126240820); - value.insert("QScriptValue(0x10000)", 65536); - value.insert("QScriptValue(0x10001)", 65537); - value.insert("QScriptValue(qSNaN())", qQNaN()); - value.insert("QScriptValue(qQNaN())", qQNaN()); - value.insert("QScriptValue(qInf())", qInf()); - value.insert("QScriptValue(-qInf())", qInf()); - value.insert("QScriptValue(\"NaN\")", qQNaN()); - value.insert("QScriptValue(\"Infinity\")", qInf()); - value.insert("QScriptValue(\"-Infinity\")", qInf()); - value.insert("QScriptValue(\"ciao\")", qQNaN()); - value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", qQNaN()); - value.insert("QScriptValue(QString(\"\"))", 0); - value.insert("QScriptValue(QString())", 0); - value.insert("QScriptValue(QString(\"0\"))", 0); - value.insert("QScriptValue(QString(\"123\"))", 123); - value.insert("QScriptValue(QString(\"12.4\"))", 12.4); - value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", qQNaN()); - value.insert("QScriptValue(0, QScriptValue::NullValue)", 0); - value.insert("QScriptValue(0, true)", 1); - value.insert("QScriptValue(0, false)", 0); - value.insert("QScriptValue(0, int(122))", 122); - value.insert("QScriptValue(0, uint(124))", 124); - value.insert("QScriptValue(0, 0)", 0); - value.insert("QScriptValue(0, 0.0)", 0); - value.insert("QScriptValue(0, 123.0)", 123); - value.insert("QScriptValue(0, 6.37e-8)", 6.369999999999999e-08); - value.insert("QScriptValue(0, -6.37e-8)", -6.369999999999999e-08); - value.insert("QScriptValue(0, 0x43211234)", 1126240820); - value.insert("QScriptValue(0, 0x10000)", 65536); - value.insert("QScriptValue(0, 0x10001)", 65537); - value.insert("QScriptValue(0, qSNaN())", qQNaN()); - value.insert("QScriptValue(0, qQNaN())", qQNaN()); - value.insert("QScriptValue(0, qInf())", qInf()); - value.insert("QScriptValue(0, -qInf())", qInf()); - value.insert("QScriptValue(0, \"NaN\")", qQNaN()); - value.insert("QScriptValue(0, \"Infinity\")", qInf()); - value.insert("QScriptValue(0, \"-Infinity\")", qInf()); - value.insert("QScriptValue(0, \"ciao\")", qQNaN()); - value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", qQNaN()); - value.insert("QScriptValue(0, QString(\"\"))", 0); - value.insert("QScriptValue(0, QString())", 0); - value.insert("QScriptValue(0, QString(\"0\"))", 0); - value.insert("QScriptValue(0, QString(\"123\"))", 123); - value.insert("QScriptValue(0, QString(\"12.3\"))", 12.3); - value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", qQNaN()); - value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); - value.insert("QScriptValue(engine, true)", 1); - value.insert("QScriptValue(engine, false)", 0); - value.insert("QScriptValue(engine, int(122))", 122); - value.insert("QScriptValue(engine, uint(124))", 124); - value.insert("QScriptValue(engine, 0)", 0); - value.insert("QScriptValue(engine, 0.0)", 0); - value.insert("QScriptValue(engine, 123.0)", 123); - value.insert("QScriptValue(engine, 6.37e-8)", 6.369999999999999e-08); - value.insert("QScriptValue(engine, -6.37e-8)", -6.369999999999999e-08); - value.insert("QScriptValue(engine, 0x43211234)", 1126240820); - value.insert("QScriptValue(engine, 0x10000)", 65536); - value.insert("QScriptValue(engine, 0x10001)", 65537); - value.insert("QScriptValue(engine, qSNaN())", qQNaN()); - value.insert("QScriptValue(engine, qQNaN())", qQNaN()); - value.insert("QScriptValue(engine, qInf())", qInf()); - value.insert("QScriptValue(engine, -qInf())", qInf()); - value.insert("QScriptValue(engine, \"NaN\")", qQNaN()); - value.insert("QScriptValue(engine, \"Infinity\")", qInf()); - value.insert("QScriptValue(engine, \"-Infinity\")", qInf()); - value.insert("QScriptValue(engine, \"ciao\")", qQNaN()); - value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", qQNaN()); - value.insert("QScriptValue(engine, QString(\"\"))", 0); - value.insert("QScriptValue(engine, QString())", 0); - value.insert("QScriptValue(engine, QString(\"0\"))", 0); - value.insert("QScriptValue(engine, QString(\"123\"))", 123); - value.insert("QScriptValue(engine, QString(\"1.23\"))", 1.23); - value.insert("engine->evaluate(\"[]\")", 0); - value.insert("engine->evaluate(\"{}\")", qQNaN()); - value.insert("engine->evaluate(\"Object.prototype\")", qQNaN()); - value.insert("engine->evaluate(\"Date.prototype\")", qQNaN()); - value.insert("engine->evaluate(\"Array.prototype\")", 0); - value.insert("engine->evaluate(\"Function.prototype\")", qQNaN()); - value.insert("engine->evaluate(\"Error.prototype\")", qQNaN()); - value.insert("engine->evaluate(\"Object\")", qQNaN()); - value.insert("engine->evaluate(\"Array\")", qQNaN()); - value.insert("engine->evaluate(\"Number\")", qQNaN()); - value.insert("engine->evaluate(\"Function\")", qQNaN()); - value.insert("engine->evaluate(\"(function() { return 1; })\")", qQNaN()); - value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", qQNaN()); - value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", qQNaN()); - value.insert("engine->evaluate(\"/foo/\")", qQNaN()); - value.insert("engine->evaluate(\"new Object()\")", qQNaN()); - value.insert("engine->evaluate(\"new Array()\")", 0); - value.insert("engine->evaluate(\"new Error()\")", qQNaN()); - value.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); - value.insert("engine->evaluate(\"Undefined\")", qQNaN()); - value.insert("engine->evaluate(\"Null\")", qQNaN()); - value.insert("engine->evaluate(\"True\")", qQNaN()); - value.insert("engine->evaluate(\"False\")", qQNaN()); - value.insert("engine->evaluate(\"undefined\")", qQNaN()); - value.insert("engine->evaluate(\"null\")", 0); - value.insert("engine->evaluate(\"true\")", 1); - value.insert("engine->evaluate(\"false\")", 0); - value.insert("engine->evaluate(\"122\")", 122); - value.insert("engine->evaluate(\"124\")", 124); - value.insert("engine->evaluate(\"0\")", 0); - value.insert("engine->evaluate(\"0.0\")", 0); - value.insert("engine->evaluate(\"123.0\")", 123); - value.insert("engine->evaluate(\"6.37e-8\")", 6.369999999999999e-08); - value.insert("engine->evaluate(\"-6.37e-8\")", -6.369999999999999e-08); - value.insert("engine->evaluate(\"0x43211234\")", 1126240820); - value.insert("engine->evaluate(\"0x10000\")", 65536); - value.insert("engine->evaluate(\"0x10001\")", 65537); - value.insert("engine->evaluate(\"NaN\")", qQNaN()); - value.insert("engine->evaluate(\"Infinity\")", qInf()); - value.insert("engine->evaluate(\"-Infinity\")", qInf()); - value.insert("engine->evaluate(\"'ciao'\")", qQNaN()); - value.insert("engine->evaluate(\"''\")", 0); - value.insert("engine->evaluate(\"'0'\")", 0); - value.insert("engine->evaluate(\"'123'\")", 123); - value.insert("engine->evaluate(\"'12.4'\")", 12.4); - value.insert("engine->nullValue()", 0); - value.insert("engine->undefinedValue()", qQNaN()); - value.insert("engine->newObject()", qQNaN()); - value.insert("engine->newArray()", 0); - value.insert("engine->newArray(10)", qQNaN()); - value.insert("engine->newDate(QDateTime())", qQNaN()); - value.insert("engine->newQMetaObject(&QObject::staticMetaObject)", qQNaN()); - value.insert("engine->newVariant(QVariant())", qQNaN()); - value.insert("engine->newVariant(QVariant(123))", 123); - value.insert("engine->newVariant(QVariant(false))", 0); - value.insert("engine->newQObject(0)", 0); - value.insert("engine->newQObject(engine)", qQNaN()); - } - newRow(expr) << value.value(expr); -} - -void tst_QScriptValue::qscriptvalue_castqsreal_test(const char*, const QScriptValue& value) -{ - QFETCH(qsreal, expected); - if (qIsNaN(expected)) { - QVERIFY(qIsNaN(qscriptvalue_cast(value))); - QVERIFY(qIsNaN(qscriptvalue_cast(value))); - return; - } - if (qIsInf(expected)) { - QVERIFY(qIsInf(qscriptvalue_cast(value))); - QVERIFY(qIsInf(qscriptvalue_cast(value))); - return; - } - QCOMPARE(qscriptvalue_cast(value), expected); - QCOMPARE(qscriptvalue_cast(value), expected); -} - -DEFINE_TEST_FUNCTION(qscriptvalue_castqsreal) - - -void tst_QScriptValue::qscriptvalue_castbool_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::qscriptvalue_castbool_makeData(const char* expr) -{ - static QHash value; - if (value.isEmpty()) { - value.insert("QScriptValue()", false); - value.insert("QScriptValue(QScriptValue::UndefinedValue)", false); - value.insert("QScriptValue(QScriptValue::NullValue)", false); - value.insert("QScriptValue(true)", true); - value.insert("QScriptValue(false)", false); - value.insert("QScriptValue(int(122))", true); - value.insert("QScriptValue(uint(124))", true); - value.insert("QScriptValue(0)", false); - value.insert("QScriptValue(0.0)", false); - value.insert("QScriptValue(123.0)", true); - value.insert("QScriptValue(6.37e-8)", true); - value.insert("QScriptValue(-6.37e-8)", true); - value.insert("QScriptValue(0x43211234)", true); - value.insert("QScriptValue(0x10000)", true); - value.insert("QScriptValue(0x10001)", true); - value.insert("QScriptValue(qSNaN())", false); - value.insert("QScriptValue(qQNaN())", false); - value.insert("QScriptValue(qInf())", true); - value.insert("QScriptValue(-qInf())", true); - value.insert("QScriptValue(\"NaN\")", true); - value.insert("QScriptValue(\"Infinity\")", true); - value.insert("QScriptValue(\"-Infinity\")", true); - value.insert("QScriptValue(\"ciao\")", true); - value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", true); - value.insert("QScriptValue(QString(\"\"))", false); - value.insert("QScriptValue(QString())", false); - value.insert("QScriptValue(QString(\"0\"))", true); - value.insert("QScriptValue(QString(\"123\"))", true); - value.insert("QScriptValue(QString(\"12.4\"))", true); - value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", false); - value.insert("QScriptValue(0, QScriptValue::NullValue)", false); - value.insert("QScriptValue(0, true)", true); - value.insert("QScriptValue(0, false)", false); - value.insert("QScriptValue(0, int(122))", true); - value.insert("QScriptValue(0, uint(124))", true); - value.insert("QScriptValue(0, 0)", false); - value.insert("QScriptValue(0, 0.0)", false); - value.insert("QScriptValue(0, 123.0)", true); - value.insert("QScriptValue(0, 6.37e-8)", true); - value.insert("QScriptValue(0, -6.37e-8)", true); - value.insert("QScriptValue(0, 0x43211234)", true); - value.insert("QScriptValue(0, 0x10000)", true); - value.insert("QScriptValue(0, 0x10001)", true); - value.insert("QScriptValue(0, qSNaN())", false); - value.insert("QScriptValue(0, qQNaN())", false); - value.insert("QScriptValue(0, qInf())", true); - value.insert("QScriptValue(0, -qInf())", true); - value.insert("QScriptValue(0, \"NaN\")", true); - value.insert("QScriptValue(0, \"Infinity\")", true); - value.insert("QScriptValue(0, \"-Infinity\")", true); - value.insert("QScriptValue(0, \"ciao\")", true); - value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", true); - value.insert("QScriptValue(0, QString(\"\"))", false); - value.insert("QScriptValue(0, QString())", false); - value.insert("QScriptValue(0, QString(\"0\"))", true); - value.insert("QScriptValue(0, QString(\"123\"))", true); - value.insert("QScriptValue(0, QString(\"12.3\"))", true); - value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", false); - value.insert("QScriptValue(engine, QScriptValue::NullValue)", false); - value.insert("QScriptValue(engine, true)", true); - value.insert("QScriptValue(engine, false)", false); - value.insert("QScriptValue(engine, int(122))", true); - value.insert("QScriptValue(engine, uint(124))", true); - value.insert("QScriptValue(engine, 0)", false); - value.insert("QScriptValue(engine, 0.0)", false); - value.insert("QScriptValue(engine, 123.0)", true); - value.insert("QScriptValue(engine, 6.37e-8)", true); - value.insert("QScriptValue(engine, -6.37e-8)", true); - value.insert("QScriptValue(engine, 0x43211234)", true); - value.insert("QScriptValue(engine, 0x10000)", true); - value.insert("QScriptValue(engine, 0x10001)", true); - value.insert("QScriptValue(engine, qSNaN())", false); - value.insert("QScriptValue(engine, qQNaN())", false); - value.insert("QScriptValue(engine, qInf())", true); - value.insert("QScriptValue(engine, -qInf())", true); - value.insert("QScriptValue(engine, \"NaN\")", true); - value.insert("QScriptValue(engine, \"Infinity\")", true); - value.insert("QScriptValue(engine, \"-Infinity\")", true); - value.insert("QScriptValue(engine, \"ciao\")", true); - value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", true); - value.insert("QScriptValue(engine, QString(\"\"))", false); - value.insert("QScriptValue(engine, QString())", false); - value.insert("QScriptValue(engine, QString(\"0\"))", true); - value.insert("QScriptValue(engine, QString(\"123\"))", true); - value.insert("QScriptValue(engine, QString(\"1.23\"))", true); - value.insert("engine->evaluate(\"[]\")", true); - value.insert("engine->evaluate(\"{}\")", false); - value.insert("engine->evaluate(\"Object.prototype\")", true); - value.insert("engine->evaluate(\"Date.prototype\")", true); - value.insert("engine->evaluate(\"Array.prototype\")", true); - value.insert("engine->evaluate(\"Function.prototype\")", true); - value.insert("engine->evaluate(\"Error.prototype\")", true); - value.insert("engine->evaluate(\"Object\")", true); - value.insert("engine->evaluate(\"Array\")", true); - value.insert("engine->evaluate(\"Number\")", true); - value.insert("engine->evaluate(\"Function\")", true); - value.insert("engine->evaluate(\"(function() { return 1; })\")", true); - value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", true); - value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", true); - value.insert("engine->evaluate(\"/foo/\")", true); - value.insert("engine->evaluate(\"new Object()\")", true); - value.insert("engine->evaluate(\"new Array()\")", true); - value.insert("engine->evaluate(\"new Error()\")", true); - value.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", true); - value.insert("engine->evaluate(\"Undefined\")", true); - value.insert("engine->evaluate(\"Null\")", true); - value.insert("engine->evaluate(\"True\")", true); - value.insert("engine->evaluate(\"False\")", true); - value.insert("engine->evaluate(\"undefined\")", false); - value.insert("engine->evaluate(\"null\")", false); - value.insert("engine->evaluate(\"true\")", true); - value.insert("engine->evaluate(\"false\")", false); - value.insert("engine->evaluate(\"122\")", true); - value.insert("engine->evaluate(\"124\")", true); - value.insert("engine->evaluate(\"0\")", false); - value.insert("engine->evaluate(\"0.0\")", false); - value.insert("engine->evaluate(\"123.0\")", true); - value.insert("engine->evaluate(\"6.37e-8\")", true); - value.insert("engine->evaluate(\"-6.37e-8\")", true); - value.insert("engine->evaluate(\"0x43211234\")", true); - value.insert("engine->evaluate(\"0x10000\")", true); - value.insert("engine->evaluate(\"0x10001\")", true); - value.insert("engine->evaluate(\"NaN\")", false); - value.insert("engine->evaluate(\"Infinity\")", true); - value.insert("engine->evaluate(\"-Infinity\")", true); - value.insert("engine->evaluate(\"'ciao'\")", true); - value.insert("engine->evaluate(\"''\")", false); - value.insert("engine->evaluate(\"'0'\")", true); - value.insert("engine->evaluate(\"'123'\")", true); - value.insert("engine->evaluate(\"'12.4'\")", true); - value.insert("engine->nullValue()", false); - value.insert("engine->undefinedValue()", false); - value.insert("engine->newObject()", true); - value.insert("engine->newArray()", true); - value.insert("engine->newArray(10)", true); - value.insert("engine->newDate(QDateTime())", true); - value.insert("engine->newQMetaObject(&QObject::staticMetaObject)", true); - value.insert("engine->newVariant(QVariant())", true); - value.insert("engine->newVariant(QVariant(123))", true); - value.insert("engine->newVariant(QVariant(false))", true); - value.insert("engine->newQObject(0)", false); - value.insert("engine->newQObject(engine)", true); - } - newRow(expr) << value.value(expr); -} - -void tst_QScriptValue::qscriptvalue_castbool_test(const char*, const QScriptValue& value) -{ - QFETCH(bool, expected); - QCOMPARE(qscriptvalue_cast(value), expected); - QCOMPARE(qscriptvalue_cast(value), expected); -} - -DEFINE_TEST_FUNCTION(qscriptvalue_castbool) - - -void tst_QScriptValue::qscriptvalue_castqint32_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::qscriptvalue_castqint32_makeData(const char* expr) -{ - static QHash value; - if (value.isEmpty()) { - value.insert("QScriptValue()", 0); - value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); - value.insert("QScriptValue(QScriptValue::NullValue)", 0); - value.insert("QScriptValue(true)", 1); - value.insert("QScriptValue(false)", 0); - value.insert("QScriptValue(int(122))", 122); - value.insert("QScriptValue(uint(124))", 124); - value.insert("QScriptValue(0)", 0); - value.insert("QScriptValue(0.0)", 0); - value.insert("QScriptValue(123.0)", 123); - value.insert("QScriptValue(6.37e-8)", 0); - value.insert("QScriptValue(-6.37e-8)", 0); - value.insert("QScriptValue(0x43211234)", 1126240820); - value.insert("QScriptValue(0x10000)", 65536); - value.insert("QScriptValue(0x10001)", 65537); - value.insert("QScriptValue(qSNaN())", 0); - value.insert("QScriptValue(qQNaN())", 0); - value.insert("QScriptValue(qInf())", 0); - value.insert("QScriptValue(-qInf())", 0); - value.insert("QScriptValue(\"NaN\")", 0); - value.insert("QScriptValue(\"Infinity\")", 0); - value.insert("QScriptValue(\"-Infinity\")", 0); - value.insert("QScriptValue(\"ciao\")", 0); - value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); - value.insert("QScriptValue(QString(\"\"))", 0); - value.insert("QScriptValue(QString())", 0); - value.insert("QScriptValue(QString(\"0\"))", 0); - value.insert("QScriptValue(QString(\"123\"))", 123); - value.insert("QScriptValue(QString(\"12.4\"))", 12); - value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); - value.insert("QScriptValue(0, QScriptValue::NullValue)", 0); - value.insert("QScriptValue(0, true)", 1); - value.insert("QScriptValue(0, false)", 0); - value.insert("QScriptValue(0, int(122))", 122); - value.insert("QScriptValue(0, uint(124))", 124); - value.insert("QScriptValue(0, 0)", 0); - value.insert("QScriptValue(0, 0.0)", 0); - value.insert("QScriptValue(0, 123.0)", 123); - value.insert("QScriptValue(0, 6.37e-8)", 0); - value.insert("QScriptValue(0, -6.37e-8)", 0); - value.insert("QScriptValue(0, 0x43211234)", 1126240820); - value.insert("QScriptValue(0, 0x10000)", 65536); - value.insert("QScriptValue(0, 0x10001)", 65537); - value.insert("QScriptValue(0, qSNaN())", 0); - value.insert("QScriptValue(0, qQNaN())", 0); - value.insert("QScriptValue(0, qInf())", 0); - value.insert("QScriptValue(0, -qInf())", 0); - value.insert("QScriptValue(0, \"NaN\")", 0); - value.insert("QScriptValue(0, \"Infinity\")", 0); - value.insert("QScriptValue(0, \"-Infinity\")", 0); - value.insert("QScriptValue(0, \"ciao\")", 0); - value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); - value.insert("QScriptValue(0, QString(\"\"))", 0); - value.insert("QScriptValue(0, QString())", 0); - value.insert("QScriptValue(0, QString(\"0\"))", 0); - value.insert("QScriptValue(0, QString(\"123\"))", 123); - value.insert("QScriptValue(0, QString(\"12.3\"))", 12); - value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); - value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); - value.insert("QScriptValue(engine, true)", 1); - value.insert("QScriptValue(engine, false)", 0); - value.insert("QScriptValue(engine, int(122))", 122); - value.insert("QScriptValue(engine, uint(124))", 124); - value.insert("QScriptValue(engine, 0)", 0); - value.insert("QScriptValue(engine, 0.0)", 0); - value.insert("QScriptValue(engine, 123.0)", 123); - value.insert("QScriptValue(engine, 6.37e-8)", 0); - value.insert("QScriptValue(engine, -6.37e-8)", 0); - value.insert("QScriptValue(engine, 0x43211234)", 1126240820); - value.insert("QScriptValue(engine, 0x10000)", 65536); - value.insert("QScriptValue(engine, 0x10001)", 65537); - value.insert("QScriptValue(engine, qSNaN())", 0); - value.insert("QScriptValue(engine, qQNaN())", 0); - value.insert("QScriptValue(engine, qInf())", 0); - value.insert("QScriptValue(engine, -qInf())", 0); - value.insert("QScriptValue(engine, \"NaN\")", 0); - value.insert("QScriptValue(engine, \"Infinity\")", 0); - value.insert("QScriptValue(engine, \"-Infinity\")", 0); - value.insert("QScriptValue(engine, \"ciao\")", 0); - value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); - value.insert("QScriptValue(engine, QString(\"\"))", 0); - value.insert("QScriptValue(engine, QString())", 0); - value.insert("QScriptValue(engine, QString(\"0\"))", 0); - value.insert("QScriptValue(engine, QString(\"123\"))", 123); - value.insert("QScriptValue(engine, QString(\"1.23\"))", 1); - value.insert("engine->evaluate(\"[]\")", 0); - value.insert("engine->evaluate(\"{}\")", 0); - value.insert("engine->evaluate(\"Object.prototype\")", 0); - value.insert("engine->evaluate(\"Date.prototype\")", 0); - value.insert("engine->evaluate(\"Array.prototype\")", 0); - value.insert("engine->evaluate(\"Function.prototype\")", 0); - value.insert("engine->evaluate(\"Error.prototype\")", 0); - value.insert("engine->evaluate(\"Object\")", 0); - value.insert("engine->evaluate(\"Array\")", 0); - value.insert("engine->evaluate(\"Number\")", 0); - value.insert("engine->evaluate(\"Function\")", 0); - value.insert("engine->evaluate(\"(function() { return 1; })\")", 0); - value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); - value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); - value.insert("engine->evaluate(\"/foo/\")", 0); - value.insert("engine->evaluate(\"new Object()\")", 0); - value.insert("engine->evaluate(\"new Array()\")", 0); - value.insert("engine->evaluate(\"new Error()\")", 0); - value.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); - value.insert("engine->evaluate(\"Undefined\")", 0); - value.insert("engine->evaluate(\"Null\")", 0); - value.insert("engine->evaluate(\"True\")", 0); - value.insert("engine->evaluate(\"False\")", 0); - value.insert("engine->evaluate(\"undefined\")", 0); - value.insert("engine->evaluate(\"null\")", 0); - value.insert("engine->evaluate(\"true\")", 1); - value.insert("engine->evaluate(\"false\")", 0); - value.insert("engine->evaluate(\"122\")", 122); - value.insert("engine->evaluate(\"124\")", 124); - value.insert("engine->evaluate(\"0\")", 0); - value.insert("engine->evaluate(\"0.0\")", 0); - value.insert("engine->evaluate(\"123.0\")", 123); - value.insert("engine->evaluate(\"6.37e-8\")", 0); - value.insert("engine->evaluate(\"-6.37e-8\")", 0); - value.insert("engine->evaluate(\"0x43211234\")", 1126240820); - value.insert("engine->evaluate(\"0x10000\")", 65536); - value.insert("engine->evaluate(\"0x10001\")", 65537); - value.insert("engine->evaluate(\"NaN\")", 0); - value.insert("engine->evaluate(\"Infinity\")", 0); - value.insert("engine->evaluate(\"-Infinity\")", 0); - value.insert("engine->evaluate(\"'ciao'\")", 0); - value.insert("engine->evaluate(\"''\")", 0); - value.insert("engine->evaluate(\"'0'\")", 0); - value.insert("engine->evaluate(\"'123'\")", 123); - value.insert("engine->evaluate(\"'12.4'\")", 12); - value.insert("engine->nullValue()", 0); - value.insert("engine->undefinedValue()", 0); - value.insert("engine->newObject()", 0); - value.insert("engine->newArray()", 0); - value.insert("engine->newArray(10)", 0); - value.insert("engine->newDate(QDateTime())", 0); - value.insert("engine->newQMetaObject(&QObject::staticMetaObject)", 0); - value.insert("engine->newVariant(QVariant())", 0); - value.insert("engine->newVariant(QVariant(123))", 123); - value.insert("engine->newVariant(QVariant(false))", 0); - value.insert("engine->newQObject(0)", 0); - value.insert("engine->newQObject(engine)", 0); - } - newRow(expr) << value.value(expr); -} - -void tst_QScriptValue::qscriptvalue_castqint32_test(const char*, const QScriptValue& value) -{ - QFETCH(qint32, expected); - QCOMPARE(qscriptvalue_cast(value), expected); - QCOMPARE(qscriptvalue_cast(value), expected); -} - -DEFINE_TEST_FUNCTION(qscriptvalue_castqint32) - - -void tst_QScriptValue::qscriptvalue_castquint32_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::qscriptvalue_castquint32_makeData(const char* expr) -{ - static QHash value; - if (value.isEmpty()) { - value.insert("QScriptValue()", 0); - value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); - value.insert("QScriptValue(QScriptValue::NullValue)", 0); - value.insert("QScriptValue(true)", 1); - value.insert("QScriptValue(false)", 0); - value.insert("QScriptValue(int(122))", 122); - value.insert("QScriptValue(uint(124))", 124); - value.insert("QScriptValue(0)", 0); - value.insert("QScriptValue(0.0)", 0); - value.insert("QScriptValue(123.0)", 123); - value.insert("QScriptValue(6.37e-8)", 0); - value.insert("QScriptValue(-6.37e-8)", 0); - value.insert("QScriptValue(0x43211234)", 1126240820); - value.insert("QScriptValue(0x10000)", 65536); - value.insert("QScriptValue(0x10001)", 65537); - value.insert("QScriptValue(qSNaN())", 0); - value.insert("QScriptValue(qQNaN())", 0); - value.insert("QScriptValue(qInf())", 0); - value.insert("QScriptValue(-qInf())", 0); - value.insert("QScriptValue(\"NaN\")", 0); - value.insert("QScriptValue(\"Infinity\")", 0); - value.insert("QScriptValue(\"-Infinity\")", 0); - value.insert("QScriptValue(\"ciao\")", 0); - value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); - value.insert("QScriptValue(QString(\"\"))", 0); - value.insert("QScriptValue(QString())", 0); - value.insert("QScriptValue(QString(\"0\"))", 0); - value.insert("QScriptValue(QString(\"123\"))", 123); - value.insert("QScriptValue(QString(\"12.4\"))", 12); - value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); - value.insert("QScriptValue(0, QScriptValue::NullValue)", 0); - value.insert("QScriptValue(0, true)", 1); - value.insert("QScriptValue(0, false)", 0); - value.insert("QScriptValue(0, int(122))", 122); - value.insert("QScriptValue(0, uint(124))", 124); - value.insert("QScriptValue(0, 0)", 0); - value.insert("QScriptValue(0, 0.0)", 0); - value.insert("QScriptValue(0, 123.0)", 123); - value.insert("QScriptValue(0, 6.37e-8)", 0); - value.insert("QScriptValue(0, -6.37e-8)", 0); - value.insert("QScriptValue(0, 0x43211234)", 1126240820); - value.insert("QScriptValue(0, 0x10000)", 65536); - value.insert("QScriptValue(0, 0x10001)", 65537); - value.insert("QScriptValue(0, qSNaN())", 0); - value.insert("QScriptValue(0, qQNaN())", 0); - value.insert("QScriptValue(0, qInf())", 0); - value.insert("QScriptValue(0, -qInf())", 0); - value.insert("QScriptValue(0, \"NaN\")", 0); - value.insert("QScriptValue(0, \"Infinity\")", 0); - value.insert("QScriptValue(0, \"-Infinity\")", 0); - value.insert("QScriptValue(0, \"ciao\")", 0); - value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); - value.insert("QScriptValue(0, QString(\"\"))", 0); - value.insert("QScriptValue(0, QString())", 0); - value.insert("QScriptValue(0, QString(\"0\"))", 0); - value.insert("QScriptValue(0, QString(\"123\"))", 123); - value.insert("QScriptValue(0, QString(\"12.3\"))", 12); - value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); - value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); - value.insert("QScriptValue(engine, true)", 1); - value.insert("QScriptValue(engine, false)", 0); - value.insert("QScriptValue(engine, int(122))", 122); - value.insert("QScriptValue(engine, uint(124))", 124); - value.insert("QScriptValue(engine, 0)", 0); - value.insert("QScriptValue(engine, 0.0)", 0); - value.insert("QScriptValue(engine, 123.0)", 123); - value.insert("QScriptValue(engine, 6.37e-8)", 0); - value.insert("QScriptValue(engine, -6.37e-8)", 0); - value.insert("QScriptValue(engine, 0x43211234)", 1126240820); - value.insert("QScriptValue(engine, 0x10000)", 65536); - value.insert("QScriptValue(engine, 0x10001)", 65537); - value.insert("QScriptValue(engine, qSNaN())", 0); - value.insert("QScriptValue(engine, qQNaN())", 0); - value.insert("QScriptValue(engine, qInf())", 0); - value.insert("QScriptValue(engine, -qInf())", 0); - value.insert("QScriptValue(engine, \"NaN\")", 0); - value.insert("QScriptValue(engine, \"Infinity\")", 0); - value.insert("QScriptValue(engine, \"-Infinity\")", 0); - value.insert("QScriptValue(engine, \"ciao\")", 0); - value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); - value.insert("QScriptValue(engine, QString(\"\"))", 0); - value.insert("QScriptValue(engine, QString())", 0); - value.insert("QScriptValue(engine, QString(\"0\"))", 0); - value.insert("QScriptValue(engine, QString(\"123\"))", 123); - value.insert("QScriptValue(engine, QString(\"1.23\"))", 1); - value.insert("engine->evaluate(\"[]\")", 0); - value.insert("engine->evaluate(\"{}\")", 0); - value.insert("engine->evaluate(\"Object.prototype\")", 0); - value.insert("engine->evaluate(\"Date.prototype\")", 0); - value.insert("engine->evaluate(\"Array.prototype\")", 0); - value.insert("engine->evaluate(\"Function.prototype\")", 0); - value.insert("engine->evaluate(\"Error.prototype\")", 0); - value.insert("engine->evaluate(\"Object\")", 0); - value.insert("engine->evaluate(\"Array\")", 0); - value.insert("engine->evaluate(\"Number\")", 0); - value.insert("engine->evaluate(\"Function\")", 0); - value.insert("engine->evaluate(\"(function() { return 1; })\")", 0); - value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); - value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); - value.insert("engine->evaluate(\"/foo/\")", 0); - value.insert("engine->evaluate(\"new Object()\")", 0); - value.insert("engine->evaluate(\"new Array()\")", 0); - value.insert("engine->evaluate(\"new Error()\")", 0); - value.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); - value.insert("engine->evaluate(\"Undefined\")", 0); - value.insert("engine->evaluate(\"Null\")", 0); - value.insert("engine->evaluate(\"True\")", 0); - value.insert("engine->evaluate(\"False\")", 0); - value.insert("engine->evaluate(\"undefined\")", 0); - value.insert("engine->evaluate(\"null\")", 0); - value.insert("engine->evaluate(\"true\")", 1); - value.insert("engine->evaluate(\"false\")", 0); - value.insert("engine->evaluate(\"122\")", 122); - value.insert("engine->evaluate(\"124\")", 124); - value.insert("engine->evaluate(\"0\")", 0); - value.insert("engine->evaluate(\"0.0\")", 0); - value.insert("engine->evaluate(\"123.0\")", 123); - value.insert("engine->evaluate(\"6.37e-8\")", 0); - value.insert("engine->evaluate(\"-6.37e-8\")", 0); - value.insert("engine->evaluate(\"0x43211234\")", 1126240820); - value.insert("engine->evaluate(\"0x10000\")", 65536); - value.insert("engine->evaluate(\"0x10001\")", 65537); - value.insert("engine->evaluate(\"NaN\")", 0); - value.insert("engine->evaluate(\"Infinity\")", 0); - value.insert("engine->evaluate(\"-Infinity\")", 0); - value.insert("engine->evaluate(\"'ciao'\")", 0); - value.insert("engine->evaluate(\"''\")", 0); - value.insert("engine->evaluate(\"'0'\")", 0); - value.insert("engine->evaluate(\"'123'\")", 123); - value.insert("engine->evaluate(\"'12.4'\")", 12); - value.insert("engine->nullValue()", 0); - value.insert("engine->undefinedValue()", 0); - value.insert("engine->newObject()", 0); - value.insert("engine->newArray()", 0); - value.insert("engine->newArray(10)", 0); - value.insert("engine->newDate(QDateTime())", 0); - value.insert("engine->newQMetaObject(&QObject::staticMetaObject)", 0); - value.insert("engine->newVariant(QVariant())", 0); - value.insert("engine->newVariant(QVariant(123))", 123); - value.insert("engine->newVariant(QVariant(false))", 0); - value.insert("engine->newQObject(0)", 0); - value.insert("engine->newQObject(engine)", 0); - } - newRow(expr) << value.value(expr); -} - -void tst_QScriptValue::qscriptvalue_castquint32_test(const char*, const QScriptValue& value) -{ - QFETCH(quint32, expected); - QCOMPARE(qscriptvalue_cast(value), expected); - QCOMPARE(qscriptvalue_cast(value), expected); -} - -DEFINE_TEST_FUNCTION(qscriptvalue_castquint32) - - -void tst_QScriptValue::qscriptvalue_castquint16_initData() -{ - QTest::addColumn("expected"); - initScriptValues(); -} - -void tst_QScriptValue::qscriptvalue_castquint16_makeData(const char* expr) -{ - static QHash value; - if (value.isEmpty()) { - value.insert("QScriptValue()", 0); - value.insert("QScriptValue(QScriptValue::UndefinedValue)", 0); - value.insert("QScriptValue(QScriptValue::NullValue)", 0); - value.insert("QScriptValue(true)", 1); - value.insert("QScriptValue(false)", 0); - value.insert("QScriptValue(int(122))", 122); - value.insert("QScriptValue(uint(124))", 124); - value.insert("QScriptValue(0)", 0); - value.insert("QScriptValue(0.0)", 0); - value.insert("QScriptValue(123.0)", 123); - value.insert("QScriptValue(6.37e-8)", 0); - value.insert("QScriptValue(-6.37e-8)", 0); - value.insert("QScriptValue(0x43211234)", 4660); - value.insert("QScriptValue(0x10000)", 0); - value.insert("QScriptValue(0x10001)", 1); - value.insert("QScriptValue(qSNaN())", 0); - value.insert("QScriptValue(qQNaN())", 0); - value.insert("QScriptValue(qInf())", 0); - value.insert("QScriptValue(-qInf())", 0); - value.insert("QScriptValue(\"NaN\")", 0); - value.insert("QScriptValue(\"Infinity\")", 0); - value.insert("QScriptValue(\"-Infinity\")", 0); - value.insert("QScriptValue(\"ciao\")", 0); - value.insert("QScriptValue(QString::fromLatin1(\"ciao\"))", 0); - value.insert("QScriptValue(QString(\"\"))", 0); - value.insert("QScriptValue(QString())", 0); - value.insert("QScriptValue(QString(\"0\"))", 0); - value.insert("QScriptValue(QString(\"123\"))", 123); - value.insert("QScriptValue(QString(\"12.4\"))", 12); - value.insert("QScriptValue(0, QScriptValue::UndefinedValue)", 0); - value.insert("QScriptValue(0, QScriptValue::NullValue)", 0); - value.insert("QScriptValue(0, true)", 1); - value.insert("QScriptValue(0, false)", 0); - value.insert("QScriptValue(0, int(122))", 122); - value.insert("QScriptValue(0, uint(124))", 124); - value.insert("QScriptValue(0, 0)", 0); - value.insert("QScriptValue(0, 0.0)", 0); - value.insert("QScriptValue(0, 123.0)", 123); - value.insert("QScriptValue(0, 6.37e-8)", 0); - value.insert("QScriptValue(0, -6.37e-8)", 0); - value.insert("QScriptValue(0, 0x43211234)", 4660); - value.insert("QScriptValue(0, 0x10000)", 0); - value.insert("QScriptValue(0, 0x10001)", 1); - value.insert("QScriptValue(0, qSNaN())", 0); - value.insert("QScriptValue(0, qQNaN())", 0); - value.insert("QScriptValue(0, qInf())", 0); - value.insert("QScriptValue(0, -qInf())", 0); - value.insert("QScriptValue(0, \"NaN\")", 0); - value.insert("QScriptValue(0, \"Infinity\")", 0); - value.insert("QScriptValue(0, \"-Infinity\")", 0); - value.insert("QScriptValue(0, \"ciao\")", 0); - value.insert("QScriptValue(0, QString::fromLatin1(\"ciao\"))", 0); - value.insert("QScriptValue(0, QString(\"\"))", 0); - value.insert("QScriptValue(0, QString())", 0); - value.insert("QScriptValue(0, QString(\"0\"))", 0); - value.insert("QScriptValue(0, QString(\"123\"))", 123); - value.insert("QScriptValue(0, QString(\"12.3\"))", 12); - value.insert("QScriptValue(engine, QScriptValue::UndefinedValue)", 0); - value.insert("QScriptValue(engine, QScriptValue::NullValue)", 0); - value.insert("QScriptValue(engine, true)", 1); - value.insert("QScriptValue(engine, false)", 0); - value.insert("QScriptValue(engine, int(122))", 122); - value.insert("QScriptValue(engine, uint(124))", 124); - value.insert("QScriptValue(engine, 0)", 0); - value.insert("QScriptValue(engine, 0.0)", 0); - value.insert("QScriptValue(engine, 123.0)", 123); - value.insert("QScriptValue(engine, 6.37e-8)", 0); - value.insert("QScriptValue(engine, -6.37e-8)", 0); - value.insert("QScriptValue(engine, 0x43211234)", 4660); - value.insert("QScriptValue(engine, 0x10000)", 0); - value.insert("QScriptValue(engine, 0x10001)", 1); - value.insert("QScriptValue(engine, qSNaN())", 0); - value.insert("QScriptValue(engine, qQNaN())", 0); - value.insert("QScriptValue(engine, qInf())", 0); - value.insert("QScriptValue(engine, -qInf())", 0); - value.insert("QScriptValue(engine, \"NaN\")", 0); - value.insert("QScriptValue(engine, \"Infinity\")", 0); - value.insert("QScriptValue(engine, \"-Infinity\")", 0); - value.insert("QScriptValue(engine, \"ciao\")", 0); - value.insert("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", 0); - value.insert("QScriptValue(engine, QString(\"\"))", 0); - value.insert("QScriptValue(engine, QString())", 0); - value.insert("QScriptValue(engine, QString(\"0\"))", 0); - value.insert("QScriptValue(engine, QString(\"123\"))", 123); - value.insert("QScriptValue(engine, QString(\"1.23\"))", 1); - value.insert("engine->evaluate(\"[]\")", 0); - value.insert("engine->evaluate(\"{}\")", 0); - value.insert("engine->evaluate(\"Object.prototype\")", 0); - value.insert("engine->evaluate(\"Date.prototype\")", 0); - value.insert("engine->evaluate(\"Array.prototype\")", 0); - value.insert("engine->evaluate(\"Function.prototype\")", 0); - value.insert("engine->evaluate(\"Error.prototype\")", 0); - value.insert("engine->evaluate(\"Object\")", 0); - value.insert("engine->evaluate(\"Array\")", 0); - value.insert("engine->evaluate(\"Number\")", 0); - value.insert("engine->evaluate(\"Function\")", 0); - value.insert("engine->evaluate(\"(function() { return 1; })\")", 0); - value.insert("engine->evaluate(\"(function() { return 'ciao'; })\")", 0); - value.insert("engine->evaluate(\"(function() { throw new Error('foo'); })\")", 0); - value.insert("engine->evaluate(\"/foo/\")", 0); - value.insert("engine->evaluate(\"new Object()\")", 0); - value.insert("engine->evaluate(\"new Array()\")", 0); - value.insert("engine->evaluate(\"new Error()\")", 0); - value.insert("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", 22); - value.insert("engine->evaluate(\"Undefined\")", 0); - value.insert("engine->evaluate(\"Null\")", 0); - value.insert("engine->evaluate(\"True\")", 0); - value.insert("engine->evaluate(\"False\")", 0); - value.insert("engine->evaluate(\"undefined\")", 0); - value.insert("engine->evaluate(\"null\")", 0); - value.insert("engine->evaluate(\"true\")", 1); - value.insert("engine->evaluate(\"false\")", 0); - value.insert("engine->evaluate(\"122\")", 122); - value.insert("engine->evaluate(\"124\")", 124); - value.insert("engine->evaluate(\"0\")", 0); - value.insert("engine->evaluate(\"0.0\")", 0); - value.insert("engine->evaluate(\"123.0\")", 123); - value.insert("engine->evaluate(\"6.37e-8\")", 0); - value.insert("engine->evaluate(\"-6.37e-8\")", 0); - value.insert("engine->evaluate(\"0x43211234\")", 4660); - value.insert("engine->evaluate(\"0x10000\")", 0); - value.insert("engine->evaluate(\"0x10001\")", 1); - value.insert("engine->evaluate(\"NaN\")", 0); - value.insert("engine->evaluate(\"Infinity\")", 0); - value.insert("engine->evaluate(\"-Infinity\")", 0); - value.insert("engine->evaluate(\"'ciao'\")", 0); - value.insert("engine->evaluate(\"''\")", 0); - value.insert("engine->evaluate(\"'0'\")", 0); - value.insert("engine->evaluate(\"'123'\")", 123); - value.insert("engine->evaluate(\"'12.4'\")", 12); - value.insert("engine->nullValue()", 0); - value.insert("engine->undefinedValue()", 0); - value.insert("engine->newObject()", 0); - value.insert("engine->newArray()", 0); - value.insert("engine->newArray(10)", 0); - value.insert("engine->newDate(QDateTime())", 0); - value.insert("engine->newQMetaObject(&QObject::staticMetaObject)", 0); - value.insert("engine->newVariant(QVariant())", 0); - value.insert("engine->newVariant(QVariant(123))", 123); - value.insert("engine->newVariant(QVariant(false))", 0); - value.insert("engine->newQObject(0)", 0); - value.insert("engine->newQObject(engine)", 0); - } - newRow(expr) << value.value(expr); -} - -void tst_QScriptValue::qscriptvalue_castquint16_test(const char*, const QScriptValue& value) -{ - QFETCH(quint16, expected); - QCOMPARE(qscriptvalue_cast(value), expected); - QCOMPARE(qscriptvalue_cast(value), expected); -} - -DEFINE_TEST_FUNCTION(qscriptvalue_castquint16) diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated_cast.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_cast.cpp new file mode 100644 index 0000000..e651810 --- /dev/null +++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_cast.cpp @@ -0,0 +1,1453 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/**************************************************************************** +*************** This file has been generated. DO NOT MODIFY! **************** +****************************************************************************/ + +#include "tst_qscriptvalue.h" + + + +void tst_QScriptValue::qscriptvalue_castQString_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString qscriptvalue_castQString_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; +static QString qscriptvalue_castQString_valueArray [] = { + "", "", + "", "true", + "false", "122", + "124", "0", + "0", "123", + "6.37e-8", "-6.37e-8", + "1126240820", "65536", + "65537", "NaN", + "NaN", "Infinity", + "-Infinity", "NaN", + "Infinity", "-Infinity", + "ciao", "ciao", + "", "", + "0", "123", + "12.4", "", + "", "true", + "false", "122", + "124", "0", + "0", "123", + "6.37e-8", "-6.37e-8", + "1126240820", "65536", + "65537", "NaN", + "NaN", "Infinity", + "-Infinity", "NaN", + "Infinity", "-Infinity", + "ciao", "ciao", + "", "", + "0", "123", + "12.3", "", + "", "true", + "false", "122", + "124", "0", + "0", "123", + "6.37e-8", "-6.37e-8", + "1126240820", "65536", + "65537", "NaN", + "NaN", "Infinity", + "-Infinity", "NaN", + "Infinity", "-Infinity", + "ciao", "ciao", + "", "", + "0", "123", + "1.23", "", + "", "[object Object]", + "Invalid Date", "", + "function () {\n [native code]\n}", "Error: Unknown error", + "function Object() {\n [native code]\n}", "function Array() {\n [native code]\n}", + "function Number() {\n [native code]\n}", "function Function() {\n [native code]\n}", + "function () { return 1; }", "function () { return 'ciao'; }", + "function () { throw new Error('foo'); }", "/foo/", + "[object Object]", "", + "Error: Unknown error", "22", + "ReferenceError: Can't find variable: Undefined", "ReferenceError: Can't find variable: Null", + "ReferenceError: Can't find variable: True", "ReferenceError: Can't find variable: False", + "", "", + "true", "false", + "122", "124", + "0", "0", + "123", "6.37e-8", + "-6.37e-8", "1126240820", + "65536", "65537", + "NaN", "Infinity", + "-Infinity", "ciao", + "", "0", + "123", "12.4", + "", "", + "[object Object]", "", + ",,,,,,,,,", "Invalid Date", + "[object QMetaObject]", "undefined", + "123", "false", + "", "QScriptEngine(name = \"\")", }; +void tst_QScriptValue::qscriptvalue_castQString_makeData(const char* expr) +{ + static QHash value; + if (value.isEmpty()) { + value.reserve(142); + for (unsigned i = 0; i < 142; ++i) + value.insert(qscriptvalue_castQString_tagArray[i], qscriptvalue_castQString_valueArray[i]); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castQString_test(const char*, const QScriptValue& value) +{ + QFETCH(QString, expected); + QCOMPARE(qscriptvalue_cast(value), expected); + QCOMPARE(qscriptvalue_cast(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castQString) + + +void tst_QScriptValue::qscriptvalue_castqsreal_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString qscriptvalue_castqsreal_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; +static qsreal qscriptvalue_castqsreal_valueArray [] = { + 0, qQNaN(), 0, 1, 0, 122, 124, 0, 0, 123, + 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), + qInf(), qInf(), qQNaN(), qQNaN(), 0, 0, 0, 123, 12.4, qQNaN(), + 0, 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, + 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(), + qQNaN(), qQNaN(), 0, 0, 0, 123, 12.3, qQNaN(), 0, 1, + 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536, + 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(), qQNaN(), qQNaN(), + 0, 0, 0, 123, 1.23, 0, qQNaN(), qQNaN(), qQNaN(), 0, + qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), + qQNaN(), 0, qQNaN(), 22, qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), 0, + 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, + 65536, 65537, qQNaN(), qInf(), qInf(), qQNaN(), 0, 0, 123, 12.4, + 0, qQNaN(), qQNaN(), 0, qQNaN(), qQNaN(), qQNaN(), qQNaN(), 123, 0, + 0, qQNaN(), }; +void tst_QScriptValue::qscriptvalue_castqsreal_makeData(const char* expr) +{ + static QHash value; + if (value.isEmpty()) { + value.reserve(142); + for (unsigned i = 0; i < 142; ++i) + value.insert(qscriptvalue_castqsreal_tagArray[i], qscriptvalue_castqsreal_valueArray[i]); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castqsreal_test(const char*, const QScriptValue& value) +{ + QFETCH(qsreal, expected); + if (qIsNaN(expected)) { + QVERIFY(qIsNaN(qscriptvalue_cast(value))); + QVERIFY(qIsNaN(qscriptvalue_cast(value))); + return; + } + if (qIsInf(expected)) { + QVERIFY(qIsInf(qscriptvalue_cast(value))); + QVERIFY(qIsInf(qscriptvalue_cast(value))); + return; + } + QCOMPARE(qscriptvalue_cast(value), expected); + QCOMPARE(qscriptvalue_cast(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castqsreal) + + +void tst_QScriptValue::qscriptvalue_castbool_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString qscriptvalue_castbool_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; +static bool qscriptvalue_castbool_valueArray [] = { + false, false, + false, true, + false, true, + true, false, + false, true, + true, true, + true, true, + true, false, + false, true, + true, true, + true, true, + true, true, + false, false, + true, true, + true, false, + false, true, + false, true, + true, false, + false, true, + true, true, + true, true, + true, false, + false, true, + true, true, + true, true, + true, true, + false, false, + true, true, + true, false, + false, true, + false, true, + true, false, + false, true, + true, true, + true, true, + true, false, + false, true, + true, true, + true, true, + true, true, + false, false, + true, true, + true, true, + false, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + false, false, + true, false, + true, true, + false, false, + true, true, + true, true, + true, true, + false, true, + true, true, + false, true, + true, true, + false, false, + true, true, + true, true, + true, true, + true, true, + false, true, }; +void tst_QScriptValue::qscriptvalue_castbool_makeData(const char* expr) +{ + static QHash value; + if (value.isEmpty()) { + value.reserve(142); + for (unsigned i = 0; i < 142; ++i) + value.insert(qscriptvalue_castbool_tagArray[i], qscriptvalue_castbool_valueArray[i]); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castbool_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(qscriptvalue_cast(value), expected); + QCOMPARE(qscriptvalue_cast(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castbool) + + +void tst_QScriptValue::qscriptvalue_castqint32_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString qscriptvalue_castqint32_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; +static qint32 qscriptvalue_castqint32_valueArray [] = { + 0, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 1126240820, 65536, + 65537, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 12, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 1126240820, 65536, + 65537, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 12, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 1126240820, 65536, + 65537, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 1, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 22, + 0, 0, + 0, 0, + 0, 0, + 1, 0, + 122, 124, + 0, 0, + 123, 0, + 0, 1126240820, + 65536, 65537, + 0, 0, + 0, 0, + 0, 0, + 123, 12, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 123, 0, + 0, 0, }; +void tst_QScriptValue::qscriptvalue_castqint32_makeData(const char* expr) +{ + static QHash value; + if (value.isEmpty()) { + value.reserve(142); + for (unsigned i = 0; i < 142; ++i) + value.insert(qscriptvalue_castqint32_tagArray[i], qscriptvalue_castqint32_valueArray[i]); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castqint32_test(const char*, const QScriptValue& value) +{ + QFETCH(qint32, expected); + QCOMPARE(qscriptvalue_cast(value), expected); + QCOMPARE(qscriptvalue_cast(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castqint32) + + +void tst_QScriptValue::qscriptvalue_castquint32_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString qscriptvalue_castquint32_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; +static quint32 qscriptvalue_castquint32_valueArray [] = { + 0, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 1126240820, 65536, + 65537, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 12, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 1126240820, 65536, + 65537, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 12, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 1126240820, 65536, + 65537, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 1, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 22, + 0, 0, + 0, 0, + 0, 0, + 1, 0, + 122, 124, + 0, 0, + 123, 0, + 0, 1126240820, + 65536, 65537, + 0, 0, + 0, 0, + 0, 0, + 123, 12, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 123, 0, + 0, 0, }; +void tst_QScriptValue::qscriptvalue_castquint32_makeData(const char* expr) +{ + static QHash value; + if (value.isEmpty()) { + value.reserve(142); + for (unsigned i = 0; i < 142; ++i) + value.insert(qscriptvalue_castquint32_tagArray[i], qscriptvalue_castquint32_valueArray[i]); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castquint32_test(const char*, const QScriptValue& value) +{ + QFETCH(quint32, expected); + QCOMPARE(qscriptvalue_cast(value), expected); + QCOMPARE(qscriptvalue_cast(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castquint32) + + +void tst_QScriptValue::qscriptvalue_castquint16_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString qscriptvalue_castquint16_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; +static quint16 qscriptvalue_castquint16_valueArray [] = { + 0, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 4660, 0, + 1, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 12, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 4660, 0, + 1, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 12, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 4660, 0, + 1, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 1, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 22, + 0, 0, + 0, 0, + 0, 0, + 1, 0, + 122, 124, + 0, 0, + 123, 0, + 0, 4660, + 0, 1, + 0, 0, + 0, 0, + 0, 0, + 123, 12, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 123, 0, + 0, 0, }; +void tst_QScriptValue::qscriptvalue_castquint16_makeData(const char* expr) +{ + static QHash value; + if (value.isEmpty()) { + value.reserve(142); + for (unsigned i = 0; i < 142; ++i) + value.insert(qscriptvalue_castquint16_tagArray[i], qscriptvalue_castquint16_valueArray[i]); + } + newRow(expr) << value.value(expr); +} + +void tst_QScriptValue::qscriptvalue_castquint16_test(const char*, const QScriptValue& value) +{ + QFETCH(quint16, expected); + QCOMPARE(qscriptvalue_cast(value), expected); + QCOMPARE(qscriptvalue_cast(value), expected); +} + +DEFINE_TEST_FUNCTION(qscriptvalue_castquint16) diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp new file mode 100644 index 0000000..6e1f8ee --- /dev/null +++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp @@ -0,0 +1,7026 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/**************************************************************************** +*************** This file has been generated. DO NOT MODIFY! **************** +****************************************************************************/ + +#include "tst_qscriptvalue.h" + + + +void tst_QScriptValue::equals_initData() +{ + QTest::addColumn("other"); + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString equals_array [] = { + "QScriptValue() <=> QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")", + "QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")", + "QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"null\")", + "QScriptValue(QScriptValue::UndefinedValue) <=> engine->nullValue()", + "QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()", + "QScriptValue(QScriptValue::UndefinedValue) <=> engine->newQObject(0)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"{}\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"undefined\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"null\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()", + "QScriptValue(QScriptValue::NullValue) <=> engine->undefinedValue()", + "QScriptValue(QScriptValue::NullValue) <=> engine->newQObject(0)", + "QScriptValue(true) <=> QScriptValue(true)", + "QScriptValue(true) <=> QScriptValue(0, true)", + "QScriptValue(true) <=> QScriptValue(engine, true)", + "QScriptValue(true) <=> engine->evaluate(\"true\")", + "QScriptValue(false) <=> QScriptValue(false)", + "QScriptValue(false) <=> QScriptValue(0)", + "QScriptValue(false) <=> QScriptValue(0.0)", + "QScriptValue(false) <=> QScriptValue(QString(\"\"))", + "QScriptValue(false) <=> QScriptValue(QString())", + "QScriptValue(false) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(false) <=> QScriptValue(0, false)", + "QScriptValue(false) <=> QScriptValue(0, 0)", + "QScriptValue(false) <=> QScriptValue(0, 0.0)", + "QScriptValue(false) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(false) <=> QScriptValue(0, QString())", + "QScriptValue(false) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(false) <=> QScriptValue(engine, false)", + "QScriptValue(false) <=> QScriptValue(engine, 0)", + "QScriptValue(false) <=> QScriptValue(engine, 0.0)", + "QScriptValue(false) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(false) <=> QScriptValue(engine, QString())", + "QScriptValue(false) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(false) <=> engine->evaluate(\"[]\")", + "QScriptValue(false) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(false) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(false) <=> engine->evaluate(\"false\")", + "QScriptValue(false) <=> engine->evaluate(\"0\")", + "QScriptValue(false) <=> engine->evaluate(\"0.0\")", + "QScriptValue(false) <=> engine->evaluate(\"''\")", + "QScriptValue(false) <=> engine->evaluate(\"'0'\")", + "QScriptValue(false) <=> engine->newArray()", + "QScriptValue(false) <=> engine->newVariant(QVariant(false))", + "QScriptValue(int(122)) <=> QScriptValue(int(122))", + "QScriptValue(int(122)) <=> QScriptValue(0, int(122))", + "QScriptValue(int(122)) <=> QScriptValue(engine, int(122))", + "QScriptValue(int(122)) <=> engine->evaluate(\"122\")", + "QScriptValue(uint(124)) <=> QScriptValue(uint(124))", + "QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))", + "QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))", + "QScriptValue(uint(124)) <=> engine->evaluate(\"124\")", + "QScriptValue(0) <=> QScriptValue(false)", + "QScriptValue(0) <=> QScriptValue(0)", + "QScriptValue(0) <=> QScriptValue(0.0)", + "QScriptValue(0) <=> QScriptValue(QString(\"\"))", + "QScriptValue(0) <=> QScriptValue(QString())", + "QScriptValue(0) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(0) <=> QScriptValue(0, false)", + "QScriptValue(0) <=> QScriptValue(0, 0)", + "QScriptValue(0) <=> QScriptValue(0, 0.0)", + "QScriptValue(0) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(0) <=> QScriptValue(0, QString())", + "QScriptValue(0) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(0) <=> QScriptValue(engine, false)", + "QScriptValue(0) <=> QScriptValue(engine, 0)", + "QScriptValue(0) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(0) <=> QScriptValue(engine, QString())", + "QScriptValue(0) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(0) <=> engine->evaluate(\"[]\")", + "QScriptValue(0) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(0) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(0) <=> engine->evaluate(\"false\")", + "QScriptValue(0) <=> engine->evaluate(\"0\")", + "QScriptValue(0) <=> engine->evaluate(\"0.0\")", + "QScriptValue(0) <=> engine->evaluate(\"''\")", + "QScriptValue(0) <=> engine->evaluate(\"'0'\")", + "QScriptValue(0) <=> engine->newArray()", + "QScriptValue(0) <=> engine->newVariant(QVariant(false))", + "QScriptValue(0.0) <=> QScriptValue(false)", + "QScriptValue(0.0) <=> QScriptValue(0)", + "QScriptValue(0.0) <=> QScriptValue(0.0)", + "QScriptValue(0.0) <=> QScriptValue(QString(\"\"))", + "QScriptValue(0.0) <=> QScriptValue(QString())", + "QScriptValue(0.0) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(0.0) <=> QScriptValue(0, false)", + "QScriptValue(0.0) <=> QScriptValue(0, 0)", + "QScriptValue(0.0) <=> QScriptValue(0, 0.0)", + "QScriptValue(0.0) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(0.0) <=> QScriptValue(0, QString())", + "QScriptValue(0.0) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(0.0) <=> QScriptValue(engine, false)", + "QScriptValue(0.0) <=> QScriptValue(engine, 0)", + "QScriptValue(0.0) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0.0) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(0.0) <=> QScriptValue(engine, QString())", + "QScriptValue(0.0) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(0.0) <=> engine->evaluate(\"[]\")", + "QScriptValue(0.0) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(0.0) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(0.0) <=> engine->evaluate(\"false\")", + "QScriptValue(0.0) <=> engine->evaluate(\"0\")", + "QScriptValue(0.0) <=> engine->evaluate(\"0.0\")", + "QScriptValue(0.0) <=> engine->evaluate(\"''\")", + "QScriptValue(0.0) <=> engine->evaluate(\"'0'\")", + "QScriptValue(0.0) <=> engine->newArray()", + "QScriptValue(0.0) <=> engine->newVariant(QVariant(false))", + "QScriptValue(123.0) <=> QScriptValue(123.0)", + "QScriptValue(123.0) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(123.0) <=> QScriptValue(0, 123.0)", + "QScriptValue(123.0) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(123.0) <=> QScriptValue(engine, 123.0)", + "QScriptValue(123.0) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(123.0) <=> engine->evaluate(\"123.0\")", + "QScriptValue(123.0) <=> engine->evaluate(\"'123'\")", + "QScriptValue(123.0) <=> engine->newVariant(QVariant(123))", + "QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)", + "QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(6.37e-8) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"-6.37e-8\")", + "QScriptValue(0x43211234) <=> QScriptValue(0x43211234)", + "QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0x43211234) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0x10000) <=> QScriptValue(0x10000)", + "QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0x10000) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0x10001) <=> QScriptValue(0x10001)", + "QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0x10001) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(qInf()) <=> QScriptValue(qInf())", + "QScriptValue(qInf()) <=> QScriptValue(\"Infinity\")", + "QScriptValue(qInf()) <=> QScriptValue(0, qInf())", + "QScriptValue(qInf()) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(qInf()) <=> QScriptValue(engine, qInf())", + "QScriptValue(qInf()) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(qInf()) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(-qInf()) <=> QScriptValue(-qInf())", + "QScriptValue(-qInf()) <=> QScriptValue(\"-Infinity\")", + "QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())", + "QScriptValue(-qInf()) <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())", + "QScriptValue(-qInf()) <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"-Infinity\")", + "QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")", + "QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")", + "QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(\"Infinity\") <=> QScriptValue(qInf())", + "QScriptValue(\"Infinity\") <=> QScriptValue(\"Infinity\")", + "QScriptValue(\"Infinity\") <=> QScriptValue(0, qInf())", + "QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(\"Infinity\") <=> QScriptValue(engine, qInf())", + "QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Infinity\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(-qInf())", + "QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, -qInf())", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -qInf())", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"-Infinity\")", + "QScriptValue(\"ciao\") <=> QScriptValue(\"ciao\")", + "QScriptValue(\"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"ciao\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"ciao\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(false)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0.0)", + "QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(QString())", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, false)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, 0)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, 0.0)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, false)", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0)", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0.0)", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"[]\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"false\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"0\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"0.0\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"''\")", + "QScriptValue(QString(\"\")) <=> engine->newArray()", + "QScriptValue(QString(\"\")) <=> engine->newVariant(QVariant(false))", + "QScriptValue(QString()) <=> QScriptValue(false)", + "QScriptValue(QString()) <=> QScriptValue(0)", + "QScriptValue(QString()) <=> QScriptValue(0.0)", + "QScriptValue(QString()) <=> QScriptValue(QString(\"\"))", + "QScriptValue(QString()) <=> QScriptValue(QString())", + "QScriptValue(QString()) <=> QScriptValue(0, false)", + "QScriptValue(QString()) <=> QScriptValue(0, 0)", + "QScriptValue(QString()) <=> QScriptValue(0, 0.0)", + "QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(QString()) <=> QScriptValue(0, QString())", + "QScriptValue(QString()) <=> QScriptValue(engine, false)", + "QScriptValue(QString()) <=> QScriptValue(engine, 0)", + "QScriptValue(QString()) <=> QScriptValue(engine, 0.0)", + "QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(QString()) <=> QScriptValue(engine, QString())", + "QScriptValue(QString()) <=> engine->evaluate(\"[]\")", + "QScriptValue(QString()) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(QString()) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(QString()) <=> engine->evaluate(\"false\")", + "QScriptValue(QString()) <=> engine->evaluate(\"0\")", + "QScriptValue(QString()) <=> engine->evaluate(\"0.0\")", + "QScriptValue(QString()) <=> engine->evaluate(\"''\")", + "QScriptValue(QString()) <=> engine->newArray()", + "QScriptValue(QString()) <=> engine->newVariant(QVariant(false))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(false)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0.0)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, false)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0.0)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, false)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0.0)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"false\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0.0\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'0'\")", + "QScriptValue(QString(\"0\")) <=> engine->newVariant(QVariant(false))", + "QScriptValue(QString(\"123\")) <=> QScriptValue(123.0)", + "QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0, 123.0)", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 123.0)", + "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"123.0\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(QString(\"123\")) <=> engine->newVariant(QVariant(123))", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"null\")", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->nullValue()", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->newQObject(0)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"undefined\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"null\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->undefinedValue()", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->newQObject(0)", + "QScriptValue(0, true) <=> QScriptValue(true)", + "QScriptValue(0, true) <=> QScriptValue(0, true)", + "QScriptValue(0, true) <=> QScriptValue(engine, true)", + "QScriptValue(0, true) <=> engine->evaluate(\"true\")", + "QScriptValue(0, false) <=> QScriptValue(false)", + "QScriptValue(0, false) <=> QScriptValue(0)", + "QScriptValue(0, false) <=> QScriptValue(0.0)", + "QScriptValue(0, false) <=> QScriptValue(QString(\"\"))", + "QScriptValue(0, false) <=> QScriptValue(QString())", + "QScriptValue(0, false) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(0, false) <=> QScriptValue(0, false)", + "QScriptValue(0, false) <=> QScriptValue(0, 0)", + "QScriptValue(0, false) <=> QScriptValue(0, 0.0)", + "QScriptValue(0, false) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(0, false) <=> QScriptValue(0, QString())", + "QScriptValue(0, false) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, false) <=> QScriptValue(engine, false)", + "QScriptValue(0, false) <=> QScriptValue(engine, 0)", + "QScriptValue(0, false) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0, false) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(0, false) <=> QScriptValue(engine, QString())", + "QScriptValue(0, false) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(0, false) <=> engine->evaluate(\"[]\")", + "QScriptValue(0, false) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(0, false) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(0, false) <=> engine->evaluate(\"false\")", + "QScriptValue(0, false) <=> engine->evaluate(\"0\")", + "QScriptValue(0, false) <=> engine->evaluate(\"0.0\")", + "QScriptValue(0, false) <=> engine->evaluate(\"''\")", + "QScriptValue(0, false) <=> engine->evaluate(\"'0'\")", + "QScriptValue(0, false) <=> engine->newArray()", + "QScriptValue(0, false) <=> engine->newVariant(QVariant(false))", + "QScriptValue(0, int(122)) <=> QScriptValue(int(122))", + "QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))", + "QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, int(122)) <=> engine->evaluate(\"122\")", + "QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))", + "QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, uint(124)) <=> engine->evaluate(\"124\")", + "QScriptValue(0, 0) <=> QScriptValue(false)", + "QScriptValue(0, 0) <=> QScriptValue(0)", + "QScriptValue(0, 0) <=> QScriptValue(0.0)", + "QScriptValue(0, 0) <=> QScriptValue(QString(\"\"))", + "QScriptValue(0, 0) <=> QScriptValue(QString())", + "QScriptValue(0, 0) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(0, 0) <=> QScriptValue(0, false)", + "QScriptValue(0, 0) <=> QScriptValue(0, 0)", + "QScriptValue(0, 0) <=> QScriptValue(0, 0.0)", + "QScriptValue(0, 0) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(0, 0) <=> QScriptValue(0, QString())", + "QScriptValue(0, 0) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, 0) <=> QScriptValue(engine, false)", + "QScriptValue(0, 0) <=> QScriptValue(engine, 0)", + "QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(0, 0) <=> QScriptValue(engine, QString())", + "QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(0, 0) <=> engine->evaluate(\"[]\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"false\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"0\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"0.0\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"''\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"'0'\")", + "QScriptValue(0, 0) <=> engine->newArray()", + "QScriptValue(0, 0) <=> engine->newVariant(QVariant(false))", + "QScriptValue(0, 0.0) <=> QScriptValue(false)", + "QScriptValue(0, 0.0) <=> QScriptValue(0)", + "QScriptValue(0, 0.0) <=> QScriptValue(0.0)", + "QScriptValue(0, 0.0) <=> QScriptValue(QString(\"\"))", + "QScriptValue(0, 0.0) <=> QScriptValue(QString())", + "QScriptValue(0, 0.0) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(0, 0.0) <=> QScriptValue(0, false)", + "QScriptValue(0, 0.0) <=> QScriptValue(0, 0)", + "QScriptValue(0, 0.0) <=> QScriptValue(0, 0.0)", + "QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(0, 0.0) <=> QScriptValue(0, QString())", + "QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, false)", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0)", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, QString())", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"[]\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"false\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"0\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"0.0\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"''\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"'0'\")", + "QScriptValue(0, 0.0) <=> engine->newArray()", + "QScriptValue(0, 0.0) <=> engine->newVariant(QVariant(false))", + "QScriptValue(0, 123.0) <=> QScriptValue(123.0)", + "QScriptValue(0, 123.0) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, 123.0) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, 123.0) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, 123.0) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, 123.0) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, 123.0) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")", + "QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)", + "QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, 0x43211234) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)", + "QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)", + "QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, 0x10001) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, qInf()) <=> QScriptValue(qInf())", + "QScriptValue(0, qInf()) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())", + "QScriptValue(0, qInf()) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, qInf()) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, qInf()) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())", + "QScriptValue(0, -qInf()) <=> QScriptValue(\"-Infinity\")", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"-Infinity\")", + "QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")", + "QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(qInf())", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(0, qInf())", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, qInf())", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(-qInf())", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -qInf())", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -qInf())", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"-Infinity\")", + "QScriptValue(0, \"ciao\") <=> QScriptValue(\"ciao\")", + "QScriptValue(0, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"ciao\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(false)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0.0)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, false)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0.0)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, false)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString())", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"[]\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"false\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0.0\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"''\")", + "QScriptValue(0, QString(\"\")) <=> engine->newArray()", + "QScriptValue(0, QString(\"\")) <=> engine->newVariant(QVariant(false))", + "QScriptValue(0, QString()) <=> QScriptValue(false)", + "QScriptValue(0, QString()) <=> QScriptValue(0)", + "QScriptValue(0, QString()) <=> QScriptValue(0.0)", + "QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))", + "QScriptValue(0, QString()) <=> QScriptValue(QString())", + "QScriptValue(0, QString()) <=> QScriptValue(0, false)", + "QScriptValue(0, QString()) <=> QScriptValue(0, 0)", + "QScriptValue(0, QString()) <=> QScriptValue(0, 0.0)", + "QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString()) <=> QScriptValue(0, QString())", + "QScriptValue(0, QString()) <=> QScriptValue(engine, false)", + "QScriptValue(0, QString()) <=> QScriptValue(engine, 0)", + "QScriptValue(0, QString()) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(0, QString()) <=> QScriptValue(engine, QString())", + "QScriptValue(0, QString()) <=> engine->evaluate(\"[]\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"false\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"0\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"0.0\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"''\")", + "QScriptValue(0, QString()) <=> engine->newArray()", + "QScriptValue(0, QString()) <=> engine->newVariant(QVariant(false))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(false)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0.0)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, false)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0.0)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, false)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"false\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0.0\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'0'\")", + "QScriptValue(0, QString(\"0\")) <=> engine->newVariant(QVariant(false))", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(123.0)", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, QString(\"123\")) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"null\")", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->nullValue()", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->newQObject(0)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"{}\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"undefined\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"null\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->undefinedValue()", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->newQObject(0)", + "QScriptValue(engine, true) <=> QScriptValue(true)", + "QScriptValue(engine, true) <=> QScriptValue(0, true)", + "QScriptValue(engine, true) <=> QScriptValue(engine, true)", + "QScriptValue(engine, true) <=> engine->evaluate(\"true\")", + "QScriptValue(engine, false) <=> QScriptValue(false)", + "QScriptValue(engine, false) <=> QScriptValue(0)", + "QScriptValue(engine, false) <=> QScriptValue(0.0)", + "QScriptValue(engine, false) <=> QScriptValue(QString(\"\"))", + "QScriptValue(engine, false) <=> QScriptValue(QString())", + "QScriptValue(engine, false) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(engine, false) <=> QScriptValue(0, false)", + "QScriptValue(engine, false) <=> QScriptValue(0, 0)", + "QScriptValue(engine, false) <=> QScriptValue(0, 0.0)", + "QScriptValue(engine, false) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(engine, false) <=> QScriptValue(0, QString())", + "QScriptValue(engine, false) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(engine, false) <=> QScriptValue(engine, false)", + "QScriptValue(engine, false) <=> QScriptValue(engine, 0)", + "QScriptValue(engine, false) <=> QScriptValue(engine, 0.0)", + "QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, false) <=> QScriptValue(engine, QString())", + "QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, false) <=> engine->evaluate(\"[]\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"false\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"0\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"0.0\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"''\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"'0'\")", + "QScriptValue(engine, false) <=> engine->newArray()", + "QScriptValue(engine, false) <=> engine->newVariant(QVariant(false))", + "QScriptValue(engine, int(122)) <=> QScriptValue(int(122))", + "QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, int(122)) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))", + "QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, uint(124)) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, 0) <=> QScriptValue(false)", + "QScriptValue(engine, 0) <=> QScriptValue(0)", + "QScriptValue(engine, 0) <=> QScriptValue(0.0)", + "QScriptValue(engine, 0) <=> QScriptValue(QString(\"\"))", + "QScriptValue(engine, 0) <=> QScriptValue(QString())", + "QScriptValue(engine, 0) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(engine, 0) <=> QScriptValue(0, false)", + "QScriptValue(engine, 0) <=> QScriptValue(0, 0)", + "QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)", + "QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(engine, 0) <=> QScriptValue(0, QString())", + "QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(engine, 0) <=> QScriptValue(engine, false)", + "QScriptValue(engine, 0) <=> QScriptValue(engine, 0)", + "QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)", + "QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, 0) <=> QScriptValue(engine, QString())", + "QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, 0) <=> engine->evaluate(\"[]\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"false\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"0\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"0.0\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"''\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"'0'\")", + "QScriptValue(engine, 0) <=> engine->newArray()", + "QScriptValue(engine, 0) <=> engine->newVariant(QVariant(false))", + "QScriptValue(engine, 0.0) <=> QScriptValue(false)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0.0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"\"))", + "QScriptValue(engine, 0.0) <=> QScriptValue(QString())", + "QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, false)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0.0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, QString())", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, false)", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0.0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString())", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"[]\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"false\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0.0\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"''\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"'0'\")", + "QScriptValue(engine, 0.0) <=> engine->newArray()", + "QScriptValue(engine, 0.0) <=> engine->newVariant(QVariant(false))", + "QScriptValue(engine, 123.0) <=> QScriptValue(123.0)", + "QScriptValue(engine, 123.0) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, 123.0) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, 123.0) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, 123.0) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, 123.0) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, 123.0) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")", + "QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x43211234) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)", + "QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)", + "QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, 0x10001) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, qInf()) <=> QScriptValue(qInf())", + "QScriptValue(engine, qInf()) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, qInf()) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, qInf()) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, qInf()) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())", + "QScriptValue(engine, -qInf()) <=> QScriptValue(\"-Infinity\")", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"-Infinity\")", + "QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")", + "QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")", + "QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(qInf())", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, qInf())", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-qInf())", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -qInf())", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"-Infinity\")", + "QScriptValue(engine, \"ciao\") <=> QScriptValue(\"ciao\")", + "QScriptValue(engine, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"ciao\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(false)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0.0)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, false)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0.0)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, false)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0.0)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"[]\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"false\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0.0\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"''\")", + "QScriptValue(engine, QString(\"\")) <=> engine->newArray()", + "QScriptValue(engine, QString(\"\")) <=> engine->newVariant(QVariant(false))", + "QScriptValue(engine, QString()) <=> QScriptValue(false)", + "QScriptValue(engine, QString()) <=> QScriptValue(0)", + "QScriptValue(engine, QString()) <=> QScriptValue(0.0)", + "QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(QString())", + "QScriptValue(engine, QString()) <=> QScriptValue(0, false)", + "QScriptValue(engine, QString()) <=> QScriptValue(0, 0)", + "QScriptValue(engine, QString()) <=> QScriptValue(0, 0.0)", + "QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(0, QString())", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, false)", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, 0)", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, 0.0)", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString())", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"[]\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"false\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"0\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"0.0\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"''\")", + "QScriptValue(engine, QString()) <=> engine->newArray()", + "QScriptValue(engine, QString()) <=> engine->newVariant(QVariant(false))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(false)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0.0)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, false)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0.0)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, false)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0.0)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"false\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0.0\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'0'\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->newVariant(QVariant(false))", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(123.0)", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(false)", + "engine->evaluate(\"[]\") <=> QScriptValue(0)", + "engine->evaluate(\"[]\") <=> QScriptValue(0.0)", + "engine->evaluate(\"[]\") <=> QScriptValue(QString(\"\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(QString())", + "engine->evaluate(\"[]\") <=> QScriptValue(0, false)", + "engine->evaluate(\"[]\") <=> QScriptValue(0, 0)", + "engine->evaluate(\"[]\") <=> QScriptValue(0, 0.0)", + "engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(0, QString())", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, false)", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, 0)", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, 0.0)", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, QString())", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"false\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"0\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"0.0\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"''\")", + "engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)", + "engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::NullValue)", + "engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::NullValue)", + "engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::NullValue)", + "engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")", + "engine->evaluate(\"{}\") <=> engine->evaluate(\"undefined\")", + "engine->evaluate(\"{}\") <=> engine->evaluate(\"null\")", + "engine->evaluate(\"{}\") <=> engine->nullValue()", + "engine->evaluate(\"{}\") <=> engine->undefinedValue()", + "engine->evaluate(\"{}\") <=> engine->newQObject(0)", + "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(false)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0.0)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString())", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, false)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0.0)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString())", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, false)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0.0)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString())", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"false\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0.0\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"''\")", + "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\") <=> QScriptValue(false)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0.0)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(QString())", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, false)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0.0)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString())", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, false)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0.0)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString())", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"false\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0.0\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"''\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"Null\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\") <=> QScriptValue(QScriptValue::UndefinedValue)", + "engine->evaluate(\"undefined\") <=> QScriptValue(QScriptValue::NullValue)", + "engine->evaluate(\"undefined\") <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "engine->evaluate(\"undefined\") <=> QScriptValue(0, QScriptValue::NullValue)", + "engine->evaluate(\"undefined\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "engine->evaluate(\"undefined\") <=> QScriptValue(engine, QScriptValue::NullValue)", + "engine->evaluate(\"undefined\") <=> engine->evaluate(\"{}\")", + "engine->evaluate(\"undefined\") <=> engine->evaluate(\"undefined\")", + "engine->evaluate(\"undefined\") <=> engine->evaluate(\"null\")", + "engine->evaluate(\"undefined\") <=> engine->nullValue()", + "engine->evaluate(\"undefined\") <=> engine->undefinedValue()", + "engine->evaluate(\"undefined\") <=> engine->newQObject(0)", + "engine->evaluate(\"null\") <=> QScriptValue(QScriptValue::UndefinedValue)", + "engine->evaluate(\"null\") <=> QScriptValue(QScriptValue::NullValue)", + "engine->evaluate(\"null\") <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "engine->evaluate(\"null\") <=> QScriptValue(0, QScriptValue::NullValue)", + "engine->evaluate(\"null\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "engine->evaluate(\"null\") <=> QScriptValue(engine, QScriptValue::NullValue)", + "engine->evaluate(\"null\") <=> engine->evaluate(\"{}\")", + "engine->evaluate(\"null\") <=> engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\") <=> engine->evaluate(\"null\")", + "engine->evaluate(\"null\") <=> engine->nullValue()", + "engine->evaluate(\"null\") <=> engine->undefinedValue()", + "engine->evaluate(\"null\") <=> engine->newQObject(0)", + "engine->evaluate(\"true\") <=> QScriptValue(true)", + "engine->evaluate(\"true\") <=> QScriptValue(0, true)", + "engine->evaluate(\"true\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"true\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"false\") <=> QScriptValue(false)", + "engine->evaluate(\"false\") <=> QScriptValue(0)", + "engine->evaluate(\"false\") <=> QScriptValue(0.0)", + "engine->evaluate(\"false\") <=> QScriptValue(QString(\"\"))", + "engine->evaluate(\"false\") <=> QScriptValue(QString())", + "engine->evaluate(\"false\") <=> QScriptValue(QString(\"0\"))", + "engine->evaluate(\"false\") <=> QScriptValue(0, false)", + "engine->evaluate(\"false\") <=> QScriptValue(0, 0)", + "engine->evaluate(\"false\") <=> QScriptValue(0, 0.0)", + "engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"\"))", + "engine->evaluate(\"false\") <=> QScriptValue(0, QString())", + "engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"0\"))", + "engine->evaluate(\"false\") <=> QScriptValue(engine, false)", + "engine->evaluate(\"false\") <=> QScriptValue(engine, 0)", + "engine->evaluate(\"false\") <=> QScriptValue(engine, 0.0)", + "engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"\"))", + "engine->evaluate(\"false\") <=> QScriptValue(engine, QString())", + "engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"0\"))", + "engine->evaluate(\"false\") <=> engine->evaluate(\"[]\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"new Array()\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"false\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"0\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"0.0\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"''\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"'0'\")", + "engine->evaluate(\"false\") <=> engine->newArray()", + "engine->evaluate(\"false\") <=> engine->newVariant(QVariant(false))", + "engine->evaluate(\"122\") <=> QScriptValue(int(122))", + "engine->evaluate(\"122\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"122\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"122\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"124\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"124\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"124\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"124\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"0\") <=> QScriptValue(false)", + "engine->evaluate(\"0\") <=> QScriptValue(0)", + "engine->evaluate(\"0\") <=> QScriptValue(0.0)", + "engine->evaluate(\"0\") <=> QScriptValue(QString(\"\"))", + "engine->evaluate(\"0\") <=> QScriptValue(QString())", + "engine->evaluate(\"0\") <=> QScriptValue(QString(\"0\"))", + "engine->evaluate(\"0\") <=> QScriptValue(0, false)", + "engine->evaluate(\"0\") <=> QScriptValue(0, 0)", + "engine->evaluate(\"0\") <=> QScriptValue(0, 0.0)", + "engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"\"))", + "engine->evaluate(\"0\") <=> QScriptValue(0, QString())", + "engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"0\"))", + "engine->evaluate(\"0\") <=> QScriptValue(engine, false)", + "engine->evaluate(\"0\") <=> QScriptValue(engine, 0)", + "engine->evaluate(\"0\") <=> QScriptValue(engine, 0.0)", + "engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"\"))", + "engine->evaluate(\"0\") <=> QScriptValue(engine, QString())", + "engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"0\"))", + "engine->evaluate(\"0\") <=> engine->evaluate(\"[]\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"new Array()\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"false\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"0\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"0.0\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"''\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"'0'\")", + "engine->evaluate(\"0\") <=> engine->newArray()", + "engine->evaluate(\"0\") <=> engine->newVariant(QVariant(false))", + "engine->evaluate(\"0.0\") <=> QScriptValue(false)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0.0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"\"))", + "engine->evaluate(\"0.0\") <=> QScriptValue(QString())", + "engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"0\"))", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, false)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0.0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"\"))", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, QString())", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"0\"))", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, false)", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0.0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"\"))", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString())", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"0\"))", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"[]\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"new Array()\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"false\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0.0\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"''\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"'0'\")", + "engine->evaluate(\"0.0\") <=> engine->newArray()", + "engine->evaluate(\"0.0\") <=> engine->newVariant(QVariant(false))", + "engine->evaluate(\"123.0\") <=> QScriptValue(123.0)", + "engine->evaluate(\"123.0\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"123.0\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"123.0\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"123.0\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"123.0\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"123.0\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"123.0\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"123.0\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(6.37e-8)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 6.37e-8)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 6.37e-8)", + "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(-6.37e-8)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, -6.37e-8)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, -6.37e-8)", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"0x43211234\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"0x43211234\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"0x10001\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"0x10001\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"0x10001\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"Infinity\") <=> QScriptValue(qInf())", + "engine->evaluate(\"Infinity\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"Infinity\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"Infinity\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"Infinity\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"Infinity\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(-qInf())", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(\"-Infinity\")", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, -qInf())", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, -qInf())", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"'ciao'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'ciao'\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"'ciao'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\") <=> QScriptValue(false)", + "engine->evaluate(\"''\") <=> QScriptValue(0)", + "engine->evaluate(\"''\") <=> QScriptValue(0.0)", + "engine->evaluate(\"''\") <=> QScriptValue(QString(\"\"))", + "engine->evaluate(\"''\") <=> QScriptValue(QString())", + "engine->evaluate(\"''\") <=> QScriptValue(0, false)", + "engine->evaluate(\"''\") <=> QScriptValue(0, 0)", + "engine->evaluate(\"''\") <=> QScriptValue(0, 0.0)", + "engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"\"))", + "engine->evaluate(\"''\") <=> QScriptValue(0, QString())", + "engine->evaluate(\"''\") <=> QScriptValue(engine, false)", + "engine->evaluate(\"''\") <=> QScriptValue(engine, 0)", + "engine->evaluate(\"''\") <=> QScriptValue(engine, 0.0)", + "engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"\"))", + "engine->evaluate(\"''\") <=> QScriptValue(engine, QString())", + "engine->evaluate(\"''\") <=> engine->evaluate(\"[]\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"new Array()\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"false\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"0\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"0.0\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"''\")", + "engine->evaluate(\"''\") <=> engine->newArray()", + "engine->evaluate(\"''\") <=> engine->newVariant(QVariant(false))", + "engine->evaluate(\"'0'\") <=> QScriptValue(false)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0.0)", + "engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"0\"))", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, false)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, 0)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, 0.0)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"0\"))", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, false)", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0)", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0.0)", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"0\"))", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"false\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"0\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"0.0\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"'0'\")", + "engine->evaluate(\"'0'\") <=> engine->newVariant(QVariant(false))", + "engine->evaluate(\"'123'\") <=> QScriptValue(123.0)", + "engine->evaluate(\"'123'\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"'123'\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"'123'\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"'123'\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"'123'\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"'123'\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'12.4'\")", + "engine->nullValue() <=> QScriptValue(QScriptValue::UndefinedValue)", + "engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)", + "engine->nullValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)", + "engine->nullValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)", + "engine->nullValue() <=> engine->evaluate(\"{}\")", + "engine->nullValue() <=> engine->evaluate(\"undefined\")", + "engine->nullValue() <=> engine->evaluate(\"null\")", + "engine->nullValue() <=> engine->nullValue()", + "engine->nullValue() <=> engine->undefinedValue()", + "engine->nullValue() <=> engine->newQObject(0)", + "engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)", + "engine->undefinedValue() <=> QScriptValue(QScriptValue::NullValue)", + "engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "engine->undefinedValue() <=> QScriptValue(0, QScriptValue::NullValue)", + "engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::NullValue)", + "engine->undefinedValue() <=> engine->evaluate(\"{}\")", + "engine->undefinedValue() <=> engine->evaluate(\"undefined\")", + "engine->undefinedValue() <=> engine->evaluate(\"null\")", + "engine->undefinedValue() <=> engine->nullValue()", + "engine->undefinedValue() <=> engine->undefinedValue()", + "engine->undefinedValue() <=> engine->newQObject(0)", + "engine->newObject() <=> engine->newObject()", + "engine->newArray() <=> QScriptValue(false)", + "engine->newArray() <=> QScriptValue(0)", + "engine->newArray() <=> QScriptValue(0.0)", + "engine->newArray() <=> QScriptValue(QString(\"\"))", + "engine->newArray() <=> QScriptValue(QString())", + "engine->newArray() <=> QScriptValue(0, false)", + "engine->newArray() <=> QScriptValue(0, 0)", + "engine->newArray() <=> QScriptValue(0, 0.0)", + "engine->newArray() <=> QScriptValue(0, QString(\"\"))", + "engine->newArray() <=> QScriptValue(0, QString())", + "engine->newArray() <=> QScriptValue(engine, false)", + "engine->newArray() <=> QScriptValue(engine, 0)", + "engine->newArray() <=> QScriptValue(engine, 0.0)", + "engine->newArray() <=> QScriptValue(engine, QString(\"\"))", + "engine->newArray() <=> QScriptValue(engine, QString())", + "engine->newArray() <=> engine->evaluate(\"false\")", + "engine->newArray() <=> engine->evaluate(\"0\")", + "engine->newArray() <=> engine->evaluate(\"0.0\")", + "engine->newArray() <=> engine->evaluate(\"''\")", + "engine->newArray() <=> engine->newArray()", + "engine->newArray(10) <=> engine->newArray(10)", + "engine->newDate(QDateTime()) <=> engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant()) <=> engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123)) <=> QScriptValue(123.0)", + "engine->newVariant(QVariant(123)) <=> QScriptValue(QString(\"123\"))", + "engine->newVariant(QVariant(123)) <=> QScriptValue(0, 123.0)", + "engine->newVariant(QVariant(123)) <=> QScriptValue(0, QString(\"123\"))", + "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, 123.0)", + "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, QString(\"123\"))", + "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"123.0\")", + "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"'123'\")", + "engine->newVariant(QVariant(123)) <=> engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(false)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0.0)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(QString(\"\"))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(QString())", + "engine->newVariant(QVariant(false)) <=> QScriptValue(QString(\"0\"))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, false)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0.0)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString(\"\"))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString())", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString(\"0\"))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, false)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0.0)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"\"))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString())", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"0\"))", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"false\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0.0\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"''\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"'0'\")", + "engine->newVariant(QVariant(false)) <=> engine->newVariant(QVariant(false))", + "engine->newQObject(0) <=> QScriptValue(QScriptValue::UndefinedValue)", + "engine->newQObject(0) <=> QScriptValue(QScriptValue::NullValue)", + "engine->newQObject(0) <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "engine->newQObject(0) <=> QScriptValue(0, QScriptValue::NullValue)", + "engine->newQObject(0) <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "engine->newQObject(0) <=> QScriptValue(engine, QScriptValue::NullValue)", + "engine->newQObject(0) <=> engine->evaluate(\"{}\")", + "engine->newQObject(0) <=> engine->evaluate(\"undefined\")", + "engine->newQObject(0) <=> engine->evaluate(\"null\")", + "engine->newQObject(0) <=> engine->nullValue()", + "engine->newQObject(0) <=> engine->undefinedValue()", + "engine->newQObject(0) <=> engine->newQObject(0)", + "engine->newQObject(engine) <=> engine->newQObject(engine)",}; + +void tst_QScriptValue::equals_makeData(const char *expr) +{ + static QSet equals; + if (equals.isEmpty()) { + equals.reserve(1217); + for (unsigned i = 0; i < 1217; ++i) + equals.insert(equals_array[i]); + } + QHash::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); + newRow(tag.toLatin1()) << it.value() << equals.contains(tag); + } +} + +void tst_QScriptValue::equals_test(const char *, const QScriptValue& value) +{ + QFETCH(QScriptValue, other); + QFETCH(bool, expected); + QCOMPARE(value.equals(other), expected); +} + +DEFINE_TEST_FUNCTION(equals) + + +void tst_QScriptValue::strictlyEquals_initData() +{ + QTest::addColumn("other"); + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString strictlyEquals_array [] = { + "QScriptValue() <=> QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")", + "QScriptValue(QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")", + "QScriptValue(QScriptValue::UndefinedValue) <=> engine->undefinedValue()", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"null\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->nullValue()", + "QScriptValue(QScriptValue::NullValue) <=> engine->newQObject(0)", + "QScriptValue(true) <=> QScriptValue(true)", + "QScriptValue(true) <=> QScriptValue(0, true)", + "QScriptValue(true) <=> QScriptValue(engine, true)", + "QScriptValue(true) <=> engine->evaluate(\"true\")", + "QScriptValue(false) <=> QScriptValue(false)", + "QScriptValue(false) <=> QScriptValue(0, false)", + "QScriptValue(false) <=> QScriptValue(engine, false)", + "QScriptValue(false) <=> engine->evaluate(\"false\")", + "QScriptValue(int(122)) <=> QScriptValue(int(122))", + "QScriptValue(int(122)) <=> QScriptValue(0, int(122))", + "QScriptValue(int(122)) <=> QScriptValue(engine, int(122))", + "QScriptValue(int(122)) <=> engine->evaluate(\"122\")", + "QScriptValue(uint(124)) <=> QScriptValue(uint(124))", + "QScriptValue(uint(124)) <=> QScriptValue(0, uint(124))", + "QScriptValue(uint(124)) <=> QScriptValue(engine, uint(124))", + "QScriptValue(uint(124)) <=> engine->evaluate(\"124\")", + "QScriptValue(0) <=> QScriptValue(0)", + "QScriptValue(0) <=> QScriptValue(0.0)", + "QScriptValue(0) <=> QScriptValue(0, 0)", + "QScriptValue(0) <=> QScriptValue(0, 0.0)", + "QScriptValue(0) <=> QScriptValue(engine, 0)", + "QScriptValue(0) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0) <=> engine->evaluate(\"0\")", + "QScriptValue(0) <=> engine->evaluate(\"0.0\")", + "QScriptValue(0.0) <=> QScriptValue(0)", + "QScriptValue(0.0) <=> QScriptValue(0.0)", + "QScriptValue(0.0) <=> QScriptValue(0, 0)", + "QScriptValue(0.0) <=> QScriptValue(0, 0.0)", + "QScriptValue(0.0) <=> QScriptValue(engine, 0)", + "QScriptValue(0.0) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0.0) <=> engine->evaluate(\"0\")", + "QScriptValue(0.0) <=> engine->evaluate(\"0.0\")", + "QScriptValue(123.0) <=> QScriptValue(123.0)", + "QScriptValue(123.0) <=> QScriptValue(0, 123.0)", + "QScriptValue(123.0) <=> QScriptValue(engine, 123.0)", + "QScriptValue(123.0) <=> engine->evaluate(\"123.0\")", + "QScriptValue(6.37e-8) <=> QScriptValue(6.37e-8)", + "QScriptValue(6.37e-8) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(6.37e-8) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(6.37e-8) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(-6.37e-8) <=> QScriptValue(-6.37e-8)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, -6.37e-8)", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, -6.37e-8)", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"-6.37e-8\")", + "QScriptValue(0x43211234) <=> QScriptValue(0x43211234)", + "QScriptValue(0x43211234) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0x43211234) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0x43211234) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0x10000) <=> QScriptValue(0x10000)", + "QScriptValue(0x10000) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0x10000) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0x10000) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0x10001) <=> QScriptValue(0x10001)", + "QScriptValue(0x10001) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0x10001) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0x10001) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(qInf()) <=> QScriptValue(qInf())", + "QScriptValue(qInf()) <=> QScriptValue(0, qInf())", + "QScriptValue(qInf()) <=> QScriptValue(engine, qInf())", + "QScriptValue(qInf()) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(-qInf()) <=> QScriptValue(-qInf())", + "QScriptValue(-qInf()) <=> QScriptValue(0, -qInf())", + "QScriptValue(-qInf()) <=> QScriptValue(engine, -qInf())", + "QScriptValue(-qInf()) <=> engine->evaluate(\"-Infinity\")", + "QScriptValue(\"NaN\") <=> QScriptValue(\"NaN\")", + "QScriptValue(\"NaN\") <=> QScriptValue(0, \"NaN\")", + "QScriptValue(\"NaN\") <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(\"Infinity\") <=> QScriptValue(\"Infinity\")", + "QScriptValue(\"Infinity\") <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(\"-Infinity\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(\"ciao\") <=> QScriptValue(\"ciao\")", + "QScriptValue(\"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"ciao\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(\"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"ciao\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(\"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"ciao\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(QString())", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString())", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString())", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"''\")", + "QScriptValue(QString()) <=> QScriptValue(QString(\"\"))", + "QScriptValue(QString()) <=> QScriptValue(QString())", + "QScriptValue(QString()) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(QString()) <=> QScriptValue(0, QString())", + "QScriptValue(QString()) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(QString()) <=> QScriptValue(engine, QString())", + "QScriptValue(QString()) <=> engine->evaluate(\"''\")", + "QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'0'\")", + "QScriptValue(QString(\"123\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")", + "QScriptValue(0, QScriptValue::UndefinedValue) <=> engine->undefinedValue()", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"null\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->nullValue()", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->newQObject(0)", + "QScriptValue(0, true) <=> QScriptValue(true)", + "QScriptValue(0, true) <=> QScriptValue(0, true)", + "QScriptValue(0, true) <=> QScriptValue(engine, true)", + "QScriptValue(0, true) <=> engine->evaluate(\"true\")", + "QScriptValue(0, false) <=> QScriptValue(false)", + "QScriptValue(0, false) <=> QScriptValue(0, false)", + "QScriptValue(0, false) <=> QScriptValue(engine, false)", + "QScriptValue(0, false) <=> engine->evaluate(\"false\")", + "QScriptValue(0, int(122)) <=> QScriptValue(int(122))", + "QScriptValue(0, int(122)) <=> QScriptValue(0, int(122))", + "QScriptValue(0, int(122)) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, int(122)) <=> engine->evaluate(\"122\")", + "QScriptValue(0, uint(124)) <=> QScriptValue(uint(124))", + "QScriptValue(0, uint(124)) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, uint(124)) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, uint(124)) <=> engine->evaluate(\"124\")", + "QScriptValue(0, 0) <=> QScriptValue(0)", + "QScriptValue(0, 0) <=> QScriptValue(0.0)", + "QScriptValue(0, 0) <=> QScriptValue(0, 0)", + "QScriptValue(0, 0) <=> QScriptValue(0, 0.0)", + "QScriptValue(0, 0) <=> QScriptValue(engine, 0)", + "QScriptValue(0, 0) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0, 0) <=> engine->evaluate(\"0\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"0.0\")", + "QScriptValue(0, 0.0) <=> QScriptValue(0)", + "QScriptValue(0, 0.0) <=> QScriptValue(0.0)", + "QScriptValue(0, 0.0) <=> QScriptValue(0, 0)", + "QScriptValue(0, 0.0) <=> QScriptValue(0, 0.0)", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0)", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"0\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"0.0\")", + "QScriptValue(0, 123.0) <=> QScriptValue(123.0)", + "QScriptValue(0, 123.0) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, 123.0) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, 123.0) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(6.37e-8)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(-6.37e-8)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, -6.37e-8)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")", + "QScriptValue(0, 0x43211234) <=> QScriptValue(0x43211234)", + "QScriptValue(0, 0x43211234) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x43211234) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, 0x43211234) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, 0x10000) <=> QScriptValue(0x10000)", + "QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, 0x10001) <=> QScriptValue(0x10001)", + "QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, 0x10001) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, qInf()) <=> QScriptValue(qInf())", + "QScriptValue(0, qInf()) <=> QScriptValue(0, qInf())", + "QScriptValue(0, qInf()) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, qInf()) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, -qInf()) <=> QScriptValue(-qInf())", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, -qInf())", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, -qInf())", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"-Infinity\")", + "QScriptValue(0, \"NaN\") <=> QScriptValue(\"NaN\")", + "QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"-Infinity\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(0, \"ciao\") <=> QScriptValue(\"ciao\")", + "QScriptValue(0, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"ciao\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(0, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"ciao\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(0, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString())", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString())", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString())", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"''\")", + "QScriptValue(0, QString()) <=> QScriptValue(QString(\"\"))", + "QScriptValue(0, QString()) <=> QScriptValue(QString())", + "QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString()) <=> QScriptValue(0, QString())", + "QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(0, QString()) <=> QScriptValue(engine, QString())", + "QScriptValue(0, QString()) <=> engine->evaluate(\"''\")", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'0'\")", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"{}\")", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->evaluate(\"undefined\")", + "QScriptValue(engine, QScriptValue::UndefinedValue) <=> engine->undefinedValue()", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"null\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->nullValue()", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->newQObject(0)", + "QScriptValue(engine, true) <=> QScriptValue(true)", + "QScriptValue(engine, true) <=> QScriptValue(0, true)", + "QScriptValue(engine, true) <=> QScriptValue(engine, true)", + "QScriptValue(engine, true) <=> engine->evaluate(\"true\")", + "QScriptValue(engine, false) <=> QScriptValue(false)", + "QScriptValue(engine, false) <=> QScriptValue(0, false)", + "QScriptValue(engine, false) <=> QScriptValue(engine, false)", + "QScriptValue(engine, false) <=> engine->evaluate(\"false\")", + "QScriptValue(engine, int(122)) <=> QScriptValue(int(122))", + "QScriptValue(engine, int(122)) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, int(122)) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, int(122)) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, uint(124)) <=> QScriptValue(uint(124))", + "QScriptValue(engine, uint(124)) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, uint(124)) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, 0) <=> QScriptValue(0)", + "QScriptValue(engine, 0) <=> QScriptValue(0.0)", + "QScriptValue(engine, 0) <=> QScriptValue(0, 0)", + "QScriptValue(engine, 0) <=> QScriptValue(0, 0.0)", + "QScriptValue(engine, 0) <=> QScriptValue(engine, 0)", + "QScriptValue(engine, 0) <=> QScriptValue(engine, 0.0)", + "QScriptValue(engine, 0) <=> engine->evaluate(\"0\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"0.0\")", + "QScriptValue(engine, 0.0) <=> QScriptValue(0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0.0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0.0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0.0)", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0.0\")", + "QScriptValue(engine, 123.0) <=> QScriptValue(123.0)", + "QScriptValue(engine, 123.0) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, 123.0) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, 123.0) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(6.37e-8)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(-6.37e-8)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, -6.37e-8)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"-6.37e-8\")", + "QScriptValue(engine, 0x43211234) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, 0x43211234) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x43211234) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, 0x10000) <=> QScriptValue(0x10000)", + "QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, 0x10001) <=> QScriptValue(0x10001)", + "QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, 0x10001) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, qInf()) <=> QScriptValue(qInf())", + "QScriptValue(engine, qInf()) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, qInf()) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, qInf()) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, -qInf()) <=> QScriptValue(-qInf())", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, -qInf())", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -qInf())", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"-Infinity\")", + "QScriptValue(engine, \"NaN\") <=> QScriptValue(\"NaN\")", + "QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"NaN\")", + "QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"-Infinity\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\") <=> QScriptValue(\"ciao\")", + "QScriptValue(engine, \"ciao\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"ciao\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(engine, \"ciao\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, \"ciao\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString())", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString())", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"''\")", + "QScriptValue(engine, QString()) <=> QScriptValue(QString(\"\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(QString())", + "QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(0, QString())", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString())", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"''\")", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'0'\")", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\") <=> QScriptValue(QScriptValue::UndefinedValue)", + "engine->evaluate(\"{}\") <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "engine->evaluate(\"{}\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "engine->evaluate(\"{}\") <=> engine->evaluate(\"{}\")", + "engine->evaluate(\"{}\") <=> engine->evaluate(\"undefined\")", + "engine->evaluate(\"{}\") <=> engine->undefinedValue()", + "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"Null\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\") <=> QScriptValue(QScriptValue::UndefinedValue)", + "engine->evaluate(\"undefined\") <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "engine->evaluate(\"undefined\") <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "engine->evaluate(\"undefined\") <=> engine->evaluate(\"{}\")", + "engine->evaluate(\"undefined\") <=> engine->evaluate(\"undefined\")", + "engine->evaluate(\"undefined\") <=> engine->undefinedValue()", + "engine->evaluate(\"null\") <=> QScriptValue(QScriptValue::NullValue)", + "engine->evaluate(\"null\") <=> QScriptValue(0, QScriptValue::NullValue)", + "engine->evaluate(\"null\") <=> QScriptValue(engine, QScriptValue::NullValue)", + "engine->evaluate(\"null\") <=> engine->evaluate(\"null\")", + "engine->evaluate(\"null\") <=> engine->nullValue()", + "engine->evaluate(\"null\") <=> engine->newQObject(0)", + "engine->evaluate(\"true\") <=> QScriptValue(true)", + "engine->evaluate(\"true\") <=> QScriptValue(0, true)", + "engine->evaluate(\"true\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"true\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"false\") <=> QScriptValue(false)", + "engine->evaluate(\"false\") <=> QScriptValue(0, false)", + "engine->evaluate(\"false\") <=> QScriptValue(engine, false)", + "engine->evaluate(\"false\") <=> engine->evaluate(\"false\")", + "engine->evaluate(\"122\") <=> QScriptValue(int(122))", + "engine->evaluate(\"122\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"122\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"122\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"124\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"124\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"124\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"124\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"0\") <=> QScriptValue(0)", + "engine->evaluate(\"0\") <=> QScriptValue(0.0)", + "engine->evaluate(\"0\") <=> QScriptValue(0, 0)", + "engine->evaluate(\"0\") <=> QScriptValue(0, 0.0)", + "engine->evaluate(\"0\") <=> QScriptValue(engine, 0)", + "engine->evaluate(\"0\") <=> QScriptValue(engine, 0.0)", + "engine->evaluate(\"0\") <=> engine->evaluate(\"0\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"0.0\")", + "engine->evaluate(\"0.0\") <=> QScriptValue(0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0.0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0.0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0.0)", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\") <=> QScriptValue(123.0)", + "engine->evaluate(\"123.0\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"123.0\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"123.0\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(6.37e-8)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 6.37e-8)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 6.37e-8)", + "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(-6.37e-8)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, -6.37e-8)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, -6.37e-8)", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"0x43211234\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"0x43211234\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"0x10001\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"0x10001\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"0x10001\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"Infinity\") <=> QScriptValue(qInf())", + "engine->evaluate(\"Infinity\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"Infinity\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"Infinity\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(-qInf())", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, -qInf())", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, -qInf())", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"'ciao'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'ciao'\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"'ciao'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"'ciao'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\") <=> QScriptValue(QString(\"\"))", + "engine->evaluate(\"''\") <=> QScriptValue(QString())", + "engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"\"))", + "engine->evaluate(\"''\") <=> QScriptValue(0, QString())", + "engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"\"))", + "engine->evaluate(\"''\") <=> QScriptValue(engine, QString())", + "engine->evaluate(\"''\") <=> engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"0\"))", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"0\"))", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"0\"))", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"'123'\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"'123'\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'12.4'\")", + "engine->nullValue() <=> QScriptValue(QScriptValue::NullValue)", + "engine->nullValue() <=> QScriptValue(0, QScriptValue::NullValue)", + "engine->nullValue() <=> QScriptValue(engine, QScriptValue::NullValue)", + "engine->nullValue() <=> engine->evaluate(\"null\")", + "engine->nullValue() <=> engine->nullValue()", + "engine->nullValue() <=> engine->newQObject(0)", + "engine->undefinedValue() <=> QScriptValue(QScriptValue::UndefinedValue)", + "engine->undefinedValue() <=> QScriptValue(0, QScriptValue::UndefinedValue)", + "engine->undefinedValue() <=> QScriptValue(engine, QScriptValue::UndefinedValue)", + "engine->undefinedValue() <=> engine->evaluate(\"{}\")", + "engine->undefinedValue() <=> engine->evaluate(\"undefined\")", + "engine->undefinedValue() <=> engine->undefinedValue()", + "engine->newObject() <=> engine->newObject()", + "engine->newArray() <=> engine->newArray()", + "engine->newArray(10) <=> engine->newArray(10)", + "engine->newDate(QDateTime()) <=> engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant()) <=> engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123)) <=> engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false)) <=> engine->newVariant(QVariant(false))", + "engine->newQObject(0) <=> QScriptValue(QScriptValue::NullValue)", + "engine->newQObject(0) <=> QScriptValue(0, QScriptValue::NullValue)", + "engine->newQObject(0) <=> QScriptValue(engine, QScriptValue::NullValue)", + "engine->newQObject(0) <=> engine->evaluate(\"null\")", + "engine->newQObject(0) <=> engine->nullValue()", + "engine->newQObject(0) <=> engine->newQObject(0)", + "engine->newQObject(engine) <=> engine->newQObject(engine)",}; + +void tst_QScriptValue::strictlyEquals_makeData(const char *expr) +{ + static QSet equals; + if (equals.isEmpty()) { + equals.reserve(523); + for (unsigned i = 0; i < 523; ++i) + equals.insert(strictlyEquals_array[i]); + } + QHash::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); + newRow(tag.toLatin1()) << it.value() << equals.contains(tag); + } +} + +void tst_QScriptValue::strictlyEquals_test(const char *, const QScriptValue& value) +{ + QFETCH(QScriptValue, other); + QFETCH(bool, expected); + QCOMPARE(value.strictlyEquals(other), expected); +} + +DEFINE_TEST_FUNCTION(strictlyEquals) + + +void tst_QScriptValue::lessThan_initData() +{ + QTest::addColumn("other"); + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString lessThan_array [] = { + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(true)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(int(122))", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(uint(124))", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(123.0)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(6.37e-8)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x43211234)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10000)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0x10001)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(qInf())", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, true)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, int(122))", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, uint(124))", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 123.0)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, qInf())", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, true)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, int(122))", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, qInf())", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"true\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"122\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"124\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"123.0\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"'123'\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(QScriptValue::NullValue) <=> engine->newVariant(QVariant(123))", + "QScriptValue(true) <=> QScriptValue(int(122))", + "QScriptValue(true) <=> QScriptValue(uint(124))", + "QScriptValue(true) <=> QScriptValue(123.0)", + "QScriptValue(true) <=> QScriptValue(0x43211234)", + "QScriptValue(true) <=> QScriptValue(0x10000)", + "QScriptValue(true) <=> QScriptValue(0x10001)", + "QScriptValue(true) <=> QScriptValue(qInf())", + "QScriptValue(true) <=> QScriptValue(\"Infinity\")", + "QScriptValue(true) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(true) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(true) <=> QScriptValue(0, int(122))", + "QScriptValue(true) <=> QScriptValue(0, uint(124))", + "QScriptValue(true) <=> QScriptValue(0, 123.0)", + "QScriptValue(true) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(true) <=> QScriptValue(0, 0x10000)", + "QScriptValue(true) <=> QScriptValue(0, 0x10001)", + "QScriptValue(true) <=> QScriptValue(0, qInf())", + "QScriptValue(true) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(true) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(true) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(true) <=> QScriptValue(engine, int(122))", + "QScriptValue(true) <=> QScriptValue(engine, uint(124))", + "QScriptValue(true) <=> QScriptValue(engine, 123.0)", + "QScriptValue(true) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(true) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(true) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(true) <=> QScriptValue(engine, qInf())", + "QScriptValue(true) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(true) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(true) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(true) <=> engine->evaluate(\"122\")", + "QScriptValue(true) <=> engine->evaluate(\"124\")", + "QScriptValue(true) <=> engine->evaluate(\"123.0\")", + "QScriptValue(true) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(true) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(true) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(true) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(true) <=> engine->evaluate(\"'123'\")", + "QScriptValue(true) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(true) <=> engine->newVariant(QVariant(123))", + "QScriptValue(false) <=> QScriptValue(true)", + "QScriptValue(false) <=> QScriptValue(int(122))", + "QScriptValue(false) <=> QScriptValue(uint(124))", + "QScriptValue(false) <=> QScriptValue(123.0)", + "QScriptValue(false) <=> QScriptValue(6.37e-8)", + "QScriptValue(false) <=> QScriptValue(0x43211234)", + "QScriptValue(false) <=> QScriptValue(0x10000)", + "QScriptValue(false) <=> QScriptValue(0x10001)", + "QScriptValue(false) <=> QScriptValue(qInf())", + "QScriptValue(false) <=> QScriptValue(\"Infinity\")", + "QScriptValue(false) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(false) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(false) <=> QScriptValue(0, true)", + "QScriptValue(false) <=> QScriptValue(0, int(122))", + "QScriptValue(false) <=> QScriptValue(0, uint(124))", + "QScriptValue(false) <=> QScriptValue(0, 123.0)", + "QScriptValue(false) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(false) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(false) <=> QScriptValue(0, 0x10000)", + "QScriptValue(false) <=> QScriptValue(0, 0x10001)", + "QScriptValue(false) <=> QScriptValue(0, qInf())", + "QScriptValue(false) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(false) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(false) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(false) <=> QScriptValue(engine, true)", + "QScriptValue(false) <=> QScriptValue(engine, int(122))", + "QScriptValue(false) <=> QScriptValue(engine, uint(124))", + "QScriptValue(false) <=> QScriptValue(engine, 123.0)", + "QScriptValue(false) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(false) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(false) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(false) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(false) <=> QScriptValue(engine, qInf())", + "QScriptValue(false) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(false) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(false) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(false) <=> engine->evaluate(\"true\")", + "QScriptValue(false) <=> engine->evaluate(\"122\")", + "QScriptValue(false) <=> engine->evaluate(\"124\")", + "QScriptValue(false) <=> engine->evaluate(\"123.0\")", + "QScriptValue(false) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(false) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(false) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(false) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(false) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(false) <=> engine->evaluate(\"'123'\")", + "QScriptValue(false) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(false) <=> engine->newVariant(QVariant(123))", + "QScriptValue(int(122)) <=> QScriptValue(uint(124))", + "QScriptValue(int(122)) <=> QScriptValue(123.0)", + "QScriptValue(int(122)) <=> QScriptValue(0x43211234)", + "QScriptValue(int(122)) <=> QScriptValue(0x10000)", + "QScriptValue(int(122)) <=> QScriptValue(0x10001)", + "QScriptValue(int(122)) <=> QScriptValue(qInf())", + "QScriptValue(int(122)) <=> QScriptValue(\"Infinity\")", + "QScriptValue(int(122)) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(int(122)) <=> QScriptValue(0, uint(124))", + "QScriptValue(int(122)) <=> QScriptValue(0, 123.0)", + "QScriptValue(int(122)) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(int(122)) <=> QScriptValue(0, 0x10000)", + "QScriptValue(int(122)) <=> QScriptValue(0, 0x10001)", + "QScriptValue(int(122)) <=> QScriptValue(0, qInf())", + "QScriptValue(int(122)) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(int(122)) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(int(122)) <=> QScriptValue(engine, uint(124))", + "QScriptValue(int(122)) <=> QScriptValue(engine, 123.0)", + "QScriptValue(int(122)) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(int(122)) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(int(122)) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(int(122)) <=> QScriptValue(engine, qInf())", + "QScriptValue(int(122)) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(int(122)) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(int(122)) <=> engine->evaluate(\"124\")", + "QScriptValue(int(122)) <=> engine->evaluate(\"123.0\")", + "QScriptValue(int(122)) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(int(122)) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(int(122)) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(int(122)) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(int(122)) <=> engine->evaluate(\"'123'\")", + "QScriptValue(int(122)) <=> engine->newVariant(QVariant(123))", + "QScriptValue(uint(124)) <=> QScriptValue(0x43211234)", + "QScriptValue(uint(124)) <=> QScriptValue(0x10000)", + "QScriptValue(uint(124)) <=> QScriptValue(0x10001)", + "QScriptValue(uint(124)) <=> QScriptValue(qInf())", + "QScriptValue(uint(124)) <=> QScriptValue(\"Infinity\")", + "QScriptValue(uint(124)) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(uint(124)) <=> QScriptValue(0, 0x10000)", + "QScriptValue(uint(124)) <=> QScriptValue(0, 0x10001)", + "QScriptValue(uint(124)) <=> QScriptValue(0, qInf())", + "QScriptValue(uint(124)) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(uint(124)) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(uint(124)) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(uint(124)) <=> QScriptValue(engine, qInf())", + "QScriptValue(uint(124)) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(uint(124)) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(uint(124)) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(uint(124)) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(uint(124)) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0) <=> QScriptValue(true)", + "QScriptValue(0) <=> QScriptValue(int(122))", + "QScriptValue(0) <=> QScriptValue(uint(124))", + "QScriptValue(0) <=> QScriptValue(123.0)", + "QScriptValue(0) <=> QScriptValue(6.37e-8)", + "QScriptValue(0) <=> QScriptValue(0x43211234)", + "QScriptValue(0) <=> QScriptValue(0x10000)", + "QScriptValue(0) <=> QScriptValue(0x10001)", + "QScriptValue(0) <=> QScriptValue(qInf())", + "QScriptValue(0) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0) <=> QScriptValue(0, true)", + "QScriptValue(0) <=> QScriptValue(0, int(122))", + "QScriptValue(0) <=> QScriptValue(0, uint(124))", + "QScriptValue(0) <=> QScriptValue(0, 123.0)", + "QScriptValue(0) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0) <=> QScriptValue(0, qInf())", + "QScriptValue(0) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0) <=> QScriptValue(engine, true)", + "QScriptValue(0) <=> QScriptValue(engine, int(122))", + "QScriptValue(0) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0) <=> QScriptValue(engine, qInf())", + "QScriptValue(0) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0) <=> engine->evaluate(\"true\")", + "QScriptValue(0) <=> engine->evaluate(\"122\")", + "QScriptValue(0) <=> engine->evaluate(\"124\")", + "QScriptValue(0) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0.0) <=> QScriptValue(true)", + "QScriptValue(0.0) <=> QScriptValue(int(122))", + "QScriptValue(0.0) <=> QScriptValue(uint(124))", + "QScriptValue(0.0) <=> QScriptValue(123.0)", + "QScriptValue(0.0) <=> QScriptValue(6.37e-8)", + "QScriptValue(0.0) <=> QScriptValue(0x43211234)", + "QScriptValue(0.0) <=> QScriptValue(0x10000)", + "QScriptValue(0.0) <=> QScriptValue(0x10001)", + "QScriptValue(0.0) <=> QScriptValue(qInf())", + "QScriptValue(0.0) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0.0) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0.0) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0.0) <=> QScriptValue(0, true)", + "QScriptValue(0.0) <=> QScriptValue(0, int(122))", + "QScriptValue(0.0) <=> QScriptValue(0, uint(124))", + "QScriptValue(0.0) <=> QScriptValue(0, 123.0)", + "QScriptValue(0.0) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0.0) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0.0) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0.0) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0.0) <=> QScriptValue(0, qInf())", + "QScriptValue(0.0) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0.0) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0.0) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0.0) <=> QScriptValue(engine, true)", + "QScriptValue(0.0) <=> QScriptValue(engine, int(122))", + "QScriptValue(0.0) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0.0) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0.0) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0.0) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0.0) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0.0) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0.0) <=> QScriptValue(engine, qInf())", + "QScriptValue(0.0) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0.0) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0.0) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0.0) <=> engine->evaluate(\"true\")", + "QScriptValue(0.0) <=> engine->evaluate(\"122\")", + "QScriptValue(0.0) <=> engine->evaluate(\"124\")", + "QScriptValue(0.0) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0.0) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0.0) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0.0) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0.0) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0.0) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0.0) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0.0) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0.0) <=> engine->newVariant(QVariant(123))", + "QScriptValue(123.0) <=> QScriptValue(uint(124))", + "QScriptValue(123.0) <=> QScriptValue(0x43211234)", + "QScriptValue(123.0) <=> QScriptValue(0x10000)", + "QScriptValue(123.0) <=> QScriptValue(0x10001)", + "QScriptValue(123.0) <=> QScriptValue(qInf())", + "QScriptValue(123.0) <=> QScriptValue(\"Infinity\")", + "QScriptValue(123.0) <=> QScriptValue(0, uint(124))", + "QScriptValue(123.0) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(123.0) <=> QScriptValue(0, 0x10000)", + "QScriptValue(123.0) <=> QScriptValue(0, 0x10001)", + "QScriptValue(123.0) <=> QScriptValue(0, qInf())", + "QScriptValue(123.0) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(123.0) <=> QScriptValue(engine, uint(124))", + "QScriptValue(123.0) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(123.0) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(123.0) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(123.0) <=> QScriptValue(engine, qInf())", + "QScriptValue(123.0) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(123.0) <=> engine->evaluate(\"124\")", + "QScriptValue(123.0) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(123.0) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(123.0) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(123.0) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(6.37e-8) <=> QScriptValue(true)", + "QScriptValue(6.37e-8) <=> QScriptValue(int(122))", + "QScriptValue(6.37e-8) <=> QScriptValue(uint(124))", + "QScriptValue(6.37e-8) <=> QScriptValue(123.0)", + "QScriptValue(6.37e-8) <=> QScriptValue(0x43211234)", + "QScriptValue(6.37e-8) <=> QScriptValue(0x10000)", + "QScriptValue(6.37e-8) <=> QScriptValue(0x10001)", + "QScriptValue(6.37e-8) <=> QScriptValue(qInf())", + "QScriptValue(6.37e-8) <=> QScriptValue(\"Infinity\")", + "QScriptValue(6.37e-8) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(6.37e-8) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(6.37e-8) <=> QScriptValue(0, true)", + "QScriptValue(6.37e-8) <=> QScriptValue(0, int(122))", + "QScriptValue(6.37e-8) <=> QScriptValue(0, uint(124))", + "QScriptValue(6.37e-8) <=> QScriptValue(0, 123.0)", + "QScriptValue(6.37e-8) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10000)", + "QScriptValue(6.37e-8) <=> QScriptValue(0, 0x10001)", + "QScriptValue(6.37e-8) <=> QScriptValue(0, qInf())", + "QScriptValue(6.37e-8) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(6.37e-8) <=> QScriptValue(engine, true)", + "QScriptValue(6.37e-8) <=> QScriptValue(engine, int(122))", + "QScriptValue(6.37e-8) <=> QScriptValue(engine, uint(124))", + "QScriptValue(6.37e-8) <=> QScriptValue(engine, 123.0)", + "QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(6.37e-8) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(6.37e-8) <=> QScriptValue(engine, qInf())", + "QScriptValue(6.37e-8) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(6.37e-8) <=> engine->evaluate(\"true\")", + "QScriptValue(6.37e-8) <=> engine->evaluate(\"122\")", + "QScriptValue(6.37e-8) <=> engine->evaluate(\"124\")", + "QScriptValue(6.37e-8) <=> engine->evaluate(\"123.0\")", + "QScriptValue(6.37e-8) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(6.37e-8) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(6.37e-8) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(6.37e-8) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(6.37e-8) <=> engine->evaluate(\"'123'\")", + "QScriptValue(6.37e-8) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(6.37e-8) <=> engine->newVariant(QVariant(123))", + "QScriptValue(-6.37e-8) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(-6.37e-8) <=> QScriptValue(true)", + "QScriptValue(-6.37e-8) <=> QScriptValue(false)", + "QScriptValue(-6.37e-8) <=> QScriptValue(int(122))", + "QScriptValue(-6.37e-8) <=> QScriptValue(uint(124))", + "QScriptValue(-6.37e-8) <=> QScriptValue(0)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0.0)", + "QScriptValue(-6.37e-8) <=> QScriptValue(123.0)", + "QScriptValue(-6.37e-8) <=> QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0x43211234)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0x10000)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0x10001)", + "QScriptValue(-6.37e-8) <=> QScriptValue(qInf())", + "QScriptValue(-6.37e-8) <=> QScriptValue(\"Infinity\")", + "QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"\"))", + "QScriptValue(-6.37e-8) <=> QScriptValue(QString())", + "QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(-6.37e-8) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, true)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, false)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, int(122))", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, uint(124))", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, 0)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, 0.0)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, 123.0)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10000)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, 0x10001)", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, qInf())", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, QString())", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(-6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, true)", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, false)", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, int(122))", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, uint(124))", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0)", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0.0)", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 123.0)", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, qInf())", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString())", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(-6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"[]\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"null\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"true\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"false\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"122\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"124\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"0\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"0.0\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"123.0\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"''\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"'0'\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"'123'\")", + "QScriptValue(-6.37e-8) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(-6.37e-8) <=> engine->nullValue()", + "QScriptValue(-6.37e-8) <=> engine->newArray()", + "QScriptValue(-6.37e-8) <=> engine->newVariant(QVariant(123))", + "QScriptValue(-6.37e-8) <=> engine->newVariant(QVariant(false))", + "QScriptValue(-6.37e-8) <=> engine->newQObject(0)", + "QScriptValue(0x43211234) <=> QScriptValue(qInf())", + "QScriptValue(0x43211234) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0x43211234) <=> QScriptValue(0, qInf())", + "QScriptValue(0x43211234) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0x43211234) <=> QScriptValue(engine, qInf())", + "QScriptValue(0x43211234) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0x43211234) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0x10000) <=> QScriptValue(0x43211234)", + "QScriptValue(0x10000) <=> QScriptValue(0x10001)", + "QScriptValue(0x10000) <=> QScriptValue(qInf())", + "QScriptValue(0x10000) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0x10000) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0x10000) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0x10000) <=> QScriptValue(0, qInf())", + "QScriptValue(0x10000) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0x10000) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0x10000) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0x10000) <=> QScriptValue(engine, qInf())", + "QScriptValue(0x10000) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0x10000) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0x10000) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0x10000) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0x10001) <=> QScriptValue(0x43211234)", + "QScriptValue(0x10001) <=> QScriptValue(qInf())", + "QScriptValue(0x10001) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0x10001) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0x10001) <=> QScriptValue(0, qInf())", + "QScriptValue(0x10001) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0x10001) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0x10001) <=> QScriptValue(engine, qInf())", + "QScriptValue(0x10001) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0x10001) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0x10001) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(-qInf()) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(-qInf()) <=> QScriptValue(true)", + "QScriptValue(-qInf()) <=> QScriptValue(false)", + "QScriptValue(-qInf()) <=> QScriptValue(int(122))", + "QScriptValue(-qInf()) <=> QScriptValue(uint(124))", + "QScriptValue(-qInf()) <=> QScriptValue(0)", + "QScriptValue(-qInf()) <=> QScriptValue(0.0)", + "QScriptValue(-qInf()) <=> QScriptValue(123.0)", + "QScriptValue(-qInf()) <=> QScriptValue(6.37e-8)", + "QScriptValue(-qInf()) <=> QScriptValue(-6.37e-8)", + "QScriptValue(-qInf()) <=> QScriptValue(0x43211234)", + "QScriptValue(-qInf()) <=> QScriptValue(0x10000)", + "QScriptValue(-qInf()) <=> QScriptValue(0x10001)", + "QScriptValue(-qInf()) <=> QScriptValue(qInf())", + "QScriptValue(-qInf()) <=> QScriptValue(\"Infinity\")", + "QScriptValue(-qInf()) <=> QScriptValue(QString(\"\"))", + "QScriptValue(-qInf()) <=> QScriptValue(QString())", + "QScriptValue(-qInf()) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(-qInf()) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(-qInf()) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(-qInf()) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(-qInf()) <=> QScriptValue(0, true)", + "QScriptValue(-qInf()) <=> QScriptValue(0, false)", + "QScriptValue(-qInf()) <=> QScriptValue(0, int(122))", + "QScriptValue(-qInf()) <=> QScriptValue(0, uint(124))", + "QScriptValue(-qInf()) <=> QScriptValue(0, 0)", + "QScriptValue(-qInf()) <=> QScriptValue(0, 0.0)", + "QScriptValue(-qInf()) <=> QScriptValue(0, 123.0)", + "QScriptValue(-qInf()) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(-qInf()) <=> QScriptValue(0, -6.37e-8)", + "QScriptValue(-qInf()) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(-qInf()) <=> QScriptValue(0, 0x10000)", + "QScriptValue(-qInf()) <=> QScriptValue(0, 0x10001)", + "QScriptValue(-qInf()) <=> QScriptValue(0, qInf())", + "QScriptValue(-qInf()) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(-qInf()) <=> QScriptValue(0, QString())", + "QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(-qInf()) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(-qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(-qInf()) <=> QScriptValue(engine, true)", + "QScriptValue(-qInf()) <=> QScriptValue(engine, false)", + "QScriptValue(-qInf()) <=> QScriptValue(engine, int(122))", + "QScriptValue(-qInf()) <=> QScriptValue(engine, uint(124))", + "QScriptValue(-qInf()) <=> QScriptValue(engine, 0)", + "QScriptValue(-qInf()) <=> QScriptValue(engine, 0.0)", + "QScriptValue(-qInf()) <=> QScriptValue(engine, 123.0)", + "QScriptValue(-qInf()) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(-qInf()) <=> QScriptValue(engine, -6.37e-8)", + "QScriptValue(-qInf()) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(-qInf()) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(-qInf()) <=> QScriptValue(engine, qInf())", + "QScriptValue(-qInf()) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(-qInf()) <=> QScriptValue(engine, QString())", + "QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(-qInf()) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(-qInf()) <=> engine->evaluate(\"[]\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"null\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"true\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"false\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"122\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"124\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"0\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"0.0\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"123.0\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"-6.37e-8\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"''\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"'0'\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"'123'\")", + "QScriptValue(-qInf()) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(-qInf()) <=> engine->nullValue()", + "QScriptValue(-qInf()) <=> engine->newArray()", + "QScriptValue(-qInf()) <=> engine->newVariant(QVariant(123))", + "QScriptValue(-qInf()) <=> engine->newVariant(QVariant(false))", + "QScriptValue(-qInf()) <=> engine->newQObject(0)", + "QScriptValue(\"NaN\") <=> QScriptValue(\"ciao\")", + "QScriptValue(\"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"NaN\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(\"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"NaN\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(\"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"Object\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"Array\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"Number\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"Function\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"new Object()\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"Undefined\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"Null\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"True\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"False\")", + "QScriptValue(\"NaN\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(\"NaN\") <=> engine->newObject()", + "QScriptValue(\"NaN\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(\"NaN\") <=> engine->newQObject(engine)", + "QScriptValue(\"Infinity\") <=> QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\") <=> QScriptValue(\"ciao\")", + "QScriptValue(\"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"Infinity\") <=> QScriptValue(0, \"NaN\")", + "QScriptValue(\"Infinity\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(\"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(\"Infinity\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(\"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Object\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Array\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Number\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Function\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"new Object()\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Undefined\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"Null\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"True\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"False\")", + "QScriptValue(\"Infinity\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(\"Infinity\") <=> engine->newObject()", + "QScriptValue(\"Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(\"Infinity\") <=> engine->newQObject(engine)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(true)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(false)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(int(122))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(uint(124))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0.0)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(123.0)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(6.37e-8)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(-6.37e-8)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0x43211234)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0x10000)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0x10001)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(qInf())", + "QScriptValue(\"-Infinity\") <=> QScriptValue(\"NaN\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(\"ciao\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"0\"))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"123\"))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, true)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, false)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, int(122))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, uint(124))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0.0)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 123.0)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, -6.37e-8)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x43211234)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10000)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, 0x10001)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, qInf())", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"NaN\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, true)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, false)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, int(122))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, uint(124))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0.0)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 123.0)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, -6.37e-8)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10000)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, 0x10001)", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, qInf())", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(\"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Object\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Array\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Number\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Function\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"/foo/\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Object()\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"new Error()\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Undefined\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Null\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"True\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"False\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"null\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"true\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"false\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"122\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"124\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0.0\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"123.0\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0x10000\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"0x10001\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"Infinity\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'0'\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'123'\")", + "QScriptValue(\"-Infinity\") <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(\"-Infinity\") <=> engine->nullValue()", + "QScriptValue(\"-Infinity\") <=> engine->newObject()", + "QScriptValue(\"-Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(\"-Infinity\") <=> engine->newVariant(QVariant(123))", + "QScriptValue(\"-Infinity\") <=> engine->newVariant(QVariant(false))", + "QScriptValue(\"-Infinity\") <=> engine->newQObject(0)", + "QScriptValue(\"-Infinity\") <=> engine->newQObject(engine)", + "QScriptValue(\"ciao\") <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(\"ciao\") <=> engine->evaluate(\"Object\")", + "QScriptValue(\"ciao\") <=> engine->evaluate(\"Array\")", + "QScriptValue(\"ciao\") <=> engine->evaluate(\"Number\")", + "QScriptValue(\"ciao\") <=> engine->evaluate(\"Function\")", + "QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(\"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(true)", + "QScriptValue(QString(\"\")) <=> QScriptValue(int(122))", + "QScriptValue(QString(\"\")) <=> QScriptValue(uint(124))", + "QScriptValue(QString(\"\")) <=> QScriptValue(123.0)", + "QScriptValue(QString(\"\")) <=> QScriptValue(6.37e-8)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0x43211234)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0x10000)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0x10001)", + "QScriptValue(QString(\"\")) <=> QScriptValue(qInf())", + "QScriptValue(QString(\"\")) <=> QScriptValue(\"NaN\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(\"Infinity\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(\"-Infinity\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, true)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, int(122))", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, uint(124))", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, 123.0)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10000)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, 0x10001)", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, qInf())", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, true)", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, int(122))", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, uint(124))", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 123.0)", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, qInf())", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"/foo/\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Null\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"True\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"False\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"true\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"122\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"124\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"123.0\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"'0'\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(QString(\"\")) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(QString(\"\")) <=> engine->newObject()", + "QScriptValue(QString(\"\")) <=> engine->newArray(10)", + "QScriptValue(QString(\"\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(QString(\"\")) <=> engine->newVariant(QVariant(123))", + "QScriptValue(QString(\"\")) <=> engine->newQObject(engine)", + "QScriptValue(QString()) <=> QScriptValue(true)", + "QScriptValue(QString()) <=> QScriptValue(int(122))", + "QScriptValue(QString()) <=> QScriptValue(uint(124))", + "QScriptValue(QString()) <=> QScriptValue(123.0)", + "QScriptValue(QString()) <=> QScriptValue(6.37e-8)", + "QScriptValue(QString()) <=> QScriptValue(0x43211234)", + "QScriptValue(QString()) <=> QScriptValue(0x10000)", + "QScriptValue(QString()) <=> QScriptValue(0x10001)", + "QScriptValue(QString()) <=> QScriptValue(qInf())", + "QScriptValue(QString()) <=> QScriptValue(\"NaN\")", + "QScriptValue(QString()) <=> QScriptValue(\"Infinity\")", + "QScriptValue(QString()) <=> QScriptValue(\"-Infinity\")", + "QScriptValue(QString()) <=> QScriptValue(\"ciao\")", + "QScriptValue(QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString()) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(QString()) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(QString()) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(QString()) <=> QScriptValue(0, true)", + "QScriptValue(QString()) <=> QScriptValue(0, int(122))", + "QScriptValue(QString()) <=> QScriptValue(0, uint(124))", + "QScriptValue(QString()) <=> QScriptValue(0, 123.0)", + "QScriptValue(QString()) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(QString()) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(QString()) <=> QScriptValue(0, 0x10000)", + "QScriptValue(QString()) <=> QScriptValue(0, 0x10001)", + "QScriptValue(QString()) <=> QScriptValue(0, qInf())", + "QScriptValue(QString()) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(QString()) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(QString()) <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(QString()) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString()) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(QString()) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(QString()) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(QString()) <=> QScriptValue(engine, true)", + "QScriptValue(QString()) <=> QScriptValue(engine, int(122))", + "QScriptValue(QString()) <=> QScriptValue(engine, uint(124))", + "QScriptValue(QString()) <=> QScriptValue(engine, 123.0)", + "QScriptValue(QString()) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(QString()) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(QString()) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(QString()) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(QString()) <=> QScriptValue(engine, qInf())", + "QScriptValue(QString()) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(QString()) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(QString()) <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(QString()) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString()) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(QString()) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(QString()) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(QString()) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(QString()) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(QString()) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(QString()) <=> engine->evaluate(\"Object\")", + "QScriptValue(QString()) <=> engine->evaluate(\"Array\")", + "QScriptValue(QString()) <=> engine->evaluate(\"Number\")", + "QScriptValue(QString()) <=> engine->evaluate(\"Function\")", + "QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(QString()) <=> engine->evaluate(\"/foo/\")", + "QScriptValue(QString()) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(QString()) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(QString()) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(QString()) <=> engine->evaluate(\"Null\")", + "QScriptValue(QString()) <=> engine->evaluate(\"True\")", + "QScriptValue(QString()) <=> engine->evaluate(\"False\")", + "QScriptValue(QString()) <=> engine->evaluate(\"true\")", + "QScriptValue(QString()) <=> engine->evaluate(\"122\")", + "QScriptValue(QString()) <=> engine->evaluate(\"124\")", + "QScriptValue(QString()) <=> engine->evaluate(\"123.0\")", + "QScriptValue(QString()) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(QString()) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(QString()) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(QString()) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(QString()) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(QString()) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(QString()) <=> engine->evaluate(\"'0'\")", + "QScriptValue(QString()) <=> engine->evaluate(\"'123'\")", + "QScriptValue(QString()) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(QString()) <=> engine->newObject()", + "QScriptValue(QString()) <=> engine->newArray(10)", + "QScriptValue(QString()) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(QString()) <=> engine->newVariant(QVariant(123))", + "QScriptValue(QString()) <=> engine->newQObject(engine)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(true)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(int(122))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(uint(124))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(123.0)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(6.37e-8)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0x43211234)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0x10000)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0x10001)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(qInf())", + "QScriptValue(QString(\"0\")) <=> QScriptValue(\"NaN\")", + "QScriptValue(QString(\"0\")) <=> QScriptValue(\"Infinity\")", + "QScriptValue(QString(\"0\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, true)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, int(122))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, uint(124))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 123.0)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10000)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, 0x10001)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, qInf())", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, true)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, int(122))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, uint(124))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 123.0)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, qInf())", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Null\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"True\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"False\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"true\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"122\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"124\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"123.0\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(QString(\"0\")) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(QString(\"0\")) <=> engine->newObject()", + "QScriptValue(QString(\"0\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(QString(\"0\")) <=> engine->newVariant(QVariant(123))", + "QScriptValue(QString(\"0\")) <=> engine->newQObject(engine)", + "QScriptValue(QString(\"123\")) <=> QScriptValue(uint(124))", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0x43211234)", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0x10000)", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0x10001)", + "QScriptValue(QString(\"123\")) <=> QScriptValue(qInf())", + "QScriptValue(QString(\"123\")) <=> QScriptValue(\"NaN\")", + "QScriptValue(QString(\"123\")) <=> QScriptValue(\"Infinity\")", + "QScriptValue(QString(\"123\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0, uint(124))", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10000)", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0, 0x10001)", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0, qInf())", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, uint(124))", + "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, qInf())", + "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Null\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"True\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"False\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"124\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(QString(\"123\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(QString(\"123\")) <=> engine->newObject()", + "QScriptValue(QString(\"123\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(QString(\"123\")) <=> engine->newQObject(engine)", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(int(122))", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(uint(124))", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(123.0)", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x43211234)", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10000)", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0x10001)", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(qInf())", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"NaN\")", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"Infinity\")", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, int(122))", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, uint(124))", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 123.0)", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10000)", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, 0x10001)", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, qInf())", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, int(122))", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, uint(124))", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 123.0)", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, qInf())", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"12.4\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Null\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"True\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"False\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"122\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"124\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"123.0\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(QString(\"12.4\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(QString(\"12.4\")) <=> engine->newObject()", + "QScriptValue(QString(\"12.4\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(QString(\"12.4\")) <=> engine->newVariant(QVariant(123))", + "QScriptValue(QString(\"12.4\")) <=> engine->newQObject(engine)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(true)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(int(122))", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(uint(124))", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(123.0)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x43211234)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10000)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0x10001)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(qInf())", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, true)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, int(122))", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, qInf())", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, true)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"true\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"122\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"124\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, QScriptValue::NullValue) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, true) <=> QScriptValue(int(122))", + "QScriptValue(0, true) <=> QScriptValue(uint(124))", + "QScriptValue(0, true) <=> QScriptValue(123.0)", + "QScriptValue(0, true) <=> QScriptValue(0x43211234)", + "QScriptValue(0, true) <=> QScriptValue(0x10000)", + "QScriptValue(0, true) <=> QScriptValue(0x10001)", + "QScriptValue(0, true) <=> QScriptValue(qInf())", + "QScriptValue(0, true) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, true) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, true) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, true) <=> QScriptValue(0, int(122))", + "QScriptValue(0, true) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, true) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, true) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, true) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, true) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, true) <=> QScriptValue(0, qInf())", + "QScriptValue(0, true) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, true) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, true) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0, true) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, true) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, true) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, true) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, true) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, true) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, true) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, true) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, true) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, true) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0, true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0, true) <=> engine->evaluate(\"122\")", + "QScriptValue(0, true) <=> engine->evaluate(\"124\")", + "QScriptValue(0, true) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, true) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, true) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, true) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, true) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, true) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, true) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, true) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, false) <=> QScriptValue(true)", + "QScriptValue(0, false) <=> QScriptValue(int(122))", + "QScriptValue(0, false) <=> QScriptValue(uint(124))", + "QScriptValue(0, false) <=> QScriptValue(123.0)", + "QScriptValue(0, false) <=> QScriptValue(6.37e-8)", + "QScriptValue(0, false) <=> QScriptValue(0x43211234)", + "QScriptValue(0, false) <=> QScriptValue(0x10000)", + "QScriptValue(0, false) <=> QScriptValue(0x10001)", + "QScriptValue(0, false) <=> QScriptValue(qInf())", + "QScriptValue(0, false) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, false) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, false) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, false) <=> QScriptValue(0, true)", + "QScriptValue(0, false) <=> QScriptValue(0, int(122))", + "QScriptValue(0, false) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, false) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, false) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0, false) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, false) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, false) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, false) <=> QScriptValue(0, qInf())", + "QScriptValue(0, false) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, false) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, false) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0, false) <=> QScriptValue(engine, true)", + "QScriptValue(0, false) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, false) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, false) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, false) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0, false) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, false) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, false) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, false) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, false) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, false) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, false) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0, false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0, false) <=> engine->evaluate(\"true\")", + "QScriptValue(0, false) <=> engine->evaluate(\"122\")", + "QScriptValue(0, false) <=> engine->evaluate(\"124\")", + "QScriptValue(0, false) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, false) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0, false) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, false) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, false) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, false) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, false) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, false) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, false) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, int(122)) <=> QScriptValue(uint(124))", + "QScriptValue(0, int(122)) <=> QScriptValue(123.0)", + "QScriptValue(0, int(122)) <=> QScriptValue(0x43211234)", + "QScriptValue(0, int(122)) <=> QScriptValue(0x10000)", + "QScriptValue(0, int(122)) <=> QScriptValue(0x10001)", + "QScriptValue(0, int(122)) <=> QScriptValue(qInf())", + "QScriptValue(0, int(122)) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, int(122)) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, int(122)) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, int(122)) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, int(122)) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, int(122)) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, int(122)) <=> QScriptValue(0, qInf())", + "QScriptValue(0, int(122)) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, int(122)) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, int(122)) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, int(122)) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, int(122)) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, int(122)) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, int(122)) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, int(122)) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, int(122)) <=> engine->evaluate(\"124\")", + "QScriptValue(0, int(122)) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, int(122)) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, int(122)) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, int(122)) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, int(122)) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, int(122)) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, int(122)) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, uint(124)) <=> QScriptValue(0x43211234)", + "QScriptValue(0, uint(124)) <=> QScriptValue(0x10000)", + "QScriptValue(0, uint(124)) <=> QScriptValue(0x10001)", + "QScriptValue(0, uint(124)) <=> QScriptValue(qInf())", + "QScriptValue(0, uint(124)) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, uint(124)) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, uint(124)) <=> QScriptValue(0, qInf())", + "QScriptValue(0, uint(124)) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, uint(124)) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, uint(124)) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, uint(124)) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, uint(124)) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, uint(124)) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, uint(124)) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, uint(124)) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, 0) <=> QScriptValue(true)", + "QScriptValue(0, 0) <=> QScriptValue(int(122))", + "QScriptValue(0, 0) <=> QScriptValue(uint(124))", + "QScriptValue(0, 0) <=> QScriptValue(123.0)", + "QScriptValue(0, 0) <=> QScriptValue(6.37e-8)", + "QScriptValue(0, 0) <=> QScriptValue(0x43211234)", + "QScriptValue(0, 0) <=> QScriptValue(0x10000)", + "QScriptValue(0, 0) <=> QScriptValue(0x10001)", + "QScriptValue(0, 0) <=> QScriptValue(qInf())", + "QScriptValue(0, 0) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, 0) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, 0) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, 0) <=> QScriptValue(0, true)", + "QScriptValue(0, 0) <=> QScriptValue(0, int(122))", + "QScriptValue(0, 0) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, 0) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, 0) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0, 0) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, 0) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, 0) <=> QScriptValue(0, qInf())", + "QScriptValue(0, 0) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, 0) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, 0) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0, 0) <=> QScriptValue(engine, true)", + "QScriptValue(0, 0) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, 0) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, 0) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, 0) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0, 0) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, 0) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, 0) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, 0) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, 0) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, 0) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0, 0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"true\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"122\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"124\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, 0) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, 0) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, 0.0) <=> QScriptValue(true)", + "QScriptValue(0, 0.0) <=> QScriptValue(int(122))", + "QScriptValue(0, 0.0) <=> QScriptValue(uint(124))", + "QScriptValue(0, 0.0) <=> QScriptValue(123.0)", + "QScriptValue(0, 0.0) <=> QScriptValue(6.37e-8)", + "QScriptValue(0, 0.0) <=> QScriptValue(0x43211234)", + "QScriptValue(0, 0.0) <=> QScriptValue(0x10000)", + "QScriptValue(0, 0.0) <=> QScriptValue(0x10001)", + "QScriptValue(0, 0.0) <=> QScriptValue(qInf())", + "QScriptValue(0, 0.0) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, 0.0) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, 0.0) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, 0.0) <=> QScriptValue(0, true)", + "QScriptValue(0, 0.0) <=> QScriptValue(0, int(122))", + "QScriptValue(0, 0.0) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, 0.0) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, 0.0) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0, 0.0) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, 0.0) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, 0.0) <=> QScriptValue(0, qInf())", + "QScriptValue(0, 0.0) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, 0.0) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, true)", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"true\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"122\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"124\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, 0.0) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, 0.0) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, 123.0) <=> QScriptValue(uint(124))", + "QScriptValue(0, 123.0) <=> QScriptValue(0x43211234)", + "QScriptValue(0, 123.0) <=> QScriptValue(0x10000)", + "QScriptValue(0, 123.0) <=> QScriptValue(0x10001)", + "QScriptValue(0, 123.0) <=> QScriptValue(qInf())", + "QScriptValue(0, 123.0) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, 123.0) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, 123.0) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, 123.0) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, 123.0) <=> QScriptValue(0, qInf())", + "QScriptValue(0, 123.0) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, 123.0) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, 123.0) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, 123.0) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, 123.0) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, 123.0) <=> engine->evaluate(\"124\")", + "QScriptValue(0, 123.0) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, 123.0) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, 123.0) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, 123.0) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(true)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(int(122))", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(uint(124))", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(123.0)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0x43211234)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10000)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0x10001)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(qInf())", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, true)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, int(122))", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, qInf())", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, true)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"true\")", + "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"122\")", + "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"124\")", + "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, 6.37e-8) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, 6.37e-8) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(true)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(false)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(int(122))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(uint(124))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0.0)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(123.0)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(6.37e-8)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0x43211234)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10000)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0x10001)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(qInf())", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"\"))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(QString())", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, true)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, false)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, int(122))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0.0)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, qInf())", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString())", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, true)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, false)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString())", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, -6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"[]\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"null\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"true\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"false\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"122\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"124\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0.0\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"''\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"'0'\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, -6.37e-8) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, -6.37e-8) <=> engine->nullValue()", + "QScriptValue(0, -6.37e-8) <=> engine->newArray()", + "QScriptValue(0, -6.37e-8) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, -6.37e-8) <=> engine->newVariant(QVariant(false))", + "QScriptValue(0, -6.37e-8) <=> engine->newQObject(0)", + "QScriptValue(0, 0x43211234) <=> QScriptValue(qInf())", + "QScriptValue(0, 0x43211234) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, 0x43211234) <=> QScriptValue(0, qInf())", + "QScriptValue(0, 0x43211234) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, 0x43211234) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, 0x43211234) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, 0x43211234) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, 0x10000) <=> QScriptValue(0x43211234)", + "QScriptValue(0, 0x10000) <=> QScriptValue(0x10001)", + "QScriptValue(0, 0x10000) <=> QScriptValue(qInf())", + "QScriptValue(0, 0x10000) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, 0x10000) <=> QScriptValue(0, qInf())", + "QScriptValue(0, 0x10000) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, 0x10000) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, 0x10000) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, 0x10000) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, 0x10000) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, 0x10000) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, 0x10001) <=> QScriptValue(0x43211234)", + "QScriptValue(0, 0x10001) <=> QScriptValue(qInf())", + "QScriptValue(0, 0x10001) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, 0x10001) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10001) <=> QScriptValue(0, qInf())", + "QScriptValue(0, 0x10001) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, 0x10001) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, 0x10001) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, 0x10001) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, 0x10001) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, 0x10001) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, -qInf()) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(0, -qInf()) <=> QScriptValue(true)", + "QScriptValue(0, -qInf()) <=> QScriptValue(false)", + "QScriptValue(0, -qInf()) <=> QScriptValue(int(122))", + "QScriptValue(0, -qInf()) <=> QScriptValue(uint(124))", + "QScriptValue(0, -qInf()) <=> QScriptValue(0)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0.0)", + "QScriptValue(0, -qInf()) <=> QScriptValue(123.0)", + "QScriptValue(0, -qInf()) <=> QScriptValue(6.37e-8)", + "QScriptValue(0, -qInf()) <=> QScriptValue(-6.37e-8)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0x43211234)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0x10000)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0x10001)", + "QScriptValue(0, -qInf()) <=> QScriptValue(qInf())", + "QScriptValue(0, -qInf()) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"\"))", + "QScriptValue(0, -qInf()) <=> QScriptValue(QString())", + "QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, -qInf()) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, true)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, false)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, int(122))", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, 0)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, 0.0)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, -6.37e-8)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, qInf())", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, QString())", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, true)", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, false)", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0)", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0.0)", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, -6.37e-8)", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString())", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"[]\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"null\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"true\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"false\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"122\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"124\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"0\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"0.0\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"-6.37e-8\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"''\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"'0'\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, -qInf()) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, -qInf()) <=> engine->nullValue()", + "QScriptValue(0, -qInf()) <=> engine->newArray()", + "QScriptValue(0, -qInf()) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, -qInf()) <=> engine->newVariant(QVariant(false))", + "QScriptValue(0, -qInf()) <=> engine->newQObject(0)", + "QScriptValue(0, \"NaN\") <=> QScriptValue(\"ciao\")", + "QScriptValue(0, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"NaN\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(0, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"NaN\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(0, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Object\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Array\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Number\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Function\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"new Object()\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Undefined\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"Null\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"True\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"False\")", + "QScriptValue(0, \"NaN\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(0, \"NaN\") <=> engine->newObject()", + "QScriptValue(0, \"NaN\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(0, \"NaN\") <=> engine->newQObject(engine)", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(\"NaN\")", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(\"ciao\")", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(0, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Object\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Array\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Number\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Function\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"new Object()\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Undefined\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"Null\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"True\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"False\")", + "QScriptValue(0, \"Infinity\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(0, \"Infinity\") <=> engine->newObject()", + "QScriptValue(0, \"Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(0, \"Infinity\") <=> engine->newQObject(engine)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(true)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(false)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(int(122))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(uint(124))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0.0)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(123.0)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(6.37e-8)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(-6.37e-8)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x43211234)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10000)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0x10001)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(qInf())", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"NaN\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(\"ciao\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"0\"))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, true)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, false)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, int(122))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, uint(124))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0.0)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 123.0)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, qInf())", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, true)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, false)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, int(122))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0.0)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, qInf())", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Object\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Array\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Number\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Function\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"/foo/\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Object()\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"new Error()\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Undefined\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Null\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"True\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"False\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"null\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"true\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"false\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"122\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"124\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0.0\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'0'\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, \"-Infinity\") <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, \"-Infinity\") <=> engine->nullValue()", + "QScriptValue(0, \"-Infinity\") <=> engine->newObject()", + "QScriptValue(0, \"-Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(0, \"-Infinity\") <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, \"-Infinity\") <=> engine->newVariant(QVariant(false))", + "QScriptValue(0, \"-Infinity\") <=> engine->newQObject(0)", + "QScriptValue(0, \"-Infinity\") <=> engine->newQObject(engine)", + "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Object\")", + "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Array\")", + "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Number\")", + "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"Function\")", + "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(0, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(true)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(int(122))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(uint(124))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(123.0)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(6.37e-8)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0x43211234)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10000)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0x10001)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(qInf())", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(\"NaN\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(\"-Infinity\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, true)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, int(122))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, qInf())", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, true)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"/foo/\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Null\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"True\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"False\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"true\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"122\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"124\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'0'\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, QString(\"\")) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, QString(\"\")) <=> engine->newObject()", + "QScriptValue(0, QString(\"\")) <=> engine->newArray(10)", + "QScriptValue(0, QString(\"\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(0, QString(\"\")) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, QString(\"\")) <=> engine->newQObject(engine)", + "QScriptValue(0, QString()) <=> QScriptValue(true)", + "QScriptValue(0, QString()) <=> QScriptValue(int(122))", + "QScriptValue(0, QString()) <=> QScriptValue(uint(124))", + "QScriptValue(0, QString()) <=> QScriptValue(123.0)", + "QScriptValue(0, QString()) <=> QScriptValue(6.37e-8)", + "QScriptValue(0, QString()) <=> QScriptValue(0x43211234)", + "QScriptValue(0, QString()) <=> QScriptValue(0x10000)", + "QScriptValue(0, QString()) <=> QScriptValue(0x10001)", + "QScriptValue(0, QString()) <=> QScriptValue(qInf())", + "QScriptValue(0, QString()) <=> QScriptValue(\"NaN\")", + "QScriptValue(0, QString()) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, QString()) <=> QScriptValue(\"-Infinity\")", + "QScriptValue(0, QString()) <=> QScriptValue(\"ciao\")", + "QScriptValue(0, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString()) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(0, QString()) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, QString()) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QString()) <=> QScriptValue(0, true)", + "QScriptValue(0, QString()) <=> QScriptValue(0, int(122))", + "QScriptValue(0, QString()) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, QString()) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, QString()) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0, QString()) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, QString()) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, QString()) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, QString()) <=> QScriptValue(0, qInf())", + "QScriptValue(0, QString()) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(0, QString()) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, QString()) <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, QString()) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString()) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0, QString()) <=> QScriptValue(engine, true)", + "QScriptValue(0, QString()) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, QString()) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, QString()) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, QString()) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0, QString()) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, QString()) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, QString()) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, QString()) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(0, QString()) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, QString()) <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(0, QString()) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(0, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, QString()) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0, QString()) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"Object\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"Array\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"Number\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"Function\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"/foo/\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"Null\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"True\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"False\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"true\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"122\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"124\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"'0'\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, QString()) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, QString()) <=> engine->newObject()", + "QScriptValue(0, QString()) <=> engine->newArray(10)", + "QScriptValue(0, QString()) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(0, QString()) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, QString()) <=> engine->newQObject(engine)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(true)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(int(122))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(uint(124))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(123.0)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(6.37e-8)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x43211234)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10000)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0x10001)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(qInf())", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"NaN\")", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, true)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, int(122))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, qInf())", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, true)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Null\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"True\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"False\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"true\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"122\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"124\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, QString(\"0\")) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, QString(\"0\")) <=> engine->newObject()", + "QScriptValue(0, QString(\"0\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(0, QString(\"0\")) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, QString(\"0\")) <=> engine->newQObject(engine)", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(uint(124))", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x43211234)", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10000)", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0x10001)", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(qInf())", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"NaN\")", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, qInf())", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(0, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Null\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"True\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"False\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"124\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, QString(\"123\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(0, QString(\"123\")) <=> engine->newObject()", + "QScriptValue(0, QString(\"123\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(0, QString(\"123\")) <=> engine->newQObject(engine)", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(int(122))", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(uint(124))", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(123.0)", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x43211234)", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10000)", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0x10001)", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(qInf())", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"NaN\")", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"Infinity\")", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, int(122))", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, uint(124))", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 123.0)", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10000)", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, 0x10001)", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, qInf())", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, int(122))", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, uint(124))", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 123.0)", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, qInf())", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"12.3\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Null\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"True\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"False\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"122\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"124\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"123.0\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(0, QString(\"12.3\")) <=> engine->newObject()", + "QScriptValue(0, QString(\"12.3\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(0, QString(\"12.3\")) <=> engine->newVariant(QVariant(123))", + "QScriptValue(0, QString(\"12.3\")) <=> engine->newQObject(engine)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(true)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(int(122))", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(uint(124))", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(123.0)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(6.37e-8)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10000)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0x10001)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(qInf())", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, true)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, true)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QScriptValue::NullValue) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"true\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(engine, QScriptValue::NullValue) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, true) <=> QScriptValue(int(122))", + "QScriptValue(engine, true) <=> QScriptValue(uint(124))", + "QScriptValue(engine, true) <=> QScriptValue(123.0)", + "QScriptValue(engine, true) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, true) <=> QScriptValue(0x10000)", + "QScriptValue(engine, true) <=> QScriptValue(0x10001)", + "QScriptValue(engine, true) <=> QScriptValue(qInf())", + "QScriptValue(engine, true) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, true) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, true) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(engine, true) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, true) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, true) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, true) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, true) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, true) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, true) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, true) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, true) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, true) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, true) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, true) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, true) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, true) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, true) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, true) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, true) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, true) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, true) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(engine, true) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(engine, true) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, true) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, true) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, true) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, true) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, true) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, true) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, true) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, true) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(engine, true) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, false) <=> QScriptValue(true)", + "QScriptValue(engine, false) <=> QScriptValue(int(122))", + "QScriptValue(engine, false) <=> QScriptValue(uint(124))", + "QScriptValue(engine, false) <=> QScriptValue(123.0)", + "QScriptValue(engine, false) <=> QScriptValue(6.37e-8)", + "QScriptValue(engine, false) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, false) <=> QScriptValue(0x10000)", + "QScriptValue(engine, false) <=> QScriptValue(0x10001)", + "QScriptValue(engine, false) <=> QScriptValue(qInf())", + "QScriptValue(engine, false) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, false) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, false) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(engine, false) <=> QScriptValue(0, true)", + "QScriptValue(engine, false) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, false) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, false) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, false) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(engine, false) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, false) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, false) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, false) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, false) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, false) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, false) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, false) <=> QScriptValue(engine, true)", + "QScriptValue(engine, false) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, false) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, false) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, false) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, false) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, false) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, false) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, false) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, false) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, false) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(engine, false) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"true\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, false) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(engine, false) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, int(122)) <=> QScriptValue(uint(124))", + "QScriptValue(engine, int(122)) <=> QScriptValue(123.0)", + "QScriptValue(engine, int(122)) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, int(122)) <=> QScriptValue(0x10000)", + "QScriptValue(engine, int(122)) <=> QScriptValue(0x10001)", + "QScriptValue(engine, int(122)) <=> QScriptValue(qInf())", + "QScriptValue(engine, int(122)) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, int(122)) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, int(122)) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, int(122)) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, int(122)) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, int(122)) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, int(122)) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, int(122)) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, int(122)) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, int(122)) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, int(122)) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, int(122)) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, int(122)) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, int(122)) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, int(122)) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, int(122)) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, int(122)) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, int(122)) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, int(122)) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, int(122)) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, int(122)) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, int(122)) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, uint(124)) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, uint(124)) <=> QScriptValue(0x10000)", + "QScriptValue(engine, uint(124)) <=> QScriptValue(0x10001)", + "QScriptValue(engine, uint(124)) <=> QScriptValue(qInf())", + "QScriptValue(engine, uint(124)) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, uint(124)) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, uint(124)) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, uint(124)) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, uint(124)) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, uint(124)) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, uint(124)) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, uint(124)) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, uint(124)) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, 0) <=> QScriptValue(true)", + "QScriptValue(engine, 0) <=> QScriptValue(int(122))", + "QScriptValue(engine, 0) <=> QScriptValue(uint(124))", + "QScriptValue(engine, 0) <=> QScriptValue(123.0)", + "QScriptValue(engine, 0) <=> QScriptValue(6.37e-8)", + "QScriptValue(engine, 0) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, 0) <=> QScriptValue(0x10000)", + "QScriptValue(engine, 0) <=> QScriptValue(0x10001)", + "QScriptValue(engine, 0) <=> QScriptValue(qInf())", + "QScriptValue(engine, 0) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, 0) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, 0) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(engine, 0) <=> QScriptValue(0, true)", + "QScriptValue(engine, 0) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, 0) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, 0) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, 0) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(engine, 0) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, 0) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, 0) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, 0) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, 0) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, 0) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, 0) <=> QScriptValue(engine, true)", + "QScriptValue(engine, 0) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, 0) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, 0) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, 0) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, 0) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, 0) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, 0) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(engine, 0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"true\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, 0) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(engine, 0) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, 0.0) <=> QScriptValue(true)", + "QScriptValue(engine, 0.0) <=> QScriptValue(int(122))", + "QScriptValue(engine, 0.0) <=> QScriptValue(uint(124))", + "QScriptValue(engine, 0.0) <=> QScriptValue(123.0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(6.37e-8)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0x10000)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0x10001)", + "QScriptValue(engine, 0.0) <=> QScriptValue(qInf())", + "QScriptValue(engine, 0.0) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, 0.0) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, true)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, 0.0) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, true)", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, 0.0) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"true\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, 0.0) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(engine, 0.0) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, 123.0) <=> QScriptValue(uint(124))", + "QScriptValue(engine, 123.0) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, 123.0) <=> QScriptValue(0x10000)", + "QScriptValue(engine, 123.0) <=> QScriptValue(0x10001)", + "QScriptValue(engine, 123.0) <=> QScriptValue(qInf())", + "QScriptValue(engine, 123.0) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, 123.0) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, 123.0) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, 123.0) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, 123.0) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, 123.0) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 123.0) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, 123.0) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, 123.0) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, 123.0) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, 123.0) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, 123.0) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, 123.0) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, 123.0) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(true)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(int(122))", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(uint(124))", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(123.0)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10000)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0x10001)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(qInf())", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, true)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, true)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, 6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"true\")", + "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, 6.37e-8) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(engine, 6.37e-8) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(true)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(false)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(int(122))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(uint(124))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0.0)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(123.0)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(6.37e-8)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10000)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0x10001)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(qInf())", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"\"))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString())", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, true)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, false)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0.0)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString())", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, true)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, false)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0.0)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString())", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, -6.37e-8) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"[]\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"null\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"true\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"false\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0.0\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"''\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"'0'\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, -6.37e-8) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(engine, -6.37e-8) <=> engine->nullValue()", + "QScriptValue(engine, -6.37e-8) <=> engine->newArray()", + "QScriptValue(engine, -6.37e-8) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, -6.37e-8) <=> engine->newVariant(QVariant(false))", + "QScriptValue(engine, -6.37e-8) <=> engine->newQObject(0)", + "QScriptValue(engine, 0x43211234) <=> QScriptValue(qInf())", + "QScriptValue(engine, 0x43211234) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, 0x43211234) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, 0x43211234) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, 0x43211234) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, 0x43211234) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, 0x10000) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, 0x10000) <=> QScriptValue(0x10001)", + "QScriptValue(engine, 0x10000) <=> QScriptValue(qInf())", + "QScriptValue(engine, 0x10000) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, 0x10000) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, 0x10000) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, 0x10000) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, 0x10000) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, 0x10000) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, 0x10000) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, 0x10000) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, 0x10001) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, 0x10001) <=> QScriptValue(qInf())", + "QScriptValue(engine, 0x10001) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, 0x10001) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, 0x10001) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, 0x10001) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, 0x10001) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10001) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, 0x10001) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, 0x10001) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, 0x10001) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, -qInf()) <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(true)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(false)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(int(122))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(uint(124))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0.0)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(123.0)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(6.37e-8)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(-6.37e-8)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0x10000)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0x10001)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(qInf())", + "QScriptValue(engine, -qInf()) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"\"))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(QString())", + "QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, true)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, false)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0.0)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, -6.37e-8)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"\"))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString())", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, true)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, false)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0.0)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString())", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, -qInf()) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"[]\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Array.prototype\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"new Array()\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"null\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"true\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"false\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0.0\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"-6.37e-8\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"''\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"'0'\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, -qInf()) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(engine, -qInf()) <=> engine->nullValue()", + "QScriptValue(engine, -qInf()) <=> engine->newArray()", + "QScriptValue(engine, -qInf()) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, -qInf()) <=> engine->newVariant(QVariant(false))", + "QScriptValue(engine, -qInf()) <=> engine->newQObject(0)", + "QScriptValue(engine, \"NaN\") <=> QScriptValue(\"ciao\")", + "QScriptValue(engine, \"NaN\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"NaN\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(engine, \"NaN\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, \"NaN\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Object\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Array\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Number\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Function\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"new Object()\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Undefined\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"Null\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"True\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"False\")", + "QScriptValue(engine, \"NaN\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(engine, \"NaN\") <=> engine->newObject()", + "QScriptValue(engine, \"NaN\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(engine, \"NaN\") <=> engine->newQObject(engine)", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"NaN\")", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(\"ciao\")", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"NaN\")", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, \"Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Object\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Array\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Number\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Function\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"new Object()\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Undefined\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"Null\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"True\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"False\")", + "QScriptValue(engine, \"Infinity\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(engine, \"Infinity\") <=> engine->newObject()", + "QScriptValue(engine, \"Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(engine, \"Infinity\") <=> engine->newQObject(engine)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(true)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(false)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(int(122))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(uint(124))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0.0)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(123.0)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(6.37e-8)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(-6.37e-8)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x43211234)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10000)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0x10001)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(qInf())", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"NaN\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(\"ciao\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"0\"))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, true)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, false)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, int(122))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0.0)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, -6.37e-8)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, qInf())", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"NaN\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, \"ciao\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, true)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, false)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0.0)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, \"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Object\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Array\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Number\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Function\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"/foo/\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Object()\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"new Error()\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Undefined\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Null\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"True\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"False\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"null\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"true\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"false\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"122\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"124\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0.0\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'0'\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(engine, \"-Infinity\") <=> engine->nullValue()", + "QScriptValue(engine, \"-Infinity\") <=> engine->newObject()", + "QScriptValue(engine, \"-Infinity\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(engine, \"-Infinity\") <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, \"-Infinity\") <=> engine->newVariant(QVariant(false))", + "QScriptValue(engine, \"-Infinity\") <=> engine->newQObject(0)", + "QScriptValue(engine, \"-Infinity\") <=> engine->newQObject(engine)", + "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Object\")", + "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Array\")", + "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Number\")", + "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"Function\")", + "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(engine, \"ciao\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(true)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(int(122))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(uint(124))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(123.0)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(6.37e-8)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10000)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0x10001)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(qInf())", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"NaN\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"-Infinity\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, true)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, true)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"\")) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"/foo/\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Null\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"True\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"False\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"true\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'0'\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, QString(\"\")) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(engine, QString(\"\")) <=> engine->newObject()", + "QScriptValue(engine, QString(\"\")) <=> engine->newArray(10)", + "QScriptValue(engine, QString(\"\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(engine, QString(\"\")) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, QString(\"\")) <=> engine->newQObject(engine)", + "QScriptValue(engine, QString()) <=> QScriptValue(true)", + "QScriptValue(engine, QString()) <=> QScriptValue(int(122))", + "QScriptValue(engine, QString()) <=> QScriptValue(uint(124))", + "QScriptValue(engine, QString()) <=> QScriptValue(123.0)", + "QScriptValue(engine, QString()) <=> QScriptValue(6.37e-8)", + "QScriptValue(engine, QString()) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, QString()) <=> QScriptValue(0x10000)", + "QScriptValue(engine, QString()) <=> QScriptValue(0x10001)", + "QScriptValue(engine, QString()) <=> QScriptValue(qInf())", + "QScriptValue(engine, QString()) <=> QScriptValue(\"NaN\")", + "QScriptValue(engine, QString()) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, QString()) <=> QScriptValue(\"-Infinity\")", + "QScriptValue(engine, QString()) <=> QScriptValue(\"ciao\")", + "QScriptValue(engine, QString()) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(QString(\"0\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(0, true)", + "QScriptValue(engine, QString()) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, QString()) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, QString()) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, QString()) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(engine, QString()) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, QString()) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, QString()) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, QString()) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(engine, QString()) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, QString()) <=> QScriptValue(0, \"-Infinity\")", + "QScriptValue(engine, QString()) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(engine, QString()) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"0\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, true)", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString()) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"Object\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"Array\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"Number\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"Function\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"/foo/\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"Null\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"True\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"False\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"true\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"'0'\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, QString()) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(engine, QString()) <=> engine->newObject()", + "QScriptValue(engine, QString()) <=> engine->newArray(10)", + "QScriptValue(engine, QString()) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(engine, QString()) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, QString()) <=> engine->newQObject(engine)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(true)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(int(122))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(uint(124))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(123.0)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(6.37e-8)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10000)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0x10001)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(qInf())", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"NaN\")", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, true)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 6.37e-8)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, true)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"0\")) <=> QScriptValue(engine, QString(\"1.23\"))", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Null\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"True\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"False\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"true\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"6.37e-8\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(engine, QString(\"0\")) <=> engine->newObject()", + "QScriptValue(engine, QString(\"0\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(engine, QString(\"0\")) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, QString(\"0\")) <=> engine->newQObject(engine)", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(uint(124))", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10000)", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0x10001)", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(qInf())", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"NaN\")", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString(\"123\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Null\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"True\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"False\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(engine, QString(\"123\")) <=> engine->newObject()", + "QScriptValue(engine, QString(\"123\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(engine, QString(\"123\")) <=> engine->newQObject(engine)", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(int(122))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(uint(124))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(123.0)", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x43211234)", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10000)", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0x10001)", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(qInf())", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"NaN\")", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"Infinity\")", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(\"ciao\")", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(QString(\"12.4\"))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, int(122))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, uint(124))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 123.0)", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x43211234)", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10000)", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, 0x10001)", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, qInf())", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"NaN\")", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"Infinity\")", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, \"ciao\")", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, int(122))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, uint(124))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 123.0)", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10000)", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, 0x10001)", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, qInf())", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"1.23\")) <=> QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object.prototype\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function.prototype\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Error.prototype\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Object\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Array\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Number\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Function\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 1; })\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Object()\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"new Error()\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Undefined\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Null\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"True\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"False\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"122\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"124\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"123.0\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"0x43211234\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"0x10000\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"0x10001\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"Infinity\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"'ciao'\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"'123'\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->evaluate(\"'12.4'\")", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->newObject()", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->newVariant(QVariant(123))", + "QScriptValue(engine, QString(\"1.23\")) <=> engine->newQObject(engine)", + "engine->evaluate(\"[]\") <=> QScriptValue(true)", + "engine->evaluate(\"[]\") <=> QScriptValue(int(122))", + "engine->evaluate(\"[]\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"[]\") <=> QScriptValue(123.0)", + "engine->evaluate(\"[]\") <=> QScriptValue(6.37e-8)", + "engine->evaluate(\"[]\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"[]\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"[]\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"[]\") <=> QScriptValue(qInf())", + "engine->evaluate(\"[]\") <=> QScriptValue(\"NaN\")", + "engine->evaluate(\"[]\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"[]\") <=> QScriptValue(\"-Infinity\")", + "engine->evaluate(\"[]\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"[]\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(QString(\"0\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(0, true)", + "engine->evaluate(\"[]\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"[]\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"[]\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"[]\") <=> QScriptValue(0, 6.37e-8)", + "engine->evaluate(\"[]\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"[]\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"[]\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"[]\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"[]\") <=> QScriptValue(0, \"NaN\")", + "engine->evaluate(\"[]\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"[]\") <=> QScriptValue(0, \"-Infinity\")", + "engine->evaluate(\"[]\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"[]\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"0\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, 6.37e-8)", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, \"NaN\")", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, \"-Infinity\")", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"0\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"[]\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"/foo/\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"new Error()\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"Null\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"False\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"'0'\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"[]\") <=> engine->newObject()", + "engine->evaluate(\"[]\") <=> engine->newArray(10)", + "engine->evaluate(\"[]\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"[]\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"[]\") <=> engine->newQObject(engine)", + "engine->evaluate(\"Object.prototype\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"Object.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"Object.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"Object.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"Object.prototype\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"Object.prototype\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(true)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(int(122))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(123.0)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(6.37e-8)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(qInf())", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"NaN\")", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"-Infinity\")", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"0\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, true)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 6.37e-8)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"NaN\")", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"-Infinity\")", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"0\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 6.37e-8)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"NaN\")", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"-Infinity\")", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"0\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"Array.prototype\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"/foo/\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"new Error()\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Null\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"False\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'0'\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"Array.prototype\") <=> engine->newObject()", + "engine->evaluate(\"Array.prototype\") <=> engine->newArray(10)", + "engine->evaluate(\"Array.prototype\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"Array.prototype\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"Array.prototype\") <=> engine->newQObject(engine)", + "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"NaN\")", + "engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"Error.prototype\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"Error.prototype\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"NaN\")", + "engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"Error.prototype\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"NaN\")", + "engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"Error.prototype\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Null\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"False\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"Error.prototype\") <=> engine->newObject()", + "engine->evaluate(\"Error.prototype\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"Error.prototype\") <=> engine->newQObject(engine)", + "engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Function\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"/foo/\") <=> QScriptValue(\"NaN\")", + "engine->evaluate(\"/foo/\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"/foo/\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"/foo/\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"0\"))", + "engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"/foo/\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"NaN\")", + "engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"/foo/\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"0\"))", + "engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"/foo/\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"NaN\")", + "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"0\"))", + "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"/foo/\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"new Error()\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Null\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"False\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'0'\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"/foo/\") <=> engine->newObject()", + "engine->evaluate(\"/foo/\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"/foo/\") <=> engine->newQObject(engine)", + "engine->evaluate(\"new Object()\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"new Object()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"new Object()\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"new Object()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"new Object()\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"new Object()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"new Object()\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(true)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(int(122))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(123.0)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(6.37e-8)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(qInf())", + "engine->evaluate(\"new Array()\") <=> QScriptValue(\"NaN\")", + "engine->evaluate(\"new Array()\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"new Array()\") <=> QScriptValue(\"-Infinity\")", + "engine->evaluate(\"new Array()\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"new Array()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"0\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, true)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 6.37e-8)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"NaN\")", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"-Infinity\")", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"0\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 6.37e-8)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"NaN\")", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"-Infinity\")", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"0\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"new Array()\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"new Error()\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Null\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"False\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'0'\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"new Array()\") <=> engine->newObject()", + "engine->evaluate(\"new Array()\") <=> engine->newArray(10)", + "engine->evaluate(\"new Array()\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"new Array()\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"new Array()\") <=> engine->newQObject(engine)", + "engine->evaluate(\"new Error()\") <=> QScriptValue(\"NaN\")", + "engine->evaluate(\"new Error()\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"new Error()\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"new Error()\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"NaN\")", + "engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"new Error()\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"new Error()\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"NaN\")", + "engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"new Error()\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"new Error()\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Null\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"False\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"new Error()\") <=> engine->newObject()", + "engine->evaluate(\"new Error()\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"new Error()\") <=> engine->newQObject(engine)", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(int(122))", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(123.0)", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(qInf())", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"Undefined\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"Undefined\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Undefined\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"Undefined\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Undefined\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"Undefined\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"Undefined\") <=> engine->newObject()", + "engine->evaluate(\"Undefined\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"Null\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"Null\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Null\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"Null\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Null\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"Null\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"Null\") <=> engine->newObject()", + "engine->evaluate(\"Null\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"True\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"True\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"True\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"True\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"True\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"True\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"True\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"True\") <=> engine->newObject()", + "engine->evaluate(\"True\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"False\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"False\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"False\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"False\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"False\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"False\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"False\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"Null\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"False\") <=> engine->newObject()", + "engine->evaluate(\"False\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"null\") <=> QScriptValue(true)", + "engine->evaluate(\"null\") <=> QScriptValue(int(122))", + "engine->evaluate(\"null\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"null\") <=> QScriptValue(123.0)", + "engine->evaluate(\"null\") <=> QScriptValue(6.37e-8)", + "engine->evaluate(\"null\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"null\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"null\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"null\") <=> QScriptValue(qInf())", + "engine->evaluate(\"null\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"null\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"null\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"null\") <=> QScriptValue(0, true)", + "engine->evaluate(\"null\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"null\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"null\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"null\") <=> QScriptValue(0, 6.37e-8)", + "engine->evaluate(\"null\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"null\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"null\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"null\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"null\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"null\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"null\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"null\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"null\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"null\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"null\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"null\") <=> QScriptValue(engine, 6.37e-8)", + "engine->evaluate(\"null\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"null\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"null\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"null\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"null\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"null\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"null\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"null\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"null\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"null\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"null\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"null\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"null\") <=> engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"null\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"null\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"null\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"null\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"null\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"null\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"null\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"true\") <=> QScriptValue(int(122))", + "engine->evaluate(\"true\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"true\") <=> QScriptValue(123.0)", + "engine->evaluate(\"true\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"true\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"true\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"true\") <=> QScriptValue(qInf())", + "engine->evaluate(\"true\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"true\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"true\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"true\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"true\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"true\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"true\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"true\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"true\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"true\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"true\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"true\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"true\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"true\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"true\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"true\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"true\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"true\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"true\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"true\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"true\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"true\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"true\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"true\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"true\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"true\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"true\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"true\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"true\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"true\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"true\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"true\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"true\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"true\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"false\") <=> QScriptValue(true)", + "engine->evaluate(\"false\") <=> QScriptValue(int(122))", + "engine->evaluate(\"false\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"false\") <=> QScriptValue(123.0)", + "engine->evaluate(\"false\") <=> QScriptValue(6.37e-8)", + "engine->evaluate(\"false\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"false\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"false\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"false\") <=> QScriptValue(qInf())", + "engine->evaluate(\"false\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"false\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"false\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"false\") <=> QScriptValue(0, true)", + "engine->evaluate(\"false\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"false\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"false\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"false\") <=> QScriptValue(0, 6.37e-8)", + "engine->evaluate(\"false\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"false\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"false\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"false\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"false\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"false\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"false\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"false\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"false\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"false\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"false\") <=> QScriptValue(engine, 6.37e-8)", + "engine->evaluate(\"false\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"false\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"false\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"false\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"false\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"false\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"false\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"false\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"false\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"122\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"122\") <=> QScriptValue(123.0)", + "engine->evaluate(\"122\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"122\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"122\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"122\") <=> QScriptValue(qInf())", + "engine->evaluate(\"122\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"122\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"122\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"122\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"122\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"122\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"122\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"122\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"122\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"122\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"122\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"122\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"122\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"122\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"122\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"122\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"122\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"122\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"122\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"122\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"122\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"122\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"122\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"122\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"122\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"122\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"124\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"124\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"124\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"124\") <=> QScriptValue(qInf())", + "engine->evaluate(\"124\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"124\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"124\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"124\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"124\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"124\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"124\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"124\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"124\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"124\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"124\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"124\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"124\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"124\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"124\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"0\") <=> QScriptValue(true)", + "engine->evaluate(\"0\") <=> QScriptValue(int(122))", + "engine->evaluate(\"0\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"0\") <=> QScriptValue(123.0)", + "engine->evaluate(\"0\") <=> QScriptValue(6.37e-8)", + "engine->evaluate(\"0\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"0\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"0\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"0\") <=> QScriptValue(qInf())", + "engine->evaluate(\"0\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"0\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"0\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"0\") <=> QScriptValue(0, true)", + "engine->evaluate(\"0\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"0\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"0\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"0\") <=> QScriptValue(0, 6.37e-8)", + "engine->evaluate(\"0\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"0\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"0\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"0\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"0\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"0\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"0\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"0\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"0\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"0\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"0\") <=> QScriptValue(engine, 6.37e-8)", + "engine->evaluate(\"0\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"0\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"0\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"0\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"0\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"0\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"0\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"0\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"0\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"0.0\") <=> QScriptValue(true)", + "engine->evaluate(\"0.0\") <=> QScriptValue(int(122))", + "engine->evaluate(\"0.0\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"0.0\") <=> QScriptValue(123.0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(6.37e-8)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"0.0\") <=> QScriptValue(qInf())", + "engine->evaluate(\"0.0\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"0.0\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, true)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, 6.37e-8)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"0.0\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 6.37e-8)", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"0.0\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"0.0\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"0.0\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"123.0\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"123.0\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"123.0\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"123.0\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"123.0\") <=> QScriptValue(qInf())", + "engine->evaluate(\"123.0\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"123.0\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"123.0\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"123.0\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"123.0\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"123.0\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"123.0\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"123.0\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"123.0\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"123.0\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"123.0\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"123.0\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"123.0\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"123.0\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"123.0\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"123.0\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"123.0\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"123.0\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(true)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(int(122))", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(123.0)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(qInf())", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, true)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"6.37e-8\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"6.37e-8\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"6.37e-8\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QScriptValue::NullValue)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(true)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(false)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(int(122))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0.0)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(123.0)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(6.37e-8)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(qInf())", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"\"))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString())", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"0\"))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QScriptValue::NullValue)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, true)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, false)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0.0)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 6.37e-8)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"\"))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString())", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"0\"))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QScriptValue::NullValue)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, false)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0.0)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 6.37e-8)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"\"))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString())", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"0\"))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"-6.37e-8\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"[]\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"new Array()\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"null\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"false\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0.0\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"''\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"'0'\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"-6.37e-8\") <=> engine->nullValue()", + "engine->evaluate(\"-6.37e-8\") <=> engine->newArray()", + "engine->evaluate(\"-6.37e-8\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"-6.37e-8\") <=> engine->newVariant(QVariant(false))", + "engine->evaluate(\"-6.37e-8\") <=> engine->newQObject(0)", + "engine->evaluate(\"0x43211234\") <=> QScriptValue(qInf())", + "engine->evaluate(\"0x43211234\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"0x43211234\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"0x43211234\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"0x43211234\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"0x43211234\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"0x10000\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"0x10000\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"0x10000\") <=> QScriptValue(qInf())", + "engine->evaluate(\"0x10000\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"0x10000\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"0x10000\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"0x10000\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"0x10000\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"0x10000\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"0x10000\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"0x10000\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"0x10001\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"0x10001\") <=> QScriptValue(qInf())", + "engine->evaluate(\"0x10001\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"0x10001\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"0x10001\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"0x10001\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"0x10001\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"0x10001\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"0x10001\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"0x10001\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10001\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(QScriptValue::NullValue)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(true)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(false)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(int(122))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0.0)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(123.0)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(6.37e-8)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(-6.37e-8)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(qInf())", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"\"))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(QString())", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"0\"))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QScriptValue::NullValue)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, true)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, false)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0.0)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 6.37e-8)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, -6.37e-8)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"\"))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString())", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"0\"))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QScriptValue::NullValue)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, false)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0.0)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 6.37e-8)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, -6.37e-8)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"\"))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString())", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"0\"))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"-Infinity\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"[]\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"new Array()\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"null\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"false\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0.0\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"''\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"'0'\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"-Infinity\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"-Infinity\") <=> engine->nullValue()", + "engine->evaluate(\"-Infinity\") <=> engine->newArray()", + "engine->evaluate(\"-Infinity\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"-Infinity\") <=> engine->newVariant(QVariant(false))", + "engine->evaluate(\"-Infinity\") <=> engine->newQObject(0)", + "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"'ciao'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"''\") <=> QScriptValue(true)", + "engine->evaluate(\"''\") <=> QScriptValue(int(122))", + "engine->evaluate(\"''\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"''\") <=> QScriptValue(123.0)", + "engine->evaluate(\"''\") <=> QScriptValue(6.37e-8)", + "engine->evaluate(\"''\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"''\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"''\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"''\") <=> QScriptValue(qInf())", + "engine->evaluate(\"''\") <=> QScriptValue(\"NaN\")", + "engine->evaluate(\"''\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"''\") <=> QScriptValue(\"-Infinity\")", + "engine->evaluate(\"''\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"''\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"''\") <=> QScriptValue(QString(\"0\"))", + "engine->evaluate(\"''\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"''\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"''\") <=> QScriptValue(0, true)", + "engine->evaluate(\"''\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"''\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"''\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"''\") <=> QScriptValue(0, 6.37e-8)", + "engine->evaluate(\"''\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"''\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"''\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"''\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"''\") <=> QScriptValue(0, \"NaN\")", + "engine->evaluate(\"''\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"''\") <=> QScriptValue(0, \"-Infinity\")", + "engine->evaluate(\"''\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"''\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"0\"))", + "engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"''\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"''\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"''\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"''\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"''\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"''\") <=> QScriptValue(engine, 6.37e-8)", + "engine->evaluate(\"''\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"''\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"''\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"''\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"''\") <=> QScriptValue(engine, \"NaN\")", + "engine->evaluate(\"''\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"''\") <=> QScriptValue(engine, \"-Infinity\")", + "engine->evaluate(\"''\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"''\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"0\"))", + "engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"''\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"''\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"/foo/\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"new Error()\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"Null\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"False\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"'0'\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"''\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"''\") <=> engine->newObject()", + "engine->evaluate(\"''\") <=> engine->newArray(10)", + "engine->evaluate(\"''\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"''\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"''\") <=> engine->newQObject(engine)", + "engine->evaluate(\"'0'\") <=> QScriptValue(true)", + "engine->evaluate(\"'0'\") <=> QScriptValue(int(122))", + "engine->evaluate(\"'0'\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"'0'\") <=> QScriptValue(123.0)", + "engine->evaluate(\"'0'\") <=> QScriptValue(6.37e-8)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"'0'\") <=> QScriptValue(qInf())", + "engine->evaluate(\"'0'\") <=> QScriptValue(\"NaN\")", + "engine->evaluate(\"'0'\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"'0'\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"'0'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"'0'\") <=> QScriptValue(QString(\"12.4\"))", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, true)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, 6.37e-8)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, \"NaN\")", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"'0'\") <=> QScriptValue(0, QString(\"12.3\"))", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, true)", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 6.37e-8)", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, \"NaN\")", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"'0'\") <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"new Error()\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Null\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"False\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"true\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"'0'\") <=> engine->evaluate(\"'12.4'\")", + "engine->evaluate(\"'0'\") <=> engine->newObject()", + "engine->evaluate(\"'0'\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"'0'\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"'0'\") <=> engine->newQObject(engine)", + "engine->evaluate(\"'123'\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"'123'\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"'123'\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"'123'\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"'123'\") <=> QScriptValue(qInf())", + "engine->evaluate(\"'123'\") <=> QScriptValue(\"NaN\")", + "engine->evaluate(\"'123'\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"'123'\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"'123'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'123'\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"'123'\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"'123'\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"'123'\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"'123'\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"'123'\") <=> QScriptValue(0, \"NaN\")", + "engine->evaluate(\"'123'\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"'123'\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"'123'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'123'\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"'123'\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"'123'\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"'123'\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"'123'\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"'123'\") <=> QScriptValue(engine, \"NaN\")", + "engine->evaluate(\"'123'\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"'123'\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"'123'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"new Error()\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Null\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"False\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"'123'\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"'123'\") <=> engine->newObject()", + "engine->evaluate(\"'123'\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"'123'\") <=> engine->newQObject(engine)", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(int(122))", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(uint(124))", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(123.0)", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0x43211234)", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0x10000)", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0x10001)", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(qInf())", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(\"NaN\")", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(\"Infinity\")", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(\"ciao\")", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(QString(\"123\"))", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, int(122))", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, uint(124))", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 123.0)", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 0x43211234)", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 0x10000)", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, 0x10001)", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, qInf())", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, \"NaN\")", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, \"Infinity\")", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, \"ciao\")", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(0, QString(\"123\"))", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, int(122))", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, uint(124))", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 123.0)", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 0x43211234)", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 0x10000)", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, 0x10001)", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, qInf())", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, \"NaN\")", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, \"Infinity\")", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, \"ciao\")", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->evaluate(\"'12.4'\") <=> QScriptValue(engine, QString(\"123\"))", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Number\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"new Object()\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"new Error()\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Undefined\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Null\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"True\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"False\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"122\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"124\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"123.0\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"0x10000\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"0x10001\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"Infinity\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"'12.4'\") <=> engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\") <=> engine->newObject()", + "engine->evaluate(\"'12.4'\") <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->evaluate(\"'12.4'\") <=> engine->newVariant(QVariant(123))", + "engine->evaluate(\"'12.4'\") <=> engine->newQObject(engine)", + "engine->nullValue() <=> QScriptValue(true)", + "engine->nullValue() <=> QScriptValue(int(122))", + "engine->nullValue() <=> QScriptValue(uint(124))", + "engine->nullValue() <=> QScriptValue(123.0)", + "engine->nullValue() <=> QScriptValue(6.37e-8)", + "engine->nullValue() <=> QScriptValue(0x43211234)", + "engine->nullValue() <=> QScriptValue(0x10000)", + "engine->nullValue() <=> QScriptValue(0x10001)", + "engine->nullValue() <=> QScriptValue(qInf())", + "engine->nullValue() <=> QScriptValue(\"Infinity\")", + "engine->nullValue() <=> QScriptValue(QString(\"123\"))", + "engine->nullValue() <=> QScriptValue(QString(\"12.4\"))", + "engine->nullValue() <=> QScriptValue(0, true)", + "engine->nullValue() <=> QScriptValue(0, int(122))", + "engine->nullValue() <=> QScriptValue(0, uint(124))", + "engine->nullValue() <=> QScriptValue(0, 123.0)", + "engine->nullValue() <=> QScriptValue(0, 6.37e-8)", + "engine->nullValue() <=> QScriptValue(0, 0x43211234)", + "engine->nullValue() <=> QScriptValue(0, 0x10000)", + "engine->nullValue() <=> QScriptValue(0, 0x10001)", + "engine->nullValue() <=> QScriptValue(0, qInf())", + "engine->nullValue() <=> QScriptValue(0, \"Infinity\")", + "engine->nullValue() <=> QScriptValue(0, QString(\"123\"))", + "engine->nullValue() <=> QScriptValue(0, QString(\"12.3\"))", + "engine->nullValue() <=> QScriptValue(engine, true)", + "engine->nullValue() <=> QScriptValue(engine, int(122))", + "engine->nullValue() <=> QScriptValue(engine, uint(124))", + "engine->nullValue() <=> QScriptValue(engine, 123.0)", + "engine->nullValue() <=> QScriptValue(engine, 6.37e-8)", + "engine->nullValue() <=> QScriptValue(engine, 0x43211234)", + "engine->nullValue() <=> QScriptValue(engine, 0x10000)", + "engine->nullValue() <=> QScriptValue(engine, 0x10001)", + "engine->nullValue() <=> QScriptValue(engine, qInf())", + "engine->nullValue() <=> QScriptValue(engine, \"Infinity\")", + "engine->nullValue() <=> QScriptValue(engine, QString(\"123\"))", + "engine->nullValue() <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->nullValue() <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->nullValue() <=> engine->evaluate(\"true\")", + "engine->nullValue() <=> engine->evaluate(\"122\")", + "engine->nullValue() <=> engine->evaluate(\"124\")", + "engine->nullValue() <=> engine->evaluate(\"123.0\")", + "engine->nullValue() <=> engine->evaluate(\"6.37e-8\")", + "engine->nullValue() <=> engine->evaluate(\"0x43211234\")", + "engine->nullValue() <=> engine->evaluate(\"0x10000\")", + "engine->nullValue() <=> engine->evaluate(\"0x10001\")", + "engine->nullValue() <=> engine->evaluate(\"Infinity\")", + "engine->nullValue() <=> engine->evaluate(\"'123'\")", + "engine->nullValue() <=> engine->evaluate(\"'12.4'\")", + "engine->nullValue() <=> engine->newVariant(QVariant(123))", + "engine->newObject() <=> QScriptValue(\"ciao\")", + "engine->newObject() <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->newObject() <=> QScriptValue(0, \"ciao\")", + "engine->newObject() <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->newObject() <=> QScriptValue(engine, \"ciao\")", + "engine->newObject() <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->newObject() <=> engine->evaluate(\"Function.prototype\")", + "engine->newObject() <=> engine->evaluate(\"Object\")", + "engine->newObject() <=> engine->evaluate(\"Array\")", + "engine->newObject() <=> engine->evaluate(\"Number\")", + "engine->newObject() <=> engine->evaluate(\"Function\")", + "engine->newObject() <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->newObject() <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->newObject() <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->newObject() <=> engine->evaluate(\"'ciao'\")", + "engine->newObject() <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newArray() <=> QScriptValue(true)", + "engine->newArray() <=> QScriptValue(int(122))", + "engine->newArray() <=> QScriptValue(uint(124))", + "engine->newArray() <=> QScriptValue(123.0)", + "engine->newArray() <=> QScriptValue(6.37e-8)", + "engine->newArray() <=> QScriptValue(0x43211234)", + "engine->newArray() <=> QScriptValue(0x10000)", + "engine->newArray() <=> QScriptValue(0x10001)", + "engine->newArray() <=> QScriptValue(qInf())", + "engine->newArray() <=> QScriptValue(\"NaN\")", + "engine->newArray() <=> QScriptValue(\"Infinity\")", + "engine->newArray() <=> QScriptValue(\"-Infinity\")", + "engine->newArray() <=> QScriptValue(\"ciao\")", + "engine->newArray() <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->newArray() <=> QScriptValue(QString(\"0\"))", + "engine->newArray() <=> QScriptValue(QString(\"123\"))", + "engine->newArray() <=> QScriptValue(QString(\"12.4\"))", + "engine->newArray() <=> QScriptValue(0, true)", + "engine->newArray() <=> QScriptValue(0, int(122))", + "engine->newArray() <=> QScriptValue(0, uint(124))", + "engine->newArray() <=> QScriptValue(0, 123.0)", + "engine->newArray() <=> QScriptValue(0, 6.37e-8)", + "engine->newArray() <=> QScriptValue(0, 0x43211234)", + "engine->newArray() <=> QScriptValue(0, 0x10000)", + "engine->newArray() <=> QScriptValue(0, 0x10001)", + "engine->newArray() <=> QScriptValue(0, qInf())", + "engine->newArray() <=> QScriptValue(0, \"NaN\")", + "engine->newArray() <=> QScriptValue(0, \"Infinity\")", + "engine->newArray() <=> QScriptValue(0, \"-Infinity\")", + "engine->newArray() <=> QScriptValue(0, \"ciao\")", + "engine->newArray() <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->newArray() <=> QScriptValue(0, QString(\"0\"))", + "engine->newArray() <=> QScriptValue(0, QString(\"123\"))", + "engine->newArray() <=> QScriptValue(0, QString(\"12.3\"))", + "engine->newArray() <=> QScriptValue(engine, true)", + "engine->newArray() <=> QScriptValue(engine, int(122))", + "engine->newArray() <=> QScriptValue(engine, uint(124))", + "engine->newArray() <=> QScriptValue(engine, 123.0)", + "engine->newArray() <=> QScriptValue(engine, 6.37e-8)", + "engine->newArray() <=> QScriptValue(engine, 0x43211234)", + "engine->newArray() <=> QScriptValue(engine, 0x10000)", + "engine->newArray() <=> QScriptValue(engine, 0x10001)", + "engine->newArray() <=> QScriptValue(engine, qInf())", + "engine->newArray() <=> QScriptValue(engine, \"NaN\")", + "engine->newArray() <=> QScriptValue(engine, \"Infinity\")", + "engine->newArray() <=> QScriptValue(engine, \"-Infinity\")", + "engine->newArray() <=> QScriptValue(engine, \"ciao\")", + "engine->newArray() <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->newArray() <=> QScriptValue(engine, QString(\"0\"))", + "engine->newArray() <=> QScriptValue(engine, QString(\"123\"))", + "engine->newArray() <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->newArray() <=> engine->evaluate(\"Object.prototype\")", + "engine->newArray() <=> engine->evaluate(\"Function.prototype\")", + "engine->newArray() <=> engine->evaluate(\"Error.prototype\")", + "engine->newArray() <=> engine->evaluate(\"Object\")", + "engine->newArray() <=> engine->evaluate(\"Array\")", + "engine->newArray() <=> engine->evaluate(\"Number\")", + "engine->newArray() <=> engine->evaluate(\"Function\")", + "engine->newArray() <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->newArray() <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->newArray() <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->newArray() <=> engine->evaluate(\"/foo/\")", + "engine->newArray() <=> engine->evaluate(\"new Object()\")", + "engine->newArray() <=> engine->evaluate(\"new Error()\")", + "engine->newArray() <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->newArray() <=> engine->evaluate(\"Undefined\")", + "engine->newArray() <=> engine->evaluate(\"Null\")", + "engine->newArray() <=> engine->evaluate(\"True\")", + "engine->newArray() <=> engine->evaluate(\"False\")", + "engine->newArray() <=> engine->evaluate(\"true\")", + "engine->newArray() <=> engine->evaluate(\"122\")", + "engine->newArray() <=> engine->evaluate(\"124\")", + "engine->newArray() <=> engine->evaluate(\"123.0\")", + "engine->newArray() <=> engine->evaluate(\"6.37e-8\")", + "engine->newArray() <=> engine->evaluate(\"0x43211234\")", + "engine->newArray() <=> engine->evaluate(\"0x10000\")", + "engine->newArray() <=> engine->evaluate(\"0x10001\")", + "engine->newArray() <=> engine->evaluate(\"Infinity\")", + "engine->newArray() <=> engine->evaluate(\"'ciao'\")", + "engine->newArray() <=> engine->evaluate(\"'0'\")", + "engine->newArray() <=> engine->evaluate(\"'123'\")", + "engine->newArray() <=> engine->evaluate(\"'12.4'\")", + "engine->newArray() <=> engine->newObject()", + "engine->newArray() <=> engine->newArray(10)", + "engine->newArray() <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newArray() <=> engine->newVariant(QVariant(123))", + "engine->newArray() <=> engine->newQObject(engine)", + "engine->newArray(10) <=> QScriptValue(\"NaN\")", + "engine->newArray(10) <=> QScriptValue(\"Infinity\")", + "engine->newArray(10) <=> QScriptValue(\"-Infinity\")", + "engine->newArray(10) <=> QScriptValue(\"ciao\")", + "engine->newArray(10) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->newArray(10) <=> QScriptValue(QString(\"0\"))", + "engine->newArray(10) <=> QScriptValue(QString(\"123\"))", + "engine->newArray(10) <=> QScriptValue(QString(\"12.4\"))", + "engine->newArray(10) <=> QScriptValue(0, \"NaN\")", + "engine->newArray(10) <=> QScriptValue(0, \"Infinity\")", + "engine->newArray(10) <=> QScriptValue(0, \"-Infinity\")", + "engine->newArray(10) <=> QScriptValue(0, \"ciao\")", + "engine->newArray(10) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->newArray(10) <=> QScriptValue(0, QString(\"0\"))", + "engine->newArray(10) <=> QScriptValue(0, QString(\"123\"))", + "engine->newArray(10) <=> QScriptValue(0, QString(\"12.3\"))", + "engine->newArray(10) <=> QScriptValue(engine, \"NaN\")", + "engine->newArray(10) <=> QScriptValue(engine, \"Infinity\")", + "engine->newArray(10) <=> QScriptValue(engine, \"-Infinity\")", + "engine->newArray(10) <=> QScriptValue(engine, \"ciao\")", + "engine->newArray(10) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->newArray(10) <=> QScriptValue(engine, QString(\"0\"))", + "engine->newArray(10) <=> QScriptValue(engine, QString(\"123\"))", + "engine->newArray(10) <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->newArray(10) <=> engine->evaluate(\"Object.prototype\")", + "engine->newArray(10) <=> engine->evaluate(\"Function.prototype\")", + "engine->newArray(10) <=> engine->evaluate(\"Error.prototype\")", + "engine->newArray(10) <=> engine->evaluate(\"Object\")", + "engine->newArray(10) <=> engine->evaluate(\"Array\")", + "engine->newArray(10) <=> engine->evaluate(\"Number\")", + "engine->newArray(10) <=> engine->evaluate(\"Function\")", + "engine->newArray(10) <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->newArray(10) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->newArray(10) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->newArray(10) <=> engine->evaluate(\"/foo/\")", + "engine->newArray(10) <=> engine->evaluate(\"new Object()\")", + "engine->newArray(10) <=> engine->evaluate(\"new Error()\")", + "engine->newArray(10) <=> engine->evaluate(\"Undefined\")", + "engine->newArray(10) <=> engine->evaluate(\"Null\")", + "engine->newArray(10) <=> engine->evaluate(\"True\")", + "engine->newArray(10) <=> engine->evaluate(\"False\")", + "engine->newArray(10) <=> engine->evaluate(\"'ciao'\")", + "engine->newArray(10) <=> engine->evaluate(\"'0'\")", + "engine->newArray(10) <=> engine->evaluate(\"'123'\")", + "engine->newArray(10) <=> engine->evaluate(\"'12.4'\")", + "engine->newArray(10) <=> engine->newObject()", + "engine->newArray(10) <=> engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newArray(10) <=> engine->newQObject(engine)", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(\"ciao\")", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(0, \"ciao\")", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(engine, \"ciao\")", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Function.prototype\")", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Object\")", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Array\")", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Number\")", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Function\")", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"'ciao'\")", + "engine->newVariant(QVariant(123)) <=> QScriptValue(uint(124))", + "engine->newVariant(QVariant(123)) <=> QScriptValue(0x43211234)", + "engine->newVariant(QVariant(123)) <=> QScriptValue(0x10000)", + "engine->newVariant(QVariant(123)) <=> QScriptValue(0x10001)", + "engine->newVariant(QVariant(123)) <=> QScriptValue(qInf())", + "engine->newVariant(QVariant(123)) <=> QScriptValue(\"Infinity\")", + "engine->newVariant(QVariant(123)) <=> QScriptValue(0, uint(124))", + "engine->newVariant(QVariant(123)) <=> QScriptValue(0, 0x43211234)", + "engine->newVariant(QVariant(123)) <=> QScriptValue(0, 0x10000)", + "engine->newVariant(QVariant(123)) <=> QScriptValue(0, 0x10001)", + "engine->newVariant(QVariant(123)) <=> QScriptValue(0, qInf())", + "engine->newVariant(QVariant(123)) <=> QScriptValue(0, \"Infinity\")", + "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, uint(124))", + "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, 0x43211234)", + "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, 0x10000)", + "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, 0x10001)", + "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, qInf())", + "engine->newVariant(QVariant(123)) <=> QScriptValue(engine, \"Infinity\")", + "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"124\")", + "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"0x43211234\")", + "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"0x10000\")", + "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"0x10001\")", + "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"Infinity\")", + "engine->newVariant(QVariant(false)) <=> QScriptValue(true)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(int(122))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(uint(124))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(123.0)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(6.37e-8)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0x43211234)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0x10000)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0x10001)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(qInf())", + "engine->newVariant(QVariant(false)) <=> QScriptValue(\"Infinity\")", + "engine->newVariant(QVariant(false)) <=> QScriptValue(QString(\"123\"))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(QString(\"12.4\"))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, true)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, int(122))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, uint(124))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 123.0)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 6.37e-8)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0x43211234)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0x10000)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, 0x10001)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, qInf())", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, \"Infinity\")", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString(\"123\"))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(0, QString(\"12.3\"))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, true)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, int(122))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, uint(124))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 123.0)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 6.37e-8)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0x43211234)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0x10000)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, 0x10001)", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, qInf())", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, \"Infinity\")", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"123\"))", + "engine->newVariant(QVariant(false)) <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"true\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"122\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"124\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"123.0\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"6.37e-8\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0x43211234\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0x10000\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"0x10001\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"Infinity\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"'123'\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"'12.4'\")", + "engine->newVariant(QVariant(false)) <=> engine->newVariant(QVariant(123))", + "engine->newQObject(0) <=> QScriptValue(true)", + "engine->newQObject(0) <=> QScriptValue(int(122))", + "engine->newQObject(0) <=> QScriptValue(uint(124))", + "engine->newQObject(0) <=> QScriptValue(123.0)", + "engine->newQObject(0) <=> QScriptValue(6.37e-8)", + "engine->newQObject(0) <=> QScriptValue(0x43211234)", + "engine->newQObject(0) <=> QScriptValue(0x10000)", + "engine->newQObject(0) <=> QScriptValue(0x10001)", + "engine->newQObject(0) <=> QScriptValue(qInf())", + "engine->newQObject(0) <=> QScriptValue(\"Infinity\")", + "engine->newQObject(0) <=> QScriptValue(QString(\"123\"))", + "engine->newQObject(0) <=> QScriptValue(QString(\"12.4\"))", + "engine->newQObject(0) <=> QScriptValue(0, true)", + "engine->newQObject(0) <=> QScriptValue(0, int(122))", + "engine->newQObject(0) <=> QScriptValue(0, uint(124))", + "engine->newQObject(0) <=> QScriptValue(0, 123.0)", + "engine->newQObject(0) <=> QScriptValue(0, 6.37e-8)", + "engine->newQObject(0) <=> QScriptValue(0, 0x43211234)", + "engine->newQObject(0) <=> QScriptValue(0, 0x10000)", + "engine->newQObject(0) <=> QScriptValue(0, 0x10001)", + "engine->newQObject(0) <=> QScriptValue(0, qInf())", + "engine->newQObject(0) <=> QScriptValue(0, \"Infinity\")", + "engine->newQObject(0) <=> QScriptValue(0, QString(\"123\"))", + "engine->newQObject(0) <=> QScriptValue(0, QString(\"12.3\"))", + "engine->newQObject(0) <=> QScriptValue(engine, true)", + "engine->newQObject(0) <=> QScriptValue(engine, int(122))", + "engine->newQObject(0) <=> QScriptValue(engine, uint(124))", + "engine->newQObject(0) <=> QScriptValue(engine, 123.0)", + "engine->newQObject(0) <=> QScriptValue(engine, 6.37e-8)", + "engine->newQObject(0) <=> QScriptValue(engine, 0x43211234)", + "engine->newQObject(0) <=> QScriptValue(engine, 0x10000)", + "engine->newQObject(0) <=> QScriptValue(engine, 0x10001)", + "engine->newQObject(0) <=> QScriptValue(engine, qInf())", + "engine->newQObject(0) <=> QScriptValue(engine, \"Infinity\")", + "engine->newQObject(0) <=> QScriptValue(engine, QString(\"123\"))", + "engine->newQObject(0) <=> QScriptValue(engine, QString(\"1.23\"))", + "engine->newQObject(0) <=> engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->newQObject(0) <=> engine->evaluate(\"true\")", + "engine->newQObject(0) <=> engine->evaluate(\"122\")", + "engine->newQObject(0) <=> engine->evaluate(\"124\")", + "engine->newQObject(0) <=> engine->evaluate(\"123.0\")", + "engine->newQObject(0) <=> engine->evaluate(\"6.37e-8\")", + "engine->newQObject(0) <=> engine->evaluate(\"0x43211234\")", + "engine->newQObject(0) <=> engine->evaluate(\"0x10000\")", + "engine->newQObject(0) <=> engine->evaluate(\"0x10001\")", + "engine->newQObject(0) <=> engine->evaluate(\"Infinity\")", + "engine->newQObject(0) <=> engine->evaluate(\"'123'\")", + "engine->newQObject(0) <=> engine->evaluate(\"'12.4'\")", + "engine->newQObject(0) <=> engine->newVariant(QVariant(123))", + "engine->newQObject(engine) <=> QScriptValue(\"ciao\")", + "engine->newQObject(engine) <=> QScriptValue(QString::fromLatin1(\"ciao\"))", + "engine->newQObject(engine) <=> QScriptValue(0, \"ciao\")", + "engine->newQObject(engine) <=> QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "engine->newQObject(engine) <=> QScriptValue(engine, \"ciao\")", + "engine->newQObject(engine) <=> QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "engine->newQObject(engine) <=> engine->evaluate(\"Object.prototype\")", + "engine->newQObject(engine) <=> engine->evaluate(\"Function.prototype\")", + "engine->newQObject(engine) <=> engine->evaluate(\"Object\")", + "engine->newQObject(engine) <=> engine->evaluate(\"Array\")", + "engine->newQObject(engine) <=> engine->evaluate(\"Number\")", + "engine->newQObject(engine) <=> engine->evaluate(\"Function\")", + "engine->newQObject(engine) <=> engine->evaluate(\"(function() { return 1; })\")", + "engine->newQObject(engine) <=> engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->newQObject(engine) <=> engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->newQObject(engine) <=> engine->evaluate(\"new Object()\")", + "engine->newQObject(engine) <=> engine->evaluate(\"Undefined\")", + "engine->newQObject(engine) <=> engine->evaluate(\"Null\")", + "engine->newQObject(engine) <=> engine->evaluate(\"True\")", + "engine->newQObject(engine) <=> engine->evaluate(\"False\")", + "engine->newQObject(engine) <=> engine->evaluate(\"'ciao'\")", + "engine->newQObject(engine) <=> engine->newObject()", + "engine->newQObject(engine) <=> engine->newQMetaObject(&QObject::staticMetaObject)",}; + +void tst_QScriptValue::lessThan_makeData(const char *expr) +{ + static QSet equals; + if (equals.isEmpty()) { + equals.reserve(5063); + for (unsigned i = 0; i < 5063; ++i) + equals.insert(lessThan_array[i]); + } + QHash::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); + newRow(tag.toLatin1()) << it.value() << equals.contains(tag); + } +} + +void tst_QScriptValue::lessThan_test(const char *, const QScriptValue& value) +{ + QFETCH(QScriptValue, other); + QFETCH(bool, expected); + QCOMPARE(value.lessThan(other), expected); +} + +DEFINE_TEST_FUNCTION(lessThan) + + +void tst_QScriptValue::instanceOf_initData() +{ + QTest::addColumn("other"); + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString instanceOf_array [] = { + "engine->evaluate(\"[]\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"[]\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"Date.prototype\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Array.prototype\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Function.prototype\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Error.prototype\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Object\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Object\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"Array\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"Number\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Number\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"Function\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Function\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"(function() { return 1; })\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"(function() { return 'ciao'; })\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\") <=> engine->evaluate(\"Function\")", + "engine->evaluate(\"/foo/\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"new Object()\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"new Array()\") <=> engine->evaluate(\"Array\")", + "engine->evaluate(\"new Error()\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Undefined\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"Null\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"True\") <=> engine->evaluate(\"Object\")", + "engine->evaluate(\"False\") <=> engine->evaluate(\"Object\")", + "engine->newObject() <=> engine->evaluate(\"Object\")", + "engine->newArray() <=> engine->evaluate(\"Object\")", + "engine->newArray() <=> engine->evaluate(\"Array\")", + "engine->newArray(10) <=> engine->evaluate(\"Object\")", + "engine->newArray(10) <=> engine->evaluate(\"Array\")", + "engine->newDate(QDateTime()) <=> engine->evaluate(\"Object\")", + "engine->newQMetaObject(&QObject::staticMetaObject) <=> engine->evaluate(\"Object\")", + "engine->newVariant(QVariant()) <=> engine->evaluate(\"Object\")", + "engine->newVariant(QVariant(123)) <=> engine->evaluate(\"Object\")", + "engine->newVariant(QVariant(false)) <=> engine->evaluate(\"Object\")", + "engine->newQObject(engine) <=> engine->evaluate(\"Object\")",}; + +void tst_QScriptValue::instanceOf_makeData(const char *expr) +{ + static QSet equals; + if (equals.isEmpty()) { + equals.reserve(40); + for (unsigned i = 0; i < 40; ++i) + equals.insert(instanceOf_array[i]); + } + QHash::const_iterator it; + for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) { + QString tag = QString::fromLatin1("%20 <=> %21").arg(expr).arg(it.key()); + newRow(tag.toLatin1()) << it.value() << equals.contains(tag); + } +} + +void tst_QScriptValue::instanceOf_test(const char *, const QScriptValue& value) +{ + QFETCH(QScriptValue, other); + QFETCH(bool, expected); + QCOMPARE(value.instanceOf(other), expected); +} + +DEFINE_TEST_FUNCTION(instanceOf) diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated_init.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_init.cpp new file mode 100644 index 0000000..a9eb2ca --- /dev/null +++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_init.cpp @@ -0,0 +1,198 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/**************************************************************************** +*************** This file has been generated. DO NOT MODIFY! **************** +****************************************************************************/ + +#include "tst_qscriptvalue.h" + + +void tst_QScriptValue::initScriptValues() +{ + m_values.clear(); + if (engine) + delete engine; + engine = new QScriptEngine; + DEFINE_TEST_VALUE(QScriptValue()); + DEFINE_TEST_VALUE(QScriptValue(QScriptValue::UndefinedValue)); + DEFINE_TEST_VALUE(QScriptValue(QScriptValue::NullValue)); + DEFINE_TEST_VALUE(QScriptValue(true)); + DEFINE_TEST_VALUE(QScriptValue(false)); + DEFINE_TEST_VALUE(QScriptValue(int(122))); + DEFINE_TEST_VALUE(QScriptValue(uint(124))); + DEFINE_TEST_VALUE(QScriptValue(0)); + DEFINE_TEST_VALUE(QScriptValue(0.0)); + DEFINE_TEST_VALUE(QScriptValue(123.0)); + DEFINE_TEST_VALUE(QScriptValue(6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(-6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(0x43211234)); + DEFINE_TEST_VALUE(QScriptValue(0x10000)); + DEFINE_TEST_VALUE(QScriptValue(0x10001)); + DEFINE_TEST_VALUE(QScriptValue(qSNaN())); + DEFINE_TEST_VALUE(QScriptValue(qQNaN())); + DEFINE_TEST_VALUE(QScriptValue(qInf())); + DEFINE_TEST_VALUE(QScriptValue(-qInf())); + DEFINE_TEST_VALUE(QScriptValue("NaN")); + DEFINE_TEST_VALUE(QScriptValue("Infinity")); + DEFINE_TEST_VALUE(QScriptValue("-Infinity")); + DEFINE_TEST_VALUE(QScriptValue("ciao")); + DEFINE_TEST_VALUE(QScriptValue(QString::fromLatin1("ciao"))); + DEFINE_TEST_VALUE(QScriptValue(QString(""))); + DEFINE_TEST_VALUE(QScriptValue(QString())); + DEFINE_TEST_VALUE(QScriptValue(QString("0"))); + DEFINE_TEST_VALUE(QScriptValue(QString("123"))); + DEFINE_TEST_VALUE(QScriptValue(QString("12.4"))); + DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::UndefinedValue)); + DEFINE_TEST_VALUE(QScriptValue(0, QScriptValue::NullValue)); + DEFINE_TEST_VALUE(QScriptValue(0, true)); + DEFINE_TEST_VALUE(QScriptValue(0, false)); + DEFINE_TEST_VALUE(QScriptValue(0, int(122))); + DEFINE_TEST_VALUE(QScriptValue(0, uint(124))); + DEFINE_TEST_VALUE(QScriptValue(0, 0)); + DEFINE_TEST_VALUE(QScriptValue(0, 0.0)); + DEFINE_TEST_VALUE(QScriptValue(0, 123.0)); + DEFINE_TEST_VALUE(QScriptValue(0, 6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(0, -6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(0, 0x43211234)); + DEFINE_TEST_VALUE(QScriptValue(0, 0x10000)); + DEFINE_TEST_VALUE(QScriptValue(0, 0x10001)); + DEFINE_TEST_VALUE(QScriptValue(0, qSNaN())); + DEFINE_TEST_VALUE(QScriptValue(0, qQNaN())); + DEFINE_TEST_VALUE(QScriptValue(0, qInf())); + DEFINE_TEST_VALUE(QScriptValue(0, -qInf())); + DEFINE_TEST_VALUE(QScriptValue(0, "NaN")); + DEFINE_TEST_VALUE(QScriptValue(0, "Infinity")); + DEFINE_TEST_VALUE(QScriptValue(0, "-Infinity")); + DEFINE_TEST_VALUE(QScriptValue(0, "ciao")); + DEFINE_TEST_VALUE(QScriptValue(0, QString::fromLatin1("ciao"))); + DEFINE_TEST_VALUE(QScriptValue(0, QString(""))); + DEFINE_TEST_VALUE(QScriptValue(0, QString())); + DEFINE_TEST_VALUE(QScriptValue(0, QString("0"))); + DEFINE_TEST_VALUE(QScriptValue(0, QString("123"))); + DEFINE_TEST_VALUE(QScriptValue(0, QString("12.3"))); + DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::UndefinedValue)); + DEFINE_TEST_VALUE(QScriptValue(engine, QScriptValue::NullValue)); + DEFINE_TEST_VALUE(QScriptValue(engine, true)); + DEFINE_TEST_VALUE(QScriptValue(engine, false)); + DEFINE_TEST_VALUE(QScriptValue(engine, int(122))); + DEFINE_TEST_VALUE(QScriptValue(engine, uint(124))); + DEFINE_TEST_VALUE(QScriptValue(engine, 0)); + DEFINE_TEST_VALUE(QScriptValue(engine, 0.0)); + DEFINE_TEST_VALUE(QScriptValue(engine, 123.0)); + DEFINE_TEST_VALUE(QScriptValue(engine, 6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(engine, -6.37e-8)); + DEFINE_TEST_VALUE(QScriptValue(engine, 0x43211234)); + DEFINE_TEST_VALUE(QScriptValue(engine, 0x10000)); + DEFINE_TEST_VALUE(QScriptValue(engine, 0x10001)); + DEFINE_TEST_VALUE(QScriptValue(engine, qSNaN())); + DEFINE_TEST_VALUE(QScriptValue(engine, qQNaN())); + DEFINE_TEST_VALUE(QScriptValue(engine, qInf())); + DEFINE_TEST_VALUE(QScriptValue(engine, -qInf())); + DEFINE_TEST_VALUE(QScriptValue(engine, "NaN")); + DEFINE_TEST_VALUE(QScriptValue(engine, "Infinity")); + DEFINE_TEST_VALUE(QScriptValue(engine, "-Infinity")); + DEFINE_TEST_VALUE(QScriptValue(engine, "ciao")); + DEFINE_TEST_VALUE(QScriptValue(engine, QString::fromLatin1("ciao"))); + DEFINE_TEST_VALUE(QScriptValue(engine, QString(""))); + DEFINE_TEST_VALUE(QScriptValue(engine, QString())); + DEFINE_TEST_VALUE(QScriptValue(engine, QString("0"))); + DEFINE_TEST_VALUE(QScriptValue(engine, QString("123"))); + DEFINE_TEST_VALUE(QScriptValue(engine, QString("1.23"))); + DEFINE_TEST_VALUE(engine->evaluate("[]")); + DEFINE_TEST_VALUE(engine->evaluate("{}")); + DEFINE_TEST_VALUE(engine->evaluate("Object.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Date.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Array.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Function.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Error.prototype")); + DEFINE_TEST_VALUE(engine->evaluate("Object")); + DEFINE_TEST_VALUE(engine->evaluate("Array")); + DEFINE_TEST_VALUE(engine->evaluate("Number")); + DEFINE_TEST_VALUE(engine->evaluate("Function")); + DEFINE_TEST_VALUE(engine->evaluate("(function() { return 1; })")); + DEFINE_TEST_VALUE(engine->evaluate("(function() { return 'ciao'; })")); + DEFINE_TEST_VALUE(engine->evaluate("(function() { throw new Error('foo'); })")); + DEFINE_TEST_VALUE(engine->evaluate("/foo/")); + DEFINE_TEST_VALUE(engine->evaluate("new Object()")); + DEFINE_TEST_VALUE(engine->evaluate("new Array()")); + DEFINE_TEST_VALUE(engine->evaluate("new Error()")); + DEFINE_TEST_VALUE(engine->evaluate("a = new Object(); a.foo = 22; a.foo")); + DEFINE_TEST_VALUE(engine->evaluate("Undefined")); + DEFINE_TEST_VALUE(engine->evaluate("Null")); + DEFINE_TEST_VALUE(engine->evaluate("True")); + DEFINE_TEST_VALUE(engine->evaluate("False")); + DEFINE_TEST_VALUE(engine->evaluate("undefined")); + DEFINE_TEST_VALUE(engine->evaluate("null")); + DEFINE_TEST_VALUE(engine->evaluate("true")); + DEFINE_TEST_VALUE(engine->evaluate("false")); + DEFINE_TEST_VALUE(engine->evaluate("122")); + DEFINE_TEST_VALUE(engine->evaluate("124")); + DEFINE_TEST_VALUE(engine->evaluate("0")); + DEFINE_TEST_VALUE(engine->evaluate("0.0")); + DEFINE_TEST_VALUE(engine->evaluate("123.0")); + DEFINE_TEST_VALUE(engine->evaluate("6.37e-8")); + DEFINE_TEST_VALUE(engine->evaluate("-6.37e-8")); + DEFINE_TEST_VALUE(engine->evaluate("0x43211234")); + DEFINE_TEST_VALUE(engine->evaluate("0x10000")); + DEFINE_TEST_VALUE(engine->evaluate("0x10001")); + DEFINE_TEST_VALUE(engine->evaluate("NaN")); + DEFINE_TEST_VALUE(engine->evaluate("Infinity")); + DEFINE_TEST_VALUE(engine->evaluate("-Infinity")); + DEFINE_TEST_VALUE(engine->evaluate("'ciao'")); + DEFINE_TEST_VALUE(engine->evaluate("''")); + DEFINE_TEST_VALUE(engine->evaluate("'0'")); + DEFINE_TEST_VALUE(engine->evaluate("'123'")); + DEFINE_TEST_VALUE(engine->evaluate("'12.4'")); + DEFINE_TEST_VALUE(engine->nullValue()); + DEFINE_TEST_VALUE(engine->undefinedValue()); + DEFINE_TEST_VALUE(engine->newObject()); + DEFINE_TEST_VALUE(engine->newArray()); + DEFINE_TEST_VALUE(engine->newArray(10)); + DEFINE_TEST_VALUE(engine->newDate(QDateTime())); + DEFINE_TEST_VALUE(engine->newQMetaObject(&QObject::staticMetaObject)); + DEFINE_TEST_VALUE(engine->newVariant(QVariant())); + DEFINE_TEST_VALUE(engine->newVariant(QVariant(123))); + DEFINE_TEST_VALUE(engine->newVariant(QVariant(false))); + DEFINE_TEST_VALUE(engine->newQObject(0)); + DEFINE_TEST_VALUE(engine->newQObject(engine)); +} + diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated_isXXX.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_isXXX.cpp new file mode 100644 index 0000000..106043b --- /dev/null +++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_isXXX.cpp @@ -0,0 +1,830 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/**************************************************************************** +*************** This file has been generated. DO NOT MODIFY! **************** +****************************************************************************/ + +#include "tst_qscriptvalue.h" + + +void tst_QScriptValue::isValid_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isValid_array [] = { + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; + +void tst_QScriptValue::isValid_makeData(const char* expr) +{ + static QSet isValid; + if (isValid.isEmpty()) { + isValid.reserve(141); + for (unsigned i = 0; i < 141; ++i) + isValid.insert(isValid_array[i]); + } + newRow(expr) << isValid.contains(expr); +} + +void tst_QScriptValue::isValid_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isValid(), expected); + QCOMPARE(value.isValid(), expected); +} + +DEFINE_TEST_FUNCTION(isValid) + + +void tst_QScriptValue::isBool_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isBool_array [] = { + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")",}; + +void tst_QScriptValue::isBool_makeData(const char* expr) +{ + static QSet isBool; + if (isBool.isEmpty()) { + isBool.reserve(8); + for (unsigned i = 0; i < 8; ++i) + isBool.insert(isBool_array[i]); + } + newRow(expr) << isBool.contains(expr); +} + +void tst_QScriptValue::isBool_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isBool(), expected); + QCOMPARE(value.isBool(), expected); +} + +DEFINE_TEST_FUNCTION(isBool) + + +void tst_QScriptValue::isBoolean_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isBoolean_array [] = { + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")",}; + +void tst_QScriptValue::isBoolean_makeData(const char* expr) +{ + static QSet isBoolean; + if (isBoolean.isEmpty()) { + isBoolean.reserve(8); + for (unsigned i = 0; i < 8; ++i) + isBoolean.insert(isBoolean_array[i]); + } + newRow(expr) << isBoolean.contains(expr); +} + +void tst_QScriptValue::isBoolean_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isBoolean(), expected); + QCOMPARE(value.isBoolean(), expected); +} + +DEFINE_TEST_FUNCTION(isBoolean) + + +void tst_QScriptValue::isNumber_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isNumber_array [] = { + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")",}; + +void tst_QScriptValue::isNumber_makeData(const char* expr) +{ + static QSet isNumber; + if (isNumber.isEmpty()) { + isNumber.reserve(56); + for (unsigned i = 0; i < 56; ++i) + isNumber.insert(isNumber_array[i]); + } + newRow(expr) << isNumber.contains(expr); +} + +void tst_QScriptValue::isNumber_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isNumber(), expected); + QCOMPARE(value.isNumber(), expected); +} + +DEFINE_TEST_FUNCTION(isNumber) + + +void tst_QScriptValue::isFunction_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isFunction_array [] = { + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->newQMetaObject(&QObject::staticMetaObject)",}; + +void tst_QScriptValue::isFunction_makeData(const char* expr) +{ + static QSet isFunction; + if (isFunction.isEmpty()) { + isFunction.reserve(10); + for (unsigned i = 0; i < 10; ++i) + isFunction.insert(isFunction_array[i]); + } + newRow(expr) << isFunction.contains(expr); +} + +void tst_QScriptValue::isFunction_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isFunction(), expected); + QCOMPARE(value.isFunction(), expected); +} + +DEFINE_TEST_FUNCTION(isFunction) + + +void tst_QScriptValue::isNull_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isNull_array [] = { + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "engine->evaluate(\"null\")", + "engine->nullValue()", + "engine->newQObject(0)",}; + +void tst_QScriptValue::isNull_makeData(const char* expr) +{ + static QSet isNull; + if (isNull.isEmpty()) { + isNull.reserve(6); + for (unsigned i = 0; i < 6; ++i) + isNull.insert(isNull_array[i]); + } + newRow(expr) << isNull.contains(expr); +} + +void tst_QScriptValue::isNull_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isNull(), expected); + QCOMPARE(value.isNull(), expected); +} + +DEFINE_TEST_FUNCTION(isNull) + + +void tst_QScriptValue::isString_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isString_array [] = { + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")",}; + +void tst_QScriptValue::isString_makeData(const char* expr) +{ + static QSet isString; + if (isString.isEmpty()) { + isString.reserve(35); + for (unsigned i = 0; i < 35; ++i) + isString.insert(isString_array[i]); + } + newRow(expr) << isString.contains(expr); +} + +void tst_QScriptValue::isString_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isString(), expected); + QCOMPARE(value.isString(), expected); +} + +DEFINE_TEST_FUNCTION(isString) + + +void tst_QScriptValue::isUndefined_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isUndefined_array [] = { + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"undefined\")", + "engine->undefinedValue()",}; + +void tst_QScriptValue::isUndefined_makeData(const char* expr) +{ + static QSet isUndefined; + if (isUndefined.isEmpty()) { + isUndefined.reserve(6); + for (unsigned i = 0; i < 6; ++i) + isUndefined.insert(isUndefined_array[i]); + } + newRow(expr) << isUndefined.contains(expr); +} + +void tst_QScriptValue::isUndefined_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isUndefined(), expected); + QCOMPARE(value.isUndefined(), expected); +} + +DEFINE_TEST_FUNCTION(isUndefined) + + +void tst_QScriptValue::isVariant_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isVariant_array [] = { + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))",}; + +void tst_QScriptValue::isVariant_makeData(const char* expr) +{ + static QSet isVariant; + if (isVariant.isEmpty()) { + isVariant.reserve(3); + for (unsigned i = 0; i < 3; ++i) + isVariant.insert(isVariant_array[i]); + } + newRow(expr) << isVariant.contains(expr); +} + +void tst_QScriptValue::isVariant_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isVariant(), expected); + QCOMPARE(value.isVariant(), expected); +} + +DEFINE_TEST_FUNCTION(isVariant) + + +void tst_QScriptValue::isQObject_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isQObject_array [] = { + "engine->newQObject(engine)",}; + +void tst_QScriptValue::isQObject_makeData(const char* expr) +{ + static QSet isQObject; + if (isQObject.isEmpty()) { + isQObject.reserve(1); + for (unsigned i = 0; i < 1; ++i) + isQObject.insert(isQObject_array[i]); + } + newRow(expr) << isQObject.contains(expr); +} + +void tst_QScriptValue::isQObject_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isQObject(), expected); + QCOMPARE(value.isQObject(), expected); +} + +DEFINE_TEST_FUNCTION(isQObject) + + +void tst_QScriptValue::isQMetaObject_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isQMetaObject_array [] = { + "engine->newQMetaObject(&QObject::staticMetaObject)",}; + +void tst_QScriptValue::isQMetaObject_makeData(const char* expr) +{ + static QSet isQMetaObject; + if (isQMetaObject.isEmpty()) { + isQMetaObject.reserve(1); + for (unsigned i = 0; i < 1; ++i) + isQMetaObject.insert(isQMetaObject_array[i]); + } + newRow(expr) << isQMetaObject.contains(expr); +} + +void tst_QScriptValue::isQMetaObject_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isQMetaObject(), expected); + QCOMPARE(value.isQMetaObject(), expected); +} + +DEFINE_TEST_FUNCTION(isQMetaObject) + + +void tst_QScriptValue::isObject_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isObject_array [] = { + "engine->evaluate(\"[]\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(engine)",}; + +void tst_QScriptValue::isObject_makeData(const char* expr) +{ + static QSet isObject; + if (isObject.isEmpty()) { + isObject.reserve(30); + for (unsigned i = 0; i < 30; ++i) + isObject.insert(isObject_array[i]); + } + newRow(expr) << isObject.contains(expr); +} + +void tst_QScriptValue::isObject_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isObject(), expected); + QCOMPARE(value.isObject(), expected); +} + +DEFINE_TEST_FUNCTION(isObject) + + +void tst_QScriptValue::isDate_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isDate_array [] = { + "engine->evaluate(\"Date.prototype\")", + "engine->newDate(QDateTime())",}; + +void tst_QScriptValue::isDate_makeData(const char* expr) +{ + static QSet isDate; + if (isDate.isEmpty()) { + isDate.reserve(2); + for (unsigned i = 0; i < 2; ++i) + isDate.insert(isDate_array[i]); + } + newRow(expr) << isDate.contains(expr); +} + +void tst_QScriptValue::isDate_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isDate(), expected); + QCOMPARE(value.isDate(), expected); +} + +DEFINE_TEST_FUNCTION(isDate) + + +void tst_QScriptValue::isRegExp_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isRegExp_array [] = { + "engine->evaluate(\"/foo/\")",}; + +void tst_QScriptValue::isRegExp_makeData(const char* expr) +{ + static QSet isRegExp; + if (isRegExp.isEmpty()) { + isRegExp.reserve(1); + for (unsigned i = 0; i < 1; ++i) + isRegExp.insert(isRegExp_array[i]); + } + newRow(expr) << isRegExp.contains(expr); +} + +void tst_QScriptValue::isRegExp_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isRegExp(), expected); + QCOMPARE(value.isRegExp(), expected); +} + +DEFINE_TEST_FUNCTION(isRegExp) + + +void tst_QScriptValue::isArray_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isArray_array [] = { + "engine->evaluate(\"[]\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"new Array()\")", + "engine->newArray()", + "engine->newArray(10)",}; + +void tst_QScriptValue::isArray_makeData(const char* expr) +{ + static QSet isArray; + if (isArray.isEmpty()) { + isArray.reserve(5); + for (unsigned i = 0; i < 5; ++i) + isArray.insert(isArray_array[i]); + } + newRow(expr) << isArray.contains(expr); +} + +void tst_QScriptValue::isArray_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isArray(), expected); + QCOMPARE(value.isArray(), expected); +} + +DEFINE_TEST_FUNCTION(isArray) + + +void tst_QScriptValue::isError_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString isError_array [] = { + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")",}; + +void tst_QScriptValue::isError_makeData(const char* expr) +{ + static QSet isError; + if (isError.isEmpty()) { + isError.reserve(6); + for (unsigned i = 0; i < 6; ++i) + isError.insert(isError_array[i]); + } + newRow(expr) << isError.contains(expr); +} + +void tst_QScriptValue::isError_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.isError(), expected); + QCOMPARE(value.isError(), expected); +} + +DEFINE_TEST_FUNCTION(isError) + diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue_generated_toXXX.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_toXXX.cpp new file mode 100644 index 0000000..754f4e0 --- /dev/null +++ b/tests/auto/qscriptvalue/tst_qscriptvalue_generated_toXXX.cpp @@ -0,0 +1,1897 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite 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 Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/**************************************************************************** +*************** This file has been generated. DO NOT MODIFY! **************** +****************************************************************************/ + +#include "tst_qscriptvalue.h" + + + +void tst_QScriptValue::toString_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString toString_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; + +static QString toString_valueArray [] = { + "", "undefined", + "null", "true", + "false", "122", + "124", "0", + "0", "123", + "6.37e-8", "-6.37e-8", + "1126240820", "65536", + "65537", "NaN", + "NaN", "Infinity", + "-Infinity", "NaN", + "Infinity", "-Infinity", + "ciao", "ciao", + "", "", + "0", "123", + "12.4", "undefined", + "null", "true", + "false", "122", + "124", "0", + "0", "123", + "6.37e-8", "-6.37e-8", + "1126240820", "65536", + "65537", "NaN", + "NaN", "Infinity", + "-Infinity", "NaN", + "Infinity", "-Infinity", + "ciao", "ciao", + "", "", + "0", "123", + "12.3", "undefined", + "null", "true", + "false", "122", + "124", "0", + "0", "123", + "6.37e-8", "-6.37e-8", + "1126240820", "65536", + "65537", "NaN", + "NaN", "Infinity", + "-Infinity", "NaN", + "Infinity", "-Infinity", + "ciao", "ciao", + "", "", + "0", "123", + "1.23", "", + "undefined", "[object Object]", + "Invalid Date", "", + "function () {\n [native code]\n}", "Error: Unknown error", + "function Object() {\n [native code]\n}", "function Array() {\n [native code]\n}", + "function Number() {\n [native code]\n}", "function Function() {\n [native code]\n}", + "function () { return 1; }", "function () { return 'ciao'; }", + "function () { throw new Error('foo'); }", "/foo/", + "[object Object]", "", + "Error: Unknown error", "22", + "ReferenceError: Can't find variable: Undefined", "ReferenceError: Can't find variable: Null", + "ReferenceError: Can't find variable: True", "ReferenceError: Can't find variable: False", + "undefined", "null", + "true", "false", + "122", "124", + "0", "0", + "123", "6.37e-8", + "-6.37e-8", "1126240820", + "65536", "65537", + "NaN", "Infinity", + "-Infinity", "ciao", + "", "0", + "123", "12.4", + "null", "undefined", + "[object Object]", "", + ",,,,,,,,,", "Invalid Date", + "[object QMetaObject]", "undefined", + "123", "false", + "null", "QScriptEngine(name = \"\")", }; + +void tst_QScriptValue::toString_makeData(const char* expr) +{ + static QHash toString; + if (toString.isEmpty()) { + toString.reserve(142); + for (unsigned i = 0; i < 142; ++i) + toString.insert(toString_tagArray[i], toString_valueArray[i]); + } + newRow(expr) << toString.value(expr); +} + +void tst_QScriptValue::toString_test(const char*, const QScriptValue& value) +{ + QFETCH(QString, expected); + QCOMPARE(value.toString(), expected); + QCOMPARE(value.toString(), expected); +} + +DEFINE_TEST_FUNCTION(toString) + + +void tst_QScriptValue::toNumber_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString toNumber_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; +static qsreal toNumber_valueArray [] = { + 0, qQNaN(), 0, 1, 0, 122, 124, 0, 0, 123, + 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), + qInf(), qInf(), qQNaN(), qQNaN(), 0, 0, 0, 123, 12.4, qQNaN(), + 0, 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, + 1126240820, 65536, 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(), + qQNaN(), qQNaN(), 0, 0, 0, 123, 12.3, qQNaN(), 0, 1, + 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, 65536, + 65537, qQNaN(), qQNaN(), qInf(), qInf(), qQNaN(), qInf(), qInf(), qQNaN(), qQNaN(), + 0, 0, 0, 123, 1.23, 0, qQNaN(), qQNaN(), qQNaN(), 0, + qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), + qQNaN(), 0, qQNaN(), 22, qQNaN(), qQNaN(), qQNaN(), qQNaN(), qQNaN(), 0, + 1, 0, 122, 124, 0, 0, 123, 6.369999999999999e-08, -6.369999999999999e-08, 1126240820, + 65536, 65537, qQNaN(), qInf(), qInf(), qQNaN(), 0, 0, 123, 12.4, + 0, qQNaN(), qQNaN(), 0, qQNaN(), qQNaN(), qQNaN(), qQNaN(), 123, 0, + 0, qQNaN(), }; +void tst_QScriptValue::toNumber_makeData(const char* expr) +{ + static QHash toNumber; + if (toNumber.isEmpty()) { + toNumber.reserve(142); + for (unsigned i = 0; i < 142; ++i) + toNumber.insert(toNumber_tagArray[i], toNumber_valueArray[i]); + } + newRow(expr) << toNumber.value(expr); +} + +void tst_QScriptValue::toNumber_test(const char*, const QScriptValue& value) +{ + QFETCH(qsreal, expected); + if (qIsNaN(expected)) { + QVERIFY(qIsNaN(value.toNumber())); + return; + } + if (qIsInf(expected)) { + QVERIFY(qIsInf(value.toNumber())); + QVERIFY(qIsInf(value.toNumber())); + return; + } + QCOMPARE(value.toNumber(), expected); + QCOMPARE(value.toNumber(), expected); +} + +DEFINE_TEST_FUNCTION(toNumber) + + +void tst_QScriptValue::toBool_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString toBool_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; + +static bool toBool_valueArray [] = { + false, false, + false, true, + false, true, + true, false, + false, true, + true, true, + true, true, + true, false, + false, true, + true, true, + true, true, + true, true, + false, false, + true, true, + true, false, + false, true, + false, true, + true, false, + false, true, + true, true, + true, true, + true, false, + false, true, + true, true, + true, true, + true, true, + false, false, + true, true, + true, false, + false, true, + false, true, + true, false, + false, true, + true, true, + true, true, + true, false, + false, true, + true, true, + true, true, + true, true, + false, false, + true, true, + true, true, + false, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + false, false, + true, false, + true, true, + false, false, + true, true, + true, true, + true, true, + false, true, + true, true, + false, true, + true, true, + false, false, + true, true, + true, true, + true, true, + true, true, + false, true, }; + +void tst_QScriptValue::toBool_makeData(const char* expr) +{ + static QHash toBool; + if (toBool.isEmpty()) { + toBool.reserve(142); + for (unsigned i = 0; i < 142; ++i) + toBool.insert(toBool_tagArray[i], toBool_valueArray[i]); + } + newRow(expr) << toBool.value(expr); +} + +void tst_QScriptValue::toBool_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.toBool(), expected); + QCOMPARE(value.toBool(), expected); +} + +DEFINE_TEST_FUNCTION(toBool) + + +void tst_QScriptValue::toBoolean_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString toBoolean_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; + +static bool toBoolean_valueArray [] = { + false, false, + false, true, + false, true, + true, false, + false, true, + true, true, + true, true, + true, false, + false, true, + true, true, + true, true, + true, true, + false, false, + true, true, + true, false, + false, true, + false, true, + true, false, + false, true, + true, true, + true, true, + true, false, + false, true, + true, true, + true, true, + true, true, + false, false, + true, true, + true, false, + false, true, + false, true, + true, false, + false, true, + true, true, + true, true, + true, false, + false, true, + true, true, + true, true, + true, true, + false, false, + true, true, + true, true, + false, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + true, true, + false, false, + true, false, + true, true, + false, false, + true, true, + true, true, + true, true, + false, true, + true, true, + false, true, + true, true, + false, false, + true, true, + true, true, + true, true, + true, true, + false, true, }; + +void tst_QScriptValue::toBoolean_makeData(const char* expr) +{ + static QHash toBoolean; + if (toBoolean.isEmpty()) { + toBoolean.reserve(142); + for (unsigned i = 0; i < 142; ++i) + toBoolean.insert(toBoolean_tagArray[i], toBoolean_valueArray[i]); + } + newRow(expr) << toBoolean.value(expr); +} + +void tst_QScriptValue::toBoolean_test(const char*, const QScriptValue& value) +{ + QFETCH(bool, expected); + QCOMPARE(value.toBoolean(), expected); + QCOMPARE(value.toBoolean(), expected); +} + +DEFINE_TEST_FUNCTION(toBoolean) + + +void tst_QScriptValue::toInteger_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString toInteger_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; +static qsreal toInteger_valueArray [] = { + 0, 0, 0, 1, 0, 122, 124, 0, 0, 123, + 0, 0, 1126240820, 65536, 65537, 0, 0, qInf(), qInf(), 0, + qInf(), qInf(), 0, 0, 0, 0, 0, 123, 12, 0, + 0, 1, 0, 122, 124, 0, 0, 123, 0, 0, + 1126240820, 65536, 65537, 0, 0, qInf(), qInf(), 0, qInf(), qInf(), + 0, 0, 0, 0, 0, 123, 12, 0, 0, 1, + 0, 122, 124, 0, 0, 123, 0, 0, 1126240820, 65536, + 65537, 0, 0, qInf(), qInf(), 0, qInf(), qInf(), 0, 0, + 0, 0, 0, 123, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, + 1, 0, 122, 124, 0, 0, 123, 0, 0, 1126240820, + 65536, 65537, 0, qInf(), qInf(), 0, 0, 0, 123, 12, + 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, + 0, 0, }; +void tst_QScriptValue::toInteger_makeData(const char* expr) +{ + static QHash toInteger; + if (toInteger.isEmpty()) { + toInteger.reserve(142); + for (unsigned i = 0; i < 142; ++i) + toInteger.insert(toInteger_tagArray[i], toInteger_valueArray[i]); + } + newRow(expr) << toInteger.value(expr); +} + +void tst_QScriptValue::toInteger_test(const char*, const QScriptValue& value) +{ + QFETCH(qsreal, expected); + if (qIsInf(expected)) { + QVERIFY(qIsInf(value.toInteger())); + QVERIFY(qIsInf(value.toInteger())); + return; + } + QCOMPARE(value.toInteger(), expected); + QCOMPARE(value.toInteger(), expected); +} + +DEFINE_TEST_FUNCTION(toInteger) + + +void tst_QScriptValue::toInt32_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString toInt32_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; + +static qint32 toInt32_valueArray [] = { + 0, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 1126240820, 65536, + 65537, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 12, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 1126240820, 65536, + 65537, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 12, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 1126240820, 65536, + 65537, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 1, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 22, + 0, 0, + 0, 0, + 0, 0, + 1, 0, + 122, 124, + 0, 0, + 123, 0, + 0, 1126240820, + 65536, 65537, + 0, 0, + 0, 0, + 0, 0, + 123, 12, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 123, 0, + 0, 0, }; + +void tst_QScriptValue::toInt32_makeData(const char* expr) +{ + static QHash toInt32; + if (toInt32.isEmpty()) { + toInt32.reserve(142); + for (unsigned i = 0; i < 142; ++i) + toInt32.insert(toInt32_tagArray[i], toInt32_valueArray[i]); + } + newRow(expr) << toInt32.value(expr); +} + +void tst_QScriptValue::toInt32_test(const char*, const QScriptValue& value) +{ + QFETCH(qint32, expected); + QCOMPARE(value.toInt32(), expected); + QCOMPARE(value.toInt32(), expected); +} + +DEFINE_TEST_FUNCTION(toInt32) + + +void tst_QScriptValue::toUInt32_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString toUInt32_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; + +static quint32 toUInt32_valueArray [] = { + 0, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 1126240820, 65536, + 65537, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 12, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 1126240820, 65536, + 65537, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 12, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 1126240820, 65536, + 65537, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 1, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 22, + 0, 0, + 0, 0, + 0, 0, + 1, 0, + 122, 124, + 0, 0, + 123, 0, + 0, 1126240820, + 65536, 65537, + 0, 0, + 0, 0, + 0, 0, + 123, 12, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 123, 0, + 0, 0, }; + +void tst_QScriptValue::toUInt32_makeData(const char* expr) +{ + static QHash toUInt32; + if (toUInt32.isEmpty()) { + toUInt32.reserve(142); + for (unsigned i = 0; i < 142; ++i) + toUInt32.insert(toUInt32_tagArray[i], toUInt32_valueArray[i]); + } + newRow(expr) << toUInt32.value(expr); +} + +void tst_QScriptValue::toUInt32_test(const char*, const QScriptValue& value) +{ + QFETCH(quint32, expected); + QCOMPARE(value.toUInt32(), expected); + QCOMPARE(value.toUInt32(), expected); +} + +DEFINE_TEST_FUNCTION(toUInt32) + + +void tst_QScriptValue::toUInt16_initData() +{ + QTest::addColumn("expected"); + initScriptValues(); +} + +static QString toUInt16_tagArray [] = { + "QScriptValue()", + "QScriptValue(QScriptValue::UndefinedValue)", + "QScriptValue(QScriptValue::NullValue)", + "QScriptValue(true)", + "QScriptValue(false)", + "QScriptValue(int(122))", + "QScriptValue(uint(124))", + "QScriptValue(0)", + "QScriptValue(0.0)", + "QScriptValue(123.0)", + "QScriptValue(6.37e-8)", + "QScriptValue(-6.37e-8)", + "QScriptValue(0x43211234)", + "QScriptValue(0x10000)", + "QScriptValue(0x10001)", + "QScriptValue(qSNaN())", + "QScriptValue(qQNaN())", + "QScriptValue(qInf())", + "QScriptValue(-qInf())", + "QScriptValue(\"NaN\")", + "QScriptValue(\"Infinity\")", + "QScriptValue(\"-Infinity\")", + "QScriptValue(\"ciao\")", + "QScriptValue(QString::fromLatin1(\"ciao\"))", + "QScriptValue(QString(\"\"))", + "QScriptValue(QString())", + "QScriptValue(QString(\"0\"))", + "QScriptValue(QString(\"123\"))", + "QScriptValue(QString(\"12.4\"))", + "QScriptValue(0, QScriptValue::UndefinedValue)", + "QScriptValue(0, QScriptValue::NullValue)", + "QScriptValue(0, true)", + "QScriptValue(0, false)", + "QScriptValue(0, int(122))", + "QScriptValue(0, uint(124))", + "QScriptValue(0, 0)", + "QScriptValue(0, 0.0)", + "QScriptValue(0, 123.0)", + "QScriptValue(0, 6.37e-8)", + "QScriptValue(0, -6.37e-8)", + "QScriptValue(0, 0x43211234)", + "QScriptValue(0, 0x10000)", + "QScriptValue(0, 0x10001)", + "QScriptValue(0, qSNaN())", + "QScriptValue(0, qQNaN())", + "QScriptValue(0, qInf())", + "QScriptValue(0, -qInf())", + "QScriptValue(0, \"NaN\")", + "QScriptValue(0, \"Infinity\")", + "QScriptValue(0, \"-Infinity\")", + "QScriptValue(0, \"ciao\")", + "QScriptValue(0, QString::fromLatin1(\"ciao\"))", + "QScriptValue(0, QString(\"\"))", + "QScriptValue(0, QString())", + "QScriptValue(0, QString(\"0\"))", + "QScriptValue(0, QString(\"123\"))", + "QScriptValue(0, QString(\"12.3\"))", + "QScriptValue(engine, QScriptValue::UndefinedValue)", + "QScriptValue(engine, QScriptValue::NullValue)", + "QScriptValue(engine, true)", + "QScriptValue(engine, false)", + "QScriptValue(engine, int(122))", + "QScriptValue(engine, uint(124))", + "QScriptValue(engine, 0)", + "QScriptValue(engine, 0.0)", + "QScriptValue(engine, 123.0)", + "QScriptValue(engine, 6.37e-8)", + "QScriptValue(engine, -6.37e-8)", + "QScriptValue(engine, 0x43211234)", + "QScriptValue(engine, 0x10000)", + "QScriptValue(engine, 0x10001)", + "QScriptValue(engine, qSNaN())", + "QScriptValue(engine, qQNaN())", + "QScriptValue(engine, qInf())", + "QScriptValue(engine, -qInf())", + "QScriptValue(engine, \"NaN\")", + "QScriptValue(engine, \"Infinity\")", + "QScriptValue(engine, \"-Infinity\")", + "QScriptValue(engine, \"ciao\")", + "QScriptValue(engine, QString::fromLatin1(\"ciao\"))", + "QScriptValue(engine, QString(\"\"))", + "QScriptValue(engine, QString())", + "QScriptValue(engine, QString(\"0\"))", + "QScriptValue(engine, QString(\"123\"))", + "QScriptValue(engine, QString(\"1.23\"))", + "engine->evaluate(\"[]\")", + "engine->evaluate(\"{}\")", + "engine->evaluate(\"Object.prototype\")", + "engine->evaluate(\"Date.prototype\")", + "engine->evaluate(\"Array.prototype\")", + "engine->evaluate(\"Function.prototype\")", + "engine->evaluate(\"Error.prototype\")", + "engine->evaluate(\"Object\")", + "engine->evaluate(\"Array\")", + "engine->evaluate(\"Number\")", + "engine->evaluate(\"Function\")", + "engine->evaluate(\"(function() { return 1; })\")", + "engine->evaluate(\"(function() { return 'ciao'; })\")", + "engine->evaluate(\"(function() { throw new Error('foo'); })\")", + "engine->evaluate(\"/foo/\")", + "engine->evaluate(\"new Object()\")", + "engine->evaluate(\"new Array()\")", + "engine->evaluate(\"new Error()\")", + "engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", + "engine->evaluate(\"Undefined\")", + "engine->evaluate(\"Null\")", + "engine->evaluate(\"True\")", + "engine->evaluate(\"False\")", + "engine->evaluate(\"undefined\")", + "engine->evaluate(\"null\")", + "engine->evaluate(\"true\")", + "engine->evaluate(\"false\")", + "engine->evaluate(\"122\")", + "engine->evaluate(\"124\")", + "engine->evaluate(\"0\")", + "engine->evaluate(\"0.0\")", + "engine->evaluate(\"123.0\")", + "engine->evaluate(\"6.37e-8\")", + "engine->evaluate(\"-6.37e-8\")", + "engine->evaluate(\"0x43211234\")", + "engine->evaluate(\"0x10000\")", + "engine->evaluate(\"0x10001\")", + "engine->evaluate(\"NaN\")", + "engine->evaluate(\"Infinity\")", + "engine->evaluate(\"-Infinity\")", + "engine->evaluate(\"'ciao'\")", + "engine->evaluate(\"''\")", + "engine->evaluate(\"'0'\")", + "engine->evaluate(\"'123'\")", + "engine->evaluate(\"'12.4'\")", + "engine->nullValue()", + "engine->undefinedValue()", + "engine->newObject()", + "engine->newArray()", + "engine->newArray(10)", + "engine->newDate(QDateTime())", + "engine->newQMetaObject(&QObject::staticMetaObject)", + "engine->newVariant(QVariant())", + "engine->newVariant(QVariant(123))", + "engine->newVariant(QVariant(false))", + "engine->newQObject(0)", + "engine->newQObject(engine)",}; + +static quint16 toUInt16_valueArray [] = { + 0, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 4660, 0, + 1, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 12, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 4660, 0, + 1, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 12, 0, + 0, 1, + 0, 122, + 124, 0, + 0, 123, + 0, 0, + 4660, 0, + 1, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 123, + 1, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 0, 22, + 0, 0, + 0, 0, + 0, 0, + 1, 0, + 122, 124, + 0, 0, + 123, 0, + 0, 4660, + 0, 1, + 0, 0, + 0, 0, + 0, 0, + 123, 12, + 0, 0, + 0, 0, + 0, 0, + 0, 0, + 123, 0, + 0, 0, }; + +void tst_QScriptValue::toUInt16_makeData(const char* expr) +{ + static QHash toUInt16; + if (toUInt16.isEmpty()) { + toUInt16.reserve(142); + for (unsigned i = 0; i < 142; ++i) + toUInt16.insert(toUInt16_tagArray[i], toUInt16_valueArray[i]); + } + newRow(expr) << toUInt16.value(expr); +} + +void tst_QScriptValue::toUInt16_test(const char*, const QScriptValue& value) +{ + QFETCH(quint16, expected); + QCOMPARE(value.toUInt16(), expected); + QCOMPARE(value.toUInt16(), expected); +} + +DEFINE_TEST_FUNCTION(toUInt16) -- cgit v0.12 From 364ba2bfeeab574d2ae940e4387d3c90b2a46dcd Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Thu, 4 Mar 2010 18:40:22 +0100 Subject: Updated URLs. Reviewed-by: Erik Verbruggen --- dist/changes-4.5.4 | 2 +- dist/changes-4.7.0 | 4 ++-- doc/src/declarative/basictypes.qdoc | 2 +- tools/qdoc3/test/qdeclarative.qdocconf | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/changes-4.5.4 b/dist/changes-4.5.4 index abaf4f0..e60e507 100644 --- a/dist/changes-4.5.4 +++ b/dist/changes-4.5.4 @@ -11,7 +11,7 @@ Applications compiled for 4.4 will continue to run with 4.5. Some of the changes listed in this file include issue tracking numbers corresponding to tasks in the Task Tracker: - http://www.qtsoftware.com/developer/task-tracker + http://qt.nokia.com/developer/task-tracker Each of these identifiers can be entered in the task tracker to obtain more information about a particular change. diff --git a/dist/changes-4.7.0 b/dist/changes-4.7.0 index 4d776ee..76fa7f8 100644 --- a/dist/changes-4.7.0 +++ b/dist/changes-4.7.0 @@ -2,7 +2,7 @@ Qt 4.7 introduces many new features and improvements as well as bugfixes over the 4.6.x series. For more details, refer to the online documentation included in this distribution. The documentation is also available online: - http://doc.trolltech.com/4.7 + http://qt.nokia.com/doc/4.7 The Qt version 4.7 series is binary compatible with the 4.6.x series. Applications compiled for 4.6 will continue to run with 4.7. @@ -10,7 +10,7 @@ Applications compiled for 4.6 will continue to run with 4.7. Some of the changes listed in this file include issue tracking numbers corresponding to tasks in the Task Tracker: - http://www.qtsoftware.com/developer/task-tracker + http://qt.nokia.com/developer/task-tracker Each of these identifiers can be entered in the task tracker to obtain more information about a particular change. diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc index c60847e..6901947 100644 --- a/doc/src/declarative/basictypes.qdoc +++ b/doc/src/declarative/basictypes.qdoc @@ -128,7 +128,7 @@ \brief A URL is a resource locator, like a file name. A URL is a resource locator, like a file name. It can be either - absolute, e.g. "http://qtsoftware.com", or relative, e.g. + absolute, e.g. "http://qt.nokia.com", or relative, e.g. "pics/logo.png". A relative URL is resolved relative to the URL of the component where the URL is converted from a JavaScript string expression to a url property value. diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf index 3b5d8dc..e5b883a 100644 --- a/tools/qdoc3/test/qdeclarative.qdocconf +++ b/tools/qdoc3/test/qdeclarative.qdocconf @@ -6,7 +6,7 @@ include(qt-defines.qdocconf) project = Qml description = Qml Reference Documentation -url = http://doc.qtsoftware.com/4.6 +url = http://qt.nokia.com/doc/4.6/ qmlonly = true edition.Console.modules = QtCore QtDBus QtNetwork QtScript QtSql QtXml \ -- cgit v0.12